/* KozijnSuite — design tokens + globals */
:root {
  --ink: #0F2B22;          /* Dark Green */
  --ink-2: #163A2E;
  --ink-3: #1E4A3A;
  --gold: #B88A3B;         /* Bronze Gold */
  --gold-2: #C99C4D;
  --gold-soft: #E8D9B8;
  --ivory: #F7F5F2;
  --ivory-2: #EFEBE3;
  --paper: #FFFFFF;
  --grey: #D6D2C9;         /* Warm Grey */
  --grey-2: #B8B4AB;
  --olive: #7A846A;        /* Muted Olive */
  --text: #0F2B22;
  --text-muted: #5A6B62;
  --text-subtle: #8A968E;
  --line: rgba(15, 43, 34, 0.08);
  --line-2: rgba(15, 43, 34, 0.14);

  --font-display: 'Sora', system-ui, sans-serif;
  --font-body: 'Inter', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, monospace;

  --radius-sm: 6px;
  --radius: 10px;
  --radius-lg: 16px;
  --radius-xl: 22px;

  --shadow-sm: 0 1px 2px rgba(15,43,34,0.05), 0 1px 1px rgba(15,43,34,0.03);
  --shadow-md: 0 6px 18px -6px rgba(15,43,34,0.15), 0 2px 6px rgba(15,43,34,0.04);
  --shadow-lg: 0 30px 60px -20px rgba(15,43,34,0.35), 0 10px 25px -10px rgba(15,43,34,0.15);
  --shadow-gold: 0 14px 40px -18px rgba(184,138,59,0.6);

  --density: 1;
}

*,
*::before,
*::after {
  box-sizing: border-box;
  min-width: 0;
}
html, body {
  margin: 0;
  padding: 0;
  width: 100%;
  max-width: 100%;
  overflow-x: clip;
}
body {
  font-family: var(--font-body);
  color: var(--text);
  background: var(--ivory);
  -webkit-font-smoothing: antialiased;
  font-feature-settings: 'ss01', 'cv11';
  line-height: 1.55;
  overflow-x: clip;
}
#root,
#root > div,
section,
nav,
footer {
  width: 100%;
  max-width: 100vw;
}
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
img, svg { display: block; max-width: 100%; }
input, textarea { font-family: inherit; }

/* Typography */
.display {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: 0;
  line-height: 1.02;
  color: var(--ink);
}
.eyebrow {
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold);
}
.eyebrow-line { display: inline-flex; align-items: center; gap: 10px; }
.eyebrow-line::before {
  content: ''; width: 22px; height: 1px; background: var(--gold);
}

/* Layout */
.shell {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 32px;
}
.section { padding: calc(120px * var(--density)) 0; }
.section-tight { padding: calc(72px * var(--density)) 0; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 14px 22px;
  border-radius: 999px;
  font-weight: 500;
  font-size: 14.5px;
  letter-spacing: -0.005em;
  transition: transform 120ms ease, background 160ms ease, color 160ms ease, border-color 160ms ease;
  white-space: nowrap;
  max-width: 100%;
}
.btn-primary {
  background: var(--ink);
  color: var(--ivory);
}
.btn-primary:hover { background: var(--ink-2); transform: translateY(-1px); }
.btn-gold {
  background: var(--gold);
  color: #fff;
}
.btn-gold:hover { background: var(--gold-2); transform: translateY(-1px); }
.btn-ghost {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--line-2);
}
.btn-ghost:hover { border-color: var(--ink); }
.btn-ghost-dark {
  background: transparent;
  color: var(--ivory);
  border: 1px solid rgba(255,255,255,0.22);
}
.btn-ghost-dark:hover { border-color: rgba(255,255,255,0.6); }
.btn-sm { padding: 10px 16px; font-size: 13.5px; }
.btn-lg { padding: 16px 26px; font-size: 15px; }

/* Inputs */
.input {
  width: 100%;
  padding: 11px 14px;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 8px;
  font-family: inherit;
  font-size: 14px;
  color: var(--ink);
  outline: none;
  transition: border-color 160ms, box-shadow 160ms;
}
.input:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(184,138,59,0.12);
}
.input::placeholder { color: var(--text-subtle); }

/* Chip / pill */
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 11px;
  border-radius: 999px;
  background: rgba(184,138,59,0.10);
  color: var(--gold);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.02em;
}
.chip-dark {
  background: rgba(255,255,255,0.06);
  color: var(--gold-soft);
  border: 1px solid rgba(232,217,184,0.2);
}

/* Cards */
.card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

/* Divider */
.hr {
  height: 1px; background: var(--line); border: 0; margin: 0;
}

/* Window chrome (browser mock for screenshots) */
.win {
  background: var(--paper);
  border-radius: 14px;
  border: 1px solid var(--line);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  max-width: 100%;
}
.win-bar {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
  background: #FBFAF7;
}
.win-dot { width: 10px; height: 10px; border-radius: 50%; background: #E4E1DA; }
.win-addr {
  flex: 1; margin: 0 12px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--text-subtle);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 5px 10px;
  text-align: center;
}

/* Logo mark (SVG window icon — original stylization) */
.brand-mark {
  width: 34px; height: 34px;
  display: inline-flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.brand-mark-shell {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  min-width: 30px;
}
.brand-mark-shell img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.brand-word {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 20px;
  letter-spacing: -0.02em;
  color: var(--ink);
}
.brand-word .suite { color: var(--gold); }
.logo-lockup {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: max-content;
}

/* Navigation */
.nav-shell {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  padding: 16px 32px;
}
.nav-logo { flex: 0 0 auto; }
.nav-links {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 28px;
  font-size: 13.5px;
  flex: 1;
}
.nav-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
}
.nav-toggle {
  display: none;
  width: 40px;
  height: 40px;
  border-radius: 8px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line-2);
  background: rgba(255,255,255,0.72);
}
.nav-mobile-panel {
  display: none;
}

.hero-device-stage,
.hero-laptop,
.hero-tablet,
.hero-phone {
  max-width: 100%;
}

[style*="aspect-ratio"],
[style*="aspectRatio"] {
  max-width: 100%;
}

div:has(> table) {
  max-width: 100%;
}

/* Utility */
.muted { color: var(--text-muted); }
.subtle { color: var(--text-subtle); }
.mono { font-family: var(--font-mono); }
.num { font-variant-numeric: tabular-nums; }

/* Dashed gold underline decoration */
.gold-rule {
  width: 44px; height: 3px; background: var(--gold); border-radius: 2px; margin-top: 18px;
}

/* Focus */
:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
  border-radius: 4px;
}

/* Scrollbar in mockups */
.thin-scroll::-webkit-scrollbar { width: 6px; height: 6px; }
.thin-scroll::-webkit-scrollbar-thumb { background: rgba(15,43,34,0.15); border-radius: 3px; }

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

@media (max-width: 1080px) {
  .nav-shell { gap: 16px; }
  .nav-links { gap: 18px; }
  [style*="grid-template-columns: repeat(5, 1fr)"] { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; gap: 18px !important; }
  [style*="grid-template-columns: repeat(4, 1fr)"] { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
  [style*="grid-template-columns: repeat(3, 1fr)"] { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
}

@media (max-width: 860px) {
  html, body, #root {
    overflow-x: hidden;
  }
  body {
    font-size: 15px;
  }
  .shell {
    padding: 0 18px;
    max-width: 100%;
  }
  .section { padding: 72px 0; }
  .section-tight { padding: 52px 0; }
  .nav-shell { padding: 12px 20px; }
  .nav-links, .nav-actions { display: none; }
  .nav-toggle { display: inline-flex; }
  .nav-mobile-panel {
    display: grid;
    gap: 14px;
    padding: 14px 20px 18px;
    background: rgba(247,245,242,0.98);
    border-top: 1px solid var(--line);
    box-shadow: var(--shadow-md);
  }
  .nav-mobile-panel a {
    font-size: 14px;
    color: var(--ink) !important;
  }
  .display {
    letter-spacing: 0;
    line-height: 1.06;
  }
  h1.display {
    font-size: clamp(40px, 11vw, 58px) !important;
  }
  h2.display {
    font-size: clamp(30px, 8vw, 42px) !important;
  }
  h3.display {
    font-size: clamp(22px, 6vw, 30px) !important;
  }
  p {
    max-width: 100%;
  }
  .hero-device-stage {
    height: auto !important;
    display: grid;
    gap: 18px;
    margin-inline: 0;
  }
  .hero-laptop,
  .hero-tablet,
  .hero-phone {
    position: static !important;
    width: 100% !important;
    inset: auto !important;
  }
  .hero-tablet,
  .hero-phone {
    display: none;
  }
  .hero-laptop > div,
  .hero-laptop [style*="width: 110%"] {
    width: 100% !important;
    margin-left: 0 !important;
  }
  .win,
  [style*="box-shadow: var(--shadow-lg)"],
  [style*="boxShadow: var(--shadow-lg)"] {
    max-width: 100% !important;
  }
  [style*="grid-template-columns: 1fr 2.2fr"],
  [style*="grid-template-columns: 1fr 1.3fr"],
  [style*="grid-template-columns: 1.3fr 1fr"],
  [style*="grid-template-columns: 1fr 1.1fr"],
  [style*="grid-template-columns: 1fr 1fr"],
  [style*="grid-template-columns: 280px 1fr"],
  [style*="grid-template-columns: 1.4fr repeat(4, 1fr)"] {
    grid-template-columns: 1fr !important;
    gap: 28px !important;
  }
  [style*="grid-template-columns: repeat(2, 1fr)"],
  [style*="grid-template-columns: repeat(3, 1fr)"],
  [style*="grid-template-columns: repeat(4, 1fr)"],
  [style*="grid-template-columns: repeat(5, 1fr)"] {
    grid-template-columns: 1fr !important;
  }
  [style*="direction: rtl"] { direction: ltr !important; }
  [style*="width: 240px"] { width: min(100%, 240px) !important; }
  [style*="width: 280px"],
  [style*="width: 280"] {
    width: min(100%, 280px) !important;
  }
  table {
    min-width: 620px;
    max-width: none;
  }
  table:where(*) { font-size: 12.5px !important; }
  .thin-scroll,
  div:has(> table) {
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch;
  }
  [style*="overflow: hidden"] > table {
    display: table;
  }
  [style*="border-radius: 14px"][style*="overflow: hidden"]:has(table) {
    overflow-x: auto !important;
  }
}

@media (max-width: 560px) {
  .brand-word { font-size: 17px; }
  .brand-mark {
    width: 30px;
    height: 30px;
  }
  .shell { padding: 0 16px; }
  .section { padding: 56px 0; }
  .section-tight { padding: 42px 0; }
  .btn {
    width: 100%;
    white-space: normal;
    text-align: center;
    min-height: 46px;
  }
  .btn-sm,
  .btn-lg {
    padding: 12px 18px;
  }
  [style*="display: flex"][style*="gap: 12px"],
  [style*="display: flex"][style*="gap: 10px"] {
    flex-wrap: wrap !important;
  }
  [style*="font-size: clamp(48px"] { font-size: clamp(38px, 11vw, 52px) !important; }
  [style*="padding: 60px"] { padding: 34px 20px !important; }
  [style*="padding: 40px"] { padding: 28px 20px !important; }
  [style*="padding: 36px"] { padding: 24px 18px !important; }
  [style*="border-radius: 18px"] { border-radius: 12px !important; }
  [style*="padding: 32px"] { padding: 24px 18px !important; }
  [style*="padding: 30px"] { padding: 22px 16px !important; }
  [style*="padding: 28px"] { padding: 22px 16px !important; }
  [style*="padding: 24px"] { padding: 20px 16px !important; }
  [style*="transform: translateX(40px)"] {
    transform: none !important;
  }
  table {
    min-width: 560px;
  }
  input,
  textarea,
  select {
    font-size: 16px !important;
  }
}

@media (max-width: 420px) {
  .nav-shell {
    padding: 10px 14px;
  }
  .nav-toggle {
    width: 38px;
    height: 38px;
  }
  .logo-lockup {
    gap: 7px;
  }
  .brand-word {
    font-size: 16px;
  }
  h1.display {
    font-size: 38px !important;
  }
  table {
    min-width: 520px;
  }
}
