/* Home page. Classes use the hm- prefix. Colours come from shared tokens. */

.hm-sr { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }

/* ---------- Hero: minimal, centered, single CTA ---------- */
.hm-hero {
  position: relative; isolation: isolate; overflow: hidden;
  min-height: clamp(380px, 52vh, 520px);
  display: grid; align-items: center; text-align: center;
  border-bottom: 1px solid var(--line);
}
.hm-hero-canvas { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -2; }
.hm-hero-shade {
  position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(ellipse 70% 60% at 50% 50%, var(--bg) 0%, var(--bg) 30%, color-mix(in srgb, var(--bg) 65%, transparent) 65%, transparent 100%),
    linear-gradient(180deg, var(--bg) 0%, transparent 30%, transparent 70%, color-mix(in srgb, var(--bg) 55%, transparent) 100%);
}
.hm-hero-inner { padding-block: clamp(2.5rem, 6vw, 4.5rem); }

.hm-eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  margin: 0 0 1.25rem;
  font: 500 0.78rem var(--font-text); letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--muted);
}
.hm-eyebrow::before,
.hm-eyebrow::after {
  content: ""; display: inline-block;
  width: 24px; height: 1px; background: var(--line-strong);
}

.hm-hero h1 {
  max-width: 16ch; margin-inline: auto;
  font-weight: 500; font-size: clamp(2.6rem, 6.5vw, 5rem);
  line-height: 1.0; letter-spacing: -0.05em;
}
.hm-hero h1 span { color: var(--accent); }

.hm-sub {
  max-width: 36rem; margin: 1rem auto 0;
  font-size: clamp(0.95rem, 1.4vw, 1.08rem); line-height: 1.6; color: var(--muted);
}

.hm-actions { display: flex; align-items: center; justify-content: center; margin-top: 1.75rem; }
.hm-cta {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 0 26px; min-height: 48px;
  font: 600 0.96rem var(--font-text); letter-spacing: -0.01em;
  border-radius: 999px;
}

/* ---------- Statement + amber dot field ---------- */
.hm-statement { padding-block: clamp(4rem, 9vw, 7rem); }
.hm-big { max-width: 24ch; font: 400 clamp(2rem, 5.2vw, 3.9rem)/1.12 var(--font-display); letter-spacing: -0.045em; color: var(--muted); }
.hm-big strong { color: var(--ink); font-weight: 500; }
.hm-big em { font-style: normal; color: var(--muted); }
.hm-big { max-width: 26ch; }
.hm-squiggle { color: var(--ink); text-decoration: underline wavy var(--accent); text-decoration-thickness: 3px; text-underline-offset: 10px; }

.hm-dotfield {
  position: relative; margin-top: clamp(2.5rem, 6vw, 4rem); height: clamp(220px, 34vw, 420px);
  background: radial-gradient(circle, var(--accent) 0 3.3px, transparent 3.7px) 0 0 / 15.5px 15.5px;
  -webkit-mask-image: linear-gradient(180deg, #000 70%, transparent);
  mask-image: linear-gradient(180deg, #000 70%, transparent);
}
.hm-pill {
  position: absolute; left: var(--x); top: var(--y); transform: translate(-50%, -50%);
  padding: 5px 14px; border-radius: 999px; background: var(--surface); color: var(--ink);
  border: 1px solid var(--line-strong);
  font: 500 0.8rem var(--font-text); white-space: nowrap; box-shadow: var(--card-hover-shadow);
  animation: hm-float 6s ease-in-out infinite;
}
.hm-pill:nth-child(2) { animation-delay: -2s; }
.hm-pill:nth-child(3) { animation-delay: -4s; }
@keyframes hm-float { 50% { transform: translate(-50%, calc(-50% - 8px)); } }

/* ---------- Try the decision ---------- */
.hm-try-grid { display: grid; align-items: center; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: clamp(2rem, 6vw, 5rem); }
.hm-try h2 { margin-top: 14px; font-size: clamp(2rem, 4vw, 3rem); letter-spacing: -0.045em; }
.hm-try-copy { margin-top: 16px; color: var(--muted); max-width: 40ch; }

.hm-log { margin: 0; overflow: hidden; background: var(--card-bg); border: 1px solid var(--card-border); border-radius: var(--radius-l); }
.hm-log-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 18px 24px 14px; border-bottom: 1px solid var(--line); background: var(--surface-2); }
.hm-log-head h2 { font-size: 1.1rem; margin: 0; letter-spacing: -0.02em; }
.hm-log-head span { font: 400 0.82rem var(--font-text); color: var(--muted); }
.hm-rows { margin: 0; padding: 4px 24px 0; }
.hm-row { display: grid; grid-template-columns: 7.5rem minmax(0, 1fr); gap: 16px; padding: 13px 0; border-bottom: 1px dashed var(--line-strong); }
.hm-row dt { font: 400 0.85rem/1.5 var(--font-text); color: var(--muted); }
.hm-row dd { margin: 0; line-height: 1.45; color: var(--ink-soft); }
.hm-row mark { background: linear-gradient(transparent 58%, var(--mark) 58% 92%, transparent 92%); color: var(--ink); padding: 0 2px; }
.hm-verdict { min-inline-size: 0; margin: 0; border: 0; padding: 18px 24px 8px; }
.hm-verdict legend { padding: 0; margin-bottom: 10px; font: 400 0.85rem var(--font-text); color: var(--muted); }
.hm-options { display: grid; grid-template-columns: repeat(3, 1fr); overflow: hidden; border: 1px solid var(--line-strong); border-radius: 12px; }
.hm-options label { display: grid; place-items: center; min-height: 42px; cursor: pointer; font: 500 0.9rem var(--font-text); border-right: 1px solid var(--line-strong); color: var(--ink-soft); transition: background-color 0.15s, color 0.15s; }
.hm-options label:last-child { border-right: 0; }
.hm-options label:hover { background: var(--surface-2); }
#hm-continue:checked ~ .hm-options label[for="hm-continue"] { background: var(--olive-bg); color: var(--olive); }
#hm-revise:checked ~ .hm-options label[for="hm-revise"] { background: var(--amber-bg); color: var(--amber); }
#hm-stop:checked ~ .hm-options label[for="hm-stop"] { background: var(--fig-bg); color: var(--fig); }
#hm-continue:focus-visible ~ .hm-options label[for="hm-continue"],
#hm-revise:focus-visible ~ .hm-options label[for="hm-revise"],
#hm-stop:focus-visible ~ .hm-options label[for="hm-stop"] { outline: 2px solid var(--accent); outline-offset: -2px; }
.hm-result { margin-top: 14px; min-height: 6.6em; color: var(--ink-soft); }
.hm-result > div { display: none; padding-left: 12px; border-left: 3px solid var(--accent); line-height: 1.55; }
.hm-result .r-continue { border-color: var(--olive-line); }
.hm-result .r-revise { border-color: var(--amber-line); }
.hm-result .r-stop { border-color: var(--fig-line); }
#hm-continue:checked ~ .hm-result .r-continue,
#hm-revise:checked ~ .hm-result .r-revise,
#hm-stop:checked ~ .hm-result .r-stop { display: block; animation: hm-swap 0.25s ease; }
@keyframes hm-swap { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
.hm-source { margin: 0; padding: 4px 24px 20px; font-size: 0.88rem; color: var(--muted); }
.hm-source a { color: var(--ink); font-weight: 600; text-underline-offset: 3px; }

/* ---------- Sections ---------- */
.hm-section { padding-block: clamp(2.25rem, 4.5vw, 3.75rem); }
.hm-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px 24px; margin-bottom: 1.5rem; }
.hm-head h2 { font-size: clamp(1.7rem, 3.2vw, 2.4rem); letter-spacing: -0.045em; }
.hm-head p { max-width: 40rem; margin-top: 6px; color: var(--muted); font-size: 0.96rem; }
.hm-head-links { display: flex; flex-wrap: wrap; gap: 8px 22px; }

/* Journal lead: cover left, copy right */
.hm-lead {
  position: relative; display: grid; grid-template-columns: minmax(0, 1fr); overflow: hidden;
  background: var(--panel); border: 1px solid var(--card-border); border-radius: var(--radius-l);
  margin-bottom: clamp(14px, 2vw, 22px); box-shadow: var(--card-shadow);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.hm-lead.has-cover { grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); }
.hm-lead:hover { border-color: var(--tc-line, var(--card-hover-border)); box-shadow: var(--card-hover-shadow); }
.hm-lead-media { display: block; min-height: 340px; overflow: hidden; background: var(--surface-2); border-right: 1px solid var(--line); }
.hm-lead-media img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform 0.7s cubic-bezier(0.2, 0.7, 0.2, 1); }
.hm-lead:hover .hm-lead-media img { transform: scale(1.04); }
.hm-lead-copy { display: flex; flex-direction: column; justify-content: center; gap: 10px; padding: clamp(18px, 3vw, 32px); }
.hm-lead-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; font: 400 0.82rem/1.4 var(--font-text); color: var(--muted); }
.hm-lead .chip { position: relative; z-index: 1; text-decoration: none; }
.hm-lead h3 { max-width: 24ch; font-size: clamp(1.5rem, 2.8vw, 2.2rem); line-height: 1.12; letter-spacing: -0.045em; }
.hm-lead h3 a { text-decoration: none; }
.hm-lead h3 a::after { content: ""; position: absolute; inset: 0; z-index: 0; }
.hm-lead:hover h3 a { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 6px; text-decoration-color: var(--tc-line, var(--accent)); }
.hm-lead p { max-width: 44rem; font-size: 0.95rem; line-height: 1.5; color: var(--muted); }

/* Topics */
.hm-topics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.hm-topic { display: flex; flex-direction: column; gap: 8px; min-height: 190px; padding: 20px; background: linear-gradient(180deg, var(--tc-bg, transparent) 0%, transparent 62%), var(--card-bg); border: 1px solid var(--card-border); border-radius: var(--radius-l); text-decoration: none; transition: transform 0.16s, border-color 0.16s, box-shadow 0.16s; position: relative; overflow: hidden; }
.hm-topic::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 3px; background: var(--tc-line, var(--accent)); opacity: 0.9; }
.hm-topic:hover { transform: translateY(-3px); border-color: var(--tc-line, var(--accent)); box-shadow: var(--card-hover-shadow); }
.hm-topic h3 { font-size: 1.3rem; color: var(--tc, var(--ink)); letter-spacing: -0.035em; }
.hm-topic p { color: var(--muted); font-size: 0.92rem; }
.hm-topic .count { margin-top: auto; display: inline-flex; align-self: flex-start; padding: 4px 10px; background: var(--tc-bg, var(--surface-3)); border-radius: 8px; font: 500 0.76rem var(--font-text); color: var(--tc, var(--muted)); }

/* Principles */
.hm-principles { border-block: 1px solid var(--line); }
.hm-principles-grid { display: grid; align-items: start; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: clamp(1.75rem, 5vw, 4rem); }
.hm-principles h2 { max-width: 14ch; font-size: clamp(1.85rem, 3.5vw, 2.6rem); letter-spacing: -0.045em; }
.hm-principles .text-link { display: inline-block; margin-top: 1rem; color: var(--accent-text); }
.hm-rules { margin: 0; }
.hm-rule { padding: 14px 0; border-top: 1px solid var(--line-strong); }
.hm-rule:last-child { border-bottom: 1px solid var(--line-strong); }
.hm-rule dt { font: 500 1.15rem var(--font-display); letter-spacing: -0.03em; }
.hm-rule dd { margin: 4px 0 0; color: var(--muted); font-size: 0.94rem; }

/* Responsive */
@media (max-width: 960px) {
  .hm-lead.has-cover { grid-template-columns: minmax(0, 1fr); }
  .hm-lead-media { min-height: 0; aspect-ratio: 1200 / 630; border-right: 0; border-bottom: 1px solid var(--line); }
  .hm-try-grid, .hm-principles-grid { grid-template-columns: minmax(0, 1fr); gap: 1.5rem; }
  .hm-topics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 700px) {
  .hm-hero { min-height: auto !important; }
  .hm-hero-inner { padding-block: 2rem 1.75rem !important; }
  .hm-eyebrow { font-size: 0.72rem !important; margin-bottom: 1rem !important; }
  .hm-hero h1 { font-size: clamp(1.95rem, 8vw, 2.8rem) !important; line-height: 1.05 !important; }
  .hm-sub { margin-top: 0.85rem !important; font-size: 0.9rem !important; }
  .hm-actions { margin-top: 1.5rem !important; }
  .hm-cta { min-height: 44px !important; font-size: 0.9rem !important; padding-inline: 20px !important; }
  .hm-statement { padding-block: 2rem 1.75rem !important; }
  .hm-dotfield { height: 160px !important; margin-top: 1.5rem !important; }
  .hm-section { padding-block: 1.75rem 1.25rem !important; }
  .hm-head { margin-bottom: 1rem !important; }
  .hm-lead, .hm-lead.has-cover { grid-template-columns: minmax(0, 1fr) !important; border-radius: 16px !important; }
  .hm-lead-media { min-height: 0 !important; aspect-ratio: 1200 / 630; border-right: 0; border-bottom: 1px solid var(--line); }
  .hm-lead-copy { gap: 10px !important; padding: 16px !important; }
  .hm-lead h3 { font-size: 1.35rem !important; }
  .hm-lead p { font-size: 0.92rem !important; }
  .hm-log-head { padding: 12px 16px 10px !important; }
  .hm-rows { padding: 2px 16px 0 !important; }
  .hm-row { grid-template-columns: minmax(0, 1fr) !important; gap: 2px !important; padding: 8px 0 !important; }
  .hm-verdict { padding: 12px 16px 6px !important; }
  .hm-options label { min-height: 38px !important; font-size: 0.85rem !important; }
  .hm-result { min-height: 5em !important; margin-top: 10px !important; font-size: 0.92rem !important; }
  .hm-source { padding: 2px 16px 14px !important; }
  .hm-topics { grid-template-columns: minmax(0, 1fr) !important; gap: 8px !important; }
  .hm-topic { min-height: 0 !important; padding: 14px 16px !important; border-radius: 12px !important; }
  .hm-topic h3 { font-size: 1.15rem !important; }
  .hm-topic p { font-size: 0.88rem !important; }
  .hm-rule { padding: 10px 0 !important; }
}
@media (prefers-reduced-motion: reduce) {
  .hm-result > div, .hm-pill { animation: none !important; }
  .hm-options label, .hm-topic { transition: none; }
}
