/* sexlanguages.com — design tokens */
@font-face { font-family: "Gloock"; src: url("../fonts/gloock-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Figtree"; src: url("../fonts/figtree-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Figtree"; src: url("../fonts/figtree-latin-400-italic.woff2") format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "Figtree"; src: url("../fonts/figtree-latin-600-normal.woff2") format("woff2"); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: "Figtree"; src: url("../fonts/figtree-latin-700-normal.woff2") format("woff2"); font-weight: 700; font-style: normal; font-display: swap; }

:root {
  --paper: #F5F0F3;
  --paper-deep: #ECE3EA;
  --ink: #24152B;
  --muted: #5E4C62;
  --you: #A61E4D;      /* raspberry: the first voice */
  --you-deep: #861339;
  --them: #22366B;     /* midnight: the second voice */
  --line: #D9CCD7;
  --white: #FFFFFF;
  --display: "Gloock", Georgia, "Times New Roman", serif;
  --body: "Figtree", system-ui, -apple-system, "Segoe UI", sans-serif;
  --measure: 38rem;
  --wide: 72rem;
  --radius-sm: 6px;
  --radius-pill: 999px;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  -webkit-tap-highlight-color: rgba(166, 30, 77, 0.15);
  background: var(--paper);
  color: var(--ink);
  font-family: var(--body);
  font-size: 1.125rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img, svg { display: block; max-width: 100%; }
a { color: var(--you-deep); text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:hover { color: var(--you); text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--them); outline-offset: 3px; border-radius: 4px; }

h1, h2, h3 {
  font-family: var(--display);
  font-weight: 400;
  line-height: 1.1;
  letter-spacing: -0.01em;
  text-wrap: balance;
  margin: 0 0 0.5em;
}
h1 { font-size: clamp(2.4rem, 5.5vw, 4.25rem); }
h2 { font-size: clamp(1.9rem, 3.6vw, 2.75rem); }
h3 { font-size: clamp(1.35rem, 2.2vw, 1.6rem); }
p { margin: 0 0 1em; text-wrap: pretty; }
.lede { font-size: clamp(1.2rem, 1.9vw, 1.375rem); line-height: 1.55; color: var(--ink); max-width: var(--measure); }
.muted { color: var(--muted); }
.small { font-size: 0.95rem; }

.skip { position: absolute; left: -9999px; top: 0; background: var(--ink); color: var(--paper); padding: 0.6rem 1rem; z-index: 10; }
.skip:focus { left: 1rem; top: 1rem; }
.skip:hover { color: var(--paper); }

.wrap { width: min(100% - 2.5rem, var(--wide)); margin-inline: auto; }
.narrow { width: min(100% - 2.5rem, 46rem); margin-inline: auto; }
.section { padding-block: clamp(3.5rem, 8vw, 6.5rem); }

/* Header */
.site-header { padding-block: 1.25rem; }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 1rem 2rem; flex-wrap: wrap; }
.wordmark { font-family: var(--display); font-size: 1.5rem; color: var(--ink); text-decoration: none; line-height: 1; }
.wordmark:hover { color: var(--ink); }
.nav { display: flex; align-items: center; gap: 0.25rem 1.5rem; flex-wrap: wrap; }
.nav a { color: var(--ink); text-decoration: none; font-weight: 600; font-size: 1rem; padding: 0.6rem 0; }
.nav a:hover, .nav a[aria-current="page"] { text-decoration: underline; text-decoration-thickness: 2px; }
.nav a.btn, .nav a.btn:hover { padding: 0.65rem 1.2rem; text-decoration: none; color: var(--white); }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; padding: 0.8rem 1.6rem;
  border-radius: var(--radius-pill);
  background: var(--you); color: var(--white);
  font: 600 1.05rem/1.2 var(--body);
  text-decoration: none; border: 2px solid var(--you);
  cursor: pointer; touch-action: manipulation;
  transition: background-color 160ms ease, border-color 160ms ease, color 160ms ease;
}
.btn:hover { background: var(--you-deep); border-color: var(--you-deep); color: var(--white); text-decoration: none; }
.btn-quiet { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn-quiet:hover { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.btn-row { display: flex; flex-wrap: wrap; gap: 0.85rem 1.25rem; align-items: center; }

/* Hero: the conversation */
.hero { padding-block: clamp(2rem, 6vw, 4.5rem) clamp(3.5rem, 8vw, 6rem); }
.exchange { margin: 0 0 clamp(2.25rem, 5vw, 3.5rem); display: grid; gap: clamp(1rem, 3vw, 2rem); }
.voice { margin: 0; max-width: 15ch; font-family: var(--display); font-size: clamp(2.5rem, 7.5vw, 6.25rem); line-height: 1.02; letter-spacing: -0.02em; }
.voice q { quotes: "\201C" "\201D"; }
.voice-you { color: var(--you); }
.voice-them { color: var(--them); justify-self: end; text-align: right; }
.speaker { display: block; font-family: var(--body); font-size: 1rem; font-style: italic; letter-spacing: 0; color: var(--muted); margin-top: 0.6rem; line-height: 1.4; }
.exchange.is-swapping .voice { opacity: 0; transform: translateY(6px); }
.exchange .voice { transition: opacity 260ms ease, transform 260ms ease; }
.hero-copy { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1.25rem; max-width: 44rem; }
.hero-copy h1 { margin-bottom: 0.2em; }
.hero-copy h1 span { display: block; }
.reassure { font-size: 0.95rem; color: var(--muted); margin: 0; }

/* Idea band */
.idea { background: var(--paper-deep); }
.idea .lede { font-size: clamp(1.3rem, 2.4vw, 1.75rem); font-family: var(--display); line-height: 1.35; max-width: 44rem; }

/* Phrasebook list of languages */
.phrasebook { list-style: none; margin: 2.5rem 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 20rem), 1fr)); column-gap: clamp(2rem, 5vw, 4rem); }
.entry { border-top: 1px solid var(--line); padding: 1.5rem 0 1.75rem; display: grid; grid-template-columns: 2.5rem minmax(0, 1fr); column-gap: 1rem; }
.entry .glyph { width: 2.25rem; height: 2.25rem; color: var(--you); margin-top: 0.3rem; }
.entry .entry-h { font-family: var(--display); font-size: clamp(1.35rem, 2.2vw, 1.6rem); line-height: 1.3; }
.entry h3 { margin: 0 0 0.25rem; }
.entry h3 a { color: var(--ink); text-decoration: none; }
.entry h3 a:hover { text-decoration: underline; }
.entry .say { font-style: italic; color: var(--them); margin: 0 0 0.4rem; }
.entry p:last-child { margin: 0; color: var(--muted); }

/* Spark band */
.band { background: var(--them); color: var(--paper); }
.band h2, .band p { color: var(--paper); }
.band .btn { background: var(--paper); color: var(--them); border-color: var(--paper); }
.band .btn:hover { background: var(--white); border-color: var(--white); color: var(--them); }
.split { display: grid; gap: 2rem clamp(2rem, 6vw, 5rem); grid-template-columns: repeat(auto-fit, minmax(min(100%, 22rem), 1fr)); align-items: center; }

/* Book block */
.cover {
  aspect-ratio: 2 / 3; width: min(100%, 17rem);
  border-radius: 3px 8px 8px 3px; overflow: hidden;
  box-shadow: 0 1px 0 rgba(36,21,43,.2), 0 24px 40px -18px rgba(36,21,43,.55);
  justify-self: center;
}
.cover img { display: block; width: 100%; height: 100%; object-fit: cover; }
.tag { display: inline-block; font-weight: 600; font-size: 0.95rem; color: var(--you-deep); background: #F6DCE5; padding: 0.3rem 0.8rem; border-radius: var(--radius-pill); margin-bottom: 1rem; }

/* Forms */
.signup { display: grid; gap: 0.5rem; max-width: 30rem; }
.signup label { font-weight: 600; }
.field-row { display: flex; gap: 0.6rem; flex-wrap: wrap; }
.field-row input { flex: 1 1 14rem; }
input[type="email"], input[type="text"], select, textarea {
  min-height: 48px; padding: 0.7rem 1rem; font: 400 1.05rem var(--body);
  color: var(--ink); background: var(--white); border: 1.5px solid #B9A8B7; border-radius: var(--radius-pill);
}
input[type="email"]::placeholder, input[type="text"]::placeholder, textarea::placeholder { color: #725F76; }
.contact-form { max-width: 34rem; }
.contact-form input[type="text"], .contact-form input[type="email"], .contact-form select, .contact-form textarea { width: 100%; }
.contact-form textarea { min-height: 11rem; border-radius: 18px; resize: vertical; line-height: 1.5; }
.contact-form select { border-radius: var(--radius-pill); appearance: none; -webkit-appearance: none; padding-right: 2.8rem; background: var(--white) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='9' viewBox='0 0 14 9'%3E%3Cpath d='M1 1.5l6 6 6-6' fill='none' stroke='%2324152B' stroke-width='2'/%3E%3C/svg%3E") no-repeat right 1.1rem center; }
.contact-form .btn { justify-self: start; margin-top: 0.6rem; }
.contact-form .field { display: grid; gap: 0.35rem; margin-bottom: 0.9rem; }
input[type="email"]:focus-visible, input[type="text"]:focus-visible, select:focus-visible, textarea:focus-visible { outline: 3px solid var(--them); outline-offset: 2px; border-color: var(--them); }
.hp { position: absolute; left: -9999px; }
.band .signup label, .band .signup .small { color: var(--paper); }

/* Prose pages */
.page-head { padding-block: clamp(2rem, 6vw, 4rem) 1rem; }
.prose { max-width: var(--measure); }
.prose h2 { margin-top: 2.2em; font-size: clamp(1.6rem, 3vw, 2.1rem); }
.prose ul { padding-left: 1.25rem; margin: 0 0 1.25em; }
.prose li { margin-bottom: 0.45em; }
.prose li::marker { color: var(--you); }
.say-big { font-family: var(--display); font-size: clamp(1.8rem, 4vw, 2.75rem); color: var(--them); line-height: 1.15; margin: 0 0 1.5rem; max-width: 22ch; }
.glyph-lg { width: 3.25rem; height: 3.25rem; color: var(--you); margin-bottom: 1rem; }
.cta-box { margin-top: 3rem; padding: 2rem; background: var(--paper-deep); border-radius: var(--radius-sm); }
.cta-box h2 { margin-top: 0; }
.other-langs { display: flex; flex-wrap: wrap; gap: 0.5rem 1.25rem; padding: 0; list-style: none; margin: 1rem 0 0; }
.other-langs a { font-weight: 600; }

/* Quiz */
.quiz-shell { max-width: 44rem; margin-inline: auto; min-height: 60vh; }
.progress { margin-bottom: 2rem; }
.progress-text { font-size: 0.95rem; color: var(--muted); margin: 0 0 0.5rem; }
.bar { height: 6px; background: var(--line); border-radius: var(--radius-pill); overflow: hidden; }
.bar span { display: block; height: 100%; background: var(--you); width: 0; transition: width 240ms ease; }
.q-stem { font-size: clamp(1.8rem, 4vw, 2.6rem); margin-bottom: 1.5rem; }
.options { display: grid; gap: 1rem; }
.option {
  text-align: left; width: 100%; min-height: 64px;
  padding: 1.15rem 1.35rem; border-radius: var(--radius-sm);
  background: var(--white); border: 1.5px solid var(--line); color: var(--ink);
  font: 400 1.15rem/1.45 var(--body); cursor: pointer; touch-action: manipulation;
  transition: border-color 140ms ease, background-color 140ms ease;
}
.option:hover { border-color: var(--you); }
.option:active { background: #FBEAF0; }
.option-or { text-align: center; font-style: italic; color: var(--muted); margin: -0.25rem 0; }
.quiz-nav { margin-top: 1.5rem; display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
.linkish { background: none; border: 0; padding: 0.6rem 0; font: 600 1rem var(--body); color: var(--ink); text-decoration: underline; text-underline-offset: 0.2em; cursor: pointer; min-height: 44px; }
.linkish:disabled { color: #A797A6; cursor: default; text-decoration: none; }
.notice { background: #E3E8F4; color: var(--them); padding: 1rem 1.25rem; border-radius: var(--radius-sm); margin-bottom: 1.5rem; }

.result-head .label-line { font-size: 1.05rem; color: var(--muted); margin: 0 0 0.25rem; }
.result-head h2 { font-size: clamp(2.4rem, 6vw, 4rem); color: var(--you); margin-bottom: 0.3em; }
.scores { list-style: none; padding: 0; margin: 1.5rem 0 2rem; display: grid; gap: 0.7rem; }
.score { display: grid; grid-template-columns: 8.5rem minmax(0, 1fr) 2.5rem; align-items: center; gap: 0.75rem; font-size: 1rem; }
.score .track { height: 12px; background: var(--line); border-radius: var(--radius-pill); overflow: hidden; }
.score .fill { display: block; height: 100%; background: var(--them); border-radius: var(--radius-pill); }
.score.is-top .fill { background: var(--you); }
.score.is-top .s-name { font-weight: 700; }
.score .s-num { text-align: right; font-variant-numeric: tabular-nums; color: var(--muted); }
.result-block { border-top: 1px solid var(--line); padding-top: 1.75rem; margin-top: 2rem; }
.result-block h3 { margin-bottom: 0.6rem; }
.invite { background: var(--paper-deep); border-radius: var(--radius-sm); padding: 1.75rem; margin-top: 2.5rem; }
.invite h3 { margin-top: 0; }
.copy-status { font-size: 0.95rem; color: var(--them); min-height: 1.5em; margin: 0.5rem 0 0; }
.compare-head h2 { color: var(--them); }
.pair { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 14rem), 1fr)); gap: 1rem; margin: 1.25rem 0 1.5rem; }
.pair div { background: var(--white); border: 1.5px solid var(--line); border-radius: var(--radius-sm); padding: 1rem 1.25rem; }
.pair .who { display: block; font-size: 0.95rem; color: var(--muted); }
.pair .lang { font-family: var(--display); font-size: 1.6rem; line-height: 1.2; }
.pair .you-side .lang { color: var(--you); }
.pair .them-side .lang { color: var(--them); }
.honesty { font-size: 0.95rem; color: var(--muted); font-style: italic; margin-top: 2.5rem; }

/* Footer */
.site-footer { background: var(--ink); color: #E5D9E3; padding-block: 3rem; font-size: 1rem; }
.site-footer a { color: #F6DCE5; }
.site-footer a:hover { color: var(--white); }
.site-footer .wordmark, .site-footer .wordmark:hover { color: var(--paper); }
.footer-grid { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1.5rem 3rem; }
.footer-grid nav { display: flex; flex-wrap: wrap; gap: 0.5rem 1.5rem; }
.footer-grid nav a { padding: 0.4rem 0; display: inline-block; }
.footer-note { margin-top: 1.75rem; color: #BFAEBD; font-size: 0.95rem; }

@media (max-width: 640px) {
  body { font-size: 1.0625rem; }
  .nav .nav-extra { display: none; }
  .voice-them { justify-self: stretch; }
  .score { grid-template-columns: 6.5rem minmax(0, 1fr) 2rem; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
}
[tabindex="-1"]:focus { outline: none; }
.narrow.prose { max-width: none; }
.prose > p, .prose > ul { max-width: var(--measure); }
.prose .other-langs { padding-left: 0; }
.prose > h2:first-child { margin-top: 0; }

.print-only { display: none; }
@media print {
  @page { margin: 0.6in; }
  body { background: #fff; font-size: 11pt; }
  .site-header .nav, .site-footer, .skip, .no-print, #screen-intro, #screen-q { display: none !important; }
  .site-header { padding: 0 0 0.5rem; }
  .section { padding: 0 !important; }
  .print-only { display: block; font-size: 10pt; color: #444; margin-top: 1.5rem; word-break: break-all; }
  .score .track, .score .fill, .pair div { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .result-block, .pair, .scores { break-inside: avoid; }
  a { color: inherit; text-decoration: none; }
  #screen-results a { display: none; }
}

/* Buy block */
.buy { margin-top: 1.75rem; }
.buy-h { margin: 0 0 0.75rem; font-size: 1.25rem; }
.buy .small { margin: 0.6rem 0 0; }
.cta-box .small { margin-top: 1.25rem; }
.buy + p { margin-top: 1.5rem; }
.signup-section { background: var(--paper-deep); }

/* Home hero cover, to the right of the headline */
.hero-grid { display: grid; gap: 2.5rem; grid-template-columns: minmax(0, 1fr); align-items: center; }
.hero-cover { width: 18rem; max-width: 100%; justify-self: start; }
@media (min-width: 900px) {
  .hero-grid { grid-template-columns: minmax(0, 44rem) minmax(0, 1fr); }
  .hero-cover { width: 27rem; justify-self: center; }
}

/* Centered home sections */
.idea .wrap { text-align: center; }
.idea .lede { margin-inline: auto; }
.band .wrap.split { grid-template-columns: minmax(0, 1fr); justify-items: center; text-align: center; }
.band .lede { margin-inline: auto; max-width: 44rem; }
.signup-section .wrap { text-align: center; }
.signup-section .lede { margin-inline: auto; }
.signup-section .signup { margin-inline: auto; justify-items: center; }
.signup-section .field-row { justify-content: center; }
.signup-section .signup { width: min(100%, 30rem); } .signup-section .field-row input { flex: 1 1 14rem; }
