/* REPOSE landing pages · v3 "Bình minh" (Dawn), matched to the 2026 cover.
   Sky sage-green at the top, cream in the middle, peach toward the bottom.
   A soft peach sun rises behind the cairn. Text in deep moss green.
   Plain CSS, no JavaScript, no cookies. */

:root {
  /* Sky → cream → peach (sampled from the cover) */
  --sky-top: #C5DAD1;
  --sky: #D7E4DD;
  --cream: #EEEBE0;
  --peach-1: #F4E2CC;
  --peach-2: #EFD5BA;
  --sun: #F6D3A9;
  --sun-core: #F9DDB8;
  /* Text */
  --ink: #1C2D25;        /* deep moss, titles + body */
  --ink-2: #3E5046;      /* subtitles */
  --muted: #5B6B61;      /* secondary text, still AA on cream */
  --link: #2C5A46;
  /* Stones + pebble */
  --stone-1: #9A8570;
  --stone-2: #B29E85;
  --stone-3: #C7B69C;
  --stone-4: #DCCEB4;
  --pebble: #E19A62;
  --horizon: #90A192;
  /* Surfaces */
  --card: rgba(255, 253, 248, 0.62);
  --card-solid: #FFFCF6;
  --line: rgba(28, 45, 37, 0.14);
  --serif: "Lora", Georgia, "Times New Roman", serif;
  color-scheme: light;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; background: var(--peach-2); }

body {
  margin: 0;
  position: relative;
  overflow-x: clip;
  color: var(--ink);
  font-family: var(--serif);
  font-size: 19px;
  line-height: 1.65;
  background-color: var(--cream);
  background-image: linear-gradient(180deg,
    var(--sky-top) 0,
    var(--sky) 380px,
    #E4EAE2 760px,
    var(--cream) 1150px,
    #F2E8D8 62%,
    var(--peach-1) 82%,
    var(--peach-2) 100%);
}

.wrap {
  position: relative;
  z-index: 1;
  max-width: 720px;
  margin: 0 auto;
  padding-left: max(20px, env(safe-area-inset-left, 0px));
  padding-right: max(20px, env(safe-area-inset-right, 0px));
}

a { color: var(--link); text-decoration-color: rgba(225, 154, 98, 0.8); text-decoration-thickness: 2px; text-underline-offset: 3px; }
a:hover, a:focus-visible { color: var(--ink); text-decoration-color: var(--pebble); }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; border-radius: 4px; }
img { max-width: 100%; height: auto; display: block; }

/* ---------- Dawn scene (top of every page) ---------- */
.sky {
  position: absolute;
  inset: 0 0 auto 0;
  height: 620px;
  overflow: hidden;
  z-index: 0;
  pointer-events: none;
  -webkit-mask-image: linear-gradient(180deg, #000 60%, transparent 100%);
  mask-image: linear-gradient(180deg, #000 60%, transparent 100%);
}
.sky .glow {
  position: absolute;
  left: 50%;
  top: 150px;
  width: 760px;
  height: 760px;
  margin-left: -380px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(249, 221, 184, 0.75) 0%, rgba(246, 211, 169, 0.45) 30%, rgba(246, 211, 169, 0.12) 55%, rgba(246, 211, 169, 0) 70%);
  animation: sunrise 14s ease-in-out infinite alternate;
}
.sky .haze {
  position: absolute;
  width: 70%;
  height: 120px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.35);
  filter: blur(30px);
  animation: drift 40s ease-in-out infinite alternate;
}
.sky .haze.h1 { left: -12%; top: 90px; }
.sky .haze.h2 { right: -16%; top: 260px; animation-duration: 55s; animation-direction: alternate-reverse; }
@keyframes sunrise { from { transform: translateY(18px) scale(0.97); } to { transform: translateY(-8px) scale(1.03); } }
@keyframes drift { from { transform: translateX(-6%); } to { transform: translateX(8%); } }

/* ---------- Header ---------- */
.top {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 8px 16px;
  padding-block: 18px 12px;
}
.brand { display: flex; align-items: center; gap: 10px; font-size: 17px; color: var(--ink-2); }
.brand strong { color: var(--ink); letter-spacing: 0.22em; font-weight: 600; }
.brand img { height: 30px; width: auto; }
.mark { width: 30px; height: 30px; flex: none; }
.lang { font-size: 15px; display: flex; gap: 4px; align-items: center; }
.lang a, .lang span { padding: 4px 12px; border-radius: 999px; text-decoration: none; color: var(--ink-2); }
.lang a:hover { background: rgba(255, 255, 255, 0.5); color: var(--ink); }
.lang [aria-current="page"] { color: var(--cream); background: var(--ink); font-weight: 600; }

/* ---------- Hero ---------- */
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 20px 28px;
  align-items: center;
  padding-block: 36px 20px;
}
.hero-text { min-width: 0; }
h1 {
  font-size: clamp(29px, 6.6vw, 46px);
  line-height: 1.18;
  font-weight: 600;
  margin: 0 0 16px;
  color: var(--ink);
  text-wrap: balance;
}
.thesis { font-size: clamp(19px, 3.6vw, 22px); font-style: italic; color: var(--ink-2); margin: 0 0 8px; text-wrap: balance; }
.thesis-2 { color: var(--muted); font-size: 15px; letter-spacing: 0.16em; text-transform: uppercase; margin: 0; }
.cover {
  width: clamp(116px, 27vw, 210px);
  border-radius: 4px;
  box-shadow: 0 26px 50px -18px rgba(62, 80, 70, 0.55), 0 0 0 1px rgba(28, 45, 37, 0.06);
  animation: float 9s ease-in-out infinite;
  transition: transform 0.4s;
}
.cover:hover { transform: scale(1.04); }
@keyframes float { 0%, 100% { transform: translateY(0) rotate(1.5deg); } 50% { transform: translateY(-8px) rotate(0.5deg); } }

/* ---------- Sections ---------- */
section { padding-block: 40px; }
section + section { border-top: 1px solid var(--line); }
h2 {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: clamp(23px, 4.4vw, 28px);
  line-height: 1.25;
  font-weight: 600;
  margin: 0 0 14px;
  color: var(--ink);
  text-wrap: balance;
}
h2::before {
  content: "";
  flex: none;
  width: 22px;
  height: 11px;
  border-radius: 50%;
  background: linear-gradient(180deg, var(--stone-3), var(--stone-1));
}
p { margin: 0 0 14px; }
.lead { color: var(--muted); }

/* ---------- Crisis block: solid, framed, first ---------- */
.help {
  margin-block: 8px 8px;
  padding: 22px 22px 18px;
  border: 2px solid rgba(225, 154, 98, 0.75);
  border-radius: 14px;
  background:
    radial-gradient(120% 90% at 0% 0%, rgba(246, 211, 169, 0.45), rgba(246, 211, 169, 0) 60%),
    linear-gradient(160deg, rgba(215, 228, 221, 0.55), rgba(244, 226, 204, 0.55));
  box-shadow: 0 18px 36px -26px rgba(62, 80, 70, 0.45);
}
.help + section { border-top: 0; }
.help h2::before { background: var(--pebble); }
.help .urgent { font-weight: 700; font-size: 1.05em; }
.help ul { list-style: none; margin: 16px 0 0; padding: 0; display: grid; gap: 10px; }
.help li { padding-left: 14px; border-left: 3px solid var(--stone-3); }
.help .num { font-weight: 700; white-space: nowrap; color: var(--ink); }

/* ---------- Worksheet ---------- */
.sheet {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 20px 24px;
  align-items: center;
  padding: 20px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  backdrop-filter: blur(4px);
}
.sheet-img {
  width: clamp(104px, 24vw, 160px);
  border-radius: 3px;
  transform: rotate(-2deg);
  box-shadow: 0 16px 30px -14px rgba(62, 80, 70, 0.6);
  transition: transform 0.35s ease, box-shadow 0.35s ease;
}
.sheet a:hover .sheet-img, .sheet a:focus-visible .sheet-img { transform: rotate(0) translateY(-6px) scale(1.03); box-shadow: 0 26px 40px -16px rgba(62, 80, 70, 0.7); }
.sheet-body { min-width: 0; }
.sheet-body p { margin-bottom: 12px; }

/* ---------- Six steps: the cairn ---------- */
.steps-title { margin-top: 30px; font-size: 14px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--muted); }
.steps { list-style: none; margin: 10px 0 26px; padding: 0; display: grid; }
.step {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  gap: 14px;
  align-items: start;
  padding: 12px 8px 12px 0;
  position: relative;
  border-radius: 12px;
  transition: background 0.3s;
}
.step:hover { background: rgba(255, 255, 255, 0.4); }
.step::before {
  content: "";
  position: absolute;
  left: 31px;
  top: 0;
  bottom: 0;
  width: 1px;
  background: var(--horizon);
  opacity: 0.6;
}
.step:first-child::before { top: 30px; }
.step:last-child::before { bottom: calc(100% - 30px); }
.pebble {
  position: relative;
  z-index: 1;
  justify-self: center;
  display: grid;
  place-items: center;
  height: 34px;
  margin-top: 2px;
  border-radius: 50%;
  color: var(--ink);
  font-weight: 700;
  font-size: 16px;
  font-variant-numeric: tabular-nums;
  box-shadow: 0 6px 12px -8px rgba(28, 45, 37, 0.7);
  transition: box-shadow 0.3s;
}
.step:hover .pebble { box-shadow: 0 0 0 4px rgba(225, 154, 98, 0.25), 0 6px 12px -8px rgba(28, 45, 37, 0.7); }
.step:nth-child(1) .pebble { width: 62px; background: var(--stone-1); color: #FFF9F0; }
.step:nth-child(2) .pebble { width: 56px; background: var(--stone-2); color: #FFF9F0; }
.step:nth-child(3) .pebble { width: 50px; background: var(--stone-3); }
.step:nth-child(4) .pebble { width: 46px; background: var(--stone-4); }
.step:nth-child(5) .pebble { width: 42px; background: #E8DDC9; }
.step:nth-child(6) .pebble { width: 38px; background: var(--pebble); color: #FFF9F0; }
.step-name { font-weight: 600; font-size: 20px; line-height: 1.3; }
.step-name small { display: block; font-weight: 400; font-style: italic; font-size: 15px; color: var(--muted); }
.step-q { margin: 4px 0 0; color: var(--ink-2); font-size: 17px; }
.or { margin-top: 10px; padding-top: 10px; border-top: 1px dashed var(--line); }

/* Ease: breathe with the sun, in 4 s, out 6 s */
.breath { position: relative; width: 96px; height: 96px; margin: 18px 0 4px; display: grid; place-items: center; }
.breath::before, .breath::after { content: ""; position: absolute; inset: 0; border-radius: 50%; }
.breath::before {
  background: radial-gradient(circle, rgba(246, 211, 169, 0.95), rgba(246, 211, 169, 0.35) 60%, rgba(246, 211, 169, 0) 72%);
  animation: breathe 10s ease-in-out infinite;
}
.breath::after { border: 1px solid rgba(225, 154, 98, 0.5); animation: breathe-ring 10s ease-in-out infinite; }
.breath span { position: relative; width: 14px; height: 14px; border-radius: 50%; background: var(--pebble); box-shadow: 0 0 16px 4px rgba(225, 154, 98, 0.45); }
@keyframes breathe { 0% { transform: scale(0.45); } 40% { transform: scale(1); } 100% { transform: scale(0.45); } }
@keyframes breathe-ring { 0% { transform: scale(0.5); opacity: 0.25; } 40% { transform: scale(1.08); opacity: 0.9; } 100% { transform: scale(0.5); opacity: 0.25; } }

/* ---------- Buttons ---------- */
.buttons { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 6px; }
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 48px;
  padding: 11px 24px;
  border-radius: 999px;
  background: var(--ink);
  color: #FBF4E8;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.2s, color 0.2s, transform 0.2s, box-shadow 0.2s;
}
.btn:hover, .btn:focus-visible { background: #2C4438; color: #FFFFFF; transform: translateY(-1px); box-shadow: 0 10px 20px -12px rgba(28, 45, 37, 0.8); }
.btn.ghost { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--ink); }
.btn.ghost:hover, .btn.ghost:focus-visible { background: rgba(255, 255, 255, 0.55); color: var(--ink); }
.btn .arrow { transition: transform 0.2s; }
.btn:hover .arrow { transform: translateX(3px); }

/* ---------- Ask / write ---------- */
.feature {
  position: relative;
  overflow: hidden;
  padding: 24px;
  border-radius: 14px;
  background: radial-gradient(120% 140% at 100% 0%, rgba(246, 211, 169, 0.55), rgba(246, 211, 169, 0) 60%), var(--card);
  border: 1px solid var(--line);
}
.feature + .write { margin-top: 24px; }
.email { word-break: break-word; }

/* ---------- Share ---------- */
.share-book { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 16px 20px; align-items: center; margin-bottom: 22px; }
.share-book img { width: 88px; border-radius: 3px; box-shadow: 0 14px 24px -12px rgba(62, 80, 70, 0.7); transform: rotate(-3deg); transition: transform 0.35s; }
.share-book img:hover { transform: rotate(0) scale(1.05); }
.share-book > div { min-width: 0; }
.link-box {
  display: block;
  margin-top: 8px;
  padding: 12px 14px;
  background: var(--card-solid);
  border: 1px dashed var(--horizon);
  border-radius: 10px;
  font-size: 17px;
  word-break: break-all;
  user-select: all;
  -webkit-user-select: all;
}
.kit { list-style: none; padding: 0; margin: 4px 0 16px; display: flex; flex-wrap: wrap; gap: 8px; }
.kit li { padding: 4px 12px; border-radius: 999px; background: rgba(255, 255, 255, 0.6); border: 1px solid var(--line); font-size: 15px; color: var(--ink-2); transition: background 0.2s; }
.kit li:hover { background: var(--sun); }
.tag { color: var(--ink); font-weight: 600; background: linear-gradient(transparent 60%, rgba(225, 154, 98, 0.35) 60%); }
.sign { color: var(--muted); font-style: italic; }

/* ---------- Support: the sun is up ---------- */
.support {
  position: relative;
  overflow: hidden;
  text-align: center;
  padding: 44px 24px;
  margin-block: 40px;
  border-radius: 16px;
  border: 0;
  background: linear-gradient(180deg, rgba(255, 252, 246, 0.75), rgba(246, 211, 169, 0.55));
  box-shadow: inset 0 0 0 1px rgba(225, 154, 98, 0.3);
}
.support::before {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -160px;
  width: 320px;
  height: 320px;
  margin-left: -160px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(249, 221, 184, 0.95), rgba(246, 211, 169, 0.3) 55%, transparent 70%);
  animation: sunrise 12s ease-in-out infinite alternate;
  pointer-events: none;
}
.support > * { position: relative; }
.support + section { border-top: 0; }
.support h2 { justify-content: center; }
.support h2::before { display: none; }
.support .buttons { justify-content: center; }
.cairn { width: 78px; height: auto; margin: 0 auto 12px; }

/* ---------- About ---------- */
.about { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 18px; align-items: start; }
.about .mark { width: 48px; height: 48px; margin-top: 4px; }
.about > div { min-width: 0; }

/* ---------- Footer ---------- */
footer { position: relative; padding-block: 28px 56px; font-size: 16px; color: var(--ink-2); }
footer::before { content: ""; display: block; height: 1.5px; margin-bottom: 26px; background: linear-gradient(90deg, transparent, var(--horizon), transparent); }
footer p { margin-bottom: 8px; }

/* ---------- Language chooser (root page) ---------- */
.chooser { min-height: 80vh; display: grid; place-content: center; justify-items: center; text-align: center; gap: 18px; padding-block: 48px; }
.chooser .cairn { width: 104px; margin: 0; }
.chooser .word { font-size: 30px; letter-spacing: 0.3em; margin-right: -0.3em; color: var(--ink); }
.chooser p { margin: 0; color: var(--ink-2); }
.chooser .buttons { justify-content: center; }
.covers { display: flex; gap: 18px; justify-content: center; margin-block: 8px; }
.covers img { width: clamp(100px, 27vw, 150px); border-radius: 3px; box-shadow: 0 20px 36px -16px rgba(62, 80, 70, 0.7); transition: transform 0.35s; }
.covers img:first-child { transform: rotate(-3deg); }
.covers img:last-child { transform: rotate(3deg); }
.covers img:hover { transform: rotate(0) scale(1.05) translateY(-4px); }

/* ---------- Gentle reveal while scrolling (where supported) ---------- */
@supports (animation-timeline: view()) {
  main > section:not(.help), .step, .sheet, .feature, .share-book {
    animation: reveal linear both;
    animation-timeline: view();
    animation-range: entry 0% entry 40%;
  }
  @keyframes reveal { from { opacity: 0.3; transform: translateY(28px); } to { opacity: 1; transform: none; } }
}

@media (min-width: 720px) {
  body { font-size: 20px; }
  .sky { height: 700px; }
}
@media (max-width: 420px) {
  .sheet { grid-template-columns: 1fr; justify-items: start; }
  .sheet-img { width: 132px; }
}
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

/* Root language chooser: short page, so the dawn runs over the full screen height */
body.root-page {
  min-height: 100vh;
  background-image: linear-gradient(180deg, var(--sky-top) 0%, var(--sky) 25%, var(--cream) 55%, var(--peach-1) 82%, var(--peach-2) 100%);
}
