/* theme.css — tokens, reset, shared primitives (warm / cinematic) */

:root {
  /* surfaces: one warm-tinted dark family */
  --bg: #17100c;
  --bg-raise: #1f1611;
  --bg-deep: #110b08;
  --plate: #8f5c47;            /* the terracotta of the portrait backdrop */

  /* text */
  --text: #f3e9db;
  --text-muted: #c4b39e;
  --text-dim: #9a8975;

  /* single accent: burnished amber */
  --accent: #dc9a5c;
  --accent-soft: rgba(220, 154, 92, 0.14);

  /* hairlines */
  --line: rgba(243, 233, 219, 0.1);
  --line-strong: rgba(243, 233, 219, 0.2);
  --shell: rgba(243, 233, 219, 0.045);

  /* type */
  --font-display: "Fraunces", "Iowan Old Style", Georgia, serif;
  --font-body: "Hanken Grotesk", "Segoe UI", sans-serif;

  --step--1: 0.8125rem;
  --step-0: 1.0625rem;
  --step-1: clamp(1.2rem, 1.05rem + 0.6vw, 1.5rem);
  --step-2: clamp(2.1rem, 1.4rem + 2.9vw, 3.75rem);
  --step-3: clamp(2.75rem, 1.5rem + 5.6vw, 6rem);
  --step-4: clamp(3.25rem, 1.4rem + 8.2vw, 8rem);

  /* space */
  --gutter: clamp(1.25rem, 4vw, 3rem);
  --section: clamp(6rem, 13vw, 11rem);
  --wrap: 82rem;

  /* shape */
  --r-shell: 1.75rem;
  --r-core: calc(var(--r-shell) - 0.5rem);

  /* motion */
  --ease: cubic-bezier(0.32, 0.72, 0, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);

  /* layers */
  --z-nav: 30;
  --z-menu: 29;
  --z-grain: 50;

  color-scheme: dark;
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 6rem;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text-muted);
  font-family: var(--font-body);
  font-size: var(--step-0);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

/* film grain: fixed, non-interactive, never on a scrolling container */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: var(--z-grain);
  pointer-events: none;
  opacity: 0.045;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 .9 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

img { display: block; max-width: 100%; height: auto; }
h1, h2, h3, p, figure, blockquote, ul { margin: 0; }
ul { padding: 0; list-style: none; }
a { color: inherit; text-decoration: none; }
a, button { touch-action: manipulation; -webkit-tap-highlight-color: rgba(220, 154, 92, 0.2); }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
cite { font-style: italic; }

::selection { background: var(--accent); color: var(--bg-deep); }

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

.skip-link {
  position: fixed;
  top: 0.75rem;
  left: 0.75rem;
  z-index: 60;
  padding: 0.75rem 1.1rem;
  border-radius: 999px;
  background: var(--text);
  color: var(--bg-deep);
  font-weight: 600;
  transform: translateY(-200%);
  transition: transform 0.4s var(--ease);
}
.skip-link:focus { transform: none; }

.wrap {
  width: min(100% - 2 * var(--gutter), var(--wrap));
  margin-inline: auto;
}

.section { padding-block: var(--section) calc(var(--section) * 1.08); }

/* --- type primitives --- */

.display {
  font-family: var(--font-display);
  font-weight: 340;
  font-size: var(--step-2);
  line-height: 1.04;
  letter-spacing: -0.028em;
  color: var(--text);
  text-wrap: balance;
  font-variation-settings: "opsz" 144;
}
.display--xl { font-size: var(--step-3); line-height: 0.98; letter-spacing: -0.035em; }
.display em, .hero__title em {
  font-style: italic;
  font-weight: 300;
  color: var(--accent);
}

.lead {
  font-family: var(--font-display);
  font-size: var(--step-1);
  font-weight: 360;
  line-height: 1.45;
  color: var(--text);
  text-wrap: pretty;
}

.marker {
  display: flex;
  align-items: baseline;
  gap: 0.9rem;
  margin-bottom: 1.75rem;
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.0625rem;
  color: var(--text-muted);
}
.marker span {
  font-family: var(--font-body);
  font-style: normal;
  font-size: var(--step--1);
  font-weight: 600;
  letter-spacing: 0.12em;
  font-variant-numeric: tabular-nums;
  color: var(--accent);
}
.marker::after {
  content: "";
  flex: 0 0 3.5rem;
  height: 1px;
  background: var(--line-strong);
  transform: translateY(-0.3em);
}

/* --- buttons --- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 1rem;
  padding: 0.5rem 0.5rem 0.5rem 1.5rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 1rem;
  line-height: 1.2;
  transition: transform 0.5s var(--ease), background-color 0.5s var(--ease), box-shadow 0.5s var(--ease);
}
.btn--primary {
  background: var(--text);
  color: var(--bg-deep);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6), 0 18px 40px -18px rgba(220, 154, 92, 0.55);
}
.btn__icon {
  display: grid;
  place-items: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  background: var(--bg-deep);
  color: var(--accent);
  transition: transform 0.5s var(--ease);
}
.btn:hover { background: #fff7ec; box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6), 0 22px 48px -16px rgba(220, 154, 92, 0.7); }
.btn:hover .btn__icon { transform: translate(2px, -2px) scale(1.06); }
.btn:active { transform: scale(0.98); }

.link {
  display: inline-block;
  padding-block: 0.6rem;
  color: var(--text);
  font-weight: 500;
  background: linear-gradient(var(--accent), var(--accent)) 0 calc(100% - 0.35rem) / 100% 1px no-repeat;
  transition: background-size 0.5s var(--ease), color 0.4s var(--ease);
}
.link:hover { color: var(--accent); background-size: 35% 1px; }

.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 1.25rem 2rem; margin-top: 2.5rem; }

/* --- double-bezel frame --- */

.frame {
  padding: 0.5rem;
  border-radius: var(--r-shell);
  background: var(--shell);
  border: 1px solid var(--line);
  box-shadow: 0 50px 90px -40px rgba(0, 0, 0, 0.8), 0 30px 70px -45px rgba(220, 154, 92, 0.35);
}
.frame img {
  width: 100%;
  border-radius: var(--r-core);
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.15);
}
.frame--tilt-l { transform: rotate(-2deg); }
.frame--tilt-r { transform: rotate(2deg); }

/* --- scroll reveal (only when JS is present) --- */

.js [data-reveal] {
  opacity: 0;
  translate: 0 2.5rem;
  transition: opacity 1s var(--ease-out), translate 1s var(--ease-out);
  transition-delay: var(--d, 0ms);
}
.js [data-reveal].is-in { opacity: 1; translate: 0 0; }

@media (max-width: 47.99rem) {
  .frame--tilt-l, .frame--tilt-r { transform: none; }
}

@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;
    transition-delay: 0ms !important;
  }
  .js [data-reveal] { opacity: 1; translate: 0 0; }
}
