/* ============================================================
   CALEDARI — "the calendar made of light"
   Shared design system. Warm dawn palette, SF Pro, restraint.
   ============================================================ */

:root {
  /* --- Paper & ink (warm, never pure white/black) --- */
  --paper:        #FFFCF8;   /* base warm white */
  --paper-2:      #FFF7EF;   /* slightly warmer panel */
  --ink:          #211C16;   /* warm near-black */
  --ink-2:        #4A4036;   /* secondary text */
  --ink-soft:     #8A7C6B;   /* muted / captions */
  --ink-faint:    #B5A795;   /* hairline labels */
  --line:         rgba(33, 28, 22, 0.09);
  --line-2:       rgba(33, 28, 22, 0.05);

  /* --- Dawn / sunrise gradient stops (horizon = bottom) --- */
  --dawn-sky:     #FFF6EC;
  --dawn-pale:    #FFE9D2;
  --dawn-peach:   #FFCDA3;
  --dawn-coral:   #FFA982;
  --dawn-rose:    #F47E66;
  --dawn-deep:    #E0615E;
  --sun-core:     #FFE6BE;
  --sun-glow:     #FFD49A;

  /* --- The one confident accent --- */
  --sun:          #F0703A;   /* CTA, interactive, focus */
  --sun-ink:      #C9501F;   /* accent text on light */

  /* --- Event tag colors (soft, color-coded calendars) --- */
  --tag-work:     #E5894C;
  --tag-personal: #DD6080;
  --tag-family:   #6E9BD4;
  --tag-health:   #5BA98B;

  /* --- Type --- */
  --sans: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text",
          "Helvetica Neue", system-ui, sans-serif;

  /* --- Radii & shadow --- */
  --r-sm: 12px;
  --r-md: 20px;
  --r-lg: 32px;
  --r-xl: 44px;
  --shadow-soft: 0 2px 8px rgba(60, 40, 20, 0.05),
                 0 18px 50px rgba(120, 70, 30, 0.10);
  --shadow-phone: 0 4px 16px rgba(50, 30, 12, 0.10),
                  0 40px 90px rgba(120, 70, 30, 0.22),
                  0 8px 24px rgba(80, 45, 20, 0.14);

  /* --- Layout --- */
  --maxw: 1180px;
  --gutter: 28px;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  font-family: var(--sans);
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-feature-settings: "ss01", "cv01";
  line-height: 1.5;
}

::selection { background: rgba(240, 112, 58, 0.18); }

a { color: inherit; text-decoration: none; }

img { display: block; max-width: 100%; }

/* ------------------------------------------------------------
   Type scale
   ------------------------------------------------------------ */
.display {
  font-size: clamp(48px, 8.2vw, 116px);
  line-height: 0.96;
  letter-spacing: -0.035em;
  font-weight: 640;
  margin: 0;
  text-wrap: balance;
}
.h1 {
  font-size: clamp(38px, 5.6vw, 78px);
  line-height: 1.0;
  letter-spacing: -0.03em;
  font-weight: 640;
  margin: 0;
  text-wrap: balance;
}
.h2 {
  font-size: clamp(30px, 3.6vw, 50px);
  line-height: 1.04;
  letter-spacing: -0.025em;
  font-weight: 620;
  margin: 0;
  text-wrap: balance;
}
.h3 {
  font-size: clamp(22px, 2.2vw, 30px);
  line-height: 1.1;
  letter-spacing: -0.02em;
  font-weight: 600;
  margin: 0;
}
.lead {
  font-size: clamp(18px, 1.6vw, 23px);
  line-height: 1.5;
  letter-spacing: -0.01em;
  color: var(--ink-2);
  font-weight: 420;
  margin: 0;
  text-wrap: pretty;
}
.eyebrow {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--sun-ink);
  margin: 0;
}
.tag-deep { color: var(--ink-soft); }

/* ------------------------------------------------------------
   Layout helpers
   ------------------------------------------------------------ */
.wrap {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.section { padding-block: clamp(80px, 11vw, 168px); }
.section-tight { padding-block: clamp(56px, 7vw, 104px); }

/* ------------------------------------------------------------
   Buttons
   ------------------------------------------------------------ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-family: var(--sans);
  font-size: 16px;
  font-weight: 560;
  letter-spacing: -0.01em;
  padding: 13px 22px;
  border-radius: 999px;
  border: 1px solid transparent;
  cursor: pointer;
  white-space: nowrap;
  transition: transform .18s cubic-bezier(.2,.7,.3,1), box-shadow .18s ease,
              background .18s ease, color .18s ease;
}
.btn-primary {
  background: var(--ink);
  color: var(--paper);
  box-shadow: 0 1px 2px rgba(0,0,0,.18), 0 10px 26px rgba(40,25,12,.18);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 2px 4px rgba(0,0,0,.2), 0 16px 36px rgba(40,25,12,.24); }
.btn-sun {
  background: var(--sun);
  color: #fff;
  box-shadow: 0 1px 2px rgba(180,70,20,.3), 0 12px 30px rgba(240,112,58,.32);
}
.btn-sun:hover { transform: translateY(-2px); }
.btn-ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--line);
}
.btn-ghost:hover { border-color: rgba(33,28,22,.22); transform: translateY(-1px); }

/* ------------------------------------------------------------
   Top nav
   ------------------------------------------------------------ */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: saturate(1.4) blur(14px);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  background: linear-gradient(to bottom, rgba(255,252,248,.82), rgba(255,252,248,.5));
  border-bottom: 1px solid var(--line-2);
}
.nav-inner {
  max-width: var(--maxw);
  margin-inline: auto;
  padding: 15px var(--gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-weight: 600;
  font-size: 19px;
  letter-spacing: -0.02em;
}
/* The canonical Caledari sun mark — identical to the in-app SunMark + the booking page. */
.wordmark .glyph {
  position: relative;
  width: 20px; height: 20px;
  border-radius: 50%;
  background: radial-gradient(circle at 42% 36%, var(--sun-core), var(--sun-glow) 46%, var(--dawn-coral) 100%);
  box-shadow: 0 0 10px rgba(255,176,110,.7);
}
.wordmark .glyph::after {
  content: ""; position: absolute; inset: -5px; border-radius: 50%;
  background: conic-gradient(from 0deg, transparent 0 14deg, rgba(255,169,130,.9) 14deg 16deg, transparent 16deg 30deg);
  -webkit-mask: radial-gradient(circle, transparent 56%, #000 58%);
  mask: radial-gradient(circle, transparent 56%, #000 58%);
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 30px;
  font-size: 15px;
  color: var(--ink-2);
  font-weight: 450;
}
.nav-links a { transition: color .15s ease; }
.nav-links a:hover { color: var(--ink); }
.nav-cta { display: flex; align-items: center; gap: 14px; }
@media (max-width: 720px) {
  .nav-links { display: none; }
}

/* ------------------------------------------------------------
   Footer
   ------------------------------------------------------------ */
.footer {
  border-top: 1px solid var(--line);
  padding-block: 64px 56px;
  background: var(--paper);
}
.footer-grid {
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--gutter);
  display: flex;
  flex-wrap: wrap;
  gap: 48px 64px;
  justify-content: space-between;
}
.footer h4 {
  font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--ink-faint); font-weight: 600; margin: 0 0 16px;
}
.footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 11px; }
.footer a { color: var(--ink-2); font-size: 15px; transition: color .15s; }
.footer a:hover { color: var(--sun-ink); }
.footer-sign {
  max-width: var(--maxw); margin: 48px auto 0; padding: 28px var(--gutter) 0;
  border-top: 1px solid var(--line-2);
  display: flex; flex-wrap: wrap; gap: 12px 24px; justify-content: space-between;
  color: var(--ink-soft); font-size: 13.5px;
}

/* ------------------------------------------------------------
   Reveal-on-scroll
   ------------------------------------------------------------ */
.reveal { opacity: 1; transform: none; }
.anim .reveal { opacity: 0; transform: translateY(22px); transition: opacity .9s cubic-bezier(.2,.7,.3,1), transform .9s cubic-bezier(.2,.7,.3,1); }
.anim .reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .anim .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}

/* ============================================================
   PHONE MOCKUP — the Caledari app, "made of light"
   ============================================================ */
.phone {
  position: relative;
  width: 320px;
  aspect-ratio: 320 / 690;
  border-radius: 52px;
  background: #15110D;
  padding: 11px;
  box-shadow: var(--shadow-phone);
}
.phone::after { /* side button hint */
  content: ""; position: absolute; right: -2px; top: 168px; width: 3px; height: 64px;
  border-radius: 3px; background: #2a221a;
}
.phone-screen {
  position: relative;
  width: 100%; height: 100%;
  border-radius: 42px;
  overflow: hidden;
  background: var(--dawn-sky);
  display: flex;
  flex-direction: column;
}
.island {
  position: absolute; top: 11px; left: 50%; transform: translateX(-50%);
  width: 92px; height: 27px; border-radius: 20px; background: #0c0a08; z-index: 20;
}
.statusbar {
  position: relative; z-index: 10;
  display: flex; align-items: center; justify-content: space-between;
  padding: 15px 26px 0; font-size: 14px; font-weight: 600; color: var(--ink);
}
.statusbar .icons { display: flex; align-items: center; gap: 6px; }
.statusbar .icons svg { display: block; }

/* dawn light field inside the app */
.lightfield {
  position: absolute; inset: 0; z-index: 0;
  background:
    radial-gradient(120% 80% at 50% 118%, var(--dawn-rose) 0%, var(--dawn-coral) 22%, var(--dawn-peach) 42%, var(--dawn-pale) 64%, var(--dawn-sky) 86%);
}

.app {
  position: relative; z-index: 5;
  flex: 1; display: flex; flex-direction: column;
  padding: 8px 22px 0;
  overflow: hidden;
}
.app > * { flex: 0 0 auto; }
.app-greet { margin-top: 14px; }
.app-greet .hi {
  font-size: 28px; font-weight: 640; letter-spacing: -0.03em; color: var(--ink);
  line-height: 1.05;
}
.app-greet .sub {
  margin-top: 7px; font-size: 15px; color: var(--ink-2); font-weight: 450;
  letter-spacing: -0.01em; line-height: 1.35;
}

.uplabel {
  margin: 20px 0 10px;
  font-size: 11px; font-weight: 700; letter-spacing: 0.18em; color: var(--ink-2);
  display: flex; align-items: center; justify-content: space-between;
}

/* the prominent next-event card */
.nextcard {
  background: rgba(255,255,255,0.72);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,0.85);
  border-radius: 22px;
  padding: 14px 16px;
  box-shadow: 0 1px 2px rgba(80,45,20,.05), 0 8px 20px rgba(120,70,30,.10);
  display: flex; gap: 13px; align-items: flex-start;
}
.nextcard .bar { width: 4px; align-self: stretch; border-radius: 4px; background: var(--tag-work); }
.nextcard .body { flex: 1; }
.nextcard .t { font-size: 18px; font-weight: 600; letter-spacing: -0.02em; }
.nextcard .when { margin-top: 3px; font-size: 13.5px; color: var(--ink-soft); }
.nextcard .meta { margin-top: 10px; font-size: 12.5px; color: var(--sun-ink); font-weight: 550; }

/* the quiet timeline of the rest of the day */
.timeline { margin-top: 20px; display: flex; flex-direction: column; gap: 2px; }
.tl-row { display: grid; grid-template-columns: 46px 1fr; gap: 12px; align-items: center; padding: 7px 0; }
.tl-time { font-size: 12.5px; color: var(--ink-soft); font-variant-numeric: tabular-nums; text-align: right; }
.tl-ev { display: flex; align-items: center; gap: 9px; font-size: 14.5px; color: var(--ink); letter-spacing: -0.01em; }
.tl-dot { width: 7px; height: 7px; border-radius: 50%; flex: none; }
.tl-divider { height: 1px; background: var(--line-2); margin-left: 58px; }
.later {
  margin-top: 8px; padding: 11px 0; font-size: 13px; color: var(--ink-soft);
  display: flex; align-items: center; gap: 6px; font-weight: 500;
}

/* the agent input */
.ask {
  margin-top: auto; margin-inline: -4px;
  margin-bottom: 18px;
  background: rgba(255,255,255,0.78);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,0.9);
  border-radius: 999px;
  padding: 13px 16px;
  display: flex; align-items: center; gap: 10px;
  box-shadow: 0 8px 22px rgba(120,70,30,.12);
  font-size: 14.5px; color: var(--ink-soft);
}
.ask .spark { width: 18px; height: 18px; flex: none; color: var(--sun); }

/* agent confirmation bubble */
.agent-msg {
  align-self: flex-end; max-width: 78%;
  background: var(--ink); color: var(--paper);
  border-radius: 18px 18px 5px 18px;
  padding: 10px 14px; font-size: 14px; letter-spacing: -0.01em;
  margin: 6px 0;
}
.agent-reply {
  align-self: flex-start; max-width: 86%;
  background: rgba(255,255,255,0.82); color: var(--ink);
  border: 1px solid rgba(255,255,255,0.9);
  border-radius: 18px 18px 18px 5px;
  padding: 11px 14px; font-size: 14px; letter-spacing: -0.01em;
  margin: 6px 0; box-shadow: 0 8px 20px rgba(120,70,30,.10);
}
.agent-reply .undo { color: var(--sun-ink); font-weight: 600; }

/* cleared day — the rising sun reward */
.phone-screen.cleared .lightfield {
  background:
    radial-gradient(70% 42% at 50% 96%, var(--sun-core) 0%, var(--sun-glow) 18%, var(--dawn-coral) 40%, var(--dawn-peach) 60%, var(--dawn-pale) 82%, var(--dawn-sky) 100%);
}
.cleared-center {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; gap: 10px; padding-bottom: 40px;
}
.cleared-center .big { font-size: 30px; font-weight: 640; letter-spacing: -0.03em; }
.cleared-center .small { font-size: 15px; color: var(--ink-2); }

/* generic grid-villain illustration */
.grid-cal {
  background: #fff; border: 1px solid var(--line); border-radius: var(--r-md);
  padding: 18px; box-shadow: var(--shadow-soft);
}
.grid-cal-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 14px; }
.grid-cal-head .m { font-size: 17px; font-weight: 600; }
.grid-cal-head .y { font-size: 13px; color: var(--ink-faint); }
.grid-7 { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.grid-7 .dow { font-size: 10px; color: var(--ink-faint); text-align: center; padding-bottom: 4px; font-weight: 600; }
.grid-7 .cell {
  aspect-ratio: 1; border: 1px solid var(--line-2); border-radius: 6px;
  font-size: 11px; color: var(--ink-soft); padding: 4px; position: relative;
}
.grid-7 .cell .dots { position: absolute; bottom: 5px; left: 5px; display: flex; gap: 2px; }
.grid-7 .cell .dots i { width: 4px; height: 4px; border-radius: 50%; display: block; }
