/* Platform base: approved fonts, tokens (light and dark) and components. Values from .planning/design/system/tokens.md. */

@font-face { font-family: "GT Super Display"; src: url("/assets/Fonts/GT-Super-Full/GT-Super-Display-Light.ttf") format("truetype"); font-weight: 300; font-display: swap; }
@font-face { font-family: "GT Super Text"; src: url("/assets/Fonts/GT-Super-Full/GT-Super-Text-Book.ttf") format("truetype"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Aeonik"; src: url("/assets/Fonts/Aeonik-Regular.ttf") format("truetype"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Aeonik"; src: url("/assets/Fonts/Aeonik-Medium.ttf") format("truetype"); font-weight: 500; font-display: swap; }

:root {
  color-scheme: light dark;
  --ground: #F6F2F2; --field: #D8D0D0; --ink: #3A3538; --ink-2: #615757;
  --border: #8C7C77; --divider: #A89C9F; --accent: #74435B; --accent-fill: #74435B; --on-accent: #F6F2F2;
  --accent-hover: #64344C; --accent-press: #54263D; --error: #904038; --success: #426042;

  --display: "GT Super Display", Georgia, serif;
  --serif: "GT Super Text", Georgia, serif;
  --sans: "Aeonik", system-ui, sans-serif;
  --text-moment: clamp(3rem, 7vw, 6.5rem);
  --text-h2: clamp(2.25rem, 3.4vw, 3rem);
  --text-h3: 1.75rem;
  --text-letter: 1.25rem;
  --text-body: 1.0625rem;
  --text-label: 0.9375rem;
  --text-small: 0.875rem;

  --wash: 246 242 242; /* the light ground as RGB, for washes over photos (photos stay light in both modes) */
  --radius: 10px;
  --ring: 2px solid var(--accent);
  --ring-offset: 3px;
  --gutter: clamp(24px, 6vw, 96px);
  --gutter: round(nearest, clamp(24px, 6vw, 96px), 1px); /* whole pixels, so text edges stay crisp */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

@media (prefers-color-scheme: dark) {
  :root {
    --ground: #1A1618; --field: #292326; --ink: #ECE6E6; --ink-2: #938B8B;
    --border: #71635E; --divider: #484042; --accent: #BA879E; --accent-fill: #87546C; --on-accent: #F6F2F2;
    --accent-hover: #8D5972; --accent-press: #935F78; --error: #C17A71; --success: #749574;
  }
}

/* Photos stay light in both modes, so text on a photo always uses the light-mode tokens. */
.on-photo {
  --ink: #3A3538; --ink-2: #615757; --border: #8C7C77; --divider: #A89C9F;
  --accent: #74435B; --accent-fill: #74435B; --on-accent: #F6F2F2; --accent-hover: #64344C; --accent-press: #54263D;
  color: var(--ink);
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--ground); color: var(--ink); font-family: var(--sans); font-size: var(--text-body); line-height: 1.5; -webkit-font-smoothing: antialiased; }
h1, h2, h3, p { margin: 0; }
img { display: block; max-width: 100%; }

.moment { font-family: var(--display); font-weight: 300; font-size: var(--text-moment); line-height: 1.02; letter-spacing: -0.02em; text-wrap: balance; }
.h2 { font-family: var(--display); font-weight: 300; font-size: var(--text-h2); line-height: 1.1; letter-spacing: -0.015em; text-wrap: balance; }
.h3 { font-family: var(--display); font-weight: 300; font-size: var(--text-h3); line-height: 1.2; letter-spacing: -0.01em; text-wrap: balance; }
.letter { font-family: var(--serif); font-size: var(--text-letter); line-height: 1.6; max-width: 34em; text-wrap: pretty; }
.letter p + p { margin-top: 0.8em; }
.label { font-size: var(--text-label); font-weight: 500; line-height: 1.4; }
.small { font-size: var(--text-small); line-height: 1.45; color: var(--ink-2); }

/* Bar */
.bar { display: flex; justify-content: space-between; align-items: center; gap: 16px 32px; flex-wrap: wrap; padding: 16px var(--gutter); }
.coach { display: inline-flex; align-items: center; gap: 12px; font-family: var(--display); font-weight: 300; font-size: 1.375rem; line-height: 1.2; color: var(--ink); text-decoration: none; }
.portrait { border-radius: 50%; object-fit: cover; object-position: 50% 22%; flex: none; }
.menu { display: flex; gap: 32px; }
.menu a { display: inline-flex; align-items: center; min-height: 44px; color: var(--ink); font-size: var(--text-body); text-decoration: underline; text-decoration-color: transparent; text-decoration-thickness: 2px; text-underline-offset: 8px; transition: text-decoration-color 200ms var(--ease-out); }
.menu a[aria-current="page"] { text-decoration-color: var(--accent); }
@media (hover: hover) { .menu a:not([aria-current]):hover { text-decoration-color: var(--border); } }
.menu a:focus-visible { outline: var(--ring); outline-offset: var(--ring-offset); border-radius: 2px; }

/* Main button */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 12px 24px; border: 1px solid transparent; border-radius: var(--radius); background: var(--accent-fill); color: var(--on-accent); font: 500 var(--text-label)/1.4 var(--sans); text-decoration: none; white-space: nowrap; cursor: pointer; transition: background-color 200ms var(--ease-out), transform 100ms var(--ease-out); }
@media (hover: hover) { .btn:hover { background: var(--accent-hover); } }
.btn:active { background: var(--accent-press); transform: scale(0.98); }
.btn:focus-visible { outline: var(--ring); outline-offset: var(--ring-offset); }

/* Link */
.link { display: inline-flex; align-items: center; min-height: 44px; color: var(--accent); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 4px; }
@media (hover: hover) { .link:hover { text-decoration-thickness: 2px; } }
.link:focus-visible { outline: var(--ring); outline-offset: var(--ring-offset); border-radius: 2px; }

/* Footer */
.foot { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 8px 24px; padding: 24px var(--gutter) 32px; border-top: 1px solid var(--divider); font-size: var(--text-small); line-height: 1.45; }
.foot .link { font-size: var(--text-small); }

@media (max-width: 760px) {
  .menu { gap: 24px; }
}
@media (prefers-reduced-motion: reduce) {
  .btn, .menu a { transition: background-color 200ms var(--ease-out), text-decoration-color 200ms var(--ease-out); }
  .btn:active { transform: none; }
}
