/* =====================================================
   CARPETERIA — Mockup V3: "Warm Magazine"
   Mannington-style narrative storytelling. Big serif
   moments. Warm palette. Layered editorial spreads.
   ===================================================== */

:root {
  --paper: #f7eedb;
  --paper-warm: #ebdfc4;
  --cream: #fdf8e9;
  --ink: #1c1f20;
  --ink-soft: rgba(28, 31, 32, 0.66);
  --ink-mute: rgba(28, 31, 32, 0.42);
  --teal: #1f6b6b;
  --teal-deep: #0e3d3d;
  --teal-pale: #c9dad8;
  --clay: #b06d4f;
  --warm-line: rgba(28, 31, 32, 0.16);

  --display: "DM Serif Display", "Playfair Display", Georgia, serif;
  --body-serif: "Cormorant Garamond", Georgia, serif;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, monospace;

  --max: 1320px;
  --gutter: clamp(20px, 4vw, 64px);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; overflow-x: clip; }

body {
  margin: 0;
  font-family: var(--sans);
  background: var(--paper);
  color: var(--ink);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
  /* warm grain */
  background-image: radial-gradient(rgba(28,31,32,0.04) 1px, transparent 1px);
  background-size: 13px 13px;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { cursor: pointer; font: inherit; }

h1, h2, h3, h4 {
  font-family: var(--display);
  font-weight: 400;
  line-height: 1;
  letter-spacing: -0.005em;
  margin: 0;
  color: var(--ink);
}
p { margin: 0; }

.eyebrow {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--teal);
  font-weight: 500;
}

.script {
  font-family: var(--body-serif);
  font-style: italic;
  font-weight: 400;
  letter-spacing: 0.005em;
}

/* ============== TOP STRIP ============== */

.topstrip {
  background: var(--ink);
  color: var(--paper);
  padding: 9px var(--gutter);
  text-align: center;
  font-family: var(--body-serif);
  font-style: italic;
  font-size: 16px;
  letter-spacing: 0.005em;
}
.topstrip a { color: var(--paper); border-bottom: 1px solid currentColor; margin-left: 14px; font-style: normal; font-family: var(--mono); font-size: 11px; letter-spacing: 0.18em; text-transform: uppercase; }

/* ============== NAV ============== */

.nav {
  background: var(--paper);
  border-bottom: 1px solid var(--warm-line);
  padding: 18px var(--gutter);
  position: sticky;
  top: 0;
  z-index: 50;
  background-color: rgba(247, 238, 219, 0.96);
  backdrop-filter: blur(8px);
}
.nav__inner {
  max-width: var(--max);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 24px;
}
.nav__brand {
  font-family: var(--display);
  font-size: 36px;
  letter-spacing: 0.005em;
  color: var(--teal-deep);
  text-transform: uppercase;
  text-align: center;
  line-height: 0.95;
}
.nav__brand small {
  display: block;
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.32em;
  color: var(--ink-soft);
  margin-top: 2px;
  text-transform: uppercase;
  font-weight: 500;
}
.nav__menu {
  display: flex;
  gap: 24px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav__menu a {
  font-family: var(--body-serif);
  font-style: italic;
  font-size: 17px;
  color: var(--ink);
  position: relative;
  padding: 4px 0;
  transition: color 200ms;
}
.nav__menu a:hover { color: var(--teal); }
.nav__cta { display: flex; justify-content: flex-end; gap: 16px; align-items: center; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 26px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  font-weight: 500;
  background: var(--teal);
  color: var(--paper);
  border: 1px solid var(--teal);
  cursor: pointer;
  border-radius: 999px;
  transition: all 180ms ease;
}
.btn:hover { background: var(--teal-deep); border-color: var(--teal-deep); }
.btn--ink { background: var(--ink); border-color: var(--ink); }
.btn--outline { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn--outline:hover { background: var(--ink); color: var(--paper); }

.linkbtn {
  font-family: var(--body-serif);
  font-style: italic;
  font-size: 18px;
  color: var(--teal);
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding-bottom: 4px;
  border-bottom: 1px solid var(--teal);
}
.linkbtn::after { content: "→"; transition: transform 200ms; font-style: normal; }
.linkbtn:hover::after { transform: translateX(4px); }

/* ============== HERO — Magazine spread ============== */

.hero {
  position: relative;
  background: var(--paper);
  overflow: hidden;
  padding-top: clamp(40px, 5vw, 80px);
}
.hero__inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--gutter) clamp(56px, 6vw, 96px);
  display: grid;
  grid-template-columns: 0.95fr 1.05fr;
  gap: clamp(24px, 4vw, 64px);
  align-items: end;
}
.hero__copy { padding-bottom: 16px; }
.hero__issue {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-bottom: 24px;
}
.hero__issue span { color: var(--teal); }
.hero__title {
  font-family: var(--display);
  font-size: clamp(56px, 9vw, 144px);
  line-height: 0.92;
  letter-spacing: -0.005em;
  font-weight: 400;
  color: var(--ink);
}
.hero__title em {
  font-family: var(--body-serif);
  font-style: italic;
  font-weight: 400;
  color: var(--teal-deep);
}
.hero__sub {
  font-family: var(--body-serif);
  font-style: italic;
  font-size: clamp(20px, 1.8vw, 26px);
  margin-top: 18px;
  color: var(--clay);
  font-weight: 400;
}
.hero__lead {
  font-size: 17px;
  line-height: 1.7;
  margin-top: 22px;
  max-width: 42ch;
  color: var(--ink-soft);
}
.hero__cta { margin-top: 32px; display: flex; gap: 14px; flex-wrap: wrap; }

.hero__media {
  position: relative;
  aspect-ratio: 4/5;
  overflow: hidden;
}
.hero__media img { width: 100%; height: 100%; object-fit: cover; }
.hero__caption {
  position: absolute;
  bottom: 14px;
  left: 14px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--paper);
  background: rgba(28,31,32,0.6);
  padding: 6px 10px;
  backdrop-filter: blur(2px);
}

/* ============== STORY SCROLL ============== */

.story {
  padding: clamp(72px, 9vw, 144px) var(--gutter);
  position: relative;
}
.story__inner {
  max-width: var(--max);
  margin: 0 auto;
}
.story__head {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: clamp(16px, 3vw, 56px);
  align-items: baseline;
  margin-bottom: clamp(48px, 6vw, 80px);
}
.story__num {
  font-family: var(--display);
  font-size: clamp(80px, 10vw, 160px);
  line-height: 0.85;
  color: var(--teal);
  font-weight: 400;
}
.story__head h2 {
  font-size: clamp(40px, 5.5vw, 88px);
  line-height: 1;
  letter-spacing: -0.01em;
  font-weight: 400;
}
.story__head h2 em {
  font-family: var(--body-serif);
  font-style: italic;
  font-weight: 400;
  color: var(--teal-deep);
}

/* Editorial body: drop cap + serif body */
.story__body {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(28px, 4vw, 64px);
  align-items: center;
}
.story__body--single {
  display: block;
  max-width: 64ch;
  margin: 0 auto;
}
.story__body p {
  font-family: var(--body-serif);
  font-size: clamp(18px, 1.5vw, 22px);
  line-height: 1.55;
  color: var(--ink);
}
.story__body p + p { margin-top: 14px; }
.story__body p:first-child::first-letter {
  font-family: var(--display);
  font-size: 4.6em;
  float: left;
  line-height: 0.8;
  margin: 6px 12px 0 0;
  color: var(--teal);
}
.story__body--single p:first-child::first-letter { color: var(--clay); }

.story__body img {
  width: 100%;
  aspect-ratio: 4/5;
  object-fit: cover;
}

/* Reverse — image left */
.story__body--reverse > .story__media { order: -1; }

.story__media { display: block; }
.story__media__caption {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-mute);
  margin-top: 10px;
}

/* ============== STACK QUOTE — typography moment ============== */

.stack-quote {
  text-align: center;
  padding: clamp(80px, 10vw, 160px) var(--gutter);
  background: var(--cream);
  border-top: 1px solid var(--warm-line);
  border-bottom: 1px solid var(--warm-line);
}
.stack-quote__inner { max-width: 980px; margin: 0 auto; }
.stack-quote .eyebrow { display: block; margin-bottom: 24px; }
.stack-quote h2 {
  font-size: clamp(36px, 4.5vw, 72px);
  line-height: 1.1;
  font-weight: 400;
}
.stack-quote h2 span { display: block; }
.stack-quote h2 span:not(:last-child) { color: var(--ink-soft); }
.stack-quote h2 span:last-child {
  font-family: var(--body-serif);
  font-style: italic;
  color: var(--teal-deep);
  margin-top: 16px;
  padding-top: 24px;
  border-top: 1px solid var(--warm-line);
  width: fit-content;
  margin-left: auto;
  margin-right: auto;
  padding-left: 56px;
  padding-right: 56px;
}

/* ============== FULL BLEED IMAGE ============== */

.bleed {
  width: 100%;
  height: clamp(440px, 70vh, 760px);
  overflow: hidden;
  background: var(--ink);
  position: relative;
}
.bleed img { width: 100%; height: 100%; object-fit: cover; }
.bleed__caption {
  position: absolute;
  bottom: 28px;
  left: 28px;
  right: 28px;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(247, 238, 219, 0.9);
}
.bleed__caption .pull {
  font-family: var(--body-serif);
  font-style: italic;
  font-size: clamp(20px, 2.5vw, 32px);
  letter-spacing: 0.005em;
  text-transform: none;
  color: var(--paper);
  max-width: 24ch;
  line-height: 1.2;
}

/* ============== CATEGORY EDITORIAL GRID ============== */

.cat-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: clamp(20px, 3vw, 48px);
}
.cat-card {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(16px, 2vw, 32px);
  align-items: center;
}
.cat-card--reverse > :first-child { order: 2; }
.cat-card__media {
  aspect-ratio: 4/5;
  overflow: hidden;
}
.cat-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 700ms cubic-bezier(0.2, 0.7, 0.2, 1);
}
.cat-card:hover .cat-card__media img { transform: scale(1.04); }
.cat-card__copy h3 {
  font-family: var(--display);
  font-size: clamp(28px, 3vw, 44px);
  font-weight: 400;
  line-height: 1.0;
}
.cat-card__copy h3 em {
  font-family: var(--body-serif);
  font-style: italic;
  font-weight: 400;
  color: var(--teal);
}
.cat-card__copy p {
  font-family: var(--body-serif);
  font-style: italic;
  font-size: 17px;
  line-height: 1.5;
  color: var(--ink-soft);
  margin-top: 10px;
  margin-bottom: 14px;
}

/* ============== DIFFERENTIATORS LIST ============== */

.diff-list {
  list-style: none;
  margin: 32px 0 0;
  padding: 0;
  border-top: 1px solid var(--warm-line);
}
.diff-list li {
  display: grid;
  grid-template-columns: 80px 1fr;
  gap: 24px;
  padding: 22px 0;
  border-bottom: 1px solid var(--warm-line);
  align-items: baseline;
}
.diff-list li .num {
  font-family: var(--display);
  font-size: 36px;
  color: var(--teal);
  line-height: 1;
}
.diff-list li h4 {
  font-family: var(--display);
  font-size: 22px;
  font-weight: 400;
  letter-spacing: -0.005em;
}
.diff-list li p {
  font-family: var(--body-serif);
  font-style: italic;
  font-size: 16px;
  color: var(--ink-soft);
  margin-top: 4px;
}

/* ============== LEAD FORM SECTION ============== */

.lead-form {
  background: var(--ink);
  color: var(--paper);
  padding: clamp(72px, 9vw, 128px) var(--gutter);
}
.lead-form__inner {
  max-width: var(--max);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(32px, 5vw, 96px);
  align-items: center;
}
.lead-form h2 {
  font-size: clamp(40px, 5vw, 80px);
  font-weight: 400;
  color: var(--paper);
}
.lead-form h2 em { font-family: var(--body-serif); font-style: italic; color: var(--teal-pale); }
.lead-form .lead {
  font-family: var(--body-serif);
  font-style: italic;
  font-size: clamp(20px, 1.8vw, 26px);
  margin-top: 20px;
  color: rgba(247, 238, 219, 0.86);
  max-width: 38ch;
}
.lead-form .lead-foot {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--teal-pale);
  margin-top: 24px;
}

.form {
  background: var(--paper);
  color: var(--ink);
  padding: clamp(28px, 3vw, 48px);
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.form h3 {
  font-family: var(--display);
  font-size: clamp(22px, 2vw, 28px);
  font-weight: 400;
  line-height: 1.05;
  margin-bottom: 6px;
}
.form h3 em { font-family: var(--body-serif); font-style: italic; color: var(--teal); }
.form .row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form label {
  display: block;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-bottom: 4px;
  font-weight: 500;
}
.form input, .form select {
  width: 100%;
  background: var(--cream);
  border: 1px solid var(--warm-line);
  padding: 11px 14px;
  font-family: var(--sans);
  font-size: 14px;
  border-radius: 0;
  color: var(--ink);
}
.form input:focus, .form select:focus { outline: none; border-color: var(--teal); }
.form button { margin-top: 6px; width: 100%; justify-content: center; }

/* ============== FOOTER ============== */

.footer {
  background: var(--paper-warm);
  padding: clamp(64px, 7vw, 112px) var(--gutter) 36px;
  border-top: 1px solid var(--warm-line);
}
.footer__inner {
  max-width: var(--max);
  margin: 0 auto;
}
.footer__signoff {
  text-align: center;
  margin-bottom: 56px;
  padding-bottom: 56px;
  border-bottom: 1px solid var(--warm-line);
}
.footer__signoff h3 {
  font-family: var(--body-serif);
  font-style: italic;
  font-size: clamp(28px, 3.5vw, 48px);
  font-weight: 400;
  color: var(--teal-deep);
  line-height: 1.2;
}
.footer__signoff p {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-top: 14px;
  font-weight: 500;
}
.footer__cols {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: clamp(24px, 4vw, 64px);
}
.footer__brand h4 {
  font-family: var(--display);
  font-weight: 400;
  font-size: 32px;
  letter-spacing: 0.01em;
  color: var(--teal-deep);
  text-transform: uppercase;
}
.footer__brand small {
  display: block;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.22em;
  color: var(--ink-soft);
  margin-top: 4px;
  text-transform: uppercase;
  font-weight: 500;
}
.footer__brand p {
  font-family: var(--body-serif);
  font-style: italic;
  font-size: 16px;
  line-height: 1.55;
  margin-top: 18px;
  max-width: 36ch;
  color: var(--ink-soft);
}
.footer h5 {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--teal);
  margin-bottom: 14px;
  font-weight: 500;
}
.footer ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.footer ul a, .footer ul li {
  font-family: var(--body-serif);
  font-size: 17px;
  color: var(--ink);
}
.footer ul a:hover { color: var(--teal); font-style: italic; }
.footer__bottom {
  margin-top: 36px;
  padding-top: 20px;
  border-top: 1px solid var(--warm-line);
  display: flex;
  justify-content: space-between;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-mute);
  flex-wrap: wrap;
  gap: 12px;
}

/* ============== UTILS ============== */

.version-chip {
  position: fixed;
  bottom: 20px;
  left: 20px;
  background: var(--ink);
  color: var(--paper);
  padding: 10px 16px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  z-index: 100;
  display: flex;
  gap: 12px;
  border-radius: 999px;
  font-weight: 500;
}
.version-chip a { color: var(--teal-pale); border-bottom: 1px solid currentColor; }

.reveal { opacity: 0; transform: translateY(30px); transition: all 1000ms cubic-bezier(0.2, 0.7, 0.2, 1); }
.reveal.is-visible { opacity: 1; transform: translateY(0); }

/* ============== RESPONSIVE ============== */

@media (max-width: 980px) {
  .nav__inner { grid-template-columns: 1fr auto; }
  .nav__menu { display: none; }
  .nav__brand { text-align: left; }
  .hero__inner { grid-template-columns: 1fr; }
  .story__body, .lead-form__inner { grid-template-columns: 1fr; }
  .story__body--reverse > .story__media { order: 0; }
  .cat-grid { grid-template-columns: 1fr; }
  .cat-card { grid-template-columns: 1fr; }
  .cat-card--reverse > :first-child { order: 0; }
  .footer__cols { grid-template-columns: 1fr 1fr; }
  .story__head { grid-template-columns: 1fr; }
  .story__num { font-size: 64px; }
  .stack-quote h2 span:last-child { padding-left: 24px; padding-right: 24px; }
  .topstrip { font-size: 14px; }
  .topstrip a { display: block; margin: 6px 0 0; }
}

@media (max-width: 540px) {
  .footer__cols { grid-template-columns: 1fr; }
  .form .row { grid-template-columns: 1fr; }
  .nav__brand { font-size: 26px; }
  .nav__brand small { font-size: 8px; letter-spacing: 0.22em; }
  .nav__cta .btn { padding: 10px 16px; font-size: 10px; }
  .version-chip { left: 12px; right: 12px; bottom: 12px; justify-content: space-between; border-radius: 0; }
  .diff-list li { grid-template-columns: 50px 1fr; gap: 16px; }
  .diff-list li .num { font-size: 28px; }
  .story__body p:first-child::first-letter { font-size: 3.6em; }
  body, h1, h2, h3, h4, p { overflow-wrap: break-word; word-wrap: break-word; }
}
