/* Self-hosted Readex Pro: no third-party font request. latin-ext carries š ž. */
@font-face {
  font-family: "Readex Pro";
  font-style: normal;
  font-weight: 160 700;
  font-display: swap;
  src: url("/assets/fonts/readex-pro-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Readex Pro";
  font-style: normal;
  font-weight: 160 700;
  font-display: swap;
  src: url("/assets/fonts/readex-pro-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --hero: #041143;
  --navy: #0c1d3b;
  --orange: #e45e25;
  --orange-text: #c4491a; /* the orange, darkened to read as text on white */
  --steel: #3b6ea5;
  --ice: #9ecce5;
  --gray: #e2e4e94d;
  --white: #fff;
  --radius: 2px;
  --gutter: clamp(16px, 4vw, 32px);
  font-family: "Readex Pro", system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--white);
  color: var(--navy);
  font: 400 1.0625rem/1.65 "Readex Pro", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, p, ol, ul, pre, fieldset { margin: 0; padding: 0; }
pre, code, output { font-family: inherit; }
a { color: inherit; text-underline-offset: 0.2em; }
:focus-visible { outline: 3px solid var(--orange); outline-offset: 3px; }

.wrap { width: 100%; max-width: 1080px; margin-inline: auto; padding-inline: var(--gutter); }
.sr-only {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip {
  position: absolute; left: var(--gutter); top: -100px; z-index: 10;
  background: var(--white); color: var(--navy); padding: 10px 16px; font-weight: 600;
}
.skip:focus { top: 12px; }

/* ---------- buttons ---------- */
.btn {
  display: inline-block; cursor: pointer; text-decoration: none; text-align: center;
  font: 700 1.2rem/1.2 "Readex Pro", system-ui, sans-serif; /* large + bold: white on orange stays AA */
  background: var(--orange); color: var(--white);
  border: 2px solid var(--orange); border-radius: var(--radius);
  padding: 14px 26px;
  transition: background-color 0.15s, border-color 0.15s, color 0.15s;
}
.btn:hover { background: #cf5120; border-color: #cf5120; }
.btn-ghost { background: transparent; color: var(--navy); border-color: var(--navy); }
.btn-ghost:hover { background: var(--navy); border-color: var(--navy); color: var(--white); }
.btn-small { font-size: 1rem; padding: 8px 16px; }
.btn-lg { font-size: 1.25rem; padding: 18px 32px; }

/* ---------- hero ---------- */
.hero { position: relative; background: var(--hero); color: var(--white); overflow: hidden; isolation: isolate; }
.rain-wrap {
  position: absolute; inset: 0; z-index: -1; overflow: hidden;
  container-type: size; display: grid; place-items: center; pointer-events: none;
}
.rain { color: var(--ice); opacity: 0.1; display: block; }

.top { display: flex; align-items: center; justify-content: space-between; padding-block: 20px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; font-weight: 700; font-size: 1.25rem; letter-spacing: -0.01em; }
.mark { width: 32px; height: 32px; flex: none; }
.mark rect { fill: var(--orange); }
.mark circle, .mark path { fill: var(--white); }
.top nav { display: flex; align-items: center; gap: clamp(16px, 3vw, 32px); font-size: 0.95rem; }
.top nav a:not(.btn) { text-decoration: none; opacity: 0.85; }
.top nav a:not(.btn):hover { opacity: 1; text-decoration: underline; }
@media (max-width: 520px) { .top nav a:not(.btn) { display: none; } }

.hero-body { padding-top: clamp(32px, 7vw, 72px); padding-bottom: clamp(40px, 6vw, 72px); }
h1 { font-size: clamp(2.5rem, 7vw, 4.75rem); font-weight: 700; line-height: 1.05; letter-spacing: -0.025em; max-width: 14ch; text-wrap: balance; }
.decode-row { display: flex; gap: 0.6em; margin: 20px 0 clamp(32px, 5vw, 48px); color: var(--ice); font-size: clamp(1.05rem, 2.4vw, 1.5rem); min-height: 1.6em; }
.prompt { color: var(--orange); font-weight: 700; }
.decode { white-space: pre; overflow: hidden; line-height: 1.6; }

/* ---------- generator ---------- */
.gen { background: var(--white); color: var(--navy); border-radius: var(--radius); padding: clamp(20px, 4vw, 40px); max-width: 920px; }
.out-row { display: flex; gap: 20px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.pw {
  flex: 1 1 360px; min-width: 0; display: block;
  font-size: clamp(1.35rem, 3.4vw, 2rem); font-weight: 600; line-height: 1.35; letter-spacing: 0.04em;
  overflow-wrap: anywhere; word-break: break-all; user-select: all; cursor: text;
  padding: 6px 0;
}
.pw .c-d { color: var(--orange-text); }
.pw .c-s { color: var(--steel); }
.actions { display: flex; gap: 12px; flex: none; }
.actions .btn { min-width: 8.5rem; }

.meter { display: flex; align-items: center; gap: 20px; margin: 14px 0 28px; flex-wrap: wrap; }
.bits { font-size: 0.95rem; font-weight: 500; }
.bar { flex: 1 1 140px; height: 4px; background: #e2e4e9; display: block; }
.bar span { display: block; height: 100%; width: 0; background: var(--orange); transition: width 0.2s; }

.controls { display: grid; gap: 24px; padding-top: 28px; border-top: 2px solid #e2e4e9; }
@media (min-width: 760px) { .controls { grid-template-columns: 220px 1fr; gap: 40px; } }

.seg { border: 0; display: grid; grid-template-columns: 1fr 1fr; align-content: start; }
.seg legend { font-size: 0.875rem; font-weight: 500; margin-bottom: 8px; padding: 0; }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg label {
  cursor: pointer; text-align: center; font-weight: 600; padding: 11px 12px;
  border: 2px solid var(--navy); transition: background-color 0.15s, color 0.15s;
}
.seg label[for="mode-password"] { border-radius: var(--radius) 0 0 var(--radius); }
.seg label[for="mode-phrase"] { border-radius: 0 var(--radius) var(--radius) 0; margin-left: -2px; }
.seg input:checked + label { background: var(--navy); color: var(--white); }
.seg input:focus-visible + label { outline: 3px solid var(--orange); outline-offset: 3px; }
.seg legend { grid-column: 1 / -1; }

.opts { display: grid; gap: 18px; align-content: start; }
.opts[hidden] { display: none; }
.field label { display: block; font-weight: 500; margin-bottom: 4px; }
.field output { font-weight: 700; }
input[type="range"] { -webkit-appearance: none; appearance: none; width: 100%; height: 32px; margin: 0; background: transparent; cursor: pointer; }
input[type="range"]::-webkit-slider-runnable-track { height: 4px; background: var(--navy); }
input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; width: 20px; height: 28px; margin-top: -12px; background: var(--orange); border: 0; border-radius: var(--radius); }
input[type="range"]::-moz-range-track { height: 4px; background: var(--navy); }
input[type="range"]::-moz-range-thumb { width: 20px; height: 28px; background: var(--orange); border: 0; border-radius: var(--radius); }
.check { display: flex; gap: 12px; align-items: flex-start; cursor: pointer; font-weight: 500; line-height: 1.4; }
.check input { flex: none; width: 22px; height: 22px; margin: 1px 0 0; accent-color: var(--orange); cursor: pointer; }
.check small { display: block; font-weight: 400; font-size: 0.875rem; opacity: 0.75; }

.note { margin-top: 28px; font-size: 0.95rem; line-height: 1.55; }
.note a { font-weight: 600; }

.motion {
  margin-top: 28px; padding: 8px 0; cursor: pointer; background: none; border: 0; color: var(--ice);
  font: 400 0.875rem/1 "Readex Pro", system-ui, sans-serif; text-decoration: underline; text-underline-offset: 0.3em;
}
.motion:hover { color: var(--white); }

/* The orange swoosh: a wedge that thickens to the right, ending the navy block. */
.swoosh { display: block; width: 100%; height: clamp(28px, 4.2vw, 64px); fill: var(--orange); }

/* ---------- content sections ---------- */
section h2 { font-size: clamp(1.75rem, 4vw, 2.75rem); font-weight: 700; line-height: 1.12; letter-spacing: -0.02em; text-wrap: balance; }
.rules, .trust, .faq { padding-block: clamp(64px, 10vw, 128px); }
.rules { background: var(--gray); }
.lead { margin-top: 20px; max-width: 52ch; font-size: 1.25rem; line-height: 1.5; }

.rule-list { list-style: none; display: grid; gap: clamp(40px, 6vw, 64px) clamp(32px, 6vw, 88px); margin-top: clamp(48px, 7vw, 80px); }
@media (min-width: 760px) { .rule-list { grid-template-columns: 1fr 1fr; } }
.n { display: block; font-size: 3.5rem; font-weight: 700; line-height: 1; letter-spacing: -0.03em; color: var(--orange-text); margin-bottom: 16px; }
h3 { font-size: 1.375rem; font-weight: 700; line-height: 1.25; letter-spacing: -0.01em; }
.rule-list p { margin-top: 10px; max-width: 46ch; }

.trust-grid, .faq-grid { display: grid; gap: 32px clamp(32px, 7vw, 96px); }
@media (min-width: 860px) { .trust-grid, .faq-grid { grid-template-columns: 5fr 7fr; } }
.trust p { max-width: 56ch; }
.trust h3 { margin-top: 32px; }
.checks { margin-top: 12px; padding-left: 0; list-style: none; display: grid; gap: 12px; max-width: 56ch; }
.checks li { position: relative; padding-left: 28px; }
.checks li::before { content: ">"; position: absolute; left: 0; color: var(--orange-text); font-weight: 700; }
code { font-weight: 500; background: var(--gray); padding: 0.1em 0.35em; border-radius: var(--radius); font-size: 0.95em; }

.faq { background: var(--gray); }
details { border-top: 2px solid var(--navy); }
details:last-child { border-bottom: 2px solid var(--navy); }
summary { cursor: pointer; padding: 20px 40px 20px 0; font-weight: 600; font-size: 1.125rem; list-style: none; position: relative; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; position: absolute; right: 4px; top: 50%; transform: translateY(-50%); font-size: 1.75rem; font-weight: 400; color: var(--orange-text); }
details[open] summary::after { content: "–"; }
details p { padding: 0 40px 24px 0; max-width: 60ch; }

/* ---------- the plug ---------- */
.plug { position: relative; background: var(--hero); color: var(--white); overflow: hidden; isolation: isolate; }
.plug-body { padding-block: clamp(72px, 11vw, 136px) clamp(56px, 8vw, 96px); }
.plug h2 { max-width: 18ch; }
.plug-brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; font-weight: 700; font-size: 1.25rem; margin-bottom: 32px; }
.plug-brand img { width: 40px; height: 40px; border-radius: var(--radius); }
.plug p:not(.cta-row):not(.fine) { margin-top: 24px; max-width: 54ch; color: var(--ice); font-size: 1.125rem; }
.cta-row { display: flex; flex-wrap: wrap; align-items: center; gap: 20px 36px; margin-top: 40px; }
.link-light { color: var(--ice); font-weight: 600; }
.link-light:hover { color: var(--white); }
.fine { margin-top: 24px; font-size: 0.875rem; color: var(--ice); opacity: 0.75; }

.foot { padding-block: 32px; font-size: 0.9rem; }
.foot-row { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 32px; }
