/* Webics Share. Tokens are stated in DESIGN.md; this file and that file must agree. */
@font-face { font-family: 'Poppins'; font-weight: 400; font-style: normal; font-display: swap; src: url('/fonts/poppins-latin-400-normal.woff2') format('woff2'); }
@font-face { font-family: 'Poppins'; font-weight: 500; font-style: normal; font-display: swap; src: url('/fonts/poppins-latin-500-normal.woff2') format('woff2'); }
@font-face { font-family: 'Poppins'; font-weight: 600; font-style: normal; font-display: swap; src: url('/fonts/poppins-latin-600-normal.woff2') format('woff2'); }
@font-face { font-family: 'Poppins'; font-weight: 800; font-style: normal; font-display: swap; src: url('/fonts/poppins-latin-800-normal.woff2') format('woff2'); }

:root {
  --ink: #0B0F14;          /* Webics Black, the ground */
  --surface: #131A23;
  --surface-2: #1A2330;
  --line: #2A3646;
  --text: #F3F4F3;         /* Webics Grey */
  --text-2: #B4BEC9;
  --accent: #0DE6DB;       /* NEON Turquoise */
  --accent-hover: #6EF2EA;
  --blue: #2D31F3;         /* NEON Blue */
  --purple: #5E2BFF;       /* NEON Purple */
  --ring: #8EA0FF;
  --danger: #FF9C94;
  --ok: #7CF0C0;
  --r-sm: 10px; --r-lg: 18px;
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--ink); color: var(--text);
  font-family: 'Poppins', system-ui, sans-serif; font-weight: 400; font-size: 16px; line-height: 1.6;
  min-height: 100vh; display: flex; flex-direction: column;
}
::selection { background: var(--accent); color: var(--ink); }
a { color: var(--accent); text-underline-offset: 3px; }
a:hover { color: var(--accent-hover); }
:focus-visible { outline: 3px solid var(--ring); outline-offset: 3px; }
[tabindex="-1"]:focus { outline: none; }
h1, h2, h3 { line-height: 1.12; margin: 0; font-weight: 800; letter-spacing: -0.015em; }
p { margin: 0; }
[hidden] { display: none !important; }

.wrap { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 16px; }
@media (min-width: 768px) { .wrap { padding: 0 32px; } }

/* Header */
.site-head { border-bottom: 1px solid var(--line); }
.site-head .wrap { display: flex; align-items: center; justify-content: space-between; height: 67px; gap: 16px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--text); min-height: 44px; }
.brand img { height: 26px; width: auto; display: block; }
.brand span { font-weight: 600; font-size: 17px; padding-left: 12px; border-left: 1px solid var(--line); line-height: 26px; }
.head-nav { display: flex; gap: 4px; }
.head-nav a { color: var(--text-2); text-decoration: none; font-size: 15px; font-weight: 500; padding: 10px 12px; border-radius: var(--r-sm); min-height: 44px; display: inline-flex; align-items: center; }
.head-nav a:hover { color: var(--text); background: var(--surface); }
@media (max-width: 560px) { .head-nav .hide-sm { display: none; } .brand span { font-size: 15px; } }

/* Hero and the tool */
main { flex: 1; }
.hero { padding: 56px 0 72px; }
.hero-grid { display: grid; gap: 40px; align-items: start; }
@media (min-width: 960px) {
  .hero-grid { grid-template-columns: 0.9fr 1.1fr; grid-template-areas: 'copy tool' 'points tool'; grid-template-rows: auto 1fr; gap: 0 64px; }
  .hero-copy { grid-area: copy; } .hero-grid > .card { grid-area: tool; } .hero-points { grid-area: points; }
  .hero { padding: 88px 0 100px; }
}
.hero-points .points { margin-top: 0; }
@media (min-width: 960px) { .hero-points .points { margin-top: 28px; } }
.hero-copy h1 { font-size: clamp(34px, 5.2vw, 56px); max-width: 15ch; }
.hero-copy h1 .hl { color: var(--accent); }
.lede { margin-top: 20px; font-size: 18px; color: var(--text-2); max-width: 34rem; }
.points { list-style: none; padding: 0; margin: 28px 0 0; display: grid; gap: 14px; }
.points li { display: flex; gap: 12px; align-items: flex-start; color: var(--text); }
.points svg { flex: 0 0 22px; width: 22px; height: 22px; margin-top: 2px; stroke: var(--accent); }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 24px; }
@media (min-width: 768px) { .card { padding: 32px; } }
.card h2 { font-size: 24px; }

.field { display: grid; gap: 8px; margin-top: 22px; }
.field:first-child { margin-top: 0; }
.label { font-weight: 600; font-size: 15px; }
.hint { font-size: 14px; color: var(--text-2); }
textarea, input[type=text], input[type=password] {
  width: 100%; font: inherit; color: var(--text); background: var(--ink);
  border: 1px solid var(--line); border-radius: var(--r-sm); padding: 12px 14px; min-height: 48px;
  transition: border-color 150ms ease, box-shadow 150ms ease;
}
textarea { min-height: 160px; resize: vertical; font-family: ui-monospace, 'SF Mono', Menlo, Consolas, monospace; font-size: 15px; line-height: 1.55; }
textarea:hover, input:hover { border-color: #3A4A5E; }
textarea:focus, input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(13, 230, 219, 0.25); }
.counter { font-size: 13px; color: var(--text-2); text-align: right; font-variant-numeric: tabular-nums; }
.counter.over { color: var(--danger); }

/* Expiry: a segmented control built from real radios */
fieldset { border: 0; margin: 22px 0 0; padding: 0; min-width: 0; }
legend { font-weight: 600; font-size: 15px; padding: 0; margin-bottom: 8px; }
.seg { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; background: var(--ink); border: 1px solid var(--line); border-radius: var(--r-sm); padding: 4px; }
.seg input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.seg label { display: flex; align-items: center; justify-content: center; min-height: 44px; border-radius: 7px; font-size: 15px; font-weight: 500; color: var(--text-2); cursor: pointer; white-space: nowrap; transition: background-color 150ms ease, color 150ms ease; }
.seg label:hover { color: var(--text); background: var(--surface-2); }
.seg input:checked + label { background: var(--accent); color: var(--ink); font-weight: 600; }
.seg input:focus-visible + label { outline: 3px solid var(--ring); outline-offset: 2px; }

details.more { margin-top: 22px; border-top: 1px solid var(--line); padding-top: 16px; }
details.more summary { cursor: pointer; font-weight: 600; font-size: 15px; list-style: none; display: inline-flex; align-items: center; gap: 8px; min-height: 44px; }
details.more summary::-webkit-details-marker { display: none; }
details.more summary svg { width: 18px; height: 18px; stroke: var(--text-2); transition: transform 200ms var(--ease-out); }
details.more[open] summary svg { transform: rotate(90deg); }

.ts { margin-top: 18px; min-height: 0; }

/* Buttons */
.btn {
  --bg: transparent; --fg: var(--text); --bd: var(--line);
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: 12px 22px; border-radius: var(--r-sm);
  background: var(--bg); color: var(--fg); border: 1px solid var(--bd);
  font: inherit; font-weight: 600; font-size: 16px; text-decoration: none; white-space: nowrap; cursor: pointer;
  transition: background-color 150ms ease, border-color 150ms ease, color 150ms ease, transform 160ms var(--ease-out);
  -webkit-tap-highlight-color: transparent;
}
.btn svg { width: 20px; height: 20px; flex: 0 0 20px; }
.btn:active { transform: scale(0.97); }
.btn[disabled] { cursor: not-allowed; opacity: 0.55; transform: none; }
.btn-primary { --bg: var(--accent); --fg: var(--ink); --bd: var(--accent); }
.btn-lg { min-height: 56px; font-size: 17px; padding: 14px 28px; }
.btn-block { width: 100%; }
.btn-ghost { --bd: #3A4656; }
.btn-danger { --fg: var(--danger); --bd: rgba(255, 156, 148, 0.45); }
.btn-link { --bd: transparent; padding: 10px 12px; min-height: 44px; color: var(--text-2); font-weight: 500; text-decoration: underline; text-underline-offset: 3px; }
@media (hover: hover) and (pointer: fine) {
  .btn-primary:hover { --bg: var(--accent-hover); --bd: var(--accent-hover); }
  .btn-ghost:hover { --bd: var(--accent); --fg: var(--text); }
  .btn-danger:hover { --bd: var(--danger); --bg: rgba(255, 156, 148, 0.08); }
  .btn-link:hover { color: var(--text); }
}
.btn.is-done { --bg: var(--ok); --bd: var(--ok); --fg: var(--ink); }
.btn .spin { width: 18px; height: 18px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin 700ms linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; align-items: center; }

.msg { margin-top: 16px; padding: 12px 14px; border-radius: var(--r-sm); font-size: 15px; background: rgba(255, 156, 148, 0.1); color: var(--danger); border: 1px solid rgba(255, 156, 148, 0.35); }
.msg.ok { background: rgba(124, 240, 192, 0.08); color: var(--ok); border-color: rgba(124, 240, 192, 0.35); }

/* Result */
.linkbox { display: flex; gap: 8px; margin-top: 18px; }
.linkbox input { font-family: ui-monospace, 'SF Mono', Menlo, Consolas, monospace; font-size: 14px; }
.expiry { margin-top: 14px; color: var(--text-2); font-size: 15px; }
.expiry strong { color: var(--text); font-weight: 600; }
.copy-preview { margin-top: 20px; padding: 16px; border-radius: var(--r-sm); background: var(--ink); border: 1px dashed var(--line); font-size: 14px; color: var(--text-2); white-space: pre-wrap; overflow-wrap: anywhere; user-select: all; }
.copy-preview-head { margin-top: 22px; font-size: 14px; font-weight: 600; }

/* Reveal */
.reveal-wrap { max-width: 720px; margin: 0 auto; padding: 56px 0 80px; }
.reveal-wrap h1 { font-size: clamp(30px, 4.6vw, 44px); }
.reveal-wrap .lede { max-width: none; }
.secret-for { margin-top: 18px; font-size: 15px; color: var(--text-2); }
.secret-for strong { color: var(--text); font-weight: 600; overflow-wrap: anywhere; }
.secret { margin: 16px 0 0; padding: 18px; border-radius: var(--r-sm); background: var(--ink); border: 1px solid var(--accent); white-space: pre-wrap; overflow-wrap: anywhere; font-family: ui-monospace, 'SF Mono', Menlo, Consolas, monospace; font-size: 15px; line-height: 1.6; max-height: 50vh; overflow: auto; }
.notice { margin-top: 28px; display: flex; gap: 12px; padding: 16px; border-radius: var(--r-sm); background: var(--surface-2); font-size: 14px; color: var(--text-2); }
.notice svg { flex: 0 0 20px; width: 20px; height: 20px; stroke: var(--accent); margin-top: 1px; }
.notice strong { color: var(--text); }

/* Content sections */
.band { padding: 80px 0; border-top: 1px solid var(--line); }
.band.alt { background: #0F141B; }
.band h2 { font-size: clamp(28px, 3.6vw, 40px); max-width: 22ch; }
.band .intro { margin-top: 16px; color: var(--text-2); font-size: 17px; max-width: 46rem; }
.steps { list-style: none; padding: 0; margin: 40px 0 0; display: grid; gap: 20px; }
@media (min-width: 860px) { .steps { grid-template-columns: repeat(3, 1fr); gap: 28px; } }
.steps li { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 24px; }
.steps h3 { font-size: 19px; display: flex; gap: 12px; align-items: center; }
.steps h3 svg { width: 24px; height: 24px; flex: 0 0 24px; stroke: var(--accent); }
.steps p { margin-top: 10px; color: var(--text-2); }
.spec { margin-top: 36px; display: grid; gap: 16px; }
@media (min-width: 860px) { .spec { grid-template-columns: 1fr 1fr; } }
.spec dl { margin: 0; }
.spec-row { padding: 18px 0; border-bottom: 1px solid var(--line); }
.spec-row dt { font-weight: 600; }
.spec-row dd { margin: 6px 0 0; color: var(--text-2); }
.two { display: grid; gap: 32px; margin-top: 36px; }
@media (min-width: 860px) { .two { grid-template-columns: 1fr 1fr; gap: 48px; } }
.two h3 { font-size: 20px; }
.two ul { margin: 14px 0 0; padding-left: 20px; color: var(--text-2); display: grid; gap: 8px; }
code { font-family: ui-monospace, 'SF Mono', Menlo, Consolas, monospace; font-size: 0.92em; color: var(--text); }

/* Footer */
.site-foot { border-top: 1px solid var(--line); padding: 32px 0; font-size: 14px; color: var(--text-2); }
.site-foot .wrap { display: flex; flex-wrap: wrap; gap: 16px 24px; align-items: center; justify-content: space-between; }
.site-foot a.brand img { height: 22px; }
.foot-links { display: flex; flex-wrap: wrap; gap: 4px 8px; }
.foot-links a { color: var(--text-2); padding: 10px 6px; display: inline-flex; align-items: center; min-height: 44px; }
.foot-links a:hover { color: var(--text); }
@media (max-width: 767px) { .site-foot .wrap { flex-direction: column; text-align: center; } .foot-links { justify-content: center; } }

@media (max-width: 480px) {
  .seg label { font-size: 14px; }
  .actions .btn { width: 100%; }
  .linkbox { flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 1ms !important; animation-duration: 1ms !important; animation-iteration-count: 1 !important; }
  .btn:active { transform: none; }
}

.mt-8 { margin-top: 8px; }
.intro.sm { font-size: 16px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.reveal-wrap .card { margin-top: 28px; }
#st-ready .card .actions { margin-top: 0; }
#st-ready #pass-field:not([hidden]) ~ .actions, #st-ready #err:not([hidden]) ~ .actions { margin-top: 20px; }
