/* ============================================================
   AGELESS STUDIO — warm earth editorial
   palette: paper / espresso ink / terracotta / moss
   ============================================================ */

:root {
  --bg:        #f5efe4;
  --bg-deep:   #ece3d3;
  --ink:       #2b1e14;
  --ink-soft:  #5a4636;
  --accent:    #c25a37;
  --secondary: #6a7a4a;
  --rule:      rgba(43, 30, 20, 0.16);
  --rule-soft: rgba(43, 30, 20, 0.08);
  --card:      rgba(255, 252, 246, 0.55);
  --shadow:    0 1px 0 rgba(43,30,20,0.06), 0 18px 40px -28px rgba(43,30,20,0.45);

  --serif: "Fraunces", Georgia, "Times New Roman", serif;
  --sans:  "Bricolage Grotesque", "Helvetica Neue", Arial, sans-serif;
  --mono:  "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;

  --gutter: clamp(1.25rem, 5vw, 5rem);
  --measure: 68ch;
}

/* dark theme — deep espresso ground, warm paper ink */
html[data-theme="dark"] {
  --bg:        #17110c;
  --bg-deep:   #100b07;
  --ink:       #f0e6d6;
  --ink-soft:  #b9a894;
  --accent:    #e07a52;
  --secondary: #9aab72;
  --rule:      rgba(240, 230, 214, 0.18);
  --rule-soft: rgba(240, 230, 214, 0.09);
  --card:      rgba(255, 245, 230, 0.045);
  --shadow:    0 1px 0 rgba(0,0,0,0.4), 0 18px 40px -28px rgba(0,0,0,0.9);
}

@media (prefers-color-scheme: dark) {
  html:not([data-theme="light"]) {
    --bg:        #17110c;
    --bg-deep:   #100b07;
    --ink:       #f0e6d6;
    --ink-soft:  #b9a894;
    --accent:    #e07a52;
    --secondary: #9aab72;
    --rule:      rgba(240, 230, 214, 0.18);
    --rule-soft: rgba(240, 230, 214, 0.09);
    --card:      rgba(255, 245, 230, 0.045);
    --shadow:    0 1px 0 rgba(0,0,0,0.4), 0 18px 40px -28px rgba(0,0,0,0.9);
  }
}

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

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

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: clamp(1rem, 0.96rem + 0.2vw, 1.0625rem);
  line-height: 1.62;
  font-variation-settings: "wght" 380;
  overflow-x: hidden;
  transition: background-color 0.5s ease, color 0.5s ease;
}

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

a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--ink); }

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

.mono { font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.08em; text-transform: uppercase; }

/* ---------- animated noise field ---------- */
.grain-source { position: absolute; width: 0; height: 0; overflow: hidden; }

.grain {
  position: fixed;
  inset: -50%;
  z-index: 0;
  pointer-events: none;
  opacity: 0.32;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.72' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='300' height='300' filter='url(%23n)' opacity='0.5'/%3E%3C/svg%3E");
  animation: grain-drift 26s steps(6) infinite;
}
html[data-theme="dark"] .grain { mix-blend-mode: screen; opacity: 0.16; }
@media (prefers-color-scheme: dark) {
  html:not([data-theme="light"]) .grain { mix-blend-mode: screen; opacity: 0.16; }
}

@keyframes grain-drift {
  0%   { transform: translate(0, 0); }
  20%  { transform: translate(-3%, 2%); }
  40%  { transform: translate(2%, -3%); }
  60%  { transform: translate(-2%, -2%); }
  80%  { transform: translate(3%, 1%); }
  100% { transform: translate(0, 0); }
}

/* ---------- top bar ---------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.85rem var(--gutter);
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--rule-soft);
  animation: slide-down 0.7s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

@keyframes slide-down {
  from { transform: translateY(-100%); opacity: 0; }
  to   { transform: translateY(0); opacity: 1; }
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  color: var(--ink);
  font-family: var(--serif);
  font-variation-settings: "wght" 600, "opsz" 24;
  font-size: 1.05rem;
  letter-spacing: -0.01em;
  margin-right: auto;
}
.wordmark:hover { color: var(--ink); }

.wordmark-mark {
  display: grid;
  place-items: center;
  width: 1.9rem;
  height: 1.9rem;
  background: var(--accent);
  color: var(--bg);
  font-size: 1.05rem;
  font-variation-settings: "wght" 800;
  border-radius: 50%;
}

.nav { display: flex; gap: clamp(0.75rem, 2vw, 1.75rem); }
.nav a {
  color: var(--ink-soft);
  text-decoration: none;
  font-size: 0.82rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-variation-settings: "wght" 500;
  padding: 0.5rem 0.15rem;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  border-bottom: 1px solid transparent;
  transition: color 0.25s ease, border-color 0.25s ease;
}
.nav a:hover { color: var(--accent); border-bottom-color: var(--accent); }

.theme-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  min-height: 44px;
  padding: 0.4rem 0.85rem;
  background: transparent;
  border: 1px solid var(--rule);
  border-radius: 999px;
  color: var(--ink-soft);
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
  transition: border-color 0.25s ease, color 0.25s ease;
}
.theme-toggle:hover { border-color: var(--accent); color: var(--accent); }
.theme-toggle-icon { font-size: 0.95rem; line-height: 1; }

/* ---------- one-shot page-load orchestration ---------- */
.reveal { animation: rise 0.9s cubic-bezier(0.2, 0.8, 0.2, 1) both; }
.r1 { animation-delay: 0.05s; }
.r2 { animation-delay: 0.17s; }
.r3 { animation-delay: 0.29s; }
.r4 { animation-delay: 0.41s; }

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

/* ---------- diagonal split hero ---------- */
.split {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr;
  min-height: calc(100svh - 4.2rem);
}

.split-half {
  position: relative;
  padding: clamp(2.5rem, 7vw, 5.5rem) var(--gutter);
  display: flex;
  align-items: center;
}

.split-half--paper { background: var(--bg); }

.split-half--ink {
  background: var(--ink);
  color: var(--bg);
  align-items: flex-end;
  padding-bottom: clamp(3rem, 9vw, 6rem);
}

.split-inner { max-width: 42rem; width: 100%; }
.split-inner--right { margin-left: auto; max-width: 34rem; }

.eyebrow {
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--secondary);
  margin: 0 0 1.1rem;
}
.eyebrow--light { color: var(--secondary); }

.hero-name {
  font-family: var(--serif);
  font-size: clamp(4rem, 17vw, 12rem);
  line-height: 0.86;
  letter-spacing: -0.045em;
  margin: 0 0 1.2rem;
  font-variation-settings: "wght" 200, "opsz" 144;
  transition: font-variation-settings 0.45s cubic-bezier(0.2, 0.8, 0.2, 1);
  cursor: default;
}
.hero-name:hover,
.hero-name:focus-visible { font-variation-settings: "wght" 900, "opsz" 144; }

.hero-sub {
  font-size: clamp(1.05rem, 1.6vw, 1.35rem);
  line-height: 1.5;
  max-width: 30ch;
  color: var(--ink-soft);
  margin: 0 0 1.6rem;
  text-wrap: pretty;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--secondary);
}

.hero-current {
  font-size: clamp(1rem, 1.35vw, 1.15rem);
  line-height: 1.6;
  margin: 0 0 1.4rem;
  color: color-mix(in srgb, var(--bg) 82%, transparent);
  text-wrap: pretty;
}
.hero-current strong { color: var(--bg); font-variation-settings: "wght" 600; }

.hero-current-sub {
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--secondary);
  margin: 0;
  padding-top: 1.1rem;
  border-top: 1px solid rgba(245, 239, 228, 0.2);
}

/* the diagonal seam */
.split-diagonal {
  position: absolute;
  left: 0;
  right: 0;
  top: -1px;
  height: clamp(3rem, 9vw, 7rem);
  background: var(--bg);
  clip-path: polygon(0 0, 100% 0, 0 100%);
  pointer-events: none;
}

@media (min-width: 900px) {
  .split { grid-template-columns: 1fr 1fr; }
  .split-half--ink { align-items: center; padding-bottom: clamp(2.5rem, 7vw, 5.5rem); }
  .split-diagonal {
    top: 0;
    bottom: 0;
    left: -1px;
    right: auto;
    width: clamp(4rem, 11vw, 10rem);
    height: auto;
    clip-path: polygon(0 0, 100% 0, 0 100%);
  }
}

/* ============================================================
   SECTIONS
   ============================================================ */

.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0 var(--gutter) 1.5rem;
  max-width: 1500px;
  margin: 0 auto;
}

.section-title {
  font-family: var(--serif);
  font-size: clamp(1.75rem, 4vw, 3rem);
  line-height: 1.02;
  letter-spacing: -0.03em;
  margin: 0;
  font-variation-settings: "wght" 400, "opsz" 96;
}

.section-note {
  margin: 0;
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--secondary);
}

/* ---------- drag band ---------- */
.band-section {
  position: relative;
  z-index: 1;
  padding: clamp(3.5rem, 9vw, 7rem) 0 clamp(3rem, 7vw, 5rem);
  border-top: 1px solid var(--rule-soft);
}

.band-section--ink {
  background: var(--ink);
  color: var(--bg);
  border-top: none;
}
.band-section--ink .section-title { color: var(--bg); }
.band-section--ink .section-note { color: var(--secondary); }

.band {
  overflow: hidden;
  cursor: grab;
  padding: 0 var(--gutter) 1.5rem;
  -webkit-user-select: none;
  user-select: none;
  touch-action: pan-y;
}
.band.is-dragging { cursor: grabbing; }
.band:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }

.band-track {
  display: flex;
  gap: clamp(1rem, 2.5vw, 2rem);
  width: max-content;
  will-change: transform;
}

.card {
  flex: 0 0 auto;
  width: min(78vw, 25rem);
  padding: 1.75rem 1.6rem 2rem;
  background: var(--card);
  border: 1px solid var(--rule);
  border-radius: 3px;
  box-shadow: var(--shadow);
  transition: border-color 0.3s ease, transform 0.3s ease;
}
.card:hover { border-color: var(--accent); transform: translateY(-3px); }

.card-num {
  color: var(--accent);
  margin: 0 0 1.1rem;
  display: block;
}

.card-title {
  font-family: var(--serif);
  font-size: clamp(1.35rem, 2.4vw, 1.85rem);
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin: 0 0 0.5rem;
  font-variation-settings: "wght" 500, "opsz" 48;
}

.card-meta {
  color: var(--secondary);
  margin: 0 0 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--rule-soft);
}

.card-body {
  margin: 0;
  font-size: 0.94rem;
  line-height: 1.65;
  color: var(--ink-soft);
  text-wrap: pretty;
}
.card-body em { font-family: var(--serif); font-style: italic; color: var(--ink); }

/* quote band */
.band--ink .quote {
  flex: 0 0 auto;
  width: min(80vw, 30rem);
  margin: 0;
  padding: 1.75rem 1.6rem;
  border-left: 2px solid var(--accent);
}
.band--ink .quote p {
  font-family: var(--serif);
  font-size: clamp(1.1rem, 2vw, 1.5rem);
  line-height: 1.4;
  letter-spacing: -0.015em;
  margin: 0 0 1.1rem;
  font-variation-settings: "wght" 300, "opsz" 60;
  text-wrap: pretty;
}
.band--ink .quote cite {
  font-family: var(--mono);
  font-style: normal;
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--secondary);
}

/* ---------- studio ---------- */
.studio {
  position: relative;
  z-index: 1;
  padding: clamp(3.5rem, 9vw, 7rem) var(--gutter);
  max-width: 1500px;
  margin: 0 auto;
  border-top: 1px solid var(--rule-soft);
}

.studio-grid {
  display: grid;
  gap: clamp(1.5rem, 4vw, 4rem);
  grid-template-columns: 1fr;
  margin-bottom: clamp(2.5rem, 6vw, 4rem);
}

@media (min-width: 900px) {
  .studio-grid { grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr); }
}

.studio-title {
  font-family: var(--serif);
  font-size: clamp(1.6rem, 3.4vw, 2.6rem);
  line-height: 1.08;
  letter-spacing: -0.03em;
  margin: 0;
  font-variation-settings: "wght" 400, "opsz" 96;
  text-wrap: balance;
}

.studio-body { max-width: var(--measure); }
.studio-body p {
  margin: 0 0 1.15rem;
  color: var(--ink-soft);
  text-wrap: pretty;
}
.studio-body p:last-child { margin-bottom: 0; }
.studio-body strong { color: var(--ink); font-variation-settings: "wght" 600; }

.facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 14rem), 1fr));
  gap: 1px;
  margin: 0;
  background: var(--rule-soft);
  border: 1px solid var(--rule-soft);
}
.fact { background: var(--bg); padding: 1.1rem 1.2rem; }
.fact dt {
  font-family: var(--mono);
  font-size: 0.64rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--secondary);
  margin-bottom: 0.4rem;
}
.fact dd { margin: 0; font-size: 0.92rem; line-height: 1.45; }

/* ---------- process ---------- */
.process {
  position: relative;
  z-index: 1;
  padding: clamp(3.5rem, 9vw, 7rem) 0;
  border-top: 1px solid var(--rule-soft);
}

.steps {
  list-style: none;
  margin: 0 auto;
  padding: 0 var(--gutter);
  max-width: 1500px;
  display: grid;
  gap: 1px;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 17rem), 1fr));
  background: var(--rule-soft);
  border-top: 1px solid var(--rule-soft);
  border-bottom: 1px solid var(--rule-soft);
}

.step { background: var(--bg); padding: clamp(1.5rem, 3vw, 2.25rem) clamp(1.2rem, 2.5vw, 1.75rem); }
.step-num { color: var(--accent); display: block; margin-bottom: 1rem; }
.step-title {
  font-family: var(--serif);
  font-size: 1.3rem;
  letter-spacing: -0.02em;
  margin: 0 0 0.7rem;
  font-variation-settings: "wght" 500, "opsz" 40;
}
.step-body { margin: 0; font-size: 0.92rem; line-height: 1.62; color: var(--ink-soft); text-wrap: pretty; }

/* ---------- contact ---------- */
.contact {
  position: relative;
  z-index: 1;
  padding: clamp(3.5rem, 9vw, 7rem) var(--gutter);
  max-width: 1500px;
  margin: 0 auto;
  border-top: 1px solid var(--rule-soft);
}

.contact-grid {
  display: grid;
  gap: clamp(2rem, 5vw, 4.5rem);
  grid-template-columns: 1fr;
}
@media (min-width: 900px) {
  .contact-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
}

.contact-title {
  font-family: var(--serif);
  font-size: clamp(1.9rem, 4.5vw, 3.2rem);
  line-height: 1.02;
  letter-spacing: -0.035em;
  margin: 0 0 1.1rem;
  font-variation-settings: "wght" 400, "opsz" 120;
}

.contact-body { color: var(--ink-soft); max-width: 42ch; margin: 0 0 2rem; text-wrap: pretty; }

.contact-list { list-style: none; margin: 0; padding: 0; }
.contact-list li {
  padding: 0.85rem 0;
  border-top: 1px solid var(--rule-soft);
  font-size: 0.92rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.9rem;
}
.contact-list li:last-child { border-bottom: 1px solid var(--rule-soft); }
.contact-list .mono { color: var(--secondary); flex: 0 0 5.5rem; padding-top: 0.15rem; }

/* form */
.contact-form { display: grid; gap: 1.1rem; align-content: start; }

.field { display: grid; gap: 0.4rem; }
.field label {
  font-family: var(--mono);
  font-size: 0.66rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--secondary);
}
.field .opt { text-transform: none; letter-spacing: 0.04em; opacity: 0.75; }

.field input,
.field select,
.field textarea {
  width: 100%;
  min-height: 44px;
  padding: 0.7rem 0.85rem;
  background: var(--card);
  border: 1px solid var(--rule);
  border-radius: 2px;
  color: var(--ink);
  font-family: var(--sans);
  font-size: 0.95rem;
  font-variation-settings: "wght" 380;
  transition: border-color 0.25s ease, background-color 0.25s ease;
}
.field textarea { resize: vertical; line-height: 1.55; }
.field input:focus,
.field select:focus,
.field textarea:focus { border-color: var(--accent); outline: none; box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent); }
.field input:focus-visible,
.field select:focus-visible,
.field textarea:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }

.submit {
  justify-self: start;
  min-height: 48px;
  padding: 0.8rem 1.9rem;
  background: var(--accent);
  color: #fff8f0;
  border: 1px solid var(--accent);
  border-radius: 2px;
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background-color 0.25s ease, color 0.25s ease;
}
.submit:hover { background: transparent; color: var(--accent); }
.submit:disabled { opacity: 0.55; cursor: wait; }

.form-status {
  margin: 0;
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  color: var(--secondary);
}
.form-status[data-state="error"] { color: var(--accent); }

/* ---------- footer ---------- */
.site-footer {
  position: relative;
  z-index: 1;
  background: var(--ink);
  color: var(--bg);
  padding: clamp(2.5rem, 6vw, 4rem) var(--gutter) 5rem;
}
.footer-inner { max-width: 1500px; margin: 0 auto; }

.footer-mark {
  font-family: var(--serif);
  font-size: clamp(1.6rem, 5vw, 3rem);
  line-height: 1;
  letter-spacing: -0.035em;
  margin: 0 0 0.6rem;
  font-variation-settings: "wght" 300, "opsz" 120;
}
.footer-line {
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--secondary);
  margin: 0 0 1.5rem;
}
.footer-nav { display: flex; flex-wrap: wrap; gap: 1.25rem; margin: 0; }
.footer-nav a {
  color: color-mix(in srgb, var(--bg) 78%, transparent);
  text-decoration: none;
  font-size: 0.82rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}
.footer-nav a:hover { color: var(--accent); }

.attribution {
  position: static;
  margin: 2rem 0 0;
  font-size: 0.7rem;
  opacity: 0.55;
  font-family: var(--mono);
  letter-spacing: 0.08em;
}
.attribution a { color: inherit; }

/* ---------- reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .grain { animation: none; }
  .topbar { animation: none; }
  .reveal { animation: none; opacity: 1; transform: none; }
  .hero-name { transition: none; }
  .card:hover { transform: none; }
}
