/* ==========================================================================
   P10 DENIM — Design tokens
   ========================================================================== */
:root {
  --ink: #12172a; /* near-black indigo — primary dark */
  --ink-soft: #1e2540; /* raised dark panels */
  --denim: #2b3b63; /* rich indigo — brand core */
  --denim-deep: #202c4c;
  /* --ecru: #f1ece0; warm bone background */
  --ecru: #fff; /* warm bone background */
  --ecru-dim: #e7e0d0;
  --paper: #faf7f0;
  --brass: #a67c3d; /* hardware / rivet accent */
  --brass-dim: #8c6a34;
  --selvedge-red: #9c3b3b;
  --selvedge-yellow: #c9a44c;
  --selvedge-green: #4f6b4a;
  --fog: #b9b3a4; /* muted on light */
  --fog-dark: #545b76; /* muted on dark */
  --line: #d8d0be; /* hairline on light */
  --line-dark: #333b5c; /* hairline on dark */

  --font-display: "Fraunces", Georgia, serif;
  --font-body: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --font-mono: "Space Mono", "Courier New", monospace;

  --edge: 10px; /* selvedge stripe width */
  --maxw: 1180px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
}
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}

body {
  margin: 0;
  background: var(--ecru);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  padding-left: var(--edge);
}

img {
  max-width: 100%;
  display: block;
}
a {
  color: inherit;
  text-decoration: none;
}
ul {
  margin: 0;
  padding: 0;
  list-style: none;
}
h1,
h2,
h3,
h4 {
  font-family: var(--font-display);
  margin: 0;
  font-weight: 600;
  letter-spacing: -0.01em;
}
p {
  margin: 0;
}

:focus-visible {
  outline: 2px solid var(--brass);
  outline-offset: 3px;
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--brass-dim);
}
.eyebrow.on-dark {
  color: var(--selvedge-yellow);
}

/* ==========================================================================
   Selvedge stripe — signature element, fixed left edge on every page
   ========================================================================== */
.selvedge {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: var(--edge);
  z-index: 999;
  display: flex;
  flex-direction: column;
}
.selvedge span {
  flex: 1;
}
.selvedge span:nth-child(1) {
  background: var(--paper);
}
.selvedge span:nth-child(2) {
  background: #02213C;
}
.selvedge span:nth-child(3) {
  background: #6890B1;
}
.selvedge span:nth-child(4) {
  background: #A4C3E4;
}
.selvedge span:nth-child(5) {
  background: #E3EAF2;
}
.selvedge span:nth-child(6) {
  background: var(--paper);
}

/* ==========================================================================
   Layout helpers
   ========================================================================== */
.wrap {
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: clamp(20px, 5vw, 64px);
}
.section {
  padding-block: clamp(56px, 9vw, 108px);
}
.section.tight {
  padding-block: clamp(36px, 5vw, 56px);
}
.on-dark {
  background: var(--ink);
  color: var(--ecru);
}
.on-brand {
  background: var(--denim);
  color: var(--ecru);
}

.grid {
  display: grid;
  gap: 32px;
}
.grid.cols-2 {
  grid-template-columns: repeat(2, 1fr);
}
.grid.cols-3 {
  grid-template-columns: repeat(3, 1fr);
}
.grid.cols-4 {
  grid-template-columns: repeat(4, 1fr);
}
@media (max-width: 900px) {
  .grid.cols-2,
  .grid.cols-3,
  .grid.cols-4 {
    grid-template-columns: 1fr;
  }
}

.divider {
  border: none;
  border-top: 1px solid var(--line);
  margin: 0;
}
.on-dark .divider {
  border-top-color: var(--line-dark);
}

/* ==========================================================================
   Header / Nav
   ========================================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 500;
  /* background: rgba(241, 236, 224, 0.92); */
  background: #fff;
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-block: 14px;
}
.brand-mark {
  display: flex;
  align-items: center;
  gap: 12px;
}
.patch {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--ink);
  border: 1px solid var(--brass);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1rem;
  color: var(--ecru);
  position: relative;
}
.patch::after {
  content: "";
  position: absolute;
  inset: 4px;
  border: 1px dashed rgba(230, 214, 178, 0.35);
  border-radius: 50%;
}
.brand-name {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}
.brand-name small {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.16em;
  color: var(--fog);
  font-weight: 400;
}

.nav-links {
  display: flex;
  gap: 30px;
  align-items: center;
}
.nav-links a {
  font-size: 0.92rem;
  font-weight: 600;
  position: relative;
  padding-bottom: 4px;
}
.nav-links a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 100%;
  bottom: 0;
  height: 2px;
  background: var(--brass);
  transition: right 0.25s ease;
}
.nav-links a:hover::after,
.nav-links a[aria-current="page"]::after {
  right: 0;
}
.nav-links a[aria-current="page"] {
  color: var(--denim);
}

.nav-cta {
  background: var(--ink);
  color: var(--ecru) !important;
  padding: 10px 18px;
  border-radius: 2px;
  font-size: 0.85rem !important;
}
.nav-cta::after {
  display: none;
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  width: 32px;
  height: 24px;
  position: relative;
}
.nav-toggle span {
  position: absolute;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--ink);
  transition: transform 0.2s ease, opacity 0.2s ease;
}
.nav-toggle span:nth-child(1) {
  top: 0;
}
.nav-toggle span:nth-child(2) {
  top: 11px;
}
.nav-toggle span:nth-child(3) {
  top: 22px;
}

@media (max-width: 820px) {
  .nav-toggle {
    display: block;
  }
  .nav-links {
    position: fixed;
    top: 73px;
    left: var(--edge);
    right: 0;
    bottom: 0;
    background-color: #fff !important;
    /* flex-direction: column; */
    align-items: flex-start;
    padding: 32px clamp(20px, 5vw, 64px);
    gap: 22px;
    transform: translateX(100%);
    transition: transform 0.3s ease;
  }
  .nav-links.open {
    transform: translateX(0);
  }
  .nav-links a {
    font-size: 1.1rem;
  }
}

/* ==========================================================================
   Buttons
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 26px;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.9rem;
  letter-spacing: 0.02em;
  border-radius: 2px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease,
    border-color 0.2s ease;
}
.btn:hover {
  transform: translateY(-2px);
}
.btn-primary {
  background: var(--ink);
  color: var(--ecru);
}
.btn-primary:hover {
  background: var(--denim);
}
.btn-ghost {
  background: transparent;
  border-color: currentColor;
}
.btn-brass {
  background: var(--brass);
  color: var(--ink);
}
.btn-brass:hover {
  background: var(--selvedge-yellow);
}

/* ==========================================================================
   Hero
   ========================================================================== */
.hero {
  position: relative;
  padding-block: clamp(70px, 12vw, 90px) clamp(60px, 8vw, 96px);
  overflow: hidden;
}
.hero .wrap {
  position: relative;
  z-index: 2;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 56px;
  align-items: end;
}
@media (max-width: 900px) {
  .hero-grid {
    grid-template-columns: 1fr;
  }
}

.hero h1 {
  font-size: clamp(2.6rem, 6vw, 4.6rem);
  line-height: 1.02;
  margin-top: 18px;
}
.hero h1 em {
  font-style: italic;
  color: var(--denim);
}
.hero-sub {
  margin-top: 22px;
  max-width: 50ch;
  font-size: 1.08rem;
  color: #3a3f52;
}
.hero-actions {
  display: flex;
  gap: 16px;
  margin-top: 34px;
  flex-wrap: wrap;
}

/* .weave-panel{
  aspect-ratio: 4 / 5;
  border-radius:2px;
  background:
    repeating-linear-gradient(90deg, rgba(255,255,255,0.05) 0 2px, transparent 2px 6px),
    repeating-linear-gradient(0deg, rgba(0,0,0,0.12) 0 2px, transparent 2px 6px),
    linear-gradient(155deg, var(--denim) 0%, var(--denim-deep) 55%, var(--ink) 100%);
  position:relative;
  border:1px solid var(--line-dark);
} */
.weave-panel::before {
  content: "P10";
  position: absolute;
  right: 18px;
  bottom: 16px;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  color: rgba(241, 236, 224, 0.55);
}
.weave-panel .tag {
  position: absolute;
  top: 20px;
  left: 20px;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.08em;
  padding: 6px 10px;
  border: 1px solid var(--line);
}

.hero-stats {
  display: flex;
  gap: 38px;
  margin-top: 52px;
  flex-wrap: wrap;
}
.hero-stats div {
  min-width: 120px;
}
.hero-stats strong {
  display: block;
  font-family: var(--font-display);
  font-size: 2rem;
}
.hero-stats span {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--fog-dark);
}

/* ==========================================================================
   Fabric swatch cards (used across products/home)
   ========================================================================== */
.swatch-card {
  border: 1px solid var(--line);
  background: var(--paper);
  padding: 0;
  display: flex;
  flex-direction: column;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.swatch-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 18px 34px -22px rgba(18, 23, 42, 0.4);
}
.swatch {
  aspect-ratio: 5/4;
  position: relative;
  border-bottom: 1px solid var(--line);
}
.swatch.raw {
  background: repeating-linear-gradient(100deg, #293b63 0 3px, #22304f 3px 7px);
}
.swatch.black {
  background: repeating-linear-gradient(100deg, #1b1d22 0 3px, #101114 3px 7px);
}
.swatch.stone {
  background: repeating-linear-gradient(100deg, #8c8474 0 3px, #7b7362 3px 7px);
}
.swatch.rinse {
  background: repeating-linear-gradient(100deg, #38507e 0 3px, #2e4268 3px 7px);
}
.swatch-label {
  position: absolute;
  bottom: 10px;
  left: 10px;
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.1em;
  color: rgba(241, 236, 224, 0.85);
  text-transform: uppercase;
}
.swatch-body {
  padding: 20px 20px 24px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.swatch-body h3 {
  font-size: 1.15rem;
}
.swatch-specs {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--fog-dark);
  margin-top: auto;
  padding-top: 10px;
}

/* ==========================================================================
   Process steps (About page — real sequence, numbering justified)
   ========================================================================== */
.process {
  counter-reset: step;
}
.process-step {
  counter-increment: step;
  display: grid;
  grid-template-columns: 70px 1fr;
  gap: 24px;
  padding-block: 28px;
  border-top: 1px solid var(--line);
}
.process-step:last-child {
  border-bottom: 1px solid var(--line);
}
.process-step::before {
  content: counter(step, decimal-leading-zero);
  font-family: var(--font-mono);
  font-size: 1.1rem;
  color: var(--brass-dim);
}

/* ==========================================================================
   Value / feature cards
   ========================================================================== */
.feature {
  padding: 26px 0 0;
  border-top: 1px solid var(--line-dark);
}
.on-dark .feature {
  border-top-color: var(--line-dark);
}
.feature h3 {
  font-size: 1.1rem;
  margin-bottom: 10px;
}
.feature p {
  color: var(--fog-dark);
  font-size: 0.95rem;
}

/* ==========================================================================
   Quote / callout
   ========================================================================== */
.callout {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3vw, 2.1rem);
  line-height: 1.3;
  /* max-width:24ch; */
}

/* ==========================================================================
   Forms (contact page)
   ========================================================================== */
.form-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 22px;
}
.form-field label {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--fog-dark);
}
.form-field input,
.form-field select,
.form-field textarea {
  font-family: var(--font-body);
  font-size: 1rem;
  padding: 13px 14px;
  border: 1px solid var(--line);
  background: var(--paper);
  color: var(--ink);
  border-radius: 2px;
}
.form-field textarea {
  resize: vertical;
  min-height: 120px;
}
.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
  border-color: var(--brass);
}

.contact-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
@media (max-width: 640px) {
  .contact-row {
    grid-template-columns: 1fr;
  }
}

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer {
  padding-block: 48px 40px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 32px;
}
@media (max-width: 820px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}
.footer-grid h4 {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--fog);
  margin-bottom: 16px;
  font-weight: 400;
}
.footer-grid ul li {
  margin-bottom: 10px;
}
.footer-grid a:hover {
  color: var(--selvedge-yellow);
}
.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 40px;
  padding-top: 24px;
  border-top: 1px solid var(--line-dark);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--fog);
  flex-wrap: wrap;
  gap: 10px;
}

/* ==========================================================================
   Reveal on scroll
   ========================================================================== */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ==========================================================================
   Page hero (interior pages)
   ========================================================================== */
.page-hero {
  padding-block: clamp(56px, 9vw, 86px) clamp(40px, 6vw, 60px);
}
.page-hero h1 {
  font-size: clamp(2.2rem, 5vw, 3.4rem);
  margin-top: 14px;
}
.page-hero p {
  /* max-width: 60ch; */
  margin-top: 18px;
  color: var(--fog-dark);
  font-size: 1.05rem;
}
.on-dark .page-hero p,
.on-brand .page-hero p {
  color: #cfc9e0;
}

.breadcrumb {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  color: var(--brass-dim);
  text-transform: uppercase;
}
