/* ==========================================================================
   Hadal Shop — design tokens
   Concept: the hadal zone is the deepest part of the ocean. The storefront
   borrows from depth gauges, sonar readouts and bioluminescence rather than
   generic SaaS chrome: dial markers instead of numbered badges, a glow
   instead of a drop shadow, monospace only where a real console would use
   it (numeric readouts), never as a decorative label face.
   ========================================================================== */

:root {
  --abyss-950: #060b12;
  --abyss-900: #0a1420;
  --abyss-800: #0f1e2e;
  --trench-700: #16293b;
  --foam-100: #e9f2f1;
  --slate-400: #85a0ab;
  --slate-500: #5f7a86;
  --glow-400: #45e0c7;
  --glow-500: #2bc7ae;
  --lure-400: #f2b84b;
  --danger-400: #ef6a6a;

  --font-display: 'Space Grotesk', 'Segoe UI', sans-serif;
  --font-body: 'Inter', 'Segoe UI', sans-serif;
  --font-gauge: 'IBM Plex Mono', ui-monospace, monospace;

  --radius-sm: 3px;
  --radius-md: 6px;
  --line-max: 62ch;
}

* { box-sizing: border-box; }

html { color-scheme: dark; }

body {
  margin: 0;
  background: var(--abyss-950);
  background-image: radial-gradient(circle at 15% 0%, var(--abyss-900), var(--abyss-950) 60%);
  color: var(--foam-100);
  font-family: var(--font-body);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--glow-400); text-decoration: none; }
a:hover { text-decoration: underline; }

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

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: -0.01em;
  margin: 0;
}

p { margin: 0 0 1em; max-width: var(--line-max); color: var(--slate-400); }

.container {
  max-width: 880px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ---- Top bar --------------------------------------------------------- */

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px 24px;
  border-bottom: 1px solid var(--trench-700);
}

.wordmark {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--foam-100);
  display: flex;
  align-items: baseline;
  gap: 6px;
}

.wordmark .depth-unit {
  font-family: var(--font-gauge);
  font-size: 0.7rem;
  color: var(--glow-400);
  font-weight: 500;
}

/* ---- Hero -------------------------------------------------------------
   The single orchestrated moment: a sonar sweep ring behind the headline,
   animated once on load. Everything else on the page is static. */

.hero {
  padding: 72px 24px 48px;
  position: relative;
  overflow: hidden;
}

.hero__sweep {
  position: absolute;
  top: -120px;
  right: -160px;
  width: 420px;
  height: 420px;
  border-radius: 50%;
  border: 1px solid rgba(69, 224, 199, 0.18);
  pointer-events: none;
}
.hero__sweep::before, .hero__sweep::after {
  content: '';
  position: absolute;
  inset: 60px;
  border-radius: 50%;
  border: 1px solid rgba(69, 224, 199, 0.12);
}
.hero__sweep::after { inset: 120px; }

.hero__ping {
  position: absolute;
  top: -120px;
  right: -160px;
  width: 420px;
  height: 420px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(69,224,199,0.25), transparent 70%);
  animation: ping 3.2s ease-out 0.2s 1;
}

@keyframes ping {
  0% { transform: scale(0.2); opacity: 0.9; }
  100% { transform: scale(1); opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .hero__ping { animation: none; }
}

.hero h1 {
  font-size: clamp(2rem, 4vw, 2.75rem);
  max-width: 20ch;
  color: var(--foam-100);
}

.hero .lede {
  margin-top: 14px;
  max-width: 46ch;
  font-size: 1.05rem;
}

/* ---- Product list -------------------------------------------------- */

.catalog {
  padding: 8px 24px 80px;
}

.catalog__row {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 20px 0;
  border-bottom: 1px solid var(--trench-700);
}

.catalog__row:first-child { border-top: 1px solid var(--trench-700); }

.gauge {
  flex: none;
  width: 52px;
  height: 52px;
}

.catalog__info { flex: 1; min-width: 0; }

.catalog__info h3 {
  font-size: 1.05rem;
  color: var(--foam-100);
  font-weight: 600;
}

.catalog__info .duration {
  font-family: var(--font-gauge);
  font-size: 0.75rem;
  color: var(--slate-500);
  margin-top: 2px;
}

.catalog__price {
  font-family: var(--font-gauge);
  font-size: 1.15rem;
  color: var(--glow-400);
  white-space: nowrap;
}

.catalog__price .cents { color: var(--slate-400); font-size: 0.85em; }

.btn {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.9rem;
  border: none;
  border-radius: var(--radius-sm);
  padding: 10px 18px;
  cursor: pointer;
  transition: transform 0.08s ease, background 0.15s ease;
}
.btn:active { transform: translateY(1px); }

.btn--primary {
  background: var(--glow-400);
  color: var(--abyss-950);
}
.btn--primary:hover { background: var(--glow-500); }

.btn--ghost {
  background: transparent;
  color: var(--foam-100);
  border: 1px solid var(--trench-700);
}
.btn--ghost:hover { border-color: var(--glow-400); }

.btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* ---- Modal (checkout) ------------------------------------------------ */

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(6, 11, 18, 0.78);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 50;
}

.modal {
  width: 100%;
  max-width: 420px;
  background: var(--abyss-900);
  border: 1px solid var(--trench-700);
  border-radius: var(--radius-md);
  padding: 28px;
  max-height: 90vh;
  overflow-y: auto;
}

.modal h2 { font-size: 1.2rem; margin-bottom: 6px; }
.modal .modal__product { color: var(--slate-400); font-size: 0.9rem; margin-bottom: 20px; }

.field { margin-bottom: 16px; }
.field label {
  display: block;
  font-size: 0.8rem;
  color: var(--slate-400);
  margin-bottom: 6px;
}
.field input {
  width: 100%;
  padding: 11px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--trench-700);
  background: var(--abyss-950);
  color: var(--foam-100);
  font-family: var(--font-body);
  font-size: 0.95rem;
}
.field input:focus { border-color: var(--glow-400); outline: none; }

.provider-choice {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
}

.provider-choice button {
  flex: 1;
  padding: 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--trench-700);
  background: var(--abyss-950);
  color: var(--foam-100);
  cursor: pointer;
  font-weight: 600;
  font-size: 0.9rem;
}
.provider-choice button[aria-pressed="true"] {
  border-color: var(--glow-400);
  color: var(--glow-400);
}

.pay-area { margin-top: 6px; min-height: 50px; }

.modal__error {
  color: var(--danger-400);
  font-size: 0.85rem;
  margin-top: 10px;
  display: none;
}
.modal__error.visible { display: block; }

.modal__close {
  background: none;
  border: none;
  color: var(--slate-500);
  float: right;
  font-size: 1rem;
  cursor: pointer;
}

/* ---- Status / success page -------------------------------------------- */

.status-card {
  max-width: 420px;
  margin: 90px auto;
  padding: 32px;
  text-align: center;
  border: 1px solid var(--trench-700);
  border-radius: var(--radius-md);
  background: var(--abyss-900);
}

.status-card .depth-icon { margin: 0 auto 18px; display: block; }
.status-card h1 { font-size: 1.4rem; margin-bottom: 8px; }
.status-card .ref {
  font-family: var(--font-gauge);
  font-size: 0.8rem;
  color: var(--slate-500);
  margin-top: 10px;
}

/* ---- Admin ------------------------------------------------------------ */

.admin-shell { max-width: 1080px; margin: 0 auto; padding: 32px 24px 80px; }

.admin-login {
  max-width: 340px;
  margin: 110px auto;
  padding: 30px;
  border: 1px solid var(--trench-700);
  border-radius: var(--radius-md);
  background: var(--abyss-900);
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 1px;
  background: var(--trench-700);
  border: 1px solid var(--trench-700);
  border-radius: var(--radius-md);
  overflow: hidden;
  margin: 28px 0 36px;
}

.stat-cell {
  background: var(--abyss-900);
  padding: 18px 20px;
}

.stat-cell .label {
  font-size: 0.75rem;
  color: var(--slate-500);
  margin-bottom: 6px;
}

.stat-cell .value {
  font-family: var(--font-gauge);
  font-size: 1.4rem;
  color: var(--glow-400);
}

table.orders {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}

table.orders th {
  text-align: left;
  font-size: 0.72rem;
  color: var(--slate-500);
  text-transform: none;
  padding: 10px 12px;
  border-bottom: 1px solid var(--trench-700);
}

table.orders td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--trench-700);
  color: var(--foam-100);
  font-family: var(--font-gauge);
  font-size: 0.82rem;
}

.pill {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 20px;
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 600;
}
.pill--paid { background: rgba(69,224,199,0.15); color: var(--glow-400); }
.pill--pending { background: rgba(242,184,75,0.15); color: var(--lure-400); }
.pill--failed { background: rgba(239,106,106,0.15); color: var(--danger-400); }

.toolbar {
  display: flex;
  gap: 10px;
  margin-bottom: 16px;
  align-items: center;
}

.toolbar select {
  background: var(--abyss-900);
  border: 1px solid var(--trench-700);
  color: var(--foam-100);
  border-radius: var(--radius-sm);
  padding: 8px 10px;
  font-family: var(--font-body);
}

@media (max-width: 620px) {
  .catalog__row { flex-wrap: wrap; }
  .gauge { display: none; }
}

/* ---- Product category icon --------------------------------------- */

.pic {
  flex: none;
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  background: var(--abyss-800);
  border: 1px solid var(--trench-700);
  display: flex;
  align-items: center;
  justify-content: center;
}
.pic svg { width: 22px; height: 22px; stroke: var(--glow-400); }

/* ---- Trust bar ------------------------------------------------------- */

.trust-bar {
  border-top: 1px solid var(--trench-700);
  border-bottom: 1px solid var(--trench-700);
  padding: 18px 24px;
  display: flex;
  gap: 28px;
  flex-wrap: wrap;
  justify-content: center;
  color: var(--slate-400);
  font-size: 0.85rem;
}
.trust-bar strong { color: var(--foam-100); font-family: var(--font-gauge); }

/* ---- Section shell ---------------------------------------------------- */

.section {
  padding: 64px 24px;
  border-top: 1px solid var(--trench-700);
}
.section__eyebrow {
  color: var(--glow-400);
  font-size: 0.8rem;
  font-weight: 600;
  margin-bottom: 10px;
}
.section h2 {
  font-size: clamp(1.5rem, 3vw, 2rem);
  max-width: 24ch;
}
.section .lede { margin-top: 10px; }

/* ---- Comparison table -------------------------------------------------- */

.compare-list { margin-top: 30px; display: flex; flex-direction: column; gap: 14px; }

.compare-row {
  display: grid;
  grid-template-columns: 1.4fr 0.9fr 0.9fr 0.7fr;
  align-items: center;
  gap: 12px;
  padding: 16px 18px;
  border: 1px solid var(--trench-700);
  border-radius: var(--radius-md);
  background: var(--abyss-900);
}
.compare-row .name { font-weight: 600; }
.compare-row .name .dur { display:block; font-family: var(--font-gauge); font-size: 0.72rem; color: var(--slate-500); font-weight: 400; margin-top: 2px; }
.compare-row .figure { font-family: var(--font-gauge); text-align: right; }
.compare-row .figure.retail { color: var(--slate-500); text-decoration: line-through; }
.compare-row .figure.ours { color: var(--glow-400); font-size: 1.05rem; }
.compare-row .savings { text-align: right; }

.compare-head {
  display: grid;
  grid-template-columns: 1.4fr 0.9fr 0.9fr 0.7fr;
  gap: 12px;
  padding: 0 18px;
  font-size: 0.72rem;
  color: var(--slate-500);
}
.compare-head span:not(:first-child) { text-align: right; }

.compare-footnote { margin-top: 18px; font-size: 0.78rem; color: var(--slate-500); }

@media (max-width: 620px) {
  .compare-row, .compare-head { grid-template-columns: 1.3fr 1fr 0.8fr; }
  .compare-row .savings, .compare-head span:nth-child(3) { display: none; }
}

/* ---- Reviews ------------------------------------------------------- */

.reviews-grid {
  margin-top: 30px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
}
.review-card {
  border: 1px solid var(--trench-700);
  border-radius: var(--radius-md);
  padding: 18px;
  background: var(--abyss-900);
}
.review-card .stars { color: var(--lure-400); font-size: 0.85rem; letter-spacing: 1px; }
.review-card p { margin: 10px 0 0; color: var(--foam-100); font-size: 0.92rem; }
.review-card .who { margin-top: 12px; font-size: 0.78rem; color: var(--slate-500); }

.reviews-empty {
  margin-top: 30px;
  border: 1px dashed var(--trench-700);
  border-radius: var(--radius-md);
  padding: 36px 24px;
  text-align: center;
  color: var(--slate-500);
}

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

.site-footer {
  border-top: 1px solid var(--trench-700);
  padding: 48px 24px 32px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 32px;
  max-width: 880px;
  margin: 0 auto;
}
.footer-grid h4 {
  font-size: 0.75rem;
  color: var(--slate-500);
  font-weight: 600;
  margin-bottom: 12px;
}
.footer-grid ul { list-style: none; margin: 0; padding: 0; }
.footer-grid li { margin-bottom: 8px; }
.footer-grid a { color: var(--slate-400); font-size: 0.88rem; }
.footer-grid a:hover { color: var(--glow-400); }
.footer-bottom {
  max-width: 880px;
  margin: 32px auto 0;
  padding-top: 20px;
  border-top: 1px solid var(--trench-700);
  color: var(--slate-500);
  font-size: 0.78rem;
}

@media (max-width: 620px) {
  .footer-grid { grid-template-columns: 1fr; }
}
