/* ==========================================================================
   Deltis Corp. — shared styles
   ========================================================================== */

:root {
  /* Palette (dark / default) */
  --abyss: #05101c;
  --hull:  #0b1a2b;
  --deep:  #0f2338;
  --steel: #3a6d8c;
  --mist:  #e8ecef;
  --fog:   #b6c2cc;
  --sodium:#f4a93c;
  --line:  rgba(232, 236, 239, 0.12);
  --line-strong: rgba(232, 236, 239, 0.25);

  --bg: var(--abyss);
  --bg-2: var(--hull);
  --bg-3: var(--deep);
  --fg: var(--mist);
  --fg-muted: var(--fog);
  --fg-dim: #6f7d89;
  --accent: var(--sodium);

  /* Type */
  --serif: "Instrument Serif", "Times New Roman", serif;
  --sans:  "Inter Tight", "Helvetica Neue", Arial, sans-serif;
  --mono:  "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;

  /* Rhythm */
  --container: 1440px;
  --gutter: clamp(20px, 4vw, 56px);
  --nav-h: 76px;
}

:root[data-theme="light"] {
  --abyss: #f3f1ec;
  --hull:  #e8e5dd;
  --deep:  #ddd8cc;
  --mist:  #0b1a2b;
  --fog:   #2b3a48;
  --steel: #3a6d8c;
  --sodium:#c4411f;
  --line:  rgba(11, 26, 43, 0.12);
  --line-strong: rgba(11, 26, 43, 0.25);

  --bg: #f3f1ec;
  --bg-2: #eae6dc;
  --bg-3: #ddd8cc;
  --fg: #0b1a2b;
  --fg-muted: #2b3a48;
  --fg-dim: #6b7380;
  --accent: #c4411f;
}

/* Reset */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
img, svg { display: block; max-width: 100%; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }

::selection { background: var(--accent); color: var(--abyss); }

/* Layout */
.wrap {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* Typography */
.display {
  font-family: var(--serif);
  font-weight: 400;
  line-height: 0.95;
  letter-spacing: -0.02em;
  font-style: normal;
}
.mono {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--fg-muted);
}
.eyebrow {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
}
.lede {
  font-size: clamp(17px, 1.4vw, 20px);
  line-height: 1.55;
  color: var(--fg-muted);
  max-width: 58ch;
}

h1, h2, h3, h4 { margin: 0; }

/* ==========================================================================
   Navigation
   ========================================================================== */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--nav-h);
  z-index: 100;
  display: flex;
  align-items: center;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  background: color-mix(in oklab, var(--bg) 72%, transparent);
  border-bottom: 1px solid transparent;
  transition: background .3s, border-color .3s;
}
.nav.scrolled {
  background: color-mix(in oklab, var(--bg) 92%, transparent);
  border-bottom-color: var(--line);
}
.nav .wrap {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  height: 34px;
}
.brand img { height: 100%; width: auto; display: block; }
.brand img.logo-light { display: none; }
[data-theme="light"] .brand img.logo-light { display: block; }
[data-theme="light"] .brand img.logo-dark  { display: none; }
.brand-tag {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--fg-dim);
  border-left: 1px solid var(--line-strong);
  padding-left: 12px;
  height: 18px;
  display: flex;
  align-items: center;
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 36px;
}
.nav-links a {
  font-size: 14px;
  letter-spacing: 0.02em;
  color: var(--fg-muted);
  position: relative;
  padding: 6px 0;
  transition: color .2s;
}
.nav-links a:hover, .nav-links a.active { color: var(--fg); }
.nav-links a.active::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: -2px;
  height: 1px;
  background: var(--accent);
}
.nav-cta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 18px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  font-size: 13px;
  transition: background .2s, border-color .2s;
}
.nav-cta:hover {
  background: var(--fg);
  color: var(--bg);
  border-color: var(--fg);
}
.nav-cta .dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in oklab, var(--accent) 25%, transparent);
  animation: pulse 2s infinite;
}

/* Inline theme toggle in nav — single icon button */
.nav-theme-toggle {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--line-strong);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--fg-muted);
  transition: background .2s, color .2s, border-color .2s;
  cursor: pointer;
  flex-shrink: 0;
}
.nav-theme-toggle:hover { color: var(--fg); border-color: var(--fg-muted); }
.nav-theme-toggle svg { display: block; }
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 3px color-mix(in oklab, var(--accent) 25%, transparent); }
  50%      { box-shadow: 0 0 0 6px color-mix(in oklab, var(--accent) 8%, transparent); }
}

/* ==========================================================================
   Footer
   ========================================================================== */
.footer {
  position: relative;
  padding: 96px 0 40px;
  border-top: 1px solid var(--line);
  background: var(--bg);
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr 1fr;
  gap: 48px;
  padding-bottom: 72px;
  border-bottom: 1px solid var(--line);
}
.footer-brand h3 {
  font-family: var(--serif);
  font-size: 44px;
  line-height: 1;
  margin-bottom: 16px;
}
.footer-brand p { color: var(--fg-muted); max-width: 36ch; font-size: 14px; }
.footer-col h5 {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--fg-dim);
  font-weight: 500;
  margin-bottom: 18px;
}
.footer-col ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.footer-col a { font-size: 14px; color: var(--fg-muted); transition: color .2s; }
.footer-col a:hover { color: var(--fg); }
.footer-bottom {
  padding-top: 28px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--fg-dim);
}
.footer-bottom .coords { display: flex; gap: 28px; }

/* ==========================================================================
   Data strip / coordinates bar
   ========================================================================== */
.datastrip {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 14px 0;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--fg-dim);
  overflow: hidden;
}
.datastrip .wrap {
  display: flex;
  gap: 40px;
  justify-content: space-between;
  flex-wrap: nowrap;
}
.datastrip span { display: inline-flex; gap: 10px; align-items: center; white-space: nowrap; }
.datastrip .tick {
  width: 6px; height: 6px; border: 1px solid var(--fg-dim); transform: rotate(45deg);
}

/* ==========================================================================
   Buttons
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 16px 26px;
  font-size: 14px;
  letter-spacing: 0.02em;
  border-radius: 999px;
  transition: transform .2s, background .2s, color .2s;
  cursor: pointer;
  border: 1px solid transparent;
}
.btn-primary { background: var(--fg); color: var(--bg); }
.btn-primary:hover { background: var(--accent); color: var(--abyss); }
.btn-ghost { border-color: var(--line-strong); color: var(--fg); }
.btn-ghost:hover { border-color: var(--fg); background: color-mix(in oklab, var(--fg) 6%, transparent); }
.btn .arrow { transition: transform .2s; }
.btn:hover .arrow { transform: translateX(4px); }

/* ==========================================================================
   Scroll reveal
   ========================================================================== */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .9s cubic-bezier(.2,.7,.2,1), transform .9s cubic-bezier(.2,.7,.2,1);
  transition-delay: var(--reveal-delay, 0s);
}
.reveal.in { opacity: 1; transform: none; }
/* Frozen-clock / no-animation fallback: show final states without transitions
   (only ever applied in environments where the animation clock is paused). */
.no-anim .reveal { opacity: 1 !important; transform: none !important; }
.no-anim *, .no-anim *::before, .no-anim *::after { transition: none !important; animation: none !important; }

/* ==========================================================================
   Placeholder imagery (striped, labeled — never fake art)
   ========================================================================== */
.ph {
  position: relative;
  background:
    repeating-linear-gradient(135deg,
      color-mix(in oklab, var(--steel) 22%, transparent) 0 2px,
      transparent 2px 12px),
    linear-gradient(180deg, var(--bg-3), var(--bg-2));
  border: 1px solid var(--line);
  overflow: hidden;
}
.ph::after {
  content: attr(data-label);
  position: absolute;
  left: 14px; bottom: 12px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--fog);
  opacity: 0.7;
}
.ph::before {
  content: attr(data-coord);
  position: absolute;
  right: 14px; top: 12px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  color: var(--fog);
  opacity: 0.6;
}

/* ==========================================================================
   Utilities
   ========================================================================== */
.grid { display: grid; gap: 32px; }
.divider {
  height: 1px;
  background: var(--line);
  margin: 0;
}
.section { padding: clamp(80px, 10vw, 140px) 0; position: relative; }
.section-head {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) 2fr;
  gap: 64px;
  align-items: end;
  margin-bottom: 64px;
  padding-bottom: 28px;
  border-bottom: 1px solid var(--line);
}
.section-head h2 {
  font-family: var(--serif);
  font-size: clamp(42px, 5vw, 72px);
  line-height: 0.95;
  letter-spacing: -0.02em;
}

/* Tweaks panel */
.tweaks-panel {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 500;
  background: var(--bg-2);
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  padding: 16px 18px;
  min-width: 240px;
  box-shadow: 0 12px 40px rgba(0,0,0,0.45);
  display: none;
  font-size: 13px;
}
.tweaks-panel.show { display: block; }
.tweaks-panel h6 {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--fg-dim);
  margin: 0 0 12px;
  font-weight: 500;
}
.tweaks-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 8px 0;
  border-top: 1px solid var(--line);
}
.tweaks-row:first-of-type { border-top: 0; }
.tweaks-row label { color: var(--fg-muted); }
.tweaks-seg {
  display: inline-flex;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  overflow: hidden;
}
.tweaks-seg button {
  padding: 6px 12px;
  font-size: 12px;
  color: var(--fg-muted);
}
.tweaks-seg button.on { background: var(--fg); color: var(--bg); }

/* Responsive-ish (designing primarily for desktop) */
@media (max-width: 900px) {
  .nav-links { display: none; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .section-head { grid-template-columns: 1fr; gap: 20px; }
}
