/* ==========================================================================
   Viamoda — public website stylesheet
   Brand tokens are taken verbatim from the app design system:
   src/constants/colors.ts, src/constants/fonts.ts, src/constants/layout.ts
   ==========================================================================

   Accessibility note on accent usage:
   - Ember Orange (#E87722) and Gold (#C9A84C) do NOT meet WCAG AA contrast
     as text on Cream/White, so they are used only decoratively (rules,
     underlines, the logotype) or as text on the dark Deep Umber background,
     where both pass AA.
   - Royal Purple (#6B3FA0) passes AA on Cream (≈6.4:1) and is the accent
     used where colored text must be readable.
   - textMuted (#9C9589) fails AA on Cream and is not used for body text;
     fine print uses textSecondary (#6B5E4E, ≈5.5:1).
*/

/* ---- Fonts (self-hosted, latin subset; licenses in /assets/fonts/) ---- */

@font-face {
  font-family: 'Cormorant Garamond';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('../fonts/CormorantGaramond-latin-wght.woff2') format('woff2');
}
@font-face {
  font-family: 'Cormorant Garamond';
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/CormorantGaramond-latin-400italic.woff2') format('woff2');
}
@font-face {
  font-family: 'DM Sans';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('../fonts/DMSans-latin-wght.woff2') format('woff2');
}
@font-face {
  font-family: 'DM Sans';
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/DMSans-latin-400italic.woff2') format('woff2');
}

/* ---- Design tokens ---- */

:root {
  /* Colors — src/constants/colors.ts */
  --cream: #F5F0E8;
  --ember: #E87722;
  --umber: #1A1400;
  --purple: #6B3FA0;
  --gold: #C9A84C;
  --surface: #FFFFFF;
  --border: #DDD8CC;
  --divider: #EAE6DF;
  --text: #1A1400;
  --text-secondary: #6B5E4E;
  --text-muted: #9C9589;

  /* Role accents as used in the app UI */
  --role-model: #27AE60;
  --role-photographer: #6B3FA0;
  --role-brand: #C9A84C;
  --role-agency: #E87722;

  /* On-dark text */
  --on-dark: #F5F0E8;
  --on-dark-secondary: #CFC7B4;

  /* Type */
  --font-heading: 'Cormorant Garamond', Georgia, 'Times New Roman', serif;
  --font-ui: 'DM Sans', 'Segoe UI', Arial, sans-serif;

  /* Layout — 4pt scale, mirrors src/constants/layout.ts */
  --sp-1: 4px;  --sp-2: 8px;  --sp-3: 12px; --sp-4: 16px;
  --sp-5: 20px; --sp-6: 24px; --sp-8: 32px; --sp-10: 40px;
  --sp-12: 48px; --sp-16: 64px;

  --container: 1120px;
  --container-narrow: 720px;
  --pad-x: clamp(20px, 5vw, 48px);
  --section-y: clamp(64px, 10vw, 128px);
  --header-h: 72px;
}

/* ---- Reset / base ---- */

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

body {
  margin: 0;
  background: var(--cream);
  color: var(--text);
  font-family: var(--font-ui);
  font-size: 1.0625rem; /* 17px — app FontSize.md */
  line-height: 1.65;
  font-weight: 400;
}

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

h1, h2, h3, h4 {
  font-family: var(--font-heading);
  font-weight: 500;
  line-height: 1.2;
  margin: 0 0 0.5em;
  letter-spacing: 0.01em;
}
p { margin: 0 0 1em; }

a {
  color: inherit;
  text-decoration: underline;
  text-decoration-color: var(--ember);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
  transition: color 120ms ease, text-decoration-color 120ms ease;
}
a:hover { color: var(--purple); text-decoration-color: var(--purple); }

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

::selection { background: var(--gold); color: var(--umber); }

/* ---- Utilities ---- */

.container {
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--pad-x);
}
.container--narrow { max-width: var(--container-narrow); }

.skip-link {
  position: absolute;
  left: var(--sp-4);
  top: -100px;
  z-index: 100;
  background: var(--umber);
  color: var(--cream);
  padding: var(--sp-3) var(--sp-5);
  font-size: 0.9375rem;
  text-decoration: none;
}
.skip-link:focus { top: var(--sp-4); color: var(--cream); }

.eyebrow {
  display: block;
  font-family: var(--font-ui);
  font-size: 0.8125rem; /* 13px — app FontSize.sm */
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-secondary);
  margin-bottom: var(--sp-4);
}

.rule {
  border: 0;
  width: 64px;
  height: 2px;
  background: var(--gold);
  margin: 0 0 var(--sp-6);
}
.rule--center { margin-inline: auto; }

/* ---- Header ---- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--cream);
  border-bottom: 1px solid var(--border);
}
.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: var(--header-h);
  gap: var(--sp-6);
}

.wordmark {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 1.75rem;
  line-height: 1;
  letter-spacing: 0.02em;
  text-decoration: none;
  color: var(--umber);
}
.wordmark:hover { color: var(--umber); }
.wordmark .wordmark__moda { color: var(--ember); }

.site-nav__list {
  display: flex;
  align-items: center;
  gap: var(--sp-8);
  list-style: none;
  margin: 0;
  padding: 0;
}
.site-nav__list a {
  font-size: 0.9375rem; /* 15px — app FontSize.base */
  font-weight: 500;
  color: var(--umber);
  text-decoration: none;
  padding: var(--sp-2) 0;
  border-bottom: 1px solid transparent;
}
.site-nav__list a:hover {
  color: var(--umber);
  border-bottom-color: var(--ember);
}
.site-nav__list a[aria-current="page"] {
  border-bottom-color: var(--gold);
}

.nav-toggle {
  display: none;
  appearance: none;
  background: none;
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 10px;
  cursor: pointer;
  line-height: 0;
}
.nav-toggle__bars,
.nav-toggle__bars::before,
.nav-toggle__bars::after {
  content: '';
  display: block;
  width: 20px;
  height: 2px;
  background: var(--umber);
}
.nav-toggle__bars { position: relative; }
.nav-toggle__bars::before { position: absolute; top: -6px; }
.nav-toggle__bars::after { position: absolute; top: 6px; }

@media (max-width: 720px) {
  .nav-toggle { display: block; }
  .site-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--cream);
    border-bottom: 1px solid var(--border);
  }
  .site-header.nav-open .site-nav { display: block; }
  .site-nav__list {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: var(--sp-2) var(--pad-x) var(--sp-5);
  }
  .site-nav__list a {
    display: block;
    padding: var(--sp-4) 0;
    border-bottom: 1px solid var(--divider);
    font-size: 1.0625rem;
  }
  .site-nav__list a[aria-current="page"],
  .site-nav__list a:hover { border-bottom-color: var(--ember); }
}

/* ---- Hero ---- */

.hero {
  padding-block: clamp(80px, 14vw, 176px);
  border-bottom: 1px solid var(--divider);
}
.hero__title {
  font-size: clamp(2.875rem, 8vw, 5.25rem);
  font-weight: 500;
  letter-spacing: 0;
  max-width: 12em;
  margin-bottom: var(--sp-6);
}
.hero__title em {
  font-style: italic;
  font-weight: 400;
}
.hero__lede {
  max-width: 36em;
  font-size: clamp(1.0625rem, 2vw, 1.25rem);
  color: var(--text-secondary);
  margin-bottom: var(--sp-10);
}
.hero__launch {
  display: flex;
  align-items: center;
  gap: var(--sp-4);
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--umber);
}
.hero__launch::before {
  content: '';
  width: 40px;
  height: 2px;
  background: var(--ember);
}

/* ---- Sections ---- */

.section { padding-block: var(--section-y); }
.section + .section { border-top: 1px solid var(--divider); }
.section__head { max-width: 40em; margin-bottom: clamp(40px, 6vw, 72px); }
.section__title {
  font-size: clamp(2rem, 4.5vw, 3rem);
  margin-bottom: var(--sp-4);
}
.section__lede { color: var(--text-secondary); }

/* Roles */

.roles {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid var(--border);
}
.role {
  padding: var(--sp-8) var(--sp-6) var(--sp-8) 0;
}
.role + .role {
  border-left: 1px solid var(--divider);
  padding-left: var(--sp-6);
}
.role__accent {
  display: block;
  width: 28px;
  height: 3px;
  margin-bottom: var(--sp-5);
}
.role--model .role__accent { background: var(--role-model); }
.role--photographer .role__accent { background: var(--role-photographer); }
.role--brand .role__accent { background: var(--role-brand); }
.role--agency .role__accent { background: var(--role-agency); }
.role__name {
  font-size: 1.75rem;
  font-weight: 600;
  margin-bottom: var(--sp-3);
}
.role__text {
  font-size: 0.9375rem;
  color: var(--text-secondary);
  margin: 0;
}

@media (max-width: 960px) {
  .roles { grid-template-columns: 1fr 1fr; }
  .role, .role + .role { padding: var(--sp-8) 0; border-left: 0; }
  .roles .role:nth-child(even) {
    border-left: 1px solid var(--divider);
    padding-left: var(--sp-6);
  }
  .roles .role:nth-child(odd) { padding-right: var(--sp-6); }
  .roles .role:nth-child(n+3) { border-top: 1px solid var(--divider); }
}
@media (max-width: 560px) {
  .roles { grid-template-columns: 1fr; }
  .roles .role,
  .roles .role:nth-child(even),
  .roles .role:nth-child(odd) {
    border-left: 0;
    padding-left: 0;
    padding-right: 0;
  }
  .roles .role:nth-child(n+2) { border-top: 1px solid var(--divider); }
}

/* Steps */

.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(32px, 5vw, 64px);
}
.step__num {
  font-family: var(--font-heading);
  font-size: 3.375rem; /* app FontSize.5xl */
  font-weight: 400;
  line-height: 1;
  color: var(--umber);
}
.step__num::after {
  content: '';
  display: block;
  width: 40px;
  height: 2px;
  background: var(--gold);
  margin-top: var(--sp-4);
}
.step__title {
  font-size: 1.5rem;
  font-weight: 600;
  margin: var(--sp-5) 0 var(--sp-2);
}
.step__text {
  font-size: 0.9375rem;
  color: var(--text-secondary);
  margin: 0;
}
@media (max-width: 720px) {
  .steps { grid-template-columns: 1fr; gap: var(--sp-10); }
}

/* Trust (dark band) */

.trust {
  background: var(--umber);
  color: var(--on-dark);
  padding-block: var(--section-y);
}
.trust__grid {
  display: grid;
  grid-template-columns: 5fr 7fr;
  gap: clamp(40px, 6vw, 96px);
}
.trust .eyebrow { color: var(--gold); }
.trust__title {
  font-size: clamp(2rem, 4.5vw, 3rem);
  color: var(--on-dark);
  margin-bottom: 0;
}
.trust__body p { color: var(--on-dark-secondary); }
.trust__body strong { color: var(--on-dark); font-weight: 500; }
.trust__note {
  margin-top: var(--sp-6);
  padding-top: var(--sp-6);
  border-top: 1px solid rgba(245, 240, 232, 0.2);
  font-size: 0.9375rem;
}
.trust a {
  color: var(--on-dark);
  text-decoration-color: var(--gold);
}
.trust a:hover { color: var(--gold); }
@media (max-width: 840px) {
  .trust__grid { grid-template-columns: 1fr; }
}

/* Purpose statement */

.purpose { text-align: center; }
.purpose__statement {
  font-family: var(--font-heading);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(1.625rem, 4vw, 2.75rem);
  line-height: 1.35;
  max-width: 24em;
  margin: 0 auto;
}

/* ---- Interior pages ---- */

.page-head {
  padding-block: clamp(56px, 8vw, 104px) clamp(40px, 6vw, 72px);
  border-bottom: 1px solid var(--divider);
}
.page-head__title {
  font-size: clamp(2.5rem, 6vw, 4rem);
  margin-bottom: var(--sp-4);
}
.page-head__lede {
  max-width: 38em;
  font-size: 1.125rem;
  color: var(--text-secondary);
  margin: 0;
}

.prose {
  padding-block: clamp(48px, 7vw, 88px) var(--section-y);
}
.prose h2 {
  font-size: 1.875rem; /* app FontSize.2xl */
  font-weight: 600;
  margin: 2.2em 0 0.6em;
}
.prose h2:first-child { margin-top: 0; }
.prose h3 {
  font-size: 1.375rem;
  font-weight: 600;
  margin: 1.8em 0 0.5em;
}
.prose p, .prose li { color: var(--text-secondary); }
.prose li { margin-bottom: 0.5em; }
.prose ul, .prose ol { padding-left: 1.4em; margin: 0 0 1.2em; }
.prose strong { color: var(--text); font-weight: 500; }
.prose .callout {
  border-left: 3px solid var(--gold);
  background: var(--surface);
  padding: var(--sp-5) var(--sp-6);
  margin: 1.6em 0;
}
.prose .callout p { margin: 0; }
.prose .callout p + p { margin-top: 0.8em; }
.page-meta {
  font-size: 0.875rem;
  color: var(--text-secondary);
  margin-bottom: 2em;
}

/* ---- Footer ---- */

.site-footer {
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding-block: clamp(48px, 7vw, 80px) var(--sp-10);
}
.site-footer__grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: clamp(32px, 5vw, 80px);
  margin-bottom: clamp(40px, 6vw, 64px);
}
.site-footer__brand img {
  width: 96px;
  margin-bottom: var(--sp-4);
}
.site-footer__tagline {
  font-family: var(--font-heading);
  font-style: italic;
  font-size: 1.25rem;
  color: var(--text-secondary);
  margin: 0;
}
.site-footer__heading {
  font-family: var(--font-ui);
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-secondary);
  margin: 0 0 var(--sp-4);
}
.site-footer__links {
  list-style: none;
  margin: 0;
  padding: 0;
}
.site-footer__links li { margin-bottom: var(--sp-3); }
.site-footer__links a {
  font-size: 0.9375rem;
  color: var(--umber);
  text-decoration: none;
}
.site-footer__links a:hover { text-decoration: underline; text-decoration-color: var(--ember); }
.site-footer__legal {
  border-top: 1px solid var(--divider);
  padding-top: var(--sp-6);
  font-size: 0.8125rem;
  color: var(--text-secondary);
}
.site-footer__legal p { margin: 0 0 var(--sp-2); }
@media (max-width: 720px) {
  .site-footer__grid { grid-template-columns: 1fr; gap: var(--sp-10); }
}

/* ---- 404 ---- */

.notfound {
  padding-block: clamp(96px, 16vw, 200px);
  text-align: center;
}
.notfound__code {
  font-family: var(--font-heading);
  font-size: clamp(4rem, 10vw, 6.75rem);
  line-height: 1;
  margin-bottom: var(--sp-4);
}
.notfound__code .accent { color: var(--ember); }
