:root {
  --ink: #29231e;
  --paper: #f7f0e2;
  --paper-light: #fffaf1;
  --orange: #d96735;
  --moss: #556b56;
  --line: rgba(41, 35, 30, .19);
  --mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  --serif: Georgia, "Times New Roman", serif;
}

* { box-sizing: border-box; }
html { min-height: 100%; background: var(--paper); }
body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 82% 18%, rgba(217, 103, 53, .11), transparent 27rem),
    linear-gradient(145deg, var(--paper-light), var(--paper));
  font-family: var(--serif);
  font-size: 1rem;
  line-height: 1.5;
  transition: color .42s ease, background-color .42s ease;
}
body::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  content: "";
  pointer-events: none;
  opacity: .26;
  background-image: linear-gradient(rgba(41,35,30,.055) 1px, transparent 1px), linear-gradient(90deg, rgba(41,35,30,.045) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: linear-gradient(to bottom, #000, transparent 78%);
}
::selection { color: var(--paper-light); background: var(--ink); }
a { color: inherit; }
button, input { font: inherit; color: inherit; }
.dark-mode {
  --ink: #f7f0e2;
  --paper: #080808;
  --paper-light: #11100f;
  --orange: #ff7845;
  --moss: #a9c6ad;
  --line: rgba(247, 240, 226, .22);
  background:
    radial-gradient(circle at 82% 18%, rgba(255, 120, 69, .16), transparent 27rem),
    linear-gradient(145deg, #11100f, #080808);
}
.dark-mode::before {
  background-image: linear-gradient(rgba(247,240,226,.05) 1px, transparent 1px), linear-gradient(90deg, rgba(247,240,226,.04) 1px, transparent 1px);
}
[data-theme-surface] { cursor: pointer; }
.theme-ripple {
  position: fixed;
  z-index: 90;
  width: 1rem;
  height: 1rem;
  border: 2px solid var(--orange);
  border-radius: 50%;
  pointer-events: none;
  transform: translate(-50%, -50%) scale(.2);
  animation: theme-ripple .62s cubic-bezier(.2, .7, .2, 1) forwards;
}
@keyframes theme-ripple {
  70% { opacity: .8; }
  to { opacity: 0; transform: translate(-50%, -50%) scale(12); }
}
.skip-link { position: fixed; z-index: 100; top: .75rem; left: .75rem; padding: .65rem .9rem; color: white; background: var(--ink); transform: translateY(-150%); }
.skip-link:focus { transform: none; }
.site-header {
  display: flex;
  width: min(100% - 2.5rem, 1400px);
  margin: 0 auto;
  padding: 1.5rem 0;
  align-items: flex-start;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
}
.wordmark { font-size: 1.06rem; line-height: .97; text-decoration: none; }
.wordmark span { display: block; }
nav { display: flex; gap: 1.5rem; }
nav a, .legal-kicker {
  font-family: var(--mono);
  font-size: .78rem;
  letter-spacing: .1em;
  text-transform: uppercase;
}
nav a, .footer-links a, .footer-links button { text-decoration: none; border: 0; border-bottom: 1px solid transparent; background: none; cursor: pointer; }
nav a:hover, nav a:focus-visible, .footer-links a:hover, .footer-links a:focus-visible, .footer-links button:hover, .footer-links button:focus-visible { border-color: currentColor; }

.home-body { display: grid; grid-template-rows: auto 1fr auto; }
.home-main {
  display: flex;
  width: min(100% - 2.5rem, 1400px);
  margin: 0 auto;
  padding: clamp(5rem, 12vh, 9rem) 0;
  flex-direction: column;
  gap: clamp(1.5rem, 4vh, 2.8rem);
  align-items: center;
  justify-content: center;
}
.studio-mark {
  display: block;
  width: clamp(15rem, 31vw, 25rem);
  overflow: visible;
  filter: drop-shadow(0 1.5rem 2.2rem rgba(41, 35, 30, .08));
  transform-origin: 50% 58%;
}
.dark-mode .studio-mark { filter: drop-shadow(0 1.5rem 2.2rem rgba(0, 0, 0, .38)); }
.theme-pop .studio-mark { animation: studio-pop .6s cubic-bezier(.2, .85, .25, 1); }
@keyframes studio-pop {
  40% { transform: rotate(-2deg) scale(1.035); }
  72% { transform: rotate(1deg) scale(.995); }
}
.mark-t { fill: var(--ink); }
.mark-s {
  fill: none;
  stroke: var(--orange);
  stroke-width: 46;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.mark-dot { fill: var(--orange); }
.studio-line {
  margin: 0;
  font-size: clamp(1rem, 1.25vw, 1.2rem);
  font-weight: 400;
  letter-spacing: -.012em;
  line-height: 1.35;
  text-align: center;
}
.home-footer, footer {
  display: grid;
  width: min(100% - 2.5rem, 1400px);
  margin: 0 auto;
  padding: 1.5rem 0 2rem;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 2rem;
  border-top: 1px solid var(--line);
  font-size: .9rem;
}
footer p { margin: 0; }
.footer-links { display: flex; flex-direction: column; align-items: flex-start; gap: .2rem; }
.footer-links button { padding: 0; font-family: var(--serif); }
footer > p:last-child { text-align: right; }

dialog { border: 0; }
dialog::backdrop { background: rgba(41,35,30,.58); backdrop-filter: blur(7px); }
.privacy-dialog { width: min(calc(100% - 2rem), 700px); max-height: calc(100vh - 2rem); padding: 0; border-radius: 1rem; color: var(--ink); background: var(--paper-light); box-shadow: 0 30px 100px rgba(0,0,0,.3); }
.privacy-panel { padding: clamp(1.5rem, 5vw, 3rem); }
.privacy-panel .eyebrow { margin: 0 0 1rem; font-family: var(--mono); font-size: .78rem; letter-spacing: .1em; text-transform: uppercase; }
.privacy-panel h2 { max-width: none; margin: 0; font-size: clamp(1.8rem, 4vw, 2.8rem); font-weight: 400; letter-spacing: -.035em; line-height: 1; }
.privacy-panel > p:not(.eyebrow) { max-width: 38rem; }
.privacy-options { margin: 1.7rem 0; border-top: 1px solid var(--line); }
.privacy-options label { display: flex; padding: 1rem 0; align-items: center; justify-content: space-between; gap: 1rem; border-bottom: 1px solid var(--line); cursor: pointer; }
.privacy-options label span { display: grid; }
.privacy-options small { margin-top: .2rem; color: rgba(41,35,30,.68); }
.dark-mode .privacy-options small { color: rgba(247,240,226,.7); }
.privacy-options input { width: 1.2rem; height: 1.2rem; accent-color: var(--orange); }
.privacy-actions { display: flex; flex-wrap: wrap; gap: .75rem; align-items: center; }
.privacy-actions button { padding: .75rem 1rem; border: 1px solid var(--ink); border-radius: 999px; cursor: pointer; background: transparent; }
.privacy-actions button:first-child { color: var(--paper-light); background: var(--ink); }
.privacy-actions a { margin-left: auto; font-size: .9rem; }

/* Privacy and legal pages */
.legal-shell { width: min(100% - 2.5rem, 1120px); margin: 0 auto; padding: 5rem 0 8rem; }
.legal-hero { display: grid; padding-bottom: 4rem; grid-template-columns: 1fr 1fr; gap: 3rem; border-bottom: 1px solid var(--line); }
.legal-hero h1 { margin: 0; font-size: clamp(2.8rem, 6vw, 4.8rem); font-weight: 400; letter-spacing: -.05em; line-height: .95; }
.legal-summary { align-self: end; max-width: 32rem; font-size: 1.15rem; }
.legal-summary p { margin: 0 0 1rem; }
.legal-grid { display: grid; padding-top: 4rem; grid-template-columns: 230px minmax(0, 1fr); gap: clamp(3rem, 8vw, 7rem); }
.legal-toc { position: sticky; top: 2rem; align-self: start; }
.legal-toc p { margin: 0 0 1rem; font-family: var(--mono); font-size: .78rem; letter-spacing: .08em; text-transform: uppercase; }
.legal-toc ol { margin: 0; padding-left: 1.25rem; }
.legal-toc a { text-decoration-thickness: 1px; text-underline-offset: .2rem; }
.legal-content { min-width: 0; }
.legal-content section { padding: 0 0 3.5rem; scroll-margin-top: 2rem; }
.legal-content h2 { margin: 0 0 1.5rem; font-size: clamp(2rem, 4vw, 3.2rem); font-weight: 400; letter-spacing: -.04em; line-height: 1; }
.legal-content h3 { margin: 2rem 0 .75rem; font-size: 1.35rem; letter-spacing: -.02em; }
.legal-content p, .legal-content li { max-width: 48rem; }
.legal-content li + li { margin-top: .6rem; }
.data-table-wrap { overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; font-size: .95rem; }
.data-table th, .data-table td { padding: 1rem; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
.data-table th { font-family: var(--mono); font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; }
.callout { padding: 1.5rem; border-left: .3rem solid var(--orange); background: rgba(255,250,241,.68); }
.dark-mode .callout { background: rgba(255,255,255,.06); }
.privacy-choice-page { display: grid; max-width: 46rem; gap: 1rem; }
.choice-card { display: flex; padding: 1.25rem 0; align-items: center; justify-content: space-between; gap: 2rem; border-bottom: 1px solid var(--line); }
.choice-card div { display: grid; }
.choice-card input { width: 1.3rem; height: 1.3rem; accent-color: var(--orange); }
.primary-button { justify-self: start; margin-top: 1rem; padding: .85rem 1.15rem; border: 1px solid var(--ink); border-radius: 999px; color: var(--paper-light); cursor: pointer; background: var(--ink); }
.save-status { min-height: 1.5rem; color: var(--moss); }

/* 404 */
.not-found-body { display: grid; grid-template-rows: auto 1fr auto; }
.not-found-main {
  display: grid;
  width: min(100% - 2.5rem, 1400px);
  min-height: 64vh;
  margin: 0 auto;
  padding: clamp(4rem, 11vh, 8rem) 0;
  place-items: center;
}
.not-found-card { text-align: center; cursor: default; }
.error-code {
  margin: 0;
  color: var(--orange);
  font-family: var(--mono);
  font-size: clamp(5rem, 20vw, 13rem);
  font-weight: 700;
  letter-spacing: -.12em;
  line-height: .78;
}
.error-code span { display: inline-block; transform: translateY(-.08em); }
.not-found-card h1 { margin: 2rem 0 .6rem; font-size: clamp(1.8rem, 4vw, 3.2rem); font-weight: 400; letter-spacing: -.04em; }
.not-found-card p { max-width: 32rem; margin: 0 auto 1.7rem; }
.home-link { display: inline-block; padding: .78rem 1.1rem; border: 1px solid var(--ink); border-radius: 999px; text-decoration: none; }
.home-link:hover, .home-link:focus-visible { color: var(--paper-light); background: var(--ink); }

@media (max-width: 760px) {
  .home-main { min-height: 65vh; padding: 4rem 0; }
  .studio-mark { width: min(72vw, 19rem); }
  .studio-line { font-size: 1rem; }
  .home-footer, footer { grid-template-columns: 1fr; gap: .7rem; }
  footer > p:last-child { text-align: left; }
  .legal-hero, .legal-grid { grid-template-columns: 1fr; }
  .legal-toc { position: static; }
}
@media (max-width: 440px) {
  .site-header { gap: 1.5rem; }
  nav { gap: .8rem; }
  .privacy-actions a { width: 100%; margin: .5rem 0 0; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
