/* Nur Mebels — theme tokens */

.logo-img {
  mix-blend-mode: multiply;
  transition: filter .4s ease;
}
:root[data-theme="dark"] .logo-img {
  mix-blend-mode: normal;
  filter: brightness(1.1) saturate(1.1) drop-shadow(0 0 6px rgba(241, 212, 128, 0.4));
}

:root[data-theme="light"] {
  --bg:          #faf7f1;
  --bg-warm:     #f3ecde;
  --bg-elev:     #ffffff;
  --surface:     #ffffff;
  --surface-2:   rgba(255, 255, 255, 0.6);
  --surface-3:   rgba(255, 255, 255, 0.85);
  --ink:         #16120c;
  --ink-2:       #4a4137;
  --ink-3:       #8a7e6c;
  --ink-on-gold: #16120c;
  --line:        #ebe2cf;
  --line-soft:   #f1eadb;
  --gold:        #c8a13a;
  --gold-2:      #e9c560;
  --gold-deep:   #8d6a17;
  --invert-fg:   #fff8e3;
  --invert-bg:   #16120c;
  --invert-bg-h: #1f1810;
  --shadow-card: 0 1px 0 rgba(0,0,0,0.02);
  --shadow-card-hover: 0 24px 50px -20px rgba(22,18,12,0.18), 0 0 0 1px var(--gold-deep);
  --shadow-btn: 0 1px 0 rgba(255,255,255,0.06) inset, 0 8px 24px -8px rgba(22,18,12,0.4);
  --bg-overlay:
    radial-gradient(1200px 700px at 50% -10%, rgba(233, 197, 96, 0.22), transparent 60%),
    radial-gradient(900px 600px at 100% 20%, rgba(201, 161, 58, 0.08), transparent 60%);
  --grain-color: 0.55 0.45 0.3;
  --grain-opacity: 0.06;
  --grain-blend: multiply;
  --grain-layer-opacity: 0.55;
}

:root[data-theme="dark"] {
  --bg:          #14110b;
  --bg-warm:     #1c1812;
  --bg-elev:     #1f1a13;
  --surface:     #1f1a13;
  --surface-2:   rgba(31, 26, 19, 0.6);
  --surface-3:   rgba(31, 26, 19, 0.85);
  --ink:         #f6ecd2;
  --ink-2:       #c8b78f;
  --ink-3:       #8a7e6c;
  --ink-on-gold: #14110b;
  --line:        #2a2418;
  --line-soft:   #221d14;
  --gold:        #d8b454;
  --gold-2:      #f1d480;
  --gold-deep:   #c89c2e;
  --invert-fg:   #14110b;
  --invert-bg:   #f1d480;
  --invert-bg-h: #f6e0a3;
  --shadow-card: 0 1px 0 rgba(0,0,0,0.3);
  --shadow-card-hover: 0 24px 50px -20px rgba(0,0,0,0.55), 0 0 0 1px var(--gold);
  --shadow-btn: 0 1px 0 rgba(255,255,255,0.04) inset, 0 8px 24px -8px rgba(0,0,0,0.6);
  --bg-overlay:
    radial-gradient(1200px 700px at 50% -10%, rgba(233, 197, 96, 0.14), transparent 60%),
    radial-gradient(900px 600px at 100% 20%, rgba(201, 161, 58, 0.07), transparent 60%);
  --grain-color: 0.95 0.82 0.55;
  --grain-opacity: 0.04;
  --grain-blend: screen;
  --grain-layer-opacity: 0.35;
}

:root {
  --f-display: "Instrument Serif", "Amiri", serif;
  --f-sans:    "Manrope", system-ui, -apple-system, sans-serif;
  --f-display-alt: "Reem Kufi", "Manrope", sans-serif;
  color-scheme: light dark;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body {
  margin: 0; padding: 0;
  background: var(--bg);
  color: var(--ink);
  overflow-x: hidden;
  width: 100%;
  max-width: 100vw;
}
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--f-sans);
  font-size: 16px;
  line-height: 1.55;
  font-feature-settings: "ss01", "cv11";
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-y: none;
  transition: background-color .5s ease, color .5s ease;
  padding-bottom: env(safe-area-inset-bottom, 0);
}

button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
  border-radius: 6px;
}

/* paper background — radial gradients + film grain */
body::before {
  content: "";
  position: fixed; inset: 0;
  background: var(--bg-overlay);
  pointer-events: none;
  z-index: 0;
  transition: background .5s ease;
}
body::after {
  content: "";
  position: fixed; inset: 0;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0.55 0 0 0 0 0.45 0 0 0 0 0.3 0 0 0 0.06 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  pointer-events: none;
  z-index: 0;
  mix-blend-mode: var(--grain-blend);
  opacity: var(--grain-layer-opacity);
  transition: opacity .5s ease;
}

#root { position: relative; z-index: 1; }

/* primitives */
.display { font-family: var(--f-display); font-weight: 400; letter-spacing: -0.01em; }
.eyebrow {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.hairline { height: 1px; background: var(--line); border: 0; margin: 0; }
::selection { background: var(--gold-2); color: var(--ink-on-gold); }

/* keyframes */
@keyframes floatY {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}
@keyframes glowPulse {
  0%, 100% { filter: drop-shadow(0 0 18px rgba(233,197,96,0.45)) drop-shadow(0 0 40px rgba(201,161,58,0.35)); }
  50%      { filter: drop-shadow(0 0 28px rgba(233,197,96,0.75)) drop-shadow(0 0 60px rgba(201,161,58,0.55)); }
}
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: none; }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes spinSlow {
  to { transform: rotate(360deg); }
}
@keyframes shimmer {
  from { background-position: -200% 0; }
  to   { background-position: 200% 0; }
}
@keyframes wordIn {
  0%   { transform: translateY(20px); filter: blur(8px); opacity: 0; }
  100% { transform: none; filter: blur(0); opacity: 1; }
}
@keyframes wordOut {
  0%   { transform: none; filter: blur(0); opacity: 1; }
  100% { transform: translateY(-18px); filter: blur(6px); opacity: 0; }
}
@keyframes marqueeScroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-33.333%); }
}
@keyframes sheetIn {
  from { opacity: 0; transform: translateY(20px) scale(0.98); }
  to   { opacity: 1; transform: none; }
}
@keyframes pageIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: none; }
}
@keyframes pageOut {
  from { opacity: 1; transform: none; }
  to   { opacity: 0; transform: translateY(-8px); }
}

/* container */
.wrap { max-width: 1240px; margin: 0 auto; padding: 0 28px; }
@media (max-width: 640px) { .wrap { padding: 0 18px; } }

.gold-text {
  background: linear-gradient(135deg, var(--gold-deep) 0%, var(--gold-2) 45%, #f8e9b6 60%, var(--gold) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
:root[data-theme="dark"] .gold-text {
  background: linear-gradient(135deg, #f1d480 0%, #fce7a8 45%, #fff3c4 60%, #e9c560 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* primary button */
.btn-primary {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 14px 22px;
  background: var(--invert-bg);
  color: var(--invert-fg);
  border-radius: 999px;
  font-weight: 600;
  font-size: 14.5px;
  letter-spacing: 0.01em;
  transition: transform .25s ease, box-shadow .25s ease, background .25s ease;
  box-shadow: var(--shadow-btn);
}
.btn-primary:hover {
  transform: translateY(-1px);
  background: var(--invert-bg-h);
  box-shadow: 0 0 0 1px var(--gold) inset, 0 12px 30px -8px rgba(22,18,12,0.5), 0 0 30px rgba(233,197,96,0.3);
}
.btn-primary .dot {
  width: 6px; height: 6px; background: var(--gold-2); border-radius: 999px;
  box-shadow: 0 0 8px var(--gold-2);
}

.btn-ghost {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 13px 20px;
  border: 1px solid var(--line);
  background: var(--surface-2);
  color: var(--ink);
  border-radius: 999px;
  font-weight: 500;
  font-size: 14.5px;
  transition: all .25s ease;
  backdrop-filter: blur(8px);
}
.btn-ghost:hover { background: var(--bg-elev); border-color: var(--ink); }

.nav-link {
  font-size: 14px; font-weight: 500; color: var(--ink-2);
  transition: color .2s ease;
  position: relative;
}
.nav-link:hover { color: var(--ink); }

/* category filter pill */
.pill {
  padding: 9px 16px;
  font-size: 13.5px;
  font-weight: 500;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface-2);
  color: var(--ink-2);
  transition: all .2s ease;
  white-space: nowrap;
}
.pill:hover { border-color: var(--ink-3); color: var(--ink); }
.pill[aria-pressed="true"] {
  background: var(--invert-bg);
  color: var(--invert-fg);
  border-color: var(--invert-bg);
}

/* product card */
.product-card {
  text-align: start;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 22px;
  overflow: hidden;
  transition: transform .35s cubic-bezier(.2,.7,.2,1), box-shadow .35s ease, border-color .25s ease;
  display: flex;
  flex-direction: column;
  width: 100%;
  position: relative;
}
.product-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-card-hover);
  border-color: transparent;
}
.product-card .illu-wrap {
  aspect-ratio: 16 / 9;
  position: relative;
  overflow: hidden;
  background: var(--bg-warm);
}
.product-card .illu-wrap img {
  transition: transform .8s cubic-bezier(.2,.7,.2,1);
  object-fit: cover;
}
.product-card:hover .illu-wrap img {
  transform: scale(1.06);
}
.product-card .badge {
  position: absolute; top: 12px; inset-inline-start: 12px;
  padding: 5px 10px;
  background: var(--surface-3);
  backdrop-filter: blur(8px);
  border: 1px solid var(--line-soft);
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--ink-2);
  text-transform: uppercase;
  z-index: 2;
}
.product-card .cta-overlay {
  position: absolute;
  inset-block-end: 0;
  inset-inline-start: 0;
  inset-inline-end: 0;
  padding: 12px 16px;
  background: linear-gradient(to top, var(--invert-bg) 70%, transparent);
  color: var(--invert-fg);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity .3s ease, transform .35s cubic-bezier(.2,.7,.2,1);
  pointer-events: none;
}
.product-card:hover .cta-overlay {
  opacity: 1;
  transform: translateY(0);
}
.product-card .view-link {
  font-size: 12.5px;
  color: var(--ink-3);
  font-weight: 500;
  transition: color .2s ease, transform .2s ease;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.product-card:hover .view-link {
  color: var(--ink);
  transform: translateX(2px);
}

/* anchor offset for in-page navigation */
section[id] {
  scroll-margin-top: 88px;
}

/* page transition wrapper */
.page-in { animation: pageIn .35s cubic-bezier(.2,.7,.2,1) both; }
.page-out { animation: pageOut .2s cubic-bezier(.5,0,.7,.3) both; }

/* mobile */
@media (max-width: 820px) {
  .hide-on-mobile { display: none !important; }
}
@media (max-width: 720px) {
  .stats-grid { grid-template-columns: repeat(2, 1fr) !important; row-gap: 32px !important; }
  .stats-cell { border-inline-end: none !important; }
  .about-grid { grid-template-columns: 1fr !important; gap: 40px !important; }
  .product-detail-grid { grid-template-columns: 1fr !important; }
}
@media (max-width: 900px) { .process-grid { grid-template-columns: repeat(2, 1fr) !important; } }
@media (max-width: 520px) { .process-grid { grid-template-columns: 1fr !important; } }
@media (max-width: 820px) {
  .footer-grid { grid-template-columns: 1fr !important; gap: 28px !important; }
}

/* reduce motion */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* ============== MOBILE — app-like ============== */
@media (max-width: 640px) {
  .wrap {
    padding-inline: 16px;
  }
  header .wrap {
    gap: 10px !important;
  }
  /* compact logo+name in header */
  header .display { font-size: 19px !important; }
  header .eyebrow,
  header .display + div span:last-child { display: none; }
  /* hide brand subtitle under name */
  header span[style*="0.18em"] { display: none !important; }

  /* hero compact */
  section#top { padding-top: 110px !important; padding-bottom: 40px !important; }
  section#top h1 {
    font-size: clamp(34px, 9vw, 56px) !important;
    line-height: 1.05 !important;
  }
  section#top .eyebrow { font-size: 10px !important; letter-spacing: 0.14em !important; }
  section#top p { font-size: 15px !important; padding-inline: 4px; }

  /* buttons full-width feel */
  .btn-primary, .btn-ghost {
    padding: 14px 22px !important;
    font-size: 15px !important;
  }

  /* stats — 2 columns */
  .stats-grid { grid-template-columns: repeat(2, 1fr) !important; row-gap: 28px !important; }
  .stats-grid .stats-cell { border-inline-end: none !important; padding-inline-end: 0 !important; }
  .stats-grid .display { font-size: 36px !important; }

  /* catalog */
  section#catalog { padding: 80px 0 60px !important; }
  section#catalog h2 { font-size: 40px !important; }
  /* sticky filter pills row, scrollable */
  section#catalog > .wrap > div:nth-child(2) {
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
    scroll-snap-type: x mandatory;
    padding-bottom: 6px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  section#catalog > .wrap > div:nth-child(2)::-webkit-scrollbar { display: none; }
  .pill { scroll-snap-align: start; flex-shrink: 0; }

  /* product cards grid — 2 columns on mobile */
  section#catalog > .wrap > div:nth-child(3),
  section#catalog > .wrap > div:last-child {
    gap: 12px !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
  /* compact card text on mobile */
  .product-card h3 { font-size: 13.5px !important; line-height: 1.2 !important; }
  .product-card > div:last-child {
    padding: 10px 12px 12px !important;
    gap: 5px !important;
  }
  .product-card > div:last-child > div:first-child {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 4px !important;
  }
  .product-card > div:last-child > div:first-child > div { font-size: 13px !important; }
  .product-card > div:last-child > div:nth-child(2) { font-size: 11.5px !important; }
  .product-card > div:last-child > div:last-child {
    margin-top: 2px !important;
    padding-top: 8px !important;
    font-size: 10.5px !important;
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 4px !important;
  }
  .product-card .view-link { display: none !important; }
  .product-card .cta-overlay { display: none !important; }
  .product-card .badge { font-size: 9.5px !important; padding: 4px 8px !important; }
}

@media (max-width: 820px) {
  /* product page mobile */
  .product-detail-grid {
    grid-template-columns: 1fr !important;
    gap: 24px !important;
  }
  section h1.display { font-size: clamp(28px, 8vw, 38px) !important; }

  /* about — block stack */
  .about-grid { grid-template-columns: 1fr !important; gap: 32px !important; }
  section#about > .wrap > div:last-child { max-width: 320px !important; margin-inline: auto !important; }

  /* process */
  .process-grid { gap: 12px !important; }
  section#process { padding: 70px 0 !important; }

  /* footer */
  .footer-grid { grid-template-columns: 1fr !important; gap: 24px !important; }
  footer { padding: 40px 0 32px !important; }

  /* fab pair — smaller and bottom-safe */
  body > div[style*="position: fixed"][style*="bottom"] {
    bottom: calc(16px + env(safe-area-inset-bottom, 0)) !important;
  }
}

/* prevent any horizontal scroll caused by absolutely positioned glow / marquee */
section, header, footer, main {
  max-width: 100vw;
}

/* Logo image always fits its wrapper */
.logo-img {
  max-width: 100%;
  max-height: 100%;
}
