/* ============================================================
   Rizzing — landing page
   Palette: black (primary) · gold (secondary) · white
   ============================================================ */

:root {
  color-scheme: dark;

  /* Brand colours — identical in both themes */
  --gold: #d4a437;
  --gold-bright: #f0c14b;
  --on-gold: #0a0a0a; /* text sitting on a gold fill */

  /* Themed surfaces and ink */
  --bg: #0a0a0a;
  --bg-deep: #000000;
  --fg: #ffffff;
  --fg-soft: rgba(255, 255, 255, 0.72);
  --fg-faint: rgba(255, 255, 255, 0.44);
  --line: rgba(255, 255, 255, 0.12);
  --surface-a: rgba(255, 255, 255, 0.045);
  --surface-b: rgba(255, 255, 255, 0.012);
  --skeleton: rgba(255, 255, 255, 0.09);
  --gold-dim: rgba(212, 164, 55, 0.16);
  --gold-ink: #d4a437; /* gold used as text, needs contrast with --bg */
  --header-fade: rgba(10, 10, 10, 0.92);
  --header-fade-0: rgba(10, 10, 10, 0);
  --glow-strong: rgba(212, 164, 55, 0.15);
  --glow-mid: rgba(212, 164, 55, 0.13);
  --glow-top: rgba(212, 164, 55, 0.12);
  --glow-soft: rgba(212, 164, 55, 0.07);
  --title-grad-1: #ffffff;
  --title-grad-2: rgba(255, 255, 255, 0.68);
  --phone-shadow: 0 46px 90px -34px rgba(0, 0, 0, 0.95),
    0 26px 80px -34px rgba(212, 164, 55, 0.45);

  --header-h: 76px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

:root[data-theme="light"] {
  color-scheme: light;

  --bg: #f7f5f1;
  --bg-deep: #ffffff;
  --fg: #12100c;
  --fg-soft: rgba(18, 16, 12, 0.72);
  --fg-faint: rgba(18, 16, 12, 0.46);
  --line: rgba(18, 16, 12, 0.14);
  --surface-a: rgba(18, 16, 12, 0.05);
  --surface-b: rgba(18, 16, 12, 0.015);
  --skeleton: rgba(18, 16, 12, 0.1);
  --gold-dim: rgba(212, 164, 55, 0.2);
  --gold-ink: #8f6510;
  --header-fade: rgba(247, 245, 241, 0.94);
  --header-fade-0: rgba(247, 245, 241, 0);
  --glow-strong: rgba(212, 164, 55, 0.3);
  --glow-mid: rgba(212, 164, 55, 0.24);
  --glow-top: rgba(212, 164, 55, 0.22);
  --glow-soft: rgba(212, 164, 55, 0.14);
  --title-grad-1: #12100c;
  --title-grad-2: rgba(18, 16, 12, 0.68);
  --phone-shadow: 0 30px 64px -30px rgba(0, 0, 0, 0.45),
    0 22px 66px -32px rgba(212, 164, 55, 0.5);
}

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

html,
body {
  height: 100%;
  margin: 0;
  padding: 0;
}

body {
  background: var(--bg);
  color: var(--fg);
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow: hidden; /* the snap container owns the scroll */
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ============================================================
   Scroll snapping — mandatory, one full viewport per section
   ============================================================ */

.snap-container {
  height: 100dvh;
  overflow-y: scroll;
  overflow-x: hidden;
  scroll-snap-type: y mandatory;
  scroll-behavior: smooth;
  scrollbar-width: none;
  -ms-overflow-style: none;
  overscroll-behavior-y: none;
}

.snap-container::-webkit-scrollbar {
  display: none;
}

.section {
  position: relative;
  min-height: 100dvh;
  scroll-snap-align: start;
  scroll-snap-stop: always;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: calc(var(--header-h) + 24px) clamp(20px, 6vw, 96px) 64px;
}

@media (prefers-reduced-motion: reduce) {
  .snap-container {
    scroll-behavior: auto;
  }
}

/* ============================================================
   Header
   ============================================================ */

.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  height: var(--header-h);
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 clamp(20px, 6vw, 96px);
  background: linear-gradient(to bottom, var(--header-fade), var(--header-fade-0));
  pointer-events: none;
}

.wordmark {
  pointer-events: auto;
  font-family: "Outfit", sans-serif;
  font-weight: 700;
  font-size: 1.35rem;
  letter-spacing: -0.02em;
  color: var(--fg);
  text-decoration: none;
  padding-bottom: 4px;
  border-bottom: 1.5px solid var(--gold);
  transition: color 0.3s var(--ease), border-color 0.3s var(--ease);
}

.wordmark:hover {
  color: var(--gold-ink);
  border-color: var(--gold-bright);
}

/* ============================================================
   Section dot navigation (hidden until there are 2+ sections)
   ============================================================ */

/* Right rail: theme toggle sits directly above the section dots */
.side-rail {
  position: fixed;
  right: clamp(14px, 2.4vw, 34px);
  top: 50%;
  transform: translateY(-50%);
  z-index: 55;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;

  /* Frosted capsule holding the toggle and the dots, just enough to lift
     them off whatever is scrolling past behind */
  padding: 10px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-a);
  -webkit-backdrop-filter: blur(14px) saturate(120%);
  backdrop-filter: blur(14px) saturate(120%);
}

/* The capsule is the toggle's track now, so the inner pill drops its own
   outline rather than nesting one border inside another */
.side-rail .theme-toggle {
  padding: 0;
  border-color: transparent;
  background: none;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}

.side-rail .theme-knob {
  top: 0;
  left: 0;
}

.section-nav {
  display: none;
  flex-direction: column;
  gap: 14px;
}

.section-nav.is-visible {
  display: flex;
}

.section-nav button {
  width: 9px;
  height: 9px;
  padding: 0;
  border: 1.5px solid var(--fg-faint);
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
  transition: background 0.3s var(--ease), border-color 0.3s var(--ease),
    transform 0.3s var(--ease);
}

.section-nav button:hover {
  border-color: var(--gold);
  transform: scale(1.25);
}

.section-nav button[aria-current="true"] {
  background: var(--gold);
  border-color: var(--gold);
}

/* ============================================================
   Theme toggle
   ============================================================ */

.theme-toggle {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-a);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}

/* Only one copy is on screen at a time: rail on desktop, footer on phones */
.theme-toggle-footer {
  display: none;
}

/* The gold pill that slides between the two icons */
.theme-knob {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 4px 14px -4px rgba(212, 164, 55, 0.9);
  transition: transform 0.42s var(--ease);
}

:root[data-theme="dark"] .theme-knob {
  transform: translateY(30px);
}

.theme-btn {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: none;
  color: var(--fg-faint);
  cursor: pointer;
  transition: color 0.3s var(--ease);
}

.theme-btn:hover {
  color: var(--fg-soft);
}

.theme-btn[aria-pressed="true"] {
  color: var(--on-gold);
}

.theme-btn:focus-visible {
  outline: 2px solid var(--gold-bright);
  outline-offset: 3px;
}

.theme-btn svg {
  width: 15px;
  height: 15px;
  transition: transform 0.5s var(--ease);
}

/* The inactive icon tucks away; the active one settles upright */
.theme-btn[aria-pressed="false"] svg {
  transform: rotate(-35deg) scale(0.86);
}

.theme-btn[aria-pressed="true"] svg {
  transform: rotate(0deg) scale(1);
}

@media (prefers-reduced-motion: reduce) {
  .theme-knob,
  .theme-btn svg {
    transition: none;
  }
}

/* ============================================================
   Hero
   ============================================================ */

.hero {
  background:
    radial-gradient(120% 80% at 50% 112%, var(--glow-strong), transparent 62%),
    radial-gradient(80% 60% at 10% 0%, var(--glow-soft), transparent 60%),
    var(--bg);
}

.hero-inner {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

/* --- Title + FREE badge --- */

.hero-title {
  position: relative;
  display: inline-block; /* shrink-wraps the text so the badge can hug it */
  max-width: 100%;
  margin: 0;
  font-family: "Outfit", sans-serif;
  font-weight: 800;
  font-size: clamp(2.9rem, 8.8vw, 7.2rem);
  line-height: 0.95;
  letter-spacing: -0.045em;
  text-transform: uppercase;
}

.hero-title-text {
  display: block;
  background: linear-gradient(180deg, var(--title-grad-1) 32%, var(--title-grad-2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* One line on desktop, two on small screens */
.hero-title-text br {
  display: none;
}

.free-badge {
  position: absolute;
  left: 0;
  top: -0.52em;
  /* Sized in em so the badge keeps the exact same overlap with the
     headline at every viewport width. */
  width: 1.45em;
  aspect-ratio: 1;
  transform: translateX(-68%) rotate(-14deg);
  display: grid;
  place-items: center;
  z-index: 2;
  animation: badge-float 5.5s ease-in-out infinite;
}

.free-badge svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  fill: var(--gold);
  filter: drop-shadow(0 12px 32px rgba(212, 164, 55, 0.36));
}

.free-badge-text {
  position: relative;
  font-family: "Outfit", sans-serif;
  font-weight: 900;
  font-size: 0.36em;
  line-height: 1;
  letter-spacing: -0.03em;
  color: var(--on-gold);
  text-transform: uppercase;
}

@keyframes badge-float {
  0%,
  100% {
    transform: translateX(-68%) rotate(-14deg) translateY(0);
  }
  50% {
    transform: translateX(-68%) rotate(-11deg) translateY(-9px);
  }
}

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

/* --- Description --- */

.hero-description {
  max-width: 58ch;
  margin: clamp(26px, 3.4vw, 40px) auto 0;
  font-size: clamp(0.98rem, 1.35vw, 1.15rem);
  line-height: 1.65;
  color: var(--fg-soft);
}

/* --- Four feature columns (non-interactive) --- */

.feature-row {
  list-style: none;
  margin: clamp(36px, 5vw, 60px) 0 0;
  padding: clamp(22px, 2.6vw, 30px) 0;
  width: 100%;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  pointer-events: none;
  user-select: none;
}

.feature {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 0 clamp(10px, 1.8vw, 26px);
}

.feature + .feature::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 1px;
  height: 44px;
  background: var(--line);
}

.feature-index {
  font-family: "Outfit", sans-serif;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  color: var(--gold-ink);
}

.feature-name {
  font-family: "Outfit", sans-serif;
  font-size: clamp(0.86rem, 1.15vw, 1.02rem);
  font-weight: 500;
  line-height: 1.35;
  letter-spacing: -0.01em;
  color: var(--fg);
}

/* --- Buttons --- */

.cta-row {
  position: relative; /* anchors .cta-note */
  margin-top: clamp(34px, 4.4vw, 52px);
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 16px;
}

.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 208px;
  padding: 17px 34px;
  border-radius: 6px;
  font-family: "Outfit", sans-serif;
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.3s var(--ease), background 0.3s var(--ease),
    color 0.3s var(--ease), border-color 0.3s var(--ease), box-shadow 0.3s var(--ease);
}

.btn:active {
  transform: translateY(1px) scale(0.99);
}

.btn:focus-visible {
  outline: 2px solid var(--gold-bright);
  outline-offset: 4px;
}

.btn-primary {
  background: var(--gold);
  color: var(--on-gold);
  border: 1px solid var(--gold);
  box-shadow: 0 12px 34px -12px rgba(212, 164, 55, 0.7);
}

.btn-primary:hover {
  background: var(--gold-bright);
  border-color: var(--gold-bright);
  transform: translateY(-2px);
  box-shadow: 0 18px 42px -14px rgba(240, 193, 75, 0.8);
}

.btn-secondary {
  background: transparent;
  color: var(--fg);
  border: 1px solid var(--line);
}

.btn-secondary:hover {
  background: var(--gold-dim);
  border-color: var(--gold);
  color: var(--gold-ink);
  transform: translateY(-2px);
}

/* "Coming soon" note under the CTA row. The APK isn't hosted yet, so the
   Download button is intercepted rather than linked (see script.js).
   Taken out of flow on purpose: the row is centred and wraps, and the hero
   copy sits directly above the scroll hint — a note that occupied space would
   nudge the buttons every time it appeared. Empty until JS fills it, so
   role="status" actually announces the text rather than reading it on load. */
.cta-note {
  position: absolute;
  top: calc(100% + 14px);
  left: 0;
  right: 0;
  margin: 0;
  text-align: center;
  font-family: "Outfit", sans-serif;
  font-size: 0.85rem;
  letter-spacing: 0.01em;
  color: var(--gold);
  opacity: 0;
  transform: translateY(-4px);
  pointer-events: none;
  transition: opacity 0.3s var(--ease), transform 0.3s var(--ease);
}

.cta-note.is-visible {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  .cta-note {
    transform: none;
    transition: none;
  }
}

/* --- Scroll hint --- */

.scroll-hint {
  position: absolute;
  left: 50%;
  bottom: 26px;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  font-size: 0.66rem;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--fg-faint);
  transition: opacity 0.4s var(--ease);
}

.scroll-hint-line {
  width: 1px;
  height: 42px;
  background: linear-gradient(to bottom, var(--gold), transparent);
  transform-origin: top;
  animation: hint-slide 2.2s ease-in-out infinite;
}

@keyframes hint-slide {
  0% {
    transform: scaleY(0.25);
    opacity: 0.3;
  }
  50% {
    transform: scaleY(1);
    opacity: 1;
  }
  100% {
    transform: scaleY(0.25);
    opacity: 0.3;
  }
}

body.is-scrolled .scroll-hint {
  opacity: 0;
}

/* ============================================================
   Section 02 — tools + phone
   ============================================================ */

.tools {
  /* One width drives both the mockup and the button row beneath it, so the
     two always line up. It is capped by the space the viewport actually has:
     the phone is 9/19.5, so height budget x 0.46 = the widest it can be. */
  --phone-w: min(360px, 27vw, calc((100dvh - 250px) * 0.5625));

  background:
    radial-gradient(70% 70% at 88% 40%, var(--glow-mid), transparent 62%),
    var(--bg);
}

.tools-inner {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: clamp(30px, 5vw, 72px);
}

/* --- The four boxes --- */

.tool-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: clamp(13px, 1.5vw, 20px);
}

.tool-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: clamp(18px, 2.1vw, 28px);
  border: 1px solid var(--line);
  border-radius: 6px;
  background: linear-gradient(160deg, var(--surface-a), var(--surface-b));
  transition: border-color 0.35s var(--ease), transform 0.35s var(--ease),
    background 0.35s var(--ease);
}

.tool-card:hover {
  border-color: rgba(212, 164, 55, 0.55);
  background: linear-gradient(160deg, rgba(212, 164, 55, 0.1), var(--surface-b));
  transform: translateY(-3px);
}

.tool-icon {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 5px;
  color: var(--gold-ink);
  background: var(--gold-dim);
  border: 1px solid rgba(212, 164, 55, 0.3);
}

.tool-icon svg {
  width: 20px;
  height: 20px;
}

.tool-name {
  margin: 0;
  font-family: "Outfit", sans-serif;
  font-size: clamp(1rem, 1.28vw, 1.18rem);
  font-weight: 600;
  letter-spacing: -0.015em;
  color: var(--fg);
}

.tool-copy {
  margin: 0;
  font-size: 0.86rem;
  line-height: 1.55;
  color: var(--fg-faint);
}

/* --- Phone mockup --- */

.phone-col {
  /* Never narrower than 215px, or the two buttons stop being comfortable */
  width: max(var(--phone-w), 215px);
  max-width: 100%;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(18px, 2.4vw, 28px);
}

.phone {
  position: relative;
  width: var(--phone-w);
  max-width: 100%;
  /* Matches assets/mockup_img.jpeg (900x1600) so the screenshot is never cropped */
  aspect-ratio: 9 / 16;
  padding: 9px;
  border-radius: 42px;
  background: linear-gradient(160deg, #2e2e2e, #0c0c0c);
  border: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow: var(--phone-shadow);
}

.phone-screen {
  position: relative;
  width: 100%;
  height: 100%;
  /* The mockup stays a dark device whichever theme is active */
  color: #ffffff;
  border-radius: 34px;
  overflow: hidden;
  background: #101010;
  /* Lets the stand-in screen scale with the frame instead of clipping */
  container-type: inline-size;
}

.phone-island {
  position: absolute;
  top: 8.5cqw;
  left: 50%;
  transform: translateX(-50%);
  width: 30%;
  height: 9cqw;
  border-radius: 999px;
  background: #000;
  z-index: 3;
}

.phone-shot {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 2;
}

/* A real screenshot already contains its own status area, so the island and
   the stand-in screen step aside once it loads. */
.phone-screen.has-shot .phone-island,
.phone-screen.has-shot .phone-placeholder {
  display: none;
}

/* Stand-in screen, visible until the screenshot is dropped in */
.phone-placeholder {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 4cqw;
  padding: 21cqw 6cqw 6cqw;
}

.ph-bar {
  display: flex;
  align-items: center;
  gap: 3.4cqw;
  padding-bottom: 4cqw;
  border-bottom: 1px solid rgba(255, 255, 255, 0.09);
}

.ph-avatar {
  width: 9.5cqw;
  height: 9.5cqw;
  border-radius: 50%;
  background: linear-gradient(140deg, var(--gold-bright), #8c6415);
}

.ph-name {
  font-family: "Outfit", sans-serif;
  font-size: 6cqw;
  font-weight: 600;
}

.ph-chat {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 3.4cqw;
  padding-top: 2cqw;
}

.bubble {
  max-width: 84%;
  padding: 3cqw 4.2cqw;
  border-radius: 5cqw;
  font-size: 5cqw;
  line-height: 1.42;
}

.bubble.in {
  align-self: flex-start;
  border-bottom-left-radius: 1.6cqw;
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.72);
}

.bubble.out {
  align-self: flex-end;
  border-bottom-right-radius: 1.6cqw;
  background: var(--gold);
  color: var(--on-gold);
}

.ph-suggest {
  display: flex;
  flex-direction: column;
  gap: 2cqw;
  padding: 4cqw;
  border: 1px solid rgba(212, 164, 55, 0.4);
  border-radius: 3.4cqw;
  background: rgba(212, 164, 55, 0.1);
}

.ph-label {
  font-family: "Outfit", sans-serif;
  font-size: 4cqw;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold);
}

.ph-text {
  font-size: 5.2cqw;
  line-height: 1.45;
  color: #ffffff;
}

/* Buttons under the phone sit inside the column, not the page. Two equal
   halves means the pair always measures exactly the width of the mockup. */
.phone-col .cta-row {
  margin-top: 0;
  width: 100%;
  max-width: none;
  flex-direction: row;
  flex-wrap: nowrap;
  gap: 12px;
}

.phone-col .btn {
  flex: 1 1 0;
  width: auto;
  min-width: 0;
  padding: 14px 10px;
  font-size: clamp(0.78rem, 0.95vw, 0.94rem);
  white-space: nowrap;
}

/* ============================================================
   Section 03 — testimonials + footer
   ============================================================ */

.proof {
  /* No side padding: the testimonial wall runs edge to edge. Everything
     else re-applies the gutter itself. */
  padding-left: 0;
  padding-right: 0;
  justify-content: center;
  gap: clamp(20px, 3vh, 40px);
  background:
    radial-gradient(80% 60% at 50% -10%, var(--glow-top), transparent 60%),
    var(--bg);
}

.proof-head {
  padding-inline: clamp(20px, 6vw, 96px);
  text-align: center;
}

.section-title {
  margin: 0;
  font-family: "Outfit", sans-serif;
  font-size: clamp(1.7rem, 4.4vw, 3.2rem);
  font-weight: 800;
  line-height: 1.04;
  letter-spacing: -0.035em;
  text-transform: uppercase;
}

.section-title em {
  font-style: normal;
  color: var(--gold-ink);
}

.section-lede {
  max-width: 56ch;
  margin: clamp(12px, 1.6vh, 20px) auto 0;
  font-size: clamp(0.88rem, 1.2vw, 1.05rem);
  line-height: 1.6;
  color: var(--fg-soft);
}

/* --- Full-bleed testimonial wall --- */

.wall {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  /* Keeps an oversized embed from breaking the one-screen snap */
  overflow: hidden;
}

.wall-placeholder {
  /* Fills the band the Senja embed will occupy, capped so it never
     stretches absurdly tall on big screens */
  height: clamp(150px, 27vh, 260px);
  max-height: 100%;
  display: flex;
  justify-content: center;
  align-items: stretch;
  gap: clamp(12px, 1.4vw, 18px);
  padding-inline: clamp(12px, 1.4vw, 18px);
}

.t-card {
  flex: 0 0 clamp(210px, 21vw, 290px);
  display: flex;
  flex-direction: column;
  gap: 11px;
  padding: clamp(16px, 1.6vw, 22px);
  border: 1px solid var(--line);
  border-radius: 6px;
  background: linear-gradient(160deg, var(--surface-a), var(--surface-b));
}

.t-stars {
  display: flex;
  gap: 4px;
  margin-bottom: 2px;
}

.t-stars i {
  width: 11px;
  height: 11px;
  background: var(--gold);
  clip-path: polygon(50% 0%, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%);
}

.t-line {
  height: 9px;
  border-radius: 3px;
  background: var(--skeleton);
}

.t-line.w100 { width: 100%; }
.t-line.w92 { width: 92%; }
.t-line.w88 { width: 88%; }
.t-line.w78 { width: 78%; }
.t-line.w74 { width: 74%; }
.t-line.w70 { width: 70px; }
.t-line.w64 { width: 64%; }
.t-line.w60 { width: 60%; }
.t-line.w52 { width: 52%; }

.t-who {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: auto;
  padding-top: 6px;
}

.t-avatar {
  flex: none;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: linear-gradient(140deg, var(--gold-bright), #8c6415);
}

.wall-note {
  margin: clamp(10px, 1.6vh, 18px) 0 0;
  text-align: center;
  font-size: 0.66rem;
  font-weight: 500;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--fg-faint);
}

/* --- Footer --- */

.site-footer {
  flex: none;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 16px;
  margin-inline: clamp(20px, 6vw, 96px);
  padding-top: clamp(14px, 2vh, 22px);
  border-top: 1px solid var(--line);
}

.social {
  justify-self: start;
  display: flex;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.social a {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--fg-soft);
  transition: color 0.3s var(--ease), border-color 0.3s var(--ease),
    background 0.3s var(--ease), transform 0.3s var(--ease);
}

.social a:hover {
  color: var(--gold-ink);
  border-color: var(--gold);
  background: var(--gold-dim);
  transform: translateY(-2px);
}

.social svg {
  width: 16px;
  height: 16px;
}

.footer-mail {
  justify-self: center;
  font-family: "Outfit", sans-serif;
  font-size: clamp(0.86rem, 1.3vw, 1.05rem);
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--fg);
  text-decoration: none;
  transition: color 0.3s var(--ease);
}

.footer-mail:hover {
  color: var(--gold-ink);
}

.footer-copy {
  justify-self: end;
  margin: 0;
  font-size: 0.76rem;
  color: var(--fg-faint);
}

/* ============================================================
   Entrance animation (classes are added by script.js, so the
   page stays fully visible if JavaScript never runs)
   ============================================================ */

.reveal {
  opacity: 0;
  transform: translateY(26px);
}

.is-active .reveal {
  opacity: 1;
  transform: none;
  transition: opacity 0.85s var(--ease), transform 0.85s var(--ease);
  transition-delay: var(--delay, 0ms);
}

@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
  }
}

/* ============================================================
   Responsive
   ============================================================ */

/* Below this the two columns stack, and the four boxes become full-width
   strips sitting above the mockup. */
@media (max-width: 980px) {
  .tools {
    --phone-w: min(340px, calc((100dvh - 594px) * 0.5625));
  }

  .tools-inner {
    grid-template-columns: minmax(0, 1fr);
    gap: clamp(20px, 3vw, 30px);
    justify-items: center;
  }

  .tool-grid {
    width: 100%;
    max-width: 620px;
    grid-template-columns: minmax(0, 1fr);
    gap: 8px;
  }

  .tool-card {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    grid-template-areas: "icon name";
    align-items: center;
    column-gap: 13px;
    padding: 9px 14px;
  }

  .tool-icon {
    grid-area: icon;
    width: 28px;
    height: 28px;
  }

  .tool-icon svg {
    width: 15px;
    height: 15px;
  }

  .tool-name {
    grid-area: name;
    font-size: 1rem;
  }

  /* The supporting line is dropped so section 02 still fits one snapped screen */
  .tool-copy {
    display: none;
  }
}

@media (max-width: 900px) {
  .feature-row {
    grid-template-columns: repeat(2, 1fr);
    row-gap: 26px;
  }

  .feature + .feature::before {
    display: none;
  }

  .feature:nth-child(2n)::after {
    content: "";
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 1px;
    height: 40px;
    background: var(--line);
  }
}

@media (max-width: 640px) {
  :root {
    --header-h: 64px;
  }

  .hero {
    padding-bottom: 104px;
  }

  .tool-grid {
    gap: 8px;
  }

  .tool-card {
    padding: 10px 14px;
  }

  .tool-name {
    font-size: 0.94rem;
  }

  .hero-description {
    margin-top: 22px;
  }

  .feature-row {
    margin-top: 30px;
    padding: 20px 0;
  }

  .cta-row {
    margin-top: 30px;
  }

  /* Sized against height as well as width, so short phones stay on one screen */
  .hero-title {
    display: block;
    font-size: clamp(2rem, min(11.5vw, 7vh), 3.9rem);
    line-height: 1.02;
    padding-top: clamp(58px, min(21vw, 13vh), 128px);
  }

  .hero-title-text br {
    display: block;
  }

  /* Badge sits above the headline on narrow screens, as in the sketch */
  .free-badge {
    top: 0;
    left: 50%;
    width: clamp(84px, min(30vw, 16vh), 148px);
    transform: translateX(-50%) rotate(-11deg);
    animation-name: badge-float-mobile;
  }

  .free-badge-text {
    font-size: clamp(1.05rem, min(7.4vw, 4vh), 1.5rem);
  }

  @keyframes badge-float-mobile {
    0%,
    100% {
      transform: translateX(-50%) rotate(-11deg) translateY(0);
    }
    50% {
      transform: translateX(-50%) rotate(-8deg) translateY(-7px);
    }
  }

  .cta-row {
    width: 100%;
    flex-direction: column;
    align-items: stretch;
  }

  .btn {
    width: 100%;
    min-width: 0;
  }

  .section-nav {
    display: none !important;
  }

}

/* The hero's four items stay two-up all the way down — a single column is
   far too tall for short phones. */
@media (max-width: 430px) {
  .feature {
    padding: 0 8px;
  }

  .feature-name {
    font-size: 0.82rem;
  }
}

/* ============================================================
   Short viewports — every section still has to fit one screen
   ============================================================ */

@media (max-height: 760px) and (min-width: 641px) {
  .hero-description {
    margin-top: 22px;
  }

  .feature-row {
    margin-top: 28px;
    padding: 18px 0;
  }

  .cta-row {
    margin-top: 26px;
  }

  .tools {
    --phone-w: min(360px, 27vw, calc((100dvh - 215px) * 0.5625));
  }
}

@media (max-width: 980px) and (max-height: 820px) {
  .tools {
    --phone-w: min(340px, calc((100dvh - 612px) * 0.5625));
  }
}

/* Very short screens: compact the strips to buy the mockup some height */
@media (max-width: 980px) and (max-height: 700px) {
  .tools {
    --phone-w: min(340px, calc((100dvh - 526px) * 0.5625));
  }

  .tool-grid {
    gap: 6px;
  }

  .tool-card {
    padding: 8px 12px;
    column-gap: 11px;
  }

  .tool-icon {
    width: 26px;
    height: 26px;
  }

  .tool-icon svg {
    width: 15px;
    height: 15px;
  }

  .tool-name {
    font-size: 0.86rem;
  }
}

/* Short phones in portrait: tighten the hero so it stays on one screen */
@media (max-width: 640px) and (max-height: 870px) {
  .hero {
    padding-bottom: 38px;
  }

  .scroll-hint {
    display: none;
  }

  .hero-description {
    margin-top: 16px;
    font-size: 0.88rem;
    line-height: 1.5;
  }

  .feature-row {
    margin-top: 20px;
    padding: 14px 0;
    row-gap: 16px;
  }

  .feature-index {
    font-size: 0.64rem;
  }

  .feature-name {
    font-size: 0.82rem;
  }

  .cta-row {
    margin-top: 18px;
    gap: 10px;
  }

  .btn {
    padding: 13px 20px;
    font-size: 0.92rem;
  }
}

/* Smallest phones — squeeze everything that can still read well */
@media (max-width: 640px) and (max-height: 640px) {
  :root {
    --header-h: 52px;
  }

  .section {
    padding-top: calc(var(--header-h) + 14px);
  }

  .hero-title {
    padding-top: clamp(40px, 11vh, 70px);
  }

  .free-badge {
    width: clamp(70px, 14vh, 110px);
  }

  .hero-description {
    margin-top: 10px;
    font-size: 0.75rem;
    line-height: 1.45;
  }

  .feature-row {
    margin-top: 12px;
    padding: 10px 0;
    row-gap: 10px;
  }

  .feature-name {
    font-size: 0.76rem;
  }

  .cta-row {
    margin-top: 12px;
    gap: 8px;
  }

  .wall-note {
    display: none;
  }

  .t-card {
    padding: 12px;
    gap: 8px;
  }

  .section-lede {
    font-size: 0.8rem;
  }

  .btn {
    padding: 11px 18px;
    font-size: 0.86rem;
  }
}

/* Phones: six strips leave little room, so they compact hard and the
   mockup takes whatever height is left over. */
@media (max-width: 640px) {
  .tools {
    --phone-w: min(340px, calc((100dvh - 460px) * 0.5625));
    padding-bottom: 40px;
  }

  .tools-inner {
    gap: 16px;
  }

  /* Six compact squares, three across, rather than six full-width strips */
  .tool-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    max-width: 360px;
  }

  .tool-card {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: "icon" "name";
    aspect-ratio: 1;
    align-content: center;
    justify-items: center;
    text-align: center;
    row-gap: 8px;
    column-gap: 0;
    padding: 8px 6px;
  }

  .tool-icon {
    width: 26px;
    height: 26px;
    border-radius: 4px;
  }

  .tool-icon svg {
    width: 15px;
    height: 15px;
  }

  .tool-name {
    font-size: 0.68rem;
    line-height: 1.25;
  }

  /* The rail is empty on phones (dots hidden), so the toggle moves to the footer */
  .side-rail {
    display: none;
  }

  /* Sits in a stacked footer row, so it reads better lying flat */
  .theme-toggle-footer {
    display: flex;
    flex-direction: row;
  }

  :root[data-theme="dark"] .theme-toggle-footer .theme-knob {
    transform: translateX(30px);
  }

  .phone-col {
    gap: 16px;
  }

  .phone-col .btn {
    padding: 12px 8px;
    font-size: 0.74rem;
  }
}

/* Footer stacks on phones: socials, then mail, then copyright */
@media (max-width: 640px) {
  .site-footer {
    grid-template-columns: minmax(0, 1fr);
    justify-items: center;
    gap: 12px;
    text-align: center;
  }

  .social,
  .footer-mail,
  .footer-copy {
    justify-self: center;
  }

  .social a {
    width: 32px;
    height: 32px;
  }

  .t-card {
    gap: 9px;
    padding: 14px;
  }
}

/* Landscape phones: go back to two columns, since height is the scarce axis */
@media (min-width: 700px) and (max-height: 620px) {
  :root {
    --header-h: 54px;
  }

  .section {
    padding: calc(var(--header-h) + 14px) clamp(20px, 6vw, 96px) 24px;
  }

  .tools {
    --phone-w: min(260px, calc((100dvh - 170px) * 0.5625));
  }

  .tools-inner {
    grid-template-columns: minmax(0, 1fr) auto;
    justify-items: stretch;
    gap: clamp(24px, 4vw, 48px);
  }

  .tool-grid {
    max-width: none;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .hero-title {
    font-size: clamp(1.9rem, 5.6vh, 3.4rem);
  }

  .hero-description {
    margin-top: 12px;
    font-size: 0.86rem;
    line-height: 1.5;
  }

  /* Four across in one row — stacked pairs are what blows the height budget */
  .feature-row {
    margin-top: 16px;
    padding: 12px 0;
    grid-template-columns: repeat(4, 1fr);
    row-gap: 0;
  }

  .feature + .feature::before {
    display: block;
  }

  .feature:nth-child(2n)::after {
    display: none;
  }

  .feature-name {
    font-size: 0.8rem;
  }

  .cta-row {
    margin-top: 16px;
  }

  .btn {
    padding: 12px 20px;
  }

  .scroll-hint {
    display: none;
  }

  .section-title {
    font-size: clamp(1.3rem, 4.6vh, 2rem);
  }

  .section-lede {
    margin-top: 8px;
    font-size: 0.8rem;
    line-height: 1.45;
  }

  .wall-note {
    display: none;
  }

  .t-card {
    gap: 7px;
    padding: 10px 12px;
  }

  .t-line {
    height: 7px;
  }

  .t-stars i {
    width: 9px;
    height: 9px;
  }

  .t-avatar {
    width: 22px;
    height: 22px;
  }

  .site-footer {
    padding-top: 10px;
  }

  .social a {
    width: 30px;
    height: 30px;
  }

  .wall-placeholder {
    height: clamp(90px, 30vh, 130px);
  }
}
