/* Clay St Studio — shared design tokens + base styles (used by the website and the portal).
   Palette and type follow Chloe's brand board: sand, taupe, charcoal, terracotta, sage, slate blue, cream. */

:root {
  /* Brand palette */
  --sand: #eadccf;            /* page background */
  --taupe: #c9b7a5;           /* secondary background, rules */
  --charcoal: #2b2b2b;        /* primary text */
  --terracotta: #b15e43;      /* accent */
  --sage: #a7b39c;            /* accent, soft buttons + flags */
  --slate: #8ba4b8;           /* accent */
  --cream: #f6efe6;           /* section backgrounds */

  /* Roles */
  --bg: var(--sand);
  --bg-2: var(--cream);
  --paper: #fbf7f1;           /* cards */
  --ink: var(--charcoal);
  --ink-2: #4b4541;
  --mute: #75695f;
  --line: #d6c7b7;
  --line-2: #bfae9c;
  --accent: var(--terracotta);
  --accent-hover: #9a4e36;
  --accent-ink: #ffffff;
  --accent-soft: #f1ddd2;
  --sage-deep: #6f7d62;
  --espresso: #2a221e;        /* dark sections, footer */
  --espresso-2: #3a302a;
  --on-dark: #f6efe6;
  --on-dark-mute: #bcab9b;
  --ok: #56703f;
  --warn: #9a2b1d;

  /* Team colors (keep in sync with config.js) */
  --chloe: #5f7f99;
  --nick: #b15e43;
  --kamy: #7d8f6c;

  /* Type: an editorial serif for headlines, Satoshi for subheads + labels, Inter for body. */
  --font-display: "Fraunces", "Iowan Old Style", Georgia, "Times New Roman", serif;
  --font-sub: "Satoshi", "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  --display-axes: normal;     /* Fraunces is loaded at its display optical size, so no tuning needed */

  --fs-hero: clamp(3.4rem, 8.4vw, 7.8rem);
  --fs-h1: clamp(2.7rem, 5.8vw, 5.2rem);
  --fs-h2: clamp(2.05rem, 3.9vw, 3.5rem);
  --fs-h3: 1.5rem;
  --fs-body: 1.0625rem;
  --fs-small: 0.9rem;
  --fs-label: 0.7rem;

  /* Shape + depth */
  --r-sm: 4px;
  --r: 8px;
  --r-lg: 14px;
  --shadow-sm: 0 1px 2px rgba(43, 36, 30, .06);
  --shadow: 0 1px 2px rgba(43, 36, 30, .05), 0 12px 32px rgba(43, 36, 30, .10);
  --shadow-lg: 0 2px 6px rgba(43, 36, 30, .06), 0 28px 64px rgba(43, 36, 30, .18);

  /* Thin arrow used by buttons and text links (drawn as a mask, so it takes the text color) */
  --arrow: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 12'%3E%3Cpath d='M0 6h18.2M13.4 1.2 18.2 6l-4.8 4.8' fill='none' stroke='%23000' stroke-width='1.5'/%3E%3C/svg%3E");

  /* Paper grain, layered under section colors */
  --grain: 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='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .17 0 0 0 0 .13 0 0 0 0 .1 0 0 0 .07 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");

  /* Layout */
  --wrap: 1240px;
  --gutter: clamp(18px, 4.4vw, 48px);
  --header-h: 76px;
  --ease: cubic-bezier(.2, .7, .2, 1);
  --ease-out: cubic-bezier(.16, 1, .3, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 12px); }
body {
  margin: 0;
  background: var(--grain), var(--bg);
  color: var(--ink);
  font: 400 var(--fs-body)/1.65 var(--font-body);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, video, iframe { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
::selection { background: var(--accent); color: var(--accent-ink); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 380;
  line-height: 1.04;
  letter-spacing: -0.022em;
  margin: 0 0 .5em;
  font-variation-settings: var(--display-axes);
  text-wrap: balance;
}
h1 { font-size: var(--fs-h1); font-weight: 340; }
h2 { font-size: var(--fs-h2); }
h3 { font-size: var(--fs-h3); line-height: 1.15; letter-spacing: -0.012em; }
p { margin: 0 0 1em; text-wrap: pretty; }
/* Accent words in headlines: the serif's italic, in terracotta. */
h1 em, h2 em, h3 em { font-style: italic; font-weight: inherit; color: var(--accent); }

/* Small tracked caps labels (the brand board's "PRIMARY LOGO ———" style) */
.label {
  font: 600 var(--fs-label)/1.3 var(--font-sub);
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--accent);
}
.label-rule { display: flex; align-items: center; gap: 16px; }
.label-rule::after { content: ""; flex: 1; height: 1px; background: currentColor; opacity: .3; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.muted { color: var(--mute); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

/* Buttons: pill, tracked caps, an arrow that glides on hover. */
.btn {
  --b-bg: transparent; --b-fg: var(--ink); --b-bd: var(--ink);
  position: relative; isolation: isolate; overflow: hidden;
  display: inline-flex; align-items: center; justify-content: center; gap: .75em;
  min-height: 50px; padding: 0 1.75em;
  border-radius: 999px; border: 1px solid var(--b-bd);
  background: var(--b-bg); color: var(--b-fg);
  font: 600 .76rem/1 var(--font-sub); letter-spacing: .16em; text-transform: uppercase;
  text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: color .35s var(--ease-out), border-color .35s var(--ease-out), background-color .35s var(--ease-out), transform .35s var(--ease-out), box-shadow .35s var(--ease-out);
}
/* Fill that rises from below on hover */
.btn::before {
  content: ""; position: absolute; inset: 0; z-index: -1; border-radius: inherit;
  background: var(--b-fill, transparent); transform: translateY(101%); transition: transform .45s var(--ease-out);
}
.btn:focus-visible::before { transform: none; }
.btn:focus-visible { color: var(--b-fg-hover, var(--b-fg)); border-color: var(--b-bd-hover, var(--b-bd)); }
.btn:active { transform: translateY(1px); }
/* Arrow (primary/ghost/light buttons): on hover it flies out to the right while a copy glides in from the left.
   Two mask layers of the same arrow; only the one inside the box shows. */
.btn-primary::after, .btn-ghost::after, .btn-light::after, .btn-outline-light::after, .link-arrow::after {
  content: ""; width: 1.25em; height: .8em; flex: none; background: currentColor;
  -webkit-mask: var(--arrow) 0 0 / 1.25em .8em no-repeat, var(--arrow) -1.6em 0 / 1.25em .8em no-repeat;
  mask: var(--arrow) 0 0 / 1.25em .8em no-repeat, var(--arrow) -1.6em 0 / 1.25em .8em no-repeat;
  transition: -webkit-mask-position .5s var(--ease-out), mask-position .5s var(--ease-out);
}
.btn:focus-visible::after, .link-arrow:focus-visible::after { -webkit-mask-position: 1.6em 0, 0 0; mask-position: 1.6em 0, 0 0; }
.btn-sm::after { display: none; }
@media (hover: hover) {
  .btn:hover::before { transform: none; }
  .btn:hover { color: var(--b-fg-hover, var(--b-fg)); border-color: var(--b-bd-hover, var(--b-bd)); }
  .btn:hover::after, .link-arrow:hover::after { -webkit-mask-position: 1.6em 0, 0 0; mask-position: 1.6em 0, 0 0; }
}

.btn-primary { --b-bg: var(--accent); --b-fg: var(--accent-ink); --b-bd: var(--accent); --b-fill: var(--accent-hover); --b-bd-hover: var(--accent-hover); }
.btn-ghost { --b-fill: var(--ink); --b-fg-hover: var(--cream); }
.btn-light { --b-bg: var(--cream); --b-fg: var(--charcoal); --b-bd: var(--cream); --b-fill: #fff; --b-bd-hover: #fff; }
.btn-outline-light { --b-fg: var(--on-dark); --b-bd: rgba(246, 239, 230, .5); --b-fill: var(--cream); --b-fg-hover: var(--charcoal); --b-bd-hover: var(--cream); }
.btn-sage { --b-bg: var(--sage); --b-fg: var(--charcoal); --b-bd: var(--sage); --b-fill: #b9c4ae; --b-bd-hover: #b9c4ae; }
.btn-sm { min-height: 40px; padding: 0 1.3em; font-size: .7rem; }
/* "Recording light": a small blinking dot by the label that floods the button on hover (header Book button) */
.btn-rec { padding-left: 2.25em; }
.btn-rec::before { inset: auto; left: 1.05em; top: 50%; width: 7px; height: 7px; margin-top: -3.5px; border-radius: 50%; background: var(--cream); transform: none; transition: transform .55s var(--ease-out); animation: recBlink 2.4s ease-in-out infinite; }
.btn-rec:focus-visible::before { transform: scale(48); animation: none; }
.btn-rec:focus-visible { color: var(--charcoal); }
@media (hover: hover) {
  .btn-rec:hover::before { transform: scale(48); animation: none; }
  .btn-rec:hover { color: var(--charcoal); }
}
@keyframes recBlink { 50% { opacity: .35; } }
.btn[disabled], .btn.is-disabled { opacity: .5; pointer-events: none; }

/* Text link with a drawn underline + arrow */
.link-arrow {
  font: 600 .74rem/1.2 var(--font-sub); letter-spacing: .16em; text-transform: uppercase;
  color: var(--accent); text-decoration: none; display: inline-flex; gap: .7em; align-items: center;
  padding-bottom: 5px;
  background: linear-gradient(currentColor, currentColor) left bottom / 100% 1px no-repeat;
  transition: background-size .45s var(--ease-out);
}
.link-arrow:hover, .link-arrow:focus-visible { background-size: 0% 1px; background-position: right bottom; }

/* Brand: Chloe's script wordmark (assets/img/logo.svg) with STUDIO set in tracked caps beneath */
.brand { position: relative; display: inline-block; width: var(--logo-w, 150px); color: inherit; text-decoration: none; line-height: 0; }
.brand-script { display: block; width: 100%; height: auto; aspect-ratio: 1123 / 363; fill: currentColor; overflow: visible; }
.brand-sub {
  position: absolute; left: 52.5%; top: 80%;
  font: 500 max(7.5px, calc(var(--logo-w, 150px) * .052))/1 var(--font-sub); letter-spacing: .62em; text-transform: uppercase; white-space: nowrap;
}

/* Team color dots */
.dot { display: inline-block; width: .6em; height: .6em; border-radius: 50%; background: var(--c, var(--accent)); vertical-align: .05em; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
