/* Shared structure for every design direction. Colours and fonts come from the theme file (src/themes/*.css)
   through these variables: --bg --fg --muted --line --accent --accent-ink --field-bg --field-fg --field-line
   --display --text --radius --gutter */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--fg); font: 400 17px/1.6 var(--text); text-rendering: optimizeLegibility; }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-underline-offset: 3px; }
h1, h2, h3 { font-family: var(--display); margin: 0 0 .5em; text-wrap: balance; }
p { margin: 0 0 1em; text-wrap: pretty; }
ol, ul { list-style: none; margin: 0; padding: 0; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.wrap { width: min(var(--max, 1180px), 100% - 2 * var(--gutter, 20px)); margin-inline: auto; }

/* header */
.top { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px var(--gutter, 20px);
  position: sticky; top: 0; z-index: 10; background: var(--header-bg, var(--bg)); border-bottom: 1px solid var(--line); }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--brand, var(--fg)); }
.brand svg { width: 30px; height: 30px; flex: none; }
.brand span { font-family: var(--brand-font, var(--display)); font-size: 19px; letter-spacing: var(--brand-ls, .02em); }
.top__cta { font: 600 13px/1 var(--text); letter-spacing: .1em; text-transform: uppercase; text-decoration: none; white-space: nowrap;
  color: var(--accent); border: 1px solid currentColor; border-radius: var(--radius); padding: 10px 14px; }

/* sign-up form */
.signup { margin-top: 26px; max-width: 680px; }
.signup__row { display: flex; flex-wrap: wrap; gap: 10px; }
.signup__field { flex: 1 1 100%; min-width: 0; }
.signup input, .signup select { width: 100%; min-width: 0; min-height: 52px; padding: 14px 16px; font: 400 17px/1.2 var(--text);
  color: var(--field-fg); background: var(--field-bg); border: 1px solid var(--field-line); border-radius: var(--radius); appearance: none; }
.signup select { background-image: linear-gradient(45deg, transparent 50%, currentColor 50%), linear-gradient(135deg, currentColor 50%, transparent 50%);
  background-position: calc(100% - 22px) 23px, calc(100% - 16px) 23px; background-size: 6px 6px; background-repeat: no-repeat; padding-right: 40px; }
.signup select:invalid { color: var(--muted); }
.signup option { color: #111; background: #fff; }
.signup input::placeholder { color: var(--muted); }
.signup input:focus, .signup select:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.btn { flex: 1 1 100%; white-space: nowrap; min-height: 52px; padding: 0 24px; cursor: pointer; border: 0; border-radius: var(--radius);
  font: 600 15px/1 var(--text); letter-spacing: .08em; text-transform: uppercase; color: var(--accent-ink); background: var(--accent); }
.btn:hover { filter: brightness(1.06); }
.btn[disabled] { opacity: .6; cursor: progress; }
.signup__note { font-size: 13px; color: var(--muted); margin: 10px 0 0; }
.signup__note a { color: inherit; }
.signup__msg { font-size: 15px; margin: 8px 0 0; min-height: 1.4em; font-weight: 500; }
.signup__msg.is-error { color: var(--error, #c0392b); }
.signup.is-done .signup__row, .signup.is-done .signup__note { display: none; }
.cf-turnstile { margin-top: 8px; }

/* FAQ mechanics */
.faq details { border-top: 1px solid var(--line); }
.faq details:last-child { border-bottom: 1px solid var(--line); }
.faq summary { cursor: pointer; list-style: none; position: relative; padding: 16px 40px 16px 0; font-family: var(--faq-font, var(--display)); font-size: var(--faq-size, 22px); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 4px; top: 12px; font: 300 28px/1 var(--text); color: var(--accent); transition: transform .2s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { color: var(--muted); padding-right: 24px; }

/* footer */
.foot { padding: 44px 0 64px; border-top: 1px solid var(--line); font-size: 14px; color: var(--muted); }
.foot__grid { display: grid; gap: 22px; }
.foot__tag { margin: 8px 0 0; }
.foot__small p { margin: 0 0 .5em; }

/* simple pages */
.simple { padding-block: 56px 80px; max-width: 760px; }
.simple h1 { font-size: clamp(40px, 9vw, 64px); line-height: 1.05; }
.contact { color: var(--muted); }
.link-arrow { text-decoration: none; border-bottom: 1px solid currentColor; }

/* preview-only switcher between design directions */
.preview-bar { position: fixed; right: 8px; bottom: 8px; z-index: 50; display: flex; gap: 6px; align-items: center; padding: 6px;
  background: rgba(20, 20, 20, .9); color: #fff; border-radius: 10px; font: 500 12px/1 system-ui, sans-serif; }
.preview-bar > span { padding: 0 6px; opacity: .75; }
.preview-bar a { color: #fff; text-decoration: none; border: 1px solid rgba(255, 255, 255, .35); border-radius: 7px; padding: 7px 9px; }
.preview-bar a.is-on { background: #fff; color: #111; }

@media (max-width: 719px) { .preview-bar .pb-label, .preview-bar > span { display: none; } .preview-bar { top: 70px; bottom: auto; } }
@media (min-width: 720px) {
  .signup__field--email { flex: 1 1 220px; }
  .signup__field--country { flex: 1 1 180px; max-width: 240px; }
  .btn { flex: 1 0 auto; max-width: 100%; }
  .foot__grid { grid-template-columns: 1fr 2fr; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; } }
