/* Toilet Panic — marketing landing page. */

:root {
  --yellow: #ffb300;
  --yellow-deep: #f0a500;
  --ink: #1a1a1a;
  --ink-soft: #3a3a3a;
  --muted: #6a6a6a;
  --paper: #ffffff;
  --paper-alt: #fffaf0;
  --border: #e7e1d6;
  --max-width: 1100px;
  --radius: 14px;
}

* {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Segoe UI', Roboto, sans-serif;
  font-size: 17px;
  line-height: 1.55;
  color: var(--ink);
  background: var(--paper);
}

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

/* Header */
.site-header {
  background: var(--paper);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 10;
}

.header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 24px;
  gap: 16px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 18px;
  color: var(--ink);
  text-decoration: none;
}

.brand-mark {
  border-radius: 8px;
  display: block;
}

.site-header nav a {
  color: var(--muted);
  text-decoration: none;
  margin-left: 18px;
  font-size: 15px;
}

.site-header nav a:hover {
  color: var(--ink);
}

/* Hero */
.hero {
  background: var(--yellow);
  padding: 64px 0 72px;
}

.hero-inner {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 48px;
  align-items: center;
}

.hero h1 {
  font-size: clamp(48px, 8vw, 96px);
  line-height: 0.95;
  letter-spacing: -0.03em;
  font-weight: 800;
  margin: 0 0 20px;
  color: var(--ink);
}

.lede {
  font-size: clamp(18px, 2.2vw, 22px);
  line-height: 1.4;
  margin: 0 0 28px;
  color: var(--ink);
  max-width: 480px;
}

.meta-line {
  font-size: 14px;
  color: var(--ink-soft);
  margin: 14px 0 0;
}

.hero-shot {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 18px;
}

.hero-shot .gallery-track {
  max-width: 320px;
}

.hero-shot .gallery-slide img {
  border-radius: 40px;
  box-shadow:
    0 30px 60px rgba(0, 0, 0, 0.22),
    0 8px 20px rgba(0, 0, 0, 0.12);
}

/* App Store button */
.app-store-btn {
  display: inline-block;
  text-decoration: none;
  transition: transform 0.1s ease;
}

.app-store-btn:hover {
  transform: translateY(-1px);
}

.app-store-btn svg {
  width: 180px;
  height: 60px;
  display: block;
}

/* Sections */
section {
  padding: 72px 0;
}

section h2 {
  font-size: clamp(28px, 4vw, 40px);
  line-height: 1.15;
  letter-spacing: -0.02em;
  font-weight: 700;
  margin: 0 0 40px;
  color: var(--ink);
}

/* How it works */
.how {
  background: var(--paper);
}

.steps {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}

.steps li {
  padding: 28px;
  background: var(--paper-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--ink);
  color: var(--yellow);
  font-weight: 800;
  font-size: 18px;
  margin-bottom: 16px;
}

.steps h3 {
  font-size: 22px;
  margin: 0 0 8px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.steps p {
  margin: 0;
  color: var(--ink-soft);
  line-height: 1.5;
}

/* Gallery (rotating screenshot carousel — used inside the hero) */
.gallery {
  position: relative;
}

.gallery-track {
  position: relative;
  width: 100%;
  max-width: 380px;
  margin: 0 auto;
  /* Stack all slides into the same grid cell so the track's natural height
     equals one slide. No aspect-ratio math, no layout jump on slide change. */
  display: grid;
  grid-template-areas: 'stack';
}

.gallery-slide {
  grid-area: stack;
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  opacity: 0;
  transform: scale(0.94) translateY(8px);
  transition:
    opacity 0.5s ease,
    transform 0.5s ease;
  pointer-events: none;
}

.gallery-slide.is-active {
  opacity: 1;
  transform: scale(1) translateY(0);
  pointer-events: auto;
}

.gallery-slide img {
  width: 100%;
  height: auto;
  display: block;
}

/* Dots */
.gallery-dots {
  display: flex;
  justify-content: center;
  gap: 10px;
}

.gallery-dot {
  appearance: none;
  border: none;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(26, 26, 26, 0.2);
  cursor: pointer;
  padding: 0;
  transition:
    background 0.2s ease,
    transform 0.2s ease;
}

.gallery-dot:hover {
  background: rgba(26, 26, 26, 0.4);
}

.gallery-dot.is-active {
  background: var(--ink);
  transform: scale(1.25);
}

@media (prefers-reduced-motion: reduce) {
  .gallery-slide {
    transition: opacity 0.2s ease;
    transform: none;
  }
}

/* Features */
.features {
  background: var(--paper);
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.feature {
  padding: 24px;
  border-radius: var(--radius);
  background: var(--paper-alt);
  border: 1px solid var(--border);
}

.feature h3 {
  margin: 0 0 8px;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.feature p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 15px;
  line-height: 1.5;
}

/* Organic landing pages */
.resources {
  background: var(--paper);
}

.resource-grid,
.use-case-grid,
.proof-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.resource-card,
.proof-card,
.content-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--paper-alt);
  padding: 24px;
}

.resource-card {
  color: var(--ink);
  text-decoration: none;
  transition:
    border-color 0.15s ease,
    transform 0.15s ease;
}

.resource-card:hover {
  border-color: var(--yellow-deep);
  transform: translateY(-2px);
}

.resource-card span,
.eyebrow {
  display: block;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  margin-bottom: 8px;
  text-transform: uppercase;
}

.resource-card strong {
  display: block;
  font-size: 18px;
  line-height: 1.35;
}

.use-case-hero {
  background: var(--yellow);
  padding: 56px 0;
}

.use-case-hero .hero-inner {
  align-items: center;
}

.use-case-hero h1 {
  font-size: clamp(40px, 6vw, 68px);
  line-height: 1;
  letter-spacing: -0.03em;
  margin: 0 0 20px;
}

.use-case-hero .lede {
  max-width: 560px;
}

.content-section {
  padding: 64px 0;
}

.content-section h2 {
  margin-bottom: 24px;
}

.content-section h3 {
  font-size: 20px;
  margin: 0 0 8px;
}

.content-section p,
.content-section li {
  color: var(--ink-soft);
}

.content-section ul,
.content-section ol {
  padding-left: 24px;
}

.phone-preview {
  max-width: 300px;
  margin: 0 auto;
}

.phone-preview img {
  width: 100%;
  display: block;
  border-radius: 36px;
  box-shadow:
    0 26px 50px rgba(0, 0, 0, 0.2),
    0 8px 18px rgba(0, 0, 0, 0.12);
}

.internal-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
}

.internal-links a {
  color: var(--ink);
  background: var(--paper-alt);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 8px 14px;
  text-decoration: none;
  font-size: 14px;
  font-weight: 700;
}

.faq-list {
  display: grid;
  gap: 20px;
}

.faq-list details {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--paper-alt);
  padding: 20px 22px;
}

.faq-list summary {
  cursor: pointer;
  font-weight: 800;
}

.faq-list p {
  margin-bottom: 0;
}

/* CTA */
.cta {
  background: var(--yellow);
  text-align: center;
}

.cta h2 {
  margin-bottom: 28px;
}

/* Footer */
.site-footer {
  background: var(--ink);
  color: #c9c9c9;
  padding: 28px 0;
  font-size: 14px;
}

.footer-row {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.site-footer a {
  color: #c9c9c9;
  text-decoration: none;
  margin: 0 2px;
}

.site-footer a:hover {
  color: var(--yellow);
}

/* Responsive */
@media (max-width: 860px) {
  .hero {
    padding: 48px 0 56px;
  }

  .hero-inner {
    grid-template-columns: 1fr;
    gap: 36px;
    text-align: center;
  }

  .lede {
    margin-left: auto;
    margin-right: auto;
  }

  .hero-shot img {
    max-width: 260px;
  }

  section {
    padding: 56px 0;
  }

  .steps {
    grid-template-columns: 1fr;
  }

  .feature-grid {
    grid-template-columns: 1fr;
  }

  .resource-grid,
  .use-case-grid,
  .proof-grid {
    grid-template-columns: 1fr;
  }

  .hero-shot .gallery-track {
    max-width: 280px;
  }
}

@media (max-width: 480px) {
  .site-header nav a {
    margin-left: 12px;
    font-size: 14px;
  }

  .brand span {
    display: none;
  }

  .hero-shot .gallery-track {
    max-width: 240px;
  }
}
