/* Island Hours — warm dusk, lagoon teal, sand. Mobile-first. */
:root {
  --dusk-950: #0b1018;
  --dusk-900: #121a2b;
  --dusk-850: #172033;
  --dusk-800: #1c2740;
  --dusk-700: #2a3a58;
  --lagoon-300: #99f6e4;
  --lagoon-400: #5eead4;
  --lagoon-500: #2dd4bf;
  --lagoon-700: #0f766e;
  --sand-50: #fdfaf4;
  --sand-100: #f7f1e4;
  --sand-200: #eadcbc;
  --sand-400: #c4b08a;
  --sunset-300: #f6c08a;
  --sunset-400: #f4a261;
  --sunset-500: #e76f51;
  --sky-400: #7dd3fc;
  --text: var(--sand-100);
  --muted: #c9bba4;
  --line: rgba(245, 230, 200, 0.12);
  --radius: 18px;
  --font-display: "Fraunces", "Palatino Linotype", Palatino, Georgia, serif;
  --font-body: "Figtree", "Segoe UI", system-ui, sans-serif;
  --shadow: 0 24px 60px rgba(4, 10, 20, 0.45);
  --max: 1120px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; color-scheme: dark; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font-body);
  color: var(--text);
  background: var(--dusk-950);
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  background:
    radial-gradient(ellipse 80% 50% at 80% -10%, rgba(244, 162, 97, 0.18), transparent 50%),
    radial-gradient(ellipse 60% 40% at 10% 0%, rgba(61, 42, 88, 0.55), transparent 50%),
    radial-gradient(ellipse 90% 50% at 50% 100%, rgba(13, 74, 78, 0.45), transparent 55%),
    linear-gradient(180deg, #15101f 0%, #0d1b2a 42%, #0a242c 100%);
}

.skip {
  position: absolute;
  left: 1rem;
  top: -4rem;
  background: var(--lagoon-400);
  color: var(--dusk-950);
  padding: 0.6rem 1rem;
  border-radius: 8px;
  font-weight: 700;
  z-index: 100;
}
.skip:focus { top: 1rem; }

a { color: var(--lagoon-400); text-underline-offset: 3px; }
a:hover { color: var(--lagoon-300); }
:focus-visible {
  outline: 2px solid var(--lagoon-400);
  outline-offset: 3px;
}

img, svg { max-width: 100%; display: block; }
h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 560; line-height: 1.15; letter-spacing: -0.02em; color: var(--sand-50); }
h1 { font-size: clamp(2.1rem, 6vw, 3.6rem); margin: 0 0 0.75rem; }
h2 { font-size: clamp(1.5rem, 3.4vw, 2.1rem); margin: 0 0 0.7rem; }
h3 { font-size: 1.15rem; margin: 0 0 0.4rem; }
p { margin: 0 0 1rem; color: var(--muted); }
.lede { font-size: 1.15rem; color: var(--sand-200); max-width: 38rem; }

.wrap { width: min(var(--max), calc(100% - 2rem)); margin-inline: auto; }
.site-header, .site-footer { width: min(var(--max), calc(100% - 2rem)); margin-inline: auto; }

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.1rem 0;
  flex-wrap: wrap;
}
.brand {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  text-decoration: none;
  color: var(--sand-50);
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 600;
}
.brand img, .brand svg { width: 40px; height: 40px; }
.nav { display: flex; align-items: center; gap: 0.35rem 1rem; flex-wrap: wrap; }
.nav a {
  color: var(--sand-200);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 600;
}
.nav a:hover, .nav a[aria-current="page"] { color: var(--lagoon-400); }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  border: 0;
  cursor: pointer;
  font-family: inherit;
  font-weight: 700;
  font-size: 0.95rem;
  text-decoration: none;
  border-radius: 999px;
  padding: 0.7rem 1.2rem;
  transition: transform 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}
.btn:active { transform: translateY(1px); }
.btn-primary {
  background: linear-gradient(180deg, var(--sunset-400), #e0893d);
  color: #2a1508;
  box-shadow: 0 8px 24px rgba(244, 162, 97, 0.28);
}
.btn-primary:hover { color: #2a1508; background: linear-gradient(180deg, #f6b277, var(--sunset-400)); }
.btn-lagoon {
  background: var(--lagoon-400);
  color: #042f2e;
}
.btn-lagoon:hover { color: #042f2e; background: var(--lagoon-300); }
.btn-ghost {
  background: transparent;
  color: var(--sand-100);
  border: 1px solid var(--line);
}
.btn-ghost:hover { color: var(--sand-50); border-color: var(--sand-400); }
.btn-small { padding: 0.4rem 0.8rem; font-size: 0.85rem; }

.hero { padding: 1.5rem 0 3rem; }
.hero-grid {
  display: grid;
  gap: 2rem;
}
.kicker {
  display: inline-block;
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--sunset-400);
  font-weight: 700;
  margin-bottom: 0.8rem;
}
.price-card {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.5rem 1rem;
  margin: 1.4rem 0;
}
.price {
  font-family: var(--font-display);
  font-size: 2.4rem;
  color: var(--sand-50);
}
.price small { font-size: 1rem; color: var(--muted); font-family: var(--font-body); }
.tax-note { font-size: 0.9rem; color: var(--muted); max-width: 28rem; }

.demo-frame {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--dusk-900);
  box-shadow: var(--shadow);
  min-height: 640px;
}
.demo-frame iframe {
  width: 100%;
  height: 720px;
  border: 0;
  background: var(--dusk-900);
}

.section { padding: 2.5rem 0; }
.features {
  display: grid;
  gap: 1rem;
}
.card {
  background: rgba(18, 26, 43, 0.72);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.25rem 1.3rem;
  backdrop-filter: blur(10px);
}
.card h3 { color: var(--sand-50); }
.card p { margin-bottom: 0; }
.who { display: grid; gap: 1rem; }

.horizon {
  height: 3px;
  border: 0;
  margin: 2rem 0;
  background: linear-gradient(90deg, transparent, var(--sunset-400), var(--lagoon-400), transparent);
  opacity: 0.55;
}

.site-footer {
  padding: 2.5rem 0 3rem;
  color: var(--muted);
  font-size: 0.9rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem 1.4rem;
  justify-content: space-between;
  border-top: 1px solid var(--line);
  margin-top: 2rem;
}
.footer-links { display: flex; gap: 1rem; flex-wrap: wrap; }
.footer-links a { color: var(--sand-200); text-decoration: none; }
.footer-links a:hover { color: var(--lagoon-400); }

.legal { padding: 1.5rem 0 3rem; max-width: 42rem; }
.legal h1 { font-size: 2.2rem; }
.legal p, .legal li { color: var(--muted); }
.legal ul { padding-left: 1.2rem; }

/* App layout */
.app-main { padding-bottom: 3rem; }
.app-grid {
  display: grid;
  gap: 1.25rem;
}
.panel {
  background: rgba(18, 26, 43, 0.78);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.1rem;
}
.panel h2 { font-size: 1.15rem; margin-bottom: 0.9rem; }
.field { margin-bottom: 0.85rem; }
.field label {
  display: block;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--sand-400);
  margin-bottom: 0.3rem;
}
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0.6rem; }
select, input[type="time"], input[type="text"], .combo input {
  width: 100%;
  background: var(--dusk-950);
  color: var(--sand-50);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0.55rem 0.7rem;
  font: inherit;
}
select:focus, input:focus { border-color: var(--lagoon-500); }
.person {
  border: 1px dashed rgba(245, 230, 200, 0.16);
  border-radius: 12px;
  padding: 0.75rem;
  margin-bottom: 0.7rem;
}
.person-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}
.person-head strong { font-size: 0.9rem; }
.swatch {
  width: 10px; height: 10px; border-radius: 50%; display: inline-block; margin-right: 0.35rem;
}
.help { font-size: 0.8rem; color: var(--muted); margin: 0.2rem 0 0.6rem; }

.offset-pill {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--dusk-950);
  background: var(--sand-200);
  border-radius: 999px;
  padding: 0.1rem 0.5rem;
  margin-left: 0.35rem;
}

.week { display: grid; gap: 0.8rem; }
.day-card { padding: 0.85rem; }
.day-head {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  align-items: baseline;
  margin-bottom: 0.55rem;
  flex-wrap: wrap;
}
.day-head h3 { margin: 0; font-size: 1rem; }
.overlap-label { color: var(--lagoon-400); font-weight: 700; font-size: 0.85rem; }
.none { color: var(--sunset-500); font-weight: 700; font-size: 0.85rem; }

.timeline {
  --hours: 24;
  overflow-x: auto;
  padding-bottom: 0.3rem;
}
.axis, .lane {
  display: grid;
  grid-template-columns: 6.5rem 1fr;
  gap: 0.4rem;
  align-items: center;
  min-width: 520px;
}
.axis { margin-bottom: 0.25rem; color: var(--sand-400); font-size: 0.7rem; }
.hour-scale {
  display: grid;
  grid-template-columns: repeat(24, 1fr);
  position: relative;
}
.hour-scale span { text-align: center; opacity: 0.8; }
.lane-name {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--sand-200);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.track {
  position: relative;
  height: 18px;
  background: rgba(255,255,255,0.04);
  border-radius: 6px;
  overflow: hidden;
}
.seg {
  position: absolute;
  top: 0; bottom: 0;
  border-radius: 6px;
}
.seg-me { background: rgba(244, 162, 97, 0.72); }
.seg-them { background: rgba(125, 211, 252, 0.55); }
.seg-overlap {
  background: linear-gradient(90deg, var(--lagoon-500), var(--lagoon-300));
  box-shadow: 0 0 12px rgba(94, 234, 212, 0.35);
}
.lane.overlap .track { height: 22px; }
.now-line {
  position: absolute;
  top: 0; bottom: 0;
  width: 2px;
  background: var(--sand-50);
  opacity: 0.7;
  z-index: 2;
  pointer-events: none;
}

.slots { display: grid; gap: 0.7rem; }
.slot {
  display: grid;
  gap: 0.25rem;
  padding: 0.9rem 1rem;
  border-left: 3px solid var(--lagoon-400);
  background: rgba(15, 118, 110, 0.12);
  border-radius: 0 12px 12px 0;
}
.slot time, .slot .when { font-weight: 700; color: var(--sand-50); }
.slot .local { font-size: 0.92rem; color: var(--muted); }
.copy-box {
  width: 100%;
  min-height: 8rem;
  background: var(--dusk-950);
  color: var(--sand-100);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.8rem;
  font: inherit;
  line-height: 1.5;
  resize: vertical;
}
.toolbar { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 0.7rem; }
.status {
  min-height: 1.2rem;
  font-size: 0.85rem;
  color: var(--lagoon-400);
  margin-top: 0.4rem;
}

.unlock-note {
  font-size: 0.8rem;
  color: var(--muted);
  max-width: 16rem;
}

body.embed .site-header .nav,
body.embed .site-footer,
body.embed .print-only,
body.embed [data-buy],
body.embed #buy-button { display: none !important; }
body.embed { background: transparent; }
body.embed::before { display: none; }
body.embed .site-header { padding-top: 0.4rem; }

.combo { position: relative; }
.combo input { padding-right: 1.8rem; }
.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0);
  white-space: nowrap; border: 0;
}

@media (min-width: 860px) {
  .hero-grid { grid-template-columns: 1fr 1.15fr; align-items: start; }
  .features { grid-template-columns: repeat(3, 1fr); }
  .who { grid-template-columns: 1fr 1fr; }
  .app-grid { grid-template-columns: 300px 1fr; align-items: start; }
  .controls { position: sticky; top: 0.8rem; }
}

@media (max-width: 859px) {
  .demo-frame iframe { height: 1100px; }
  .demo-frame { min-height: 1100px; }
}

@media print {
  body { background: #fff; color: #111; }
  body::before { display: none; }
  .site-header .nav, .controls, .toolbar, .btn, .skip, .unlock-note, #buy-button, [data-buy] { display: none !important; }
  .site-footer { color: #333; border-color: #ddd; }
  .panel, .card, .day-card, .slot {
    background: #fff;
    color: #111;
    border-color: #ccc;
    box-shadow: none;
    break-inside: avoid;
  }
  h1, h2, h3, .day-head h3, .slot .when { color: #111; }
  p, .muted, .local, .help, .lane-name { color: #333; }
  .seg-me { background: #f4a261; }
  .seg-them { background: #7dd3fc; }
  .seg-overlap { background: #2a9d8f; }
  .track { background: #eee; }
  a { color: #111; }
  .app-grid { display: block; }
  .copy-box { border-color: #ccc; color: #111; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn { transition: none; }
}
