/* TONAR ASIA — page CSS.
   The style direction: milk ground, near-black words, wine red for the one action, deep green for the
   closing band, one geometric grotesque (Golos Text). Cards wear the photograph on top, lists are
   hairline rows, the process is four steps on one dashed line. Built on the kit's grid and tokens. */

/* ---- anchors: a smooth ride, and room above the fixed nav ---- */
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
main > section[id], footer.closing[id] { scroll-margin-top: calc(var(--nav) + var(--s-2)); }

/* ---- the page flows like the reference: every block takes the height its words and pictures need,
   with one generous padding that keeps the rhythm ---- */
main > section.section, footer.closing {
  height: auto !important; min-height: 0 !important; display: block !important;
  padding-block: clamp(72px, 9vh, 128px);
  scroll-margin-top: var(--nav);
}
main > section.section > .wrap, footer.closing > .wrap { min-height: 0; height: auto; }
main > section.hero { padding-block: calc(var(--nav) + 48px) clamp(72px, 9vh, 112px); height: auto !important; }
main > section.hero > .wrap { height: auto; }

/* ---- the small red line over every heading ---- */
.eyebrow {
  margin: 0 0 var(--s-4);
  font-size: 12px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase;
  color: var(--accent);
}
.eyebrow--inv { color: var(--gold); }

h1, h2, .t-h1, .t-h2 { letter-spacing: var(--display-tracking-xl); text-wrap: balance; }
.section-head { max-width: 62ch; }
.section-head h2 { margin-bottom: var(--s-4); }
.section-lead { color: var(--muted); font-size: var(--t-lead); line-height: 1.55; max-width: 62ch; margin: 0; }

/* ---- buttons: one filled red, one outline ---- */
.btn--ghost {
  background: transparent; color: var(--ink); border: 1px solid color-mix(in oklab, var(--ink) 28%, transparent);
}
.btn--ghost:hover { border-color: var(--ink); }

/* ---- the client's mark in the nav ---- */
.nav__logo img.nav__markimg { height: 30px; width: auto; }
.nav__logo { font-weight: 600; letter-spacing: -0.02em; }
@media (max-width: 639px) {
  .nav__logo img.nav__markimg { height: 24px; }
  .nav__logo { font-size: 18px; }
  .nav__actions .btn { font-size: 14px; padding-inline: var(--s-3); }
}
/* a narrow phone keeps the mark alone: the bar still fits its lines */
@media (max-width: 479px) { .nav__logo span { display: none; } }

/* ---- 1. hero ---- */
.hero-split { align-items: start; }
.hero-copy > .eyebrow { margin-bottom: var(--s-4); }
.hero-copy .t-lead { color: var(--muted); font-size: var(--t-card); line-height: 1.55; }
.hero-visual { height: 100%; min-height: 320px; }
.adv {
  list-style: none; margin: var(--s-5) 0 0; padding: 0;
  display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-3) var(--s-5);
  border-top: 1px solid var(--line); padding-top: var(--s-5);
}
.adv li { display: grid; grid-template-columns: 20px 1fr; gap: var(--s-2); align-items: start; font-size: var(--t-small); line-height: 1.4; }
.adv__ic { display: grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; background: color-mix(in oklab, var(--accent) 12%, transparent); }
.adv__ic svg { width: 12px; height: 12px; fill: none; stroke: var(--accent); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }

/* ---- 2. catalogue: eight cards, one card ---- */
.cat-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); grid-auto-rows: 1fr; gap: var(--s-4); margin-top: var(--s-6); }
.cat {
  display: grid; grid-template-rows: auto 1fr; height: 100%;
  background: #fff; border: 1px solid var(--card-line); border-radius: var(--r-md);
  overflow: clip;
  transition: border-color var(--dur) var(--ease);
}
.cat:hover { border-color: color-mix(in oklab, var(--ink) 24%, transparent); }
.cat__media { aspect-ratio: 4 / 3; overflow: clip; background: var(--surface); }
.cat__media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cat__body { padding: var(--s-4) var(--s-4) var(--s-5); }
.cat__body h3 { margin: 0 0 6px; font-size: var(--t-card); font-weight: 600; letter-spacing: -0.015em; }
.cat__body p { margin: 0; color: var(--muted); font-size: var(--t-small); line-height: 1.45; }
.line-action {
  display: flex; align-items: center; justify-content: space-between; gap: var(--s-5);
  margin-top: var(--s-6); padding-top: var(--s-5); border-top: 1px solid var(--line);
}
.line-action__text { margin: 0; color: var(--muted); font-size: var(--t-body); }

/* ---- 3. about: words left, a check list right, the figures under both ---- */
.about { align-items: start; }
.about .t-lead { color: var(--muted); }
.about-mark { margin: 0 0 var(--s-6); }
.about-mark img { display: block; width: min(100%, 264px); height: auto; }
.rule-rows { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.rule-rows li {
  display: grid; grid-template-columns: 44px 1fr; gap: var(--s-4); align-items: baseline;
  padding: var(--s-4) 0; border-bottom: 1px solid var(--line);
  font-size: var(--t-body); line-height: 1.45;
}
.rule-rows li span { color: var(--accent); font-variant-numeric: tabular-nums; font-size: 12px; font-weight: 600; letter-spacing: .08em; }
.figures {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--s-4);
  margin: var(--s-7) 0 0; padding-top: var(--s-6); border-top: 1px solid var(--line);
}
.figures dt { color: var(--muted); font-size: var(--t-small); }
.figures dd { margin: var(--s-2) 0 0; font-size: var(--t-stat); font-weight: 600; letter-spacing: -0.03em; line-height: 1; }

/* ---- 4. how it works: four steps on one dashed line ---- */
.steps {
  list-style: none; margin: var(--s-7) 0 0; padding: 0;
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--s-5);
  counter-reset: step;
}
.steps li { position: relative; padding-top: var(--s-6); }
.steps li::before {
  content: ""; position: absolute; left: 0; right: calc(-1 * var(--s-5)); top: 19px;
  border-top: 1px dashed color-mix(in oklab, var(--ink) 26%, transparent);
}
.steps li:last-child::before { right: 0; }
.steps__n {
  position: relative; display: grid; place-items: center;
  width: 38px; height: 38px; margin-bottom: var(--s-4);
  border: 1px solid color-mix(in oklab, var(--ink) 20%, transparent); border-radius: 50%;
  background: var(--bg); font-size: 12px; font-weight: 600; letter-spacing: .06em; color: var(--accent);
}
.steps h3 { margin: 0 0 var(--s-2); font-size: var(--t-card); font-weight: 600; letter-spacing: -0.015em; }
.steps p { margin: 0; color: var(--muted); font-size: var(--t-small); line-height: 1.5; }

/* ---- 5. partners: one photograph and a wall of equal cells ---- */
.band { margin: var(--s-6) 0 0; --ratio: 42%; }
.brands {
  list-style: none; margin: var(--s-5) 0 0; padding: 0;
  display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px;
}
.brands li {
  display: grid; place-items: center; min-height: 78px; padding: var(--s-3);
  background: #fff; border: 1px solid var(--card-line); border-radius: var(--r-sm);
}
.brands img { max-width: 100%; max-height: 32px; width: auto; height: auto; object-fit: contain; }
.brands-more { margin: var(--s-4) 0 0; color: var(--muted); font-size: var(--t-small); }

/* ---- 6. closing band and the footer lines ---- */
.footer.closing {
  background: var(--p-inv-bg); color: var(--p-inv-ink);
  --ink: var(--p-inv-ink); --muted: var(--p-inv-muted); --line: color-mix(in oklab, var(--p-inv-ink) 18%, transparent);
  --accent: var(--gold);
}
.close-band { display: grid; grid-template-columns: 1.2fr 1fr; gap: var(--s-8); }
.close-band h2 { margin: 0 0 var(--s-4); color: var(--p-inv-ink); max-width: 24ch; }
.close-band__note { margin: 0 0 var(--s-6); color: var(--p-inv-muted); font-size: var(--t-small); }
.close-band__cols { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-5); align-content: start; }
.close-band__h { margin: 0 0 var(--s-3); font-size: 12px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--gold); }
.close-band__addr { font-style: normal; color: var(--p-inv-ink); line-height: 1.5; }
.link--inv { color: var(--p-inv-ink); text-decoration-color: color-mix(in oklab, var(--p-inv-ink) 40%, transparent); }
.footer__req { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s-2); color: var(--p-inv-ink); font-size: var(--t-small); }
.footer__req a { color: var(--p-inv-ink); text-decoration: none; border-bottom: 1px solid color-mix(in oklab, var(--p-inv-ink) 40%, transparent); transition: border-color var(--dur) var(--ease); }
.footer__req a:hover { border-bottom-color: var(--p-inv-ink); }
.footer.closing { padding-block: clamp(88px, 11vh, 148px) clamp(64px, 8vh, 96px); }
.close-band { padding-bottom: var(--s-4); }
.footer__legal {
  display: flex; justify-content: space-between; gap: var(--s-4); flex-wrap: wrap;
  margin-top: var(--s-7); padding-top: var(--s-5);
  border-top: 1px solid color-mix(in oklab, var(--p-inv-ink) 16%, transparent);
  color: var(--p-inv-muted); font-size: var(--t-small);
}
.footer__legal a { color: var(--p-inv-ink); text-decoration: none; }
.footer__note { color: var(--muted); }

/* ---- tablet ---- */
@media (min-width: 640px) and (max-width: 1023px) {
  .cat-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .brands { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .figures { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-5); }
  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-5) var(--s-5); }
  .steps li::before { right: calc(-1 * var(--s-5)); }
  .steps li:nth-child(2n)::before { right: 0; }
  .close-band { grid-template-columns: 1fr; gap: var(--s-6); }
  .hero-split > .hero-visual { flex: none; height: auto; min-height: 0; --ratio: 72%; }
}

/* ---- phone ---- */
@media (max-width: 639px) {
  .cat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-3); }
  .cat__body { padding: var(--s-3); }
  .cat__body h3 { font-size: var(--t-small); }
  .cat__body p { display: none; }
  .hero-split > .hero-visual { flex: none; height: auto; min-height: 0; --ratio: 100%; }
  .line-action { flex-direction: column; align-items: flex-start; gap: var(--s-4); }
  .line-action .btn { width: 100%; justify-content: center; }
  .adv { grid-template-columns: 1fr; }
  .brands { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .brands li { min-height: 60px; padding: var(--s-2); }
  .brands img { max-height: 26px; }
  .steps { grid-template-columns: 1fr; }
  .steps li { padding-top: var(--s-4); padding-left: 54px; }
  .steps li::before { display: none; }
  .steps__n { position: absolute; left: 0; top: var(--s-4); margin: 0; width: 34px; height: 34px; }
  .figures { grid-template-columns: 1fr 1fr; }
  .close-band { grid-template-columns: 1fr; gap: var(--s-6); padding: var(--s-5); }
  .close-band__cols { grid-template-columns: 1fr; }
  .band { --ratio: 62%; }
}

/* ---- the price-request window ---- */
html.is-modal { overflow: hidden; }

.quote {
  padding: 0; border: 0; background: transparent; color: var(--ink);
  width: min(100% - 32px, 620px); max-height: min(92vh, 860px);
  margin: auto; overflow: visible;
}
.quote::backdrop { background: color-mix(in oklab, #16180f 62%, transparent); backdrop-filter: blur(3px); }
.quote__inner {
  position: relative; overflow: auto; max-height: min(92vh, 860px);
  padding: clamp(24px, 3vw, 40px);
  background: #fff; border: 1px solid var(--card-line); border-radius: 18px;
  box-shadow: 0 30px 80px -30px rgb(20 22 15 / 45%);
}
.quote[open] { animation: quote-in 220ms var(--ease); }
@keyframes quote-in { from { opacity: 0; transform: translateY(8px) scale(.985); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .quote[open] { animation: none; } }

.quote__close {
  position: absolute; top: 18px; right: 18px; z-index: 2;
  display: grid; place-items: center; width: 36px; height: 36px;
  border: 1px solid var(--card-line); border-radius: 50%; background: #fff; color: var(--muted);
  cursor: pointer; transition: border-color var(--dur) var(--ease), color var(--dur) var(--ease);
}
.quote__close:hover { border-color: color-mix(in oklab, var(--ink) 40%, transparent); color: var(--ink); }

.quote h2 { margin: 0 0 var(--s-3); font-size: clamp(26px, 2.4vw, 34px); letter-spacing: -0.025em; }
.quote__lead { margin: 0 0 var(--s-6); color: var(--muted); font-size: var(--t-body); line-height: 1.5; max-width: 46ch; }
.quote__lead a { color: var(--accent); }

.quote__form { display: grid; gap: var(--s-4); }
.field { display: grid; gap: 8px; border: 0; margin: 0; padding: 0; min-width: 0; }
.field__label { font-size: var(--t-small); font-weight: 500; color: var(--ink); }
.field__opt { margin-left: 8px; color: var(--muted); font-weight: 400; font-size: 12px; letter-spacing: .01em; }
.field__input {
  width: 100%; height: 46px; padding: 0 14px;
  font: inherit; font-size: var(--t-body); color: var(--ink);
  background: #fff; border: 1px solid #ddd7c9; border-radius: 10px;
  transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
.field__input::placeholder { color: #8b857a; }
.field__input:hover { border-color: color-mix(in oklab, var(--ink) 30%, transparent); }
/* the focus ring is the ink, not the brand red: red alone already means "this one is wrong" */
.field__input:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 3px color-mix(in oklab, var(--ink) 10%, transparent); }
.field__input[aria-invalid="true"] { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in oklab, var(--accent) 12%, transparent); }
.field__err { margin: 0; color: var(--accent); font-size: var(--t-small); line-height: 1.35; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { position: relative; }
.chip input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.chip span {
  display: inline-flex; align-items: center; height: 34px; padding: 0 14px;
  border: 1px solid #ddd7c9; border-radius: 999px; background: #fff;
  font-size: var(--t-small); color: #433f38; cursor: pointer;
  transition: color var(--dur) var(--ease), border-color var(--dur) var(--ease), background var(--dur) var(--ease);
}
.chip span:hover { border-color: color-mix(in oklab, var(--ink) 30%, transparent); color: var(--ink); }
.chip input:checked + span { background: var(--accent); border-color: var(--accent); color: #fff; }
.chip input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }

.quote__error { margin: 0; color: var(--accent); font-size: var(--t-small); }
.quote__send { margin-top: var(--s-2); height: 50px; }
.quote__note { margin: 0; color: var(--muted); font-size: 12.5px; line-height: 1.45; }

/* the confirmation */
.quote__done { text-align: left; padding-top: var(--s-2); }
.quote__tick {
  display: grid; place-items: center; width: 56px; height: 56px; margin-bottom: var(--s-5);
  border-radius: 50%; background: #1d3a28; color: #fff;
}
.quote__done h2:focus { outline: none; }
.quote__done-hint { margin: 0 0 var(--s-6); color: var(--muted); font-size: var(--t-small); line-height: 1.5; }
.quote__done-hint a { color: var(--accent); }
.quote__again { width: 100%; height: 50px; margin-top: var(--s-2); }

@media (max-width: 639px) {
  .quote { width: calc(100% - 16px); max-height: 94vh; }
  .quote__inner { padding: 22px 18px 20px; max-height: 94vh; border-radius: 16px; }
  .quote__lead { margin-bottom: var(--s-5); }
}
