/* Cornice website: home and support pages (privacy and live keep their own inline styles). */
:root {
  --navy: #0a1e36;
  --navy-2: #102a4a;
  --sky: #6cc5f7;
  --slate: #8e9fb3;
  --amber: #f2a900;
  --bg: #f4f7fa;
  --card: #ffffff;
  --text: #0e2233;
  --muted: #55687a;
  --brand: #155e95;
  --line: rgba(14, 34, 51, 0.12);
  --shadow: 0 1px 2px rgba(10, 30, 54, 0.06), 0 8px 24px rgba(10, 30, 54, 0.06);
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #07172a;
    --card: #0f2540;
    --text: #e8eef5;
    --muted: #9fb1c4;
    --brand: #6fb1e8;
    --line: rgba(232, 238, 245, 0.13);
    --shadow: none;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 17px/1.6 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
}
a { color: var(--brand); }
:where(a, button, summary):focus-visible { outline: 3px solid var(--brand); outline-offset: 2px; border-radius: 8px; }
.hero :focus-visible, .page-head :focus-visible { outline-color: var(--sky); }
img, svg { max-width: 100%; }
.wrap { max-width: 1080px; margin: 0 auto; padding: 0 max(16px, env(safe-area-inset-right)) 0 max(16px, env(safe-area-inset-left)); }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 8px; z-index: 10; background: var(--card); padding: 8px 12px; border-radius: 8px; }

/* Top bar */
.top { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 0; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: inherit; text-decoration: none; font-weight: 700; font-size: 20px; letter-spacing: 0.2px; }
.brand img { width: 36px; height: 36px; border-radius: 9px; }
.top nav { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.top nav a, .lang-switch a {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 14px; border-radius: 22px;
  color: inherit; text-decoration: none; font-size: 15px;
}
.top nav a:hover { background: rgba(255, 255, 255, 0.08); }
.lang-switch { display: inline-flex; border: 1px solid currentColor; border-radius: 22px; opacity: 0.9; }
.lang-switch a { min-height: 44px; min-width: 44px; justify-content: center; padding: 0 12px; }
.lang-switch a[aria-current="true"] { background: var(--sky); color: var(--navy); font-weight: 600; }

/* Hero (always dark: the icon's own navy) */
.hero {
  color: #fff;
  background:
    radial-gradient(1200px 500px at 85% -10%, rgba(108, 197, 247, 0.22), transparent 60%),
    linear-gradient(180deg, var(--navy) 0%, var(--navy-2) 100%);
  overflow: hidden;
}
.hero .top { color: #fff; }
.hero-body { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 32px; align-items: center; padding: 40px 0 0; }
.hero h1 { font-size: clamp(34px, 6vw, 56px); line-height: 1.08; margin: 0 0 16px; letter-spacing: -0.5px; }
.hero h1 em { font-style: normal; color: var(--sky); }
.hero p.lead { font-size: clamp(18px, 2.2vw, 21px); color: #c9d6e4; margin: 0 0 24px; max-width: 34em; }
.cta { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; margin-bottom: 40px; }
.btn {
  display: inline-flex; align-items: center; gap: 8px; min-height: 52px; padding: 0 22px; border-radius: 26px;
  font-weight: 600; text-decoration: none; border: 1px solid transparent;
}
.btn.primary { background: var(--sky); color: var(--navy); }
.btn.ghost { color: #fff; border-color: rgba(255, 255, 255, 0.35); }
.soon { display: inline-flex; align-items: center; gap: 8px; color: #c9d6e4; font-size: 15px; }
.soon::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--amber); }
.hero-art { align-self: end; }
.hero-art svg { display: block; width: 100%; height: auto; }

/* Sections */
section.block { padding: 56px 0 8px; }
section.block h2 { font-size: clamp(26px, 3.4vw, 34px); line-height: 1.2; margin: 0 0 8px; letter-spacing: -0.3px; }
section.block > .wrap > p.sub { color: var(--muted); margin: 0 0 24px; max-width: 40em; }
.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 20px; box-shadow: var(--shadow);
}
.card h3 { font-size: 18px; margin: 12px 0 6px; line-height: 1.3; }
.card p { margin: 0; color: var(--muted); font-size: 16px; }
.icon {
  width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center;
  background: rgba(108, 197, 247, 0.16); color: var(--brand);
}
.icon svg { width: 24px; height: 24px; }
.card.sos .icon { background: rgba(214, 48, 49, 0.13); color: #d63031; }
@media (prefers-color-scheme: dark) { .card.sos .icon { color: #ff7b7b; } }
.note { font-size: 14px; color: var(--muted); margin-top: 8px; }

.split { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.promise { list-style: none; padding: 0; margin: 0; }
.promise li { display: flex; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); }
.promise li:first-child { border-top: 0; }
.promise svg { flex: none; width: 22px; height: 22px; color: var(--brand); margin-top: 3px; }

/* FAQ */
details { background: var(--card); border: 1px solid var(--line); border-radius: 14px; margin: 10px 0; box-shadow: var(--shadow); }
summary { cursor: pointer; padding: 14px 18px; min-height: 52px; font-weight: 600; list-style: none; display: flex; justify-content: space-between; gap: 12px; align-items: center; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+" / ""; font-size: 22px; color: var(--muted); flex: none; }
details[open] summary::after { content: "−" / ""; }
details > div { padding: 0 18px 14px; color: var(--muted); }
details > div p { margin: 0 0 8px; }
.contact { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }

/* Footer */
footer { margin-top: 64px; padding: 28px 0 calc(28px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); color: var(--muted); font-size: 15px; }
footer .row { display: flex; flex-wrap: wrap; gap: 8px 20px; align-items: center; justify-content: space-between; }
footer nav { display: flex; flex-wrap: wrap; gap: 4px 16px; }
footer nav a { color: inherit; min-height: 44px; display: inline-flex; align-items: center; }
footer .credits { margin-top: 10px; font-size: 13px; }

/* Plain page header (support) */
.page-head { background: linear-gradient(180deg, var(--navy) 0%, var(--navy-2) 100%); color: #fff; padding-bottom: 32px; }
.page-head .top { color: #fff; }
.page-head h1 { font-size: clamp(30px, 5vw, 44px); margin: 24px 0 6px; line-height: 1.15; }
.page-head p { color: #c9d6e4; margin: 0; max-width: 36em; }

@media (max-width: 860px) {
  .hero-body { grid-template-columns: 1fr; padding-top: 24px; }
  .hero-art { max-width: 380px; margin: -12px auto 0; }
  .grid { grid-template-columns: repeat(2, 1fr); }
  .split { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  body { font-size: 16px; }
  .grid { grid-template-columns: 1fr; }
  .top nav a.hide-sm { display: none; }
  .cta .btn { flex: 1 1 auto; justify-content: center; }
}
@media (prefers-reduced-motion: no-preference) {
  .track { stroke-dasharray: 900; stroke-dashoffset: 900; animation: draw 2.4s ease-out 0.3s forwards; }
  @keyframes draw { to { stroke-dashoffset: 0; } }
}
