/* Tee Nguyen booking · warm cream + ink, one accent (ember). Inter + JetBrains Mono. */
:root {
  --cream: #f6f1e8; --cream-2: #efe8db; --paper: #fffdf9;
  --ink: #1c1917; --ink-2: #44403c; --ink-3: #78716c; --line: #e4dccf;
  --accent: #c2410c; --accent-2: #9a3412; --accent-soft: #fde8dc;
  --ok: #15803d;
  --r: 18px; --r-sm: 12px;
  --shadow: 0 1px 2px rgba(28,25,23,.05), 0 18px 48px -24px rgba(28,25,23,.25);
  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font); color: var(--ink); background: var(--cream); line-height: 1.5; min-height: 100svh; overflow-x: hidden; }
.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(--ink); color: var(--cream); padding: 8px 12px; border-radius: 8px; z-index: 10; }
.skip:focus { left: 8px; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

/* living background: two slow drifting warm orbs */
.bg { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none;
  background: radial-gradient(1200px 600px at 50% -10%, #fbf7f0 0%, var(--cream) 60%); }
.bg-orb { position: absolute; border-radius: 50%; filter: none; opacity: .55;
  background: radial-gradient(circle at 40% 40%, rgba(194,65,12,.18), rgba(194,65,12,0) 60%); }
.bg-orb-a { width: 60vmax; height: 60vmax; top: -25vmax; right: -20vmax; animation: drift 28s ease-in-out infinite alternate; }
.bg-orb-b { width: 48vmax; height: 48vmax; bottom: -22vmax; left: -18vmax; animation: drift 34s ease-in-out infinite alternate-reverse;
  background: radial-gradient(circle at 60% 60%, rgba(28,25,23,.09), rgba(28,25,23,0) 62%); }
@keyframes drift { from { transform: translate3d(0,0,0) scale(1); } to { transform: translate3d(-6vmax, 4vmax, 0) scale(1.08); } }

.shell { max-width: 980px; margin: 0 auto; padding: clamp(24px, 5vw, 64px) 16px 48px; }

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

.masthead { display: grid; grid-template-columns: auto 1fr; gap: 18px; align-items: start; margin-bottom: 22px; }
.avatar { width: 56px; height: 56px; border-radius: 16px; background: var(--ink); color: var(--cream); display: grid; place-items: center;
  font-weight: 800; font-size: 26px; letter-spacing: -.02em; box-shadow: var(--shadow); }
.eyebrow { font-family: var(--mono); font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3); margin: 0 0 6px; display: flex; align-items: center; gap: 8px; }
.wordmark { color: var(--accent); font-weight: 600; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 0 rgba(21,128,61,.5); animation: pulse 2.4s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(21,128,61,.45);} 70% { box-shadow: 0 0 0 9px rgba(21,128,61,0);} 100% { box-shadow: 0 0 0 0 rgba(21,128,61,0);} }
.title { font-size: clamp(28px, 4.6vw, 44px); font-weight: 800; letter-spacing: -.03em; line-height: 1.05; margin: 0 0 10px; }
.lede { margin: 0; color: var(--ink-2); max-width: 54ch; font-size: 16px; }

.card { position: relative; background: var(--paper); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow); padding: clamp(18px, 3vw, 32px); overflow: hidden; }
.card::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 4px; background: linear-gradient(90deg, var(--accent), #f59e0b 60%, transparent); }

.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(--cream-2); border-radius: 999px; border: 0; margin: 0; }
.seg-btn { border: 0; background: transparent; padding: 8px 16px; border-radius: 999px; font: inherit; font-weight: 600; font-size: 14px; color: var(--ink-2); cursor: pointer; transition: background .2s, color .2s, transform .15s; }
.seg-btn:hover { color: var(--ink); }
.seg-btn[aria-pressed="true"] { background: var(--ink); color: var(--cream); }
.tzpick { display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--ink-3); 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: 9px 32px 9px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--paper) 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='%2378716c' stroke-width='1.6'/%3E%3C/svg%3E") no-repeat right 12px center; color: var(--ink); 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 { font-size: 18px; font-weight: 700; margin: 0; letter-spacing: -.01em; }
.icon-btn { width: 40px; height: 40px; border-radius: 10px; border: 1px solid var(--line); background: var(--paper); font-size: 18px; cursor: pointer; color: var(--ink); transition: background .15s, transform .15s; }
.icon-btn:hover { background: var(--cream-2); }
.icon-btn:active { transform: scale(.96); }
.icon-btn:disabled { opacity: .35; cursor: default; }
.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: .08em; color: var(--ink-3); padding: 6px 0; }
.day { aspect-ratio: 1; border: 0; border-radius: 12px; background: transparent; font: inherit; font-weight: 600; font-size: 15px; color: var(--ink-3); cursor: default; position: relative; transition: background .15s, color .15s, transform .15s; }
.day.avail { color: var(--ink); background: var(--cream-2); cursor: pointer; }
.day.avail::after { content: ""; position: absolute; left: 50%; bottom: 7px; width: 4px; height: 4px; border-radius: 50%; background: var(--accent); transform: translateX(-50%); }
.day.avail:hover { background: var(--accent-soft); transform: translateY(-1px); }
.day.today { box-shadow: inset 0 0 0 1.5px var(--line); }
.day[aria-pressed="true"] { background: var(--ink); color: var(--cream); }
.day[aria-pressed="true"]::after { background: var(--cream); }
.day.pad { visibility: hidden; }
.hint { margin: 14px 0 0; font-size: 13px; color: var(--ink-3); }

.times { display: flex; flex-direction: column; min-height: 220px; }
.times-title { margin: 0; font-size: 18px; font-weight: 700; letter-spacing: -.01em; }
.times-sub { margin: 4px 0 14px; font-size: 13px; color: var(--ink-3); }
.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: 1.5px solid var(--line); background: var(--paper); border-radius: 12px; padding: 12px 10px; font: inherit; font-weight: 600; font-size: 15px; color: var(--ink); cursor: pointer; transition: border-color .15s, background .15s, transform .15s; animation: rise .4s both; }
.slot:hover { border-color: var(--accent); background: var(--accent-soft); transform: translateY(-1px); }
.slot[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--cream); }
.empty { color: var(--ink-3); font-size: 14px; padding: 18px 0; }

.back { border: 0; background: none; font: inherit; font-weight: 600; color: var(--ink-3); cursor: pointer; padding: 0; margin-bottom: 18px; }
.back:hover { color: var(--accent); }
.slot-line { font-size: clamp(20px, 3vw, 26px); font-weight: 800; letter-spacing: -.02em; margin: 0 0 4px; }
.slot-sub { margin: 0 0 22px; color: var(--ink-3); font-size: 14px; }
.fields { display: grid; gap: 16px; max-width: 520px; }
.field label { display: block; font-weight: 600; font-size: 14px; margin-bottom: 6px; }
.req { color: var(--accent); } .opt { color: var(--ink-3); font-weight: 500; font-size: 12px; margin-left: 4px; }
input, textarea { width: 100%; font: inherit; font-size: 16px; padding: 12px 14px; border: 1.5px solid var(--line); border-radius: var(--r-sm); background: var(--paper); color: var(--ink); transition: border-color .15s, box-shadow .15s; }
input:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px rgba(194,65,12,.12); }
input[aria-invalid="true"], textarea[aria-invalid="true"] { border-color: #b91c1c; }
textarea { resize: vertical; }
.err { margin: 6px 0 0; font-size: 13px; color: #b91c1c; min-height: 0; }
.err:empty { display: none; }
.form-err { margin-top: 14px; }
.cta { display: inline-flex; align-items: center; justify-content: center; gap: 10px; margin-top: 22px; padding: 14px 24px; min-width: 200px; border: 0; border-radius: 999px;
  background: var(--accent); color: #fff; font: inherit; font-weight: 700; font-size: 16px; cursor: pointer; text-decoration: none; position: relative; overflow: hidden;
  transition: transform .15s, background .2s, box-shadow .2s; box-shadow: 0 10px 24px -12px rgba(194,65,12,.7); }
.cta::after { content: ""; position: absolute; inset: 0; background: linear-gradient(110deg, transparent 30%, rgba(255,255,255,.28) 50%, transparent 70%); transform: translateX(-120%); transition: transform .6s; }
.cta:hover { background: var(--accent-2); transform: translateY(-1px); }
.cta:hover::after { transform: translateX(120%); }
.cta[disabled] { opacity: .7; cursor: progress; }
.cta .spinner { display: none; }
.cta[disabled] .spinner { display: inline-block; }
.spinner { width: 16px; height: 16px; border: 2px solid rgba(255,255,255,.4); border-top-color: #fff; border-radius: 50%; animation: spin .8s linear infinite; }
.spinner.dark { border-color: rgba(28,25,23,.2); border-top-color: var(--ink); }
@keyframes spin { to { transform: rotate(360deg); } }
.fine { font-size: 13px; color: var(--ink-3); margin: 14px 0 0; }

.done { text-align: left; }
.check { width: 52px; height: 52px; border-radius: 50%; background: var(--ok); color: #fff; display: grid; place-items: center; margin-bottom: 16px; animation: pop .5s cubic-bezier(.2,1.4,.4,1) both; }
@keyframes pop { from { transform: scale(.4); opacity: 0; } to { transform: none; opacity: 1; } }
.done-title { margin-bottom: 18px; }
.meta { display: grid; gap: 12px; margin: 0 0 8px; padding: 18px; background: var(--cream-2); 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; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 4px; }
.meta dd { margin: 0; font-weight: 600; font-size: 15px; word-break: break-word; }
.meta a { color: var(--accent); }
.actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.ghost { font-weight: 600; color: var(--ink-2); text-decoration: none; margin-top: 22px; padding: 14px 6px; }
.ghost:hover { color: var(--accent); }

.loading { position: absolute; inset: 0; background: rgba(255,253,249,.78); backdrop-filter: blur(2px); display: flex; align-items: center; justify-content: center; gap: 12px; font-weight: 600; color: var(--ink-2); z-index: 2; }
.loading[hidden] { display: none; }

.foot { display: flex; justify-content: space-between; gap: 12px; margin-top: 22px; font-size: 13px; color: var(--ink-3); }
.mono { font-family: var(--mono); letter-spacing: .14em; font-weight: 500; }

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