/* ================= Rethought — rethought.to ================= */

:root {
  --paper: #FAF7F2;
  --paper-tint: #F3EEE5;
  --ink: #191714;
  --ink-soft: #45403A;
  --muted: #6B6459;
  --line: #E5DFD4;
  --line-strong: #CFC7B8;
  --green: #165744;
  --green-deep: #0E3D30;
  --green-soft: #E7EFEA;
  --amber: #C97B2D;
  --radius: 12px;
  --container: 1120px;
  --font-display: "Fraunces", Georgia, serif;
  --font-text: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-text);
  background: var(--paper);
  color: var(--ink);
  line-height: 1.6;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
::selection { background: var(--green); color: var(--paper); }

.container { max-width: var(--container); margin: 0 auto; padding: 0 28px; }

h1, h2, h3 { font-family: var(--font-display); font-weight: 500; line-height: 1.12; letter-spacing: -0.01em; }
h1 em, h2 em { font-style: italic; color: var(--green); }

/* ---------- Nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.nav-inner { display: flex; align-items: center; gap: 36px; height: 68px; }
.wordmark {
  font-family: var(--font-display); font-weight: 600; font-size: 1.35rem;
  color: var(--ink); text-decoration: none; letter-spacing: -0.01em;
}
.wordmark span { color: var(--green); }
.nav-links { display: flex; gap: 26px; margin-left: auto; }
.nav-links a {
  color: var(--ink-soft); text-decoration: none; font-size: 0.92rem; font-weight: 500;
}
.nav-links a:hover { color: var(--ink); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-block; text-decoration: none; font-weight: 600; font-size: 0.95rem;
  padding: 13px 26px; border-radius: 999px; transition: all .18s ease;
  border: 1.5px solid transparent;
}
.btn-solid { background: var(--green); color: #fff; }
.btn-solid:hover { background: var(--green-deep); transform: translateY(-1px); }
.btn-ghost { color: var(--ink); border-color: var(--line-strong); }
.btn-ghost:hover { border-color: var(--ink); }
.btn-lg { padding: 16px 34px; font-size: 1.02rem; }
.nav-cta { padding: 10px 20px; font-size: 0.88rem; }

/* ---------- Hero ---------- */
.hero { padding: 96px 0 40px; position: relative; overflow: hidden; }
.hero::before {
  content: ""; position: absolute; inset: 0;
  background-image: radial-gradient(var(--line) 1px, transparent 1px);
  background-size: 26px 26px;
  mask-image: linear-gradient(to bottom, rgba(0,0,0,.5), transparent 55%);
  -webkit-mask-image: linear-gradient(to bottom, rgba(0,0,0,.5), transparent 55%);
  pointer-events: none;
}
.eyebrow {
  font-size: 0.78rem; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--green); margin-bottom: 22px;
}
.hero h1 {
  font-size: clamp(2.6rem, 5.4vw, 4.3rem);
  max-width: 19ch; margin-bottom: 26px;
}

/* Rotating headline: statements stacked in one grid cell; tallest sets the height.
   Outgoing line fades out quickly; incoming line eases in after it, slightly risen. */
.rotator { display: grid; }
.rotator > span {
  grid-area: 1 / 1; opacity: 0; transform: translateY(14px);
  transition: opacity .4s ease, transform .4s ease;
  pointer-events: none; will-change: opacity, transform;
}
.rotator > span.on {
  opacity: 1; transform: none; pointer-events: auto;
  transition: opacity .9s cubic-bezier(.22,.61,.36,1) .38s,
              transform .9s cubic-bezier(.22,.61,.36,1) .38s;
}
.lede { font-size: 1.22rem; color: var(--muted); max-width: 56ch; margin-bottom: 36px; }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; align-items: center; }
.hero-actions.center { justify-content: center; }

.proof-strip {
  display: flex; gap: 34px; flex-wrap: wrap; list-style: none;
  margin-top: 46px; padding-top: 26px; border-top: 1px solid var(--line);
}
.proof-strip li {
  font-size: 0.88rem; color: var(--muted); font-weight: 500;
  display: flex; align-items: center; gap: 9px;
}
.proof-strip li::before {
  content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--green); flex: none;
}

/* ---------- Flow figure ---------- */
.flow { margin-top: 56px; padding-bottom: 8px; }
.flow svg { width: 100%; height: auto; display: block; }
.tangle path { stroke-dasharray: 6 5; opacity: .8; }
.tangle-nodes rect { fill: #fff; stroke: var(--line-strong); stroke-width: 1.5; }
.tangle-nodes .err { fill: var(--amber); opacity: .85; }
.flow-label {
  font-family: var(--font-text); font-size: 13px; font-weight: 500;
  fill: var(--muted); letter-spacing: .04em;
}
.flow-mid rect { fill: var(--green); }
.flow-mid text {
  font-family: var(--font-display); font-weight: 600; font-size: 21px; fill: #fff;
}
.flow-mid .dot { fill: #A8D5C2; }
.flow-arrow { stroke: var(--line-strong); stroke-width: 1.5; marker-end: none; }
.clean-line { stroke: var(--green); stroke-width: 2; }
.clean-nodes rect { fill: var(--green-soft); stroke: var(--green); stroke-width: 1.5; }
.ticks path { stroke: var(--green); }

/* ---------- Sections ---------- */
.section { padding: 104px 0; }
.section h2 { font-size: clamp(1.9rem, 3.4vw, 2.7rem); max-width: 24ch; margin-bottom: 54px; }
.section-tint { background: var(--paper-tint); }

/* ---------- Problem cards ---------- */
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 30px 26px; transition: transform .18s ease, box-shadow .18s ease;
}
.card:hover { transform: translateY(-3px); box-shadow: 0 10px 28px rgba(25,23,20,.06); }
.card h3 { font-size: 1.22rem; margin-bottom: 12px; }
.card p { font-size: 0.94rem; color: var(--muted); }

/* ---------- Services ---------- */
.services { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.service {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 38px 32px;
}
.service-num {
  font-family: var(--font-display); font-style: italic; font-size: 1rem; color: var(--green);
  display: block; margin-bottom: 18px;
}
.service h3 { font-size: 1.45rem; margin-bottom: 6px; }
.service-tag { font-size: 0.82rem; font-weight: 600; color: var(--green); margin-bottom: 16px; }
.service > p:not(.service-tag) { font-size: 0.95rem; color: var(--ink-soft); margin-bottom: 20px; }
.service ul { list-style: none; }
.service li {
  font-size: 0.9rem; color: var(--muted); padding: 9px 0 9px 24px; position: relative;
  border-top: 1px solid var(--line);
}
.service li::before { content: "→"; position: absolute; left: 0; color: var(--green); }

/* ---------- AI transformation ---------- */
.section-green { background: var(--green-soft); }
.section-green h2 { margin-bottom: 18px; }
.section-intro { color: var(--muted); font-size: 1.08rem; max-width: 58ch; margin-bottom: 46px; }
.ai-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.ai-card {
  background: #fff; border: 1px solid #CBDED4;
  border-radius: var(--radius); padding: 32px 30px;
}
.ai-card h3 { font-size: 1.3rem; margin-bottom: 10px; color: var(--green-deep); }
.ai-card p { font-size: 0.94rem; color: var(--ink-soft); }
.ai-note { margin-top: 32px; font-size: 0.92rem; color: var(--muted); font-weight: 500; }

/* ---------- Statement band ---------- */
.band { padding: 118px 0; text-align: center; }
.band-line {
  font-family: var(--font-display); font-weight: 500; line-height: 1.15;
  font-size: clamp(2rem, 4vw, 3.2rem);
}
.band-line em { font-style: italic; color: var(--green); }
.band-sub { max-width: 58ch; margin: 22px auto 0; color: var(--muted); font-size: 1.1rem; }

/* ---------- Steps ---------- */
.steps { list-style: none; display: grid; grid-template-columns: repeat(4, 1fr); gap: 34px; }
.steps li { border-top: 2px solid var(--line-strong); padding-top: 22px; }
.step-num {
  font-family: var(--font-display); font-style: italic; font-size: 2.4rem; color: var(--green);
  display: block; margin-bottom: 14px; line-height: 1;
}
.steps h3 { font-size: 1.3rem; margin-bottom: 10px; }
.steps p { font-size: 0.92rem; color: var(--muted); }

/* ---------- Industries ---------- */
.industries { display: grid; grid-template-columns: 1fr 1fr; gap: 0 60px; }
.industry { padding: 30px 0; border-top: 1px solid var(--line); }
.industry h3 { font-size: 1.4rem; margin-bottom: 6px; }
.industry p { color: var(--muted); font-size: 0.95rem; }
.industry .wins { margin-top: 10px; font-size: 0.84rem; color: var(--green); font-weight: 500; }

/* ---------- Case ---------- */
.case {
  background: var(--green-soft); border: 1px solid #CBDED4; border-radius: 18px;
  padding: 60px 64px; max-width: 880px; margin: 0 auto;
}
.case blockquote p {
  font-family: var(--font-display); font-size: clamp(1.35rem, 2.4vw, 1.8rem);
  line-height: 1.4; color: var(--green-deep); font-weight: 500;
}
.case-note { margin-top: 22px; font-size: 0.92rem; color: var(--muted); }

/* ---------- About ---------- */
.about-grid { display: grid; grid-template-columns: 1.5fr 1fr; gap: 70px; align-items: start; }
.about p:not(.eyebrow) { font-size: 1.12rem; color: var(--ink-soft); max-width: 62ch; }
.about h2 { margin-bottom: 20px; }
.facts { border-left: 1px solid var(--line); padding-left: 44px; display: grid; gap: 24px; margin-top: 10px; }
.fact strong {
  display: block; font-size: 0.75rem; font-weight: 600; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--green); margin-bottom: 3px;
}
.fact span { color: var(--ink-soft); font-size: 0.98rem; }
h2 .nw { white-space: nowrap; }

/* ---------- CTA ---------- */
.cta { text-align: center; padding: 130px 0; }
.cta h2 { margin: 0 auto 18px; }
.cta p { color: var(--muted); font-size: 1.1rem; margin-bottom: 36px; }

/* ---------- Footer ---------- */
.footer { border-top: 1px solid var(--line); padding: 40px 0; }
.footer-inner { display: flex; align-items: center; gap: 24px; flex-wrap: wrap; }
.footer-inner p { font-size: 0.86rem; color: var(--muted); }
.footer-inner p:last-child { margin-left: auto; }

/* ---------- Load-in animation (hero only; sections are always visible) ---------- */
@keyframes rise { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
.hero .reveal { animation: rise .7s ease both; }
.hero .d1 { animation-delay: .08s; } .hero .d2 { animation-delay: .16s; }
.hero .d3 { animation-delay: .24s; } .hero .d4 { animation-delay: .32s; }
.hero .d5 { animation-delay: .4s; }
h1 em { white-space: nowrap; }
@media (prefers-reduced-motion: reduce) {
  .hero .reveal { animation: none; }
  html { scroll-behavior: auto; }
}

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  .grid-4 { grid-template-columns: 1fr 1fr; }
  .services { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 720px) {
  .nav-links { display: none; }
  .about-grid { grid-template-columns: 1fr; gap: 40px; }
  .facts { border-left: none; border-top: 1px solid var(--line); padding-left: 0; padding-top: 28px; }
  .ai-grid { grid-template-columns: 1fr; }
  .band { padding: 80px 0; }
  .hero { padding-top: 64px; }
  .grid-4 { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; gap: 40px; }
  .industries { grid-template-columns: 1fr; }
  .case { padding: 40px 28px; }
  .section { padding: 72px 0; }
  .flow { display: none; }
}
