/* ============================================================
   Russia Work — warm & trustworthy
   Warm paper + espresso ink, soft geometry, one clay-red accent.
   Mobile-first; min-width breakpoints. Reduced-motion aware.
   ============================================================ */

:root {
  /* surfaces */
  --paper: #f7f2ea;      /* page — warm linen */
  --paper-2: #efe7db;    /* alt band — deeper warm sand */
  --surface: #ffffff;    /* cards, lifted on paper */
  --panel: #241b14;      /* espresso — cozy warm dark */
  --panel-2: #332619;    /* warm brown inner tiles */

  /* ink */
  --ink: #241b14;        /* warm near-black */
  --muted: #6c6157;      /* warm gray-brown */
  --line: #e3d8c8;       /* warm hairline */
  --line-2: #d8cbb6;     /* slightly stronger hairline */

  /* accents */
  --accent: #c0432c;     /* clay-red — urgency ONLY (deadline + primary CTA) */
  --accent-deep: #a5361f;
  --accent-ink: #fff6f1;
  --accent-wash: #f4e2d9; /* soft clay tint for light chips */
  --green: #1e7a5b;      /* grounded green — "we cover", safety ticks */
  --green-ink: #185f47;
  --honey: #e0a24e;      /* warm highlight — kickers, marks, glows */
  --honey-soft: #f0d7a8;
  --honey-ink: #986613;  /* deep honey — for honey text/glyphs that need AA contrast */

  /* brand messengers (kept for recognition, secondary weight) */
  --wa: #128c7e;
  --tg: #229ed9;

  /* geometry */
  --r: 14px;
  --r-sm: 10px;
  --r-pill: 999px;
  --max: 72rem;

  /* rhythm */
  --space: clamp(1.15rem, 4vw, 1.85rem);
  --band-y: clamp(3rem, 8vw, 5.5rem);

  /* one soft warm shadow — used sparingly on floating surfaces only */
  --shadow-soft: 0 18px 40px -28px rgba(36, 27, 20, 0.45);
  --shadow-lift: 0 22px 46px -26px rgba(36, 27, 20, 0.38);

  --font-brand: "Fraunces", "Georgia", "Times New Roman", serif;
  --font-body: "Kantumruy Pro", "Noto Sans Khmer", system-ui, -apple-system, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1.0625rem; /* 17px — Khmer legibility */
  line-height: 1.7;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: inherit;
}

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

h1,
h2,
h3 {
  margin: 0 0 0.6rem;
  line-height: 1.35; /* room for Khmer coeng (subscript) glyphs */
  font-weight: 700;
  color: var(--ink);
  letter-spacing: 0;
}

h1 {
  font-size: clamp(2.05rem, 6.2vw, 3.4rem);
  line-height: 1.3;
  font-weight: 700;
}

h2 {
  font-size: clamp(1.55rem, 3.4vw, 2.25rem);
}

h3 {
  font-size: 1.12rem;
  font-weight: 600;
}

p {
  margin: 0 0 0.95rem;
}

/* ---------- utilities ---------- */

.wrap {
  width: min(var(--max), calc(100% - 2 * var(--space)));
  margin-inline: auto;
}

.skip {
  position: absolute;
  left: -999px;
  top: 0;
}

.skip:focus {
  left: 1rem;
  top: 1rem;
  z-index: 60;
  background: var(--surface);
  color: var(--ink);
  padding: 0.6rem 0.9rem;
  border-radius: var(--r-sm);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-soft);
}

/* ---------- wordmark ---------- */

.mark {
  font-family: var(--font-brand);
  font-weight: 600;
  font-optical-sizing: auto;
  letter-spacing: -0.01em;
  text-decoration: none;
  line-height: 1;
  color: var(--ink);
}

.mark__word {
  display: block;
  font-size: 1.4rem;
}

.mark__tag {
  display: block;
  margin-top: 0.28rem;
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

.mark--panel {
  font-size: 1.3rem;
  color: var(--ink);
  margin: 0 0 1.1rem;
}

/* ---------- header rail ---------- */

.rail {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.8rem var(--space);
  background: var(--paper);
  border-bottom: 1px solid var(--line);
}

.rail__nav {
  display: none;
  gap: 1.35rem;
  font-size: 0.98rem;
  font-weight: 500;
}

.rail__nav a {
  text-decoration: none;
  color: var(--muted);
  padding-bottom: 2px;
  border-bottom: 1.5px solid transparent;
  transition: color 160ms ease, border-color 160ms ease;
}

.rail__nav a:hover {
  color: var(--ink);
  border-bottom-color: var(--honey);
}

@media (min-width: 900px) {
  .rail__nav {
    display: flex;
  }
}

/* ---------- buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 3rem; /* >= 44px tap target */
  padding: 0.72rem 1.25rem;
  border: 1.5px solid transparent;
  border-radius: var(--r-sm);
  font: inherit;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  transition: transform 180ms ease, background-color 180ms ease,
    border-color 180ms ease, box-shadow 180ms ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn:active {
  transform: translateY(0);
}

.btn:focus-visible {
  outline: 2.5px solid var(--accent);
  outline-offset: 2px;
}

/* clay-red — the single urgency accent (Telegram CTA + form submit) */
.btn--primary {
  background: var(--accent);
  color: var(--accent-ink);
  box-shadow: 0 12px 26px -18px rgba(192, 67, 44, 0.9);
}

.btn--primary:hover {
  background: var(--accent-deep);
}

/* warm ghost — header contact, quiet invite */
.btn--ghost {
  background: transparent;
  border-color: var(--line-2);
  color: var(--ink);
}

.btn--ghost:hover {
  background: color-mix(in srgb, var(--honey) 16%, transparent);
  border-color: var(--honey);
}

/* soft messenger buttons — recognizable, secondary weight */
.btn--wa {
  background: var(--surface);
  color: var(--ink);
  border-color: color-mix(in srgb, var(--wa) 55%, var(--line));
}

.btn--wa:hover {
  background: color-mix(in srgb, var(--wa) 10%, var(--surface));
  border-color: var(--wa);
}

.btn--tg {
  background: var(--surface);
  color: var(--ink);
  border-color: color-mix(in srgb, var(--tg) 52%, var(--line));
}

.btn--tg:hover {
  background: color-mix(in srgb, var(--tg) 10%, var(--surface));
  border-color: var(--tg);
}

.btn--block {
  width: 100%;
}

/* small brand dot carries the messenger color; label stays ink for AA contrast */
.btn--wa::before,
.btn--tg::before {
  content: "";
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  flex: none;
}

.btn--wa::before {
  background: var(--wa);
}

.btn--tg::before {
  background: var(--tg);
}

/* ---------- deadline chip (the one urgent note) ---------- */

.chip {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  width: fit-content;
  margin: 0 0 1.4rem;
  padding: 0.5rem 0.9rem 0.5rem 0.85rem;
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 600;
  font-size: 0.98rem;
  border-radius: var(--r-pill);
  line-height: 1.35;
}

.chip::before {
  content: "";
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  background: var(--honey);
  box-shadow: 0 0 0 3px rgba(224, 162, 78, 0.28);
  flex: none;
}

.chip--light {
  background: var(--accent-wash);
  color: var(--accent-deep);
  border: 1px solid color-mix(in srgb, var(--accent) 30%, var(--line));
}

/* ---------- hero ---------- */

.hero {
  display: grid;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
}

@media (min-width: 900px) {
  .hero {
    grid-template-columns: minmax(20rem, 1.04fr) minmax(17rem, 0.96fr);
    min-height: min(90vh, 46rem);
  }
}

.hero__panel {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(2.25rem, 7vw, 4.5rem) var(--space) clamp(2.25rem, 6vw, 4rem);
  background:
    radial-gradient(115% 85% at 3% 4%, rgba(224, 162, 78, 0.2), transparent 55%),
    radial-gradient(90% 70% at 100% 100%, rgba(192, 67, 44, 0.07), transparent 62%),
    var(--paper);
}

.hero__lede {
  max-width: 34rem;
  margin-bottom: 1.5rem;
  color: color-mix(in srgb, var(--ink) 82%, var(--paper));
  font-size: 1.14rem;
  line-height: 1.72;
}

#hero-title {
  max-width: 15ch;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.hero__media {
  position: relative;
  margin: 0;
  overflow: hidden;
  min-height: 15rem;
  background: var(--panel);
  isolation: isolate;
}

.hero__media img {
  width: 100%;
  height: 100%;
  min-height: 15rem;
  object-fit: cover;
  /* warm-tone the cold spark photo toward amber/espresso */
  filter: sepia(0.5) saturate(1.42) hue-rotate(-12deg) brightness(1.03)
    contrast(1.02);
}

/* warm duotone wash — reliable normal blend (degrades gracefully) */
.hero__media::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(
    208deg,
    rgba(224, 162, 78, 0.22) 0%,
    rgba(192, 67, 44, 0.1) 34%,
    rgba(36, 27, 20, 0.4) 76%,
    rgba(36, 27, 20, 0.62) 100%
  );
}

/* feather the seam into the cream panel (top on mobile, left on desktop) */
.hero__media::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  background: linear-gradient(180deg, var(--paper) 0%, rgba(247, 242, 234, 0) 15%);
}

@media (min-width: 900px) {
  .hero__media::after {
    background: linear-gradient(
      90deg,
      var(--paper) 0%,
      rgba(247, 242, 234, 0) 22%
    );
  }
}

/* richer duotone where blend modes are supported */
@supports (mix-blend-mode: soft-light) {
  .hero__media::before {
    background:
      radial-gradient(128% 92% at 84% 10%, rgba(224, 162, 78, 0.4), transparent 55%),
      linear-gradient(208deg, rgba(36, 27, 20, 0.16), rgba(36, 27, 20, 0.52));
    mix-blend-mode: soft-light;
  }
}

/* ---------- bands ---------- */

.band {
  padding: var(--band-y) 0;
}

.band--soft {
  background: var(--paper-2);
}

.band--invert {
  background: var(--panel);
  color: var(--paper);
  background-image:
    radial-gradient(80% 60% at 100% 0%, rgba(224, 162, 78, 0.08), transparent 60%),
    radial-gradient(70% 60% at 0% 100%, rgba(192, 67, 44, 0.08), transparent 62%);
}

.band--invert h2 {
  color: var(--paper);
}

.band--invert .band__head p {
  color: rgba(247, 242, 234, 0.74);
}

.band__head {
  max-width: 40rem;
  margin-bottom: 1.9rem;
}

/* honey kicker mark above each section heading */
.band__head::before {
  content: "";
  display: block;
  width: 2.4rem;
  height: 3px;
  margin-bottom: 1rem;
  border-radius: var(--r-pill);
  background: var(--honey);
}

.band__head p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 1.08rem;
}

/* ---------- tiles / bento ---------- */

.bento {
  display: grid;
  gap: 0.85rem;
  grid-template-columns: 1fr;
}

@media (min-width: 640px) {
  .bento {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }

  .tile {
    grid-column: span 3;
  }

  .tile--lg {
    grid-column: span 4;
  }

  .tile--wide {
    grid-column: span 6;
  }
}

.tile {
  position: relative;
  background: linear-gradient(180deg, var(--surface), #fffdf8);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 1.35rem 1.4rem;
  transition: transform 200ms ease, border-color 200ms ease,
    box-shadow 200ms ease;
}

.tile > h3 {
  margin-bottom: 0.4rem;
}

.tile p:last-child {
  margin-bottom: 0;
  color: var(--muted);
}

.tile:hover {
  transform: translateY(-2px);
  border-color: var(--honey);
  box-shadow: var(--shadow-lift);
}

/* the marquee benefit tile gets a subtle honey top edge */
.tile--lg {
  background:
    linear-gradient(180deg, #fffdf6, var(--surface));
}

.tile--lg::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 3px;
  border-radius: var(--r) var(--r) 0 0;
  background: linear-gradient(90deg, var(--honey), transparent 70%);
}

/* ---------- covered ("we cover") ---------- */

.cover-row {
  display: grid;
  gap: 0.85rem;
  grid-template-columns: 1fr 1fr;
}

@media (min-width: 900px) {
  .cover-row {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

/* covered items + docs promise carry the grounded-green safety tick */
.tile--plain h3,
.tile--docs h3 {
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

.tile--plain h3::before,
.tile--docs h3::before {
  content: "";
  flex: none;
  width: 1.3rem;
  height: 1.3rem;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ccircle cx='12' cy='12' r='11' fill='%231E7A5B'/%3E%3Cpath d='M7 12.4l3.3 3.3L17 8.6' fill='none' stroke='%23F7F2EA' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E")
    center / contain no-repeat;
}

.tile--docs {
  margin-top: 0.85rem;
  border-color: color-mix(in srgb, var(--green) 26%, var(--line));
}

.tile--docs::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 3px;
  border-radius: var(--r) var(--r) 0 0;
  background: linear-gradient(90deg, var(--green), transparent 72%);
}

/* ---------- trust "3+" ---------- */

.trust {
  display: grid;
  gap: 1.1rem;
  align-items: center;
  max-width: 50rem;
  padding: clamp(1.6rem, 4vw, 2.4rem);
  background: linear-gradient(180deg, var(--surface), #fffdf7);
  border: 1px solid var(--line);
  border-radius: var(--r);
}

@media (min-width: 700px) {
  .trust {
    grid-template-columns: auto 1fr;
    gap: 2.2rem;
  }
}

.trust__years {
  margin: 0;
  font-family: var(--font-brand);
  font-weight: 600;
  font-optical-sizing: auto;
  font-size: clamp(4.5rem, 13vw, 7rem);
  line-height: 0.82;
  color: var(--ink);
  letter-spacing: -0.02em;
}

.trust__years .plus {
  color: var(--honey-ink);
}

.trust h2 {
  margin-bottom: 0.5rem;
}

.trust p:last-child {
  margin-bottom: 0;
  color: var(--muted);
}

/* ---------- how-to ladder ---------- */

.ladder {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.85rem;
}

.ladder .tile {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1.1rem;
  align-items: start;
  background: linear-gradient(180deg, var(--surface), #fffdf7);
}

.ladder__n {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.9rem;
  height: 2.9rem;
  font-family: var(--font-body);
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--accent-deep);
  line-height: 1;
  background: color-mix(in srgb, var(--honey) 22%, var(--surface));
  border: 1.5px solid color-mix(in srgb, var(--honey) 55%, var(--line));
  border-radius: var(--r-pill);
  flex: none;
}

.ladder .tile h3 {
  margin-bottom: 0.35rem;
}

.ladder .tile p:last-child {
  margin-bottom: 0;
  color: var(--muted);
}

/* ---------- contact ---------- */

.contact {
  display: grid;
  gap: 1.35rem;
}

@media (min-width: 900px) {
  .contact {
    grid-template-columns: 1fr 1.05fr;
    gap: 2rem;
    align-items: start;
  }

  .contact__copy {
    position: sticky;
    top: 5.5rem;
  }

  .contact__alt {
    grid-column: 1 / -1;
  }
}

.contact__copy p {
  color: var(--muted);
}

.contact__copy .chip {
  margin-top: 0.4rem;
  margin-bottom: 0;
}

.sheet {
  display: grid;
  gap: 1.1rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: clamp(1.25rem, 3vw, 1.75rem);
  box-shadow: var(--shadow-soft);
}

.field {
  display: grid;
  gap: 0.4rem;
}

.field span {
  font-weight: 600;
  font-size: 0.98rem;
}

.field input,
.field textarea {
  width: 100%;
  border: 1.5px solid var(--line-2);
  border-radius: var(--r-sm);
  background: #fffdf9;
  color: var(--ink);
  font: inherit;
  padding: 0.85rem 0.95rem;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

.field textarea {
  min-height: 8.5rem;
  resize: vertical;
  line-height: 1.6;
}

.field input::placeholder,
.field textarea::placeholder {
  color: color-mix(in srgb, var(--muted) 90%, var(--paper));
}

.field input:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(192, 67, 44, 0.16);
}

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

.form__status {
  margin: 0;
  padding: 0.8rem 0.95rem;
  border-radius: var(--r-sm);
  font-size: 0.98rem;
  border: 1px solid color-mix(in srgb, var(--green) 38%, var(--line));
  background: color-mix(in srgb, var(--green) 12%, var(--surface));
  color: var(--green-ink);
}

.form__status.is-error {
  border-color: color-mix(in srgb, var(--accent) 38%, var(--line));
  background: color-mix(in srgb, var(--accent) 10%, var(--surface));
  color: var(--accent-deep);
}

.contact__alt {
  padding-top: 0.5rem;
}

.contact__alt > p:first-child {
  font-weight: 600;
  color: var(--ink);
}

.contact__row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin: 0.8rem 0;
}

.hint {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 0.96rem;
}

/* ---------- footer ---------- */

.foot {
  border-top: 1px solid var(--line);
  padding: 2.4rem 0 2.75rem;
  background: var(--paper-2);
}

.foot__inner {
  display: grid;
  gap: 0.5rem;
}

.foot .mark {
  font-size: 1.35rem;
}

.foot p {
  margin: 0;
  color: var(--muted);
}

.foot__links {
  display: flex;
  gap: 1.25rem;
  margin-top: 0.35rem;
}

.foot__links a {
  color: var(--green-ink);
  font-weight: 600;
  text-decoration: none;
  border-bottom: 1.5px solid transparent;
  transition: border-color 160ms ease;
}

.foot__links a:hover {
  border-bottom-color: var(--green);
}

/* ---------- thank-you page ---------- */

.page-thanks {
  min-height: 100vh;
  margin: 0;
  background: var(--panel);
}

.thanks-shell {
  position: relative;
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: var(--space);
  overflow: hidden;
  isolation: isolate;
}

.thanks-shell__bg {
  position: absolute;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: sepia(0.5) saturate(1.4) hue-rotate(-12deg) brightness(1) contrast(1.02);
}

.thanks-shell__shade {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(90% 70% at 80% 8%, rgba(224, 162, 78, 0.22), transparent 55%),
    linear-gradient(180deg, rgba(36, 27, 20, 0.7), rgba(36, 27, 20, 0.9));
}

.thanks-card {
  position: relative;
  width: min(37rem, 100%);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: clamp(1.5rem, 5vw, 2.25rem);
  color: var(--ink);
  box-shadow: var(--shadow-soft);
}

.thanks-card .mark {
  display: inline-block;
  margin-bottom: 1.1rem;
  font-size: 1.35rem;
  color: var(--ink);
  text-decoration: none;
}

.thanks-card__kicker {
  margin: 0 0 0.4rem;
  color: var(--green-ink);
  font-weight: 600;
}

.thanks-card p {
  color: var(--muted);
}

.thanks-card h1 {
  color: var(--ink);
  font-size: clamp(1.6rem, 5vw, 2.2rem);
}

.thanks-card__contact {
  margin: 1.25rem 0 1.4rem;
  padding-top: 1.1rem;
  border-top: 1px solid var(--line);
}

.thanks-card__contact > p:first-child {
  color: var(--ink);
  font-weight: 600;
}

.thanks-card .btn--primary {
  width: 100%;
}

/* ---------- motion / reveal ---------- */

[data-reveal] {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.72s cubic-bezier(0.22, 0.61, 0.36, 1),
    transform 0.72s cubic-bezier(0.22, 0.61, 0.36, 1);
  transition-delay: var(--reveal-delay, 0ms);
  will-change: opacity, transform;
}

[data-reveal].is-visible {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  [data-reveal] {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .btn:hover,
  .tile:hover {
    transform: none;
  }
}
