/* ==========================================================================
   Yesodo Group — styles.css
   Implements brand spec v3. Tokens are the spec; do not invent colors.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Design tokens (brand spec v3)
   -------------------------------------------------------------------------- */
:root {
  /* Color */
  --ink:        #2C2C2A;  /* canvas */
  --bone:       #F1EFE8;  /* primary text */
  --stone:      #B4B2A9;  /* secondary text */
  --slate:      #444441;  /* surfaces, dividers, inputs */
  --mist:       #888780;  /* hints, decorative small text, borders */
  --mist-text:  #98968F;  /* mist nudged for WCAG AA at small sizes (see README) */
  --coral:      #F0997B;  /* commitment accent — Send button only */
  --coral-deep: #D85A30;  /* coral on light / pressed */

  /* Type */
  --font-display: "Yesodo Wordmark", "Archivo", system-ui, sans-serif;
  --font-body:    "Inter", system-ui, -apple-system, sans-serif;

  /* Scale */
  --wordmark-size: clamp(1.9rem, 7.5vw, 2.75rem); /* ~30px mobile → 44px laptop */
  --body-size: 0.9375rem;   /* 15px */
  --micro-size: 0.75rem;    /* 12px */

  /* Layout */
  --radius: 8px;
  --measure: 29rem;         /* sentence max-width (~464px) */
  --page-max: 75rem;        /* 1200px — composition stays coherent on ultrawide */
  --pad-x: clamp(1.25rem, 5vw, 2rem);
}

/* Self-hosted, subset fonts — zero third-party requests.
   Wordmark: Archivo instanced to wdth 125 / wght 500, subset to its six
   glyphs (~1KB). Width is baked into the file, so no font-stretch is needed.
   Replace with the custom face from the logo design brief when it ships.
   Body: Inter instanced to wght 400 / 500, subset to Latin + typographic
   punctuation (~8KB each). */
@font-face {
  font-family: "Yesodo Wordmark";
  src: url("../assets/yesodo-wordmark.woff2") format("woff2");
  font-weight: 500;
  font-display: block; /* tiny file: a flash of fallback would be worse */
}

@font-face {
  font-family: "Inter";
  src: url("../assets/inter-regular.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "Inter";
  src: url("../assets/inter-medium.woff2") format("woff2");
  font-weight: 500;
  font-display: swap;
}

/* --------------------------------------------------------------------------
   2. Reset / base
   -------------------------------------------------------------------------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  background: var(--ink);
  color: var(--bone);
  font-family: var(--font-body);
  font-size: var(--body-size);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

/* Visible keyboard focus, everywhere */
:focus-visible {
  outline: 2px solid var(--bone);
  outline-offset: 3px;
  border-radius: 2px;
}

/* Screen-reader-only content (form labels) */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* Honeypot: hidden from people, visible to bots (do not use display:none —
   some bots skip fields they can detect as hidden that way) */
.field--nectar {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

/* --------------------------------------------------------------------------
   3. Header
   -------------------------------------------------------------------------- */
.site-header {
  width: 100%;
  max-width: var(--page-max);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 1rem;
  padding: 1rem var(--pad-x);
}

.site-header--split {
  justify-content: space-between;
}

.wordmark--small {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 0.9375rem;
  letter-spacing: 0.04em;
  color: var(--bone);
  text-decoration: none;
}

.nav-link {
  font-size: var(--micro-size);
  color: var(--mist-text);
  text-decoration: none;
  padding: 0.5rem 0.25rem; /* generous tap target */
}

.nav-link:hover {
  color: var(--bone);
}

/* Border-only contact button (spec: no fill, mist border, brightens on hover) */
.button-ghost {
  display: inline-block;
  font-size: var(--micro-size);
  line-height: 1;
  color: var(--bone);
  text-decoration: none;
  border: 1px solid var(--mist);
  border-radius: var(--radius);
  padding: 0.5625rem 1.125rem; /* ≥44px tap target with line box */
  transition: border-color 150ms ease;
}

.button-ghost:hover {
  border-color: var(--bone);
}

/* --------------------------------------------------------------------------
   4. Hero (homepage)
   -------------------------------------------------------------------------- */
.hero {
  flex: 1;
  width: 100%;
  max-width: var(--page-max);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 3rem var(--pad-x) 5rem; /* bottom-heavy: hero sits above true center */
}

.wordmark {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: var(--wordmark-size);
  letter-spacing: 0.04em;
  color: var(--bone);
  margin: 0 0 1.75rem;
}

/* On large screens the type owns the space rather than floating in it */
@media (min-width: 75rem) {
  .wordmark {
    font-size: 3.75rem; /* 60px */
    margin-bottom: 2rem;
  }
}

.scope {
  max-width: var(--measure);
  margin: 0 auto;
  color: var(--stone);
}

@media (max-width: 480px) {
  .scope {
    max-width: 16.5rem; /* ~264px: breaks the sentence into calm lines */
    font-size: 0.875rem;
    line-height: 1.7;
  }
}

/* --------------------------------------------------------------------------
   5. Contact page
   -------------------------------------------------------------------------- */
.contact {
  flex: 1;
  width: 100%;
  max-width: 25rem; /* 400px */
  margin: 0 auto;
  padding: 2.5rem var(--pad-x) 4rem;
}

.contact__title {
  font-size: 1.625rem;
  font-weight: 500;
  line-height: 1.3;
  text-align: center;
  margin: 0 0 0.375rem;
}

.contact__subtitle {
  font-size: 0.8125rem;
  color: var(--mist-text);
  text-align: center;
  margin: 0 0 1.75rem;
}

.field {
  display: block;
  width: 100%;
  background: var(--slate);
  border: 1px solid var(--mist);
  border-radius: var(--radius);
  color: var(--bone);
  font: inherit;
  font-size: 0.875rem;
  padding: 0.75rem 0.875rem; /* ≥44px tall */
  margin: 0 0 0.625rem;
  transition: border-color 150ms ease;
}

.field::placeholder {
  color: var(--stone);
}

.field:hover,
.field:focus {
  border-color: var(--stone);
  outline: none;
}

.field:focus-visible {
  outline: 2px solid var(--bone);
  outline-offset: 2px;
}

textarea.field {
  resize: vertical;
  min-height: 6rem;
}

/* The one coral element on the site (spec: commitment accent) */
.button-send {
  display: block;
  width: 100%;
  background: var(--coral);
  color: var(--ink);
  border: none;
  border-radius: var(--radius);
  font: inherit;
  font-size: 0.875rem;
  font-weight: 500;
  padding: 0.8125rem;
  cursor: pointer;
  transition: background-color 150ms ease;
}

.button-send:hover {
  background: var(--coral-deep);
}

.button-send:disabled {
  opacity: 0.6;
  cursor: default;
}

.contact__fallback {
  font-size: var(--micro-size);
  color: var(--mist-text);
  text-align: center;
  margin: 1rem 0 0;
}

.contact__fallback a {
  color: var(--stone);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.contact__fallback a:hover {
  color: var(--bone);
}

/* Inline form status (set by js/form.js) */
.form-status {
  font-size: 0.8125rem;
  text-align: center;
  margin: 0.875rem 0 0;
  min-height: 1.25rem;
}

.form-status[data-state="success"] { color: var(--bone); }
.form-status[data-state="error"]   { color: var(--stone); }

/* --------------------------------------------------------------------------
   5b. Prose (privacy / legal)
   -------------------------------------------------------------------------- */
.prose {
  flex: 1;
  width: 100%;
  max-width: 38rem;
  margin: 0 auto;
  padding: 2.5rem var(--pad-x) 4rem;
  color: var(--stone);
  font-size: 0.8125rem; /* 13px — reads as reference copy, a notch below body */
  line-height: 1.7;
}

.prose__title {
  font-size: 1.625rem;
  font-weight: 500;
  color: var(--bone);
  margin: 0 0 0.375rem;
}

.prose__updated {
  font-size: var(--micro-size);
  color: var(--mist-text);
  margin: 0 0 2rem;
}

.prose h2 {
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--bone);
  margin: 2rem 0 0.5rem;
}

.prose p {
  margin: 0 0 1rem;
}

.prose strong {
  color: var(--bone);
  font-weight: 500;
}

.prose a {
  color: var(--stone);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.prose a:hover {
  color: var(--bone);
}

/* --------------------------------------------------------------------------
   6. Not-found page
   -------------------------------------------------------------------------- */
.notfound {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 3rem var(--pad-x) 5rem;
}

.notfound__title {
  font-size: 1.625rem;
  font-weight: 500;
  margin: 0 0 0.5rem;
}

.notfound__line {
  color: var(--stone);
  margin: 0 0 2rem;
}

/* --------------------------------------------------------------------------
   7. Footer
   -------------------------------------------------------------------------- */
.site-footer {
  width: 100%;
  max-width: var(--page-max);
  margin: 0 auto;
  display: flex;
  justify-content: center;
  gap: 1.25rem;
  padding: 1rem var(--pad-x) 1.25rem;
  border-top: 1px solid var(--slate);
  font-size: var(--micro-size);
  color: var(--mist-text);
}

@media (max-width: 480px) {
  .site-footer {
    gap: 0.5rem;
  }
}

.footer-link {
  color: var(--mist-text);
  text-decoration: none;
  transition: color 150ms ease;
}

.footer-link:hover {
  color: var(--bone);
}

/* --------------------------------------------------------------------------
   8. Motion (one orchestrated moment; respects reduced motion)
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: no-preference) {
  .hero > * {
    animation: rise 600ms ease both;
  }

  .hero > .scope {
    animation-delay: 120ms;
  }

  @keyframes rise {
    from {
      opacity: 0;
      transform: translateY(8px);
    }
    to {
      opacity: 1;
      transform: none;
    }
  }
}
