/* ==========================================================================
   Terrastation — shared styles
   Design tokens carried over from the original Squarespace theme:
   warm/earthy palette + Roboto.
   ========================================================================== */

:root {
  /* Palette (HSL triples from the original theme) */
  --cream:        hsl(42, 35.71%, 94.51%);   /* site background      */
  --ink:          hsl(30, 12.5%, 18.82%);    /* primary text / dark  */
  --accent:       hsl(30.73, 22.65%, 64.51%);/* tan accent           */
  --accent-dark:  hsl(32.5, 16%, 29.41%);    /* dark brown accent    */
  --beige:        hsl(33.33, 32.14%, 89.02%);/* light accent         */
  --danger:      #b3452f;                     /* required marks, error border */
  --danger-text: #7a2d20;                     /* error banner text            */
  --danger-bg:   hsla(9, 55%, 45%, 0.08);     /* error banner background      */

  --ink-on-dark:  hsl(42, 35.71%, 94.51%);   /* text on dark bg      */
  --muted-on-dark: hsl(33.33, 20%, 78%);

  --maxw: 1120px;
  --gutter: clamp(1.25rem, 5vw, 4rem);
  --radius: 10px;
  --font: "Roboto", "Helvetica Neue", Helvetica, Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  font-weight: 400;
  color: var(--ink);
  background: var(--cream);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3 { font-weight: 500; line-height: 1.15; margin: 0 0 .5em; letter-spacing: -0.01em; }
h1 { font-size: clamp(2.2rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.6rem, 3.2vw, 2.4rem); }
h3 { font-size: 1.25rem; font-weight: 500; }
p  { margin: 0 0 1rem; }
a  { color: var(--accent-dark); }

img { max-width: 100%; display: block; }

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--accent-dark); /* AA-legible on light backgrounds; tan is kept on dark via overrides below */
  margin: 0 0 1rem;
}

/* Layout ------------------------------------------------------------------ */
.wrap { max-width: var(--maxw); margin-inline: auto; padding-inline: var(--gutter); }

.section { padding-block: clamp(3.5rem, 8vw, 6.5rem); }
.section--tight { padding-block: clamp(2.5rem, 5vw, 4rem); }
.section--dark { background: var(--ink); color: var(--ink-on-dark); }
.section--beige { background: var(--beige); }
.section--dark .eyebrow { color: var(--accent); }
.hero .eyebrow { color: var(--accent); } /* hero sits on the dark earthrise image */
.section--dark a { color: var(--beige); }

.lede { font-size: 1.2rem; max-width: 62ch; }
.measure { max-width: 62ch; }
.center { text-align: center; margin-inline: auto; }
.role { margin: -0.25rem 0 0; color: var(--accent-dark); font-weight: 500; }

/* Buttons ----------------------------------------------------------------- */
.btn {
  display: inline-block;
  font-weight: 500;
  letter-spacing: 0.02em;
  padding: 0.85em 1.9em;
  border-radius: 999px;
  border: 1.5px solid transparent;
  text-decoration: none;
  cursor: pointer;
  transition: background-color .18s ease, color .18s ease, border-color .18s ease;
}
.btn--primary { background: var(--accent-dark); color: var(--cream); }
.btn--primary:hover { background: var(--ink); color: var(--cream); }
.btn--outline { background: transparent; border-color: currentColor; color: inherit; }
.btn--outline:hover { background: var(--cream); color: var(--ink); }

/* Header ------------------------------------------------------------------ */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--cream) 90%, transparent);
  backdrop-filter: saturate(180%) blur(8px);
  border-bottom: 1px solid color-mix(in srgb, var(--ink) 8%, transparent);
}
.nav {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; padding-block: 0.9rem;
}
.brand {
  display: inline-flex; align-items: center; gap: 0.55rem;
  font-weight: 700; font-size: 1.15rem; letter-spacing: -0.01em;
  text-decoration: none; color: var(--ink);
}
.brand-logo { width: 26px; height: 26px; display: block; flex: none; }
.nav-links { display: flex; gap: clamp(1rem, 3vw, 2rem); list-style: none; margin: 0; padding: 0; }
.nav-links a {
  text-decoration: none; color: var(--ink); font-size: 0.98rem;
  padding-block: 0.25rem; border-bottom: 2px solid transparent;
}
.nav-links a:hover, .nav-links a[aria-current="page"] { border-bottom-color: var(--accent); }

.nav-toggle { display: none; }

/* Hero -------------------------------------------------------------------- */
.hero {
  position: relative;
  color: var(--ink-on-dark);
  background: var(--ink);
  text-align: center;
  overflow: hidden;
}
.hero::before {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, hsla(30,12.5%,8%,0.45) 0%, hsla(30,12.5%,8%,0.68) 55%, hsla(30,12.5%,8%,0.82) 100%),
              var(--hero-img, none) center / cover no-repeat;
  z-index: 0;
}
.hero .wrap { position: relative; z-index: 1; padding-block: clamp(5rem, 14vw, 9rem); }
.hero p { color: var(--muted-on-dark); }
.hero .lede { margin-inline: auto; }
/* Portrait hero (About): the founder photo is brightly lit on one side, so the
   shared vertical gradient isn't enough — darken it a touch more for legibility. */
.hero--portrait::before {
  background: linear-gradient(180deg, hsla(30,12.5%,8%,0.5) 0%, hsla(30,12.5%,8%,0.72) 50%, hsla(30,12.5%,8%,0.85) 100%),
              var(--hero-img, none) center / cover no-repeat;
}

/* Cards / grids ----------------------------------------------------------- */
.grid { display: grid; gap: clamp(1.25rem, 3vw, 2rem); }
.grid--3 { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.grid--2 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }

.card {
  background: var(--cream);
  border: 1px solid color-mix(in srgb, var(--ink) 10%, transparent);
  border-radius: var(--radius);
  padding: 1.75rem;
}
.section--dark .card {
  background: color-mix(in srgb, var(--cream) 6%, transparent);
  border-color: color-mix(in srgb, var(--cream) 15%, transparent);
}
.card h3 { margin-top: 0; }
.card p:last-child { margin-bottom: 0; }
.card--link { text-decoration: none; color: inherit; transition: transform .18s ease, border-color .18s ease; display: block; }
.card--link:hover { transform: translateY(-3px); border-color: var(--accent); }
.card__more { color: var(--accent-dark); font-weight: 500; }

/* Quote ------------------------------------------------------------------- */
blockquote.pull {
  margin: 2rem 0 0; padding: 1.5rem 1.75rem;
  border-left: 3px solid var(--accent);
  background: color-mix(in srgb, var(--cream) 6%, transparent);
  font-size: 1.15rem; font-style: italic;
}
.section:not(.section--dark) blockquote.pull { background: var(--beige); }

/* Definition-style list (Responsible AI) ---------------------------------- */
.deflist { display: grid; gap: 1rem; margin: 1.5rem 0 0; padding: 0; list-style: none; }
.deflist strong { color: var(--accent-dark); }

/* Contact ----------------------------------------------------------------- */
.contact-grid { display: grid; gap: clamp(2rem, 5vw, 4rem); grid-template-columns: 1fr; }
@media (min-width: 800px) { .contact-grid { grid-template-columns: 0.8fr 1.2fr; } }

address.contact { font-style: normal; line-height: 1.9; }

.form-field { margin-bottom: 1.25rem; }
.form-field label { display: block; font-weight: 500; margin-bottom: 0.4rem; font-size: 0.95rem; }
.form-field input, .form-field textarea {
  width: 100%; font: inherit; color: var(--ink);
  padding: 0.75rem 0.9rem;
  border: 1.5px solid color-mix(in srgb, var(--ink) 20%, transparent);
  border-radius: 8px; background: #fff;
}
.form-field input:focus, .form-field textarea:focus {
  outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 25%, transparent);
}
.form-field textarea { min-height: 150px; resize: vertical; }
.hp { position: absolute; left: -9999px; }  /* honeypot */

/* Support form: selects, file input, help text, error banner --------------- */
.form-field select {
  width: 100%; font: inherit; color: var(--ink);
  padding: 0.75rem 0.9rem; padding-right: 2.5rem;
  border: 1.5px solid color-mix(in srgb, var(--ink) 20%, transparent);
  border-radius: 8px; background-color: #fff; cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2357503f' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 0.85rem center; background-size: 1.1em;
}
.form-field select:focus {
  outline: none; border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 25%, transparent);
}
.form-field input[type="file"] {
  width: 100%; font: inherit; padding: 0.65rem 0.75rem; cursor: pointer;
  background: #fff; border: 1.5px dashed color-mix(in srgb, var(--ink) 30%, transparent); border-radius: 8px;
}
.form-help { display: block; margin-top: 0.4rem; font-size: 0.85rem; color: var(--accent-dark); }
.form-required { color: var(--danger); font-weight: 700; }

.form-row { display: grid; gap: 1.25rem; grid-template-columns: 1fr; }
@media (min-width: 520px) { .form-row { grid-template-columns: 1fr 1fr; } }

.file-list { margin: 0.6rem 0 0; padding: 0; list-style: none; display: grid; gap: 0.25rem; font-size: 0.85rem; color: var(--accent-dark); }

.form-error {
  margin: 0 0 1.5rem; padding: 0.85rem 1rem;
  border-left: 3px solid var(--danger); background: var(--danger-bg);
  border-radius: 6px; color: var(--danger-text); font-size: 0.95rem;
}

/* Footer ------------------------------------------------------------------ */
.site-footer { background: var(--ink); color: var(--ink-on-dark); padding-block: 3.5rem; }
.site-footer a { color: var(--muted-on-dark); text-decoration: none; }
.site-footer a:hover { color: var(--cream); }
.footer-grid { display: flex; flex-wrap: wrap; gap: 2rem; justify-content: space-between; }
.footer-brand { max-width: 34ch; }
.footer-brand strong { font-size: 1.15rem; display: inline-flex; align-items: center; gap: 0.5rem; }
.footer-logo { width: 24px; height: 24px; display: block; flex: none; }
.footer-nav ul { list-style: none; margin: 0.5rem 0 0; padding: 0; display: grid; gap: 0.5rem; }
.footer-nav h4 { text-transform: uppercase; letter-spacing: 0.14em; font-size: 0.75rem; color: var(--accent); margin: 0; }
.footer-legal { margin-top: 2.5rem; font-size: 0.85rem; color: var(--muted-on-dark); }

/* Skip link --------------------------------------------------------------- */
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 1rem; top: 1rem; z-index: 100; background: var(--cream); color: var(--ink); padding: 0.6rem 1rem; border-radius: 8px; }

/* Mobile nav -------------------------------------------------------------- */
@media (max-width: 720px) {
  .nav-toggle {
    display: inline-flex; background: none; border: 0; cursor: pointer;
    font: inherit; color: var(--ink); padding: 0.4rem;
  }
  .nav-links {
    position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; gap: 0; background: var(--cream);
    border-bottom: 1px solid color-mix(in srgb, var(--ink) 10%, transparent);
    padding: 0.5rem var(--gutter) 1rem;
    display: none;
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding-block: 0.7rem; border-bottom: 1px solid color-mix(in srgb, var(--ink) 6%, transparent); }
}

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; transition: none !important; }
}
