/* ============================================================
   base.css — shared foundation for all layouts
   Layout-specific structure lives in layouts/<name>.css
   ============================================================ */

:root {
  --accent-2: var(--accent);
  --t-xs: .78rem; --t-sm: .9rem; --t-base: 1rem; --t-md: 1.15rem;
  --t-lg: 1.45rem; --t-xl: 1.9rem; --t-2xl: 2.5rem; --t-3xl: 3.4rem; --t-4xl: 4.4rem;
  --gutter: 1.5rem; --measure: 66ch;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important; animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}

body {
  margin: 0; font-family: var(--body); font-size: var(--t-base);
  line-height: 1.65; color: var(--ink-soft); background: var(--paper);
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}

h1, h2, h3, h4 {
  font-family: var(--display); color: var(--ink); margin: 0;
  line-height: 1.1; text-wrap: balance;
}
p { margin: 0 0 1rem; max-width: var(--measure); }
a { color: var(--accent); text-underline-offset: 3px; }
img, svg { max-width: 100%; height: auto; display: block; }
ul { margin: 0; padding: 0; }

:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 2px; }

.skip { position: absolute; left: -9999px; background: var(--ink); color: var(--paper); padding: .75rem 1.25rem; z-index: 200; }
.skip:focus { left: 1rem; top: 1rem; }

.shell { width: 100%; max-width: var(--shell); margin-inline: auto; padding-inline: var(--gutter); }
.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ---------- Buttons (shared, restyled per layout) ---------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .55rem;
  font-family: var(--body); font-size: var(--t-sm); font-weight: 600;
  padding: .85rem 1.5rem; border: 1px solid transparent; border-radius: var(--r);
  cursor: pointer; text-decoration: none; line-height: 1.2;
  transition: transform .12s ease, background .18s ease, border-color .18s ease, color .18s ease;
}
.btn:active { transform: translateY(1px); }
.btn[disabled] { opacity: .55; cursor: not-allowed; }
.btn--block { width: 100%; }
.btn svg { width: 17px; height: 17px; flex: none; }

.btn--primary { background: var(--accent); color: var(--on-accent); }
.btn--primary:hover { background: var(--accent-ink); }
.btn--ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn--ghost:hover { border-color: var(--ink); }
.btn--tg { background: var(--ink); color: var(--paper); }
.btn--tg:hover { opacity: .86; }

/* ---------- Form (shared across all layouts) ---------- */

.field { display: grid; gap: .4rem; margin-bottom: 1.1rem; }
.field label { font-size: var(--t-sm); font-weight: 600; color: var(--ink); }
.field input, .field textarea {
  font-family: var(--body); font-size: var(--t-base); padding: .82rem .9rem;
  border: 1px solid var(--line); border-radius: var(--r);
  background: var(--paper); color: var(--ink); width: 100%;
}
.field textarea { min-height: 6.5rem; resize: vertical; }
.field input:focus, .field textarea:focus { border-color: var(--accent); outline-offset: 1px; }
.field[data-invalid="true"] input, .field[data-invalid="true"] textarea { border-color: var(--warn); }
.field__err { font-size: var(--t-xs); color: var(--warn); min-height: 1em; }

.form__status { margin-top: 1rem; font-size: var(--t-sm); }
.form__status[data-state="ok"] { color: var(--signal); font-weight: 600; }
.form__status[data-state="err"] { color: var(--warn); font-weight: 600; }
.form__legal { font-size: var(--t-xs); color: var(--ink-faint); margin-top: .9rem; }

.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }

/* ---------- FAQ (shared behaviour, restyled per layout) ---------- */

.faq__item { border-bottom: 1px solid var(--line); }
.faq__q {
  width: 100%; text-align: left; background: none; border: 0; cursor: pointer;
  font-family: var(--display); font-weight: 600; font-size: var(--t-md);
  color: var(--ink); padding: 1.3rem 2.5rem 1.3rem 0; position: relative;
}
.faq__q::after {
  content: ""; position: absolute; right: .4rem; top: 50%;
  width: 10px; height: 10px;
  border-right: 2px solid var(--ink-faint); border-bottom: 2px solid var(--ink-faint);
  transform: translateY(-70%) rotate(45deg); transition: transform .22s ease;
}
.faq__q[aria-expanded="true"]::after { transform: translateY(-30%) rotate(-135deg); }
.faq__a { display: none; padding-bottom: 1.4rem; }
.faq__a p { margin: 0; color: var(--ink-faint); }
.faq__item[data-open="true"] .faq__a { display: block; }

/* ---------- Entrance (one orchestrated moment, on load only) ---------- */

@media (prefers-reduced-motion: no-preference) {
  .rise { opacity: 0; transform: translateY(15px); animation: rise .6s cubic-bezier(.2,.7,.3,1) forwards; }
  .rise:nth-child(1) { animation-delay: .04s; }
  .rise:nth-child(2) { animation-delay: .11s; }
  .rise:nth-child(3) { animation-delay: .18s; }
  .rise:nth-child(4) { animation-delay: .25s; }
  @keyframes rise { to { opacity: 1; transform: none; } }
}

@media print { .nav, .rail, .hero__acts, form { display: none !important; } }

/* ---------- Locality block (region trust signals) ---------- */

.local {
  border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: clamp(1.6rem, 3.5vw, 2.4rem);
  background: var(--mist);
}
.local__head { display: flex; align-items: center; gap: .9rem; margin-bottom: 1.3rem; flex-wrap: wrap; }
.local__flag { font-size: 2rem; line-height: 1; }
.local__head h2 { font-size: clamp(var(--t-md), 2.6vw, var(--t-xl)); margin: 0; }
.local__points {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: .7rem 2rem; margin: 0;
}
.local__points li {
  list-style: none; font-size: var(--t-sm); color: var(--ink);
  padding-inline-start: 1.6rem; position: relative;
}
.local__points li::before {
  content: ""; position: absolute; inset-inline-start: 0; top: .48em;
  width: 9px; height: 5px;
  border-inline-start: 2px solid var(--accent); border-bottom: 2px solid var(--accent);
  transform: rotate(-45deg);
}
[dir="rtl"] .local__points li::before { transform: rotate(-135deg) scaleY(-1); }
.local__note { font-size: var(--t-sm); color: var(--ink-faint); margin: 1.3rem 0 0; max-width: none; }


/* ---------- Locality ----------
   The flag reads as a deliberate design element, not decoration: a large
   clipped backdrop behind the section, plus one crisp chip by the heading.
   Low opacity so it signals country without shouting it. */

.local-band { position: relative; }

/* The card is the clipping boundary, so the flag can never bleed past the
   rounded corner. It was previously positioned against the section, which is
   full page width — hence the overhang. */
.local {
  position: relative; overflow: hidden;
  border-radius: var(--r-lg); background: var(--mist);
  padding: clamp(1.8rem, 4vw, 2.8rem);
}
.local > *:not(.local__backdrop) { position: relative; z-index: 1; }

.local__backdrop {
  position: absolute; inset-block: 0; inset-inline-end: 0;
  width: min(42%, 420px); pointer-events: none;
  opacity: .10; filter: saturate(.85);
  -webkit-mask-image: linear-gradient(to left, #000 30%, transparent 100%);
  mask-image: linear-gradient(to left, #000 30%, transparent 100%);
}
[dir="rtl"] .local__backdrop {
  -webkit-mask-image: linear-gradient(to right, #000 30%, transparent 100%);
  mask-image: linear-gradient(to right, #000 30%, transparent 100%);
}
.local__backdrop-svg { width: 100%; height: 100%; display: block; }

.local__head { display: flex; align-items: center; gap: .95rem; margin-bottom: 1.6rem; }
.local__chip {
  display: block; flex: none; width: 34px; height: 22px;
  border-radius: 3px; overflow: hidden;
  box-shadow: 0 0 0 1px color-mix(in srgb, currentColor 18%, transparent),
              0 1px 3px rgba(0,0,0,.18);
}
.local__chip-svg { width: 100%; height: 100%; display: block; }
.local__head h2 { font-size: clamp(var(--t-lg), 3.2vw, var(--t-2xl)); }

.local__points { display: grid; gap: .85rem; max-width: 46rem; }
.local__points li {
  list-style: none; position: relative; padding-inline-start: 1.6rem;
  font-size: var(--t-base);
}
.local__points li::before {
  content: ""; position: absolute; inset-inline-start: 0; top: .58em;
  width: 8px; height: 5px;
  border-inline-start: 2px solid var(--accent); border-bottom: 2px solid var(--accent);
  transform: rotate(-45deg);
}
[dir="rtl"] .local__points li::before { transform: rotate(-135deg) scaleY(-1); }
.local__note { font-size: var(--t-sm); color: var(--ink-faint); margin: 1.4rem 0 0; }

@media (max-width: 720px) { .local__backdrop { opacity: .07; width: 62%; } }

/* ---------- Second national colour ----------
   The flag's other colour, used on a few small surfaces so both appear
   without the page turning into a flag: the locality chip ring, the offer
   badge, and the rule above each step. */

.local__chip {
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--accent-2) 55%, transparent),
              0 1px 4px rgba(0,0,0,.20);
}
.local__head { position: relative; padding-inline-start: 0; }
.local__points li::before { border-color: var(--accent-2); }

.offer__tag { background: var(--accent-2); color: var(--paper); }

.proof__item b { color: var(--accent-2); }

/* The nav link rule outranks .btn--primary on specificity, which was
   repainting the CTA's label in the link colour. Restore it explicitly. */
.nav__links a.btn--primary,
.rail__nav a.btn--primary,
.topbar__nav a.btn--primary { color: var(--on-accent); }
.nav__links a.btn--ghost,
.nav__links a.btn--tg { color: var(--paper); }

/* ============================================================
   Layout B — "Marquee"
   Dark-first, centred, oversized serif display.
   Signature: a live ticker of the catalogue running under the hero.
   Reads: confident, editorial, premium.
   ============================================================ */

:root {
  --display: "Fraunces", Georgia, "Times New Roman", serif;
  --body: "Manrope", ui-sans-serif, system-ui, sans-serif;
  --shell: 1080px; --r: 3px; --r-lg: 4px;
}

h1, h2, h3, h4 { font-weight: 600; letter-spacing: -.015em; }
h1 { font-variation-settings: "SOFT" 0, "WONK" 1; }

body { background: var(--ink); color: var(--ink-soft); }

/* ---------- Bands ---------- */

.band { padding-block: clamp(4.5rem, 10vw, 8rem); }
.band--alt { background: var(--mist); }
.band--paper { background: var(--paper); color: var(--ink-soft); }
.band--tight { padding-block: clamp(3rem, 6vw, 5rem); }

.band__head { max-width: 40rem; margin-inline: auto; text-align: center; margin-bottom: 3.5rem; }
.band__head h2 { font-size: clamp(var(--t-xl), 5vw, var(--t-3xl)); color: var(--paper); }
.band__head p { font-size: var(--t-md); color: var(--ink-faint); margin: 1.1rem auto 0; }
.band--paper .band__head h2 { color: var(--ink); }

/* ---------- Nav ---------- */

.nav { position: sticky; top: 0; z-index: 50; background: color-mix(in srgb, var(--ink) 90%, transparent); backdrop-filter: blur(12px); }
.nav[data-stuck="true"] { border-bottom: 1px solid var(--line); }
.nav__in { display: flex; align-items: center; gap: 2rem; min-height: 70px; }
.nav__brand { font-family: var(--display); font-weight: 600; font-size: var(--t-lg); color: var(--paper); text-decoration: none; margin-right: auto; letter-spacing: -.02em; }
.nav__links { display: flex; gap: 1.9rem; align-items: center; }
.nav__links a { color: var(--ink-faint); text-decoration: none; font-size: var(--t-sm); font-weight: 500; }
.nav__links a:hover { color: var(--paper); }
.nav__toggle { display: none; background: none; border: 1px solid var(--line); border-radius: var(--r); padding: .5rem .7rem; cursor: pointer; }
.nav__toggle span { display: block; width: 18px; height: 2px; background: var(--paper); margin: 3px 0; }

/* ---------- Hero ---------- */

.hero { padding-block: clamp(4rem, 11vw, 8.5rem) 0; text-align: center; }
.hero__flag {
  display: inline-block; font-size: var(--t-xs); font-weight: 600; letter-spacing: .01em;
  color: var(--accent); border: 1px solid color-mix(in srgb, var(--accent) 35%, transparent);
  padding: .4rem .95rem; border-radius: 100px; margin-bottom: 2rem;
}
.hero h1 { font-size: clamp(2.6rem, 7.5vw, 5.2rem); color: var(--paper); max-width: 16ch; margin-inline: auto; }
.hero__sub { font-size: clamp(var(--t-md), 2.2vw, var(--t-lg)); color: var(--ink-faint); margin: 1.8rem auto 0; max-width: 46ch; line-height: 1.55; }
.hero__acts { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: 2.6rem; justify-content: center; }
.hero__note { font-size: var(--t-sm); color: var(--ink-faint); margin: 1.3rem auto 0; }

/* Signature: the ticker */
.ticker { margin-top: clamp(3.5rem, 8vw, 6rem); overflow: hidden; border-block: 1px solid var(--line); padding-block: 1.15rem; -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
.ticker__track { display: flex; gap: 3.5rem; width: max-content; animation: slide 34s linear infinite; }
.ticker:hover .ticker__track, .ticker:focus-within .ticker__track { animation-play-state: paused; }
.ticker__item { display: flex; align-items: center; gap: .8rem; font-size: var(--t-sm); color: var(--ink-faint); white-space: nowrap; }
.ticker__item b { color: var(--paper); font-weight: 600; }
.ticker__dot { width: 5px; height: 5px; border-radius: 50%; background: var(--accent); flex: none; }
@keyframes slide { to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) { .ticker__track { animation: none; } }

/* ---------- Proof ---------- */

.proof { background: var(--mist); }
.proof__in { display: grid; grid-template-columns: repeat(3, 1fr); text-align: center; padding-block: 2.5rem; gap: 1.5rem; }
.proof__item { font-size: var(--t-sm); color: var(--ink-faint); }
.proof__item b { display: block; font-family: var(--display); font-weight: 600; font-size: var(--t-xl); color: var(--paper); margin-bottom: .3rem; }

/* ---------- Problem ---------- */

.pains { max-width: 46rem; margin-inline: auto; }
.pains li { list-style: none; padding: 1.6rem 0; border-bottom: 1px solid var(--line); font-size: var(--t-md); color: var(--paper); text-align: center; }
.pains li:last-child { border-bottom: 0; }

/* ---------- Catalogue: full-width rows with oversized numerals ---------- */

.cat__item {
  display: grid; grid-template-columns: auto 1fr; gap: 0 2.5rem;
  padding-block: 3rem; border-top: 1px solid var(--line); align-items: start;
}
.cat__item:last-child { border-bottom: 1px solid var(--line); }
.cat__ref {
  font-family: var(--display); font-weight: 600; font-size: clamp(2.5rem, 6vw, 4rem);
  line-height: .85; color: transparent;
  -webkit-text-stroke: 1px var(--accent);
}
.cat__name { font-size: clamp(var(--t-lg), 3vw, var(--t-2xl)); color: var(--paper); }
.cat__desc { margin-top: .9rem; color: var(--ink-faint); max-width: 52ch; }
.cat__facts { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 1.3rem; }
.cat__facts li { list-style: none; font-size: var(--t-xs); color: var(--ink-soft); border: 1px solid var(--line); padding: .3rem .8rem; border-radius: 100px; }

/* ---------- Steps ---------- */

.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 3rem; }
.steps__item { text-align: center; }
.steps__item h3 { font-size: var(--t-lg); color: var(--paper); margin-bottom: .8rem; }
.steps__item p { color: var(--ink-faint); font-size: var(--t-sm); margin: 0 auto; }
.steps__rule { width: 34px; height: 1px; background: var(--accent); margin: 0 auto 1.4rem; }

/* ---------- Offer ---------- */

.offer { background: var(--mist); color: var(--ink-soft); border: 1px solid var(--line); border-radius: var(--r-lg); padding: clamp(2.5rem, 6vw, 4.5rem); text-align: center; max-width: 46rem; margin-inline: auto; }
.offer__tag { display: inline-block; font-size: var(--t-xs); font-weight: 700; background: var(--signal); color: #08140F; padding: .32rem .8rem; border-radius: 100px; margin-bottom: 1.5rem; }
.offer h2 { color: var(--paper); font-size: clamp(var(--t-xl), 4.4vw, var(--t-2xl)); }
.offer p { color: var(--ink-faint); margin: 1rem auto 0; }
.offer__list { display: inline-grid; gap: .75rem; margin: 2rem 0; text-align: left; }
.offer__list li { list-style: none; padding-inline-start: 1.8rem; position: relative; color: var(--ink-soft); font-size: var(--t-sm); }
.offer__list li::before { content: ""; position: absolute; left: 0; top: .42em; width: 9px; height: 5px; border-left: 2px solid var(--accent); border-bottom: 2px solid var(--accent); transform: rotate(-45deg); }
.offer__price { font-family: var(--display); font-weight: 600; font-size: var(--t-3xl); color: var(--paper); }
.offer__meta { font-size: var(--t-sm); color: var(--ink-faint); margin: .4rem auto 1.8rem; }

/* ---------- FAQ ---------- */

.faq { max-width: 44rem; margin-inline: auto; }
.faq__q { color: var(--paper); font-weight: 600; }
.faq__q::after { border-color: var(--ink-faint); }

/* ---------- Contact ---------- */

.contact__grid { display: grid; grid-template-columns: 1.25fr .75fr; gap: clamp(2rem, 5vw, 4rem); align-items: start; max-width: 60rem; margin-inline: auto; }
.field label { color: var(--paper); }
.field input, .field textarea { background: var(--mist); border-color: var(--line); color: var(--paper); }
.field input::placeholder, .field textarea::placeholder { color: var(--ink-faint); }
.direct { border: 1px solid var(--line); border-radius: var(--r-lg); padding: clamp(1.5rem, 3vw, 2.2rem); background: var(--mist); }
.direct h3 { font-size: var(--t-lg); color: var(--paper); margin-bottom: .7rem; }
.direct p { color: var(--ink-faint); font-size: var(--t-sm); }
.direct__note { font-size: var(--t-xs); color: var(--ink-faint); margin: .9rem 0 0; }
.form__legal { color: var(--ink-faint); }

/* ---------- Footer ---------- */

.foot { border-top: 1px solid var(--line); padding-block: 3rem 2rem; color: var(--ink-faint); }
.foot a { color: var(--ink-soft); text-decoration: none; }
.foot a:hover { color: var(--paper); }
.foot__top { display: flex; flex-wrap: wrap; gap: 1.5rem 3rem; justify-content: space-between; }
.foot__brand { font-family: var(--display); font-weight: 600; color: var(--paper); font-size: var(--t-md); }
.foot__links { display: flex; flex-wrap: wrap; gap: 1.4rem; font-size: var(--t-sm); }
.foot__bar { margin-top: 2.5rem; padding-top: 1.4rem; border-top: 1px solid var(--line); font-size: var(--t-xs); display: flex; flex-wrap: wrap; gap: .6rem 1.5rem; justify-content: space-between; }

/* ---------- Responsive ---------- */

@media (max-width: 900px) {
  .steps, .proof__in { grid-template-columns: 1fr; }
  .contact__grid { grid-template-columns: 1fr; }
  .cat__item { grid-template-columns: 1fr; gap: 1rem; }
}
@media (max-width: 720px) {
  .nav__toggle { display: block; }
  .nav__links { display: none; position: absolute; left: 0; right: 0; top: 100%; flex-direction: column; align-items: stretch; gap: 0; background: var(--ink); border-bottom: 1px solid var(--line); padding: .5rem var(--gutter) 1rem; }
  .nav__links[data-open="true"] { display: flex; }
  .nav__links a { padding: .85rem 0; border-bottom: 1px solid var(--line); }
  .nav__links .btn { margin-top: .8rem; }
  .hero__acts .btn { width: 100%; }
}

/* locality block on the dark layout */
.local { background: var(--mist); border-color: var(--line); }
.local__head h2 { color: var(--paper); }
.local__points li { color: var(--ink-soft); }
.local__note { color: var(--ink-faint); }

/* locality on a dark page */
.local-band { background: var(--mist); }
.local__head h2 { color: var(--paper); }
.local__points li { color: var(--ink-soft); }
.local__note { color: var(--ink-faint); }

.steps__rule { background: var(--accent-2); }
.cat__ref { -webkit-text-stroke: 1px var(--accent-2); }
.offer__tag { background: var(--accent-2); color: var(--ink); }
.proof__item b { color: var(--paper); }

/* Layout rules load after base, so restate the clipping here — the card is
   the boundary that keeps the flag backdrop inside the rounded corner. */
.local { position: relative; overflow: hidden; }
.local > *:not(.local__backdrop) { position: relative; z-index: 1; }
