/* meet.ianmccallum.com: Frutiger Aero, the same sincere Vista/7 material as
   ianmccallum.com (tokens copied from its src/styles/tokens.css). Glass over
   a living sky, glossy "jelly" buttons, a lit title bar. Mobile first; the
   two-pane window is the min-width enhancement. */

:root {
  --water: #0078d7;
  --water-ink: #0067bc;
  --water-deep: #005a9e;
  --water-wash: #e8f3fc;
  --sky: #87ceeb;
  --spring: #00c853;
  --spring-ink: #0b7e3d;
  --spring-wash: #e6f8ed;
  --sun-wash: #fff2e0;
  --sun-ink: #985200;
  --coral-ink: #c22f2f;
  --coral-wash: #fdecec;
  --ink: #0a2c4d;
  --ink-soft: #35506b;
  --haze: #5c6f80;
  --glass: rgba(250, 250, 248, 0.82);
  --glass-solid: #fafaf8;
  --specular: rgba(255, 255, 255, 0.8);
  --line: rgba(10, 44, 77, 0.16);
  --focus: 0 0 0 3px rgba(0, 103, 188, 0.9), 0 0 0 6px rgba(255, 255, 255, 0.85);
  --display: 'Segoe UI Semilight', 'Segoe UI', system-ui, -apple-system, sans-serif;
  --body: 'Segoe UI', system-ui, -apple-system, 'Helvetica Neue', Arial, sans-serif;
  --r-sm: 4px;
  --r-md: 8px;
  --r-lg: 12px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  font: 400 1rem/1.55 var(--body);
  color: var(--ink);
  background: #69a7c6;
  display: grid;
  place-items: start center;
  padding: max(12px, env(safe-area-inset-top)) max(12px, env(safe-area-inset-right))
           max(16px, env(safe-area-inset-bottom)) max(12px, env(safe-area-inset-left));
}
button, input, select, textarea { font: inherit; color: inherit; }
img { display: block; max-width: 100%; }
[hidden] { display: none !important; }
:focus-visible { outline: none; box-shadow: var(--focus); }

/* ---------------------------------------------------------------- sky */

.atmosphere { position: fixed; inset: 0; z-index: -1; overflow: hidden;
  background: #69a7c6 url('/assets/img/aero-bg-poster.jpg') center / cover no-repeat; }
.atmosphere-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0;
  transition: opacity 800ms ease; }
.atmosphere-video.is-playing { opacity: 1; }
.atmosphere-light { position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(180deg, rgba(255,255,255,.22), transparent 38%, rgba(1,42,69,.18)); }

/* ------------------------------------------------------------- window */

.window {
  width: 100%;
  max-width: 980px;
  margin-top: 4px;
  display: grid;
  grid-template-rows: auto 1fr auto;
  border-radius: var(--r-lg);
  border: 1px solid rgba(10, 44, 77, .38);
  border-top-color: var(--specular);
  background: rgba(214, 236, 248, .42);
  -webkit-backdrop-filter: blur(18px) saturate(1.4);
  backdrop-filter: blur(18px) saturate(1.4);
  box-shadow: 0 22px 60px rgba(2, 21, 38, .38), 0 0 0 1px rgba(112, 202, 255, .55),
              inset 0 1px rgba(255, 255, 255, .9);
  overflow: hidden;
  animation: arrive 320ms cubic-bezier(.16, 1, .3, 1) both;
}
@keyframes arrive { from { opacity: 0; transform: translateY(14px) scale(.99); } to { opacity: 1; transform: none; } }

.titlebar {
  position: relative;
  display: flex; align-items: center; gap: 10px;
  min-height: 40px; padding: 6px 12px;
  background: linear-gradient(180deg, rgba(255,255,255,.62) 0%, rgba(255,255,255,.22) 48%,
                                      rgba(255,255,255,.04) 52%, rgba(255,255,255,.16) 100%);
  border-bottom: 1px solid rgba(10, 44, 77, .22);
}
.titlebar-orb {
  width: 20px; height: 20px; border-radius: 50%; flex: none;
  background: radial-gradient(circle at 35% 30%, #fff 0 18%, #8fe1ff 30%, #1e8ad8 62%, #0b4f8e 100%);
  box-shadow: 0 0 8px rgba(80, 190, 255, .8), inset 0 -2px 3px rgba(0, 40, 90, .45);
}
.titlebar-title { margin: 0; font: 400 .95rem/1.2 var(--body); color: #0b2440;
  text-shadow: 0 0 12px rgba(255,255,255,.95), 0 0 2px #fff; flex: 1; min-width: 0;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.titlebar-link { font-size: .8rem; color: #0b2440; text-decoration: none; padding: 10px 4px;
  text-shadow: 0 0 8px #fff; display: none; }
.titlebar-link:hover { text-decoration: underline; }

.window-body { margin: 0 6px; background: var(--glass);
  border: 1px solid rgba(7, 50, 83, .22); border-bottom: 0; display: grid; }

.statusbar { display: flex; justify-content: space-between; gap: 12px; min-height: 26px;
  padding: 4px 12px; font-size: .75rem; color: #183a5a;
  background: linear-gradient(180deg, rgba(255,255,255,.4), rgba(255,255,255,.15)); }
.statusbar-right { display: none; }

/* ------------------------------------------------------------ profile */

.profile {
  display: grid; grid-template-columns: 64px 1fr; gap: 6px 14px; align-items: center;
  padding: 16px;
  background: linear-gradient(180deg, #f3faff 0%, #dcefff 100%);
  border-bottom: 1px solid var(--line);
}
.profile-photo {
  width: 64px; height: 64px; border-radius: 50%; object-fit: cover;
  border: 2px solid #fff;
  box-shadow: 0 0 0 1px rgba(0, 90, 158, .35), 0 4px 12px rgba(0, 60, 110, .25);
}
.profile-name { margin: 0; font: 300 1.45rem/1.15 var(--display); letter-spacing: -.01em; }
.profile-role { margin: 2px 0 0; font-size: .85rem; color: var(--ink-soft); line-height: 1.4; }
.profile-facts { grid-column: 1 / -1; list-style: none; margin: 8px 0 0; padding: 0;
  display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: .82rem; color: var(--ink-soft); }
.profile-facts li { display: flex; align-items: center; gap: 6px; }
.fact-icon { width: 16px; height: 16px; border-radius: 50%; flex: none; position: relative;
  background: radial-gradient(circle at 35% 30%, #fff 0 15%, var(--c1) 45%, var(--c2) 100%);
  box-shadow: inset 0 -1px 2px rgba(0,0,0,.25); }
.fact-zoom { --c1: #5fb6f5; --c2: #0b5fb0; }
.fact-clock { --c1: #7ee39b; --c2: #0b7e3d; }
.fact-globe { --c1: #c6a4ef; --c2: #7442a6; }

/* --------------------------------------------------------------- pane */

.pane { padding: 16px; min-width: 0; }
.pane-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.pane-title { margin: 0; font: 300 1.6rem/1.2 var(--display); letter-spacing: -.015em; color: var(--ink); }

.week-nav { display: flex; align-items: center; gap: 6px; }
.week-label { min-width: 120px; text-align: center; font-size: .9rem; color: var(--ink-soft); }

/* Glass button (Vista's default command button) */
.glass-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 44px; padding: 0 16px; border-radius: var(--r-sm);
  border: 1px solid #8fa7bd; color: var(--ink); text-decoration: none; cursor: pointer;
  background: linear-gradient(180deg, #fdfdfd 0%, #eef2f6 48%, #dde5ee 52%, #e9eff5 100%);
  box-shadow: inset 0 1px #fff;
  transition: background 120ms ease, border-color 120ms ease, transform 120ms ease;
}
.glass-btn:hover { border-color: #3c8fd3;
  background: linear-gradient(180deg, #f2faff 0%, #dff1fe 48%, #bfe3fc 52%, #d5edfd 100%); }
.glass-btn:active { transform: translateY(1px); }
.glass-btn:disabled { opacity: .45; cursor: default; transform: none; }
.icon-btn { width: 44px; padding: 0; font-size: 1.4rem; line-height: 1; }

/* Jelly button: the glossy aqua pill */
.jelly-btn {
  position: relative; display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; padding: 0 26px; border-radius: 999px; cursor: pointer;
  font-weight: 600; font-size: 1rem; color: #fff; text-decoration: none;
  text-shadow: 0 1px 1px rgba(0, 50, 20, .45);
  border: 1px solid #08803a;
  background: linear-gradient(180deg, #8ff0a8 0%, #2fcf68 48%, #10b04e 52%, #3ad977 100%);
  box-shadow: 0 4px 14px rgba(0, 120, 50, .35), inset 0 1px rgba(255,255,255,.7), inset 0 -2px 6px rgba(0, 90, 30, .3);
  overflow: hidden;
  transition: filter 120ms ease, transform 120ms ease;
}
.jelly-btn::before { content: ''; position: absolute; left: 8%; right: 8%; top: 2px; height: 45%;
  border-radius: 999px; background: linear-gradient(180deg, rgba(255,255,255,.75), rgba(255,255,255,.1)); pointer-events: none; }
.jelly-btn:hover { filter: brightness(1.06) saturate(1.1); }
.jelly-btn:active { transform: translateY(1px); }
.jelly-btn:disabled { filter: grayscale(.7); opacity: .7; cursor: progress; }

/* --------------------------------------------------------------- days */

.days {
  display: grid; grid-auto-flow: column; grid-auto-columns: minmax(64px, 1fr); gap: 6px;
  margin: 14px -16px 0; padding: 4px 16px 8px; overflow-x: auto; scroll-snap-type: x mandatory;
  scrollbar-width: none;
}
.days::-webkit-scrollbar { display: none; }
.day {
  scroll-snap-align: start;
  display: grid; justify-items: center; gap: 1px; min-height: 64px; padding: 8px 4px;
  border-radius: var(--r-md); border: 1px solid #b6cadb; cursor: pointer;
  background: linear-gradient(180deg, #ffffff, #eef5fb);
  color: var(--ink); transition: border-color 120ms ease, background 120ms ease;
}
.day-dow { font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; color: var(--haze); }
.day-num { font: 300 1.35rem/1.1 var(--display); }
.day-count { font-size: .7rem; color: var(--water-ink); min-height: 1em; }
.day:hover:not(:disabled) { border-color: #3c8fd3; }
.day[aria-selected="true"] {
  border-color: #1f74bf; color: #fff;
  background: linear-gradient(180deg, #7cc4f5 0%, #2a8be0 48%, #1474cc 52%, #2f93e6 100%);
  box-shadow: 0 3px 10px rgba(0, 90, 170, .3), inset 0 1px rgba(255,255,255,.6);
}
.day[aria-selected="true"] .day-dow, .day[aria-selected="true"] .day-count { color: #e8f6ff; }
.day:disabled { opacity: .45; cursor: default; background: rgba(255,255,255,.5); }

/* -------------------------------------------------------------- times */

.times-wrap { position: relative; min-height: 132px; margin-top: 10px; }
.times { display: grid; grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); gap: 8px; }
.time {
  position: relative; display: grid; gap: 0; justify-items: start; text-align: left;
  min-height: 52px; padding: 8px 12px; border-radius: var(--r-md); cursor: pointer;
  border: 1px solid #7fb2dc; color: var(--water-deep);
  background: linear-gradient(180deg, #ffffff 0%, #eaf5fe 48%, #d6ebfb 52%, #e6f3fd 100%);
  box-shadow: inset 0 1px #fff, 0 1px 2px rgba(0, 60, 110, .12);
  transition: transform 120ms ease, box-shadow 120ms ease, border-color 120ms ease;
  animation: pop 200ms ease both;
}
.time:hover { border-color: #1f74bf; box-shadow: inset 0 1px #fff, 0 0 0 3px rgba(80, 170, 240, .25); }
.time:active { transform: translateY(1px); }
.time-at { font-weight: 600; font-size: 1rem; }
.time-meta { font-size: .75rem; color: var(--haze); display: flex; gap: 6px; align-items: center; }
.rec { display: inline-flex; align-items: center; gap: 4px; color: var(--coral-ink); }
.rec::before { content: ''; width: 7px; height: 7px; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #ffb3b3, #e03131); }
@keyframes pop { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

.empty { margin: 8px 0 0; padding: 14px 16px; border-radius: var(--r-md); font-size: .95rem;
  background: var(--sun-wash); color: var(--sun-ink); border: 1px solid rgba(152, 82, 0, .2); }
.empty button { margin-top: 10px; }

.loading { position: absolute; inset: 0; display: flex; gap: 6px; align-items: center; justify-content: center; }
.loading span { width: 10px; height: 10px; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #fff, #4aa8ee 60%, #0b5fb0);
  animation: bob 900ms ease-in-out infinite; }
.loading span:nth-child(2) { animation-delay: 150ms; }
.loading span:nth-child(3) { animation-delay: 300ms; }
@keyframes bob { 0%, 100% { transform: translateY(0); opacity: .5; } 50% { transform: translateY(-6px); opacity: 1; } }

.tz-line { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin: 16px 0 0;
  font-size: .85rem; color: var(--ink-soft); }
.tz-line select { min-height: 44px; max-width: 100%; padding: 0 10px; border-radius: var(--r-sm);
  border: 1px solid #8fa7bd; background: #fff; }

/* --------------------------------------------------------------- form */

.chosen { display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 12px 14px; margin-bottom: 14px; border-radius: var(--r-md);
  background: linear-gradient(180deg, #f0f8ff, #dceefe); border: 1px solid #9cc8ea; }
.chosen-when { margin: 0; font-weight: 600; color: var(--water-deep); }
.chosen-meta { margin: 2px 0 0; font-size: .82rem; color: var(--ink-soft); }

.field { display: grid; gap: 4px; margin-bottom: 12px; }
.field label { font-size: .88rem; color: var(--ink-soft); }
.opt { color: var(--haze); }
.field input, .field textarea {
  width: 100%; min-height: 44px; padding: 10px 12px; border-radius: var(--r-sm);
  border: 1px solid #a9bccd; border-top-color: #8aa0b4; background: #fff;
  box-shadow: inset 0 1px 2px rgba(10, 44, 77, .08);
  font-size: 16px; /* no iOS zoom on focus */
}
.field input:hover, .field textarea:hover { border-color: #5aa0d8; }
.field input:focus, .field textarea:focus { border-color: #1f74bf; }
.field textarea { resize: vertical; min-height: 84px; }
.field input[aria-invalid="true"] { border-color: var(--coral-ink); background: var(--coral-wash); }

.consent { display: grid; grid-template-columns: 32px 1fr; gap: 10px; align-items: start;
  padding: 12px; margin-bottom: 12px; border-radius: var(--r-md);
  background: linear-gradient(180deg, #fffdf6, #fff3df); border: 1px solid #e8c48a; }
.consent label { display: grid; grid-template-columns: 24px 1fr; gap: 8px; align-items: start;
  font-size: .88rem; color: var(--ink-soft); cursor: pointer; min-height: 44px; }
.consent input { width: 20px; height: 20px; margin: 2px 0 0; accent-color: var(--water-ink); }

.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
#turnstile:not(:empty) { margin-bottom: 12px; }

.form-error { margin: 0 0 12px; padding: 10px 12px; border-radius: var(--r-sm);
  background: var(--coral-wash); color: var(--coral-ink); border: 1px solid rgba(194, 47, 47, .3); font-size: .92rem; }
.form-actions { display: flex; justify-content: flex-end; }
.form-actions .jelly-btn { width: 100%; }

/* --------------------------------------------------------------- done */

.done { text-align: center; padding: 12px 0 8px; outline: none; }
.done-orb { width: 84px; height: 84px; margin: 4px auto 14px; border-radius: 50%; position: relative;
  background: radial-gradient(circle at 35% 28%, #fff 0 12%, #a6f5bf 28%, #22c55e 60%, #0b7e3d 100%);
  box-shadow: 0 8px 26px rgba(0, 140, 60, .4), inset 0 -4px 10px rgba(0, 70, 20, .35);
  animation: orb 420ms cubic-bezier(.2, 1.4, .4, 1) both; }
.done-orb::after { content: ''; position: absolute; left: 27px; top: 22px; width: 24px; height: 36px;
  border: solid #fff; border-width: 0 6px 6px 0; transform: rotate(45deg);
  filter: drop-shadow(0 1px 1px rgba(0, 60, 20, .5)); }
@keyframes orb { from { transform: scale(.4); opacity: 0; } to { transform: none; opacity: 1; } }
.done-when { margin: 8px 0 0; font-size: 1.1rem; font-weight: 600; color: var(--water-deep); }
.done-sub { margin: 4px auto 0; max-width: 34em; color: var(--ink-soft); font-size: .92rem; }
.done-actions { display: grid; gap: 10px; margin-top: 20px; }
.dev-note { margin: 16px 0 0; font-size: .8rem; color: var(--sun-ink); }

/* ------------------------------------------------------------ cancel */

.cancel-card { padding: 22px 16px; text-align: center; }
.cancel-card .pane-title { margin-bottom: 6px; }
.cancel-card p { color: var(--ink-soft); margin: 6px 0; }
.cancel-card .done-actions { max-width: 360px; margin-left: auto; margin-right: auto; }
.danger-btn { color: var(--coral-ink); border-color: #d99a9a; }

/* ---------------------------------------------------------- enhance */

@media (min-width: 560px) {
  .done-actions { grid-auto-flow: column; justify-content: center; }
  .form-actions .jelly-btn { width: auto; min-width: 180px; }
}

@media (min-width: 820px) {
  body { place-items: center; padding: 32px; }
  .titlebar-link, .statusbar-right { display: inline; }
  .window-body { grid-template-columns: 280px 1fr; min-height: 520px; }
  .profile { grid-template-columns: 1fr; align-content: start; justify-items: start; gap: 10px;
    padding: 24px 20px; border-bottom: 0; border-right: 1px solid var(--line);
    background: linear-gradient(180deg, #f3faff 0%, #d7ecfd 60%, #c9e6fb 100%); }
  .profile-photo { width: 88px; height: 88px; }
  .profile-facts { flex-direction: column; gap: 10px; margin-top: 14px; }
  .pane { padding: 24px 26px; }
  .days { margin: 18px 0 0; padding: 4px 0 8px; grid-auto-columns: 1fr; overflow: visible; }
  .times { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
  .window-body--single { grid-template-columns: 1fr; min-height: 0; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .atmosphere-video { display: none; }
}
