/* RetroPhone website — shared styles. Colours come from the active "pack" (see packs in index.html). */
:root {
  --bg: #a3ac8b;
  --ink: #1f2619;
  --dim: #5f684f;
  --shadow: #7f886a;
  --accent: #4b5e8e;
  --panel: #b3bb9c;
  --body: #23281e;
  --on-body: #c9d1b0;
  --display: "Silkscreen", "Courier New", monospace;
  --text: "VT323", "Courier New", monospace;
  --gutter: 16px;
  --max: 1080px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--text);
  font-size: 22px;
  line-height: 1.35;
  transition: background .25s steps(3), color .25s steps(3);
  overflow-x: hidden;
}
/* LCD dot grid over everything. */
body::before {
  content: "";
  position: fixed; inset: 0;
  pointer-events: none;
  background-image: radial-gradient(color-mix(in srgb, var(--ink) 7%, transparent) 1px, transparent 1.4px);
  background-size: 4px 4px;
  z-index: 0;
}
main, header, footer { position: relative; z-index: 1; }

a { color: var(--ink); text-decoration-thickness: 2px; text-underline-offset: 3px; }
a:hover { color: var(--accent); }
h1, h2, h3, .label, .btn, nav a { font-family: var(--display); text-transform: uppercase; letter-spacing: .06em; }
h1 { font-size: clamp(34px, 7vw, 64px); line-height: 1.05; margin: 0 0 16px; }
h2 { font-size: clamp(22px, 4vw, 32px); margin: 0 0 12px; }
h3 { font-size: 16px; margin: 0 0 6px; }
p { margin: 0 0 14px; }
.dim { color: var(--dim); }
.small { font-size: 18px; }
.label { font-size: 12px; color: var(--dim); }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }

/* Header */
.top {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding-top: 18px; padding-bottom: 18px; border-bottom: 3px solid var(--ink);
}
.brand { display: flex; align-items: center; gap: 10px; font-family: var(--display); font-size: 18px; text-decoration: none; }
.brand-mark { width: 28px; height: 28px; image-rendering: pixelated; }
nav { display: flex; gap: 18px; flex-wrap: wrap; }
nav a { font-size: 11px; text-decoration: none; }
nav a:hover { text-decoration: underline; }

/* Buttons + frames */
.btn {
  display: inline-block; font-size: 13px; padding: 14px 20px; text-decoration: none;
  background: var(--bg); color: var(--ink); border: 3px solid var(--ink);
  box-shadow: 4px 4px 0 var(--shadow); cursor: pointer;
}
.btn:hover { color: var(--ink); transform: translate(1px, 1px); box-shadow: 3px 3px 0 var(--shadow); }
.btn:active { transform: translate(4px, 4px); box-shadow: none; }
.btn.primary { background: var(--ink); color: var(--bg); }
.btn.primary:hover { color: var(--bg); }
.frame { border: 3px solid var(--ink); box-shadow: 5px 5px 0 var(--shadow); background: color-mix(in srgb, var(--bg) 85%, #fff 15%); padding: 22px; }

section { padding: 64px 0; border-bottom: 3px dashed color-mix(in srgb, var(--ink) 35%, transparent); }
section:last-of-type { border-bottom: 0; }

/* Hero */
.hero { display: grid; grid-template-columns: 1.1fr .9fr; gap: 40px; align-items: center; padding-top: 56px; padding-bottom: 64px; }
.hero .lede { font-size: 26px; max-width: 30ch; }
.cta { display: flex; gap: 14px; flex-wrap: wrap; margin: 22px 0 10px; }
.packs { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 18px; }
.chip {
  font-family: var(--display); font-size: 10px; text-transform: uppercase; letter-spacing: .06em;
  padding: 8px 10px; border: 2px solid var(--ink); background: transparent; color: var(--ink); cursor: pointer;
}
.chip[aria-pressed="true"] { background: var(--ink); color: var(--bg); }

/* The phone */
.phone {
  width: min(340px, 100%); margin: 0 auto; padding: 18px 16px 26px;
  background: var(--body); border-radius: 34px; box-shadow: 8px 8px 0 color-mix(in srgb, var(--ink) 45%, transparent);
}
.phone-top { display: flex; justify-content: center; gap: 6px; margin-bottom: 12px; }
.phone-top span { width: 6px; height: 6px; border-radius: 50%; background: var(--on-body); opacity: .5; }
.screen { background: var(--bg); border-radius: 10px; padding: 18px 14px; min-height: 420px; position: relative; overflow: hidden; }
.screen::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image: radial-gradient(color-mix(in srgb, var(--ink) 10%, transparent) 1px, transparent 1.4px);
  background-size: 3px 3px;
}
.clock { font-family: var(--text); font-size: 86px; line-height: 1; text-align: center; letter-spacing: .02em; margin-top: 18px; }
.dateband { margin: 10px -14px 0; padding: 4px 0; text-align: center; background: color-mix(in srgb, var(--ink) 9%, transparent); font-family: var(--display); font-size: 11px; }
.icons { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px 10px; margin-top: 120px; justify-items: center; }
.icons svg { width: 34px; height: 34px; }
.icons svg rect { fill: var(--ink); }
.phone-keys { display: flex; justify-content: center; gap: 12px; margin-top: 16px; }
.phone-keys span { width: 54px; height: 14px; border-radius: 7px; background: color-mix(in srgb, var(--on-body) 25%, transparent); }

/* Grids */
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.grid2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px; }
.feature .tag { display: inline-block; font-family: var(--display); font-size: 10px; padding: 3px 6px; background: var(--ink); color: var(--bg); margin-bottom: 10px; }

.eras { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
.eras span { font-family: var(--display); font-size: 11px; border: 2px solid var(--ink); padding: 6px 8px; }

.terminal { background: var(--body); color: var(--on-body); padding: 20px; font-size: 22px; border: 3px solid var(--ink); }
.terminal .blink { animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }

/* Pricing */
.price { font-family: var(--display); font-size: 34px; margin: 8px 0 2px; }
.ticks { list-style: none; padding: 0; margin: 14px 0 0; }
.ticks li { padding-left: 22px; position: relative; margin-bottom: 6px; }
.ticks li::before { content: ""; position: absolute; left: 0; top: .45em; width: 9px; height: 9px; background: var(--ink); }
.best { position: relative; }
.best .flag { position: absolute; top: -14px; right: 16px; font-family: var(--display); font-size: 10px; background: var(--accent); color: #fff; padding: 5px 8px; }

details { border-top: 2px solid var(--ink); padding: 14px 0; }
details:last-child { border-bottom: 2px solid var(--ink); }
summary { cursor: pointer; font-family: var(--display); font-size: 13px; text-transform: uppercase; list-style: none; }
summary::before { content: "+ "; }
details[open] summary::before { content: "- "; }
details p { margin: 10px 0 0; }

/* Footer */
footer { border-top: 3px solid var(--ink); padding-top: 26px; padding-bottom: 40px; }
footer .row { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
footer a { font-family: var(--display); font-size: 11px; text-transform: uppercase; margin-right: 16px; }

/* Documents (privacy, deletion) */
.doc { max-width: 760px; padding-top: 48px; padding-bottom: 64px; }
.doc h2 { margin-top: 40px; font-size: 20px; }
.doc ul { padding-left: 22px; }
.doc li { margin-bottom: 6px; }
.doc table { width: 100%; border-collapse: collapse; margin: 12px 0 18px; font-size: 19px; }
.doc th, .doc td { border: 2px solid var(--ink); padding: 8px 10px; text-align: left; vertical-align: top; }
.doc th { font-family: var(--display); font-size: 11px; text-transform: uppercase; background: color-mix(in srgb, var(--ink) 10%, transparent); }
.table-scroll { overflow-x: auto; }
.note { border-left: 6px solid var(--ink); padding: 10px 14px; background: color-mix(in srgb, var(--ink) 7%, transparent); margin: 16px 0; }

/* Form */
form { display: grid; gap: 18px; }
label { display: grid; gap: 6px; }
label > span { font-family: var(--display); font-size: 12px; text-transform: uppercase; }
input[type="email"], input[type="text"], textarea {
  font: inherit; color: var(--ink); background: color-mix(in srgb, var(--bg) 80%, #fff 20%);
  border: 3px solid var(--ink); padding: 10px 12px; width: 100%; border-radius: 0;
}
input:focus, textarea:focus { outline: 3px solid var(--accent); outline-offset: 2px; }
textarea { min-height: 110px; resize: vertical; }
.check { display: flex; gap: 10px; align-items: flex-start; }
.check input { width: 20px; height: 20px; margin-top: 4px; accent-color: var(--ink); flex: none; }
fieldset { border: 3px solid var(--ink); padding: 14px 16px; margin: 0; display: grid; gap: 10px; }
legend { font-family: var(--display); font-size: 12px; text-transform: uppercase; padding: 0 6px; }
.status { font-family: var(--display); font-size: 12px; text-transform: uppercase; min-height: 1em; }
.hp { position: absolute; left: -9999px; }

@media (max-width: 820px) {
  .hero { grid-template-columns: 1fr; gap: 28px; padding-top: 36px; }
  .grid3, .grid2 { grid-template-columns: 1fr; }
  section { padding: 44px 0; }
  nav { gap: 12px; }
  .top { flex-wrap: wrap; }
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}
