/* Sex In Your Postcode
   Palette: Deep Emerald (hot, direct, late-night). Bodoni Moda 600 headings, Work Sans 400/600 body.
   Hero: framed floating card. Header: transparent over the hero, solid once scrolled past it
   (solid by default without JS). Shapes: sharp corners throughout.
   Signature detail: angled section edges (clip-path) between bands, echoed in the hero
   window's slanted edge, the slanted rule above every H2 and the slanted card tabs. */

@font-face {
  font-family: 'Bodoni Moda';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('/fonts/bodoni-moda-latin-600-normal.woff2') format('woff2');
}
@font-face {
  font-family: 'Work Sans';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/fonts/work-sans-latin-400-normal.woff2') format('woff2');
}
@font-face {
  font-family: 'Work Sans';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('/fonts/work-sans-latin-600-normal.woff2') format('woff2');
}

:root {
  --bg: #08140f;
  --surface: #10201a;
  --raised: #163026;
  --tint: #0c1d16;
  --ink: #f5efe9;
  --muted: #c8bdb5;
  --join: #c8334d;
  --join-hover: #b02a42;
  --link: #6fd3a5;
  --rose: #e2566e;
  --wine: #2a0f17;
  --line: rgba(111, 211, 165, 0.2);
  --font-head: 'Bodoni Moda', Didot, 'Bodoni 72', Georgia, serif;
  --font-body: 'Work Sans', system-ui, -apple-system, 'Segoe UI', Arial, sans-serif;
  --cut: clamp(22px, 3.4vw, 56px);
  --hh: 78px;
  --logo-key: #6fd3a5;
  --logo-flame: #e2566e;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 90px; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: var(--font-body); font-size: 1.08rem; line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}
img, svg { display: block; max-width: 100%; }
a { color: var(--link); }
:focus-visible { outline: 3px solid var(--link); outline-offset: 3px; }
.container { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 28px; }
.skip-link {
  position: absolute; left: 12px; top: -60px; z-index: 400;
  background: var(--ink); color: var(--bg); padding: 10px 16px; font-weight: 600; text-decoration: none;
}
.skip-link:focus { top: 12px; }

/* ---------- Buttons (sharp corners) ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; max-width: 100%;
  font-family: var(--font-body); font-weight: 600; letter-spacing: 0.02em;
  text-decoration: none; border: 0; border-radius: 0; cursor: pointer; text-align: center;
  transition: background-color 0.2s ease, transform 0.2s ease;
}
.btn-primary { background: var(--join); color: #ffffff; box-shadow: 4px 4px 0 rgba(226, 86, 110, 0.28); }
.btn-primary:hover { background: var(--join-hover); color: #ffffff; }
.btn-sm { min-height: 42px; padding: 0 1.2rem; font-size: 0.96rem; }
.btn-lg { min-height: 56px; padding: 0 2.4rem; font-size: 1.08rem; }

/* ---------- Header: solid by default; transparent over the hero while .is-top ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(16, 32, 26, 0.97);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
  transition: background-color 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}
.site-header.is-top:not(.menu-open) { background: transparent; box-shadow: none; border-bottom-color: transparent; }
.header-inner {
  display: flex; flex-wrap: wrap; align-items: center;
  gap: 0 18px; min-height: var(--hh); padding-top: 10px; padding-bottom: 10px;
}
.brand { display: inline-flex; align-items: center; color: var(--ink); text-decoration: none; flex: 0 0 auto; }
.brand-logo { width: 184px; height: auto; }
.mainnav { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.mainnav a {
  position: relative; color: var(--ink); text-decoration: none; font-weight: 600; font-size: 0.98rem;
  padding: 8px 14px;
}
.mainnav a::after {
  content: ""; position: absolute; left: 14px; right: 14px; bottom: 2px; height: 3px;
  background: var(--link); transform: skewX(-30deg) scaleX(0); transform-origin: left;
  transition: transform 0.2s ease;
}
.mainnav a:hover::after, .mainnav a.active::after { transform: skewX(-30deg) scaleX(1); }
.mainnav a.active { color: var(--link); }
.mainnav a.login-link {
  margin-left: 10px; border: 2px solid rgba(111, 211, 165, 0.65); padding: 6px 18px; min-height: 42px;
  display: inline-flex; align-items: center;
}
.mainnav a.login-link::after { display: none; }
.mainnav a.login-link:hover { border-color: var(--link); background: rgba(111, 211, 165, 0.1); }
.header-cta { display: flex; align-items: center; gap: 10px; }
.menu-toggle {
  display: none; width: 44px; height: 44px; padding: 0;
  background: rgba(16, 32, 26, 0.8); border: 2px solid rgba(111, 211, 165, 0.65); 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: framed floating card ---------- */
.hero {
  position: relative;
  margin-top: calc(-1 * var(--hh));
  padding: calc(var(--hh) + 26px) 0 70px;
  background:
    radial-gradient(ellipse 50% 60% at 80% 35%, rgba(111, 211, 165, 0.10), transparent 70%),
    radial-gradient(ellipse 40% 50% at 8% 85%, rgba(200, 51, 77, 0.14), transparent 70%),
    var(--bg);
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - var(--cut)), 0 100%);
}
.hero-stage {
  position: relative; display: flex; align-items: center;
  min-height: clamp(520px, calc(100vh - 180px), 700px);
}
/* photo inside a framed window with a slanted left edge; an offset hairline frame sits behind it */
.hero-window {
  position: absolute; top: 0; bottom: 0; right: 28px; left: 30%;
}
.hero-window::before {
  content: ""; position: absolute; inset: -14px 14px 14px -14px;
  border-top: 1px solid rgba(111, 211, 165, 0.45);
  border-right: 1px solid rgba(111, 211, 165, 0.45);
  pointer-events: none;
}
.hero-window picture {
  position: relative; display: block; width: 100%; height: 100%; overflow: hidden;
  background: #173026;
  clip-path: polygon(9% 0, 100% 0, 100% 100%, 0 100%);
}
.hero-window img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; object-position: center;
}
.hero-window picture::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(90deg, rgba(8, 20, 15, 0.45), transparent 32%), linear-gradient(0deg, rgba(8, 20, 15, 0.35), transparent 30%);
}
.hero-card {
  position: relative; z-index: 2;
  width: min(500px, 42%);
  padding: 44px 40px 40px;
  background: var(--surface);
  border: 1px solid rgba(111, 211, 165, 0.3);
  box-shadow: 18px 18px 0 rgba(200, 51, 77, 0.16), 0 26px 60px rgba(0, 0, 0, 0.5);
}
.hero-card::before {
  content: ""; position: absolute; left: -1px; top: -1px; width: 120px; height: 7px;
  background: linear-gradient(90deg, var(--join) 0 62%, var(--link) 62% 100%);
  clip-path: polygon(0 0, 100% 0, calc(100% - 7px) 100%, 0 100%);
}
.hero-heading {
  font-family: var(--font-head); font-weight: 600; color: var(--ink);
  font-size: clamp(2rem, 3.3vw, 3rem); line-height: 1.1; margin: 0 0 18px;
}
.hero-strapline { color: var(--muted); font-size: 1.12rem; line-height: 1.6; margin: 0 0 28px; }

/* ---------- Type ---------- */
h1, h2, h3 { font-family: var(--font-head); font-weight: 600; color: var(--ink); letter-spacing: 0; }
h1 { font-size: clamp(2rem, 3.8vw, 3.05rem); line-height: 1.12; margin: 0 0 0.7em; max-width: 24ch; }
h2 { font-size: clamp(1.55rem, 2.6vw, 2.15rem); line-height: 1.2; margin: 2.2em 0 0.55em; }
/* slanted two-tone rule above each H2 (echoes the angled band edges) */
h2::before {
  content: ""; display: block; width: 64px; height: 6px; margin-bottom: 18px;
  background: linear-gradient(90deg, var(--join) 0 55%, var(--link) 55% 100%);
  clip-path: polygon(6px 0, 100% 0, calc(100% - 6px) 100%, 0 100%);
}
h3 { font-size: 1.35rem; line-height: 1.25; margin: 0 0 0.5em; }
p { margin: 0 0 1.1em; }
.lead { font-size: 1.2rem; line-height: 1.7; }
.prose { max-width: 46rem; }
.prose > h2:first-child { margin-top: 0; }
.prose > :last-child { margin-bottom: 0; }
.prose--after { margin-top: 1.8rem; }
strong { font-weight: 600; color: var(--ink); }

/* in-content links styled as links; buttons keep their own colours */
.seo-content a:not(.btn) {
  color: var(--link); text-decoration: underline; text-decoration-thickness: 1px;
  text-underline-offset: 3px; font-weight: 600;
}
.seo-content a:not(.btn):hover { color: var(--ink); text-decoration-color: var(--link); }

/* ---------- Sections and angled bands ---------- */
.section { padding: 3.8rem 0 1.6rem; }
.section--first { padding-top: 3.4rem; }
.band {
  position: relative; margin: 2.6rem 0;
  padding: calc(var(--cut) + 3.2rem) 0;
  background: var(--tint);
  clip-path: polygon(0 var(--cut), 100% 0, 100% calc(100% - var(--cut)), 0 100%);
}
.band--rev { clip-path: polygon(0 0, 100% var(--cut), 100% 100%, 0 calc(100% - var(--cut))); }
.band--tint { background: linear-gradient(180deg, #0f241c, var(--tint)); }

/* ---------- Pull-quote band ---------- */
.band--quote { background: linear-gradient(110deg, var(--wine) 0%, var(--surface) 70%); }
.pullquote { margin: 0 auto; max-width: 52rem; text-align: center; }
.pullquote::before {
  content: "\201C"; display: block; font-family: var(--font-head); font-size: 5rem; line-height: 0.7;
  color: var(--rose); margin-bottom: 14px;
}
.pullquote blockquote { margin: 0; }
.pullquote p {
  font-family: var(--font-head); font-weight: 600; font-size: clamp(1.5rem, 3vw, 2.3rem); line-height: 1.3;
  margin: 0; color: var(--ink);
}

/* ---------- Cards (sharp, on the surface colour, slanted tab) ---------- */
.card {
  position: relative; background: var(--surface); border: 1px solid var(--line);
  padding: 32px 28px 26px;
}
.card::before {
  content: ""; position: absolute; left: -1px; top: -1px; width: 56px; height: 5px;
  background: var(--join); clip-path: polygon(0 0, 100% 0, calc(100% - 5px) 100%, 0 100%);
}
.card > :last-child { margin-bottom: 0; }

/* three-feature row */
.features { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; margin-top: 2.2rem; }
.features .card:nth-child(2) { margin-top: 28px; }
.features .card:nth-child(3) { margin-top: 56px; }

/* numbered cards, 2x2, no joining line */
.numbered { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; margin-top: 2.2rem; }
.numbered h3 { display: flex; align-items: baseline; gap: 12px; }
.numbered .num { font-size: 2.3rem; line-height: 1; color: var(--rose); flex: 0 0 auto; }

/* stage cards: stepped down the page, separate boxes */
.stages { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; margin-top: 2.2rem; align-items: start; }
.stages .card { border-top: 0; }
.stages .card::before { width: 100%; height: 4px; background: linear-gradient(90deg, var(--join), var(--link)); clip-path: none; }
.stages .card:nth-child(2) { margin-top: 36px; }
.stages .card:nth-child(3) { margin-top: 72px; }

/* tick checklist, two columns */
.ticks { list-style: none; margin: 2rem 0 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 22px; }
.ticks li {
  position: relative; background: var(--surface); border: 1px solid var(--line);
  padding: 20px 22px 20px 62px;
}
.ticks li::before {
  content: ""; position: absolute; left: 20px; top: 22px; width: 26px; height: 26px;
  background: var(--raised); border: 2px solid var(--link);
}
.ticks li::after {
  content: ""; position: absolute; left: 28px; top: 26px; width: 9px; height: 15px;
  border: solid var(--link); border-width: 0 3px 3px 0; transform: rotate(45deg);
}

/* housing cards, 2x2, slanted top edge */
.homes { list-style: none; margin: 2rem 0 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; }
.homes li {
  position: relative; background: var(--surface);
  padding: calc(30px + 18px) 26px 26px;
  clip-path: polygon(0 18px, 100% 0, 100% 100%, 0 100%);
  border-bottom: 3px solid var(--join);
}
.homes li strong { display: block; font-family: var(--font-head); font-size: 1.3rem; line-height: 1.25; margin-bottom: 8px; }

/* little black book: ruled rows with a key marker */
.book { list-style: none; margin: 2rem 0 0; padding: 0; max-width: 52rem; border-top: 1px solid var(--line); }
.book li {
  position: relative; padding: 20px 0 20px 58px; border-bottom: 1px solid var(--line);
}
.book li::before {
  content: ""; position: absolute; left: 4px; top: 25px; width: 18px; height: 18px;
  border: 3px solid var(--link); border-radius: 50%;
}
.book li::after {
  content: ""; position: absolute; left: 24px; top: 33px; width: 20px; height: 3px;
  background: var(--link);
}
.book li strong { color: var(--ink); }

/* ---------- Comparison table (centrepiece) ---------- */
.table-wrap { margin-top: 2rem; overflow-x: auto; border: 1px solid var(--line); background: var(--surface); }
.compare { width: 100%; border-collapse: collapse; font-size: 1rem; line-height: 1.55; }
.compare th, .compare td { text-align: left; vertical-align: top; padding: 16px 18px; border-bottom: 1px solid var(--line); }
.compare thead th {
  background: var(--raised); font-family: var(--font-body); font-weight: 600; font-size: 0.9rem;
  letter-spacing: 0.05em; text-transform: uppercase; color: var(--ink);
  border-bottom: 3px solid var(--join);
}
.compare tbody th { font-family: var(--font-head); font-weight: 600; font-size: 1.08rem; width: 24%; color: var(--ink); }
.compare tbody tr:nth-child(even) { background: rgba(111, 211, 165, 0.04); }
.compare tbody tr:last-child th, .compare tbody tr:last-child td { border-bottom: 0; }

/* ---------- Split text-and-image band ---------- */
.section--split { padding-top: 4.2rem; }
.split { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr); gap: 56px; align-items: center; }
.split--rev .split-copy { order: 2; }
.split--rev .split-art { order: 1; }
.split-copy > h2:first-child { margin-top: 0; }
.split-copy > :last-child { margin-bottom: 0; }
.illus { width: 100%; max-width: 380px; height: auto; margin: 0 auto; }

/* ---------- Final Join band ---------- */
.band--join { background: linear-gradient(120deg, #3a1220 0%, var(--wine) 45%, var(--surface) 100%); margin-bottom: 0; }
.join-panel { max-width: 46rem; margin: 0 auto; text-align: center; }
.join-panel h2 { margin-top: 0; }
.join-panel h2::before { margin-left: auto; margin-right: auto; }
.join-panel .btn { margin-top: 0.6rem; }

/* ---------- 404 ---------- */
.notfound { padding: 5rem 0 6rem; }

/* ---------- Footer ---------- */
.footer {
  background: #050d0a; border-top: 1px solid var(--line); padding: 3.4rem 0 2rem; color: var(--ink);
}
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 32px; }
.footer-title { font-family: var(--font-head); font-weight: 600; color: var(--ink); font-size: 1.15rem; margin: 0 0 0.7em; }
.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: 210px; }
.footer-bottom { margin-top: 2.2rem; padding-top: 1.2rem; border-top: 1px solid var(--line); font-size: 0.93rem; 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(--link);
  box-shadow: 0 -6px 20px rgba(0, 0, 0, 0.45);
}
.cookie.show { display: block; }
.cookie-inner {
  max-width: 1200px; margin: 0 auto; padding: 12px 28px;
  display: flex; align-items: center; justify-content: center; gap: 16px;
  font-size: 0.96rem; 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: #ffffff; border: 0; border-radius: 0;
  font-family: var(--font-body); font-weight: 600; font-size: 0.95rem; cursor: pointer;
}
.cookie-accept:hover { background: var(--join-hover); }

/* ---------- Tablet ---------- */
@media (max-width: 1023.98px) {
  .brand-logo { width: 164px; }
  /* In-flow accordion menu below 1024px so the closed header stays on one row */
  .header-inner { flex-wrap: wrap; }
  .brand { order: 1; }
  .header-cta { order: 2; margin-left: auto; }
  .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 - 76px); 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: 1.02rem; }
  .mainnav a::after { display: none; }
  .mainnav a.active { padding-left: 16px; box-shadow: inset 4px 0 0 var(--link); }
  .mainnav a.login-link { margin: 0; border: 0; border-bottom: 1px solid var(--line); padding: 13px 8px; min-height: 0; display: block; }
  .hero-window { left: 34%; }
  .hero-card { width: min(470px, 52%); padding: 36px 30px 32px; }
  .features, .stages { grid-template-columns: 1fr; max-width: 46rem; }
  .features .card:nth-child(n), .stages .card:nth-child(n) { margin-top: 0; }
  .split { gap: 36px; }
}

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

  .header-inner { gap: 0 10px; padding-top: 8px; padding-bottom: 8px; }
  .brand svg, .brand-logo, .brand img { width: clamp(110px, 33vw, 240px); }
  .btn-sm { min-height: 40px; padding: 0 0.95rem; font-size: 0.93rem; }
  .btn-primary { box-shadow: 3px 3px 0 rgba(226, 86, 110, 0.28); }

  /* the whole hero (header included, it sits over the hero) fits above a 64px cookie allowance */
  .hero {
    height: calc(100vh - 64px); height: calc(100svh - 64px); min-height: 500px;
    padding: calc(var(--hh) + 6px) 0 14px;
    clip-path: none;
  }
  .hero-stage { flex-direction: column; align-items: stretch; height: 100%; min-height: 0; padding: 0 6px; }
  .hero-window { position: relative; inset: auto; flex: 1 1 auto; min-height: 110px; }
  .hero-window::before { inset: -8px -6px 8px 8px; border-right: 0; border-left: 1px solid rgba(111, 211, 165, 0.45); }
  .hero-window picture { clip-path: polygon(0 0, 100% 0, 100% 88%, 0 100%); }
  .hero-window picture::after { background: linear-gradient(0deg, rgba(8, 20, 15, 0.45), transparent 35%); }
  .hero-card {
    flex: 0 0 auto; width: auto; margin: -30px 8px 0;
    padding: 16px 16px 14px;
    box-shadow: 8px 8px 0 rgba(200, 51, 77, 0.16), 0 16px 40px rgba(0, 0, 0, 0.5);
  }
  .hero-card::before { width: 84px; height: 5px; }
  .hero-heading { font-size: clamp(1.5rem, 6.6vw, 2rem); line-height: 1.12; margin-bottom: 8px; }
  .hero-strapline { font-size: 0.95rem; line-height: 1.45; margin-bottom: 12px; }
  .hero-btn { width: 100%; min-height: 50px; }

  .section { padding: 2.6rem 0 0.8rem; }
  .section--first { padding-top: 2.4rem; }
  .band { padding: calc(var(--cut) + 2.2rem) 0; margin: 2rem 0; }
  .band--join { margin-bottom: 0; }
  .lead { font-size: 1.1rem; }

  .numbered, .ticks, .homes { grid-template-columns: 1fr; }
  .card { padding: 26px 20px 22px; }
  .split, .split--rev { grid-template-columns: 1fr; gap: 26px; }
  .split--rev .split-copy, .split--rev .split-art { order: 0; }
  .illus { max-width: 240px; }

  /* Stacked comparison table */
  .table-wrap { border: 0; background: none; overflow: visible; }
  .compare thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .compare, .compare tbody, .compare tr, .compare th, .compare td { display: block; width: 100%; }
  .compare tbody tr { background: var(--surface); border: 1px solid var(--line); border-top: 3px solid var(--join); margin-bottom: 12px; padding: 6px 0 12px; }
  .compare tbody tr:nth-child(even) { background: var(--surface); }
  .compare tbody th, .compare tbody td { border-bottom: 0; }
  .compare tbody th { width: 100%; font-size: 1.15rem; padding: 12px 18px 4px; }
  .compare td { padding: 6px 18px; }
  .compare td::before {
    content: attr(data-label); display: block;
    font-size: 0.78rem; font-weight: 600; letter-spacing: 0.06em; 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.84rem; justify-content: space-between; }
  .cookie-accept { min-height: 36px; padding: 0 16px; font-size: 0.88rem; }
}

@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: 66% 18% !important; }
}
@media (max-width: 767px) {
  picture img { object-position: 50% 50% !important; }
}
