@font-face {
  font-family: 'Fredoka';
  src: url('../fonts/Fredoka.ttf') format('truetype');
  font-weight: 300 700;
  font-display: swap;
}

@font-face {
  font-family: 'Kalam';
  src: url('../fonts/Kalam-Bold.ttf') format('truetype');
  font-weight: 700;
  font-display: swap;
}

:root {
  --cream: #FBF4E4;
  --paper: #FFFDF7;
  --ink: #2A2622;
  --ink-soft: #5B534B;
  --teal: #2E8C8A;
  --teal-dark: #1D5C5B;
  --teal-light: #CDE7E1;
  --coral: #EF7B5A;
  --coral-dark: #C24A2C;
  --mustard: #F2B33D;
  --mustard-light: #F9DF96;
  --shadow: 5px 8px 16px rgba(70, 45, 20, 0.18);
  --radius: 4px;
  --width: 1160px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 90px;
}

body {
  margin: 0;
  color: var(--ink);
  background-color: var(--cream);
  background-image: url('../img/paper.jpg');
  background-blend-mode: multiply;
  font: 18px/1.6 system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}

h1, h2, h3 {
  font-family: 'Fredoka', system-ui, sans-serif;
  hyphens: auto;
  overflow-wrap: break-word;
  color: var(--teal-dark);
  line-height: 1.15;
  font-weight: 600;
}

h1 {
  font-size: clamp(2.3rem, 5vw, 3.6rem);
  margin: 0.2em 0 0.4em;
}

h2 {
  font-size: clamp(1.8rem, 3.6vw, 2.6rem);
  margin: 0 0 0.6em;
}

h3 {
  font-size: 1.3rem;
  margin: 0 0 0.4em;
}

a {
  color: var(--teal-dark);
}

img {
  max-width: 100%;
  height: auto;
}

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

.narrow {
  max-width: 820px;
}

.paper {
  background: var(--paper);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.nowrap {
  white-space: nowrap;
}

.handwritten {
  font-family: 'Kalam', cursive;
  color: var(--ink-soft);
}

.button {
  display: inline-block;
  padding: 14px 26px;
  border: 0;
  border-radius: 999px;
  background: var(--coral-dark);
  color: #fff;
  font: 600 1.15rem 'Fredoka', system-ui, sans-serif;
  text-decoration: none;
  cursor: pointer;
  box-shadow: 3px 5px 0 rgba(70, 45, 20, 0.18);
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.button:hover,
.button:focus-visible {
  background: #A93E24;
  transform: translateY(-2px) rotate(-0.5deg);
  box-shadow: 4px 7px 0 rgba(70, 45, 20, 0.2);
}

.button:focus-visible,
input:focus-visible,
summary:focus-visible {
  outline: 3px solid var(--mustard);
  outline-offset: 3px;
}

.button-small {
  padding: 9px 18px;
  font-size: 1rem;
}

/* Header */

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(251, 244, 228, 0.92);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid rgba(70, 45, 20, 0.08);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 72px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.wordmark {
  font: 600 1.9rem 'Fredoka', system-ui, sans-serif;
  color: var(--teal-dark);
  letter-spacing: -0.01em;
}

.umlaut {
  color: var(--coral);
}

.header-nav {
  display: flex;
  align-items: center;
  gap: 24px;
}

.header-nav a:not(.button) {
  text-decoration: none;
  font-weight: 600;
  color: var(--ink-soft);
}

.header-nav a:not(.button):hover {
  color: var(--teal-dark);
}

/* Hero */

.hero {
  padding: 28px 0 80px;
}

.hero-text {
  max-width: 1100px;
  margin: 0 auto;
  text-align: center;
}

.hero-text h1 {
  font-size: clamp(2.1rem, 4.2vw, 3.3rem);
  margin: 0 0 10px;
}

.hero-text .lead {
  max-width: 760px;
  margin: 0 auto;
}

.lead {
  font-size: 1.2rem;
  color: var(--ink-soft);
  margin: 0 0 28px;
}

.hero-video {
  margin: 24px 0 0;
}

.video-frame {
  /* Keep the whole video above the fold: header, heading and text take about 300px. */
  max-width: max(560px, calc((100vh - 300px) * 16 / 9));
  margin: 0 auto;
  padding: 12px;
  transform: rotate(0.4deg);
}

.video-player video.is-idle {
  cursor: pointer;
}

.video-frame video {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 2px;
  background: var(--cream);
}

.lead-form {
  max-width: 980px;
  margin: 44px auto 0;
  padding: 26px 30px 20px;
  transform: rotate(-0.3deg);
}

.form-title {
  font-size: 1.6rem;
  margin: 0 0 16px;
}

.form-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto;
  gap: 16px;
  align-items: start;
}

.form-row .button {
  margin-top: 33px;
  white-space: nowrap;
}

.field label {
  display: block;
  margin-bottom: 6px;
  font-weight: 600;
}

.field input {
  width: 100%;
  padding: 13px 16px;
  border: 2px solid #D9CDB8;
  border-radius: var(--radius);
  background: #fff;
  font: inherit;
  color: var(--ink);
}

.field input:focus {
  border-color: var(--teal);
}

.honeypot {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.form-note {
  margin: 14px 0 0;
  font-size: 0.85rem;
  color: var(--ink-soft);
}

.form-error {
  margin: 6px 0 0;
  color: var(--coral-dark);
  font-weight: 600;
  font-size: 0.95rem;
}

/* Sections */

.section {
  padding: 80px 0;
}

.section-tinted {
  background: rgba(205, 231, 225, 0.35);
}

.section-lead {
  max-width: 720px;
  font-size: 1.2rem;
  color: var(--ink-soft);
  margin: -0.2em 0 36px;
}

.steps,
.features {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 28px;
}

.steps {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.step {
  position: relative;
  padding: 44px 26px 24px;
}

.step:nth-child(1) { transform: rotate(-0.8deg); }
.step:nth-child(2) { transform: rotate(0.6deg); }
.step:nth-child(3) { transform: rotate(-0.4deg); }

.step p,
.feature p {
  margin: 0;
  color: var(--ink-soft);
}

.step-number {
  position: absolute;
  top: -20px;
  left: 22px;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--teal);
  color: #fff;
  font: 600 1.5rem 'Fredoka', system-ui, sans-serif;
  box-shadow: 2px 4px 0 rgba(70, 45, 20, 0.15);
}

.compare {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 32px;
}

.compare-column {
  position: relative;
  padding: 28px 28px 28px 190px;
  min-height: 300px;
}

.compare-column img {
  position: absolute;
  left: 20px;
  bottom: 20px;
  width: 150px;
}

.compare-column ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.compare-column li {
  padding: 8px 0;
  border-bottom: 1px dashed #E2D6C1;
}

.compare-column li:last-child {
  border-bottom: 0;
}

.compare-us {
  outline: 4px solid var(--teal);
  transform: rotate(0.5deg);
}

.compare-column:not(.compare-us) {
  transform: rotate(-0.5deg);
}

.compare-column:not(.compare-us) h3 {
  color: var(--ink-soft);
}

/* Side by side, the rows of both columns share their heights so that the dividers line up. */
@media (min-width: 961px) {
  .compare {
    grid-template-rows: repeat(5, auto);
    row-gap: 0;
  }

  .compare-column,
  .compare-column ul {
    display: grid;
    grid-template-rows: subgrid;
  }

  .compare-column {
    grid-row: 1 / span 5;
  }

  .compare-column ul {
    grid-row: 2 / span 4;
  }
}

.features {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.feature {
  padding: 24px 26px;
  border-top: 6px solid var(--mustard);
}

.feature:nth-child(3n + 2) { border-top-color: var(--coral); }
.feature:nth-child(3n) { border-top-color: var(--teal); }

.faq details {
  margin-bottom: 14px;
  padding: 0 24px;
}

.faq summary {
  padding: 18px 0;
  cursor: pointer;
  font: 600 1.15rem 'Fredoka', system-ui, sans-serif;
  color: var(--teal-dark);
  list-style-position: outside;
}

.faq details:last-child {
  margin-bottom: 0;
}

.cta {
  padding-top: 48px;
}

.faq details[open] {
  padding-bottom: 24px;
}

.faq details p {
  margin: 0;
  color: var(--ink-soft);
}

.cta-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 48px;
}

.cta-inner img {
  width: 170px;
}

.cta p {
  font-size: 1.2rem;
  color: var(--ink-soft);
}

/* Thank-you and legal pages */

.thanks {
  display: flex;
  align-items: center;
  gap: 48px;
}

.thanks img {
  width: 170px;
  flex-shrink: 0;
}

.thanks .lead {
  margin-bottom: 10px;
}

.thanks-actions {
  margin: 32px 0 0;
}

.legal h2 {
  font-size: 1.4rem;
  margin-top: 1.6em;
}

/* Footer */

.site-footer {
  padding: 28px 0;
  border-top: 1px solid rgba(70, 45, 20, 0.1);
  color: var(--ink-soft);
  font-size: 0.95rem;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  gap: 16px;
}

.footer-inner nav {
  display: flex;
  gap: 20px;
}

/* Responsive */

@media (max-width: 960px) {
  .compare,
  .form-row {
    grid-template-columns: minmax(0, 1fr);
  }

  .form-row .button {
    margin-top: 4px;
    width: 100%;
  }

  .steps,
  .features {
    grid-template-columns: minmax(0, 1fr);
  }

  .header-nav a:not(.button) {
    display: none;
  }
}

@media (max-width: 600px) {
  body {
    font-size: 17px;
  }

  .wrap {
    padding: 0 16px;
  }

  .wordmark {
    font-size: 1.6rem;
  }

  .hero {
    padding: 32px 0 48px;
  }

  .section {
    padding: 56px 0;
  }

  .lead-form {
    padding: 20px 18px 16px;
  }

  .hero-video {
    margin-top: 28px;
  }

  .video-frame {
    padding: 8px;
  }

  .compare-column {
    padding: 24px 22px;
    min-height: 0;
  }

  .compare-column img {
    position: static;
    display: block;
    width: 110px;
    margin: 0 auto 12px;
  }

  .cta-inner,
  .thanks {
    flex-direction: column;
    text-align: center;
    gap: 20px;
  }

  .footer-inner {
    flex-direction: column;
  }
}

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

  .button {
    transition: none;
  }
}
