/* Camel Mööbel — avaldatav stiil. */

/* Switzer (Indian Type Foundry, Fontshare). Litsents: Switzer-LICENSE.txt */
@font-face{font-family:Switzer;src:url('assets/fonts/switzer-300.woff2') format('woff2');font-weight:300;font-style:normal;font-display:swap}
@font-face{font-family:Switzer;src:url('assets/fonts/switzer-400.woff2') format('woff2');font-weight:400;font-style:normal;font-display:swap}
@font-face{font-family:Switzer;src:url('assets/fonts/switzer-500.woff2') format('woff2');font-weight:500;font-style:normal;font-display:swap}

:root {
  --canvas: #f2f0ed;
  --paper: #faf9f7;
  --ink: #242620;
  --dark: #41443e;
  --muted: #62635c;
  --line: #d5d3cb;
  --font: Switzer, Arial, sans-serif;
  --pad: clamp(20px, 4vw, 64px);
  --header-h: 97px;

  /* Motion system: one easing for every transition; durations by role. */
  --ease: cubic-bezier(.2, .7, .2, 1);
  --dur-ui: 200ms;        /* colour / opacity feedback on hover and focus */
  --dur-reveal: 700ms;    /* content entering on scroll */
  --dur-zoom: 1400ms;     /* image hover zoom, in and out */
  --dur-fade: 1800ms;     /* hero crossfade */
  --hero-hold: 7000ms;    /* time a hero slide stays fully visible */
  --reveal-y: 16px;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 12px); }
body { margin: 0; background: var(--canvas); color: var(--ink); font: 400 17px/1.6 var(--font); }
button, input, select, textarea { font: inherit; color: inherit; }
button, a, input, select, textarea { -webkit-tap-highlight-color: transparent; }
button { background: none; border: 0; cursor: pointer; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
p { margin: 0 0 22px; }
h1, h2, h3, h4 { margin: 0; font-weight: 300; line-height: 1.12; }
h1 { font-size: clamp(44px, 4.6vw, 76px); letter-spacing: -.035em; }
h2 { font-size: clamp(34px, 3.2vw, 48px); letter-spacing: -.025em; }
h3 { font-size: 25px; }
h4 { font-size: 18px; font-weight: 500; }
small, .small { font-size: 14px; line-height: 1.6; }
.small { color: var(--muted); }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid currentColor; outline-offset: 5px; }
.wrap { width: min(100% - var(--pad) * 2, 1360px); margin-inline: auto; }
.eyebrow { font-size: 14px; letter-spacing: .08em; margin-bottom: 18px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

.button {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 14px 24px; min-height: 50px; font-size: 16px; line-height: 1.3;
  border: 1px solid transparent;
  transition: background-color var(--dur-ui) var(--ease), color var(--dur-ui) var(--ease);
}
.primary { background: var(--dark); color: #fff; }
.primary:hover { background: #272b24; }
.light { background: var(--canvas); color: var(--ink); }
.light:hover { background: #fff; }
.text-link { text-decoration: underline; text-underline-offset: 5px; }
.icon-button { display: grid; place-items: center; min-width: 44px; min-height: 44px; }
.skip { position: fixed; left: 20px; top: 10px; z-index: 100; padding: 12px; background: var(--paper); transform: translateY(-160%); }
.skip:focus { transform: none; }

/* ---------- Header ---------- */
.header { position: sticky; top: 0; z-index: 20; background: var(--canvas); border-bottom: 1px solid var(--line); }
.header-inner { display: flex; align-items: center; gap: 30px; min-height: 96px; }
.brand { margin-right: auto; flex-shrink: 0; }
.brand img { height: 44px; width: auto; }
.desktop-nav { display: flex; align-items: center; gap: 28px; }
.desktop-nav a {
  display: inline-flex; flex-direction: column; align-items: center;
  font-size: 17px; padding-block: 15px;
  transition: color var(--dur-ui) var(--ease);
}
/* Reserve the bold width so the active state never shifts the menu. */
.desktop-nav a::after { content: attr(data-label); font-weight: 700; height: 0; overflow: hidden; visibility: hidden; }
.desktop-nav a[aria-current] { font-weight: 700; }
.desktop-nav a:hover { color: #5e604e; }
.menu-open { display: none; }
.mobile-nav { padding: 12px var(--pad) 18px; border-top: 1px solid var(--line); }
.mobile-nav a { display: block; padding: 11px 10px; }
.mobile-nav a[aria-current] { font-weight: 700; }
.mobile-nav:not([hidden]) { animation: menu-in var(--dur-ui) var(--ease); }
@keyframes menu-in { from { opacity: 0; } to { opacity: 1; } }

/* ---------- Hero ---------- */
.hero { height: min(680px, 76vh); min-height: 550px; position: relative; overflow: hidden; contain: paint; background: #55574e; color: #fff; }
.hero-photos, .hero-shade, .slide { position: absolute; inset: 0; }
.slide { opacity: 0; transform: scale(1.01); transition: opacity var(--dur-fade) var(--ease); }
.slide.is-active { opacity: 1; }
.slide picture, .slide img { width: 100%; height: 100%; object-fit: cover; }
/* Ambient drift: constant speed (linear) across fade-in, hold and fade-out, so it never visibly starts or stops. */
.slide.is-drifting { animation: hero-drift calc(var(--hero-hold) + var(--dur-fade) * 2) linear forwards; }
.slide:nth-child(odd) { --dx: -.8%; }
.slide:nth-child(even) { --dx: .8%; }
@keyframes hero-drift { from { transform: scale(1.01) translate3d(0, 0, 0); } to { transform: scale(1.045) translate3d(var(--dx), 0, 0); } }
.hero.is-paused .slide, .hero.is-paused .slide-dot::after { animation-play-state: paused; }
.hero-shade { background: linear-gradient(90deg, rgba(12,17,12,.65), rgba(12,17,12,.12) 78%), linear-gradient(0deg, rgba(12,17,12,.4), transparent 40%); }
.hero-copy { position: relative; padding-top: clamp(60px, 8vh, 110px); }
.hero-copy h1 { max-width: 1000px; }
.hero-intro { max-width: 430px; margin: 26px 0; font-size: 18px; line-height: 1.6; }
.hero-bottom { position: absolute; left: 0; right: 0; bottom: 22px; display: flex; justify-content: space-between; align-items: center; gap: 16px; font-size: 14px; }
.hero-caption { transition: opacity var(--dur-ui) var(--ease); }
.hero-caption.is-changing { opacity: 0; }
.hero-controls, .slide-buttons { display: flex; align-items: center; gap: 12px; }
.slide-dot { position: relative; width: 44px; height: 44px; padding: 0; }
.slide-dot::before, .slide-dot::after { content: ''; position: absolute; left: 0; top: 21px; height: 2px; width: 100%; background: #ffffff60; }
.slide-dot::after { background: #fff; transform: scaleX(0); transform-origin: left; }
.slide-dot[aria-current]::after { animation: hero-progress calc(var(--hero-hold) + var(--dur-fade)) linear forwards; }
@keyframes hero-progress { to { transform: scaleX(1); } }

/* ---------- Catalogue ---------- */
.workspace { padding-block: 76px 65px; }
.workspace-heading { display: flex; justify-content: space-between; gap: 60px; align-items: end; margin-bottom: 34px; }
.workspace-heading > p { max-width: 390px; margin-bottom: 4px; }
.category-groups { display: grid; grid-template-columns: repeat(9, minmax(0, 1fr)); gap: 10px; }
.group-button {
  display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center;
  padding: 0 0 12px; border-bottom: 2px solid transparent; font-size: 14px; white-space: nowrap;
  transition: border-color var(--dur-ui) var(--ease);
}
.group-button:hover { border-color: var(--line); }
.group-button[aria-expanded=true] { border-color: var(--dark); font-weight: 600; }
.category-drawing { display: grid; place-items: center; width: 100%; height: 78px; background: #e4e2da; transition: background-color var(--dur-ui) var(--ease); }
.group-button:hover .category-drawing { background: #dcdad1; }
.category-drawing svg { width: 36px; height: 36px; stroke: currentColor; stroke-width: 1.2; fill: none; }
.subcategories { display: flex; gap: 12px; flex-wrap: wrap; padding-top: 20px; min-height: 65px; }
.subcategories button { border: 1px solid var(--line); padding: 7px 16px; font-size: 15px; background: var(--paper); transition: background-color var(--dur-ui) var(--ease), color var(--dur-ui) var(--ease); }
.subcategories button:hover { background: #fff; }
.subcategories button[aria-pressed=true] { background: var(--dark); color: #fff; border-color: var(--dark); }
.results { margin-top: 32px; }
.results-top { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 22px; }
.results-top span { font-size: 14px; color: var(--muted); }
.factory-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px 18px; }
.factory-card { position: relative; display: block; min-width: 0; }
.factory-photo { aspect-ratio: 4 / 3; overflow: hidden; background: #e7e4df; }
.factory-photo picture, .factory-photo img { width: 100%; height: 100%; object-fit: cover; }
.logo-band { height: 78px; display: flex; align-items: center; justify-content: center; background: var(--paper); padding: 12px 16px; }
.factory-logo { width: var(--logo-width, 110px); max-width: 100%; height: auto; max-height: 54px; object-fit: contain; filter: grayscale(1) contrast(1.5); mix-blend-mode: multiply; transition: filter var(--dur-ui) var(--ease); }
.card-hint { position: absolute; bottom: 70px; left: 0; right: 0; padding: 9px 12px; background: #faf9f7eb; font-size: 14px; }
.empty-state { grid-column: 1 / -1; min-height: 200px; padding: 36px; background: var(--paper); }
.empty-state h4 { margin-bottom: 12px; }
.empty-state p { max-width: 560px; }

/* Hover only where a real hover exists; touch screens show the label permanently. */
@media (hover: hover) and (pointer: fine) {
  .factory-photo img, .product-photo img { transition: transform var(--dur-zoom) var(--ease); }
  .factory-card:hover .factory-photo img, .product-card:hover .product-photo img { transform: scale(1.04); }
  .factory-card:hover .factory-logo { filter: grayscale(0); }
  .card-hint { opacity: 0; transition: opacity var(--dur-ui) var(--ease); }
  .factory-card:hover .card-hint, .factory-card:focus-visible .card-hint { opacity: 1; }
}

.how { border-top: 1px solid var(--line); margin-top: 48px; padding-top: 28px; display: grid; grid-template-columns: 190px 1fr; gap: 35px; }
.how h3 { font-size: 23px; }
.how ol { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px; }
.how li { border-left: 1px solid var(--line); padding-left: 18px; }
.how h4 { font-size: 17px; margin-bottom: 8px; }
.how p { font-size: 14px; color: var(--muted); margin: 0; }

/* ---------- Benefits, inquiry, footer ---------- */
.benefits { background: var(--dark); color: var(--paper); padding-block: 70px; }
.benefits-grid, .inquiry { display: grid; grid-template-columns: 1fr 1fr; gap: 100px; }
.benefits p:last-child { margin: 0; }
.large-copy { font-size: 24px; font-weight: 300; line-height: 1.5; }
.inquiry { padding-block: 75px 95px; }
.inquiry h2 { margin-bottom: 25px; }
.inquiry p { max-width: 490px; }
.contact-link { display: block; margin-block: 9px; text-decoration: underline; text-decoration-color: transparent; text-underline-offset: 5px; transition: text-decoration-color var(--dur-ui) var(--ease); }
.contact-link:hover { text-decoration-color: currentColor; }
.form-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.field { display: flex; flex-direction: column; gap: 6px; font-size: 15px; min-width: 0; }
.full { grid-column: 1 / -1; }
input, textarea, select { border: 1px solid #8f9187; background: var(--paper); padding: 12px; min-height: 48px; border-radius: 0; max-width: 100%; transition: border-color var(--dur-ui) var(--ease); }
input:hover, textarea:hover { border-color: var(--ink); }
input[aria-invalid=true], textarea[aria-invalid=true] { border-color: #9b2c1f; }
textarea { resize: vertical; }
.field-error { margin: 0; min-height: 0; font-size: 14px; color: #9b2c1f; }
.field-error:empty { display: none; }
.form-note { margin-top: 20px; }
.form-status { font-size: 15px; margin: 18px 0 0; }
.form-status:empty { display: none; }
.form-status.is-error { color: #9b2c1f; }
.footer { background: var(--dark); color: var(--paper); padding-block: 45px; }
.footer-grid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 25px; }
.footer a { display: block; }
.footer a:hover { text-decoration: underline; text-underline-offset: 4px; }
.footer small { grid-column: 1 / -1; color: #dedfd7; }

/* ---------- Factory page ---------- */
.factory-page { padding-block: 30px 70px; }
.breadcrumb { display: flex; gap: 12px; flex-wrap: wrap; font-size: 14px; color: var(--muted); margin: 15px 0 50px; }
.breadcrumb a { text-decoration: underline; text-underline-offset: 4px; }
.factory-hero { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(32px, 5vw, 80px); align-items: center; margin-bottom: 65px; }
.factory-intro h1 { font-size: clamp(40px, 4.2vw, 64px); line-height: 1.08; margin-bottom: 25px; }
.factory-intro > p:not(.eyebrow) { max-width: 670px; font-size: 20px; }
.factory-hero-photo { margin: 0; min-width: 0; }
.factory-hero-photo picture { display: block; overflow: hidden; aspect-ratio: 3 / 2; }
.factory-hero-photo img { width: 100%; height: 100%; object-fit: cover; }
.factory-hero-photo figcaption { font-size: 12px; color: var(--muted); margin-top: 10px; }
.factory-information { display: grid; grid-template-columns: 1fr 1fr; gap: 80px; border-top: 1px solid var(--line); padding-top: 40px; margin-bottom: 50px; }
.factory-information h2, .factory-information h3 { font-size: 28px; margin-bottom: 20px; }
.factory-information p { font-size: 16px; }
.factory-assist { padding: 30px; background: #e7e6df; margin-bottom: 20px; }
.factory-assist h2 { font-size: 30px; margin-bottom: 20px; }
.factory-assist form { max-width: 700px; }
.factory-assist label { font-size: 15px; }
.input-row { display: flex; gap: 8px; margin-top: 6px; }
.input-row input { width: 100%; min-width: 0; }
.input-row .button { padding: 12px 18px; }
.chair-examples { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 15px; }
.chair-examples button { border: 1px solid #b8bab0; padding: 10px 12px; font-size: 14px; line-height: 1.4; transition: background-color var(--dur-ui) var(--ease); }
.chair-examples button:hover { background: var(--canvas); }
.factory-assist > p { margin: 15px 0 0; font-size: 14px; }
.factory-source { margin-block: 20px 30px; }
.product-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 40px 20px; }
.product-card { display: flex; flex-direction: column; min-width: 0; overflow-wrap: anywhere; hyphens: auto; }
.product-photo { display: block; overflow: hidden; background: #fff; aspect-ratio: 1.2; }
.product-photo img { height: 100%; width: 100%; object-fit: contain; }
.product-card h2 { font-size: 24px; margin: 17px 0 6px; letter-spacing: 0; }
.product-code { font-size: 13px; color: var(--muted); margin-bottom: 10px; }
.product-card p { font-size: 14px; line-height: 1.55; margin-bottom: 12px; }
.product-card .dimensions { color: var(--muted); font-size: 13px; }
.product-card > a:last-child { font-size: 14px; margin-top: auto; text-decoration: underline; text-underline-offset: 4px; }
.factory-end { border-top: 1px solid var(--line); padding-top: 45px; margin-top: 65px; }
.factory-end h2 { font-size: 34px; margin-bottom: 20px; }

/* ---------- 404 ---------- */
.not-found { padding-block: clamp(70px, 12vh, 140px); min-height: 50vh; }
.not-found h1 { margin-bottom: 25px; }
.not-found p { max-width: 560px; font-size: 19px; }
.not-found .actions { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; margin-top: 30px; }

/* ---------- Scroll reveal ----------
   Only app.js hides content, and only elements it has seen below the viewport (.is-waiting),
   so without JS (or if JS fails) everything is visible. Opacity + transform only: no layout shift. */
.reveal.is-waiting:not(.is-in) { opacity: 0; transform: translate3d(0, var(--reveal-y), 0); }
.reveal.is-waiting.is-in:not(.is-instant) {
  transition: opacity var(--dur-reveal) var(--ease) var(--reveal-delay, 0ms), transform var(--dur-reveal) var(--ease) var(--reveal-delay, 0ms);
}

/* ---------- Responsive ---------- */
@media (min-width: 1800px) {
  .hero { height: 680px; }
  .hero-copy { padding-top: 90px; }
}

@media (max-width: 1100px) {
  .desktop-nav { gap: 16px; }
  .header-inner { gap: 18px; }
  .desktop-nav a { font-size: 15px; }
  .header-cta { padding-inline: 17px; }
  .category-groups { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .category-drawing { height: 70px; }
  .factory-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .how { grid-template-columns: 1fr; }
  .benefits-grid, .inquiry { gap: 50px; }
  .product-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

@media (max-width: 800px) {
  :root { --header-h: 81px; }
  .header-inner { min-height: 80px; }
  .desktop-nav { display: none; }
  .menu-open { display: grid; }
  .hero { height: 610px; min-height: 0; }
  .hero-copy { padding-top: 70px; }
  .workspace-heading { display: block; }
  .workspace-heading > p { margin-top: 22px; max-width: 520px; }
  .factory-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .how ol { grid-template-columns: 1fr; gap: 22px; }
  .how li { max-width: 500px; }
  .benefits-grid, .inquiry, .factory-information { grid-template-columns: 1fr; gap: 30px; }
  .factory-hero { grid-template-columns: 1fr; gap: 28px; margin-bottom: 40px; }
  .product-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 540px) {
  :root { --pad: 20px; }
  .header-inner { gap: 9px; }
  .header-cta { font-size: 14px; min-height: 44px; padding: 10px 12px; }
  .brand img { height: 34px; }
  .header .button { font-size: 13px; padding: 10px 12px; }
  .hero { height: 590px; }
  .hero-copy h1 { font-size: 40px; line-height: 1.08; }
  .hero-copy h1 br { display: none; }
  .hero-intro { font-size: 17px; max-width: 300px; }
  .hero-bottom { bottom: 16px; font-size: 13px; }
  .hero-controls, .slide-buttons { gap: 7px; }
  .slide-dot { width: 32px; }
  .workspace { padding-block: 45px; }
  .category-groups { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px 10px; }
  .group-button { font-size: 12px; white-space: normal; line-height: 1.3; }
  .category-drawing { height: 54px; }
  .category-drawing svg { width: 28px; height: 28px; }
  .subcategories { gap: 8px; }
  .subcategories button { padding: 8px 12px; font-size: 14px; }
  .results { margin-top: 25px; }
  .results-top { display: block; }
  .results-top h3 { font-size: 24px; margin-bottom: 7px; }
  .results-top span { font-size: 13px; }
  .factory-grid { gap: 16px 10px; }
  .factory-photo { aspect-ratio: 3 / 4; }
  .logo-band { height: 62px; padding: 10px 8px; }
  .factory-logo { width: calc(var(--logo-width, 110px) * .8); max-height: 43px; }
  .card-hint { bottom: 57px; font-size: 12px; padding: 7px 10px; }
  .how { margin-top: 36px; padding-top: 25px; gap: 25px; }
  .benefits { padding-block: 45px; }
  .large-copy { font-size: 21px; }
  .inquiry { padding-block: 45px; }
  .form-fields { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-grid > small { font-size: 13px; }
  .factory-page { padding-top: 10px; }
  .breadcrumb { margin-bottom: 30px; }
  .factory-intro > p:not(.eyebrow) { font-size: 17px; }
  .factory-information { gap: 20px; }
  .factory-assist { padding: 20px; }
  .factory-assist h2 { font-size: 26px; }
  .product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 30px 15px; }
  .product-card h2 { font-size: 21px; }
  .product-card p { font-size: 13px; }
}

/* ---------- Reduced motion: no movement, only short opacity changes ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  :root { --dur-fade: 250ms; --dur-reveal: 250ms; --reveal-y: 0px; }
  .slide.is-drifting, .slide-dot[aria-current]::after { animation: none; }
  .slide-dot[aria-current]::after { transform: none; }
  .factory-photo img, .product-photo img { transition: none !important; transform: none !important; }
  .mobile-nav:not([hidden]) { animation: none; }
}
