
/* ---- TOKENS ---- */
:root {
  --bg:          #f5f0e8;
  --surface:     #ede6d8;
  --ink:         #1c1814;
  --muted:       #6e6256;
  --accent:      #c4512e;
  --accent-ink:  #f5f0e8;

  --step-small:   clamp(0.8125rem, 0.79rem + 0.1vw,  0.875rem);
  --step-body:    clamp(1.0625rem, 1rem   + 0.25vw,  1.1875rem);
  --step-lead:    clamp(1.25rem,   1.1rem + 0.7vw,   1.625rem);
  --step-head:    clamp(2rem,      1.3rem + 3.2vw,   4rem);
  --step-display: clamp(4rem,      2rem   + 8vw,     10rem);

  --margin:       clamp(1.25rem, 5vw, 5rem);
  --gap:          clamp(6rem,    10vw, 10rem);
}

/* ---- RESET ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  font-family: 'Archivo', system-ui, sans-serif;
  background: var(--bg);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
}

body { overflow-x: clip; }

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

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

/* ---- MOTION ---- */
@media (prefers-reduced-motion: no-preference) {
  .reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.65s ease, transform 0.65s ease;
  }
  .reveal.in { opacity: 1; transform: none; }
  .reveal-d1 { transition-delay: 0.08s; }
  .reveal-d2 { transition-delay: 0.16s; }
  .reveal-d3 { transition-delay: 0.24s; }
}

/* ---- BUTTONS ---- */
.btn {
  display: inline-block;
  background: var(--accent);
  color: var(--accent-ink);
  font-family: inherit;
  font-size: var(--step-body);
  font-weight: 600;
  padding: 0.65em 1.5em;
  border: none;
  cursor: pointer;
  transition: opacity 0.15s;
  white-space: nowrap;
}
.btn:hover, .btn:focus-visible { opacity: 0.85; }
.btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

.btn-outline {
  background: transparent;
  color: var(--ink);
  outline: 1px solid var(--muted);
  transition: outline-color 0.15s;
}
.btn-outline:hover { outline-color: var(--ink); }

/* ---- NAV ---- */
.nav {
  position: fixed;
  inset: 0 0 auto;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem var(--margin);
  background: linear-gradient(to bottom, rgba(245,240,232,0.95) 0%, rgba(245,240,232,0) 100%);
}

.nav-logo {
  font-size: var(--step-small);
  font-weight: 400;
  letter-spacing: 0.06em;
  color: var(--ink);
}

.nav-links {
  display: flex;
  gap: 2rem;
  list-style: none;
}
.nav-links a {
  font-size: var(--step-small);
  color: var(--muted);
  transition: color 0.2s;
}
.nav-links a:hover { color: var(--ink); }

.nav-trade {
  font-size: var(--step-small);
  color: var(--ink);
  border-bottom: 1px solid currentColor;
  padding-bottom: 1px;
}

/* ---- HERO ---- */
.hero {
  min-height: 100svh;
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: auto 1fr auto;
  gap: 0;
  padding: 7rem var(--margin) 3rem;
  position: relative;
  overflow: hidden;
}

.hero-eyeline {
  grid-column: 1;
  grid-row: 1;
  font-size: var(--step-body);
  color: var(--ink);
  max-width: 30ch;
  line-height: 1.6;
  align-self: end;
  padding-bottom: 1rem;
}

.hero-left {
  grid-column: 1;
  grid-row: 2;
  display: flex;
  align-items: flex-end;
  padding-bottom: 2rem;
}

.hero-rug {
  grid-column: 2;
  grid-row: 1 / 4;
  align-self: end;
  justify-self: center;
  width: clamp(220px, 36vw, 520px);
  aspect-ratio: 3/4;
  object-fit: cover;
  object-position: center top;
  filter: brightness(0.97) contrast(1.05) saturate(1.1);
  animation: heroFloat 0.9s ease both, rugDrift 8s ease-in-out 1s infinite;
}

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

.hero-name {
  grid-column: 1 / 3;
  grid-row: 3;
  font-size: var(--step-display);
  font-weight: 400;
  letter-spacing: -0.025em;
  line-height: 0.88;
  color: var(--ink);
  padding-top: 0.4em;
  animation: heroFade 1s 0.1s ease both;
}

@keyframes heroFade {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes rugDrift {
  0%, 100% { transform: translateY(0px); }
  50%       { transform: translateY(-10px); }
}

/* ---- GALLERY ---- */
.gallery {
  padding: var(--gap) var(--margin);
  position: relative;
  min-height: 90svh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.gallery-floats {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.gf {
  position: absolute;
  object-fit: cover;
  filter: brightness(0.95) contrast(1.08) saturate(1.1);
  transition: transform 0.1s linear;
}

.gf-1 { top: 5%;  left: 2%;  width: clamp(80px, 10vw, 155px); aspect-ratio: 3/4; }
.gf-2 { top: 20%; left: 16%; width: clamp(65px, 8vw, 115px);  aspect-ratio: 2/3; }
.gf-3 { top: 7%;  right: 15%;width: clamp(70px, 9vw, 130px);  aspect-ratio: 3/4; }
.gf-4 { top: 5%;  right: 2%; width: clamp(90px, 11vw, 160px); aspect-ratio: 3/4; }
.gf-5 { bottom: 8%;  left: 5%;  width: clamp(80px, 10vw, 145px); aspect-ratio: 2/3; }
.gf-6 { bottom: 15%; left: 20%; width: clamp(60px, 7vw, 100px);  aspect-ratio: 3/4; }
.gf-7 { bottom: 6%;  right: 18%;width: clamp(70px, 9vw, 125px);  aspect-ratio: 3/4; }
.gf-8 { bottom: 7%;  right: 2%; width: clamp(85px, 11vw, 155px); aspect-ratio: 2/3; }

.gallery-center {
  position: relative;
  z-index: 2;
  text-align: center;
  max-width: 36ch;
}

.gallery-heading {
  font-size: var(--step-lead);
  font-weight: 400;
  letter-spacing: -0.015em;
  line-height: 1.1;
  color: var(--ink);
  margin-bottom: 0.6em;
}

.gallery-sub {
  font-size: var(--step-body);
  color: var(--muted);
  line-height: 1.6;
  margin-bottom: 1.5rem;
}

.gallery-cta {
  font-size: var(--step-body);
  color: var(--ink);
  border-bottom: 1px solid var(--muted);
  padding-bottom: 1px;
  transition: border-color 0.2s;
}
.gallery-cta:hover { border-color: var(--ink); }

/* ---- SIZE TOOL ---- */
.sizetool {
  background: var(--surface);
  padding: 3rem var(--margin);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.5rem 5rem;
  align-items: start;
}

.sizetool-text h2 {
  font-size: var(--step-head);
  font-weight: 400;
  letter-spacing: -0.02em;
  line-height: 1.1;
  color: var(--ink);
  margin-bottom: 0.5em;
}

.sizetool-text p {
  font-size: var(--step-body);
  color: var(--muted);
  line-height: 1.6;
  max-width: 36ch;
}

.sizetool-form {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.field-row {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  flex: 1;
  min-width: 100px;
}

.field label {
  font-size: var(--step-small);
  color: var(--muted);
}

.field input {
  background: var(--bg);
  border: 1px solid var(--muted);
  color: var(--ink);
  font-family: inherit;
  font-size: var(--step-body);
  padding: 0.6em 0.8em;
  width: 100%;
  outline: none;
  appearance: none;
  -moz-appearance: textfield;
}
.field input:focus { border-color: var(--ink); }
.field input::-webkit-inner-spin-button,
.field input::-webkit-outer-spin-button { -webkit-appearance: none; }

.sizetool-result {
  font-size: var(--step-body);
  color: var(--muted);
  line-height: 1.65;
  min-height: 2em;
}
.sizetool-result strong { color: var(--ink); font-weight: 600; }

/* ---- FEATURES (stepping statements) ---- */
.features-wrap {
  position: relative;
  height: 180vh;
  overflow: clip;
  background: url('https://cdn.shopify.com/s/files/1/0021/1923/7730/products/M1401M.png?v=1652370014&width=2000') center/cover no-repeat;
}
.features-wrap::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(245,240,232,0.48);
  pointer-events: none;
  z-index: 0;
}

.features-sticky {
  position: sticky;
  top: 0;
  height: 100svh;
  overflow: hidden;
  z-index: 1;
}

.features-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  filter: brightness(0.72) contrast(1.03) saturate(0.78);
}

.features-scrim {
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 65%;
  background: linear-gradient(to bottom, rgba(245,240,232,0.6), transparent);
  pointer-events: none;
}

.features-inner {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding-top: clamp(3rem, 10vh, 6rem);
  z-index: 2;
}

.features-label {
  font-size: var(--step-small);
  color: var(--muted);
  margin-bottom: 2rem;
  letter-spacing: 0.04em;
}

.stmts {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
}

.stmt {
  font-size: var(--step-lead);
  font-weight: 400;
  color: var(--muted);
  transition: color 0.35s, font-weight 0.35s;
  text-align: center;
}
.stmt.on {
  color: var(--ink);
  font-weight: 600;
  opacity: 1;
}

/* ---- SHOWCASE ---- */
.showcase-wrap {
  position: relative;
  height: 150vh;
  overflow: clip;
  background: url('https://cdn.shopify.com/s/files/1/0021/1923/7730/products/R2055M.png?v=1658162677&width=2000') center/cover no-repeat;
}
.showcase-wrap::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(245,240,232,0.55);
  pointer-events: none;
  z-index: 0;
}

.showcase-sticky {
  position: sticky;
  top: 0;
  height: 100svh;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 4rem;
  padding: 0 var(--margin);
  overflow: hidden;
  z-index: 1;
}

.showcase-left {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.showcase-right {
  display: flex;
  justify-content: center;
  align-items: center;
}

.showcase-title {
  font-size: var(--step-head);
  font-weight: 400;
  letter-spacing: -0.02em;
  line-height: 1;
  color: var(--ink);
}

.showcase-frame-wrap {
  width: clamp(220px, 28vw, 420px);
  aspect-ratio: 4/5;
  overflow: hidden;
  position: relative;
}

.showcase-frame {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform-origin: center center;
  transition: transform 0.75s cubic-bezier(0.4,0,0.2,1);
}

.showcase-caption {
  font-size: var(--step-body);
  color: var(--muted);
  line-height: 1.65;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.5s, transform 0.5s;
}
.showcase-caption.in {
  opacity: 1;
  transform: none;
}

.showcase-subtitle {
  font-size: var(--step-lead);
  font-weight: 400;
  color: var(--muted);
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.5s 0.1s, transform 0.5s 0.1s;
}
.showcase-subtitle.in {
  opacity: 1;
  transform: none;
}

/* ---- COLLECTIONS STRIP ---- */
.collections {
  padding: var(--gap) var(--margin);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2px;
}

.col-item {
  position: relative;
  overflow: hidden;
  aspect-ratio: 3/4;
  background: var(--surface);
}

.col-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(0.88) contrast(1.05) saturate(1.08);
  transition: transform 0.6s ease, filter 0.4s;
}

.col-item:hover img {
  transform: scale(1.03);
  filter: brightness(0.72) contrast(1.08) saturate(1.1);
}

.col-item::after {
  content: '';
  position: absolute;
  inset: auto 0 0;
  height: 55%;
  background: linear-gradient(to top, rgba(28,24,20,0.72), transparent);
  pointer-events: none;
  z-index: 1;
}

.col-label {
  position: absolute;
  bottom: 1.5rem;
  left: 1.5rem;
  right: 1.5rem;
  z-index: 2;
}

.col-label h3 {
  font-size: var(--step-lead);
  font-weight: 400;
  color: #f5f0e8;
  line-height: 1.1;
  margin-bottom: 0.5rem;
}

.col-label p {
  font-size: var(--step-small);
  color: rgba(245,240,232,0.72);
}

/* ---- ABOUT ---- */
.about {
  padding: var(--gap) var(--margin);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: start;
}

.about-text h2 {
  font-size: var(--step-head);
  font-weight: 400;
  letter-spacing: -0.02em;
  line-height: 1.1;
  margin-bottom: 1.2em;
}

.about-text p {
  font-size: var(--step-body);
  color: var(--ink);
  line-height: 1.65;
  max-width: 44ch;
  margin-bottom: 1em;
}
.about-text p strong { font-weight: 600; }

.about-facts {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  margin-top: 2.5rem;
}

.fact {
  padding: 1rem 0;
  border-bottom: 1px solid rgba(28,24,20,0.12);
}
.fact + .fact { padding-top: 1rem; }

.fact-label {
  font-size: var(--step-small);
  color: var(--muted);
  margin-bottom: 0.3em;
}

.fact-value {
  font-size: var(--step-body);
  color: var(--ink);
}

.trade-card {
  background: var(--surface);
  padding: 2.5rem;
}

.trade-card h3 {
  font-size: var(--step-head);
  font-weight: 400;
  letter-spacing: -0.02em;
  line-height: 1.1;
  margin-bottom: 0.6em;
}

.trade-card p {
  font-size: var(--step-body);
  color: var(--muted);
  line-height: 1.6;
  max-width: 32ch;
  margin-bottom: 1.5rem;
}

.trade-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  margin-bottom: 2.5rem;
}
.trade-list li {
  font-size: var(--step-body);
  color: var(--muted);
  display: flex;
  gap: 0.75em;
}
.trade-list li::before {
  content: '→';
  color: var(--accent);
  flex-shrink: 0;
}

/* ---- CTA ---- */
.cta {
  padding: var(--gap) var(--margin);
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 4rem;
}

.cta-content {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.cta-visual {
  aspect-ratio: 3/4;
  overflow: hidden;
  max-height: 60svh;
}

.cta-visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(0.88) contrast(1.05) saturate(1.08);
}

.cta h2 {
  font-size: var(--step-lead);
  font-weight: 400;
  color: var(--ink);
  max-width: 32ch;
  line-height: 1.4;
  margin-bottom: 1.5rem;
  letter-spacing: -0.01em;
}

.cta-row {
  display: flex;
  gap: 1.25rem;
  flex-wrap: wrap;
  align-items: center;
}

.cta-link {
  font-size: var(--step-body);
  color: var(--muted);
  border-bottom: 1px solid var(--muted);
  padding-bottom: 1px;
  transition: color 0.2s, border-color 0.2s;
}
.cta-link:hover { color: var(--ink); border-color: var(--ink); }

/* ---- FOOTER ---- */
footer {
  position: relative;
  height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 2rem var(--margin);
  overflow: hidden;
  --ink:    #f5f0e8;
  --muted:  #9c9ea3;
  background: #1c1814;
}

.footer-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  filter: brightness(0.3) contrast(1.1);
  z-index: 0;
}

.footer-top,
.footer-wordmark-wrap,
.footer-bottom {
  position: relative;
  z-index: 1;
}

.footer-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 2rem;
}

.footer-nav {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}
.footer-nav a {
  font-size: var(--step-body);
  color: var(--muted);
  transition: color 0.2s;
}
.footer-nav a:hover { color: var(--ink); }

.footer-contact {
  font-style: normal;
  font-size: var(--step-body);
  color: var(--muted);
  line-height: 1.8;
  text-align: right;
}
.footer-contact a { border-bottom: 1px solid var(--muted); padding-bottom: 1px; }

.footer-wordmark-wrap {
  flex: 1;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 1rem 0;
}

.footer-wordmark {
  font-size: clamp(2.5rem, 13vw, 13rem);
  font-weight: 400;
  letter-spacing: -0.02em;
  line-height: 0.9;
  color: var(--ink);
  text-align: center;
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.footer-bottom p,
.footer-bottom a {
  font-size: var(--step-small);
  color: var(--muted);
}

/* ---- MOBILE ---- */
@media (max-width: 600px) {
  .nav-links { display: none; }

  .hero {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto auto auto;
    padding: 5.5rem var(--margin) 2.5rem;
    min-height: 100svh;
    gap: 1.5rem;
  }
  .hero-name {
    grid-column: 1;
    grid-row: 1;
    font-size: clamp(3.5rem, 15vw, 7rem);
    padding-top: 0;
    padding-bottom: 0;
  }
  .hero-eyeline {
    grid-column: 1;
    grid-row: 2;
    align-self: start;
    padding-bottom: 0;
  }
  .hero-rug {
    grid-column: 1;
    grid-row: 3;
    width: 65vw;
    max-height: 50svh;
    object-fit: cover;
    justify-self: center;
    align-self: end;
  }
  .hero-left {
    grid-column: 1;
    grid-row: 4;
    align-items: flex-start;
    padding-bottom: 0;
  }

  .gf-2, .gf-3, .gf-6, .gf-7 { display: none; }
  .gf-1 { width: 22vw; }
  .gf-4 { width: 22vw; }
  .gf-5 { width: 20vw; }
  .gf-8 { width: 20vw; }

  .sizetool {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .collections {
    grid-template-columns: 1fr;
    gap: 2px;
  }
  .col-item { aspect-ratio: 4/3; }

  .about {
    grid-template-columns: 1fr;
    gap: 3rem;
  }

  .showcase-sticky {
    grid-template-columns: 1fr;
    padding: 2rem var(--margin);
    gap: 2rem;
  }
  .showcase-frame-wrap { width: 60vw; justify-self: center; }
  .showcase-caption { text-align: center; }

  .cta { grid-template-columns: 1fr; gap: 2rem; }
  .cta-visual { aspect-ratio: 3/2; max-height: 220px; }

  .footer-top { flex-direction: column; }
  .footer-contact { text-align: left; }
  .footer-wordmark { font-size: clamp(2.5rem, 14vw, 6rem); }
}

@media (max-width: 480px) {
  :root { --margin: 1rem; }
}

@media (min-width: 601px) and (max-width: 900px) {
  .hero {
    grid-template-rows: auto auto auto;
  }
  .hero-name {
    grid-column: 1;
    grid-row: 1;
    font-size: clamp(2.5rem, 7vw, 5rem);
    padding-top: 0;
    padding-bottom: 0.2em;
  }
  .hero-eyeline {
    grid-row: 2;
    align-self: start;
    padding-bottom: 0;
  }
  .hero-left {
    grid-row: 3;
    align-items: flex-start;
    padding-bottom: 0.5rem;
  }
  .hero-rug {
    grid-row: 1 / 4;
  }
}


.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
}

/* Product links retain the reference image frames and filters. */
.hero-rug, .gf, .showcase-frame-wrap, .cta-visual { display: block; }
.hero-rug > img, .gf > img { width: 100%; height: 100%; object-fit: cover; object-position: center top; }
.gf { pointer-events: auto; }
a:focus-visible { outline: 2px solid var(--ink); outline-offset: 5px; }

/* Keep the scroll stories centered and pinned while their states change. */
.features-inner { justify-content: center; padding: 2rem var(--margin); }
.features-scrim {
  inset: 0; height: 100%;
  background: radial-gradient(ellipse at center, rgba(245,240,232,.94) 10%, rgba(245,240,232,.86) 55%, rgba(245,240,232,.32));
}
@media (max-width: 600px) {
  .showcase-sticky { grid-template-rows: auto auto; align-content: center; gap: 1.25rem; }
  .showcase-left { gap: .85rem; text-align: center; }
  .showcase-frame-wrap { width: min(60vw, 30svh); }
  .showcase-caption { line-height: 1.4; }
  .features-label { margin-bottom: 1.25rem; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero-rug, .hero-name { animation: none; }
  .stmt, .showcase-frame, .showcase-caption, .showcase-subtitle { transition: none; }
  .showcase-caption, .showcase-subtitle { opacity: 1; transform: none; }
}
