:root {
  --navy: #0f1b3c;
  --navy-2: #16264f;
  --ink: #141a2e;
  --muted: #5c6478;
  --parchment: #f7f3eb;
  --parchment-2: #efe8da;
  --paper: #ffffff;
  --gold: #c9a961;
  --gold-2: #b08d45;
  --line: #e4dccb;
  --line-gold: rgba(201, 169, 97, 0.35);
  --wa: #128c7e;
  --wa-2: #25d366;
  --radius: 14px;
  --max: 1180px;
  --serif: "Fraunces", "Times New Roman", serif;
  --sans: "Manrope", "Segoe UI", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, monospace;
  --shadow: 0 18px 50px rgba(15, 27, 60, 0.08);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--sans);
  color: var(--ink);
  background:
    radial-gradient(1200px 500px at 10% -10%, rgba(201, 169, 97, 0.12), transparent 55%),
    linear-gradient(180deg, #fbf8f1 0%, var(--parchment) 40%, #f3eee4 100%);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }

.container { width: min(var(--max), calc(100% - 40px)); margin: 0 auto; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 40;
  backdrop-filter: blur(14px) saturate(140%);
  background: rgba(247, 243, 235, 0.88);
  border-bottom: 1px solid var(--line);
}
.nav {
  display: flex; align-items: center; justify-content: space-between;
  gap: 18px; padding: 14px 0;
}
.brand { display: flex; flex-direction: column; gap: 2px; min-width: 140px; }
.brand strong {
  font-family: var(--serif);
  font-size: 1.35rem; font-weight: 550; letter-spacing: -0.02em; color: var(--navy);
}
.brand strong em { color: var(--gold-2); font-style: normal; }
.brand small {
  font-family: var(--mono); font-size: 9px; letter-spacing: 0.16em;
  text-transform: uppercase; color: var(--muted);
}
.nav-links {
  display: flex; align-items: center; gap: 18px; list-style: none; margin: 0; padding: 0;
}
.nav-links a {
  font-size: 13px; font-weight: 650; letter-spacing: 0.04em; text-transform: uppercase;
  color: var(--ink);
}
.nav-links a:hover, .nav-links a.active { color: var(--gold-2); }
.nav-actions { display: flex; align-items: center; gap: 10px; }
.menu-toggle {
  display: none; border: 1px solid var(--line); background: var(--paper);
  border-radius: 10px; padding: 8px 12px; cursor: pointer;
}

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border-radius: 999px; padding: 12px 20px; font-weight: 700; font-size: 14px;
  border: 1px solid transparent; cursor: pointer; transition: transform .15s ease, background .15s ease, color .15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--gold); color: var(--navy); }
.btn-primary:hover { background: var(--gold-2); color: #fff; }
.btn-dark { background: var(--navy); color: #fff; }
.btn-dark:hover { background: var(--navy-2); }
.btn-ghost { background: transparent; border-color: rgba(255,255,255,.45); color: #fff; }
.btn-ghost:hover { background: rgba(255,255,255,.08); }
.btn-outline { background: transparent; border-color: var(--navy); color: var(--navy); }
.btn-wa { background: var(--wa-2); color: #073b2c; }
.btn-wa:hover { background: #1ebe5d; }

/* Hero — one composition */
.hero {
  position: relative; min-height: min(92vh, 820px);
  display: grid; align-items: end;
  color: #f7f3eb;
  overflow: hidden;
  isolation: isolate;
}
.hero-media {
  position: absolute; inset: 0; z-index: -2;
  background:
    linear-gradient(90deg, rgba(7,13,32,.88) 0%, rgba(15,27,60,.55) 48%, rgba(7,13,32,.35) 100%),
    linear-gradient(180deg, rgba(7,13,32,.2) 0%, rgba(7,13,32,.75) 100%),
    var(--hero-image) center/cover no-repeat;
}
.hero-grain {
  position: absolute; inset: 0; z-index: -1; opacity: .05; pointer-events: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='140' height='140'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2'/></filter><rect width='140' height='140' filter='url(%23n)'/></svg>");
}
.hero-inner { padding: 120px 0 72px; max-width: 720px; }
.eyebrow {
  font-family: var(--mono); font-size: 11px; letter-spacing: .22em;
  text-transform: uppercase; color: var(--gold); margin-bottom: 18px;
}
.hero h1 {
  font-family: var(--serif); font-weight: 500;
  font-size: clamp(2.6rem, 6vw, 4.6rem); line-height: 1.02;
  letter-spacing: -0.03em; margin: 0 0 18px;
}
.hero h1 span { color: var(--gold); }
.hero .lede {
  font-size: 1.08rem; color: rgba(247,243,235,.86); max-width: 34rem; margin: 0 0 28px;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }

/* Sections */
section { padding: 72px 0; }
.section-head { max-width: 640px; margin-bottom: 36px; }
.section-head h2 {
  font-family: var(--serif); font-weight: 500; font-size: clamp(1.8rem, 3vw, 2.6rem);
  letter-spacing: -0.02em; color: var(--navy); margin: 8px 0 10px;
}
.section-head p { color: var(--muted); margin: 0; font-size: 1.02rem; }

.channel-row {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-top: 8px;
}
.channel {
  padding: 22px 22px 20px; border: 1px solid var(--line); background: rgba(255,255,255,.65);
  border-radius: var(--radius); transition: border-color .2s ease, transform .2s ease;
}
.channel:hover { border-color: var(--gold); transform: translateY(-2px); }
.channel b {
  display: block; font-family: var(--mono); font-size: 11px; letter-spacing: .18em;
  text-transform: uppercase; color: var(--gold-2); margin-bottom: 8px;
}
.channel strong { display: block; font-size: 1.15rem; color: var(--navy); margin-bottom: 6px; }
.channel p { margin: 0; color: var(--muted); font-size: .95rem; }

.cat-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px;
}
.cat-tile {
  position: relative; min-height: 280px; border-radius: 18px; overflow: hidden;
  display: flex; align-items: flex-end; color: #fff; isolation: isolate;
}
.cat-tile img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2;
  transition: transform .6s ease;
}
.cat-tile:hover img { transform: scale(1.05); }
.cat-tile::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(180deg, transparent 30%, rgba(7,13,32,.85) 100%);
}
.cat-tile .body { padding: 22px; }
.cat-tile .idx {
  font-family: var(--mono); font-size: 10px; letter-spacing: .18em; color: var(--gold); margin-bottom: 8px;
}
.cat-tile h3 { font-family: var(--serif); font-weight: 500; font-size: 1.55rem; margin: 0 0 6px; }
.cat-tile p { margin: 0; color: rgba(255,255,255,.8); font-size: .92rem; }
.cat-tile .portal-link {
  display: inline-block; margin-top: 12px;
  font-family: var(--mono); font-size: 10px; letter-spacing: .14em;
  text-transform: uppercase; color: var(--gold);
}
.portal-header .brand small { color: var(--gold-2); }

/* Browse toolbar */
.browse-bar {
  display: flex; flex-wrap: wrap; gap: 10px; align-items: center;
  padding: 14px; background: rgba(255,255,255,.7); border: 1px solid var(--line);
  border-radius: 16px; margin-bottom: 28px;
}
.browse-bar input, .browse-bar select {
  border: 1px solid var(--line); background: var(--paper); border-radius: 999px;
  padding: 11px 14px; min-width: 140px; color: var(--ink);
}
.browse-bar input { flex: 1; min-width: 200px; }
.chip-row { display: flex; flex-wrap: wrap; gap: 8px; width: 100%; }
.chip {
  border: 1px solid var(--line); background: transparent; border-radius: 999px;
  padding: 8px 14px; font-size: 13px; font-weight: 650; cursor: pointer; color: var(--ink);
}
.chip.active, .chip:hover { background: var(--navy); color: #fff; border-color: var(--navy); }

.product-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px;
}
.product {
  background: rgba(255,255,255,.78); border: 1px solid var(--line);
  border-radius: 18px; overflow: hidden; display: flex; flex-direction: column;
  transition: transform .2s ease, box-shadow .2s ease;
}
.product:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.product-media {
  aspect-ratio: 4/3; background: var(--parchment-2); overflow: hidden;
}
.product-media img { width: 100%; height: 100%; object-fit: cover; }
.product-body { padding: 18px 18px 20px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.product-meta {
  display: flex; justify-content: space-between; gap: 8px;
  font-family: var(--mono); font-size: 10px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted);
}
.product h3 { font-size: 1.05rem; margin: 0; color: var(--navy); line-height: 1.3; }
.product p { margin: 0; color: var(--muted); font-size: .92rem; flex: 1; }
.product-foot {
  display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: 8px;
}
.tag {
  display: inline-flex; padding: 4px 8px; border-radius: 999px;
  background: var(--parchment-2); color: var(--navy); font-size: 11px; font-weight: 700;
}
.price { font-weight: 800; color: var(--navy); }
.price.rfq { color: var(--gold-2); }

/* Split / forms */
.split {
  display: grid; grid-template-columns: 1.05fr .95fr; gap: 28px; align-items: start;
}
.panel {
  background: rgba(255,255,255,.78); border: 1px solid var(--line);
  border-radius: 20px; padding: 24px;
}
.panel h3 { font-family: var(--serif); font-weight: 500; font-size: 1.45rem; color: var(--navy); margin: 0 0 8px; }
.panel .hint { color: var(--muted); margin: 0 0 18px; font-size: .95rem; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form-grid .full { grid-column: 1 / -1; }
label { display: grid; gap: 6px; font-size: 13px; font-weight: 650; color: var(--navy); }
input, select, textarea {
  width: 100%; border: 1px solid var(--line); border-radius: 12px;
  padding: 12px 13px; background: #fff; color: var(--ink);
}
textarea { min-height: 110px; resize: vertical; }
.check-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.check-grid label {
  display: flex; align-items: center; gap: 8px; font-weight: 600; color: var(--ink);
  padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; background: #fff;
}
.form-msg { margin-top: 12px; font-size: .92rem; color: var(--muted); min-height: 1.2em; }
.form-msg.ok { color: #0f6b45; }
.form-msg.err { color: #9b1c1c; }

/* AI chat */
.chat {
  display: flex; flex-direction: column; height: min(620px, 75vh);
  background: var(--navy); color: #f7f3eb; border-radius: 20px; overflow: hidden;
}
.chat-head { padding: 18px 20px; border-bottom: 1px solid rgba(201,169,97,.25); }
.chat-head strong { display: block; font-family: var(--serif); font-size: 1.25rem; }
.chat-head span { font-size: .85rem; color: rgba(247,243,235,.7); }
.chat-log {
  flex: 1; overflow: auto; padding: 18px 20px; display: flex; flex-direction: column; gap: 12px;
}
.bubble {
  max-width: 92%; padding: 12px 14px; border-radius: 14px; font-size: .95rem; white-space: pre-wrap;
}
.bubble.agent { background: rgba(255,255,255,.08); align-self: flex-start; border: 1px solid rgba(201,169,97,.2); }
.bubble.user { background: var(--gold); color: var(--navy); align-self: flex-end; font-weight: 600; }
.chat-compose {
  display: flex; gap: 8px; padding: 14px; border-top: 1px solid rgba(201,169,97,.25); background: rgba(0,0,0,.15);
}
.chat-compose input {
  flex: 1; border-radius: 999px; border: 1px solid rgba(255,255,255,.15);
  background: rgba(255,255,255,.06); color: #fff;
}
.chat-compose input::placeholder { color: rgba(255,255,255,.45); }

.steps {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px;
}
.step {
  padding: 22px; border-radius: var(--radius); border: 1px solid var(--line); background: rgba(255,255,255,.65);
}
.step b {
  font-family: var(--mono); font-size: 11px; letter-spacing: .16em; color: var(--gold-2);
}
.step h3 { margin: 10px 0 6px; font-size: 1.15rem; color: var(--navy); }
.step p { margin: 0; color: var(--muted); }

.site-footer {
  margin-top: 40px; background: var(--navy); color: rgba(247,243,235,.82); padding: 48px 0 28px;
}
.foot-grid {
  display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 28px; margin-bottom: 28px;
}
.site-footer h4 {
  font-family: var(--mono); font-size: 11px; letter-spacing: .18em; text-transform: uppercase;
  color: var(--gold); margin: 0 0 14px;
}
.site-footer a { display: block; margin-bottom: 8px; color: rgba(247,243,235,.82); }
.site-footer a:hover { color: var(--gold); }
.foot-brand {
  font-family: var(--serif); font-size: 1.5rem; color: #fff; margin-bottom: 8px;
}
.foot-brand em { color: var(--gold); font-style: normal; }
.foot-bottom {
  border-top: 1px solid rgba(255,255,255,.1); padding-top: 18px;
  display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  font-size: .88rem; color: rgba(247,243,235,.55);
}

.chat-float {
  position: fixed; right: 18px; bottom: 18px; z-index: 60;
  border: 0; border-radius: 999px; padding: 14px 18px;
  background: var(--navy); color: #fff; font-weight: 800; font-size: 14px;
  display: inline-flex; align-items: center; gap: 8px; cursor: pointer;
  box-shadow: 0 14px 36px rgba(15, 27, 60, 0.28);
}
.chat-float span {
  display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%;
  background: var(--gold); color: var(--navy); font-size: 11px; font-weight: 800;
}
.chat-float.is-hidden { display: none; }
.chat-float:hover { background: var(--navy-2); }

.support-chat {
  position: fixed; right: 18px; bottom: 84px; z-index: 61;
  width: min(380px, calc(100vw - 28px)); height: min(520px, 70vh);
  background: var(--navy); color: #f7f3eb; border-radius: 20px; overflow: hidden;
  display: flex; flex-direction: column;
  box-shadow: 0 22px 60px rgba(7, 13, 32, 0.35);
  border: 1px solid rgba(201, 169, 97, 0.28);
}
.support-chat[hidden] { display: none !important; }
.support-chat__head {
  display: flex; justify-content: space-between; gap: 12px; align-items: flex-start;
  padding: 14px 16px; border-bottom: 1px solid rgba(201, 169, 97, 0.22);
}
.support-chat__head strong { display: block; font-family: var(--serif); font-size: 1.1rem; }
.support-chat__head span { font-size: .8rem; color: rgba(247,243,235,.7); }
.support-chat__close {
  border: 0; background: transparent; color: #fff; font-size: 22px; cursor: pointer; line-height: 1;
}
.support-chat__log {
  flex: 1; overflow: auto; padding: 14px 16px; display: flex; flex-direction: column; gap: 10px;
}
.support-chat__compose {
  display: flex; gap: 8px; padding: 12px; border-top: 1px solid rgba(201,169,97,.22); background: rgba(0,0,0,.15);
}
.support-chat__compose input {
  flex: 1; border-radius: 999px; border: 1px solid rgba(255,255,255,.15);
  background: rgba(255,255,255,.06); color: #fff;
}
.support-chat__compose input::placeholder { color: rgba(255,255,255,.45); }
.support-chat__foot {
  padding: 8px 14px 12px; font-size: 12px; color: rgba(247,243,235,.65);
  border-top: 1px solid rgba(255,255,255,.06);
}
.support-chat__foot a { color: var(--gold); }

.nav-actions .btn { padding: 10px 14px; font-size: 13px; }
@media (max-width: 960px) {
  .nav-actions .btn-dark { display: none; }
}

.empty {
  padding: 48px 20px; text-align: center; color: var(--muted);
  border: 1px dashed var(--line); border-radius: 16px;
}

@media (max-width: 960px) {
  .cat-grid, .product-grid, .channel-row, .steps, .split, .foot-grid { grid-template-columns: 1fr 1fr; }
  .nav-links { display: none; }
  .nav-links.open {
    display: flex; flex-direction: column; align-items: flex-start;
    position: absolute; left: 20px; right: 20px; top: 70px;
    background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 16px;
    box-shadow: var(--shadow);
  }
  .menu-toggle { display: inline-flex; }
  .hero-inner { padding: 100px 0 56px; }
}
@media (max-width: 640px) {
  .cat-grid, .product-grid, .channel-row, .steps, .split, .foot-grid, .form-grid, .check-grid {
    grid-template-columns: 1fr;
  }
  .container { width: min(var(--max), calc(100% - 28px)); }
  .nav-actions .btn-outline { display: none; }
}
