:root {
  --paper: #f4efe6;
  --paper-strong: #efe6da;
  --ink: #151312;
  --muted: #645a52;
  --line: rgba(21, 19, 18, 0.14);
  --accent: #b14f32;
  --accent-soft: rgba(177, 79, 50, 0.12);
  --panel: rgba(255, 250, 244, 0.82);
  --shadow: 0 26px 90px rgba(42, 26, 17, 0.08);
  --display: "Didot", "Bodoni 72", "Times New Roman", serif;
  --body: "Avenir Next", "Segoe UI", "Helvetica Neue", sans-serif;
  --mono: "SF Mono", "Menlo", "Monaco", monospace;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  color: var(--ink);
  font-family: var(--body);
  background:
    radial-gradient(circle at top left, rgba(177, 79, 50, 0.14), transparent 30%),
    radial-gradient(circle at bottom right, rgba(95, 83, 72, 0.16), transparent 24%),
    linear-gradient(180deg, #fbf7f0 0%, var(--paper) 42%, #efe7db 100%);
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    linear-gradient(rgba(21, 19, 18, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(21, 19, 18, 0.04) 1px, transparent 1px);
  background-size: 28px 28px;
  content: "";
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.72), transparent 92%);
}

body::after {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image:
    radial-gradient(rgba(255, 255, 255, 0.32) 0.8px, transparent 0.8px),
    radial-gradient(rgba(21, 19, 18, 0.08) 0.7px, transparent 0.7px);
  background-position: 0 0, 18px 18px;
  background-size: 24px 24px, 24px 24px;
  opacity: 0.28;
  content: "";
}

img {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
textarea,
select {
  font: inherit;
}

.skip-link {
  position: absolute;
  top: -44px;
  left: 16px;
  z-index: 1000;
  padding: 10px 14px;
  color: #fff;
  background: var(--ink);
}

.skip-link:focus {
  top: 16px;
}

.page-shell {
  width: min(1200px, calc(100% - 28px));
  margin: 0 auto;
  padding: 20px 0 48px;
}

.site-header {
  position: sticky;
  top: 16px;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 18px;
  margin-bottom: 22px;
  border: 1px solid rgba(21, 19, 18, 0.1);
  border-radius: 24px;
  backdrop-filter: blur(18px);
  background: rgba(250, 245, 238, 0.8);
  box-shadow: 0 18px 40px rgba(42, 26, 17, 0.06);
}

.brand-lockup {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.brand-lockup img:first-child {
  width: 48px;
  height: 48px;
}

.brand-lockup img:last-child {
  width: clamp(168px, 26vw, 248px);
  height: auto;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 14px;
}

.site-nav a {
  position: relative;
  padding-bottom: 3px;
  font-size: 0.95rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.site-nav a::after {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 200ms ease;
  content: "";
}

.site-nav a:hover::after,
.site-nav a.is-active::after {
  transform: scaleX(1);
}

.hero,
.section,
.site-footer {
  position: relative;
  overflow: clip;
  border: 1px solid var(--line);
  border-radius: 34px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr);
  gap: 26px;
  padding: clamp(28px, 4vw, 48px);
  min-height: 74svh;
}

.hero::before,
.section::before,
.site-footer::before {
  position: absolute;
  inset: 12px;
  border: 1px solid rgba(21, 19, 18, 0.08);
  border-radius: 24px;
  pointer-events: none;
  content: "";
}

.hero-copy {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 24px;
}

.eyebrow,
.card-label,
.card-index,
.step-number,
.footer-meta {
  font-family: var(--mono);
  font-size: 0.78rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.eyebrow,
.card-label,
.card-index,
.step-number {
  color: var(--accent);
}

h1,
h2,
h3 {
  margin: 0;
  font-weight: 400;
  line-height: 0.95;
}

h1,
h2 {
  font-family: var(--display);
  letter-spacing: -0.04em;
}

h1 {
  font-size: clamp(4.4rem, 11vw, 8.8rem);
}

h2 {
  font-size: clamp(2.6rem, 5.4vw, 4.4rem);
}

h3 {
  font-size: clamp(1.4rem, 2.2vw, 2rem);
  line-height: 1.08;
}

p,
dd,
dt,
summary {
  margin: 0;
}

.hero-dek,
.section-intro,
.statement-card p,
.workflow-step p,
.output-card p,
.faq-item p,
.footer-copy {
  max-width: 36rem;
  color: var(--muted);
  line-height: 1.65;
  font-size: 1.02rem;
}

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

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 0 22px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-size: 0.95rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  transition:
    transform 200ms ease,
    background-color 200ms ease,
    border-color 200ms ease;
}

.button:hover {
  transform: translateY(-1px);
}

.button-primary {
  color: #fff8f2;
  background: var(--ink);
}

.button-secondary {
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.34);
}

.signal-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.signal-grid div {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.38);
}

.signal-grid dt {
  margin-bottom: 10px;
  font-size: 0.84rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
}

.signal-grid dd {
  line-height: 1.45;
}

.hero-composition {
  display: flex;
  align-items: stretch;
}

.composition-frame {
  display: flex;
  flex: 1;
  flex-direction: column;
  justify-content: space-between;
  gap: 18px;
  padding: 20px;
  border-radius: 28px;
  background:
    linear-gradient(140deg, rgba(255, 255, 255, 0.6), rgba(255, 250, 244, 0.18)),
    linear-gradient(180deg, rgba(177, 79, 50, 0.1), transparent 45%);
  border: 1px solid rgba(21, 19, 18, 0.08);
}

.composition-topline {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px 18px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.composition-grid {
  display: grid;
  flex: 1;
  grid-template-columns: 1.35fr 0.85fr;
  gap: 14px;
}

.composition-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 180px;
  padding: 20px;
  border: 1px solid rgba(21, 19, 18, 0.08);
  border-radius: 24px;
  background: rgba(255, 252, 248, 0.68);
}

.composition-card-wide {
  min-height: 280px;
}

.composition-card-wide h2 {
  max-width: 16rem;
}

.composition-card-accent {
  align-items: flex-start;
  justify-content: center;
  gap: 16px;
  color: #fff8f2;
  background:
    linear-gradient(160deg, #231c19, #6f3521 52%, #b14f32 100%);
}

.composition-card-accent p {
  color: rgba(255, 248, 242, 0.78);
}

.composition-card:nth-child(3),
.composition-card:nth-child(4) {
  min-height: 160px;
}

.section {
  margin-top: 26px;
  padding: clamp(26px, 3.4vw, 40px);
}

.section-heading {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 28px;
}

.meaning-grid,
.outputs-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.section-intro {
  max-width: 46rem;
}

.statement-card,
.output-card {
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-height: 280px;
  padding: 22px;
  border-radius: 24px;
  border: 1px solid var(--line);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.56), rgba(255, 250, 243, 0.32));
}

.statement-card:first-child {
  background:
    linear-gradient(160deg, rgba(177, 79, 50, 0.14), rgba(255, 250, 243, 0.38)),
    rgba(255, 255, 255, 0.3);
}

.workflow-section {
  background:
    linear-gradient(135deg, rgba(177, 79, 50, 0.08), transparent 28%),
    var(--panel);
}

.workflow-rail {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.workflow-step {
  display: flex;
  flex-direction: column;
  gap: 18px;
  min-height: 280px;
  padding: 22px;
  border-radius: 24px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.42);
}

.step-number {
  display: inline-flex;
  width: fit-content;
  padding: 7px 10px;
  border-radius: 999px;
  background: var(--accent-soft);
}

.output-card:nth-child(2) {
  transform: translateY(18px);
}

.output-card:nth-child(3) {
  background:
    linear-gradient(160deg, rgba(21, 19, 18, 0.04), rgba(255, 250, 243, 0.46)),
    rgba(255, 255, 255, 0.3);
}

.prompts-section .output-card:nth-child(2) {
  transform: translateY(18px);
}

.prompts-section .output-card:nth-child(3) {
  transform: none;
}

.faq-list {
  display: grid;
  gap: 12px;
}

.faq-item {
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.46);
}

.faq-item summary {
  cursor: pointer;
  list-style: none;
  padding-right: 28px;
  position: relative;
  font-size: 1.1rem;
  line-height: 1.4;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary::after {
  position: absolute;
  top: 50%;
  right: 0;
  transform: translateY(-50%);
  color: var(--accent);
  font-family: var(--mono);
  font-size: 1rem;
  content: "+";
}

.faq-item[open] summary::after {
  content: "−";
}

.faq-item p {
  padding-top: 14px;
}

.site-footer {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-top: 26px;
  padding: 26px;
}

.footer-meta {
  color: var(--muted);
}

.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition:
    opacity 500ms ease,
    transform 500ms ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .reveal,
  .button,
  .site-nav a::after {
    transition: none;
  }
}

@media (max-width: 1040px) {
  .hero,
  .meaning-grid,
  .outputs-grid,
  .workflow-rail {
    grid-template-columns: 1fr;
  }

  .composition-grid {
    grid-template-columns: 1fr;
  }

  .composition-card-wide h2 {
    max-width: none;
  }

  .output-card:nth-child(2) {
    transform: none;
  }
}

@media (max-width: 820px) {
  .site-header,
  .site-footer {
    flex-direction: column;
    align-items: stretch;
  }

  .site-nav {
    justify-content: flex-start;
  }

  .signal-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 620px) {
  .page-shell {
    width: min(100% - 16px, 100%);
    padding-top: 8px;
  }

  .site-header {
    top: 8px;
    padding: 12px;
    border-radius: 20px;
  }

  .brand-lockup {
    gap: 8px;
  }

  .brand-lockup img:first-child {
    width: 40px;
    height: 40px;
  }

  .site-nav {
    gap: 10px 14px;
  }

  .hero,
  .section,
  .site-footer {
    border-radius: 24px;
  }

  .hero::before,
  .section::before,
  .site-footer::before {
    inset: 8px;
    border-radius: 18px;
  }

  .hero,
  .section,
  .site-footer {
    padding: 18px;
  }

  h1 {
    font-size: clamp(3.2rem, 19vw, 4.8rem);
  }

  h2 {
    font-size: clamp(2.2rem, 12vw, 3.4rem);
  }

  .button {
    width: 100%;
  }

  .composition-card,
  .statement-card,
  .output-card,
  .workflow-step {
    min-height: auto;
  }
}
