/* ===================================================================
   FARBY I LAKIERY — Prototype Design System
   Diverging from the legacy site (#0d52a1 / Inter / generic e-commerce).
   New direction: paint-as-medium, editorial + dense product UI,
   color-OS as the primary navigation metaphor.
   =================================================================== */

:root {
  /* Brand — overridable by tweaks */
  --brand: #0d52a1;
  --brand-ink: #ffffff;
  --brand-soft: color-mix(in oklab, var(--brand) 12%, var(--bg));
  --brand-line: color-mix(in oklab, var(--brand) 20%, var(--bg));
  --accent: #ff5b1f; /* warm signal — paint splash */

  /* Surfaces */
  --bg: #faf7f2;             /* warm paper */
  --bg-elev: #ffffff;
  --bg-tint: #f1ede5;
  --ink: #14110d;            /* deep ink, not pure black */
  --ink-2: #3a342c;
  --ink-3: #6a6358;
  --ink-4: #a39c8e;
  --line: #e6e0d3;
  --line-2: #d6cfbf;

  /* Type — overridable by tweaks */
  --font-display: 'Fraunces', 'Tiempos', 'EB Garamond', Georgia, serif;
  --font-sans: 'Inter Tight', 'Inter', system-ui, -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, 'SFMono-Regular', monospace;

  /* Density — overridable by tweaks */
  --density: 1;
  --space-1: calc(4px * var(--density));
  --space-2: calc(8px * var(--density));
  --space-3: calc(12px * var(--density));
  --space-4: calc(16px * var(--density));
  --space-5: calc(24px * var(--density));
  --space-6: calc(32px * var(--density));
  --space-7: calc(48px * var(--density));
  --space-8: calc(64px * var(--density));
  --space-9: calc(96px * var(--density));

  /* Radii */
  --r-xs: 4px;
  --r-sm: 8px;
  --r-md: 14px;
  --r-lg: 22px;
  --r-xl: 32px;
  --r-2xl: 44px;
  --r-pill: 999px;

  /* Shadow */
  --sh-1: 0 1px 0 rgba(20, 17, 13, 0.04), 0 2px 6px rgba(20, 17, 13, 0.04);
  --sh-2: 0 1px 0 rgba(20, 17, 13, 0.05), 0 8px 24px rgba(20, 17, 13, 0.07);
  --sh-3: 0 4px 12px rgba(20, 17, 13, 0.06), 0 24px 48px -12px rgba(20, 17, 13, 0.18);

  /* Card style — overridable */
  --card-radius: var(--r-lg);
  --card-bg: var(--bg-elev);
  --card-border: 1px solid var(--line);
  --card-shadow: var(--sh-1);
  --card-pad: var(--space-5);

  /* Hairline */
  --hairline: 1px solid var(--line);
  --hairline-2: 1px solid var(--line-2);

  --container-x: clamp(20px, 4vw, 56px);
}

[data-theme='dark'] {
  --bg: #0e0c08;
  --bg-elev: #181510;
  --bg-tint: #221d15;
  --ink: #faf7f2;
  --ink-2: #e9e3d6;
  --ink-3: #b4ac9d;
  --ink-4: #6e6859;
  --line: #2a251c;
  --line-2: #3a342a;
  --brand-soft: color-mix(in oklab, var(--brand) 18%, var(--bg));
  --brand-line: color-mix(in oklab, var(--brand) 35%, var(--bg));
  --sh-1: 0 1px 0 rgba(0,0,0,0.4), 0 2px 6px rgba(0,0,0,0.3);
  --sh-2: 0 8px 24px rgba(0,0,0,0.5);
  --sh-3: 0 24px 48px -12px rgba(0,0,0,0.6);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-feature-settings: 'ss01', 'cv11';
}

body { overflow-x: clip; }

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

button { font: inherit; cursor: pointer; }

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

::selection { background: var(--ink); color: var(--bg); }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 480;
  letter-spacing: -0.02em;
  line-height: 1.02;
  margin: 0;
  font-feature-settings: 'ss01', 'ss03', 'liga';
}

p { margin: 0; }

.fl-app {
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
}

.container {
  width: 100%;
  max-width: 1440px;
  margin: 0 auto;
  padding-inline: var(--container-x);
}

/* ============ NAV ============ */
.fl-nav {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in oklab, var(--bg) 88%, transparent);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom: var(--hairline);
}
.fl-nav__inner {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  height: 64px;
  gap: var(--space-5);
}
.fl-logo {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--font-display);
  font-weight: 540;
  font-size: 20px;
  letter-spacing: -0.015em;
  color: var(--ink);
}
.fl-logo__mark {
  width: 28px; height: 28px;
  border-radius: 8px;
  background:
    conic-gradient(from 200deg, #E5BE01, #F44611, #AF2B1E, #924E7D, #2271B3, #4C9141, #E5BE01);
  position: relative;
  box-shadow: inset 0 0 0 2px var(--bg);
}
.fl-logo__mark::after {
  content: '';
  position: absolute; inset: 7px;
  border-radius: 50%;
  background: var(--bg);
}
.fl-logo small {
  display: block; font-family: var(--font-sans); font-size: 10px; font-weight: 500;
  letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-3); margin-top: -2px;
}

.fl-nav__links {
  display: flex; gap: 4px; align-items: center; justify-self: center;
}
.fl-nav__link {
  padding: 10px 14px;
  font-size: 14px; font-weight: 500;
  color: var(--ink-2);
  border-radius: var(--r-pill);
  transition: 160ms ease;
  position: relative;
}
.fl-nav__link:hover { color: var(--ink); background: var(--bg-tint); }
.fl-nav__link[aria-current='page'] {
  color: var(--ink); background: var(--bg-tint);
}
.fl-nav__link[aria-current='page']::before {
  content: '';
  position: absolute; left: 50%; bottom: -1px; width: 4px; height: 4px;
  background: var(--brand); border-radius: 50%; transform: translateX(-50%);
}

.fl-nav__cta {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 18px;
  border-radius: var(--r-pill);
  background: var(--ink); color: var(--bg);
  font-size: 14px; font-weight: 600;
  border: 0; transition: 160ms ease;
}
.fl-nav__cta:hover { background: var(--brand); color: var(--brand-ink); }

.fl-nav__phone {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 12px; font-size: 13px; font-weight: 500;
  color: var(--ink-2);
  border-radius: var(--r-pill);
}
.fl-nav__phone:hover { color: var(--ink); }
.fl-nav__right { display: flex; gap: 8px; align-items: center; }
.fl-nav__menu-btn {
  display: none;
  background: transparent; border: var(--hairline); border-radius: 10px;
  width: 40px; height: 40px;
  align-items: center; justify-content: center; color: var(--ink);
}

/* ============ BUTTONS ============ */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 20px; border-radius: var(--r-pill);
  font-size: 14px; font-weight: 600; border: 0;
  transition: 200ms ease;
  white-space: nowrap;
}
.btn--primary { background: var(--ink); color: var(--bg); }
.btn--primary:hover { background: var(--brand); color: var(--brand-ink); transform: translateY(-1px); }
.btn--brand { background: var(--brand); color: var(--brand-ink); }
.btn--brand:hover { filter: brightness(1.1); transform: translateY(-1px); }
.btn--ghost { background: transparent; color: var(--ink); border: var(--hairline-2); }
.btn--ghost:hover { background: var(--bg-tint); }
.btn--lg { padding: 16px 28px; font-size: 15px; }
.btn--sm { padding: 8px 14px; font-size: 13px; }

/* ============ Eyebrow + headings ============ */
.eyebrow {
  font-family: var(--font-mono);
  font-size: 11px; letter-spacing: 0.18em; text-transform: uppercase;
  font-weight: 500; color: var(--ink-3);
  display: inline-flex; align-items: center; gap: 8px;
}
.eyebrow::before {
  content: ''; width: 18px; height: 1px; background: var(--ink-3);
}

.h-display {
  font-family: var(--font-display);
  font-size: clamp(40px, 7vw, 96px);
  font-weight: 470;
  line-height: 0.96;
  letter-spacing: -0.025em;
}
.h-display em {
  font-style: italic; font-weight: 380;
  color: var(--brand);
}

.h-section {
  font-family: var(--font-display);
  font-size: clamp(28px, 4vw, 52px);
  font-weight: 480;
  letter-spacing: -0.02em;
  line-height: 1.0;
}

.lede {
  font-size: clamp(15px, 1.4vw, 18px);
  line-height: 1.55;
  color: var(--ink-2);
  max-width: 60ch;
}

/* ============ CARDS ============ */
.card {
  background: var(--card-bg);
  border: var(--card-border);
  border-radius: var(--card-radius);
  box-shadow: var(--card-shadow);
  padding: var(--card-pad);
  transition: 240ms ease;
}
.card--flat { box-shadow: none; }
.card:hover { box-shadow: var(--sh-2); }

/* ============ Form bits ============ */
.input, .select {
  width: 100%; padding: 12px 16px;
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  font: inherit; color: var(--ink);
  outline: none; transition: 160ms ease;
}
.input:focus, .select:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 4px var(--brand-soft);
}
.label {
  font-size: 12px; font-weight: 600; color: var(--ink-2);
  letter-spacing: 0.02em; margin-bottom: 6px; display: block;
}

/* ============ Tag/Chip ============ */
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 10px; font-size: 12px; font-weight: 500;
  background: var(--bg-tint); color: var(--ink-2);
  border-radius: var(--r-pill);
  border: 1px solid var(--line);
}
.chip--brand { background: var(--brand-soft); color: var(--brand); border-color: var(--brand-line); }
.chip--solid { background: var(--ink); color: var(--bg); border-color: transparent; }

/* ============ Color swatch ============ */
.swatch {
  border-radius: 8px;
  position: relative;
  box-shadow: inset 0 0 0 1px rgba(0,0,0,0.06);
}
.swatch--lg { width: 100%; aspect-ratio: 1; border-radius: 12px; }

/* ============ Misc layout ============ */
.section {
  padding-block: var(--space-9);
}
.section--tight { padding-block: var(--space-7); }
.section--loose { padding-block: calc(var(--space-9) + var(--space-7)); }

.divider { height: 1px; background: var(--line); border: 0; margin: 0; }
.divider--vert { width: 1px; height: 100%; background: var(--line); }

.text-2 { color: var(--ink-2); }
.text-3 { color: var(--ink-3); }
.text-4 { color: var(--ink-4); }
.text-mono { font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.02em; }

.grid { display: grid; gap: var(--space-5); }

.shadow-1 { box-shadow: var(--sh-1); }
.shadow-2 { box-shadow: var(--sh-2); }

.kbd {
  display: inline-flex; align-items: center;
  padding: 2px 6px; min-width: 18px; justify-content: center;
  font-family: var(--font-mono); font-size: 11px;
  background: var(--bg-tint); border: 1px solid var(--line);
  border-bottom-width: 2px; border-radius: 4px; color: var(--ink-2);
}

/* ============ Page header ============ */
.page-head {
  padding: var(--space-9) 0 var(--space-7);
  border-bottom: var(--hairline);
}
.page-head__crumbs {
  display: flex; align-items: center; gap: 8px;
  font-family: var(--font-mono); font-size: 11px; text-transform: uppercase;
  letter-spacing: 0.16em; color: var(--ink-3); margin-bottom: 24px;
}
.page-head__title {
  display: grid; grid-template-columns: 1.4fr 1fr; gap: var(--space-7);
  align-items: end;
}
.page-head h1 {
  font-family: var(--font-display);
  font-size: clamp(44px, 7vw, 88px);
  font-weight: 470; line-height: 0.96; letter-spacing: -0.025em;
}
.page-head__lede { color: var(--ink-2); font-size: 17px; line-height: 1.5; max-width: 50ch; }

/* ============ Footer ============ */
.fl-foot {
  background: var(--ink); color: var(--bg);
  margin-top: var(--space-9);
  padding: var(--space-9) 0 var(--space-6);
}
[data-theme='dark'] .fl-foot { background: #050402; }
.fl-foot__grid {
  display: grid;
  grid-template-columns: 2fr repeat(3, 1fr);
  gap: var(--space-7);
  padding-bottom: var(--space-7);
  border-bottom: 1px solid rgba(255,255,255,0.1);
}
.fl-foot__brand {
  font-family: var(--font-display); font-size: 56px; line-height: 0.95;
  font-weight: 460; letter-spacing: -0.025em;
}
.fl-foot__brand em { font-style: italic; color: var(--accent); font-weight: 360; }
.fl-foot h4 {
  font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.18em;
  text-transform: uppercase; opacity: 0.5; margin-bottom: 16px;
}
.fl-foot ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; }
.fl-foot a { color: rgba(255,255,255,0.8); font-size: 14px; transition: 160ms ease; }
.fl-foot a:hover { color: #fff; }
.fl-foot__bottom {
  display: flex; justify-content: space-between; align-items: center;
  padding-top: 24px;
  font-size: 12px; color: rgba(255,255,255,0.5);
}

/* ============ Responsive ============ */
@media (max-width: 980px) {
  .fl-nav__links { display: none; }
  .fl-nav__phone { display: none; }
  .fl-nav__menu-btn { display: inline-flex; }
  .page-head__title { grid-template-columns: 1fr; gap: var(--space-4); }
  .fl-foot__grid { grid-template-columns: 1fr 1fr; }
  .fl-foot__brand { font-size: 36px; }
}
@media (max-width: 600px) {
  .fl-foot__grid { grid-template-columns: 1fr; }
}

/* ============ Marquee ============ */
@keyframes marquee {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}
.marquee {
  display: flex; gap: 48px; align-items: center;
  width: max-content;
  animation: marquee 60s linear infinite;
}
.marquee--paused:hover { animation-play-state: paused; }

/* ============ Reveal ============ */
@keyframes reveal-up {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}
.reveal-up { animation: reveal-up 700ms cubic-bezier(0.2, 0.8, 0.2, 1) both; }

/* ============ Scrollbar ============ */
.fl-app *::-webkit-scrollbar { height: 10px; width: 10px; }
.fl-app *::-webkit-scrollbar-track { background: transparent; }
.fl-app *::-webkit-scrollbar-thumb {
  background: var(--line-2); border-radius: 6px;
  border: 2px solid var(--bg);
}
