/* TimeTug marketing + legal site — tokens lifted from the app's own palette
   (BlurBackdrop.swift TakeoverColors, AboutView.swift). Not invented for the web. */

:root {
  --cream: #fff8f0;
  --cream-raised: #fffcf8;
  --ink: #1c2954;
  --ink-secondary: #5c6b8c;
  --hairline: rgba(28, 41, 84, 0.12);
  --pill: #ddebff;
  --orange: #ffb03b;
  --orange-ink: #7a4a00;
  --red-orange: #ff6b4a;
  --blue: #2e7af5;
  --blue-ink: #ffffff;
  --shadow: 0 1px 2px rgba(28, 41, 84, 0.06), 0 8px 24px -12px rgba(28, 41, 84, 0.18);
  --radius: 18px;
  --radius-sm: 10px;
  --display: "Bricolage Grotesque", "Segoe UI", system-ui, sans-serif;
  --body: "Public Sans", "Segoe UI", system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SF Mono", monospace;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --cream: #0d1429;
    --cream-raised: #131b35;
    --ink: #f0f5ff;
    --ink-secondary: #a6b5d3;
    --hairline: rgba(166, 181, 211, 0.16);
    --pill: #293d6b;
    --orange-ink: #2a1600;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 8px 28px -12px rgba(0, 0, 0, 0.55);
  }
}
:root[data-theme="dark"] {
  --cream: #0d1429;
  --cream-raised: #131b35;
  --ink: #f0f5ff;
  --ink-secondary: #a6b5d3;
  --hairline: rgba(166, 181, 211, 0.16);
  --pill: #293d6b;
  --orange-ink: #2a1600;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 8px 28px -12px rgba(0, 0, 0, 0.55);
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--cream);
  color: var(--ink);
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
body[data-page] { padding-inline: 20px; }

img { max-width: 100%; display: block; }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
a { color: var(--blue); }
h1, h2, h3 { font-family: var(--display); text-wrap: balance; line-height: 1.1; margin: 0; }
p { margin: 0 0 1em; max-width: 62ch; }
.eyebrow {
  font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--ink-secondary);
}
.container { max-width: 960px; margin-inline: auto; padding-block: 0; }
.stack { display: flex; flex-direction: column; gap: 1rem; }
.stack-compact { gap: 2px; }

/* --- nav --- */
.nav {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding-block: 20px; border-bottom: 1px solid var(--hairline);
}
.nav .brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
.nav .brand img { width: 28px; height: 28px; border-radius: 7px; }
.nav .brand span { font-family: var(--display); font-weight: 600; font-size: 1.05rem; }
.nav .links { display: flex; gap: 1.5rem; font-size: 0.92rem; }
.nav .links a { color: var(--ink-secondary); text-decoration: none; }
.nav .links a:hover { color: var(--ink); }

/* --- hero --- */
.hero { padding-block: 32px 48px; display: grid; gap: 24px; }
.hero .tagline { font-size: 1.2rem; color: var(--ink-secondary); max-width: 46ch; margin: 0; }
.banner img {
  display: block; width: 100%; height: auto; border-radius: var(--radius);
  border: 1px solid var(--hairline); box-shadow: var(--shadow);
}
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.btn {
  display: inline-flex; align-items: center; gap: 8px; padding: 12px 20px; border-radius: 999px;
  font-weight: 600; font-size: 0.95rem; text-decoration: none; border: 1px solid transparent;
}
.btn-primary { background: var(--orange); color: var(--orange-ink); box-shadow: var(--shadow); }
.btn-secondary { background: transparent; color: var(--ink); border-color: var(--hairline); }
.btn-primary:hover { filter: brightness(1.04); }
.btn-secondary:hover { border-color: var(--ink-secondary); }

/* One sample sequence follows the app's menu bar popover and takeover layouts. */
.showcase { padding-block: 48px; border-top: 1px solid var(--hairline); }
.showcase > .eyebrow { display: block; margin-bottom: 10px; }
.showcase h2 { font-size: clamp(1.5rem, 3vw, 1.9rem); margin-bottom: 24px; }
.showcase-scene { min-width: 0; margin: 0; }
.showcase-scene figcaption { margin: 8px 2px 0; color: var(--ink-secondary); font-size: 0.76rem; }
.menu-demo {
  position: relative; height: 400px; overflow: hidden;
  border: 1px solid rgba(28, 41, 84, 0.15); border-radius: var(--radius);
  background: radial-gradient(circle at 80% 110%, #3d537b 0, transparent 55%),
              linear-gradient(140deg, #11192d, #29364c);
  box-shadow: var(--shadow); color: #f0f5ff;
}
.mac-menubar {
  position: relative; z-index: 1; height: 30px; display: flex; align-items: center; gap: 13px; padding: 0 12px;
  background: rgba(5,10,18,0.92); border-bottom: 1px solid rgba(255,255,255,0.12);
  font: 600 11px/1 var(--body); white-space: nowrap;
}
.mac-menu-items { font-weight: 400; }
.mac-menu-spacer { flex: 1; }
.mac-status { display: flex; align-items: center; gap: 6px; max-width: 190px; padding: 3px 8px; border-radius: 999px; background: #55677e; overflow: hidden; animation: status-click 16s infinite; }
.mac-status img { width: 18px; height: 18px; flex: none; }
.mac-status span { overflow: hidden; text-overflow: ellipsis; }
.mac-clock { font-size: 10px; }
.mac-popover {
  position: absolute; z-index: 2; top: 41px; right: 11px; width: min(430px, calc(100% - 22px));
  border-radius: 18px; border: 1px solid rgba(196,207,226,0.4);
  background: rgba(45,51,61,0.96); box-shadow: 0 12px 28px rgba(0, 0, 0, 0.4);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  animation: popover-open 16s infinite;
}
.mac-popover::before { content: ""; position: absolute; top: -10px; right: 28%; width: 18px; height: 18px; transform: rotate(45deg); border-left: 1px solid rgba(196,207,226,0.4); border-top: 1px solid rgba(196,207,226,0.4); background: #2d333d; }
.demo-heading { display: flex; align-items: center; gap: 9px; padding: 10px 12px 7px; }
.demo-heading img { width: 28px; height: 28px; border-radius: 8px; }
.demo-heading strong { display: block; font-size: 12px; line-height: 1.2; }
.demo-heading small { display: block; font-size: 10px; color: #a6b5d3; line-height: 1.4; }
.demo-gear { margin-left: auto; color: #f0f5ff; font-size: 15px; }
.demo-events { display: grid; gap: 5px; padding: 0 9px; }
.demo-event {
  display: flex; align-items: flex-start; gap: 6px; min-height: 46px; padding: 8px;
  border: 1px solid rgba(196,207,226,0.24); border-radius: 12px; background: rgba(109,116,128,0.56);
  font-size: 10px; line-height: 1.3;
}
.demo-event-first { min-height: 66px; border-color: rgba(141,184,250,0.52); background: rgba(79,119,167,0.76); }
.demo-time { width: 33px; flex: none; color: #d5dce9; font-variant-numeric: tabular-nums; }
.demo-color { width: 3px; align-self: stretch; border-radius: 3px; flex: none; }
.demo-color.blue { background: #2e7af5; }
.demo-color.orange { background: #ffb03b; }
.demo-event-copy { display: grid; min-width: 0; flex: 1; }
.demo-event-copy strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11px; }
.demo-event-copy small { color: #c5d0e0; font-size: 9px; }
.demo-join { margin-left: auto; padding: 3px 8px; border-radius: 999px; background: #5d9fff; color: #101a2e; font-weight: 600; }
.demo-merge { display: block; margin-top: 4px; color: #d1e4ff; font-size: 9px; font-style: normal; font-weight: 600; white-space: nowrap; }
.demo-disclosure { display: inline-block; font-size: 14px; line-height: 7px; vertical-align: -1px; animation: disclosure-open 16s infinite; }
.demo-members { display: block; max-height: 0; overflow: hidden; opacity: 0; animation: members-expand 16s infinite; }
.demo-member { display: flex; align-items: center; justify-content: space-between; gap: 6px; padding-top: 5px; }
.demo-member b { display: block; font-size: 9px; font-weight: 600; }
.demo-member small { display: block; font-size: 8px; white-space: nowrap; }
.demo-split { flex: none; padding: 2px 6px; border: 1px solid rgba(220,231,246,0.5); border-radius: 5px; color: #f0f5ff; font-size: 8px; }
.demo-footer { padding: 7px 14px 9px; color: #c5d0e0; font-size: 9px; }

.demo-desktop { position: absolute; inset: 0; background: linear-gradient(145deg, #9fbbe5, #e7b6b3); }
.takeover-window { position: absolute; border-radius: 10px; background: rgba(255,255,255,0.75); border: 1px solid rgba(38,55,90,0.15); box-shadow: 0 8px 24px rgba(28,41,84,0.14); }
.takeover-window-back { top: 105px; left: 10%; width: 40%; height: 230px; }
.takeover-window-front { top: 75px; right: 8%; width: 50%; height: 260px; }
.demo-pointer { position: absolute; z-index: 3; width: 20px; height: 24px; filter: drop-shadow(0 2px 2px rgba(0,0,0,0.45)); }
.demo-pointer-open { animation: pointer-open-click 16s infinite; }
.demo-pointer-close { animation: pointer-close-click 16s infinite; }
.takeover-alert {
  position: absolute; z-index: 4; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  padding: 10px 14px 24px; text-align: center; color: white;
  background: rgba(13, 20, 41, 0.94); animation: takeover-appear 16s infinite;
}
.takeover-alert img { width: min(280px, 55%); height: auto; aspect-ratio: 464 / 222; object-fit: cover; border-radius: 14px; box-shadow: 0 6px 16px rgba(0,0,0,0.35); }
.takeover-countdown { display: block; margin-top: 6px; color: var(--orange); font-size: 46px; line-height: 1.1; font-weight: 600; text-align: center; }
.takeover-title { font-size: 23px; font-weight: 600; line-height: 1.1; }
.takeover-meta { color: #a6b5d3; font-size: 12px; }
.takeover-actions { display: flex; align-items: center; justify-content: center; gap: 8px; margin-top: 7px; font-size: 12px; font-weight: 600; }
.takeover-actions > span { padding: 5px 10px; border-radius: 999px; }
.takeover-join { background: #4d94ff; color: #091329; }
.takeover-snooze { border: 1px solid #7d8ca8; color: #f0f5ff; }
.takeover-dismiss { color: #a6b5d3; }
.takeover-hint { color: #8090ad; font-size: 10px; }

@keyframes status-click { 0%, 5%, 70%, 100% { background: #3a404b; } 8%, 58% { background: #55677e; } 62%, 66% { background: #7faaff; } }
@keyframes popover-open { 0%, 7%, 68%, 100% { opacity: 0; transform: translateY(-7px) scale(.98); } 12%, 60% { opacity: 1; transform: none; } }
@keyframes members-expand { 0%, 23%, 67%, 100% { max-height: 0; opacity: 0; } 32%, 60% { max-height: 80px; opacity: 1; } }
@keyframes disclosure-open { 0%, 23%, 67%, 100% { transform: rotate(0); } 32%, 60% { transform: rotate(90deg); } }
@keyframes pointer-open-click { 0%, 2%, 14%, 100% { opacity: 0; top: 110px; right: 95px; transform: scale(1); } 4% { opacity: 1; top: 75px; right: 125px; } 8% { opacity: 1; top: 15px; right: 190px; transform: scale(1); } 10% { opacity: 1; top: 15px; right: 190px; transform: scale(.78); } }
@keyframes pointer-close-click { 0%, 51%, 69%, 100% { opacity: 0; top: 150px; right: 75px; transform: scale(1); } 55% { opacity: 1; top: 90px; right: 120px; } 62% { opacity: 1; top: 15px; right: 190px; transform: scale(1); } 65% { opacity: 1; top: 15px; right: 190px; transform: scale(.78); } }
@keyframes takeover-appear { 0%, 69%, 100% { opacity: 0; } 75%, 95% { opacity: 1; } }
@media (prefers-reduced-motion: reduce) {
  .mac-status, .mac-popover, .demo-members, .demo-disclosure, .demo-pointer,
  .takeover-alert { animation: none; }
  .demo-pointer { display: none; }
  .mac-popover { left: 11px; right: auto; width: calc(50% - 22px); opacity: 1; }
  .demo-members { max-height: 80px; opacity: 1; }
  .demo-disclosure { transform: rotate(90deg); }
  .takeover-alert { inset: 41px 11px 11px auto; width: calc(50% - 11px); border-radius: 14px; opacity: 1; }
  .takeover-alert img { width: min(220px, 55%); }
  .takeover-countdown { font-size: 34px; }
  .takeover-title { font-size: 19px; }
}

/* --- feature grid --- */
.section { padding-block: 48px; border-top: 1px solid var(--hairline); }
.section h2 { font-size: clamp(1.5rem, 3vw, 1.9rem); margin-bottom: 0.4em; }
.section > .eyebrow { display: block; margin-bottom: 10px; }
.grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; margin-top: 24px;
}
.card {
  background: var(--cream-raised); border: 1px solid var(--hairline); border-radius: var(--radius);
  padding: 20px; box-shadow: var(--shadow);
}
.card .bar { width: 28px; height: 4px; border-radius: 2px; margin-bottom: 14px; }
.bar-orange { background: var(--orange); }
.bar-blue { background: var(--blue); }
.bar-red-orange { background: var(--red-orange); }
.card h3 { font-size: 1.02rem; margin-bottom: 6px; }
.card p { margin: 0; font-size: 0.92rem; color: var(--ink-secondary); }

/* --- data / settings-pane look --- */
.pane {
  background: var(--cream-raised); border: 1px solid var(--hairline); border-radius: var(--radius);
  box-shadow: var(--shadow); overflow: hidden; margin-top: 24px;
}
.pane-row {
  display: flex; gap: 14px; align-items: flex-start; padding: 16px 20px; border-top: 1px solid var(--hairline);
}
.pane-row:first-child { border-top: none; }
.pane-row .icon {
  width: 30px; height: 30px; border-radius: 8px; flex: none; display: grid; place-items: center;
  font-family: var(--mono); font-size: 0.8rem; font-weight: 700;
}
.pane-row .icon.g { background: var(--pill); color: var(--blue); }
.pane-row .icon.a { background: var(--pill); color: var(--ink); }
.pane-row .icon.i { background: rgba(255, 176, 59, 0.22); color: var(--orange-ink); }
.pane-row h3 { font-size: 0.95rem; margin-bottom: 3px; }
.pane-row p { margin: 0; font-size: 0.88rem; color: var(--ink-secondary); }
.pane-row .badge {
  font-family: var(--mono); font-size: 0.68rem; letter-spacing: 0.06em; text-transform: uppercase;
  padding: 3px 8px; border-radius: 999px; background: var(--pill); color: var(--ink-secondary); flex: none;
}

.callout {
  background: var(--pill); border-radius: var(--radius-sm); padding: 16px 18px; margin-top: 20px;
  font-size: 0.9rem; color: var(--ink);
}
.callout a { font-weight: 600; }

footer {
  border-top: 1px solid var(--hairline); padding-block: 32px 48px; margin-top: 16px;
  display: flex; flex-wrap: wrap; gap: 20px; align-items: center; justify-content: space-between;
  color: var(--ink-secondary); font-size: 0.86rem;
}
footer .links { display: flex; gap: 18px; }
footer a { color: var(--ink-secondary); text-decoration: none; }
footer a:hover { color: var(--ink); }

/* --- legal page --- */
.legal-spaced { padding-block: 48px 64px; }
.legal h1 { font-size: clamp(1.8rem, 4vw, 2.4rem); margin-bottom: 6px; }
.legal .updated { color: var(--ink-secondary); font-size: 0.88rem; margin-bottom: 2.5rem; }
.legal h2 {
  font-size: 1.15rem; margin-top: 2.4em; margin-bottom: 0.6em; padding-top: 1.2em;
  border-top: 1px solid var(--hairline);
}
.legal ul { padding-left: 1.2em; margin: 0 0 1em; }
.legal li { margin-bottom: 0.5em; max-width: 62ch; }
.legal strong { color: var(--ink); }
.legal .scope-list code {
  font-family: var(--mono); font-size: 0.82em; background: var(--pill); padding: 2px 6px; border-radius: 5px;
}

@media (max-width: 640px) {
  .nav .links { gap: 1rem; font-size: 0.85rem; }
  .hero { padding-block: 24px 32px; gap: 25px; }
  .showcase { padding-block: 32px; }
  .menu-demo { width: 100%; height: 400px; }
  .mac-menu-items { display: none; }
  .mac-popover::before { right: 38%; }
  .demo-merge { white-space: normal; }
  .takeover-alert img { width: min(220px, 65%); }
  .takeover-countdown { font-size: 34px; }
  .takeover-title { font-size: 19px; }
}

@media (prefers-reduced-motion: reduce) and (max-width: 900px) {
  .menu-demo { height: 720px; }
  .mac-popover { left: 11px; right: 11px; width: auto; }
  .takeover-alert { inset: auto 11px 11px; width: auto; height: 290px; }
}
