/* ---------- palette: Roman travertine by day, espresso and gold by night ---------- */
:root {
  --bg: #f6f1ea;
  --card: #fffcf7;
  --ink: #2a2019;
  --muted: #8a7a6c;
  --line: #e7ddd0;
  --accent: #a24e2c;        /* terracotta */
  --accent-soft: #f4e4da;
  --gold: #a4844f;
  --olive: #5b6336;
  --olive-soft: #ebebdc;
  --sky: #3e5b6b;
  --sky-soft: #e3eaec;
  --warn: #8f5c17;
  --warn-soft: #f6ead4;
  --stone: #efe7dc;

  /* skyline */
  --sky-1: #f1d7b8; --sky-2: #ecbf98; --sky-3: #f6e5d0;
  --sun: #f7d3a1; --sun-glow: #fbe0b8;
  --h-far: #e2c3a5; --h-mid: #c7987a; --h-near: #8c5b44; --h-ground: #4d3529;
  --cloud: #fff6ea; --bird: #6d4b3b; --star: transparent;

  --serif: "Cormorant Garamond", "Iowan Old Style", Georgia, serif;
  --sans: Jost, "Avenir Next", "Segoe UI", system-ui, sans-serif;
  --ease: cubic-bezier(.22, .61, .36, 1);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #17130f; --card: #201a15; --ink: #f1e8dc; --muted: #a8988a; --line: #362c24;
    --accent: #e08a62; --accent-soft: #3a251b; --gold: #cfae74; --olive: #b9c286; --olive-soft: #2a2c1d;
    --sky: #9cc0d4; --sky-soft: #1d2a31; --warn: #e9b866; --warn-soft: #34281a; --stone: #2a221c;
    --sky-1: #15142a; --sky-2: #2f2440; --sky-3: #5a3a3d;
    --sun: #f2e6c9; --sun-glow: #b8a6d6;
    --h-far: #3b2c38; --h-mid: #2b1f28; --h-near: #1f161c; --h-ground: #130e11;
    --cloud: #4a3a4f; --bird: transparent; --star: #f4ead2;
  }
}
:root[data-theme="dark"] {
  --bg: #17130f; --card: #201a15; --ink: #f1e8dc; --muted: #a8988a; --line: #362c24;
  --accent: #e08a62; --accent-soft: #3a251b; --gold: #cfae74; --olive: #b9c286; --olive-soft: #2a2c1d;
  --sky: #9cc0d4; --sky-soft: #1d2a31; --warn: #e9b866; --warn-soft: #34281a; --stone: #2a221c;
  --sky-1: #15142a; --sky-2: #2f2440; --sky-3: #5a3a3d;
  --sun: #f2e6c9; --sun-glow: #b8a6d6;
  --h-far: #3b2c38; --h-mid: #2b1f28; --h-near: #1f161c; --h-ground: #130e11;
  --cloud: #4a3a4f; --bird: transparent; --star: #f4ead2;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 300 16px/1.6 var(--sans); letter-spacing: .01em;
  -webkit-font-smoothing: antialiased;
}
.wrap { max-width: 780px; margin: 0 auto; padding: 0 16px; }
h1, h2, h3 { font-family: var(--serif); font-weight: 500; line-height: 1.1; margin: 0; letter-spacing: 0; }
b, strong { font-weight: 500; }
.muted { color: var(--muted); }
a { color: var(--accent); text-underline-offset: 3px; text-decoration-thickness: 1px; }

/* ---------- hero ---------- */
.hero { position: relative; height: clamp(320px, 56vh, 540px); overflow: hidden; background: var(--sky-1); }
.hero-art { position: absolute; inset: 0; }
.hero-art svg { width: 100%; height: 100%; display: block; }
.hero-art .far path { fill: var(--h-far); }
.hero-art .mid path, .hero-art .mid rect { fill: var(--h-mid); }
.hero-art .near path, .hero-art .near rect { fill: var(--h-near); }
.hero-art .near .hole { fill: var(--h-mid); }
.hero-art .ground path { fill: var(--h-ground); }
.hero-art .trunk { fill: none !important; stroke-width: 3; }
.hero-art .mid .trunk { stroke: var(--h-mid); }
.hero-art .near .trunk { stroke: var(--h-near); }
.hero-art .disc { fill: var(--sun); }
.hero-art .cloud ellipse { fill: var(--cloud); opacity: .55; }
.hero-art .birds path { fill: none; stroke: var(--bird); stroke-width: 1.6; stroke-linecap: round; }
.hero-art .stars circle { fill: var(--star); }
.hero-art .layer { will-change: transform; }

.hero-text { position: relative; z-index: 1; padding-top: clamp(48px, 10vh, 92px); opacity: var(--fade, 1); }
.eyebrow { margin: 0 0 10px; font-size: 12px; font-weight: 400; letter-spacing: .32em; text-transform: uppercase; color: var(--ink); opacity: .75; }
.hero h1 { font-size: clamp(64px, 15vw, 128px); font-weight: 400; font-style: italic; line-height: .9; color: var(--ink); }
.hero-dates { margin: 14px 0 0; font-family: var(--serif); font-size: clamp(18px, 3.4vw, 22px); font-style: italic; color: var(--ink); opacity: .8; }

.userbar { position: absolute; top: 14px; left: 0; right: 0; z-index: 2; display: flex; gap: 16px; justify-content: flex-end; align-items: center;
  font-size: 11px; letter-spacing: .16em; text-transform: uppercase; }
.userbar a, .userbar button, .userbar span { color: var(--ink); opacity: .8; }
.userbar a { text-decoration: none; }
.userbar button { font: inherit; letter-spacing: inherit; text-transform: inherit; background: none; border: 0; cursor: pointer; padding: 0; }
.userbar a:hover, .userbar button:hover { opacity: 1; }

/* ---------- clocks ---------- */
.clockbar { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 8px; margin-top: -42px; position: relative; z-index: 3; }
.clock { background: var(--card); border: 1px solid var(--line); padding: 14px 16px 12px; text-align: center; box-shadow: 0 18px 40px -26px rgba(60, 35, 20, .45); }
.clock .lbl { font-size: 11px; letter-spacing: .3em; text-transform: uppercase; color: var(--gold); }
.clock .t { font-family: var(--serif); font-size: clamp(30px, 7vw, 40px); font-weight: 500; line-height: 1.1; font-variant-numeric: lining-nums tabular-nums; }
.clock .t .ap { font-size: .5em; letter-spacing: .08em; margin-left: 4px; }
.clock .d { font-size: 12px; color: var(--muted); letter-spacing: .06em; }
.clock-gap { font-family: var(--serif); font-style: italic; color: var(--muted); font-size: 15px; text-align: center; line-height: 1.2; }
.clock-gap b { display: block; font-family: var(--sans); font-style: normal; font-weight: 400; font-size: 11px; letter-spacing: .24em; text-transform: uppercase; color: var(--gold); }

/* ---------- tabs ---------- */
.tabs { position: relative; display: flex; justify-content: center; gap: 36px; margin-top: 30px; margin-bottom: 26px; border-bottom: 1px solid var(--line); }
.tabs a { position: relative; padding: 12px 2px; text-decoration: none; color: var(--muted); font-size: 12px; letter-spacing: .28em; text-transform: uppercase; transition: color .3s var(--ease); }
.tabs a.on { color: var(--ink); }
.tab-ink { position: absolute; bottom: -1px; height: 2px; background: var(--accent); transition: left .45s var(--ease), width .45s var(--ease); }

/* ---------- cards ---------- */
.card { background: var(--card); border: 1px solid var(--line); padding: 24px 22px; margin-bottom: 18px; }
.card h2 { font-size: 28px; margin-bottom: 16px; }
.kicker, .sub { font-size: 11px; letter-spacing: .3em; text-transform: uppercase; color: var(--gold); font-weight: 400; margin-bottom: 8px; }
.sub { margin: 20px 0 8px; }

/* reveal on scroll */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
.reveal.in { opacity: 1; transform: none; }

.status { position: relative; overflow: hidden; }
.status .big { font-family: var(--serif); font-size: clamp(30px, 6.5vw, 40px); font-weight: 500; line-height: 1.1; }
.status p { margin: 8px 0 0; }
.flightpath { display: block; width: 100%; height: auto; margin: 18px 0 4px; overflow: visible; }
.flightpath .route { fill: none; stroke: var(--muted); stroke-opacity: .5; stroke-width: 1.5; stroke-dasharray: 2 6; stroke-linecap: round; }
.flightpath .done { fill: none; stroke: var(--accent); stroke-width: 1.5; stroke-linecap: round; }
.flightpath .end { fill: var(--card); stroke: var(--gold); stroke-width: 1.5; }
.flightpath text { font-family: var(--sans); font-size: 11px; letter-spacing: .2em; fill: var(--muted); }
.flightpath .plane { fill: var(--accent); }
.progress { margin-top: 18px; }
.progress .bar { height: 2px; background: var(--line); position: relative; overflow: hidden; }
.progress .bar i { position: absolute; inset: 0 auto 0 0; width: 0; background: linear-gradient(90deg, var(--gold), var(--accent)); transition: width 1.6s var(--ease) .2s; }
.progress .lbls { display: flex; justify-content: space-between; font-size: 11px; letter-spacing: .2em; text-transform: uppercase; color: var(--muted); margin-top: 8px; }

.banner { background: var(--warn-soft); color: var(--warn); padding: 12px 16px; margin-bottom: 18px; font-size: 14px; border-left: 2px solid var(--warn); }

/* ---------- kids ---------- */
.kids { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.kid { background: var(--card); padding: 16px 16px 14px; }
.kid .n { font-family: var(--serif); font-size: 24px; font-weight: 500; line-height: 1.1; }
.kid .n span { font-family: var(--sans); color: var(--muted); font-weight: 300; font-size: 12px; letter-spacing: .1em; margin-left: 4px; }
.kid .who { margin-top: 8px; display: inline-flex; align-items: center; gap: 7px; font-size: 13px; font-weight: 400; letter-spacing: .04em; }
.kid .who::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; flex: none; }
.kid .until { font-size: 12px; color: var(--muted); margin-top: 2px; }
.who.care { color: var(--olive); }
.who.self { color: var(--sky); }
.who.none { color: var(--warn); }
.who.parents { color: var(--accent); }
.who.school { color: var(--gold); }
.who.none::before { animation: pulse 2s ease-in-out infinite; }

/* ---------- timeline ---------- */
.tl { list-style: none; margin: 0; padding: 0; position: relative; }
.tl li { display: grid; grid-template-columns: 92px 1fr; gap: 18px; padding: 14px 0; border-top: 1px solid var(--line); }
.tl li:first-child { border-top: 0; padding-top: 4px; }
.tl .when { font-family: var(--serif); font-size: 20px; font-weight: 500; line-height: 1.15; font-variant-numeric: lining-nums tabular-nums; }
.tl .when small { display: block; font-family: var(--sans); font-weight: 300; color: var(--muted); font-size: 11px; letter-spacing: .08em; margin-top: 3px; }
.tl .what { min-width: 0; }
.tl .what .ttl { font-weight: 400; font-size: 16px; }
.tl .what .det { font-size: 14px; color: var(--muted); margin-top: 2px; }
.tl .what .det a { font-size: 11px; letter-spacing: .16em; text-transform: uppercase; text-decoration: none; border-bottom: 1px solid currentColor; }
.tl li.past { opacity: .45; }
.tag { display: inline-block; font-size: 10px; font-weight: 400; letter-spacing: .22em; text-transform: uppercase; margin-right: 10px; vertical-align: 2px; color: var(--gold); }
.tag.flight { color: var(--sky); }
.tag.handoff { color: var(--olive); }
.tag.event { color: var(--accent); }
.tag.clock { color: var(--warn); }
.tag.school { color: var(--gold); }
.empty { color: var(--muted); font-family: var(--serif); font-style: italic; font-size: 18px; margin: 0; }

.btn { display: block; width: 100%; text-align: center; padding: 16px; background: var(--ink); color: var(--bg); font: 400 12px/1 var(--sans); letter-spacing: .3em; text-transform: uppercase; text-decoration: none; border: 0; cursor: pointer; transition: background .3s var(--ease), letter-spacing .4s var(--ease); }
.btn:hover { background: var(--accent); letter-spacing: .36em; }

/* ---------- whole trip ---------- */
.chips { display: flex; gap: 6px; overflow-x: auto; padding: 8px 0; margin-bottom: 18px; scrollbar-width: none; position: sticky; top: 0; z-index: 4; background: var(--bg); }
.chips::-webkit-scrollbar { display: none; }
.chips a { flex: 0 0 auto; min-width: 54px; text-decoration: none; color: var(--muted); border: 1px solid var(--line); background: var(--card); padding: 8px 10px; font-size: 10px; letter-spacing: .2em; text-transform: uppercase; text-align: center; line-height: 1.2; transition: border-color .3s, color .3s; }
.chips a b { display: block; font-family: var(--serif); font-size: 22px; font-weight: 500; letter-spacing: 0; color: var(--ink); }
.chips a.today { border-color: var(--accent); color: var(--accent); }
.chips a:hover { border-color: var(--gold); }

.day { scroll-margin-top: 90px; }
.day.today { border-color: var(--accent); box-shadow: inset 0 2px 0 var(--accent); }
.day .head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin-bottom: 4px; }
.day .head h2 { margin: 0; }
.day .head .muted { font-size: 11px; letter-spacing: .28em; text-transform: uppercase; color: var(--gold); white-space: nowrap; }
.pill { font-size: 10px; letter-spacing: .28em; text-transform: uppercase; color: var(--accent); border: 1px solid var(--accent); padding: 3px 10px; white-space: nowrap; }
.cov { list-style: none; padding: 0; margin: 0 0 6px; }
.cov li { font-size: 14px; padding: 5px 0; border-bottom: 1px dotted var(--line); }
.cov li:last-child { border-bottom: 0; }

/* ---------- footer ---------- */
.foot { padding: 30px 16px 60px; font-size: 13px; text-align: center; }
.foot .contacts { display: grid; gap: 6px; margin-bottom: 14px; }
.foot .flourish { font-family: var(--serif); font-style: italic; font-size: 22px; color: var(--gold); margin-bottom: 6px; }

/* ---------- login / admin ---------- */
.narrow { max-width: 440px; position: relative; z-index: 3; margin-top: -48px; }
.hero.small { height: clamp(240px, 36vh, 340px); }
.hero.small .hero-text { padding-top: clamp(32px, 7vh, 64px); }
.hero.small h1 { font-size: clamp(54px, 13vw, 96px); }
.center { text-align: center; }
.form label { display: block; font-size: 11px; font-weight: 400; letter-spacing: .22em; text-transform: uppercase; color: var(--muted); margin-bottom: 16px; }
.form input, .form select {
  display: block; width: 100%; margin-top: 6px; padding: 12px 2px; font: 300 17px/1.3 var(--sans); letter-spacing: .01em; text-transform: none;
  color: var(--ink); background: transparent; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; transition: border-color .3s var(--ease);
}
.form select { padding: 11px 0; }
.form select option { background: var(--card); color: var(--ink); }
.form input:focus, .form select:focus { outline: none; border-bottom-color: var(--accent); }
.form .btn:disabled { opacity: .6; }
.err { color: var(--accent); min-height: 1.2em; margin: 4px 0 12px; font-size: 14px; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 18px; }
.btn.small { display: inline-block; width: auto; padding: 12px 18px; font-size: 11px; }
.btn.ghost { background: transparent; color: var(--ink); border: 1px solid var(--ink); }
.btn.ghost:hover { background: var(--ink); color: var(--bg); }
.users .user, #answered .user { display: flex; flex-wrap: wrap; gap: 8px 12px; justify-content: space-between; align-items: center; padding: 14px 0; border-top: 1px solid var(--line); }
.users .user:first-child { border-top: 0; }
.small-t { font-size: 13px; }
.u-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.u-actions button:not(.btn) { font: 400 11px/1 var(--sans); letter-spacing: .14em; text-transform: uppercase; padding: 9px 12px; border: 1px solid var(--line); background: transparent; color: var(--ink); cursor: pointer; transition: border-color .3s; }
.u-actions button:not(.btn):hover { border-color: var(--gold); }
.u-actions button.danger { color: var(--accent); border-color: var(--accent); }
.u-main .tag { margin-left: 8px; }

.q { border-top: 1px solid var(--line); padding: 18px 0 6px; }
.q:first-child { border-top: 0; padding-top: 0; }
.q-head { display: flex; flex-direction: column; gap: 2px; margin-bottom: 12px; }
.q-head b { font-family: var(--serif); font-size: 21px; font-weight: 500; line-height: 1.2; }
.form label.check { display: flex; gap: 10px; align-items: center; text-transform: none; letter-spacing: .02em; font-size: 14px; }
.form label.check input { width: auto; margin: 0; accent-color: var(--accent); }
.addq { margin: 18px 0 6px; }
.addq summary { cursor: pointer; font-size: 11px; letter-spacing: .26em; text-transform: uppercase; color: var(--accent); margin-bottom: 14px; }
.todo { border-left: 2px solid var(--warn); }
.todo ul, .todo-l { margin: 0; padding-left: 18px; }
.todo li, .todo-l li { padding: 4px 0; font-size: 15px; }
.todo-l li { font-size: 14px; }
.todo .btn.small { margin-top: 14px; }

/* ---------- motion ---------- */
@keyframes sunpulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.05); } }
@keyframes drift { from { transform: translateX(-260px); } to { transform: translateX(1300px); } }
@keyframes fly { 0% { transform: translate(-80px, 120px); } 50% { transform: translate(600px, 96px); } 100% { transform: translate(1300px, 128px); } }
@keyframes twinkle { from { opacity: .2; } to { opacity: 1; } }
@keyframes rise { from { opacity: 0; transform: translateY(28px); } to { opacity: 1; transform: none; } }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: .3; } }

.hero-art .sun { transform-box: fill-box; transform-origin: center; animation: sunpulse 9s ease-in-out infinite; }
.hero-art .cloud.c1 { animation: drift 140s linear infinite; animation-delay: -40s; }
.hero-art .cloud.c2 { animation: drift 190s linear infinite; animation-delay: -120s; }
.hero-art .birds { animation: fly 46s linear infinite; animation-delay: -8s; }
.hero-art .stars circle { animation: twinkle 2.8s ease-in-out infinite alternate; }
.hero-art .layer > * { animation: rise 1.4s var(--ease) both; }
.hero-art .far > * { animation-delay: .1s; }
.hero-art .mid > * { animation-delay: .25s; }
.hero-art .near > * { animation-delay: .4s; }
.hero-art .ground > * { animation-delay: .5s; }
.hero-text > * { animation: rise 1.2s var(--ease) both; }
.hero-text > :nth-child(2) { animation-delay: .15s; }
.hero-text > :nth-child(3) { animation-delay: .3s; }
.clockbar, .narrow { animation: rise 1.1s var(--ease) .45s both; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
  html { scroll-behavior: auto; }
}

@media (max-width: 520px) {
  .card { padding: 20px 16px; }
  .card h2 { font-size: 25px; }
  .tl li { grid-template-columns: 74px 1fr; gap: 12px; }
  .tl .when { font-size: 18px; }
  .clock { padding: 12px 6px 10px; }
  .clock .lbl { letter-spacing: .2em; }
  .clockbar { gap: 4px; }
  .clock-gap { font-size: 13px; }
  .row2 { grid-template-columns: 1fr; }
  .tabs { gap: 28px; }
}
@media (max-width: 360px) {
  .kids { grid-template-columns: 1fr; }
}
.narrow.wide { max-width: 780px; }
.narrow .card:first-of-type { box-shadow: 0 18px 40px -26px rgba(60, 35, 20, .45); }

/* The art sits at the bottom of the hero at a height that keeps the landmarks in frame on phones;
   the sky above it is the hero's own gradient. */
.hero { background: linear-gradient(180deg, var(--sky-1) 0%, var(--sky-2) 62%, var(--sky-3) 100%); }
.hero-art { top: auto; height: clamp(230px, 30vw + 130px, 100%); }
.clock-gap { width: 58px; height: 58px; border-radius: 50%; background: var(--card); border: 1px solid var(--line); display: grid; place-content: center; font-size: 13px; box-shadow: 0 12px 30px -20px rgba(60, 35, 20, .5); }
.clock-gap b { font-size: 13px; letter-spacing: .1em; }
@media (max-width: 520px) { .clock-gap { width: 50px; height: 50px; font-size: 12px; } }

/* ---------- Our trip ---------- */
.intro { font-family: var(--serif); font-style: italic; font-size: 19px; color: var(--muted); text-align: center; margin: 0 auto 22px; max-width: 520px; }
.theme { font-family: var(--serif); font-style: italic; font-size: 20px; color: var(--gold); margin: 0 0 14px; }
.ours .tl .when { font-size: 19px; }
.ours .tl .when small { line-height: 1.3; }
.doing { margin-top: 12px !important; padding-top: 12px; border-top: 1px solid var(--line); }
.doing a { text-decoration: none; color: var(--accent); font-family: var(--serif); font-size: 19px; font-style: italic; }
@media (max-width: 520px) {
  .tabs { gap: 18px; }
  .tabs a { letter-spacing: .18em; font-size: 11px; }
  .ours .tl li { grid-template-columns: 88px 1fr; }
}
.remember { background: var(--stone); border-left: 2px solid var(--gold); padding: 12px 14px; font-size: 14px; margin: 4px 0 14px; }
.remember b { display: block; font-family: var(--serif); font-size: 19px; font-weight: 500; margin-bottom: 2px; }
