/* Segni d'amore · night palette. Mobile first. */
/* Fonts: Playfair Display and Inter are used if installed on the device;
   otherwise the system fallbacks below. To self-host them, see README → Fonts. */

:root {
  color-scheme: dark;
  --bg: #100A1C;
  --grad: linear-gradient(180deg, #4A2C63 0%, #2A1940 42%, #160F26 100%);
  --gold: #E9C46A;
  --gold-ink: #1C1206;
  --rose: #F2A7B8;
  --lilac: #B9A6FF;
  --text: #FFF4E6;
  --muted: rgba(255, 244, 230, 0.72);
  --line: rgba(255, 244, 230, 0.16);
  --card: rgba(255, 255, 255, 0.05);
  --field: rgba(16, 10, 28, 0.6);
  --error: #FFB4A8;
  --ok: #A8E6C1;
  --radius: 16px;
  --title: "Playfair Display", "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --body: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  padding-top: env(safe-area-inset-top, 0px);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
/* Free-trial mode (html.pilot): sale-only parts hide, trial-only parts show. */
html:not(.pilot) [data-pilot], .pilot [data-sale] { display: none !important; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

body {
  margin: 0;
  background: var(--bg) var(--grad) no-repeat; /* the order page covers this with .sky */
  background-size: 100% 900px;
  color: var(--text);
  font: 400 17px/1.55 var(--body);
  -webkit-font-smoothing: antialiased;
  padding-bottom: calc(76px + env(safe-area-inset-bottom, 0px));
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--rose); text-underline-offset: 3px; }
a:hover { color: var(--gold); }
h1, h2, h3 { font-family: var(--title); font-weight: 700; line-height: 1.15; margin: 0 0 0.6em; text-wrap: balance; }
h1 { font-size: clamp(2.3rem, 9vw, 3.4rem); letter-spacing: -0.5px; }
h2 { font-size: clamp(1.55rem, 6vw, 2rem); }
h3 { font-size: 1.15rem; }
p { margin: 0 0 1em; }
b { font-weight: 600; }

.wrap { width: 100%; max-width: 640px; margin: 0 auto; padding-inline: 20px; }
.section { padding-block: 40px; }
.muted { color: var(--muted); }
.small { font-size: 0.9rem; }
.nowrap { white-space: nowrap; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 3px solid var(--lilac); outline-offset: 3px; border-radius: 6px; }

/* Header */
.site-header { padding: 14px 20px; display: flex; justify-content: center; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font-family: var(--title); font-size: 1.25rem; font-weight: 700; }
.brand img { width: 40px; height: 40px; border-radius: 50%; }

.mock-banner { background: var(--gold); color: var(--gold-ink); text-align: center; font-weight: 600; padding: 8px 16px; font-size: 0.9rem; }

/* Night sky: fixed behind the whole page; the stars are drawn by js/sky.js. */
.sky {
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background: radial-gradient(ellipse 130% 75% at 50% 0%, #4A2C63 0%, #2A1940 46%, #160F26 78%, #100A1C 100%);
}
.sky canvas { display: block; width: 100%; height: 100%; }

/* Hero: the two signs are the picture, in the starry sky. */
.hero {
  --medal: clamp(76px, 23vw, 104px);
  position: relative; max-width: 640px; margin: 0 auto; padding: 14px 22px 8px;
  display: flex; flex-direction: column; align-items: center; text-align: center;
  min-height: min(92svh, 780px);
}
.brand-hero { white-space: nowrap; text-shadow: 0 1px 10px rgba(16, 10, 28, 0.8); }
.brand-hero img { width: 36px; height: 36px; }
.brand-hero { margin-bottom: auto; }

/* The two signs, joined by a gold line. */
.pair-sky {
  position: relative; width: min(100%, 420px); height: calc(var(--medal) + 48px);
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: end; justify-items: center;
  transition: opacity 0.38s ease, transform 0.38s ease;
}
.pair-sky.is-changing { opacity: 0; transform: translateY(6px); }
.pair-line { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.pair-line path { fill: none; stroke: var(--gold); stroke-width: 1.3; vector-effect: non-scaling-stroke; stroke-dasharray: 1; stroke-dashoffset: 0; opacity: 0.75; }
.pair-line path.draw { animation: draw-line 1.3s ease-out both; }
@keyframes draw-line { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }
.medal { position: relative; display: flex; flex-direction: column-reverse; align-items: center; gap: 6px; }
.glyph { font-family: "Apple Symbols", "Segoe UI Symbol", "Noto Sans Symbols 2", "Noto Sans Symbols", "DejaVu Sans", serif; font-variant-emoji: text; line-height: 1; }
.medal .glyph {
  width: var(--medal); aspect-ratio: 1; border-radius: 50%; display: grid; place-items: center;
  font-size: calc(var(--medal) * 0.46); color: var(--gold);
  background: radial-gradient(circle at 50% 38%, rgba(74, 44, 99, 0.92), rgba(16, 10, 28, 0.92));
  border: 1.5px solid rgba(233, 196, 106, 0.85);
  box-shadow: 0 0 0 7px rgba(233, 196, 106, 0.07), 0 0 36px rgba(233, 196, 106, 0.3);
}
.medal-name { font-family: var(--title); font-size: 1.05rem; text-shadow: 0 1px 10px rgba(16, 10, 28, 0.95); }
.pair-plus { font-family: var(--title); color: var(--gold); font-size: 1.8rem; line-height: 1; align-self: center; margin-top: 30px; }


.hero-text { position: relative; width: 100%; padding: 26px 0 18px; }
.hero-text { margin-bottom: auto; }
.series { font-family: var(--title); font-style: italic; color: var(--rose); font-size: 1.02rem; margin-bottom: 0.25em; text-shadow: 0 1px 10px rgba(16, 10, 28, 0.9); }
.hero h1 { font-size: clamp(2.1rem, 9.2vw, 3.2rem); line-height: 1.08; margin-bottom: 0.3em; text-shadow: 0 2px 18px rgba(16, 10, 28, 0.7); }
.pair-title { display: block; }
.plus { color: var(--gold); }
.lead { font-size: 1.07rem; line-height: 1.42; max-width: 30ch; margin: 0 auto 0.6em; }
.price-line { color: var(--gold); font-weight: 600; font-size: 1rem; margin-bottom: 0.8em; }
.fine { color: var(--muted); font-size: 0.85rem; }
.hero-fine { text-align: center; margin-top: 4px; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 52px; padding: 0 26px; border-radius: 999px; border: 0; font: 600 1.05rem/1 var(--body); text-decoration: none; cursor: pointer; transition: transform .12s ease, filter .12s ease; }
.btn:active { transform: scale(0.98); }
.btn-gold { background: var(--gold); color: var(--gold-ink); }
.btn-gold:hover { color: var(--gold-ink); filter: brightness(1.06); }
.btn-block { width: 100%; }
.btn-small { min-height: 42px; padding: 0 20px; font-size: 0.95rem; }
.btn[disabled] { opacity: 0.6; cursor: progress; }
.btn-ghost { background: transparent; color: var(--text); border: 1px solid var(--line); }
.link-btn { background: none; border: 0; color: var(--rose); text-decoration: underline; text-underline-offset: 3px; font: inherit; font-size: 0.95rem; padding: 8px 0; cursor: pointer; }

/* Content blocks */
/* The chapters: centred like a post's slides, a gold number over each title. */
.chapters-section { text-align: center; }
.chapters-section h2 { max-width: 18ch; margin-inline: auto; }
.chapters-section > p { max-width: 34rem; margin-inline: auto; }
.chapters { list-style: none; padding: 0; margin: 1.8em auto 1.6em; display: grid; gap: 1.1em; counter-reset: chapter; }
.chapters li { counter-increment: chapter; font-family: var(--title); font-size: 1.3rem; line-height: 1.25; }
.chapters li::before { content: counter(chapter); display: block; margin: 0 auto 0.35em; width: 1.9em; height: 1.9em; line-height: 1.85em; border-radius: 50%; border: 1px solid rgba(233, 196, 106, 0.6); color: var(--gold); font-size: 0.72em; }
.chapters li small { display: block; margin-top: 0.3em; font-family: var(--body); font-size: 0.72em; color: var(--muted); }
.for-all { font-family: var(--title); font-style: italic; color: var(--rose); font-size: 1.1rem; }
.steps { padding-left: 1.3em; margin: 0 0 1.4em; }
.steps li { margin-bottom: 0.8em; padding-left: 0.2em; }
.steps li::marker { color: var(--gold); font-family: var(--title); font-weight: 700; }
.ticks { list-style: none; padding: 0; margin: 0 0 1.4em; }
.ticks li { position: relative; padding-left: 1.6em; margin-bottom: 0.7em; }
.ticks li::before { content: "✦"; position: absolute; left: 0; color: var(--gold); }

/* Services */
.services { display: grid; gap: 14px; }
.service { display: block; position: relative; background: var(--card); border: 1.5px solid var(--line); border-radius: var(--radius); padding: 20px; cursor: pointer; transition: border-color .15s ease, background .15s ease; }
.service:has(input:checked) { border-color: var(--gold); background: rgba(233, 196, 106, 0.08); }
.service input { position: absolute; top: 22px; right: 20px; width: 22px; height: 22px; accent-color: var(--gold); }
.service h3 { font-size: 1.35rem; padding-right: 36px; margin-bottom: 0.3em; }
.service .tagline { color: var(--rose); font-style: italic; }
.service .meta { color: var(--muted); font-size: 0.92rem; margin: 0; }
.service .price { color: var(--gold); font-weight: 600; font-size: 1.1rem; margin: 0.6em 0 0.2em; }
.qty { display: inline-flex; align-items: center; gap: 10px; margin-top: 10px; }
.qty button { width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line); background: transparent; color: var(--text); font-size: 1.2rem; cursor: pointer; }

/* Form */
fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
.group { margin-top: 26px; }
legend { font-family: var(--title); font-size: 1.3rem; font-weight: 700; color: var(--gold); margin-bottom: 10px; padding: 0; }
.field { margin-bottom: 16px; }
.row { display: grid; grid-template-columns: 1fr; gap: 0 14px; }
@media (min-width: 520px) { .row { grid-template-columns: 1fr 1fr; } }
label, .label { display: block; font-weight: 600; margin-bottom: 6px; font-size: 0.98rem; }
.opt { font-weight: 400; color: var(--muted); }
input[type="text"], input[type="email"], input[type="date"], input[type="time"], select, textarea {
  width: 100%; min-height: 50px; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line);
  background: var(--field); color: var(--text); font: 400 16px/1.4 var(--body); appearance: none; -webkit-appearance: none;
}
input[type="date"], input[type="time"] { display: block; }
select { background-image: linear-gradient(45deg, transparent 50%, var(--gold) 50%), linear-gradient(135deg, var(--gold) 50%, transparent 50%); background-position: calc(100% - 22px) 22px, calc(100% - 16px) 22px; background-size: 6px 6px; background-repeat: no-repeat; padding-right: 40px; }
textarea { resize: vertical; min-height: 92px; }
input:focus, select:focus, textarea:focus { border-color: var(--lilac); outline: none; box-shadow: 0 0 0 3px rgba(185, 166, 255, 0.25); }
[aria-invalid="true"] { border-color: var(--error) !important; }
.hint { color: var(--muted); font-size: 0.88rem; margin: 6px 0 0; }
.hint.small { margin-top: 4px; }
.count { float: right; }
.err { color: var(--error); font-size: 0.9rem; margin: 6px 0 0; min-height: 0; }
.err:empty { display: none; }
.choices { display: grid; gap: 10px; }
@media (min-width: 520px) { .choices { grid-template-columns: repeat(3, 1fr); } }
.choice { display: flex; align-items: center; gap: 10px; min-height: 50px; padding: 0 14px; border: 1px solid var(--line); border-radius: 12px; cursor: pointer; font-weight: 500; margin: 0; }
.choice:has(input:checked) { border-color: var(--gold); background: rgba(233, 196, 106, 0.08); }
.choice input { width: 20px; height: 20px; accent-color: var(--gold); margin: 0; }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

/* The pair card in the form: fills in as the two birth dates are typed. */
.pair-card {
  margin-top: 26px; padding: 18px 16px; text-align: center; border-radius: 20px;
  background: radial-gradient(ellipse at 50% 0%, rgba(233, 196, 106, 0.1), transparent 70%), rgba(42, 25, 64, 0.55);
  border: 1px dashed rgba(233, 196, 106, 0.35);
}
.pair-card.is-complete { border-style: solid; border-color: rgba(233, 196, 106, 0.75); }
.pair-card-signs { display: flex; align-items: center; justify-content: center; gap: 14px; margin-bottom: 10px; }
.pair-card-signs .glyph { width: 58px; height: 58px; border-radius: 50%; display: grid; place-items: center; font-size: 28px; color: var(--gold); border: 1.5px solid rgba(233, 196, 106, 0.6); background: rgba(16, 10, 28, 0.5); }
.pair-card-title { font-family: var(--title); font-size: 1.45rem; font-weight: 700; margin: 0; }
.pair-card .hint { margin-top: 6px; }
.pair-card.is-set .pair-card-signs .glyph { animation: lock-in 0.6s ease-out both; }
.pair-card.is-set .pair-card-signs .glyph:last-child { animation-delay: 0.12s; }
@keyframes lock-in { from { transform: scale(0.7); opacity: 0.3; } 60% { transform: scale(1.08); opacity: 1; } to { transform: scale(1); } }
#form-fields:disabled { opacity: 0.55; }

/* Order box */
.order-box, .pay-box { margin-top: 34px; background: rgba(42, 25, 64, 0.55); border: 1px solid var(--line); border-radius: 20px; padding: 22px 18px; }
.summary { border-bottom: 1px solid var(--line); padding-bottom: 12px; margin-bottom: 16px; }
.summary .line, .summary .total { display: flex; justify-content: space-between; gap: 12px; }
.summary .total { font-weight: 600; font-size: 1.15rem; margin-top: 8px; color: var(--gold); }
.summary .launch { color: var(--muted); font-size: 0.88rem; margin: 4px 0 0; }
.summary .pair-line-note { font-family: var(--title); font-style: italic; color: var(--rose); margin: 2px 0 0; }
.precontract { font-size: 0.92rem; }
.precontract ul { padding-left: 1.1em; margin: 0 0 1em; }
.precontract li { margin-bottom: 0.45em; }
.consents { margin: 8px 0 16px; }
.consent { display: grid; grid-template-columns: 26px 1fr; gap: 10px; align-items: start; margin-bottom: 12px; font-weight: 400; font-size: 0.95rem; line-height: 1.45; cursor: pointer; }
.consent input { width: 22px; height: 22px; margin: 1px 0 0; accent-color: var(--gold); }
.consent .err { grid-column: 2; margin-top: 0; }
.form-error { color: var(--error); font-weight: 500; }
.email-recap { font-size: 0.95rem; margin: 0 0 12px; overflow-wrap: anywhere; }
.email-suggest .link-btn { padding: 0; font-size: inherit; }
.turnstile { margin-bottom: 12px; min-height: 0; }

/* Payment */
.pay-box { scroll-margin-top: 20px; }
.pay-buttons { display: grid; gap: 12px; margin: 16px 0 10px; }
.pay-buttons paypal-button, .pay-buttons paypal-basic-card-button { display: block; width: 100%; }
.mock-pay { display: flex; align-items: center; justify-content: center; width: 100%; min-height: 50px; border-radius: 8px; border: 0; font: 600 1.05rem/1 var(--body); cursor: pointer; }
.mock-pay.paypal { background: #FFC439; color: #111; }
.mock-pay.card { background: #2C2E2F; color: #fff; }
.pay-status { border-radius: 12px; padding: 14px; margin: 12px 0; font-size: 0.95rem; background: var(--card); border: 1px solid var(--line); }
.pay-status.error { border-color: var(--error); }
.pay-status.warn { border-color: var(--gold); }
.pay-status p:last-child { margin-bottom: 0; }
.pay-status .btn { margin-top: 6px; }

/* Mock dialog */
.mock-dialog { border: 1px solid var(--line); border-radius: 18px; background: #1d1432; color: var(--text); padding: 22px; width: min(92vw, 420px); }
.mock-dialog::backdrop { background: rgba(0, 0, 0, 0.6); }
.mock-dialog .btn { width: 100%; margin-top: 10px; }

/* Success */
.success { text-align: center; }
.success img { margin: 0 auto 16px; border-radius: 50%; }
.signoff { font-family: var(--title); font-style: italic; color: var(--gold); font-size: 1.2rem; margin-top: 1.4em; }

/* FAQ */
details { border-top: 1px solid var(--line); padding: 14px 0; }
details:last-of-type { border-bottom: 1px solid var(--line); }
summary { cursor: pointer; font-weight: 600; list-style: none; position: relative; padding-right: 28px; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; position: absolute; right: 4px; top: -2px; color: var(--gold); font-size: 1.3rem; }
details[open] summary::after { content: "–"; }
details p { margin: 10px 0 0; color: var(--muted); }

/* Sticky bar (mobile) */
.sticky-bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 10; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 20px calc(12px + env(safe-area-inset-bottom, 0px)); background: rgba(16, 10, 28, 0.94); border-top: 1px solid var(--line); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.sticky-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sticky-total { color: var(--gold); white-space: nowrap; }
@media (min-width: 900px) { .sticky-bar { display: none !important; } body { padding-bottom: 0; } }

/* Footer */
.site-footer { border-top: 1px solid var(--line); margin-top: 40px; padding: 26px 20px 30px; text-align: center; font-size: 0.88rem; color: var(--muted); }
.site-footer nav { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 18px; margin-bottom: 12px; }
.site-footer a { color: var(--muted); }
.footer-id { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 18px; margin: 0; }
.site-footer a:hover { color: var(--gold); }

/* Legal pages */
.legal { padding-block: 24px 40px; }
.legal h1 { font-size: clamp(1.9rem, 7vw, 2.5rem); }
.legal h2 { font-size: 1.3rem; margin-top: 1.6em; color: var(--gold); }
.legal h3 { font-size: 1.05rem; margin-top: 1.2em; }
.legal li { margin-bottom: 0.4em; }
.legal .draft { background: rgba(233, 196, 106, 0.12); border: 1px solid var(--gold); border-radius: 12px; padding: 12px 14px; font-size: 0.92rem; }
.legal table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.legal th, .legal td { text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); padding: 8px 6px; }
.table-scroll { overflow-x: auto; }
.legal .box { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 16px 4px; }
