/* Demaratos website. Shared by every language. Fonts are served from this
   site (no third-party requests), subset to Latin. */

@font-face {
  font-family: "EB Garamond";
  src: url("fonts/EBGaramond-latin.woff2") format("woff2");
  font-weight: 400 800;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Source Sans 3";
  src: url("fonts/SourceSans3-latin.woff2") format("woff2");
  font-weight: 200 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #070c16;
  --bg2: #0c1424;
  --card: rgba(255, 255, 255, 0.04);
  --card-b: rgba(255, 255, 255, 0.09);
  --text: #ece6da;
  --muted: #a3adbf;
  --gold: #e6c784;
  --gold2: #b98b45;
  --display: "EB Garamond", Garamond, Georgia, serif;
  --body: "Source Sans 3", -apple-system, "Segoe UI", system-ui, sans-serif;
  --r: 18px;
  --gutter: max(16px, env(safe-area-inset-left));
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 76px; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 1.0625rem/1.6 var(--body);
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--gold); text-underline-offset: 3px; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; border-radius: 6px; }
h1, h2, h3 { font-family: var(--display); font-weight: 600; line-height: 1.15; margin: 0; text-wrap: balance; }
p { margin: 0; }

.skip {
  position: absolute; left: -999px; top: 8px; z-index: 100;
  background: var(--gold); color: var(--bg); padding: 8px 14px; border-radius: 8px;
}
.skip:focus { left: 8px; }

.wrap {
  width: 100%; max-width: 72rem; margin: 0 auto;
  padding-left: var(--gutter);
  padding-right: max(16px, env(safe-area-inset-right));
}
section { padding: 5rem 0; }
@media (max-width: 40rem) { section { padding: 3.75rem 0; } }

.label {
  display: inline-block; margin-bottom: 0.9rem;
  font: 600 0.8125rem/1 var(--body); letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--gold);
}
.h2 { font-size: clamp(1.9rem, 1.3rem + 2.6vw, 3rem); max-width: 22ch; }
.sub { margin-top: 1rem; color: var(--muted); font-size: 1.125rem; max-width: 40rem; }

/* ---------- Top bar ---------- */
.bar {
  position: sticky; top: 0; z-index: 50;
  padding-top: env(safe-area-inset-top);
  background: rgba(7, 12, 22, 0.82);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  backdrop-filter: blur(14px) saturate(140%);
  border-bottom: 1px solid var(--card-b);
}
.bar .wrap { display: flex; align-items: center; gap: 1rem; min-height: 60px; }
.brand {
  display: flex; align-items: center; gap: 0.6rem; min-height: 44px;
  color: var(--text); text-decoration: none; font: 600 1.4rem var(--display);
}
.brand img { width: 32px; height: 32px; border-radius: 8px; }
.bar nav { display: none; margin-left: auto; gap: 1.5rem; }
.bar nav a { color: var(--muted); text-decoration: none; font-weight: 500; padding: 10px 0; }
.bar nav a:hover { color: var(--text); }
@media (min-width: 60rem) { .bar nav { display: flex; } }

/* ---------- Hero ---------- */
/* The first screen works as a page of its own: logo in the middle, what
   Demaratos does, where it is coming. Everything else is below. */
.hero {
  display: flex; align-items: center;
  min-height: calc(100svh - 61px - env(safe-area-inset-top));
  padding: 1.75rem 0 1.5rem;
  background: radial-gradient(50rem 32rem at 50% 18%, rgba(230, 199, 132, 0.13), transparent 65%);
}
.hero-in { display: flex; flex-direction: column; align-items: center; text-align: center; }
.hero h1 { font-size: clamp(2.4rem, 1.5rem + 4.2vw, 4.4rem); max-width: 16ch; }
.lead { margin: 1.25rem auto 0; font-size: clamp(1.125rem, 1rem + 0.5vw, 1.3rem); color: var(--muted); max-width: 34rem; }
.chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.5rem; margin: 1.5rem 0 0; padding: 0; list-style: none; }
.chips li {
  padding: 0.4rem 0.85rem; border-radius: 999px; font-weight: 600; font-size: 0.9375rem;
  border: 1px solid rgba(230, 199, 132, 0.35); color: var(--gold); background: rgba(230, 199, 132, 0.06);
}
.stores { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.75rem; margin-top: 1.5rem; }
.store {
  display: inline-flex; flex-direction: column; justify-content: center; min-height: 52px; min-width: 9.5rem;
  padding: 0.5rem 1.1rem; border-radius: 12px; border: 1px solid var(--card-b); background: var(--card);
}
.store small { color: var(--muted); font-size: 0.8125rem; line-height: 1.2; }
.store strong { font-size: 1.0625rem; line-height: 1.3; }
.hero-art { position: relative; width: clamp(7rem, 5rem + 10vw, 11rem); margin-bottom: 1.5rem; }
.hero-art img { width: 100%; border-radius: 22%; box-shadow: 0 24px 64px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(230, 199, 132, 0.25); }
.more {
  display: inline-flex; align-items: center; gap: 0.4rem; min-height: 44px; margin-top: 1rem;
  color: var(--muted); text-decoration: none; font-weight: 600;
}
.more:hover { color: var(--text); }
.hero-art::before {
  content: ""; position: absolute; inset: -18%; z-index: -1; border-radius: 50%;
  background: radial-gradient(closest-side, rgba(230, 199, 132, 0.22), transparent);
}

/* ---------- Cards and grids ---------- */
/* One column on phones; from small tablets three (or two) at once, so no
   card is left alone on the last row. */
.grid { display: grid; gap: 1rem; margin-top: 2.5rem; grid-template-columns: 1fr; }
@media (min-width: 46rem) {
  .grid-3 { grid-template-columns: repeat(3, 1fr); }
  .grid-2 { grid-template-columns: repeat(2, 1fr); }
}
.card { padding: 1.5rem; border-radius: var(--r); background: var(--card); border: 1px solid var(--card-b); }
.card h3 { font-size: 1.45rem; margin-bottom: 0.5rem; }
.card p { color: var(--muted); }
.card .icon { width: 40px; height: 40px; margin-bottom: 1rem; color: var(--gold); }
.alt { background: var(--bg2); }

/* ---------- Why no cloud ---------- */
.breach { display: grid; gap: 2rem; margin-top: 2.5rem; align-items: start; }
@media (min-width: 56rem) { .breach { grid-template-columns: 0.9fr 1.1fr; } }
.stat { padding: 2rem; border-radius: var(--r); border: 1px solid rgba(230, 199, 132, 0.3); background: rgba(230, 199, 132, 0.05); }
.stat .num { font: 600 clamp(3.5rem, 2.5rem + 5vw, 5.5rem)/1 var(--display); color: var(--gold); }
.stat .cap { margin-top: 0.6rem; font-size: 1.125rem; }
.stat .date { margin-top: 0.4rem; color: var(--muted); font-size: 0.9375rem; }
.prose p + p { margin-top: 1rem; }
.prose p { color: var(--muted); font-size: 1.125rem; }
.prose strong { color: var(--text); }
.src { margin-top: 1.25rem; font-size: 0.9375rem; color: var(--muted); }
.versus { display: grid; gap: 1rem; margin-top: 2rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 17rem), 1fr)); }
.versus .card.good { border-color: rgba(230, 199, 132, 0.4); }

/* ---------- Steps ---------- */
.steps { counter-reset: step; list-style: none; padding: 0; }
.steps li { counter-increment: step; }
.steps li h3::before {
  content: counter(step); display: inline-grid; place-items: center; width: 2rem; height: 2rem; margin-right: 0.6rem;
  border-radius: 50%; background: var(--gold); color: var(--bg); font: 700 1rem var(--body); vertical-align: 0.2em;
}
.note { margin-top: 2rem; padding: 1.25rem 1.5rem; border-left: 3px solid var(--gold); background: var(--card); border-radius: 0 12px 12px 0; color: var(--muted); max-width: 46rem; }
.note strong { color: var(--text); }

/* ---------- Safety ---------- */
.checks { list-style: none; padding: 0; margin: 2rem 0 0; display: grid; gap: 0.9rem; max-width: 46rem; }
.checks li { position: relative; padding-left: 2rem; color: var(--muted); font-size: 1.0625rem; }
.checks li strong { color: var(--text); }
.checks li::before { content: "✓"; position: absolute; left: 0; top: 0; color: var(--gold); font-weight: 700; }

/* ---------- Passphrase ---------- */
.pp { display: grid; gap: 1rem; margin-top: 2rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), 1fr)); max-width: 46rem; }
.pp .card .big { font: 600 2.4rem/1.1 var(--display); color: var(--text); font-variant-numeric: lining-nums; }
.pp .card.good .big { color: var(--gold); }

/* ---------- FAQ ---------- */
.faq { margin-top: 2rem; max-width: 50rem; }
.faq details { border-bottom: 1px solid var(--card-b); }
.faq summary {
  cursor: pointer; list-style: none; display: flex; justify-content: space-between; gap: 1rem; align-items: center;
  min-height: 56px; padding: 0.9rem 0; font-weight: 600; font-size: 1.125rem;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--gold); font-size: 1.5rem; line-height: 1; flex: none; }
.faq details[open] summary::after { content: "–"; }
.faq .a { padding: 0 0 1.25rem; color: var(--muted); }
.faq .a p + p { margin-top: 0.75rem; }

/* ---------- Footer ---------- */
footer { padding: 3rem 0 calc(3rem + env(safe-area-inset-bottom)); border-top: 1px solid var(--card-b); color: var(--muted); font-size: 0.9375rem; }
footer .wrap { display: grid; gap: 1rem; }
footer .langs { display: flex; flex-wrap: wrap; gap: 0.25rem 1rem; }
footer .langs span[aria-current] { color: var(--text); font-weight: 600; }

.story { margin-top: 1rem; max-width: 40rem; }
footer .langs a { color: var(--muted); }
footer .langs a:hover { color: var(--text); }

/* ---------- Guide cards on the home page ---------- */
.guide { display: block; color: inherit; text-decoration: none; }
.guide h3 { color: var(--text); }
.guide:hover { border-color: rgba(230, 199, 132, 0.45); }
@media (prefers-reduced-motion: no-preference) { .guide { transition: border-color 0.2s; } }

/* ---------- Guide pages ---------- */
.article { max-width: 44rem; }
.article h1 { font-size: clamp(2.1rem, 1.4rem + 3vw, 3.2rem); }
.article .intro { margin-top: 1.25rem; color: var(--muted); font-size: 1.1875rem; }
.article h2 { font-size: clamp(1.5rem, 1.2rem + 1.2vw, 2rem); margin: 2.75rem 0 0.9rem; }
.article p, .article li { color: var(--muted); }
.article p + p { margin-top: 1rem; }
.article strong { color: var(--text); }
.article ol, .article ul { margin: 1rem 0 0; padding-left: 1.4rem; display: grid; gap: 0.55rem; }
.article ol + p, .article ul + p { margin-top: 1rem; }
.article .note { margin-top: 1.5rem; }
.crumbs { margin-bottom: 1.25rem; font-size: 0.9375rem; color: var(--muted); }
.crumbs a { color: var(--muted); }
.updated { margin-top: 0.75rem; font-size: 0.9375rem; color: var(--muted); }
.cta { margin-top: 3rem; padding: 1.75rem; border-radius: var(--r); border: 1px solid rgba(230, 199, 132, 0.35); background: rgba(230, 199, 132, 0.05); }
.cta h2 { margin-top: 0; }
.related { margin-top: 2.5rem; }
.related ul { list-style: none; padding: 0; }
