/* ————————————————————————————————————————————————
   HortPost — «Swiss poster warmth»
   Warm paper, deep pine, one coral accent.
   Fraunces (display) + Karla (body).
   ———————————————————————————————————————————————— */

:root {
  --paper: #faf5ec;
  --paper-deep: #f2ead9;
  --ink: #1c2420;
  --pine: #16443a;
  --pine-deep: #0d2f28;
  --pine-soft: #e3ece6;
  --coral: #ff6748;
  --coral-deep: #e04a2c;
  --line: #ddd3bf;
  --line-strong: #c9bda3;
  --muted: #6d6a5e;
  --paper-on-pine: #f6efdf;
  --radius-l: 26px;
  --radius-m: 14px;
  --font-display: 'Fraunces', Georgia, serif;
  --font-body: 'Karla', 'Helvetica Neue', sans-serif;
  --gutter: clamp(20px, 5vw, 56px);
  --measure: 62ch;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.08;
  margin: 0 0 0.45em;
  letter-spacing: -0.01em;
}

a { color: var(--pine); text-underline-offset: 3px; }
.muted { color: var(--muted); }

::selection { background: var(--coral); color: var(--paper); }

/* ——— top nav ——— */

.top {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px var(--gutter);
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.wordmark,
.wordmark-foot {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 1.35rem;
  text-decoration: none;
  color: var(--ink);
  letter-spacing: -0.02em;
}
.wordmark em, .wordmark-foot em {
  font-style: italic;
  color: var(--coral);
}

/* ——— buttons ——— */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 1rem;
  padding: 13px 26px;
  border-radius: 999px;
  border: 2px solid transparent;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.16s ease, background 0.16s ease, color 0.16s ease, border-color 0.16s ease;
}
.btn:active { transform: scale(0.97); }

.btn-coral {
  background: var(--coral);
  color: #fff;
}
.btn-coral:hover { background: var(--coral-deep); }

.btn-ghost {
  color: var(--paper-on-pine);
  border-color: color-mix(in srgb, var(--paper-on-pine) 45%, transparent);
}
.btn-ghost:hover { border-color: var(--paper-on-pine); }

.btn-outline {
  color: var(--pine);
  border-color: var(--pine);
  background: transparent;
}
.btn-outline:hover { background: var(--pine); color: var(--paper-on-pine); }

.btn-small { padding: 9px 20px; font-size: 0.92rem; background: var(--ink); color: var(--paper); }
.btn-small:hover { background: var(--pine); }

.btn-big { padding: 16px 32px; font-size: 1.08rem; }

.btn-arrow { width: 1.15em; height: 1.15em; }

.btn:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 3px solid var(--coral);
  outline-offset: 2px;
}

/* ——— hero ——— */

.hero {
  background: var(--pine);
  color: var(--paper-on-pine);
  margin: 0 clamp(8px, 1.5vw, 18px);
  border-radius: var(--radius-l);
  overflow: hidden;
  position: relative;
}
/* subtle grain so the pine block reads as printed, not flat */
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.35;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.04 0'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)'/%3E%3C/svg%3E");
}

.hero-inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
  gap: clamp(24px, 5vw, 72px);
  align-items: center;
  padding: clamp(56px, 9vw, 110px) var(--gutter) clamp(40px, 6vw, 80px);
  max-width: 1180px;
  margin: 0 auto;
}

.kicker {
  font-size: 0.88rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: color-mix(in srgb, var(--paper-on-pine) 70%, transparent);
  margin: 0 0 18px;
}

.hero h1 {
  font-size: clamp(2.9rem, 7.2vw, 5.4rem);
  font-weight: 900;
  line-height: 0.98;
  margin-bottom: 26px;
}
.hero h1 .line { display: block; }
.hero h1 em {
  font-style: italic;
  font-weight: 600;
  color: var(--coral);
}
/* hand-set underline stroke under the key word */
.und {
  position: relative;
  white-space: nowrap;
}
.und::after {
  content: "";
  position: absolute;
  left: 0.02em;
  right: 0.08em;
  bottom: 0.02em;
  height: 0.09em;
  background: var(--coral);
  border-radius: 999px;
  transform: rotate(-1.2deg);
  transform-origin: left center;
}

.lead {
  max-width: 46ch;
  font-size: 1.13rem;
  color: color-mix(in srgb, var(--paper-on-pine) 88%, transparent);
  margin: 0 0 32px;
}

.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; }

/* entrance: one sequence, then done */
.hero-copy > * {
  animation: rise 0.7s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}
.hero-copy > :nth-child(2) { animation-delay: 0.08s; }
.hero-copy > :nth-child(3) { animation-delay: 0.16s; }
.hero-copy > :nth-child(4) { animation-delay: 0.24s; }

@keyframes rise {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: none; }
}

/* ——— fan-out diagram (the anchor) ——— */

.fanout {
  margin: 0;
  justify-self: end;
  width: min(100%, 340px);
}
.fanout svg { width: 100%; height: auto; display: block; }

.fo-envelope rect,
.fo-envelope path,
.fo-node circle,
.fo-node line,
.fo-wire {
  stroke: var(--paper-on-pine);
  stroke-width: 2.5;
  stroke-linecap: round;
  fill: none;
}
.fo-envelope rect { fill: color-mix(in srgb, var(--paper-on-pine) 12%, transparent); }
.fo-wire { stroke: color-mix(in srgb, var(--paper-on-pine) 60%, transparent); stroke-dasharray: 5 7; }

.fo-wire {
  stroke-dashoffset: 240;
  animation: wire 1.1s ease-out forwards;
}
.w1 { animation-delay: 0.35s; }
.w2 { animation-delay: 0.5s; }
.w3 { animation-delay: 0.65s; }
.w4 { animation-delay: 0.8s; }
.w5 { animation-delay: 0.95s; }

@keyframes wire { to { stroke-dashoffset: 0; } }

.fo-node { opacity: 0; animation: pop 0.45s ease-out forwards; }
.n1 { animation-delay: 0.9s; }
.n2 { animation-delay: 1.05s; }
.n3 { animation-delay: 1.2s; }
.n4 { animation-delay: 1.35s; }
.n5 { animation-delay: 1.5s; }

@keyframes pop {
  from { opacity: 0; transform: translateX(-8px); }
  to   { opacity: 1; transform: none; }
}

.fanout-caption {
  margin-top: 14px;
  text-align: right;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: color-mix(in srgb, var(--paper-on-pine) 65%, transparent);
}

/* ——— ticker strip ——— */

.ticker {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px 18px;
  padding: 18px var(--gutter);
  border-top: 1px solid color-mix(in srgb, var(--paper-on-pine) 25%, transparent);
  background: var(--pine-deep);
  font-family: var(--font-display);
  font-size: clamp(1rem, 2.2vw, 1.3rem);
  font-weight: 600;
  color: var(--paper-on-pine);
}
.ticker b { color: var(--coral); font-weight: 900; }
.ticker .dot { color: color-mix(in srgb, var(--paper-on-pine) 40%, transparent); }

/* ——— sections ——— */

main { max-width: 1180px; margin: 0 auto; padding: 0 var(--gutter); }

main section { padding: clamp(64px, 9vw, 120px) 0; }

h2 {
  font-size: clamp(1.9rem, 4vw, 2.7rem);
  display: flex;
  align-items: baseline;
  gap: 16px;
}
.h2-num {
  font-size: 0.5em;
  font-weight: 600;
  font-style: italic;
  color: var(--coral);
  border: 1.5px solid var(--line-strong);
  border-radius: 999px;
  width: 2.1em;
  height: 2.1em;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  transform: translateY(-0.2em);
}

/* ——— how: editorial numbered rows ——— */

.steps {
  list-style: none;
  margin: 40px 0 0;
  padding: 0;
}

.step {
  display: grid;
  grid-template-columns: minmax(90px, 160px) 1fr;
  gap: clamp(16px, 4vw, 48px);
  padding: 34px 0;
  border-top: 1px solid var(--line);
  align-items: start;
}
.step:last-child { border-bottom: 1px solid var(--line); }

.step-num {
  font-family: var(--font-display);
  font-size: clamp(2.6rem, 6vw, 4.2rem);
  font-weight: 900;
  font-style: italic;
  line-height: 1;
  color: var(--paper-deep);
  -webkit-text-stroke: 1.5px var(--pine);
  paint-order: stroke;
}

.step h3 { font-size: 1.45rem; margin-bottom: 6px; }
.step p { margin: 0; max-width: var(--measure); color: var(--muted); }

/* ——— team ——— */

.team-head { max-width: var(--measure); }
.team-head p { margin-top: 4px; }

.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 14px;
  margin-top: 36px;
}

.team-chip {
  display: flex;
  align-items: center;
  gap: 14px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-m);
  padding: 16px 18px;
  transition: transform 0.16s ease, border-color 0.16s ease;
}
.team-chip:hover {
  transform: translateY(-2px);
  border-color: var(--line-strong);
}

.team-avatar {
  flex: none;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1.5px solid var(--pine);
  background: var(--pine-soft);
  color: var(--pine);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.1rem;
}

.team-chip .name {
  display: block;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.08rem;
  line-height: 1.2;
}
.team-chip .role {
  display: block;
  color: var(--muted);
  font-size: 0.86rem;
  margin-top: 2px;
}

/* ——— form ——— */

.form-frame {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-l);
  padding: clamp(28px, 5vw, 56px);
  box-shadow: 0 24px 60px -30px rgba(28, 36, 32, 0.25);
}

.form-head { margin-bottom: 28px; }
.form-head p { margin: 2px 0 0; }

.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

.field { margin-bottom: 20px; }

.field label {
  display: block;
  font-weight: 700;
  font-size: 0.95rem;
  margin-bottom: 7px;
}
.field .optional {
  font-weight: 400;
  color: var(--muted);
  font-size: 0.82rem;
  margin-left: 4px;
}

.field input,
.field textarea {
  width: 100%;
  padding: 14px 16px;
  border-radius: var(--radius-m);
  border: 1.5px solid var(--line-strong);
  background: var(--paper);
  font-family: var(--font-body);
  font-size: 1.02rem;
  color: var(--ink);
  transition: border-color 0.15s ease, background 0.15s ease;
}
.field textarea { resize: vertical; min-height: 130px; }

.field input:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--pine);
  background: #fff;
}

.field.hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.form-foot {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
  margin-top: 6px;
}

.form-status {
  margin: 0;
  font-weight: 700;
  min-height: 1.2em;
}
.form-status.ok { color: var(--pine); }
.form-status.err { color: var(--coral-deep); }

/* ——— report ——— */

.report {
  padding: 0 0 clamp(64px, 9vw, 120px) !important;
}
.report-inner {
  background: var(--paper-deep);
  border: 1px solid var(--line);
  border-radius: var(--radius-l);
  padding: clamp(40px, 6vw, 72px);
  text-align: center;
}
.report h2 { justify-content: center; font-style: italic; font-weight: 600; }
.report p { max-width: 52ch; margin: 0 auto 28px; color: var(--muted); }

/* ——— footer ——— */

footer {
  border-top: 1px solid var(--line);
  padding: 44px var(--gutter) 64px;
  text-align: center;
  color: var(--muted);
  font-size: 0.88rem;
}
footer p { max-width: 60ch; margin: 0 auto; }
.wordmark-foot { margin-bottom: 10px !important; }

/* ——— responsive ——— */

@media (max-width: 860px) {
  .hero-inner { grid-template-columns: 1fr; }
  .fanout { justify-self: center; width: min(80%, 300px); margin-top: 8px; }
  .fanout-caption { text-align: center; }
  .field-row { grid-template-columns: 1fr; gap: 0; }
}

@media (max-width: 560px) {
  .step { grid-template-columns: 1fr; gap: 6px; padding: 28px 0; }
  .hero-actions .btn { width: 100%; justify-content: center; }
  .form-foot { align-items: stretch; flex-direction: column; }
  .form-foot .btn { justify-content: center; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero-copy > *, .fo-wire, .fo-node { animation: none; opacity: 1; stroke-dashoffset: 0; }
  .btn, .team-chip { transition: none; }
}
