/* My Granny Dates: "Midnight Rose" house brief. Cormorant Garamond 600 + Lato 400/700, self-hosted.
   Hero: portrait-beside-headline (oversized headline left, tall portrait photo right;
   phones: photo above, copy and Join Now pinned below in an svh-sized hero).
   Header: centred logo with the links and buttons below (one row on phones).
   Shapes: sharp corners, cards on the surface colour.
   Signature detail: a soft duotone tint over the hero photo in the rose accent; the same
   two-tone rose/blush pairing carries the H2 rules, card tops and dividers. */

@font-face {
  font-family: 'Cormorant Garamond';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('/fonts/cormorant-garamond-latin-600-normal.woff2') format('woff2');
}
@font-face {
  font-family: 'Lato';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/fonts/lato-latin-400-normal.woff2') format('woff2');
}
@font-face {
  font-family: 'Lato';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('/fonts/lato-latin-700-normal.woff2') format('woff2');
}

:root {
  --bg: #120c10;
  --surface: #1d1419;
  --raised: #261a21;
  --tint: #24121c;
  --ink: #f5efe9;
  --muted: #c8bdb5;
  --join: #c2185b;
  --join-hover: #d81b60;
  --join-ink: #ffffff;
  --link: #f48fb1;
  --head: #3a1529;
  --footer: #0b0709;
  --line: rgba(244, 143, 177, 0.24);
  --duo: linear-gradient(90deg, var(--join) 0 55%, var(--link) 55% 100%);
  --font-head: 'Cormorant Garamond', Garamond, Georgia, 'Times New Roman', serif;
  --font-body: 'Lato', 'Segoe UI', Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1.08rem;
  line-height: 1.75;
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
p { margin: 0 0 1.15em; }
a { color: var(--link); }
:focus-visible { outline: 3px solid var(--link); outline-offset: 3px; }

.container { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 28px; }

.skip-link {
  position: absolute; left: 12px; top: -60px; z-index: 200;
  background: var(--surface); color: var(--ink); padding: 10px 16px; text-decoration: none;
}
.skip-link:focus { top: 12px; }

/* ---------- Cards: surface colour, sharp corners, two-tone rose top edge ---------- */
.card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 0;
}
.card::before {
  content: ""; position: absolute; left: -1px; right: -1px; top: -1px; height: 3px;
  background: var(--duo);
}

/* ---------- Buttons (Join Now is the strongest colour on every page) ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; padding: 0 1.7rem;
  font-family: var(--font-body); font-weight: 700; font-size: 0.98rem; line-height: 1.2; letter-spacing: 0.07em;
  text-transform: uppercase;
  text-decoration: none; border: 0; border-radius: 0; cursor: pointer;
  white-space: nowrap; max-width: 100%;
}
.btn-primary { background: var(--join); color: var(--join-ink); }
.btn-primary:hover, .btn-primary:focus-visible { background: var(--join-hover); color: var(--join-ink); }
.btn-sm { min-height: 42px; padding: 0 1.15rem; font-size: 0.86rem; }
.btn-lg { min-height: 56px; padding: 0 2.5rem; font-size: 1rem; }

/* ---------- Header: centred logo, links and buttons below ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  display: flex; flex-direction: column; align-items: center;
  padding-top: 14px; padding-bottom: 12px; gap: 8px;
}
.brand { display: inline-flex; align-items: center; color: var(--ink); text-decoration: none; flex: 0 0 auto; }
.brand-logo { width: 210px; height: auto; }
.header-row { display: flex; align-items: center; justify-content: center; gap: 18px; width: 100%; }
.mainnav { display: flex; align-items: center; gap: 4px; }
.mainnav a {
  color: var(--ink); text-decoration: none; font-weight: 700; font-size: 0.84rem;
  letter-spacing: 0.11em; text-transform: uppercase;
  padding: 10px 14px; border-bottom: 2px solid transparent;
}
.mainnav a:hover { border-bottom-color: var(--line); }
.mainnav a.active { color: var(--link); border-bottom-color: var(--link); }
.mainnav a.login-link {
  margin-left: 10px; border: 1px solid var(--link); padding: 9px 18px; min-height: 42px;
  display: inline-flex; align-items: center;
}
.mainnav a.login-link:hover { background: var(--surface); }
.header-cta { display: flex; align-items: center; gap: 10px; }
.menu-toggle {
  display: none; width: 44px; height: 44px; padding: 0;
  background: var(--surface); border: 1px solid var(--link); border-radius: 0; cursor: pointer;
  flex-direction: column; align-items: center; justify-content: center; gap: 4px;
}
.menu-toggle span { display: block; width: 18px; height: 2px; background: var(--ink); }

/* ---------- Hero: oversized headline left, tall portrait right ---------- */
.hero {
  background:
    radial-gradient(ellipse at 85% 30%, rgba(194, 24, 91, 0.16), transparent 60%),
    var(--bg);
  border-bottom: 1px solid var(--line);
}
.hero-inner {
  display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 0.8fr);
  gap: 64px; align-items: center;
  min-height: clamp(520px, calc(100vh - 140px), 720px);
  padding-top: 48px; padding-bottom: 56px;
}
.hero-copy { max-width: 640px; }
.hero-copy::before {
  content: ""; display: block; width: 88px; height: 4px; margin-bottom: 28px;
  background: var(--duo);
}
.hero-heading {
  font-family: var(--font-head); font-weight: 600; color: var(--ink);
  font-size: clamp(2.8rem, 5.4vw, 5rem); line-height: 1.02; letter-spacing: -0.005em;
  margin: 0 0 22px;
}
.hero-strapline { color: var(--muted); font-size: 1.16rem; line-height: 1.65; margin: 0 0 34px; max-width: 32rem; }
.hero-media {
  position: relative; overflow: hidden;
  aspect-ratio: 4 / 5; width: 100%; max-height: 620px;
  background: var(--tint);
  outline: 1px solid var(--line); outline-offset: 12px;
}
.hero-media picture, .hero-media img { width: 100%; height: 100%; }
.hero-media img {
  object-fit: cover; object-position: center; position: absolute; inset: 0;
  filter: grayscale(0.9) contrast(1.06) brightness(0.96);
}
/* Signature: soft duotone tint in the rose accent */
.hero-media::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(170deg, #f48fb1 0%, #c2185b 55%, #3a1529 100%);
  mix-blend-mode: color; opacity: 0.62;
}
.hero-media::before {
  content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background: linear-gradient(180deg, rgba(18, 12, 16, 0) 60%, rgba(18, 12, 16, 0.35) 100%);
}

/* ---------- Content ---------- */
.section { padding: 3.8rem 0 1.4rem; }
.section + .section { padding-top: 0.6rem; }
.section--first { padding-top: 4.4rem; }
.prose { max-width: 46rem; }
.prose > :last-child { margin-bottom: 0; }

h1, h2, h3 { font-family: var(--font-head); font-weight: 600; color: var(--ink); letter-spacing: 0; }
h1 { font-size: clamp(2.3rem, 4.4vw, 3.5rem); line-height: 1.08; margin: 0 0 0.6em; max-width: 22ch; }
h2 { font-size: clamp(1.95rem, 3.2vw, 2.65rem); line-height: 1.12; margin: 2.2em 0 0.5em; }
h3 { font-size: 1.7rem; line-height: 1.2; margin: 0 0 0.45em; color: var(--link); }
/* Divider: the two-tone rose rule above every H2 */
h2::before {
  content: ""; display: block; width: 56px; height: 3px; margin-bottom: 0.8em;
  background: var(--duo);
}
.prose > h2:first-child, .band-intro:first-child h2 { margin-top: 0; }

.lead { font-size: 1.16rem; line-height: 1.8; }
.seo-content a:not(.btn) {
  color: var(--link); font-weight: 700;
  text-decoration: underline; text-decoration-thickness: 1.5px; text-underline-offset: 3px;
}
.seo-content a:not(.btn):hover { color: var(--ink); text-decoration-color: var(--link); }

.band { position: relative; padding: 4.2rem 0; margin: 3rem 0; }
.band-intro { max-width: 46rem; }
.band-intro p:last-child { margin-bottom: 0; }

/* Tinted highlight band */
.band--tint { background: var(--tint); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.band--tint::before {
  content: ""; position: absolute; left: 0; right: 0; top: -1px; height: 3px; background: var(--duo);
}

/* Pull-quote band: one paragraph of the section set large, with a rose rule */
.band--quote { background: var(--surface); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.pull {
  font-family: var(--font-head); font-weight: 600; color: var(--ink);
  font-size: clamp(1.55rem, 2.6vw, 2.05rem); line-height: 1.32;
  margin: 1.4em 0 1.4em; padding: 0.15em 0 0.15em 1.1em;
  border-left: 4px solid var(--join);
}
.pull::before {
  content: "\201C"; display: block; font-size: 2.6em; line-height: 0.6; color: var(--link); margin-bottom: 0.08em;
}

/* Numbered cards (separate boxes, no connecting line) */
.steps {
  list-style: none; counter-reset: step; margin: 2rem 0 0.6rem; padding: 0;
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 26px;
}
.steps li { counter-increment: step; padding: 30px 28px 28px; line-height: 1.7; }
.steps li::after {
  content: counter(step, decimal-leading-zero); position: absolute; top: 18px; right: 22px;
  font-family: var(--font-head); font-size: 2.6rem; line-height: 1; color: var(--link); opacity: 0.85;
}
.steps li p { margin: 0; }
.steps li p:first-child { padding-right: 52px; }

/* Question Deck (centrepiece table) */
.band--deck { background: var(--surface); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.table-wrap { margin: 2rem 0 0.4rem; padding: 0; background: var(--bg); overflow-x: auto; }
.deck { width: 100%; border-collapse: collapse; font-size: 0.98rem; line-height: 1.55; }
.deck th, .deck td { text-align: left; vertical-align: top; padding: 16px 18px; }
.deck thead th {
  background: var(--head); color: var(--ink);
  font-weight: 700; font-size: 0.78rem; letter-spacing: 0.12em; text-transform: uppercase;
}
.deck tbody th, .deck tbody td { border-bottom: 1px solid var(--line); }
.deck tbody tr:last-child th, .deck tbody tr:last-child td { border-bottom: 0; }
.deck .num { font-family: var(--font-head); font-size: 1.9rem; line-height: 1; color: var(--link); width: 3.2rem; }
.deck .ask { font-family: var(--font-head); font-size: 1.35rem; line-height: 1.25; color: var(--ink); width: 34%; }
.deck td { color: var(--ink); }
.deck td.lead-to { color: var(--muted); }
.deck tbody tr:last-child { background: rgba(194, 24, 91, 0.14); }

/* Ruled numbered list (GILF page) */
.ruled {
  list-style: none; counter-reset: rule; margin: 1.8rem 0 1.8rem; padding: 0;
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 36px;
}
.ruled li {
  counter-increment: rule; position: relative;
  padding: 20px 0 20px 74px; border-top: 1px solid var(--line); line-height: 1.65;
}
.ruled li::before {
  content: counter(rule); position: absolute; left: 0; top: 10px;
  width: 52px; height: 52px; display: flex; align-items: center; justify-content: center;
  font-family: var(--font-head); font-size: 2rem; line-height: 1; color: var(--ink);
  background: var(--join); box-shadow: inset 0 -4px 0 var(--link);
}
.ruled strong { color: var(--link); }

/* Setting cards (near-me) */
.settings { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 26px; margin-top: 2rem; }
.setting { padding: 30px 30px 26px; }
.setting p:last-child { margin-bottom: 0; }

/* Tick checklist panel (near-me) */
.ticks-card { padding: 30px 32px; margin: 1.8rem 0; }
.ticks { list-style: none; margin: 0; padding: 0; }
.ticks li { position: relative; padding: 14px 0 14px 40px; border-top: 1px solid var(--line); line-height: 1.65; }
.ticks li:first-child { border-top: 0; padding-top: 4px; }
.ticks li::before {
  content: ""; position: absolute; left: 2px; top: 21px; width: 20px; height: 11px;
  border-left: 3px solid var(--link); border-bottom: 3px solid var(--link);
  transform: rotate(-45deg);
}
.ticks li:first-child::before { top: 11px; }
.ticks strong { color: var(--link); }

/* Join band */
.band--join {
  background: linear-gradient(160deg, var(--surface) 0%, var(--tint) 100%);
  border-top: 1px solid var(--line);
  margin-bottom: 0; padding: 4.8rem 0 5rem;
}
.join-panel { max-width: 46rem; margin: 0 auto; padding: 46px 44px 48px; text-align: center; background: var(--bg); }
.join-panel h2 { margin-top: 0; }
.join-panel h2::before { margin-left: auto; margin-right: auto; }
.join-panel p { font-size: 1.1rem; }
.join-panel .btn { margin-top: 0.6rem; }

/* 404 */
.notfound { padding: 4.5rem 0 4rem; }

/* ---------- Footer ---------- */
.footer {
  background: var(--footer); color: var(--muted);
  padding: 3.2rem 0 2rem; font-size: 0.96rem; border-top: 1px solid var(--line);
  position: relative;
}
.footer::before { content: ""; position: absolute; left: 0; right: 0; top: -1px; height: 3px; background: var(--duo); }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 32px; }
.footer-title { font-weight: 700; color: var(--link); font-size: 0.82rem; letter-spacing: 0.14em; text-transform: uppercase; margin: 0 0 0.8em; }
.footer ul { list-style: none; margin: 0; padding: 0; }
.footer li { margin: 0 0 4px; }
.footer a { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--link); display: inline-block; padding: 4px 0; }
.footer a:hover { color: var(--link); }
.footer .brand { text-decoration: none; padding: 0; color: var(--ink); }
.footer-brand .brand-logo { width: 200px; }
.footer-bottom { margin-top: 2.2rem; padding-top: 1.2rem; border-top: 1px solid var(--line); font-size: 0.9rem; color: var(--muted); }

/* ---------- Cookie banner ---------- */
.cookie {
  display: none; position: fixed; left: 0; right: 0; bottom: 0; z-index: 300;
  background: var(--surface); color: var(--ink);
  border-top: 2px solid var(--join);
}
.cookie.show { display: block; }
.cookie-inner {
  max-width: 1180px; margin: 0 auto; padding: 12px 28px;
  display: flex; align-items: center; justify-content: center; gap: 16px;
  font-size: 0.94rem; line-height: 1.4;
}
.cookie-inner a { color: var(--link); text-decoration: underline; }
.cookie-accept {
  flex: 0 0 auto; min-height: 40px; padding: 0 22px;
  background: var(--join); color: var(--join-ink); border: 0; border-radius: 0;
  font-family: var(--font-body); font-weight: 700; font-size: 0.88rem; letter-spacing: 0.06em; text-transform: uppercase; cursor: pointer;
}
.cookie-accept:hover { background: var(--join-hover); }

/* ---------- Tablet ---------- */
@media (max-width: 1023.98px) {
  .steps { grid-template-columns: 1fr; }
  .ruled { grid-template-columns: 1fr; }
  .hero-inner { gap: 40px; grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr); }
  .hero-heading { font-size: clamp(2.4rem, 5.6vw, 3.4rem); }
}

/* ---------- Phones: one-row header + in-flow accordion; hero sized by svh ---------- */
@media (max-width: 767.98px) {
  body { font-size: 1.02rem; }
  .container { padding: 0 16px; }

  .header-inner { flex-direction: row; flex-wrap: wrap; align-items: center; gap: 0 10px; padding-top: 9px; padding-bottom: 9px; }
  .header-row { display: contents; }
  .brand { order: 1; }
  .brand svg, .brand-logo, .brand img { width: clamp(110px, 33vw, 240px); }
  .header-cta { order: 2; margin-left: auto; }
  .btn-sm { min-height: 40px; padding: 0 0.9rem; font-size: 0.8rem; }
  .menu-toggle { display: inline-flex; }
  .mainnav {
    order: 3; width: 100%; display: none; margin: 10px 0 0;
    border-top: 1px solid var(--line);
    max-height: calc(100dvh - 64px); overflow-y: auto; -webkit-overflow-scrolling: touch;
    padding-bottom: env(safe-area-inset-bottom);
  }
  .mainnav.open { display: block; }
  .mainnav a { display: block; padding: 13px 8px; border-bottom: 1px solid var(--line); font-size: 0.92rem; }
  .mainnav a.active { padding-left: 16px; box-shadow: inset 4px 0 0 var(--link); border-bottom-color: var(--line); }
  .mainnav a.login-link { margin: 0; border: 0; border-bottom: 1px solid var(--line); padding: 13px 8px; min-height: 0; display: block; }

  /* header about 60px, cookie banner allowance 56px */
  .hero { height: calc(100vh - 60px - 56px); height: calc(100svh - 60px - 56px); min-height: 440px; }
  .hero > .container { height: 100%; padding: 0; }
  .hero-inner {
    display: flex; flex-direction: column; height: 100%; min-height: 0;
    gap: 0; padding: 0;
  }
  .hero-media {
    order: 1; flex: 1 1 auto; min-height: 120px; aspect-ratio: auto; max-height: none;
    outline: 0; border-bottom: 3px solid var(--join);
  }
  .hero-copy { order: 2; flex: 0 0 auto; padding: 14px 16px 16px; max-width: none; }
  .hero-copy::before { display: none; }
  .hero-heading { font-size: clamp(1.75rem, 8vw, 2rem); line-height: 1.08; margin-bottom: 8px; }
  .hero-strapline { font-size: 0.96rem; line-height: 1.45; margin-bottom: 14px; }
  .hero-btn { width: 100%; min-height: 50px; }

  .section { padding: 2.6rem 0 0.8rem; }
  .section--first { padding-top: 2.6rem; }
  .band { padding: 2.8rem 0; margin: 2.2rem 0; }
  .band--join { margin-bottom: 0; }
  h3 { font-size: 1.5rem; }

  .pull { padding-left: 0.8em; }
  .steps li { padding: 24px 20px 22px; }
  .settings { grid-template-columns: 1fr; gap: 20px; }
  .setting { padding: 24px 20px 20px; }
  .ruled li { padding-left: 64px; }
  .ruled li::before { width: 46px; height: 46px; font-size: 1.8rem; }
  .ticks-card { padding: 24px 20px; }
  .join-panel { padding: 38px 20px 38px; }

  /* Stacked Question Deck */
  .table-wrap { background: none; border: 0; overflow: visible; }
  .table-wrap::before { display: none; }
  .deck thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .deck, .deck tbody, .deck tr, .deck th, .deck td { display: block; width: 100%; }
  .deck tbody tr { position: relative; background: var(--bg); border: 1px solid var(--line); border-top: 3px solid var(--join); margin-bottom: 16px; padding: 8px 0 12px; }
  .deck tbody tr:last-child { background: #221019; }
  .deck tbody th, .deck tbody td { border-bottom: 0 !important; }
  .deck .num { position: absolute; top: 12px; right: 14px; width: auto; padding: 0; font-size: 1.7rem; }
  .deck .ask { width: 100%; padding: 12px 56px 6px 18px; }
  .deck td { padding: 6px 18px; }
  .deck td[data-label]::before {
    content: attr(data-label); display: block;
    font-size: 0.74rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted);
  }

  .footer-grid { grid-template-columns: 1fr 1fr; gap: 24px; }
  .footer-brand { grid-column: 1 / -1; }

  .cookie-inner { padding: 7px 12px; gap: 10px; font-size: 0.82rem; justify-content: space-between; }
  .cookie-accept { min-height: 36px; padding: 0 14px; font-size: 0.8rem; }
}

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; transition: none !important; }
}

/* hero focus (bulk runner v15) */
@media (min-width: 768px) {
  picture img { object-position: 52% 9% !important; }
}
@media (max-width: 767px) {
  picture img { object-position: 50% 50% !important; }
}
