/* Gallante — Refined Intelligence */
:root {
  --bg: #17140f;
  --bg-elev: #1f1b15;
  --bg-card: #25201a;
  --bg-card-2: #2c261f;
  --line: #342d25;
  --line-soft: #28221c;
  --text: #f5f1e8;
  --text-mute: #a89c84;
  --text-dim: #6b6253;
  --gold: #c9a961;
  --gold-bright: #e8c87a;
  --gold-deep: #8a7340;
  --gold-soft: rgba(201, 169, 97, 0.12);
  --gold-line: rgba(201, 169, 97, 0.22);

  --serif: "Cormorant Garamond", "Cormorant", Georgia, serif;
  --sans: "Geist", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --mono: "Geist Mono", "JetBrains Mono", ui-monospace, monospace;

  --maxw: 1280px;
}

[data-theme="light"] {
  --bg: #f5f1e8;
  --bg-elev: #ede5d3;
  --bg-card: #e8dfc9;
  --bg-card-2: #ddd2b8;
  --line: #c9beA0;
  --line-soft: #d4c9ad;
  --text: #1a1714;
  --text-mute: #5d5341;
  --text-dim: #8a7f6a;
  --gold: #8a6f2a;
  --gold-bright: #b8924d;
  --gold-deep: #6b5520;
  --gold-soft: rgba(138, 111, 42, 0.10);
  --gold-line: rgba(138, 111, 42, 0.30);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  transition: background 0.4s ease, color 0.4s ease;
}

body {
  min-height: 100vh;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
input, textarea, select { font-family: inherit; color: inherit; }

/* === Type === */
.display {
  font-family: var(--serif);
  font-weight: 300;
  letter-spacing: -0.02em;
  line-height: 0.98;
}
.display em {
  font-style: italic;
  font-weight: 400;
  color: var(--gold);
}
.serif { font-family: var(--serif); }
.mono { font-family: var(--mono); }
.mono-label {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-mute);
  font-weight: 400;
}
.mono-num {
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
}
.gold { color: var(--gold); }
.muted { color: var(--text-mute); }
.dim { color: var(--text-dim); }

/* === Layout === */
.wrap {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 40px;
}

.hairline {
  height: 1px;
  background: var(--line);
  width: 100%;
}
.hairline-gold {
  height: 1px;
  background: var(--gold-line);
  width: 100%;
}

/* === Nav === */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in oklab, var(--bg) 88%, transparent);
  backdrop-filter: blur(20px) saturate(140%);
  -webkit-backdrop-filter: blur(20px) saturate(140%);
  border-bottom: 1px solid var(--line-soft);
}
.nav-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 40px;
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--serif);
  font-size: 24px;
  font-weight: 400;
  letter-spacing: 0.02em;
  cursor: pointer;
}
.brand-mark {
  width: 28px;
  height: 28px;
  position: relative;
}
.brand-mark svg { display: block; }
.brand-name { letter-spacing: 0.04em; }
.brand-name .dot { color: var(--gold); }

.nav-links {
  display: flex;
  gap: 36px;
  align-items: center;
}
.nav-link {
  font-size: 13px;
  letter-spacing: 0.04em;
  color: var(--text-mute);
  transition: color 0.2s;
  position: relative;
  padding: 6px 0;
}
.nav-link:hover { color: var(--text); }
.nav-link.active { color: var(--text); }
.nav-link.active::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -2px;
  width: 4px;
  height: 4px;
  background: var(--gold);
  border-radius: 50%;
  transform: translateX(-50%);
}

.nav-cta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 18px;
  border: 1px solid var(--gold-line);
  border-radius: 1px;
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold);
  transition: all 0.2s;
}
.nav-cta:hover {
  background: var(--gold-soft);
  border-color: var(--gold);
}

/* === Nav dropdown === */
.nav-dropdown {
  position: relative;
}
.nav-link-parent {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  cursor: pointer;
}
.nav-caret {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--text-dim);
  transition: color 0.2s, transform 0.2s;
}
.nav-dropdown:hover .nav-caret {
  color: var(--gold);
  transform: translateY(1px);
}
.nav-submenu {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(-4px);
  min-width: 180px;
  background: var(--bg-elev);
  border: 1px solid var(--gold-line);
  padding: 6px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
  z-index: 60;
  box-shadow: 0 24px 60px -20px rgba(0,0,0,0.6);
}
/* Invisible bridge so the cursor can travel from the parent link
   into the submenu without crossing an un-hovered gap. */
.nav-submenu::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: -14px;
  height: 14px;
}
.nav-submenu.open {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(-50%) translateY(8px);
}
.nav-sublink {
  display: block;
  padding: 14px 18px;
  transition: background 0.2s, color 0.2s;
  cursor: pointer;
}
.nav-sublink:hover {
  background: var(--gold-soft);
}
.nav-sublink.active .nav-sub-name { color: var(--gold); }
.nav-sub-no {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--gold);
  letter-spacing: 0.15em;
}
.nav-sub-name {
  font-family: var(--serif);
  font-size: 20px;
  font-weight: 400;
  color: var(--text);
  letter-spacing: 0.01em;
}
.nav-sub-tag {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--text-mute);
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

/* === Buttons === */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 16px 28px;
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  border-radius: 1px;
  transition: all 0.25s ease;
  font-weight: 500;
}
.btn-primary {
  background: var(--gold);
  color: #17140f;
  border: 1px solid var(--gold);
}
.btn-primary:hover {
  background: var(--gold-bright);
  border-color: var(--gold-bright);
}
.btn-ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--line);
}
.btn-ghost:hover {
  border-color: var(--gold);
  color: var(--gold);
}
.btn .arrow {
  font-family: var(--mono);
  font-weight: 400;
  font-size: 14px;
}

/* === Eyebrow === */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold);
}
.eyebrow::before {
  content: "";
  width: 24px;
  height: 1px;
  background: var(--gold);
}

/* === Footer === */
.footer {
  border-top: 1px solid var(--line-soft);
  padding: 80px 0 40px;
  margin-top: 120px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 60px;
  margin-bottom: 80px;
}
.footer h5 {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold);
  font-weight: 400;
  margin-bottom: 20px;
}
.footer ul { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.footer ul a { color: var(--text-mute); font-size: 14px; transition: color 0.2s; }
.footer ul a:hover { color: var(--text); }
.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 30px;
  border-top: 1px solid var(--line-soft);
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text-dim);
  letter-spacing: 0.1em;
}
.footer-tag {
  font-family: var(--serif);
  font-style: italic;
  font-size: 16px;
  color: var(--text-mute);
  letter-spacing: 0;
  margin-top: 16px;
  line-height: 1.5;
}

/* === Placeholder image === */
.ph {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--line);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
.ph::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: repeating-linear-gradient(
    135deg,
    transparent 0,
    transparent 14px,
    var(--gold-soft) 14px,
    var(--gold-soft) 15px
  );
  opacity: 0.7;
}
.ph-label {
  position: relative;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-dim);
  padding: 6px 12px;
  background: var(--bg);
  border: 1px solid var(--line);
}

/* === Page transition === */
.page {
  animation: pageIn 0.5s cubic-bezier(0.2, 0.7, 0.2, 1);
}
@keyframes pageIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* === Reveal on scroll === */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}
.reveal.in {
  opacity: 1;
  transform: translateY(0);
}

.gold-shine {
  font-weight: 700;
  background: linear-gradient(
    90deg,
    var(--gold-deep) 0%,
    var(--gold) 30%,
    var(--gold-bright) 50%,
    var(--gold) 70%,
    var(--gold-deep) 100%
  );
  background-size: 200% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  animation: goldShine 3.5s ease-in-out infinite;
}
@keyframes goldShine {
  0%   { background-position: 200% 50%; }
  100% { background-position: -100% 50%; }
}

/* selection */
::selection { background: var(--gold); color: #17140f; }

/* scrollbar */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--line); border-radius: 0; }
::-webkit-scrollbar-thumb:hover { background: var(--gold-deep); }
