/* LoomStudio — Copenhagen Quiet-Luxury Mill B2B Stylesheet
   Palette harmonized with studio knitwear photography (hero_banner.png) */
@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;500&family=Newsreader:ital,opsz,wght@0,6..72,400;0,6..72,500;1,6..72,400&family=Plus+Jakarta+Sans:wght@400;500;600;700&display=swap');

:root {
  --bg: #F4F3EF;
  --surface: #EAE8E1;
  --surface-card: #FAF9F6;
  --ink: #1A1E22;
  --ink-soft: #3B4249;
  --muted: #666C70;
  --line: #D8D5CC;
  --line-strong: #BEB9AC;
  --accent: #273545;
  --accent-hover: #1B2632;
  --accent-warm: #5D6153;
  --ok: #2E4A3B;
  --err: #8A2C2C;
  --font-display: 'Newsreader', Georgia, 'Times New Roman', serif;
  --font-body: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, monospace;
  --radius: 2px;
  --container: 1280px;
  --gutter: clamp(1.25rem, 3.5vw, 3rem);
  --section-y: clamp(4.25rem, 7.5vw, 6.75rem);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
body.modal-open { overflow: hidden; }
img, svg, video { display: block; max-width: 100%; }
picture { display: flex; flex: 1; width: 100%; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }

/* Anti-spam honeypot */
.hp-trap {
  position: absolute !important; left: -9999px !important; width: 1px !important;
  height: 1px !important; overflow: hidden !important; opacity: 0 !important; pointer-events: none !important;
}

/* Containers & Sections */
.container, .wrap { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: var(--gutter); }
.section { padding-block: var(--section-y); border-top: 1px solid var(--line); }
.section--surface { background: var(--surface); }
.section--flush { border-top: 0; }

/* Editorial Typography */
.eyebrow, .kicker {
  display: inline-block; margin: 0 0 1rem;
  font-family: var(--font-mono); font-size: 0.72rem; font-weight: 500;
  letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted);
}
h1, h2, h3, .display-title {
  margin: 0; font-family: var(--font-display); font-weight: 400;
  letter-spacing: -0.02em; line-height: 1.12; color: var(--ink);
}
h1, .hero-title { font-size: clamp(2.4rem, 4.8vw, 4.15rem); line-height: 1.06; }
h2, .section-title { font-size: clamp(1.85rem, 3.2vw, 2.8rem); }
h3 { font-size: clamp(1.22rem, 1.8vw, 1.52rem); line-height: 1.25; }
.lead, .section-intro { font-size: clamp(1rem, 1.2vw, 1.12rem); color: var(--ink-soft); max-width: 60ch; margin: 1.1rem 0 0; }
.section-head {
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end;
  gap: 1.5rem 2.5rem; margin-bottom: clamp(2.25rem, 4.5vw, 3.5rem);
}
.section-head__copy { max-width: 660px; }

/* Buttons & Links */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.6rem;
  padding: 0.85rem 1.5rem; border: 1px solid var(--accent); border-radius: var(--radius);
  font-size: 0.86rem; font-weight: 500; letter-spacing: 0.02em; cursor: pointer;
  background: var(--accent); color: #F4F3EF;
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}
.btn:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.btn:disabled { opacity: 0.55; cursor: not-allowed; }
.btn--ghost, .btn-outline { background: transparent; color: var(--ink); border-color: var(--line-strong); }
.btn--ghost:hover, .btn-outline:hover { background: var(--surface); border-color: var(--ink); color: var(--ink); }
.btn--subtle { background: var(--surface); color: var(--ink); border-color: var(--line); }
.btn--subtle:hover { background: #E1DED5; border-color: var(--line-strong); }
.link-arrow {
  display: inline-flex; align-items: center; gap: 0.45rem; font-size: 0.84rem; font-weight: 600;
  letter-spacing: 0.03em; border-bottom: 1px solid var(--ink); padding-bottom: 0.2rem; transition: opacity 0.2s ease;
}
.link-arrow:hover { opacity: 0.65; }

/* Sticky Header & Mobile Drawer */
.site-header {
  position: sticky; top: 0; z-index: 60;
  background: rgba(244, 243, 239, 0.94); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; min-height: 74px; }
.brand-mark { display: inline-flex; align-items: center; gap: 0.75rem; font-family: var(--font-display); font-size: 1.3rem; }
.brand-mark img { width: 30px; height: 30px; object-fit: cover; border-radius: var(--radius); }
.site-nav { display: flex; align-items: center; gap: 2rem; }
.site-nav a { font-size: 0.86rem; font-weight: 500; color: var(--ink-soft); transition: color 0.18s ease; }
.site-nav a:hover, .site-nav a.is-active { color: var(--ink); }
.header-actions { display: flex; align-items: center; gap: 0.75rem; }
.nav-toggle {
  display: none; align-items: center; justify-content: center; width: 42px; height: 42px;
  background: transparent; border: 1px solid var(--line-strong); border-radius: var(--radius); cursor: pointer;
}
#mobileNav {
  display: none; position: fixed; inset: 74px 0 0 0; z-index: 55;
  background: var(--bg); border-top: 1px solid var(--line);
  padding: 2rem var(--gutter); flex-direction: column; gap: 0.25rem; overflow-y: auto;
}
#mobileNav.is-open { display: flex; }
#mobileNav a { padding: 1rem 0; border-bottom: 1px solid var(--line); font-family: var(--font-display); font-size: 1.45rem; }
#mobileNav .mobile-nav-cta { margin-top: 1.5rem; display: flex; flex-direction: column; gap: 0.75rem; }

/* Editorial Asymmetric Hero */
.hero { padding-block: clamp(2.75rem, 5.5vw, 4.75rem) clamp(3.5rem, 6vw, 5.5rem); }
.hero-grid {
  display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1.15fr);
  gap: clamp(2rem, 5vw, 4.5rem); align-items: start;
}
.hero-copy { padding-top: clamp(0.25rem, 2vw, 1.25rem); }
.hero-copy h1 em, .hero-accent { font-style: italic; color: var(--accent); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.85rem; margin-top: 2rem; }
.hero-meta {
  display: flex; flex-wrap: wrap; gap: 0.6rem 1.75rem; margin-top: 2.25rem; padding-top: 1.25rem;
  border-top: 1px solid var(--line); font-family: var(--font-mono); font-size: 0.74rem; color: var(--muted);
}

/* Image Framing Hygiene — strict aspect ratio, align-self: start, zero filler boxes */
.media-frame, .hero-media, .card-media, .editorial-media {
  position: relative; align-self: start; width: 100%; aspect-ratio: 4 / 3; overflow: hidden;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
}
.hero-media { aspect-ratio: 3 / 2; }
.media-frame img, .hero-media img, .card-media img, .editorial-media img {
  width: 100%; height: 100%; object-fit: cover; object-position: center;
  transition: transform 0.65s cubic-bezier(0.22, 1, 0.36, 1);
}
.media-caption {
  display: flex; justify-content: space-between; gap: 1rem; margin-top: 0.65rem;
  font-family: var(--font-mono); font-size: 0.72rem; color: var(--muted);
}

/* Architectural Fact Strip */
.fact-strip {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--surface-card);
}
.fact-cell { padding: 1.6rem 1.5rem; border-right: 1px solid var(--line); }
.fact-cell:last-child { border-right: 0; }
.fact-val { display: block; font-family: var(--font-display); font-size: clamp(1.35rem, 2.2vw, 1.85rem); line-height: 1.15; }
.fact-lbl {
  display: block; margin-top: 0.35rem; font-family: var(--font-mono);
  font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted);
}

/* Gallery Lookbook Product Showcase */
.catalog-grid, .lookbook-grid, .blog-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.75rem; }
.catalog-grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.product-card, .lookbook-card {
  display: flex; flex-direction: column; background: var(--surface-card);
  border: 1px solid var(--line); border-radius: var(--radius);
  transition: background-color 0.25s ease, border-color 0.25s ease;
}
.product-card:hover, .lookbook-card:hover { background: var(--surface); border-color: var(--line-strong); }
.product-card:hover .card-media img, .lookbook-card:hover .card-media img { transform: scale(1.03); }
.card-body { display: flex; flex-direction: column; flex: 1; padding: 1.4rem 1.45rem 1.55rem; }
.card-code {
  font-family: var(--font-mono); font-size: 0.72rem; color: var(--muted);
  letter-spacing: 0.08em; text-transform: uppercase; margin-bottom: 0.5rem;
}
.card-title { font-size: 1.32rem; margin-bottom: 0.6rem; }
.card-desc { font-size: 0.9rem; color: var(--ink-soft); margin: 0 0 1.15rem; }
.card-specs {
  list-style: none; margin: auto 0 1.25rem; padding: 0.9rem 0 0; border-top: 1px solid var(--line);
  display: grid; gap: 0.35rem; font-size: 0.82rem; color: var(--ink-soft);
}
.card-footer {
  display: flex; align-items: center; justify-content: space-between; gap: 0.75rem;
  padding-top: 0.9rem; border-top: 1px solid var(--line);
}

/* Sticky Split-Screen Factory Narrative */
.split-sticky {
  display: grid; grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  gap: clamp(2rem, 5vw, 5rem); align-items: start;
}
.sticky-col { position: sticky; top: 104px; }
.narrative-stack { display: grid; gap: 2.5rem; }
.narrative-block { padding-bottom: 2.25rem; border-bottom: 1px solid var(--line); }
.narrative-block:last-child { border-bottom: 0; padding-bottom: 0; }
.cert-list { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 1.5rem; }
.cert-chip {
  font-family: var(--font-mono); font-size: 0.74rem; padding: 0.38rem 0.7rem;
  border: 1px solid var(--line-strong); border-radius: var(--radius); background: var(--surface-card); color: var(--ink-soft);
}

/* Specification Ledger Table */
.ledger-wrap { width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.spec-ledger, .spec-table {
  width: 100%; border-collapse: collapse; background: var(--surface-card);
  border-top: 1px solid var(--ink); border-bottom: 1px solid var(--ink); font-size: 0.9rem;
}
.spec-ledger th, .spec-ledger td, .spec-table th, .spec-table td {
  padding: 1.05rem 1.25rem; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line);
}
.spec-ledger th, .spec-table th {
  font-family: var(--font-mono); font-size: 0.74rem; font-weight: 500;
  text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); background: var(--surface);
}
.spec-ledger td:first-child, .spec-table td:first-child { font-weight: 600; color: var(--ink); width: 30%; }
.spec-ledger tbody tr:hover, .spec-table tbody tr:hover { background: var(--bg); }

/* Interactive Zero-Price Specification & Lead-Time Configurator */
#specConfigurator { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.9fr); gap: 2rem; align-items: start; }
.cfg-controls {
  display: grid; gap: 1.65rem; padding: 2rem; background: var(--surface-card);
  border: 1px solid var(--line); border-radius: var(--radius);
}
.cfg-group-label {
  display: block; font-family: var(--font-mono); font-size: 0.74rem;
  letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); margin-bottom: 0.75rem;
}
.cfg-options { display: flex; flex-wrap: wrap; gap: 0.55rem; }
.cfg-btn {
  padding: 0.65rem 1.05rem; background: var(--bg); border: 1px solid var(--line-strong);
  border-radius: var(--radius); font-size: 0.84rem; font-weight: 500; color: var(--ink-soft); cursor: pointer;
  transition: background-color 0.18s ease, color 0.18s ease, border-color 0.18s ease;
}
.cfg-btn:hover { border-color: var(--ink); color: var(--ink); }
.cfg-btn.is-active, .cfg-btn[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: #F4F3EF; }
.cfg-panel {
  position: sticky; top: 104px; padding: 2rem; background: var(--surface);
  border: 1px solid var(--line-strong); border-radius: var(--radius);
}
.cfg-metrics {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem;
  padding-block: 1.25rem; margin-block: 1rem; border-top: 1px solid var(--line-strong); border-bottom: 1px solid var(--line-strong);
}
.cfg-metric-lbl {
  display: block; font-family: var(--font-mono); font-size: 0.7rem;
  text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted);
}
.cfg-metric-val { display: block; margin-top: 0.25rem; font-family: var(--font-display); font-size: 1.3rem; color: var(--ink); }
.cfg-note-row { margin: 0.85rem 0; font-size: 0.86rem; color: var(--ink-soft); }
.cfg-note-row strong {
  display: block; color: var(--ink); font-size: 0.76rem; font-family: var(--font-mono);
  text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 0.2rem;
}
.cfg-summary {
  margin: 1.25rem 0 1.5rem; padding: 1rem; background: var(--surface-card);
  border-left: 2px solid var(--accent); font-size: 0.84rem; color: var(--ink-soft);
}

/* 6-Stage OEM Process & FAQ Accordion */
.process-grid {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  border-top: 1px solid var(--line); border-left: 1px solid var(--line);
}
.process-step { padding: 1.85rem 1.6rem; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--surface-card); }
.process-num { font-family: var(--font-mono); font-size: 0.76rem; color: var(--muted); margin-bottom: 0.85rem; }
.process-step h3 { font-size: 1.22rem; margin-bottom: 0.55rem; }
.process-step p { margin: 0; font-size: 0.88rem; color: var(--ink-soft); }

.faq-list { border-top: 1px solid var(--line-strong); }
.faq-item { border-bottom: 1px solid var(--line); }
.faq-item summary {
  list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 1.5rem;
  padding: 1.35rem 0; font-family: var(--font-display); font-size: 1.22rem; cursor: pointer;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; font-family: var(--font-mono); font-size: 1.1rem; color: var(--muted); flex-shrink: 0; }
.faq-item[open] summary::after { content: "−"; color: var(--ink); }
.faq-answer { padding: 0 0 1.45rem; max-width: 72ch; font-size: 0.94rem; color: var(--ink-soft); }

/* Blog Article Prose Typography & Responsive Tables */
.b2b-article-body, article.prose { max-width: 76ch; font-size: 1rem; line-height: 1.78; color: var(--ink-soft); }
.b2b-article-body h2, article h2 { margin: 2.5rem 0 0.85rem; font-size: clamp(1.5rem, 2.4vw, 2rem); }
.b2b-article-body h3, article h3 { margin: 1.9rem 0 0.65rem; font-size: 1.28rem; }
.b2b-article-body p, article p { margin: 0 0 1.25rem; }
.b2b-article-body ul, .b2b-article-body ol, article ul, article ol { margin: 0 0 1.4rem; padding-left: 1.35rem; }
.b2b-article-body li, article li { margin-bottom: 0.45rem; }
.b2b-article-body blockquote, article blockquote {
  margin: 1.8rem 0; padding: 1.1rem 1.4rem; border-left: 2px solid var(--accent);
  background: var(--surface); font-family: var(--font-display); font-style: italic; color: var(--ink);
}
.b2b-article-body table, article table {
  display: block; width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch;
  border-collapse: collapse; margin: 2rem 0; font-size: 0.88rem;
  background: var(--surface-card); border: 1px solid var(--line-strong);
}
.b2b-article-body table th, article table th, .b2b-article-body table td, article table td {
  padding: 0.85rem 1.1rem; border: 1px solid var(--line); text-align: left; vertical-align: top;
}
.b2b-article-body table th, article table th {
  background: var(--surface); font-family: var(--font-mono); font-size: 0.74rem;
  text-transform: uppercase; letter-spacing: 0.06em; color: var(--ink); white-space: nowrap;
}

/* Sticky Inquiry / RFQ Section */
.rfq-grid {
  display: grid; grid-template-columns: minmax(0, 0.88fr) minmax(0, 1.12fr);
  gap: clamp(2rem, 5vw, 4.5rem); align-items: start;
}
.rfq-card {
  padding: clamp(1.5rem, 3vw, 2.5rem); background: var(--surface-card);
  border: 1px solid var(--line-strong); border-radius: var(--radius);
}
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.1rem; }
.field { display: flex; flex-direction: column; gap: 0.4rem; margin-bottom: 1rem; }
.field--full { grid-column: 1 / -1; }
.field label {
  font-family: var(--font-mono); font-size: 0.72rem; text-transform: uppercase;
  letter-spacing: 0.07em; color: var(--ink-soft);
}
.field input, .field select, .field textarea {
  width: 100%; padding: 0.78rem 0.9rem; background: var(--bg);
  border: 1px solid var(--line-strong); border-radius: var(--radius); font-size: 0.92rem;
  transition: border-color 0.18s ease, background-color 0.18s ease;
}
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--accent); background: #FFFFFF; }
.field textarea { min-height: 132px; resize: vertical; }
.form-feedback { display: none; padding: 0.85rem 1rem; margin-bottom: 1rem; border-radius: var(--radius); font-size: 0.86rem; }
.form-feedback.is-error { display: block; background: #F7ECEC; border: 1px solid #D9B3B3; color: var(--err); }
.form-success {
  display: none; padding: 1.4rem; background: #EDF2EE;
  border: 1px solid #B8CCBE; border-radius: var(--radius); color: var(--ok);
}
.form-success.is-visible { display: block; }
#rfqCode { font-family: var(--font-mono); font-weight: 600; color: var(--ink); }

/* WhatsApp Modal, Floating CTA & GDPR Cookie Banner */
#waModal {
  display: none; position: fixed; inset: 0; z-index: 100; align-items: center; justify-content: center;
  padding: 1.25rem; background: rgba(26, 30, 34, 0.56); backdrop-filter: blur(3px);
}
#waModal.is-open { display: flex; }
.modal-panel {
  position: relative; width: 100%; max-width: 480px; padding: 2rem;
  background: var(--surface-card); border: 1px solid var(--line-strong); border-radius: var(--radius);
}
.modal-close {
  position: absolute; top: 1rem; right: 1rem; width: 36px; height: 36px;
  background: transparent; border: 1px solid var(--line); border-radius: var(--radius); cursor: pointer; color: var(--ink);
}
.wa-float {
  position: fixed; right: 1.5rem; bottom: 1.5rem; z-index: 50; display: inline-flex; align-items: center; gap: 0.55rem;
  padding: 0.78rem 1.2rem; background: var(--ink); color: #F4F3EF; border: 1px solid var(--ink);
  border-radius: var(--radius); font-size: 0.82rem; font-weight: 500; cursor: pointer; transition: background-color 0.2s ease;
}
.wa-float:hover { background: var(--accent); border-color: var(--accent); }

#cookieBanner {
  position: fixed; left: 1.5rem; bottom: 1.5rem; z-index: 48; max-width: 420px; padding: 1.15rem 1.25rem;
  background: var(--surface-card); border: 1px solid var(--line-strong); border-radius: var(--radius);
  font-size: 0.82rem; color: var(--ink-soft);
}
#cookieBanner.is-hidden { display: none; }
.cookie-actions { display: flex; gap: 0.6rem; margin-top: 0.85rem; }
.cookie-actions .btn { padding: 0.5rem 0.95rem; font-size: 0.78rem; }

/* Footer */
.site-footer { border-top: 1px solid var(--line-strong); background: var(--surface); padding-block: 4rem 2.25rem; }
.footer-grid {
  display: grid; grid-template-columns: 1.4fr repeat(3, minmax(0, 1fr)); gap: 2.5rem;
  padding-bottom: 3rem; border-bottom: 1px solid var(--line-strong);
}
.footer-col h4 {
  font-family: var(--font-mono); font-size: 0.72rem; text-transform: uppercase;
  letter-spacing: 0.1em; color: var(--muted); margin: 0 0 1rem;
}
.footer-col ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.55rem; font-size: 0.88rem; }
.footer-col a:hover { text-decoration: underline; text-underline-offset: 3px; }
.footer-bottom {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem;
  padding-top: 1.5rem; font-family: var(--font-mono); font-size: 0.74rem; color: var(--muted);
}

/* Responsive Breakpoints */
@media (max-width: 1024px) {
  .hero-grid, .split-sticky, .rfq-grid, #specConfigurator { grid-template-columns: 1fr; }
  .sticky-col, .cfg-panel { position: static; }
  .catalog-grid, .lookbook-grid, .blog-grid, .process-grid, .fact-strip, .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .fact-cell:nth-child(2) { border-right: 0; }
  .fact-cell:nth-child(1), .fact-cell:nth-child(2) { border-bottom: 1px solid var(--line); }
}
@media (max-width: 768px) {
  .site-nav, .header-actions .btn--desktop { display: none; }
  .nav-toggle { display: inline-flex; }
  .catalog-grid, .catalog-grid--2, .lookbook-grid, .blog-grid, .process-grid, .form-grid, .fact-strip, .footer-grid { grid-template-columns: 1fr; }
  .fact-cell { border-right: 0; border-bottom: 1px solid var(--line); }
  .fact-cell:last-child { border-bottom: 0; }
  #cookieBanner { left: 1rem; right: 1rem; bottom: 5rem; max-width: none; }
  .wa-float { right: 1rem; bottom: 1rem; }
}
