/* Clocktower website styles. Tokens mirror CTColors.light in
   Packages/ClocktowerDesign/Sources/ClocktowerDesign/CTColors.swift; keep in sync by hand. */
@font-face {
  font-family: "Gabarito";
  src: url("assets/fonts/gabarito-var.ttf") format("truetype");
  font-weight: 400 800; font-display: swap; font-style: normal;
}
@font-face {
  font-family: "Spline Sans Mono";
  src: url("assets/fonts/spline-sans-mono-var.ttf") format("truetype");
  font-weight: 400 500; font-display: swap; font-style: normal;
}

:root {
  --page:#E9E4DB; --bg:#F7F4EE; --surface:#FFFFFF; --surface2:#EFEAE1;
  --ink:#27221B; --muted:#8C8376; --hairline:rgba(39,34,27,.11);
  --ground:#D8D1C5; --accent:#C9704F;
  --p1:#4A90D9; --p2:#50B86C; --p3:#E8943A; --p4:#9B6CD4;
  --maxw: 1080px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: "Gabarito", system-ui, sans-serif; line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
img { max-width: 100%; height: auto; display: block; }
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
.mono { font-family: "Spline Sans Mono", ui-monospace, monospace; }

/* Nav */
.site-nav { display:flex; align-items:center; justify-content:space-between;
  max-width: var(--maxw); margin: 0 auto; padding: 18px 24px; }
.site-nav .brand { display:inline-flex; align-items:center; gap:9px; font-weight: 800; font-size: 20px; letter-spacing: -.3px; text-decoration:none; }
.brand-icon { width:27px; height:27px; border-radius:7px; display:block; }
.site-nav .links { display:flex; gap:20px; align-items:center; font-size:15px; color:var(--muted); }
.site-nav .links a { text-decoration:none; }
.chip { font-family:"Spline Sans Mono",monospace; font-size:12px; letter-spacing:.4px;
  background:var(--surface2); color:var(--muted); padding:5px 11px; border-radius:20px; }

/* Footer */
.site-footer { border-top:1px solid var(--hairline); margin-top:8px; }
.site-footer .row { display:flex; align-items:center; justify-content:space-between;
  flex-wrap:wrap; gap:12px; padding:24px; max-width:var(--maxw); margin:0 auto; font-size:14px; color:var(--muted); }
.site-footer .row .brand { font-weight:800; color:var(--ink); }
.site-footer .row .links { display:flex; gap:18px; flex-wrap:wrap; }
.site-footer .row a { text-decoration:none; }

/* Buttons / CTA */
.cta { display:inline-flex; align-items:center; gap:8px; background:var(--ink); color:var(--bg);
  font-weight:600; font-size:15px; padding:12px 20px; border-radius:12px; text-decoration:none; }
.cta.is-static { cursor:default; }
.cta-badge { display:inline-block; line-height:0; }
.cta-badge img { height:48px; width:auto; display:block; }
.cta-badge:hover { opacity:.85; }
.nav-download { font-weight:600; text-decoration:none; }

/* Hero */
.hero { background: linear-gradient(160deg, var(--bg), #ECE6DC); }
.hero .inner { display:flex; gap:40px; align-items:center; padding:56px 24px 64px;
  max-width:var(--maxw); margin:0 auto; }
.hero .copy { flex:1.15; }
.hero h1 { font-weight:800; font-size:clamp(40px, 6vw, 64px); line-height:.98; letter-spacing:-1.4px; margin:0 0 16px; }
.hero h1 .accent { color:var(--accent); }
.hero .lead { font-size:18px; color:var(--muted); max-width:34ch; margin:0 0 24px; }
.hero .art { flex:1; display:flex; justify-content:center; }

/* Device frame (CSS bezel around a raw screenshot) */
.device { background:#111; border-radius:38px; padding:10px; width:300px; max-width:78vw;
  box-shadow:0 30px 70px rgba(39,34,27,.28); }
.device img, .device video { border-radius:28px; width:100%; height:auto; display:block; }

/* Feature grid */
.section { padding:64px 0; }
.label { font-family:"Spline Sans Mono",monospace; font-size:13px; letter-spacing:.6px;
  text-transform:uppercase; color:var(--accent); margin:0 0 16px; }
.grid3 { display:grid; grid-template-columns:repeat(3,1fr); gap:20px; }
.fcard { background:var(--surface); border:1px solid var(--hairline); border-radius:16px; padding:24px; }
.fcard .ic { width:38px; height:38px; border-radius:11px; margin-bottom:14px;
  display:flex; align-items:center; justify-content:center; }
.fcard .ic svg { width:20px; height:20px; }
.fcard h3 { margin:0 0 8px; font-size:19px; font-weight:700; }
.fcard p { margin:0; color:var(--muted); }

/* Alternating rows */
.rows { background:var(--surface2); }
.rows .inner { max-width:var(--maxw); margin:0 auto; padding:56px 24px; }
.frow { display:flex; gap:40px; align-items:center; padding:28px 0; }
.frow.alt { flex-direction:row-reverse; }
.frow .shot { flex:0 0 46%; }
/* Generous radius so the raw phone screenshots read like an iPhone screen,
   roughly matching the device's display-corner proportions. */
.frow .shot img { border-radius:44px; border:1px solid var(--hairline);
  box-shadow:0 14px 34px rgba(39,34,27,.12); }
.frow .txt { flex:1; }
.frow h2 { font-size:clamp(24px,3.4vw,30px); font-weight:800; letter-spacing:-.5px; margin:0 0 10px; }
.frow .txt p { color:var(--muted); font-size:16px; margin:0; }

/* Platforms showcase (iPhone, iPad, Mac) */
.platforms { text-align:center; }
.platforms h2 { font-size:clamp(26px,3.6vw,34px); font-weight:800; letter-spacing:-.5px; margin:0 0 12px; }
.platforms .plead { color:var(--muted); font-size:17px; max-width:62ch; margin:0 auto 32px; }
.platform-shot { width:100%; max-width:960px; border-radius:24px; border:1px solid var(--hairline);
  box-shadow:0 22px 54px rgba(39,34,27,.16); }

/* Apple Watch: a single gauge screenshot in a visibly metal case, tucked over the
   bottom-left corner of the platform screenshot. The stage anchors the absolute watch. */
.platform-stage { position:relative; display:inline-block; width:100%; max-width:960px; }
.watch { position:absolute; left:-2.5%; bottom:-7%; z-index:2;
  width:clamp(122px,18vw,170px);
  background:linear-gradient(150deg,#4c4c50,#1c1c1e); padding:11px 10px; border-radius:34px;
  box-shadow:0 20px 40px rgba(39,34,27,.30), inset 0 1px 1px rgba(255,255,255,.22),
    inset 0 0 0 1px rgba(0,0,0,.4); }
.watch img { display:block; width:100%; border-radius:23px; }
/* Digital Crown nub on the right edge, to read clearly as Apple Watch. */
.watch::after { content:""; position:absolute; right:-4px; top:34%; width:6px; height:30px;
  border-radius:3px; background:linear-gradient(#5a5a5e,#2c2c2e); box-shadow:0 1px 2px rgba(0,0,0,.4); }

/* Closing call to action */
.closing { background:linear-gradient(160deg, var(--bg), #ECE6DC); }
.closing .wrap { text-align:center; padding-top:8px; padding-bottom:8px; }
.closing-icon { width:84px; height:84px; border-radius:20px; margin:0 auto 18px;
  box-shadow:0 16px 36px rgba(39,34,27,.22); }
.closing h2 { font-size:clamp(28px,4vw,40px); font-weight:800; letter-spacing:-.7px; margin:0 0 12px; }
.closing .plead { color:var(--muted); font-size:17px; max-width:52ch; margin:0 auto 26px; }

/* Support / contact */
.support { text-align:center; }
.support h2 { font-size:clamp(26px,3.6vw,34px); font-weight:800; letter-spacing:-.5px; margin:0 0 12px; }
.support p { color:var(--muted); font-size:17px; max-width:48ch; margin:0 auto 22px; }
.support-email { display:inline-block; font-weight:700; font-size:18px; color:var(--accent); text-decoration:none; }
.support-email:hover { text-decoration:underline; }

/* Legal pages */
.legal { max-width:760px; margin:0 auto; padding:48px 24px 72px; }
.legal h1 { font-size:34px; font-weight:800; letter-spacing:-.6px; margin:0 0 6px; }
.legal .meta { color:var(--muted); font-size:14px; margin:0 0 28px; }
.legal h2 { font-size:20px; font-weight:700; margin:32px 0 8px; }
.legal p, .legal li { color:var(--ink); font-size:16px; }
.legal a { color:var(--accent); }
.legal .note { background:var(--surface2); border:1px solid var(--hairline); border-radius:12px;
  padding:14px 16px; color:var(--muted); font-size:14px; }

/* Cornerstone article pages */
.article { max-width:752px; margin:0 auto; padding:34px 24px 72px; }
.article .crumb { font-size:14px; color:var(--muted); text-decoration:none; }
.article .crumb:hover { color:var(--accent); }
.article h1 { font-size:clamp(31px,5vw,44px); font-weight:800; letter-spacing:-.8px; line-height:1.06; margin:16px 0 14px; }
.article .standfirst { font-size:20px; color:var(--muted); line-height:1.5; margin:0 0 8px; }
.article h2 { font-size:25px; font-weight:800; letter-spacing:-.3px; margin:42px 0 10px; }
.article h3 { font-size:19px; font-weight:700; margin:26px 0 4px; }
.article p, .article li { font-size:17px; color:var(--ink); line-height:1.65; }
.article > p, .article .body p { margin:0 0 16px; }
.article ul { margin:2px 0 18px; padding-left:22px; }
.article li { margin:0 0 8px; }
.article a { color:var(--accent); }
.article .device { margin:28px auto; }
.article .device + figcaption { text-align:center; color:var(--muted); font-size:14px; margin:-14px 0 28px; }
/* In-flow Apple Watch frame for article hero shots (static, centered).
   Distinct from the absolutely-positioned homepage .watch overlay. */
.article .watch-figure { margin:28px auto; width:max-content; }
.article .watch-figure .watch-case { position:relative; margin:0 auto;
  width:clamp(150px,42vw,210px);
  background:linear-gradient(150deg,#4c4c50,#1c1c1e); padding:13px 12px; border-radius:42px;
  box-shadow:0 20px 40px rgba(39,34,27,.30), inset 0 1px 1px rgba(255,255,255,.22),
    inset 0 0 0 1px rgba(0,0,0,.4); }
.article .watch-figure .watch-case img { display:block; width:100%; border-radius:28px; }
/* Digital Crown nub on the right edge, to read clearly as Apple Watch. */
.article .watch-figure .watch-case::after { content:""; position:absolute; right:-4px; top:34%;
  width:6px; height:30px; border-radius:3px; background:linear-gradient(#5a5a5e,#2c2c2e);
  box-shadow:0 1px 2px rgba(0,0,0,.4); }
.article .watch-figure + figcaption { text-align:center; color:var(--muted);
  font-size:14px; margin:14px 0 28px; }
.article .callout { background:var(--surface2); border:1px solid var(--hairline);
  border-radius:14px; padding:18px 20px; margin:26px 0; }
.article .callout p { margin:0; font-size:16px; }
.article .cta-row { margin:32px 0 6px; }

/* Comparison table */
.cmp { width:100%; border-collapse:collapse; margin:24px 0; font-size:16px; }
.cmp th, .cmp td { text-align:left; padding:12px 14px; border-bottom:1px solid var(--hairline); vertical-align:top; line-height:1.5; }
.cmp thead th { font-weight:800; color:var(--ink); border-bottom:2px solid var(--hairline); }
.cmp td:first-child, .cmp th:first-child { color:var(--muted); width:36%; }

/* Cross-links between cornerstone pages */
.crosslinks { margin-top:50px; border-top:1px solid var(--hairline); padding-top:22px; }
.crosslinks a { display:block; color:var(--ink); text-decoration:none; font-weight:700;
  font-size:18px; padding:13px 0; border-bottom:1px solid var(--hairline); }
.crosslinks a:hover { color:var(--accent); }
.crosslinks a span { display:block; font-weight:400; font-size:14px; color:var(--muted); margin-top:3px; }

/* FAQ */
.faq-list { margin-top:24px; border-top:1px solid var(--hairline); }
.faq-list details { border-bottom:1px solid var(--hairline); }
.faq-list summary { cursor:pointer; list-style:none; padding:18px 0;
  font-weight:700; font-size:19px; color:var(--ink);
  display:flex; justify-content:space-between; align-items:center; gap:16px; }
.faq-list summary::-webkit-details-marker { display:none; }
.faq-list summary::after { content:"+"; color:var(--accent); font-size:26px; line-height:1; flex:none; }
.faq-list details[open] summary::after { content:"\2013"; }
.faq-list details p { margin:0 0 20px; color:var(--muted); font-size:16px; max-width:64ch; }

@media (max-width: 820px) {
  .hero .inner, .frow, .frow.alt { flex-direction:column; }
  .grid3 { grid-template-columns:1fr; }
  .frow .shot { flex:none; width:100%; }
  .site-nav .links .nav-features { display:none; }
}
