/* ==========================================================================
   Doubles Social Club — hand-built replacement for the WordPress/Divi site
   Every size, gutter and margin below was measured from the live Divi page
   at 390 / 1000 / 1440 / 1710px so the layout matches at every screen width.

   Divi system reproduced here:
   - Rows: 80% wide (max 1920px). "Why Doubles" row: 65% (max 1080px).
     "Meet the Twins" intro row: 80% (max 1080px).
   - Row padding: 27px (>=1350px), 2% of screen (981–1349px), 30px (<=980px).
   - Gutters: 5.5% between columns ("gutter 3"); 3% in the waitlist and
     footer-top rows ("gutter 2"). Columns stack below 981px.
   ========================================================================== */

@font-face {
  font-family: "Safira March";
  src: url("/assets/fonts/Safira-March.ttf") format("truetype");
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

:root {
  --green: #2a4c09;
  --cream: #fff6ea;
  --line-green: rgba(42, 76, 9, 0.18);
  --line-cream: rgba(255, 246, 234, 0.18);
  --shadow: 0 12px 18px -6px rgba(10, 0, 0, 0.1);
  --serif: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --display: "Safira March", "Cormorant Garamond", Georgia, serif;
  --script: "sloop-script-pro", "Cormorant Garamond", cursive;
  --row-pad: 27px;
}

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

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

body {
  margin: 0;
  background: var(--cream);
  color: var(--green);
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 500;
  line-height: 23.8px;
  -webkit-font-smoothing: antialiased;
}

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

h1, h2, h3, h4, p { margin: 0; font-weight: 500; overflow-wrap: break-word; word-wrap: break-word; }
p { padding-bottom: 1em; }
p:last-child { padding-bottom: 0; }

a { color: inherit; }

.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;
}

/* ---------- Typography (Divi headings carry 10px bottom padding) ---------- */
.eyebrow {
  font-family: var(--serif);
  font-size: 22px;
  line-height: 22px;
  letter-spacing: 3px;
  text-transform: uppercase;
  padding-bottom: 10px;
  margin-bottom: 5px;
}
.eyebrow-sm { font-size: 20px; line-height: 20px; }

.display {
  font-family: var(--display);
  font-size: 40px;
  line-height: 40px;
  letter-spacing: 5px;
  text-transform: uppercase;
  padding-bottom: 10px;
}

.card-title {
  font-family: var(--display);
  font-size: 24px;
  line-height: 24px;
  letter-spacing: 3px;
  text-transform: uppercase;
  padding-bottom: 10px;
}

/* ---------- Sections & rows ---------- */
.section {
  padding: 180px 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.section-light { background: var(--cream); color: var(--green); }
.section-dark  { background: var(--green); color: var(--cream); }

.row {
  width: 80%;
  max-width: 1920px;
  margin: 0 auto;
  padding: var(--row-pad) 0;
}
.row-narrow { width: 65%; max-width: 1080px; }
.row-medium { max-width: 1080px; }
.row-narrow .display, .row-medium .display { margin-bottom: 20px; }
.row-top { padding-bottom: 0; }          /* heading rows that sit above a card row */

/* Column grids — Divi column percentages */
.grid-3 { display: grid; grid-template-columns: repeat(3, 29.6667%); column-gap: 5.5%; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 47.25%); column-gap: 5.5%; }

/* ---------- Cards ---------- */
.card {
  border: 1px solid var(--line-green);
  border-radius: 25px;
  box-shadow: var(--shadow);
  padding: 20px 15px;
}
.section-dark .card { border-color: var(--line-cream); }
.card .eyebrow { margin-bottom: 10px; padding-bottom: 11px; }

/* ---------- Header ---------- */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  padding-top: 20px;
  pointer-events: none;
}
.header-bar {
  pointer-events: auto;
  width: 80%;
  max-width: 1920px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 25% 75%;
  align-items: center;
  background: var(--cream);
  border: 1px solid var(--line-green);
  border-radius: 100px;
  padding: 5px 25px;
}
.header-logo { display: block; width: 20%; margin-top: 1px; }
.header-logo img { width: 100%; height: auto; }
.site-header .header-tagline { padding: 0; margin: 0; text-align: right; }
.tagline-mobile, .br-tablet { display: none; }

/* ---------- Hero ---------- */
.hero { height: 100vh; min-height: 0; padding: 54px 0; }
.hero .row { padding-bottom: 0; }
.hero-row {
  display: grid;
  grid-template-columns: 57.8125% 36.6875%;
  column-gap: 5.5%;
  align-items: center;
}
.hero-title {
  font-family: var(--display);
  font-weight: 300;
  font-size: 78px;
  line-height: 78px;
  letter-spacing: 10px;
  text-transform: uppercase;
  text-align: center;
}
.hero-script {
  font-family: var(--script);
  font-size: 44px;
  line-height: 44px;
  letter-spacing: 2px;
  text-align: center;
  padding: 0 0 10px 10%;
  margin-bottom: 4.757%;  /* = Divi's 2.75% of the row */
}
.hero-intro p { margin-bottom: 15px; }
.hero-card { padding: 15px 15px 5px; box-shadow: 0 12px 18px -6px rgba(0, 0, 0, 0.1); }
.hero-card .display { padding-bottom: 0; margin-bottom: 15px; }
.hero-card .btn { margin-bottom: 10px; }

.btn {
  display: inline-block;
  font-family: var(--display);
  font-size: 20px;
  line-height: 34px;
  letter-spacing: 3px;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--cream);
  background: var(--green);
  border: 1px solid var(--green);
  border-radius: 25px;
  padding: 6px 20px 1px;
  transition: opacity 0.2s ease;
}
.btn:hover { opacity: 0.85; }

/* ---------- Waitlist ---------- */
#newsletter .row { padding-top: 10px; }
.join-row {
  display: grid;
  grid-template-columns: 31.3333% 65.6667%;
  column-gap: 3%;
  align-items: end;
}
.join-intro .display { margin-bottom: 4.787%; }  /* = Divi's 1.5% of the row */
.join-form { border-left: 1px solid var(--line-green); padding-left: 18px; }
.ml-form-embedBody { padding-top: 20px; }

.form-grid {
  display: grid;
  grid-template-columns: calc((50% - 20px) / 2) calc((50% - 20px) / 2) 50%;
  column-gap: 10px;
  row-gap: 10px;
  grid-template-rows: 46px 46px;
  align-items: center;
}
.field-submit { align-self: end; }
.field-first  { grid-column: 1; grid-row: 1; }
.field-last   { grid-column: 2; grid-row: 1; }
.field-email  { grid-column: 1 / 3; grid-row: 2; }
.field-submit { grid-column: 3; grid-row: 2; }

.form-control {
  display: block;
  width: 100%;
  height: 46px;
  font-family: var(--serif);
  font-size: 20px;
  font-weight: 500;
  line-height: 20px;
  color: var(--green);
  background: var(--cream);
  border: 1px solid var(--green);
  border-radius: 25px;
  padding: 10px;
  outline: none;
  -webkit-appearance: none;
  appearance: none;
}
.form-control::placeholder { color: var(--green); opacity: 0.85; }
.form-control:focus { box-shadow: 0 0 0 2px var(--line-green); }
.ml-error .form-control { border-color: #b3261e; }

.field-submit button {
  display: block;
  width: 100%;
  font-family: var(--display);
  font-size: 20px;
  font-weight: 300;
  line-height: 20px;
  letter-spacing: 5px;
  text-transform: uppercase;
  color: var(--cream);
  background: var(--green);
  border: 1px solid var(--green);
  border-radius: 25px;
  padding: 15px 10px 10px;
  cursor: pointer;
}
.field-submit button:hover { opacity: 0.9; }

.form-note { font-size: 18px; padding-top: 7px; }
.ml-form-successContent h4 { font-family: var(--display); font-size: 28px; letter-spacing: 3px; text-transform: uppercase; padding-bottom: 8px; }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--green);
  color: var(--cream);
  padding: 25px 0 10px;
}
.footer-top {
  display: grid;
  grid-template-columns: 65.6667% 31.3333%;
  column-gap: 3%;
  border-bottom: 0.5px solid var(--line-cream);
}
.footer-script {
  font-family: var(--script);
  font-size: 100px;
  line-height: 100px;
  letter-spacing: 3px;
  padding-bottom: 10px;
  margin-bottom: 15px;
}
.footer-caps {
  font-family: var(--display);
  font-size: 22.4px;
  letter-spacing: 3px;
  text-transform: uppercase;
  padding: 0;
  margin-bottom: 15px;
}
.footer-right { text-align: center; }
.social-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  margin-bottom: 8px;
  color: var(--cream);
}
.footer-bottom {
  display: grid;
  grid-template-columns: 57.8125% 36.6875%;
  column-gap: 5.5%;
  padding: 5px 0 0;
  font-size: 18px;
  font-weight: 300;
}
.footer-bottom p { padding: 0; }
.footer-bottom-right { text-align: right; }

/* ==========================================================================
   981px – 1349px: Divi switches row padding to 2% and hero padding to 4%
   ========================================================================== */
@media (max-width: 1349px) {
  :root { --row-pad: 2vw; }
  .hero { padding: 4vw 0; }
  /* Scale big headings down a little so long words never split mid-word */
  .display { font-size: clamp(32px, 3.4vw, 40px); line-height: 1; letter-spacing: clamp(4px, 0.42vw, 5px); }
}

/* ==========================================================================
   Tablet & phone (<= 980px): columns stack with 30px between them
   ========================================================================== */
@media (max-width: 980px) {
  :root { --row-pad: 30px; }

  .hero-row, .grid-3, .grid-2, .join-row, .footer-top, .footer-bottom {
    grid-template-columns: 100%;
    row-gap: 30px;
  }
  .row-narrow { width: 80%; }

  .header-bar { grid-template-columns: 50% 50%; }
  .header-logo { width: 20%; }
  .tagline-desktop { display: none; }
  .tagline-mobile, .br-tablet { display: inline; }
  .site-header .header-tagline { font-size: 19.2px; line-height: 19.2px; margin: 0; }
  .eyebrow, .eyebrow-sm { font-size: 22.4px; line-height: 22.4px; }
  .display { font-size: 32px; line-height: 32px; }
  .footer-caps { font-size: 20.48px; }

  .hero { height: auto; padding: min(30vw, 180px) 0 180px; }
  .hero-script { margin-bottom: 30px; }

  .card .eyebrow {
    display: inline-block;
    border-bottom: 1px solid var(--line-green);
    padding-bottom: 10px;
  }
  .section-dark .card .eyebrow { border-bottom-color: var(--line-cream); }

  .join-form { border-left: 0; border-top: 1px solid var(--line-green); }
  .join-intro .display { margin-bottom: 30px; }
  .join-intro p { margin-bottom: 0; }

  .footer-right { text-align: center; }
  .footer-bottom-right { text-align: left; }
}

@media (max-width: 767px) {
  body { font-size: 22.08px; }
  .eyebrow, .eyebrow-sm { font-size: 19.2px; line-height: 19.2px; }
  .card .eyebrow { padding-bottom: 9px; }
  .display { font-size: 32px; line-height: 32px; }
  .hero-title { font-size: 48px; line-height: 48px; }
  .hero-script { font-size: 28.8px; line-height: 28.8px; padding-left: 0; }
  .btn { font-size: 19.2px; line-height: 32.64px; padding: 5.76px 19.2px 1px; }

  .header-logo { width: 30%; }
  .site-header .header-tagline { font-size: 12.8px; line-height: 12.8px; }

  .footer-script { font-size: 3.4rem; line-height: 3.4rem; text-align: center; }
  .footer-caps { font-size: 16.7px; text-align: center; }
}

/* MailerLite's own breakpoint: the form stacks at 550px and below */
@media (max-width: 550px) {
  .form-grid { grid-template-columns: 100%; grid-template-rows: none; }
  .field-first, .field-last, .field-email, .field-submit { grid-column: 1; grid-row: auto; }
  .field-submit { margin-top: 10px; }
  .field-submit button { font-size: 19.52px; font-weight: 700; padding: 10px 10px 5px; }
  .form-note { padding-top: 20px; }
}

/* Very small phones (e.g. iPhone SE, 320–400px): scale big type so words never split */
@media (max-width: 400px) {
  .hero-title { font-size: clamp(36px, 12.3vw, 48px); line-height: 1; letter-spacing: clamp(6px, 2.5vw, 10px); }
  .hero-script { font-size: clamp(24px, 7.4vw, 28.8px); line-height: 1.1; }
  .display { font-size: clamp(25px, 8.2vw, 32px); line-height: 1; letter-spacing: clamp(3px, 1.2vw, 5px); }
  .footer-caps { font-size: clamp(14px, 4.3vw, 16.7px); letter-spacing: clamp(1.5px, 0.75vw, 3px); }
  .site-header .header-tagline { font-size: clamp(10.5px, 3.3vw, 12.8px); line-height: 1; letter-spacing: clamp(1.5px, 0.75vw, 3px); }
  .header-bar { padding: 5px 20px; }
  .btn { letter-spacing: clamp(1.5px, 0.75vw, 3px); line-height: 1.35; padding: 9px 16px 5px; }
}
