/* Edelware landing — self-contained, no external assets, no build step.
   Calm Swiss aesthetic: system fonts, generous whitespace, one accent,
   light + dark via prefers-color-scheme.

   Design tokens
   -------------
   Spacing scale (8px base, modular):
     --s1 4  --s2 8  --s3 12  --s4 16  --s5 24  --s6 32  --s7 48  --s8 64  --s9 96
   Type scale: fluid clamps, clear h1 > h2 > h3 > body ramp.
   Colour: one accent (Swiss red), neutral warm-grey ink; light + dark parity.
   Radius: single card radius + pill radius.
*/

:root {
  /* Neutrals + accent — light */
  --bg: #fbfbf9;
  --surface: #ffffff;
  --ink: #1a1c1e;
  --ink-soft: #55595e;
  --ink-faint: #83878d;
  --line: #e6e4dd;
  --line-strong: #d6d3c9;
  --accent: #b23a2e;        /* restrained Swiss red */
  --accent-hover: #9a2f24;
  --accent-ink: #ffffff;
  --accent-tint: color-mix(in srgb, var(--accent) 8%, var(--surface));

  /* Focus ring */
  --focus: color-mix(in srgb, var(--accent) 55%, transparent);

  /* Shadows — soft, used sparingly */
  --shadow-sm: 0 1px 2px rgba(20, 22, 24, 0.04), 0 1px 3px rgba(20, 22, 24, 0.05);
  --shadow-md: 0 2px 6px rgba(20, 22, 24, 0.05), 0 8px 24px rgba(20, 22, 24, 0.06);

  /* Radius */
  --radius: 14px;
  --radius-sm: 10px;

  /* Layout */
  --maxw: 1080px;
  --gutter: clamp(16px, 2.6vw, 24px); /* fluid: smaller side border on narrow/tablet, caps at 24 on desktop */

  /* Spacing scale */
  --s1: 4px;  --s2: 8px;  --s3: 12px; --s4: 16px; --s5: 24px;
  --s6: 32px; --s7: 48px; --s8: 64px; --s9: 96px;

  --font: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #16181a;
    --surface: #1e2124;
    --ink: #ecedee;
    --ink-soft: #a9adb3;
    --ink-faint: #7f8489;
    --line: #2c3034;
    --line-strong: #3a3f44;
    --accent: #e0685b;
    --accent-hover: #ec7c70;
    --accent-ink: #16181a;
    --accent-tint: color-mix(in srgb, var(--accent) 14%, var(--surface));
    --focus: color-mix(in srgb, var(--accent) 65%, transparent);
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 2px 8px rgba(0, 0, 0, 0.35), 0 12px 30px rgba(0, 0, 0, 0.28);
  }
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* Links */
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hover); text-decoration: underline; text-underline-offset: 2px; }

/* Visible, consistent keyboard focus everywhere */
a:focus-visible,
.btn:focus-visible,
button:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 3px;
  border-radius: 6px;
}
.btn:focus-visible { outline-offset: 3px; }

/* Horizontal gutter only — set as longhands so it never clobbers the vertical
   section padding below via specificity (a `padding` shorthand on this class
   would reset top/bottom to 0, which is the bug that made sections touch). */
.wrap {
  max-width: var(--maxw);
  margin: 0 auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}

/* --------------------------------------------------------------------------
   Header
   -------------------------------------------------------------------------- */
.site-header {
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0;
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  backdrop-filter: saturate(1.4) blur(10px);
  -webkit-backdrop-filter: saturate(1.4) blur(10px);
  z-index: 10;
}
.site-header .wrap {
  display: flex; align-items: center; justify-content: space-between;
  gap: var(--s4);
  min-height: 64px;
  flex-wrap: wrap;
}
.brand {
  font-weight: 700; letter-spacing: -0.02em;
  color: var(--ink); font-size: 1.2rem;
  padding: 4px 0;
}
.brand:hover { text-decoration: none; color: var(--ink); }
.brand .dot { color: var(--accent); }

.nav {
  display: flex; align-items: center;
  flex-wrap: wrap;
  gap: 2px;
  margin: 0 calc(var(--s2) * -1);
}
.nav a {
  color: var(--ink-soft);
  font-size: 0.95rem;
  padding: 8px 12px;
  border-radius: 8px;
  line-height: 1.2;
}
.nav a:hover { color: var(--ink); text-decoration: none; background: var(--accent-tint); }
.nav a[aria-current="page"] { color: var(--ink); font-weight: 600; }

/* --------------------------------------------------------------------------
   Typographic ramp
   -------------------------------------------------------------------------- */
h1 {
  font-size: clamp(2.15rem, 1.4rem + 3.2vw, 3.4rem);
  line-height: 1.08; letter-spacing: -0.03em;
  margin: 0 0 var(--s4);
  font-weight: 700;
}
h2 {
  font-size: clamp(1.5rem, 1.2rem + 1.3vw, 2rem);
  line-height: 1.15; letter-spacing: -0.02em;
  margin: 0 0 var(--s3);
  font-weight: 700;
}
h3 {
  font-size: 1.1rem;
  line-height: 1.3; letter-spacing: -0.01em;
  margin: 0 0 var(--s2);
  font-weight: 650;
}
p { margin: 0 0 var(--s4); }
p:last-child { margin-bottom: 0; }

.eyebrow {
  text-transform: uppercase; letter-spacing: 0.14em;
  font-size: 0.78rem; color: var(--accent); font-weight: 700;
  margin: 0 0 var(--s3);
}

/* --------------------------------------------------------------------------
   Sections — deliberate vertical rhythm (longhands: see .wrap note).
   Every section gets even top/bottom padding so nothing ever touches.
   -------------------------------------------------------------------------- */
section {
  padding-top: clamp(var(--s3), 5vw, var(--s4));
  padding-bottom: clamp(var(--s3), 5vw, var(--s4));
}
.section-lede {
  color: var(--ink-soft);
  max-width: 120ch;
  font-size: 1.05rem;
  margin: 0 0 var(--s6);
}

/* --------------------------------------------------------------------------
   Hero
   -------------------------------------------------------------------------- */
.hero {
  padding-top: clamp(var(--s4), 4vw, 112px);
  padding-bottom: clamp(var(--s4), 6vw, var(--s5));
}
.hero .eyebrow { margin-bottom: var(--s4); }
.hero h1 { max-width: 26ch; }
.hero p.lede {
  font-size: clamp(1.12rem, 1rem + 0.7vw, 1.35rem);
  color: var(--ink-soft);
  max-width: 52ch;
  margin: 0 0 var(--s6);
}
.hero .btn-row { margin-top: var(--s2); }

/* --------------------------------------------------------------------------
   Buttons
   -------------------------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: var(--s2);
  min-height: 46px;
  padding: 11px 22px;
  border-radius: 999px;
  background: var(--accent); color: var(--accent-ink);
  font-weight: 600; font-size: 0.98rem; line-height: 1.2;
  border: 1px solid var(--accent);
  transition: background-color 0.15s ease, border-color 0.15s ease,
              transform 0.15s ease, box-shadow 0.15s ease, color 0.15s ease;
}
.btn:hover {
  text-decoration: none; color: var(--accent-ink);
  background: var(--accent-hover); border-color: var(--accent-hover);
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}
.btn:active { transform: translateY(0); box-shadow: none; }
.btn.ghost {
  background: var(--surface); color: var(--ink);
  border-color: var(--line-strong);
}
.btn.ghost:hover {
  background: var(--surface); color: var(--ink);
  border-color: var(--accent);
  box-shadow: var(--shadow-sm);
}
.btn-row { display: flex; gap: var(--s3); flex-wrap: wrap; align-items: center; }

/* --------------------------------------------------------------------------
   Product cards
   -------------------------------------------------------------------------- */
.cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));  /* two products, always balanced */
  gap: var(--s5);
}
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: var(--s6);
  display: flex; flex-direction: column;
  box-shadow: var(--shadow-sm);
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}
.card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--line-strong);
}
.card h3 { font-size: 1.35rem; letter-spacing: -0.02em; margin-bottom: var(--s2); }
.card .price {
  color: var(--ink-soft); font-size: 0.9rem;
  margin: 0 0 var(--s4);
}
.card p { color: var(--ink-soft); margin: 0 0 var(--s5); flex: 1; }
.card .card-cta { margin-top: auto; }

/* --------------------------------------------------------------------------
   Feature grid
   -------------------------------------------------------------------------- */
.features {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));  /* 2×2 — never a lonely 3+1 row */
  gap: var(--s6) var(--s5);
}
.feature h3 { font-size: 1.05rem; margin-bottom: var(--s2); }
.feature p { color: var(--ink-soft); margin: 0; font-size: 0.97rem; }

/* --------------------------------------------------------------------------
   Callout / promise band
   -------------------------------------------------------------------------- */
.band {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: clamp(var(--s6), 4vw, var(--s7));
  box-shadow: var(--shadow-sm);
}
.band h2 { margin-bottom: var(--s3); }
.band .section-lede { margin-bottom: var(--s4); }
.band .section-lede:last-child,
.band p:last-child { margin-bottom: 0; }
.band .btn-row { margin-top: var(--s4); }
.band .muted { margin-top: var(--s3); }

/* --------------------------------------------------------------------------
   Prose (product + trust pages)
   -------------------------------------------------------------------------- */
.prose { max-width: 66ch; }
.prose h2 { margin-top: var(--s7); margin-bottom: var(--s3); }
.prose h2:first-child { margin-top: 0; }
.prose h3 { margin-top: var(--s5); margin-bottom: var(--s1); font-size: 1.1rem; }
.prose p { color: var(--ink-soft); }
.prose ul { padding-left: 1.25em; margin: 0 0 var(--s4); }
.prose li { margin: var(--s2) 0; color: var(--ink-soft); }
.prose li strong { color: var(--ink); }
.muted { color: var(--ink-soft); font-size: 0.95rem; }

/* --------------------------------------------------------------------------
   Steps
   -------------------------------------------------------------------------- */
.steps {
  counter-reset: step;
  display: grid; gap: var(--s4);
  padding: 0; margin: 0; list-style: none;
  max-width: 120ch;
}
.steps li {
  position: relative;
  padding-left: 46px;
  color: var(--ink-soft);
  min-height: 30px;
  padding-top: 3px;
}
.steps li::before {
  counter-increment: step; content: counter(step);
  position: absolute; left: 0; top: 0;
  width: 30px; height: 30px; border-radius: 50%;
  background: var(--accent); color: var(--accent-ink);
  display: grid; place-items: center;
  font-weight: 700; font-size: 0.9rem;
  line-height: 1;
}

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */
.site-footer {
  border-top: 1px solid var(--line);
  margin-top: var(--s8);
  padding-top: var(--s6);
  padding-bottom: var(--s6);
  color: var(--ink-soft);
  font-size: 0.92rem;
}
.site-footer .wrap {
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: var(--s4);
}
.site-footer nav {
  display: flex; flex-wrap: wrap;
  gap: var(--s1) var(--s5);
  margin: 0 -8px;
}
.site-footer a {
  color: var(--ink-soft);
  padding: 4px 8px; border-radius: 6px;
}
.site-footer a:hover { color: var(--ink); text-decoration: none; }
.site-footer .copyright { color: var(--ink-faint); }

/* --------------------------------------------------------------------------
   Utilities
   -------------------------------------------------------------------------- */
.center { text-align: center; }
.pill {
  display: inline-block;
  font-size: 0.82rem;
  font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
  padding: 3px 10px;
  background: var(--accent-tint);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  max-width: 100%;
  overflow-wrap: anywhere;
}

/* --------------------------------------------------------------------------
   Responsive — mobile ≤ 640px
   -------------------------------------------------------------------------- */
@media (max-width: 540px) {
  body { font-size: 16px; }

  .site-header .wrap {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--s2);
    padding-top: var(--s3);
    padding-bottom: var(--s3);
  }
  .nav {
    width: 100%;
    margin: 0 -10px;
  }
  .nav a { padding: 10px 12px; }        /* larger tap target */

  /* Stack CTAs full-width for easy tapping */
  .btn-row { flex-direction: column; align-items: stretch; gap: var(--s2); }
  .btn { width: 100%; }

  /* Single column for cards + features */
  .cards, .features { grid-template-columns: 1fr; }
}

/* --------------------------------------------------------------------------
   Motion preferences
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
  .btn:hover, .card:hover { transform: none; }
}
