:root {
  --bg: #f7f3ec;
  --bg-elevated: #fdfbf6;
  --ink: #2a1f1a;
  --ink-muted: #6b5d54;
  --ink-subtle: #9a8e83;
  --accent: #c2573f;
  --accent-soft: #f2d9cb;
  --accent-2: #5c4a2e;
  --border: #e8e0d3;
  --border-strong: #d0c5b3;

  --error: #a34231;
  --success: #5c7a4e;

  --font-display: "Fraunces", Georgia, "Times New Roman", serif;
  --font-body: "Instrument Sans", ui-sans-serif, system-ui, -apple-system,
    "Segoe UI", sans-serif;

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
  overflow-x: hidden;
}

/* ---------- Skip link ---------- */

.skip {
  position: absolute;
  left: -9999px;
  top: 12px;
  z-index: 1000;
  background: var(--ink);
  color: var(--bg-elevated);
  padding: 10px 16px;
  border-radius: 999px;
  font-size: 14px;
  text-decoration: none;
  font-family: var(--font-body);
  font-weight: 500;
}
.skip:focus {
  left: 20px;
}

/* ---------- Focus rings ---------- */

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible,
summary:focus-visible,
.pill input:focus-visible + .pill__label {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 6px;
}

.pill input:focus-visible + .pill__label {
  outline-offset: 3px;
}

/* ---------- Grain ---------- */

.grain {
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: 999;
  opacity: 0.035;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='240' height='240'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
}

/* ---------- Nav ---------- */

.nav {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 28px clamp(20px, 5vw, 56px);
  max-width: 1240px;
  margin: 0 auto;
}

.nav__brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  text-decoration: none;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 18px;
  letter-spacing: -0.01em;
}

.nav__mark {
  display: inline-block;
  width: 14px;
  height: 14px;
  border-radius: 3px;
  background: var(--accent);
  box-shadow: 2px 2px 0 0 var(--ink);
}

.nav__links {
  display: flex;
  gap: 28px;
}

.nav__links a {
  color: var(--ink-muted);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: color 0.2s ease;
}

.nav__links a:hover {
  color: var(--ink);
}

@media (max-width: 480px) {
  .nav__links {
    gap: 18px;
  }
  .nav__links a {
    font-size: 13px;
  }
}

/* ---------- Hero ---------- */

.hero {
  position: relative;
  padding: clamp(32px, 6vw, 72px) clamp(20px, 5vw, 56px)
    clamp(64px, 10vw, 120px);
  max-width: 1240px;
  margin: 0 auto;
}

.hero__inner {
  position: relative;
  z-index: 2;
  padding-top: clamp(16px, 4vw, 48px);
  display: grid;
  gap: clamp(32px, 5vw, 56px);
  grid-template-columns: 1fr;
  align-items: center;
}

@media (min-width: 900px) {
  .hero__inner {
    grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
    gap: clamp(40px, 6vw, 72px);
  }
}

.hero__text {
  max-width: 640px;
  order: 1;
}

/* ---------- Headline ---------- */

.hero__headline {
  margin: 0 0 clamp(22px, 3vw, 32px);
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(48px, 7.4vw, 104px);
  line-height: 1.02;
  letter-spacing: -0.025em;
  color: var(--ink);
}

.hero__headline-accent {
  color: var(--accent);
  font-style: italic;
  font-weight: 500;
}

/* ---------- Sub + CTAs ---------- */

.hero__sub {
  margin: 0 0 clamp(28px, 4vw, 36px);
  max-width: 680px;
  font-size: clamp(18px, 1.55vw, 22px);
  line-height: 1.55;
  color: var(--ink-muted);
}

.hero__ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 20px;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 13px 20px;
  border-radius: 999px;
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 500;
  letter-spacing: -0.005em;
  text-decoration: none;
  cursor: pointer;
  border: 1px solid transparent;
  transition: transform 0.18s ease, box-shadow 0.18s ease,
    background 0.18s ease, border-color 0.18s ease, color 0.18s ease;
}

.btn--primary {
  background: var(--accent);
  color: var(--bg-elevated);
  box-shadow: 0 1px 0 0 rgba(42, 31, 26, 0.08),
    0 8px 24px -8px rgba(194, 87, 63, 0.55);
}

.btn--primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 1px 0 0 rgba(42, 31, 26, 0.1),
    0 12px 30px -8px rgba(194, 87, 63, 0.65);
}

.btn--ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--border-strong);
}

.btn--ghost:hover {
  background: var(--bg-elevated);
  border-color: var(--ink-subtle);
}

.btn__arrow {
  display: inline-block;
  transition: transform 0.2s ease;
}

.btn--ghost:hover .btn__arrow {
  transform: translateX(3px);
}

.hero__proof {
  margin: 0;
  font-size: 13px;
  color: var(--ink-subtle);
  letter-spacing: 0.01em;
}

/* ---------- Mascot (portrait) ---------- */

.hero__mascot-wrap {
  position: relative;
  justify-self: center;
  width: 100%;
  max-width: 260px;
  aspect-ratio: 260 / 420;
  order: 2;
  transform-style: preserve-3d;
  perspective: 800px;
}

@media (min-width: 900px) {
  .hero__mascot-wrap {
    justify-self: end;
    max-width: 320px;
    aspect-ratio: 260 / 440;
  }
}

.hero__mascot {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: auto;
  max-height: 480px;
  object-fit: contain;
  transform-origin: 50% 100%;
  animation: mascotBob 3.8s ease-in-out infinite;
  filter: drop-shadow(0 18px 24px rgba(42, 31, 26, 0.14));
  will-change: transform;
}

@media (min-width: 900px) {
  .hero__mascot {
    left: auto;
    right: 0;
  }
}

.hero__mascot-shadow {
  position: absolute;
  left: 18%;
  right: 18%;
  bottom: 4px;
  height: 14px;
  border-radius: 50%;
  background: radial-gradient(
    ellipse at center,
    rgba(42, 31, 26, 0.22) 0%,
    rgba(42, 31, 26, 0) 70%
  );
  animation: shadowPulse 3.8s ease-in-out infinite;
}

@keyframes mascotBob {
  0%,
  100% {
    transform: translateY(0) rotate(-1deg);
  }
  50% {
    transform: translateY(-6px) rotate(1deg);
  }
}

@keyframes shadowPulse {
  0%,
  100% {
    transform: scaleX(1);
    opacity: 1;
  }
  50% {
    transform: scaleX(0.82);
    opacity: 0.7;
  }
}

/* ---------- Ambient bg ---------- */

.hero__ambient {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: radial-gradient(
      ellipse 80% 60% at 15% 20%,
      rgba(242, 217, 203, 0.55) 0%,
      rgba(242, 217, 203, 0) 60%
    ),
    radial-gradient(
      ellipse 70% 50% at 85% 80%,
      rgba(194, 87, 63, 0.1) 0%,
      rgba(194, 87, 63, 0) 55%
    ),
    linear-gradient(180deg, #fdfbf6 0%, #f7f3ec 100%);
}

/* ---------- Sections ---------- */

.section {
  position: relative;
  padding: clamp(72px, 10vw, 128px) clamp(20px, 5vw, 56px);
  max-width: 1240px;
  margin: 0 auto;
}

.section__inner {
  max-width: 1040px;
}

.section__inner--narrow {
  max-width: 760px;
}

.section__title {
  margin: 0 0 clamp(28px, 3.2vw, 40px);
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(36px, 4.6vw, 60px);
  line-height: 1.08;
  letter-spacing: -0.02em;
  color: var(--ink);
}

.section__subtitle {
  margin: clamp(28px, 3vw, 40px) 0 18px;
  font-family: var(--font-display);
  font-weight: 500;
  font-style: italic;
  font-size: clamp(20px, 1.7vw, 24px);
  letter-spacing: -0.005em;
  color: var(--accent);
}

.section__subtitle:first-of-type {
  margin-top: 0;
}

.section__lede {
  margin: 0 0 clamp(28px, 3vw, 40px);
  max-width: 68ch;
  font-size: clamp(18px, 1.55vw, 22px);
  line-height: 1.55;
  color: var(--ink-muted);
}

.section__prose {
  margin: 0;
  max-width: 70ch;
  font-size: clamp(18px, 1.55vw, 22px);
  line-height: 1.65;
  color: var(--ink-muted);
}

/* ---------- Cards (proof) ---------- */

.cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  margin-bottom: clamp(32px, 4vw, 48px);
}

@media (min-width: 700px) {
  .cards {
    grid-template-columns: repeat(3, 1fr);
  }
}

.card {
  padding: 20px 20px 22px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 10px;
}

.card__name {
  margin: 0 0 10px;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(19px, 1.5vw, 22px);
  letter-spacing: -0.01em;
  color: var(--ink);
}

.card__body {
  margin: 0;
  font-size: clamp(15.5px, 1.15vw, 17px);
  line-height: 1.55;
  color: var(--ink-muted);
}

/* ---------- Bullets + feature list ---------- */

.bullets {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 10px;
}

.bullets li {
  position: relative;
  padding-left: 22px;
  font-size: clamp(17px, 1.25vw, 19px);
  line-height: 1.55;
  color: var(--ink-muted);
}

.bullets li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 0.7em;
  width: 10px;
  height: 1px;
  background: var(--accent);
}

.bullets--muted li::before {
  background: var(--ink-subtle);
}

.feature-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 14px;
}

.feature-list li {
  padding: 18px 22px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: clamp(17px, 1.25vw, 19px);
  line-height: 1.55;
  color: var(--ink-muted);
}

.feature-list li strong {
  color: var(--ink);
  font-family: var(--font-body);
  font-weight: 600;
}

/* ---------- Outcomes (What you'll build) ---------- */

.outcomes {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

@media (min-width: 700px) {
  .outcomes {
    grid-template-columns: repeat(3, 1fr);
  }
}

.outcome {
  padding: 22px 22px 24px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 10px;
  display: flex;
  flex-direction: column;
}

.outcome__title {
  margin: 0 0 12px;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(20px, 1.55vw, 23px);
  letter-spacing: -0.01em;
  color: var(--ink);
}

.outcome__body {
  margin: 0;
  font-size: clamp(16px, 1.2vw, 18px);
  line-height: 1.6;
  color: var(--ink-muted);
}

/* ---------- Pillars (MACHINE framework) ---------- */

.pillars {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  margin-bottom: clamp(24px, 3vw, 36px);
}

@media (min-width: 700px) {
  .pillars {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1080px) {
  .pillars {
    grid-template-columns: repeat(4, 1fr);
  }
}

.pillar {
  position: relative;
  padding: 20px 20px 22px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 10px;
  display: flex;
  flex-direction: column;
}

.pillar__label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  margin-bottom: 12px;
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  background: var(--bg);
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 16px;
  color: var(--accent);
  letter-spacing: 0;
}

.pillar__name {
  margin: 0 0 10px;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(18px, 1.35vw, 20px);
  letter-spacing: -0.01em;
  color: var(--ink);
}

.pillar__body {
  margin: 0;
  font-size: clamp(15.5px, 1.15vw, 17px);
  line-height: 1.55;
  color: var(--ink-muted);
}

.pillars__footer {
  margin-top: clamp(8px, 1.5vw, 16px);
}

/* ---------- Form ---------- */

.form {
  display: grid;
  gap: 22px;
  margin-top: clamp(16px, 2vw, 24px);
}

.field {
  display: grid;
  gap: 6px;
  border: 0;
  padding: 0;
  margin: 0;
  min-width: 0;
}

.field__label {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 14px;
  letter-spacing: 0.005em;
  color: var(--ink);
}

.field__hint {
  margin: -2px 0 2px;
  font-size: 13px;
  color: var(--ink-subtle);
}

.field__input,
.field__textarea {
  width: 100%;
  padding: 12px 14px;
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.5;
  color: var(--ink);
  background: var(--bg-elevated);
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  transition: border-color 0.18s ease, box-shadow 0.18s ease,
    background 0.18s ease;
}

.field__textarea {
  min-height: 96px;
  resize: vertical;
}

.field__input::placeholder,
.field__textarea::placeholder {
  color: var(--ink-subtle);
}

.field__input:hover,
.field__textarea:hover {
  border-color: var(--ink-subtle);
}

.field__input:focus,
.field__textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(194, 87, 63, 0.18);
  background: #fffdf8;
}

.field__counter {
  justify-self: end;
  margin: 2px 0 0;
  font-size: 12px;
  color: var(--ink-subtle);
  letter-spacing: 0.01em;
}

.field__counter.is-near {
  color: var(--accent);
}

.field__error {
  margin: 4px 0 0;
  font-size: 14px;
  font-weight: 500;
  color: var(--error);
  min-height: 0;
  display: flex;
  align-items: center;
  gap: 6px;
}

.field__error:empty {
  display: none;
}

.field__error:not(:empty)::before {
  content: "";
  display: inline-block;
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  background: var(--error);
  -webkit-mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M12 2a10 10 0 1 0 0 20 10 10 0 0 0 0-20zm-1 5h2v7h-2V7zm0 9h2v2h-2v-2z'/></svg>") center / contain no-repeat;
  mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M12 2a10 10 0 1 0 0 20 10 10 0 0 0 0-20zm-1 5h2v7h-2V7zm0 9h2v2h-2v-2z'/></svg>") center / contain no-repeat;
}

.field__input[aria-invalid="true"],
.field__textarea[aria-invalid="true"] {
  border-color: var(--error);
  box-shadow: 0 0 0 3px rgba(163, 66, 49, 0.18);
  background: rgba(163, 66, 49, 0.03);
}

.field[data-invalid="true"] .field__label,
.field[data-invalid="true"] legend.field__label {
  color: var(--error);
}

.field__optional {
  display: inline-block;
  margin-left: 6px;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--border);
  color: var(--ink-subtle);
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.02em;
  text-transform: lowercase;
  vertical-align: middle;
}

.form__summary {
  margin: 0 0 20px;
  padding: 14px 18px;
  border: 1px solid var(--error);
  border-left-width: 4px;
  border-radius: var(--radius-md);
  background: rgba(163, 66, 49, 0.06);
  color: var(--error);
  font-size: 14px;
  font-weight: 500;
  line-height: 1.45;
}

.form__summary[hidden] {
  display: none;
}

.form__summary strong {
  display: block;
  margin-bottom: 4px;
  font-weight: 600;
  font-size: 15px;
}

.form__summary ul {
  margin: 0;
  padding-left: 18px;
}

.form__summary a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* ---------- Pills (radio) ---------- */

.field--radios {
  display: grid;
  gap: 10px;
}

.pills {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.pills--stack {
  flex-direction: column;
  align-items: flex-start;
}

.pills--stack .pill__label {
  display: inline-flex;
}

.pill {
  position: relative;
  display: inline-flex;
  cursor: pointer;
}

.pill input {
  position: absolute;
  opacity: 0;
  inset: 0;
  margin: 0;
  cursor: pointer;
}

.pill__label {
  display: inline-flex;
  align-items: center;
  padding: 10px 18px;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  background: var(--bg-elevated);
  color: var(--ink);
  font-size: 14px;
  font-weight: 500;
  transition: background 0.18s ease, border-color 0.18s ease,
    color 0.18s ease, box-shadow 0.18s ease;
}

.pill:hover .pill__label {
  border-color: var(--ink-subtle);
}

.pill input:checked + .pill__label {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--bg-elevated);
  box-shadow: 0 1px 0 0 rgba(42, 31, 26, 0.08),
    0 6px 18px -6px rgba(194, 87, 63, 0.5);
}

.form__error {
  margin: 4px 0 0;
  font-size: 14px;
  color: var(--error);
  min-height: 0;
}

.form__error:empty {
  display: none;
}

.form__actions {
  margin-top: 8px;
}

.form__actions .btn {
  width: auto;
}

/* ---------- Success panel ---------- */

.success {
  margin-top: clamp(16px, 2vw, 24px);
  padding: 28px 28px 30px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 12px;
  border-left: 3px solid var(--success);
}

.success__title {
  margin: 0 0 10px;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 22px;
  letter-spacing: -0.01em;
  color: var(--ink);
}

.success__body {
  margin: 0;
  font-size: 15.5px;
  line-height: 1.6;
  color: var(--ink-muted);
}

/* ---------- Footer ---------- */

.footer {
  padding: clamp(40px, 6vw, 64px) clamp(20px, 5vw, 56px)
    clamp(32px, 5vw, 48px);
  max-width: 1240px;
  margin: 0 auto;
  border-top: 1px solid var(--border);
}

.footer__inner {
  display: grid;
  gap: 14px;
}

.footer__brand {
  margin: 0;
  font-size: 14px;
  color: var(--ink-muted);
  letter-spacing: 0.005em;
}

/* ---------- Reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {
  .hero__mascot,
  .hero__mascot-shadow,
  .btn,
  .btn__arrow {
    animation: none !important;
    transition: none !important;
  }
  .grain {
    display: none;
  }
}

/* ---------- Very narrow ---------- */

@media (max-width: 400px) {
  .hero__mascot-wrap {
    max-width: 220px;
  }
  .pills {
    gap: 8px;
  }
  .pill__label {
    padding: 9px 14px;
    font-size: 13.5px;
  }
}
