/* ==========================================================================
   Dive-Center App shop – styles of the marketing website (Website/assets/css/style.css)
   plus the plan cards and checkout. Pure CSS, no external resources; font served locally (Inter, OFL).
   ========================================================================== */

@font-face {
  font-family: "Inter";
  src: url("../fonts/Inter-Variable-latin.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

/* ---------- Design tokens ---------- */
:root {
  /* Dark theme is the default for everyone */
  color-scheme: dark;
  --red: #c8312f;            /* signalkontor red, lifted for contrast on dark */
  --red-dark: #a20b0b;       /* original logo red */
  --red-soft: #2a1414;
  --ink: #f1f0ee;
  --ink-2: #c9c8c4;
  --muted: #9a9ca5;
  --line: #2a2c33;
  --paper: #111216;
  --surface: #181a1f;
  --on-red: #ffffff;

  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --radius: 18px;
  --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .3);
  --shadow-lg: 0 2px 4px rgba(0, 0, 0, .3), 0 20px 48px rgba(0, 0, 0, .45);
  --container: 1200px;
  --gutter: clamp(16px, 4vw, 40px);
  --header-h: 72px;
}

/* ---------- Reset / base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 16px); }
body {
  margin: 0;
  font-family: var(--font);
  font-size: clamp(1rem, .96rem + .2vw, 1.0625rem);
  line-height: 1.65;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
a { color: var(--red); text-underline-offset: .2em; }
a:hover { color: var(--red-dark); }
h1, h2, h3, h4 { line-height: 1.15; letter-spacing: -.02em; margin: 0 0 .5em; font-weight: 700; }
p { margin: 0 0 1em; }
ul { margin: 0; padding: 0; }
:focus-visible { outline: 3px solid var(--red); outline-offset: 3px; border-radius: 4px; }

.skip-link {
  position: absolute; left: 16px; top: -100px; z-index: 100;
  background: var(--red); color: var(--on-red); padding: .6em 1em; border-radius: var(--radius-sm);
  text-decoration: none; font-weight: 600;
}
.skip-link:focus { top: 12px; color: var(--on-red); }

.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: var(--gutter); }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  height: var(--header-h);
  background: color-mix(in srgb, var(--paper) 82%, transparent);
  backdrop-filter: saturate(1.4) blur(14px);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s, box-shadow .3s;
}
.site-header.is-scrolled { border-bottom-color: var(--line); }
.site-header .container { height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 24px; }

.brand { display: inline-flex; align-items: center; border-radius: 8px; }
.brand img { width: clamp(150px, 30vw, 190px); height: auto; }

/* ---------- Hero ---------- */
.hero { position: relative; overflow: hidden; padding: clamp(56px, 10vw, 120px) 0 clamp(64px, 10vw, 128px); }
.hero .container { display: grid; grid-template-columns: 1.15fr .85fr; align-items: center; gap: clamp(32px, 6vw, 80px); }
.eyebrow {
  display: inline-flex; align-items: center; gap: .6em;
  font-size: .8rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--red);
  margin-bottom: 1.2em;
}
.eyebrow::before {
  content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--red);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--red) 18%, transparent);
}
.hero h1 { font-size: clamp(2.6rem, 1.4rem + 4.2vw, 4.4rem); font-weight: 800; letter-spacing: -.035em; line-height: 1.02; margin-bottom: .35em; }
.hero h1 .accent { color: var(--red); }
.hero .lead { font-size: clamp(1.1rem, 1rem + .5vw, 1.35rem); color: var(--ink-2); max-width: 34ch; margin-bottom: 2em; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }

/* Signal graphic: the two lighthouse circles of the logo, sending signals */
.signal { position: relative; aspect-ratio: 1; width: 100%; max-width: 440px; justify-self: center; }
.signal .ring {
  position: absolute; left: 58%; top: 42%; width: 22%; aspect-ratio: 1; border-radius: 50%;
  border: 2px solid var(--red); transform: translate(-50%, -50%) scale(1); opacity: 0;
  animation: pulse 4.8s cubic-bezier(.2, .6, .3, 1) infinite;
}
.signal .ring:nth-child(2) { animation-delay: 1.2s; }
.signal .ring:nth-child(3) { animation-delay: 2.4s; }
.signal .ring:nth-child(4) { animation-delay: 3.6s; }
.signal .dot-big, .signal .dot-small { position: absolute; border-radius: 50%; background: var(--red); transform: translate(-50%, -50%); }
.signal .dot-big { left: 58%; top: 42%; width: 22%; aspect-ratio: 1; box-shadow: 0 18px 50px color-mix(in srgb, var(--red) 40%, transparent); }
.signal .dot-small { left: 36%; top: 60%; width: 10%; aspect-ratio: 1; }
.signal .static-ring {
  position: absolute; left: 58%; top: 42%; aspect-ratio: 1; border-radius: 50%;
  border: 1px dashed color-mix(in srgb, var(--red) 28%, transparent); transform: translate(-50%, -50%);
}
.signal .static-ring.r1 { width: 52%; }
.signal .static-ring.r2 { width: 82%; }
.signal .static-ring.r3 { width: 112%; border-style: solid; border-color: var(--line); }
@keyframes pulse {
  0%   { transform: translate(-50%, -50%) scale(1); opacity: .8; }
  100% { transform: translate(-50%, -50%) scale(5); opacity: 0; }
}

@media (max-width: 860px) {
  .hero .container { grid-template-columns: 1fr; }
  .signal { max-width: 300px; order: -1; justify-self: start; margin-left: -6%; }
}
@media (max-width: 520px) { .signal { max-width: 220px; } }

/* ---------- Sections ---------- */
.section { padding: clamp(72px, 10vw, 128px) 0; }
.section-alt { background: var(--surface); border-block: 1px solid var(--line); }
/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--line); padding: 40px 0; font-size: .92rem; color: var(--muted); }
.site-footer .container { display: flex; flex-wrap: wrap; gap: 16px 32px; align-items: center; justify-content: space-between; }
.site-footer nav ul { list-style: none; display: flex; flex-wrap: wrap; gap: 6px 24px; }
.site-footer a { color: var(--ink-2); text-decoration: none; }
.site-footer a:hover { color: var(--red); }
.footer-brand { display: flex; align-items: center; gap: 10px; }
.footer-brand .dots { display: inline-flex; align-items: flex-end; gap: 3px; }
.footer-brand .dots i { display: block; border-radius: 50%; background: var(--red); }
.footer-brand .dots i:first-child { width: 6px; height: 6px; }
.footer-brand .dots i:last-child { width: 11px; height: 11px; margin-bottom: 5px; }

.wordmark {
  padding-left: 14px; border-left: 1px solid var(--line);
  color: var(--ink); font-weight: 700; font-size: 1rem; letter-spacing: -.01em; white-space: nowrap;
}
@media (max-width: 420px) { .brand { gap: 10px; } .brand img { width: 112px; } .wordmark { padding-left: 10px; font-size: .9rem; } }
@media (max-width: 340px) { .wordmark { display: none; } }


.checks { list-style: none; display: grid; gap: 12px; margin-top: 1.4em; }
.checks li { display: grid; grid-template-columns: 24px 1fr; gap: 12px; color: var(--ink-2); }
.checks li::before {
  content: ""; width: 24px; height: 24px; margin-top: 1px; border-radius: 50%;
  background: var(--red-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23c8312f' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 12.5 4 4 8-9'/%3E%3C/svg%3E") center / 14px no-repeat;
}
.checks strong { color: var(--ink); font-weight: 600; }

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .signal .ring { display: none; }
}

/* ==========================================================================
   Shop
   ========================================================================== */
.brand { gap: 14px; text-decoration: none; }
.shop-nav { display: flex; gap: 4px; align-items: center; }
.shop-nav a {
  display: block; padding: .5em .9em; border-radius: 999px;
  color: var(--ink-2); text-decoration: none; font-weight: 500; font-size: .95rem;
  transition: color .2s, background-color .2s;
}
.shop-nav a:hover { color: var(--ink); background: var(--red-soft); }
@media (max-width: 860px) { .shop-nav .hide-sm { display: none; } }

main { overflow-x: clip; }
.hero-compact { padding: clamp(40px, 7vw, 88px) 0 clamp(32px, 5vw, 56px); }
.hero-compact .signal { max-width: 340px; }
.hero h1 { font-size: clamp(2.3rem, 1.3rem + 3.6vw, 3.9rem); }
.hero .lead { max-width: 44ch; }
.hero .checks { margin: 0 0 2em; }
.hero-note { margin: 1.4em 0 0; color: var(--muted); font-size: .92rem; }
.confirm-progress { max-width: 360px; }
@media (max-width: 860px) { .hero-compact .signal { max-width: 200px; } }

.section.pricing { padding-top: 0; }
.pricing-loading { display: grid; place-items: center; min-height: 320px; }

/* Monthly / yearly toggle */
.interval-switch {
  display: flex; align-items: center; justify-content: center; flex-wrap: wrap;
  gap: 4px; margin: 0 auto clamp(28px, 4vw, 44px); font-weight: 600; color: var(--muted);
}
.interval-switch .is-on { color: var(--ink); }
.interval-switch .mud-switch { margin: 0; }
.save-chip { font-weight: 700; }
.checkout-summary .interval-switch { justify-content: flex-start; margin: 0 0 20px; }

/* Plan cards */
.plans { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; align-items: stretch; }
@media (max-width: 1000px) { .plans { grid-template-columns: repeat(2, minmax(0, 1fr)); } .plan.is-on-premise { grid-column: 1 / -1; } }
@media (max-width: 680px) { .plans { grid-template-columns: 1fr; } }
.plan {
  position: relative; display: flex; flex-direction: column;
  padding: clamp(24px, 3vw, 36px); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  transition: transform .3s, box-shadow .3s, border-color .3s;
}
.plan:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: color-mix(in srgb, var(--red) 35%, var(--line)); }
.plan.is-highlighted { border-color: var(--red); box-shadow: 0 0 0 1px var(--red), var(--shadow-lg); }
.plan.is-on-premise { background: transparent; border-style: dashed; }
.plan-badge {
  position: absolute; top: -13px; left: clamp(24px, 3vw, 36px);
  padding: .3em .9em; border-radius: 999px; background: var(--red); color: var(--on-red);
  font-size: .75rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
}
.plan h3 { font-size: 1.5rem; margin: 0 0 .2em; }
.plan-tagline { color: var(--muted); font-size: .95rem; min-height: 3em; }
.plan-price { display: flex; align-items: baseline; gap: .4em; margin-top: .4em; }
.plan-price .amount { font-size: clamp(2.4rem, 1.8rem + 2vw, 3.2rem); font-weight: 800; letter-spacing: -.03em; line-height: 1.1; }
.plan.is-on-premise .plan-price .amount { font-size: clamp(1.9rem, 1.5rem + 1.4vw, 2.4rem); }
.plan-price .per { color: var(--muted); font-weight: 500; }
.plan-billing { color: var(--muted); font-size: .9rem; margin: .2em 0 1.4em; }
.plan-cta { border-radius: 999px !important; padding-block: .8em !important; }
.plan-includes { margin: 1.6em 0 0; font-weight: 600; color: var(--ink); font-size: .95rem; }
.plan .checks { margin-top: .9em; }
.pricing-note { margin: 32px auto 0; max-width: 70ch; text-align: center; color: var(--muted); font-size: .9rem; }

/* Checkout */
.checkout { padding-top: clamp(40px, 6vw, 72px); }
.checkout-grid { display: grid; grid-template-columns: .85fr 1.15fr; gap: clamp(28px, 5vw, 64px); align-items: start; }
@media (max-width: 900px) { .checkout-grid { grid-template-columns: 1fr; } }
.checkout-summary h1 { font-size: clamp(2rem, 1.4rem + 2vw, 2.8rem); font-weight: 800; letter-spacing: -.03em; margin-bottom: .6em; }
.summary-note { color: var(--muted); font-size: .92rem; margin: 1.2em 0 0; }
.form {
  background: var(--surface); border: 1px solid var(--line); border-radius: calc(var(--radius) + 4px);
  padding: clamp(20px, 4vw, 40px); box-shadow: var(--shadow-lg); display: grid; gap: 20px;
}
.form h2 { font-size: 1.5rem; margin: 0 0 .3em; }
.form-intro { color: var(--muted); margin: 0; font-size: .95rem; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 600px) { .form-row { grid-template-columns: 1fr; } }
.form-foot { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; justify-content: space-between; }
.form-foot small { color: var(--muted); font-size: .85rem; max-width: 40ch; }
.terms .mud-typography, .terms label { color: var(--ink-2); font-size: .95rem; }
.field-error { color: var(--mud-palette-error); font-size: .85rem; margin: 2px 0 0 12px; }

/* MudBlazor on the website look */
.mud-layout { background: var(--paper); }
.mud-input-control .mud-input-outlined-border { border-radius: var(--radius-sm); }
.mud-button-filled.mud-button-filled-primary { box-shadow: 0 6px 20px color-mix(in srgb, var(--red) 30%, transparent); }
.mud-button-root { border-radius: 999px; }

#blazor-error-ui {
  display: none; position: fixed; inset: auto 0 0 0; z-index: 1000;
  padding: 12px 20px; background: var(--red-dark); color: #fff;
}
#blazor-error-ui .reload { color: #fff; font-weight: 700; margin-left: 8px; }
