/* ════════════════════════════════════════════════════════════════
   DNA INTEGRATIONS — pages.css
   Shared stylesheet for the 5 sub-pages (services / faq / about-us /
   contact / privacy-policy). Standalone — they do NOT load styles.css.

   Palette: teal #002B2A (bg) · cream #FFFCF0 (text) · gold #F5BD1E
   (accents). CSS-only animation, no backdrop-filter, no canvas —
   deliberately lightweight next to the WebGL homepage.
   ════════════════════════════════════════════════════════════════ */

/* ---- Fonts (same files the homepage uses) ---- */
@font-face {
  font-family: 'DM Serif Display';
  src: url('assets/Fonts/DMSerifDisplay-Italic.ttf') format('truetype');
  font-style: italic;
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: 'TimesNR';
  src: local('Times New Roman'), local('TimesNewRomanPSMT'),
       url('assets/Fonts/times-new-roman-regular_ufonts.com.ttf') format('truetype');
  font-weight: 400;
  font-display: swap;
}

/* ---- Tokens ---- */
:root {
  --teal:  #002B2A;
  --cream: #FFFCF0;
  --gold:  #F5BD1E;

  --serif: 'DM Serif Display', Georgia, serif;
  --body:  'TimesNR', 'Times New Roman', serif;

  /* cream at low alpha = hairlines/dividers on the teal bg */
  --hairline:  rgba(255, 252, 240, 0.16);

  --radius: clamp(12px, 1.4vw, 18px);
  --maxw: 1200px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* ---- Reset ---- */
* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: var(--body);
  color: var(--cream);
  /* candy paint — deep candy TEAL (#002B2A family) with a soft light
     rolloff and fine metallic mint flake, layered:
       1 sparse bright flake   2 dense faint flake (finer scale)
       3 candy coat — lighting lives IN the teal gradient stops
         (no white overlay layers: they mute/grey the color) */
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='f'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix type='matrix' values='0 0 0 0 0.42  0 0 0 0 0.5  0 0 0 0 0.45  0 0 0 8 -6.3'/%3E%3C/filter%3E%3Crect width='300' height='300' filter='url(%23f)'/%3E%3C/svg%3E"),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='f'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' seed='9' stitchTiles='stitch'/%3E%3CfeColorMatrix type='matrix' values='0 0 0 0 0.42  0 0 0 0 0.5  0 0 0 0 0.45  0 0 0 3 -2.1'/%3E%3C/filter%3E%3Crect width='300' height='300' filter='url(%23f)'/%3E%3C/svg%3E"),
    radial-gradient(130% 110% at 50% 28%, #065450 0%, #003B39 42%, var(--teal) 72%, #001514 100%);
  background-color: #001514;   /* solid fallback — a failed layer can never white the page */
  background-size: 300px 300px, 220px 220px, auto;
  background-repeat: repeat, repeat, no-repeat;
  background-attachment: fixed;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
::selection { background: var(--gold); color: var(--teal); }

:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ════════════════════════════════════════════════════════════════
   PAGE SHELL — slim header, title block, footer
   ════════════════════════════════════════════════════════════════ */
.page-top {
  width: min(92%, var(--maxw));
  margin: 0 auto;
  padding: clamp(1.2rem, 3vh, 2rem) 0;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
}
.page-brand {
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(1.2rem, 2.4vw, 1.7rem);
  transition: color 0.25s var(--ease);
}
.page-brand:hover { color: var(--gold); }
.page-home {
  font-family: var(--body);
  font-size: clamp(0.95rem, 1.4vw, 1.1rem);
  opacity: 0.8;
  border-bottom: 1px solid var(--hairline);
  padding-bottom: 2px;
  transition: color 0.25s var(--ease), border-color 0.25s var(--ease), opacity 0.25s var(--ease);
}
.page-home:hover { color: var(--gold); border-color: var(--gold); opacity: 1; }

.page-main {
  flex: 1;
  width: min(92%, var(--maxw));
  margin: 0 auto;
  padding: clamp(2rem, 6vh, 4.5rem) 0 clamp(3rem, 8vh, 6rem);
}

.page-head { margin-bottom: clamp(2rem, 5vh, 3.5rem); }
.page-title {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(2.4rem, 6vw, 4.2rem);
  line-height: 1.05;
}
/* short gold rule that grows in when the heading reveals */
.gold-rule {
  height: 3px;
  width: 0;
  background: var(--gold);
  margin: 0.9rem 0 0;
  border-radius: 2px;
  transition: width 0.8s var(--ease) 0.15s;
}
.page-head.visible .gold-rule { width: clamp(48px, 6vw, 84px); }
.page-sub {
  font-family: var(--body);
  font-size: clamp(1rem, 1.6vw, 1.2rem);
  opacity: 0.75;
  margin-top: 0.9rem;
  max-width: 60ch;
}

.page-foot {
  width: min(92%, var(--maxw));
  margin: 0 auto;
  padding: clamp(1.6rem, 4vh, 2.6rem) 0;
  border-top: 1px solid var(--hairline);
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  align-items: center;
  text-align: center;
  font-family: var(--body);
  opacity: 0.85;
}
.page-foot a { border-bottom: 1px solid var(--hairline); transition: color 0.25s var(--ease), border-color 0.25s var(--ease); }
.page-foot a:hover { color: var(--gold); border-color: var(--gold); }
.page-foot .foot-copy { opacity: 0.65; font-size: 0.9rem; }

/* ════════════════════════════════════════════════════════════════
   SERVICES — flat cream-tinted cards, expand on hover/tap
   ════════════════════════════════════════════════════════════════ */
.services-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: clamp(0.9rem, 2vw, 1.6rem);
  align-items: start;
}
.service-tile {
  border: 2px solid var(--gold);
  border-radius: var(--radius);
  padding: clamp(1.3rem, 2.6vw, 2.1rem);
  cursor: pointer;
  overflow: hidden;
  transition: transform 0.35s var(--ease);
  /* uniform collapsed height: floor covers the longest (2-line) title, so
     every unhovered card matches; title vertically centered within it */
  min-height: clamp(110px, 13vh, 150px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  text-align: center;
}
.service-tile:hover { transform: translateY(-3px); }
.service-tile:focus { outline: none; }
.service-tile:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }
.service-name {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(1.35rem, 2.6vw, 1.9rem);
  line-height: 1.15;
  transition: color 0.3s var(--ease);
}
/* same treatment as the FAQ questions: hovered title goes gold,
   the revealed description stays cream */
.service-tile:hover .service-name { color: var(--gold); }
.service-reveal {
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transition: max-height 0.55s var(--ease), opacity 0.45s var(--ease), margin-top 0.45s var(--ease);
  margin-top: 0;
}
.service-desc {
  font-family: var(--body);
  font-size: clamp(0.98rem, 1.4vw, 1.1rem);
  opacity: 0.85;
}
.service-tile.open .service-reveal {
  max-height: 460px;
  opacity: 1;
  margin-top: 0.9rem;
}
@media (hover: hover) {
  .service-tile:hover .service-reveal {
    max-height: 460px;
    opacity: 1;
    margin-top: 0.9rem;
  }
}

/* ════════════════════════════════════════════════════════════════
   FAQ — one card, hairline-separated accordion, gold "+"
   ════════════════════════════════════════════════════════════════ */
.faq-tile {
  border: 2px solid var(--gold);
  border-radius: var(--radius);
  padding: clamp(0.8rem, 2.6vw, 2.2rem);
}
.faq-list { list-style: none; }
.faq-item { border-bottom: 1px solid var(--hairline); }
.faq-item:last-child { border-bottom: 0; }
.faq-item:focus { outline: none; }
.faq-item:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; border-radius: 6px; }
.faq-q {
  font-family: var(--serif);
  font-size: clamp(1.1rem, 2.2vw, 1.6rem);
  padding: clamp(0.9rem, 2.2vh, 1.3rem) 0.4rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  transition: color 0.3s var(--ease);
}
.faq-item:hover .faq-q { color: var(--gold); }
.faq-q::after {
  content: "+";
  font-family: var(--body);
  font-size: 1.4em;
  color: var(--gold);
  transition: transform 0.4s var(--ease);
}
.faq-a {
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transition: max-height 0.5s var(--ease), opacity 0.4s var(--ease), padding 0.4s var(--ease);
  padding: 0 0.4rem;
}
.faq-a p {
  font-family: var(--body);
  font-size: clamp(0.98rem, 1.4vw, 1.1rem);
  opacity: 0.85;
  max-width: 75ch;
}
.faq-item.open .faq-a { max-height: 360px; opacity: 1; padding-bottom: 1.2rem; }
.faq-item.open .faq-q::after { transform: rotate(45deg); }
@media (hover: hover) {
  .faq-item:hover .faq-a { max-height: 360px; opacity: 1; padding-bottom: 1.2rem; }
  .faq-item:hover .faq-q::after { transform: rotate(45deg); }
}

/* ════════════════════════════════════════════════════════════════
   ABOUT — 2-col cards, gold underline on section names
   ════════════════════════════════════════════════════════════════ */
.about-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: clamp(0.9rem, 2vw, 1.6rem);
}
.about-tile {
  border: 2px solid var(--gold);
  border-radius: var(--radius);
  padding: clamp(1.4rem, 2.8vw, 2.3rem);
  transition: transform 0.35s var(--ease);
}
.about-tile:hover { transform: translateY(-3px); }
.about-section-name {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(1.35rem, 2.6vw, 1.9rem);
  line-height: 1.15;
  padding-bottom: 0.6rem;
  margin-bottom: 0.9rem;
  border-bottom: 2px solid var(--gold);
  display: inline-block;
}
.about-desc {
  font-family: var(--body);
  font-size: clamp(0.98rem, 1.4vw, 1.1rem);
  opacity: 0.88;
}

/* ════════════════════════════════════════════════════════════════
   CONTACT — card + dark sub-tile fields, gold focus & submit
   ════════════════════════════════════════════════════════════════ */
.contact-tile {
  border: 2px solid var(--gold);
  border-radius: var(--radius);
  width: min(820px, 100%);
  margin: 0 auto;
  padding: clamp(1.4rem, 4vw, 3rem);
}
.contact-form,
.form-fields { display: flex; flex-direction: column; gap: clamp(1rem, 2.4vh, 1.5rem); }

.field {
  border: 2px solid var(--gold);
  border-radius: calc(var(--radius) * 0.7);
  padding: clamp(0.9rem, 2vw, 1.3rem);
  transition: box-shadow 0.25s var(--ease);
}
.field:focus-within {
  box-shadow: 0 0 0 2px rgba(245, 189, 30, 0.25);
}
.field-label {
  display: block;
  font-family: var(--serif);
  font-size: clamp(1.05rem, 1.8vw, 1.3rem);
  margin-bottom: 0.5rem;
}
.field-num { color: var(--gold); opacity: 0.9; font-size: 0.8em; margin-right: 0.5em; }
.field-hint { font-family: var(--body); font-size: 0.85em; opacity: 0.6; margin-left: 0.4em; }

.field input,
.field textarea,
.field select {
  width: 100%;
  font-family: var(--body);
  font-size: clamp(1rem, 1.5vw, 1.1rem);
  color: var(--cream);
  background: transparent;
  border: 0;
  padding: 0.55rem 0.2rem;
  outline: none;
}
.field textarea { resize: vertical; min-height: 5.5rem; }
.field input::placeholder,
.field textarea::placeholder { color: rgba(255, 252, 240, 0.45); }
.field select { appearance: none; cursor: pointer; }
.field select option { color: #111; }   /* readable in the native dropdown */

/* pill checkboxes — checked = gold */
.checkbox-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 0.5rem;
}
.checkbox-row {
  display: inline-flex;
  align-items: center;
  font-family: var(--body);
  font-size: clamp(0.92rem, 1.3vw, 1.02rem);
  cursor: pointer;
  user-select: none;
  padding: 0.5em 1.1em;
  border-radius: 999px;
  border: 2px solid var(--gold);
  color: var(--cream);
  transition: background 0.2s var(--ease), color 0.2s var(--ease),
              transform 0.15s var(--ease);
}
.checkbox-row:hover { transform: translateY(-1px); }
.checkbox-row input {
  position: absolute;
  width: 1px; height: 1px;
  opacity: 0;
  pointer-events: none;
}
.checkbox-row:has(input:checked) {
  background: var(--gold);
  color: var(--teal);
  border-color: var(--gold);
  font-weight: 600;
}
.checkbox-row:has(input:focus-visible) { outline: 2px solid var(--gold); outline-offset: 2px; }

.conditional { display: none; margin-top: 0.8rem; }
.conditional.show { display: block; }

/* validation */
.field.invalid { border-color: #ff7a6b; box-shadow: 0 0 0 2px rgba(255, 122, 107, 0.2); }
.field-error {
  display: none;
  color: #ff9d8a;
  font-family: var(--body);
  font-size: 0.95rem;
  margin-top: 0.4rem;
}
.field.invalid .field-error { display: block; }

.form-footer {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}
.form-status { font-family: var(--body); opacity: 0.9; font-size: 1rem; text-align: center; }
.form-status.error { color: #ff9d8a; }
.form-status.success { color: var(--gold); }

.submit-btn {
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(1.3rem, 2.4vw, 1.7rem);
  color: var(--teal);
  background: var(--gold);
  border: 0;
  padding: 0.55em 1.9em;
  cursor: pointer;
  border-radius: 999px;
  transition: transform 0.25s var(--ease), filter 0.25s var(--ease);
}
.submit-btn:hover { transform: translateY(-2px); filter: brightness(1.07); }
.submit-btn:disabled { opacity: 0.6; cursor: progress; transform: none; }

.load-error { opacity: 0.8; font-family: var(--body); }

/* ════════════════════════════════════════════════════════════════
   SCROLL-REVEAL (observer lives in app.js)
   ════════════════════════════════════════════════════════════════ */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}
.reveal.visible { opacity: 1; transform: none; }

/* ---- Responsive ---- */
@media (max-width: 760px) {
  .services-grid,
  .about-grid { grid-template-columns: 1fr; }
}

/* ---- Accessibility: respect reduced motion ---- */
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .gold-rule { transition: none; }
  * { transition-duration: 0.001ms !important; }
}
