/* ==========================================================================
   Diamond Mail — site styles
   Tokens live in colors_and_type.css; this file is layout + components.
   ========================================================================== */

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }
html, body { margin: 0; background: var(--bg-page); }

body {
  color: var(--fg-primary);
  font-family: var(--font-sans);
  overflow-x: hidden;
}

a { color: rgba(255, 255, 255, 0.75); text-decoration: none; transition: color 0.15s ease; }
a:hover { color: #fff; }

img { max-width: 100%; }

input::placeholder, textarea::placeholder { color: rgba(255, 255, 255, 0.3); }

:focus-visible { outline: 2px solid var(--border-focus); outline-offset: 2px; }

@keyframes dm-blink { 0%, 55% { opacity: 1; } 56%, 100% { opacity: 0; } }

/* --- Layout primitives ---------------------------------------------------- */

.container { max-width: 1200px; margin: 0 auto; }
.section { padding: 80px 40px; }
.section--narrow { max-width: 760px; margin: 0 auto; }

.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: start;
}
.split--center { align-items: center; }
.split--wide-right { grid-template-columns: 1fr 1.2fr; align-items: center; }

/* --- Type helpers --------------------------------------------------------- */

.eyebrow {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.55px;
  text-transform: uppercase;
  color: var(--fg-secondary);
  margin-bottom: 12px;
}

.micro {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.55px;
  text-transform: uppercase;
  color: var(--fg-tertiary);
}

.lead {
  font-size: 16px;
  color: var(--fg-secondary);
  line-height: 1.5;
  margin: 0;
}

.accent { color: var(--color-electric-cyan); }

h2.h-section { font-size: 48px; font-weight: 400; line-height: 1; letter-spacing: -0.5px; margin: 0; }
h2.h-block   { font-size: 44px; font-weight: 400; line-height: 1; letter-spacing: -0.5px; margin: 0 0 16px; }
h2.h-sub     { font-size: 40px; font-weight: 400; line-height: 1; letter-spacing: -0.4px; margin: 0 0 16px; }

/* --- Buttons -------------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-sans);
  font-size: 15px;
  font-weight: 500;
  padding: 12px 24px;
  border-radius: var(--radius-card);
  border: none;
  cursor: pointer;
  transition: background 0.15s ease, filter 0.15s ease, color 0.15s ease;
}

.btn--primary { background: #fff; color: #0f0f0f; }
.btn--primary:hover { background: #e8e8e8; color: #0f0f0f; }

.btn--ghost {
  background: var(--color-cyan-12);
  color: #eafdff;
  border: 1px solid var(--color-ocean-blue);
}
.btn--ghost:hover { background: var(--color-cyan-20); color: #eafdff; }

.btn--sm { font-size: 14px; padding: 8px 20px; }
.btn--block { width: 100%; }
.btn--mono { font-family: var(--font-mono); letter-spacing: -0.28px; }

.btn[disabled] { opacity: 0.65; cursor: default; }

/* --- Nav ------------------------------------------------------------------ */

.nav {
  height: 64px;
  border-bottom: 1px solid var(--border-mist-06);
  display: flex;
  align-items: center;
  padding: 0 40px;
  gap: 28px;
  position: sticky;
  top: 0;
  background: rgba(15, 15, 15, 0.85);
  backdrop-filter: blur(12px);
  z-index: 50;
}

.nav__brand {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #fff;
  font-size: 15px;
  font-weight: 500;
  flex-shrink: 0;
}
.nav__brand img { object-fit: contain; flex-shrink: 0; }
.brand__name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.brand__mono { font-family: var(--font-mono); opacity: 0.75; }

.nav > .btn { flex-shrink: 0; }

.nav__links { display: flex; gap: 24px; flex: 1; margin-left: 20px; }
.nav__links a { font-size: 14px; }

/* --- Hero ----------------------------------------------------------------- */

.hero {
  position: relative;
  padding: 120px 40px 100px;
  text-align: center;
  overflow: hidden;
}

.hero__glow {
  position: absolute;
  top: -20%; left: -20%; right: -20%;
  height: 700px;
  background: radial-gradient(ellipse at center top,
    rgba(0, 7, 205, 0.35) 0%, rgba(0, 255, 255, 0.08) 30%, transparent 60%);
  pointer-events: none;
}

.hero__inner { position: relative; }

.hero__title {
  font-size: clamp(40px, 7vw, 84px);
  font-weight: 400;
  line-height: 0.9;
  color: #fff;
  letter-spacing: -1.5px;
  max-width: 940px;
  margin: 0 auto;
}

.caret { color: var(--color-electric-cyan); animation: dm-blink 1s step-end infinite; }

.hero__sub {
  font-size: 18px;
  color: var(--fg-secondary);
  line-height: 1.5;
  max-width: 620px;
  margin: 28px auto 0;
}

.hero__tags {
  display: flex; gap: 10px; justify-content: center;
  margin-top: 28px; flex-wrap: wrap;
}

.tag {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.55px;
  text-transform: uppercase;
  color: var(--fg-secondary);
  border: 1px solid var(--border-mist-10);
  border-radius: var(--radius-pill);
  padding: 5px 14px;
}

.hero__actions {
  display: flex; gap: 12px; justify-content: center;
  margin-top: 36px; flex-wrap: wrap;
}

.hero__trust { margin-top: 48px; }

/* --- Stats ---------------------------------------------------------------- */

.stats { padding: 0 40px 40px; }

.stats__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  border-top: 1px solid var(--border-mist-06);
  border-bottom: 1px solid var(--border-mist-06);
  padding: 36px 0;
}

.stat { display: flex; flex-direction: column; gap: 8px; }
.stat__num {
  font-family: var(--font-mono);
  font-size: 44px;
  line-height: 1;
  letter-spacing: -0.98px;
}

/* --- Cards & lists -------------------------------------------------------- */

.card {
  background: var(--bg-card);
  border: 1px solid var(--border-mist-10);
  border-radius: var(--radius-card);
  padding: 28px;
}

.card--hover { transition: border-color 0.15s ease; }
.card--hover:hover { border-color: rgba(255, 255, 255, 0.2); }

.card--shadow { box-shadow: var(--shadow-brutalist); overflow: hidden; }

.checklist { display: flex; flex-direction: column; gap: 12px; }
.checklist--tight { gap: 10px; }

.checklist li {
  display: flex;
  gap: 12px;
  align-items: baseline;
  font-size: 15px;
  color: rgba(255, 255, 255, 0.75);
  line-height: 1.4;
}
.checklist--tight li { gap: 10px; }

.checklist__glyph {
  font-family: var(--font-mono);
  font-size: 12px;
  color: rgba(255, 255, 255, 0.4);
  flex-shrink: 0;
}
.checklist__glyph--arrow { color: var(--color-electric-cyan); }

ul.checklist { list-style: none; margin: 0; padding: 0; }

/* --- Terminal ------------------------------------------------------------- */

.terminal {
  background: var(--bg-card);
  border: 1px solid var(--border-mist-10);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-brutalist);
  overflow: hidden;
}

.terminal__bar {
  display: flex; gap: 6px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border-mist-06);
}
.terminal__dot {
  width: 10px; height: 10px;
  border-radius: var(--radius-round);
  background: var(--color-phantom-white);
}

.terminal__body {
  padding: 20px;
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.7;
  letter-spacing: -0.28px;
  color: #fff;
  margin: 0;
  overflow-x: auto;
}
.terminal__prompt { color: rgba(255, 255, 255, 0.4); }
.terminal__pass { color: var(--color-electric-cyan); }
.terminal__region { color: var(--color-ocean-blue); }

/* --- Steps ---------------------------------------------------------------- */

.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }

.step__num {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.55px;
  text-transform: uppercase;
  color: var(--color-electric-cyan);
  margin-bottom: 20px;
}
.step__title { font-size: 20px; font-weight: 500; line-height: 1.2; margin-bottom: 8px; }
.step__desc { font-size: 14px; color: var(--fg-secondary); line-height: 1.5; }

/* --- Pricing -------------------------------------------------------------- */

.plans { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; align-items: stretch; }

.plan {
  background: var(--bg-card);
  border: 1px solid var(--border-mist-10);
  border-radius: var(--radius-card);
  padding: 32px;
  display: flex;
  flex-direction: column;
  position: relative;
}

.plan--featured {
  border-color: var(--color-ocean-blue);
  box-shadow: var(--shadow-brutalist-cyan);
}

.plan__badge {
  position: absolute;
  top: -11px; left: 32px;
  background: var(--color-cyan-12);
  border: 1px solid var(--color-ocean-blue);
  color: #eafdff;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.55px;
  text-transform: uppercase;
  padding: 3px 10px;
  border-radius: var(--radius-pill);
}

.plan__name {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.55px;
  text-transform: uppercase;
  color: var(--fg-tertiary);
  margin-bottom: 6px;
}
.plan__range {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: -0.28px;
  color: var(--fg-tertiary);
  margin-bottom: 16px;
}
.plan__price { display: flex; align-items: baseline; gap: 6px; }
.plan__amount {
  font-family: var(--font-mono);
  font-size: 44px;
  line-height: 1;
  letter-spacing: -0.98px;
}
.plan__unit { font-family: var(--font-mono); font-size: 12px; color: var(--fg-tertiary); }

.plan__features { flex: 1; margin-top: 24px; }
.plan__features li { font-size: 14px; }

.plan__cta { margin-top: 26px; }
.plan__cta:hover { filter: brightness(1.12); }

/* --- Savings table -------------------------------------------------------- */

.table { background: var(--bg-card); border: 1px solid var(--border-mist-10);
  border-radius: var(--radius-card); box-shadow: var(--shadow-brutalist); overflow: hidden; }

.table__row {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr 1fr;
  padding: 14px 24px;
}
.table__head {
  border-bottom: 1px solid var(--border-mist-08);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.55px;
  text-transform: uppercase;
  color: var(--fg-tertiary);
}
.table__body .table__row {
  border-bottom: 1px solid var(--border-mist-04);
  font-family: var(--font-mono);
  font-size: 14px;
  letter-spacing: -0.28px;
}
.table__row > span + span { text-align: right; }
.table__muted { color: var(--fg-secondary); }

.savings__figure {
  font-family: var(--font-mono);
  font-size: 20px;
  letter-spacing: -0.4px;
  color: #fff;
  margin-bottom: 28px;
}

/* --- Add-ons -------------------------------------------------------------- */

.addons { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.addon { display: flex; flex-direction: column; }
.addon__label { margin-bottom: 20px; }
.addon__title { font-size: 20px; font-weight: 500; margin-bottom: 8px; }
.addon__body { font-size: 14px; color: var(--fg-secondary); line-height: 1.6; flex: 1; }
.addon__body code { font-family: var(--font-mono); font-size: inherit; color: #fff; }
.addon__link {
  margin-top: 20px;
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: -0.28px;
  color: #eafdff;
}

/* --- FAQ ------------------------------------------------------------------ */

.faq { display: flex; flex-direction: column; border-top: 1px solid var(--border-mist-08); }
.faq__item { border-bottom: 1px solid var(--border-mist-08); }

.faq__q {
  width: 100%;
  background: none;
  border: none;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 20px 4px;
  color: #fff;
  font-size: 17px;
  font-family: var(--font-sans);
  text-align: left;
}
.faq__glyph { font-family: var(--font-mono); color: var(--fg-tertiary); font-size: 14px; }

.faq__a {
  padding: 0 4px 22px;
  font-size: 15px;
  color: var(--fg-secondary);
  line-height: 1.63;
  max-width: 640px;
}
.faq__a[hidden] { display: none; }

/* --- Forms ---------------------------------------------------------------- */

.form { display: flex; flex-direction: column; gap: 16px; }
.field { display: flex; flex-direction: column; gap: 6px; }

.field__label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.55px;
  text-transform: uppercase;
  color: var(--fg-tertiary);
}

.input {
  background: #0f0f0f;
  border: 1px solid var(--border-mist-10);
  border-radius: var(--radius-card);
  outline: none;
  color: #fff;
  font-size: 14px;
  padding: 11px 12px;
  font-family: var(--font-sans);
  width: 100%;
}
.input:focus { border-color: var(--border-focus); }
textarea.input { resize: vertical; }

.input--onblack { background: #000; }
.input--mono { font-family: var(--font-mono); font-size: 13px; letter-spacing: -0.28px; }

.form__error {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: -0.28px;
  color: var(--color-ocean-blue);
}

.form__success {
  font-family: var(--font-mono);
  font-size: 14px;
  letter-spacing: -0.28px;
  color: var(--color-electric-cyan);
  padding: 12px 0;
}

/* --- Final CTA ------------------------------------------------------------ */

.final-cta {
  position: relative;
  padding: 100px 40px;
  text-align: center;
  overflow: hidden;
  border-top: 1px solid var(--border-mist-06);
}
.final-cta__glow {
  position: absolute;
  bottom: -60%; left: 20%; right: 20%;
  height: 500px;
  background: radial-gradient(circle at center, rgba(0, 255, 255, 0.14) 0%, rgba(0, 255, 255, 0) 60%);
  pointer-events: none;
}
.final-cta__inner { position: relative; }
.final-cta__title {
  font-size: clamp(34px, 5vw, 52px);
  font-weight: 400;
  line-height: 0.95;
  letter-spacing: -0.6px;
  max-width: 780px;
  margin: 0 auto;
}
.final-cta__sub {
  font-size: 17px;
  color: var(--fg-secondary);
  line-height: 1.5;
  max-width: 520px;
  margin: 20px auto 0;
}
.final-cta__actions { display: flex; gap: 12px; justify-content: center; margin-top: 32px; flex-wrap: wrap; }

/* --- Footer --------------------------------------------------------------- */

.footer {
  padding: 60px 40px 40px;
  background: linear-gradient(180deg, #0f0f0f 0%, rgba(200, 200, 210, 0.08) 100%);
  border-top: 1px solid var(--border-mist-06);
}
.footer__grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 40px; }
.footer__col { display: flex; flex-direction: column; gap: 10px; }
.footer__col a { font-size: 14px; }
.footer__head { margin-bottom: 6px; }
.footer__blurb { font-size: 13px; color: var(--fg-tertiary); max-width: 320px; line-height: 1.6; }
.footer__bottom {
  margin: 40px auto 0;
  padding-top: 20px;
  border-top: 1px solid var(--border-mist-06);
  display: flex;
  justify-content: space-between;
  gap: 16px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--fg-tertiary);
  letter-spacing: -0.28px;
}

/* --- Checkout modal ------------------------------------------------------- */

.modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(12px);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.modal[hidden] { display: none; }

.modal__panel {
  background: #0f0f0f;
  border: 1px solid var(--border-mist-12);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-float);
  width: 460px;
  max-width: 100%;
  max-height: 92vh;
  overflow: auto;
}

.modal__head {
  padding: 24px 32px;
  border-bottom: 1px solid var(--border-mist-08);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}
.modal__total { font-size: 20px; font-weight: 500; }
.modal__total span { font-family: var(--font-mono); font-size: 12px; color: var(--fg-tertiary); }

.modal__esc {
  background: none;
  border: 1px solid var(--border-mist-10);
  border-radius: var(--radius-card);
  color: var(--fg-secondary);
  cursor: pointer;
  font-family: var(--font-mono);
  font-size: 12px;
  padding: 6px 10px;
}
.modal__esc:hover { color: #fff; }

.modal__body { padding: 28px 32px; display: flex; flex-direction: column; gap: 18px; }

.qty { display: flex; align-items: center; gap: 12px; }
.qty__btn {
  background: #000;
  border: 1px solid var(--border-mist-10);
  border-radius: var(--radius-card);
  color: #fff;
  cursor: pointer;
  font-family: var(--font-mono);
  font-size: 16px;
  width: 40px; height: 40px;
  flex-shrink: 0;
}
.qty__btn:hover { border-color: rgba(255, 255, 255, 0.25); }
.qty__input {
  flex: 1;
  background: #000;
  border: 1px solid var(--border-mist-10);
  border-radius: var(--radius-card);
  outline: none;
  color: #fff;
  font-family: var(--font-mono);
  font-size: 18px;
  letter-spacing: -0.4px;
  padding: 9px 12px;
  text-align: center;
  width: 100%;
}
.qty__hint {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: -0.28px;
  color: rgba(255, 255, 255, 0.4);
}

.summary {
  background: #000;
  border: 1px solid var(--border-mist-08);
  border-radius: var(--radius-card);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: -0.28px;
}
.summary__row { display: flex; justify-content: space-between; gap: 12px; }
.summary__key { color: var(--fg-tertiary); }

.modal__note {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: -0.28px;
  color: rgba(255, 255, 255, 0.4);
  text-align: center;
}

.modal__done { padding: 40px; text-align: center; }
.modal__done img { object-fit: contain; margin-bottom: 20px; }
.modal__done-title { font-size: 28px; font-weight: 400; line-height: 1.2; margin-bottom: 12px; }
.modal__done-line { font-size: 15px; color: var(--fg-secondary); line-height: 1.6; margin-bottom: 8px; }
.modal__done-note { font-size: 14px; color: var(--fg-secondary); line-height: 1.6; margin-bottom: 28px; }

body.is-locked { overflow: hidden; }

/* --- Reveal on scroll ----------------------------------------------------- */

/* Scoped to .js so the page is fully visible if scripts fail or are blocked. */
.js .reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}
.js .reveal.is-visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
  .caret { animation: none; }
}

/* --- Responsive ----------------------------------------------------------- */

@media (max-width: 1024px) {
  .steps { grid-template-columns: repeat(2, 1fr); }
  .plans { grid-template-columns: 1fr; }
  .plan--featured { order: -1; }
  .addons { grid-template-columns: 1fr; }
  .footer__grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 860px) {
  .split, .split--wide-right { grid-template-columns: 1fr; gap: 40px; }
  .terminal { order: 2; }
  .stats__grid { grid-template-columns: repeat(2, 1fr); gap: 28px 16px; }
}

@media (max-width: 720px) {
  .section { padding: 56px 20px; }
  .hero { padding: 72px 20px 64px; }
  .stats { padding: 0 20px 32px; }
  .final-cta { padding: 72px 20px; }
  .footer { padding: 48px 20px 32px; }
  .nav { padding: 0 20px; gap: 16px; }
  .nav__links { display: none; }
  h2.h-section { font-size: 34px; }
  h2.h-block { font-size: 32px; }
  h2.h-sub { font-size: 30px; }
  .steps { grid-template-columns: 1fr; }
  .footer__grid { grid-template-columns: 1fr; gap: 28px; }
  .footer__bottom { flex-direction: column; }
  .table__row { padding: 12px 14px; font-size: 12px; }
  .modal__body { padding: 22px 20px; }
  .modal__head { padding: 20px; }
}

@media (max-width: 400px) {
  .nav { padding: 0 14px; gap: 10px; }
  .nav__brand { font-size: 14px; min-width: 0; }
  .nav .btn--sm { padding: 8px 12px; font-size: 13px; }
  .section, .hero, .final-cta, .footer { padding-left: 16px; padding-right: 16px; }
  .stats { padding-left: 16px; padding-right: 16px; }
}

@media (max-width: 320px) {
  .brand__name { display: none; }
}
