/* Hussl Calendar · HusslAI Brand Book v5.6 (https://husslai-brand-book.vercel.app).
   Paper and ink, touches of brass. Geist (600 headlines, 400/500 body), Instrument Serif Italic payoff, Geist Mono labels.
   Daylight world (forms): paper base, depth 0-2, no glow. Dark scheme flips to ink with paper text. */
:root {
  /* brand tokens, verbatim from the book */
  --paper: #FAF8F4; --bone: #F1EEE8; --paper-light: #FFFDF9;
  --ink: #0C0C0D; --ink2: #3A3834; --mute-b: #6E6A63; --soft: #A39D92;
  --brass: #C9A24A; --deep: #A6802A; --brick: #A63D2A; --moss: #3F6B4A;
  --hl: rgba(12,12,13,.14); --hd: rgba(250,248,244,.16);
  /* semantic (light) */
  --page: var(--paper); --panel: var(--bone); --card: var(--paper-light); --field: var(--paper-light);
  --text: var(--ink); --text2: var(--ink2); --mute: var(--mute-b); --line: var(--hl);
  --solid: var(--ink); --on-solid: var(--paper);
  --err: var(--brick); --err-line: var(--brick);
  --veil: rgba(255,253,249,.8);
  --depth-1: inset 0 0 0 1px rgba(12,12,13,.09), inset 0 1px 0 #fff, 0 8px 18px -12px rgba(12,12,13,.22);
  --depth-2: 0 2px 4px rgba(12,12,13,.12), 0 34px 60px -18px rgba(12,12,13,.46);
  --r: 20px; --r-sm: 14px; --r-xs: 8px;
  --font: "Geist", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --serif: "Instrument Serif", "Iowan Old Style", Georgia, "Times New Roman", serif;
  --mono: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --chev: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%236E6A63' stroke-width='1.6'/%3E%3C/svg%3E");
  --grain: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='220' height='220'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0  0 0 0 0 0  0 0 0 0 0  0 0 0 .55 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --page: var(--ink); --panel: var(--ink2); --card: var(--ink); --field: var(--ink2);
    --text: var(--paper); --text2: rgba(250,248,244,.86); --mute: var(--soft); --line: var(--hd);
    --solid: var(--paper); --on-solid: var(--ink);
    --err: var(--paper); --err-line: var(--brick);
    --veil: rgba(12,12,13,.8);
    --depth-1: inset 0 0 0 1px rgba(250,248,244,.16);
    --depth-2: 0 2px 4px rgba(0,0,0,.4);
    --chev: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%23A39D92' stroke-width='1.6'/%3E%3C/svg%3E");
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; background: var(--page); }
body { margin: 0; font-family: var(--font); font-weight: 400; font-size: 16px; line-height: 24px; color: var(--text); background: var(--page); min-height: 100svh; overflow-x: hidden; position: relative; -webkit-font-smoothing: antialiased; }
/* paper grain: monochrome noise ~3% on every surface */
body::after { content: ""; position: absolute; inset: 0; background-image: var(--grain); opacity: .035; mix-blend-mode: multiply; pointer-events: none; z-index: 50; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--solid); color: var(--on-solid); padding: 8px 14px; border-radius: 99px; z-index: 60; }
.skip:focus { left: 8px; }
:focus-visible { outline: 2px solid var(--text); outline-offset: 3px; }
a { color: var(--text); text-decoration: underline; text-decoration-color: var(--brass); text-decoration-thickness: 2px; text-underline-offset: 3px; }

/* depth 0: flat ground. The old drifting orbs are gone (brand: light, not glow; no warm light on daylight pages). */
.bg { display: none; }

.shell { max-width: 980px; margin: 0 auto; padding: clamp(20px, 4vw, 44px) 16px 48px; }

/* mount reveals: base visible, animate once on load */
.rise { animation: rise .6s cubic-bezier(.2,.7,.2,1) both; }
.rise.d1 { animation-delay: .06s; } .rise.d2 { animation-delay: .14s; }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* wordmark: "Hussl" 600 + "AI" 400 + one brass dot. Never recolored, stretched, outlined or shadowed. Min 24px tall (= 34px type). */
.brandbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 10px 0 clamp(28px, 5vw, 48px); }
.wm { font-family: var(--font); font-weight: 600; font-size: 34px; letter-spacing: -.045em; line-height: 1; display: inline-flex; align-items: baseline; white-space: nowrap; color: var(--text); text-decoration: none; }
.wm .ai { font-weight: 400; }
.wdot { display: inline-block; width: .24em; height: .24em; margin-left: .07em; border-radius: 50%; background: var(--brass); }
.lab, .eyebrow, .mono { font-family: var(--mono); font-weight: 400; font-size: 12px; line-height: 16px; letter-spacing: .16em; text-transform: uppercase; color: var(--mute); }

.masthead { margin-bottom: 24px; }
.eyebrow { margin: 0 0 10px; }
.wordmark { color: inherit; }
.title { font-size: clamp(32px, 5.2vw, 58px); font-weight: 600; letter-spacing: -.045em; line-height: 1.1; margin: 0 0 12px; }
.serif { font-family: var(--serif); font-style: italic; font-weight: 400; letter-spacing: 0; font-size: 1.06em; }
.pdot { color: var(--brass); }
.lede { margin: 0; color: var(--text2); max-width: 54ch; font-size: clamp(16px, 2vw, 20px); line-height: 1.45; }

/* depth 1: sheet */
.card { position: relative; background: var(--card); border-radius: var(--r); box-shadow: var(--depth-1); padding: clamp(18px, 3vw, 32px); overflow: hidden; }

.controls { display: flex; flex-wrap: wrap; gap: 12px 18px; align-items: center; justify-content: space-between; margin-bottom: 22px; }
.seg { display: inline-flex; gap: 4px; padding: 4px; background: var(--panel); border-radius: 99px; border: 0; margin: 0; }
.seg-btn { border: 0; background: transparent; padding: 9px 16px; border-radius: 99px; font: inherit; font-weight: 500; font-size: 14px; line-height: 20px; color: var(--text2); cursor: pointer; transition: background .2s, color .2s; }
.seg-btn:hover { color: var(--text); }
.seg-btn[aria-pressed="true"] { background: var(--solid); color: var(--on-solid); }
.tzpick { display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--mute); min-width: 0; width: 100%; }
@media (min-width: 760px) { .tzpick { width: auto; } }
.tz-label { white-space: nowrap; }
select { font: inherit; font-size: 16px; max-width: 100%; min-width: 0; flex: 1; padding: 10px 34px 10px 14px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--field) var(--chev) no-repeat right 14px center; color: var(--text); appearance: none; -webkit-appearance: none; max-width: 260px; }

.grid { display: grid; grid-template-columns: 1fr; gap: 24px; }
@media (min-width: 760px) { .grid { grid-template-columns: 1.25fr 1fr; gap: 32px; } }

.cal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.cal-title, .times-title { font-size: 20px; line-height: 28px; font-weight: 600; margin: 0; letter-spacing: -.03em; }
.icon-btn { width: 40px; height: 40px; border-radius: 99px; border: 1px solid var(--line); background: var(--field); font-size: 18px; cursor: pointer; color: var(--text); transition: border-color .15s, transform .15s; }
.icon-btn:hover { border-color: var(--text); }
.icon-btn:active { transform: scale(.96); }
.icon-btn:disabled { opacity: .35; cursor: default; border-color: var(--line); }
.dow, .days { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.dow span { text-align: center; font-family: var(--mono); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--mute); padding: 6px 0; }
.day { aspect-ratio: 1; border: 0; border-radius: var(--r-sm); background: transparent; font: inherit; font-weight: 400; font-size: 15px; color: var(--mute); cursor: default; position: relative; transition: box-shadow .15s, background .15s, color .15s; }
.day.avail { color: var(--text); font-weight: 500; background: var(--panel); cursor: pointer; }
.day.avail::after { content: ""; position: absolute; left: 50%; bottom: 7px; width: 4px; height: 4px; border-radius: 50%; background: var(--brass); transform: translateX(-50%); }
.day.avail:hover { box-shadow: inset 0 0 0 1.5px var(--text); }
.day.today { box-shadow: inset 0 0 0 1px var(--line); }
.day[aria-pressed="true"] { background: var(--solid); color: var(--on-solid); }
.day.pad { visibility: hidden; }
.hint { margin: 14px 0 0; font-size: 13px; line-height: 20px; color: var(--mute); }

.times { display: flex; flex-direction: column; min-height: 220px; }
.times-sub { margin: 4px 0 14px; font-size: 13px; line-height: 20px; color: var(--mute); }
.times-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 8px; align-content: start; max-height: 452px; overflow-y: auto; padding: 2px; }
@media (min-width: 760px) { .times-list { grid-template-columns: 1fr 1fr; } }
.slot { border: 1px solid var(--line); background: var(--field); border-radius: 99px; padding: 12px 10px; font: inherit; font-weight: 500; font-size: 15px; line-height: 20px; color: var(--text); cursor: pointer; font-variant-numeric: tabular-nums; transition: border-color .15s, background .15s; animation: rise .4s both; }
.slot:hover { border-color: var(--text); }
.slot[aria-pressed="true"] { background: var(--solid); border-color: var(--solid); color: var(--on-solid); }
.empty { color: var(--mute); font-size: 14px; padding: 18px 0; }

.back { border: 0; background: none; font: inherit; font-weight: 500; font-size: 15px; color: var(--mute); cursor: pointer; padding: 0; margin-bottom: 18px; }
.back:hover { color: var(--text); text-decoration: underline; text-decoration-color: var(--brass); text-decoration-thickness: 2px; text-underline-offset: 4px; }
.slot-line { font-size: clamp(22px, 3.2vw, 34px); line-height: 1.18; font-weight: 600; letter-spacing: -.03em; margin: 0 0 6px; }
.slot-sub { margin: 0 0 22px; color: var(--mute); font-size: 14px; }
.fields { display: grid; gap: 16px; max-width: 520px; }
.field label { display: block; font-weight: 500; font-size: 14px; line-height: 20px; margin-bottom: 6px; }
.req { color: var(--text); } .opt { color: var(--mute); font-weight: 400; font-size: 12px; margin-left: 4px; font-style: normal; }
input, textarea { width: 100%; font: inherit; font-size: 16px; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--field); color: var(--text); transition: border-color .15s, box-shadow .15s; }
input::placeholder, textarea::placeholder { color: var(--mute); opacity: 1; }
@media (prefers-color-scheme: dark) { input::placeholder, textarea::placeholder { color: var(--text2); } }
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--text); box-shadow: 0 0 0 1px var(--text); }
input[aria-invalid="true"], textarea[aria-invalid="true"] { border-color: var(--err-line); box-shadow: 0 0 0 1px var(--err-line); }
textarea { resize: vertical; }
/* functional brick: always paired with a mark and words, never color alone */
.err { margin: 6px 0 0; font-size: 13px; line-height: 20px; color: var(--err); min-height: 0; }
.err::before { content: "\2715\00a0"; }
.err:empty { display: none; }
.form-err { margin-top: 14px; }
/* pill button, ink on paper, one primary action named for the task; brass underline on hover; depth 2 (things you touch) */
.cta { display: inline-flex; align-items: center; justify-content: center; gap: 10px; margin-top: 22px; padding: 15px 26px; min-width: 200px; border: 0; border-radius: 99px;
  background: var(--solid); color: var(--on-solid); font: inherit; font-weight: 500; font-size: 16px; line-height: 20px; cursor: pointer; text-decoration: none; box-shadow: var(--depth-2); transition: transform .15s; }
.cta:hover .cta-text, a.cta:hover { text-decoration: underline; text-decoration-color: var(--brass); text-decoration-thickness: 2px; text-underline-offset: 5px; }
.cta:active { transform: translateY(1px); }
.cta[disabled] { opacity: .7; cursor: progress; }
.cta .spinner { display: none; }
.cta[disabled] .spinner { display: inline-block; }
.spinner { width: 16px; height: 16px; border: 2px solid var(--line); border-top-color: var(--on-solid); border-radius: 50%; animation: spin .8s linear infinite; }
.cta .spinner { border-color: rgba(128,128,128,.45); border-top-color: var(--on-solid); }
.spinner.dark { border-color: var(--line); border-top-color: var(--text); }
@keyframes spin { to { transform: rotate(360deg); } }
.fine { font-size: 13px; line-height: 20px; color: var(--mute); margin: 14px 0 0; }

.done { text-align: left; }
/* functional moss + check mark + the words "You're booked" */
.check { width: 52px; height: 52px; border-radius: 50%; background: var(--moss); color: #FAF8F4; display: grid; place-items: center; margin-bottom: 16px; animation: pop .45s cubic-bezier(.2,1.2,.4,1) both; }
@keyframes pop { from { transform: scale(.5); opacity: 0; } to { transform: none; opacity: 1; } }
.done-title { margin-bottom: 18px; font-size: clamp(28px, 4.4vw, 46px); }
.meta { display: grid; gap: 12px; margin: 0 0 8px; padding: 18px; background: var(--panel); border-radius: var(--r-sm); }
@media (min-width: 640px) { .meta { grid-template-columns: 1fr 1fr 1fr; } }
.meta dt { font-family: var(--mono); font-size: 11px; line-height: 16px; letter-spacing: .16em; text-transform: uppercase; color: var(--text2); margin-bottom: 4px; }
.meta dd { margin: 0; font-weight: 500; font-size: 15px; word-break: break-word; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.ghost { font-weight: 500; color: var(--text2); text-decoration: none; margin-top: 22px; padding: 14px 6px; }
.ghost:hover { color: var(--text); text-decoration: underline; text-decoration-color: var(--brass); text-decoration-thickness: 2px; text-underline-offset: 4px; }

.loading { position: absolute; inset: 0; background: var(--veil); display: flex; align-items: center; justify-content: center; gap: 12px; font-weight: 500; color: var(--text); z-index: 2; }
.loading[hidden] { display: none; }

.foot { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-top: 24px; font-size: 13px; color: var(--mute); }

.step[hidden] { display: none; }
.step { animation: rise .4s cubic-bezier(.2,.7,.2,1) both; }

@media (prefers-reduced-motion: reduce) { .rise, .step, .slot, .check { animation: none; } * { transition: none !important; } }
@media (max-width: 759px) { .tzpick select { max-width: none; } }
