/* ============================================================
   Gevian.id — Design System
   Display: Space Grotesk · Body: IBM Plex Sans · Mono: IBM Plex Mono
   ============================================================ */

:root {
  /* Color */
  --ink:        oklch(0.22 0.028 258);
  --ink-soft:   oklch(0.42 0.022 258);
  --muted:      oklch(0.55 0.018 258);
  --line:       oklch(0.90 0.012 258);
  --line-soft:  oklch(0.945 0.008 258);
  --canvas:     oklch(0.985 0.004 250);
  --surface:    oklch(1 0 0);
  --surface-2:  oklch(0.975 0.006 250);

  --navy:       oklch(0.18 0.034 258);
  --navy-2:     oklch(0.225 0.038 258);
  --navy-line:  oklch(0.32 0.03 258);

  --primary:    oklch(0.56 0.19 256);
  --primary-600:oklch(0.50 0.19 256);
  --primary-300:oklch(0.74 0.13 256);
  --cyan:       oklch(0.78 0.11 210);
  --cyan-bright:oklch(0.82 0.12 205);

  --on-navy:        oklch(0.97 0.006 250);
  --on-navy-soft:   oklch(0.78 0.02 250);
  --on-navy-muted:  oklch(0.62 0.022 255);

  /* Type */
  --font-display: "Space Grotesk", system-ui, sans-serif;
  --font-body: "IBM Plex Sans", system-ui, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, monospace;

  /* Layout */
  --container: 1200px;
  --radius: 14px;
  --radius-sm: 10px;
  --radius-lg: 22px;

  --shadow-sm: 0 1px 2px oklch(0.4 0.03 258 / 0.06), 0 2px 8px oklch(0.4 0.03 258 / 0.05);
  --shadow-md: 0 4px 14px oklch(0.4 0.03 258 / 0.08), 0 12px 30px oklch(0.4 0.03 258 / 0.07);
  --shadow-lg: 0 18px 50px oklch(0.3 0.04 258 / 0.16);

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--canvas);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.06;
  letter-spacing: -0.02em;
  margin: 0;
  text-wrap: balance;
}

p { margin: 0; text-wrap: pretty; }
a { color: inherit; text-decoration: none; }
img, svg { display: block; max-width: 100%; }

/* ---------- Layout helpers ---------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: 28px;
}
.section { padding-block: clamp(64px, 9vw, 128px); }
.section-sm { padding-block: clamp(48px, 6vw, 80px); }

.eyebrow {
  font-family: var(--font-mono);
  font-size: 12.5px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--primary);
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.eyebrow::before {
  content: "";
  width: 22px; height: 1.5px;
  background: var(--primary);
  display: inline-block;
}
.eyebrow.on-dark { color: var(--cyan); }
.eyebrow.on-dark::before { background: var(--cyan); }
.eyebrow.center { justify-content: center; }

.lede {
  font-size: clamp(18px, 2.1vw, 21px);
  color: var(--ink-soft);
  line-height: 1.6;
  max-width: 62ch;
}

.display {
  font-size: clamp(40px, 6.4vw, 76px);
  letter-spacing: -0.035em;
}
.h-xl { font-size: clamp(32px, 4.6vw, 54px); }
.h-lg { font-size: clamp(27px, 3.4vw, 40px); }
.h-md { font-size: clamp(21px, 2.4vw, 27px); }

.text-grad {
  background: linear-gradient(100deg, var(--primary), var(--cyan));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-family: var(--font-body);
  font-weight: 550;
  font-size: 15.5px;
  padding: 13px 22px;
  border-radius: 11px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.25s var(--ease), background 0.25s var(--ease),
              box-shadow 0.25s var(--ease), border-color 0.25s var(--ease), color 0.2s;
  white-space: nowrap;
}
.btn svg { width: 17px; height: 17px; }
.btn-primary {
  background: var(--primary);
  color: oklch(0.99 0 0);
  box-shadow: 0 6px 18px oklch(0.56 0.19 256 / 0.30);
}
.btn-primary:hover { background: var(--primary-600); transform: translateY(-2px); box-shadow: 0 10px 26px oklch(0.56 0.19 256 / 0.38); }
.btn-ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--line);
}
.btn-ghost:hover { border-color: var(--ink); transform: translateY(-2px); }
.btn-on-dark { background: oklch(1 0 0 / 0.06); color: var(--on-navy); border-color: oklch(1 0 0 / 0.16); }
.btn-on-dark:hover { background: oklch(1 0 0 / 0.12); border-color: oklch(1 0 0 / 0.3); transform: translateY(-2px); }
.btn-lg { padding: 16px 28px; font-size: 16.5px; }

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-weight: 550;
  color: var(--primary);
  font-size: 15.5px;
}
.link-arrow svg { width: 16px; height: 16px; transition: transform 0.25s var(--ease); }
.link-arrow:hover svg { transform: translateX(4px); }

/* ---------- Top nav ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: oklch(0.985 0.004 250 / 0.78);
  backdrop-filter: blur(14px) saturate(1.4);
  -webkit-backdrop-filter: blur(14px) saturate(1.4);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s, background 0.3s;
}
.nav.scrolled { border-bottom-color: var(--line); background: oklch(0.985 0.004 250 / 0.9); }
.nav-inner {
  height: 70px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.brand { display: inline-flex; align-items: center; gap: 10px; font-family: var(--font-display); font-weight: 600; font-size: 20px; letter-spacing: -0.02em; color: var(--ink); }
.brand .dotid { color: var(--primary); }
.brand-mark { height: 32px; width: auto; display: block; }
.logo-chip { display: inline-flex; background: #fff; padding: 9px 14px; border-radius: 12px; box-shadow: 0 2px 10px oklch(0 0 0 / 0.18); }
.logo-chip img { height: 42px; width: auto; display: block; }
.nav-links { display: flex; align-items: center; gap: 4px; list-style: none; margin: 0; padding: 0; }
.nav-links a {
  font-size: 15px;
  font-weight: 500;
  color: var(--ink-soft);
  padding: 8px 14px;
  border-radius: 9px;
  transition: color 0.2s, background 0.2s;
  position: relative;
}
.nav-links a:hover { color: var(--ink); background: oklch(0.5 0.02 258 / 0.06); }
.nav-links a.active { color: var(--primary); }
.nav-cta { display: flex; align-items: center; gap: 10px; }
.nav-toggle { display: none; background: none; border: none; cursor: pointer; padding: 8px; color: var(--ink); }

/* dropdown */
.has-menu { position: relative; }
.menu-panel {
  position: absolute;
  top: calc(100% + 10px);
  left: 50%;
  transform: translateX(-50%) translateY(8px);
  width: 460px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: 12px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.22s var(--ease), transform 0.22s var(--ease), visibility 0.22s;
}
.has-menu:hover .menu-panel { opacity: 1; visibility: visible; transform: translateX(-50%) translateY(0); }
.menu-item { display: flex; gap: 12px; padding: 12px; border-radius: 10px; transition: background 0.18s; }
.menu-item:hover { background: var(--surface-2); }
.menu-item .mi-icon { flex: none; width: 38px; height: 38px; border-radius: 9px; display: grid; place-items: center; background: oklch(0.56 0.19 256 / 0.1); color: var(--primary); }
.menu-item .mi-icon svg { width: 19px; height: 19px; }
.menu-item h5 { font-family: var(--font-display); font-size: 15px; font-weight: 600; margin: 0 0 2px; color: var(--ink); }
.menu-item p { font-size: 13px; color: var(--muted); line-height: 1.4; }

/* mobile menu */
.mobile-menu {
  position: fixed;
  inset: 70px 0 0;
  background: var(--canvas);
  z-index: 99;
  padding: 24px 28px 40px;
  transform: translateY(-12px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s var(--ease), transform 0.3s var(--ease), visibility 0.3s;
  overflow-y: auto;
}
.mobile-menu.open { opacity: 1; visibility: visible; transform: translateY(0); }
.mobile-menu a { display: block; font-family: var(--font-display); font-size: 22px; font-weight: 500; padding: 14px 0; border-bottom: 1px solid var(--line); color: var(--ink); }
.mobile-menu .mm-sub { font-family: var(--font-body); font-size: 16px; padding-left: 16px; color: var(--ink-soft); border-bottom: 1px solid var(--line-soft); }

/* ---------- Cards / surfaces ---------- */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}
.grid { display: grid; gap: 22px; }
.cols-2 { grid-template-columns: repeat(2, 1fr); }
.cols-3 { grid-template-columns: repeat(3, 1fr); }
.cols-4 { grid-template-columns: repeat(4, 1fr); }

/* badge / chip */
.chip {
  display: inline-flex; align-items: center; gap: 7px;
  font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.04em;
  padding: 5px 11px; border-radius: 100px;
  border: 1px solid var(--line); background: var(--surface); color: var(--ink-soft);
}
.chip .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--cyan); }

/* ---------- Dark feature section ---------- */
.dark {
  background: var(--navy);
  color: var(--on-navy);
  position: relative;
  overflow: hidden;
}
.dark h1, .dark h2, .dark h3, .dark h4 { color: var(--on-navy); }
.dark .lede { color: var(--on-navy-soft); }
.grid-bg::before {
  content: "";
  position: absolute; inset: 0;
  background-image:
    linear-gradient(oklch(1 0 0 / 0.035) 1px, transparent 1px),
    linear-gradient(90deg, oklch(1 0 0 / 0.035) 1px, transparent 1px);
  background-size: 54px 54px;
  mask-image: radial-gradient(ellipse 90% 75% at 50% 30%, #000 30%, transparent 78%);
  pointer-events: none;
}
.glow {
  position: absolute;
  width: 620px; height: 620px;
  border-radius: 50%;
  background: radial-gradient(circle, oklch(0.56 0.19 256 / 0.4), transparent 65%);
  filter: blur(30px);
  pointer-events: none;
}

/* ---------- Footer ---------- */
.footer { background: var(--navy); color: var(--on-navy-soft); padding-block: 72px 36px; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 40px; }
.footer h5 { font-family: var(--font-mono); font-size: 12px; text-transform: uppercase; letter-spacing: 0.14em; color: var(--on-navy-muted); margin: 0 0 18px; font-weight: 500; }
.footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 11px; }
.footer ul a { font-size: 15px; color: var(--on-navy-soft); transition: color 0.2s; }
.footer ul a:hover { color: var(--on-navy); }
.footer .brand { color: var(--on-navy); }
.footer-bottom { margin-top: 56px; padding-top: 28px; border-top: 1px solid var(--navy-line); display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; font-size: 13.5px; color: var(--on-navy-muted); font-family: var(--font-mono); }

/* ---------- Scroll reveal ---------- */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity 0.7s var(--ease), transform 0.7s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
.reveal.d1 { transition-delay: 0.08s; }
.reveal.d2 { transition-delay: 0.16s; }
.reveal.d3 { transition-delay: 0.24s; }
.reveal.d4 { transition-delay: 0.32s; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; transition: none; } }

/* ---------- Placeholder media ---------- */
.ph {
  position: relative;
  border-radius: var(--radius);
  background:
    repeating-linear-gradient(135deg, oklch(0.56 0.19 256 / 0.06) 0 10px, transparent 10px 20px),
    var(--surface-2);
  border: 1px solid var(--line);
  display: grid;
  place-items: center;
  overflow: hidden;
}
.ph span {
  font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.06em;
  color: var(--muted); padding: 6px 12px; border-radius: 7px;
  background: oklch(1 0 0 / 0.7); border: 1px solid var(--line);
}
.ph.on-dark { background: repeating-linear-gradient(135deg, oklch(1 0 0 / 0.05) 0 10px, transparent 10px 20px), oklch(1 0 0 / 0.02); border-color: var(--navy-line); }
.ph.on-dark span { background: oklch(0.18 0.034 258 / 0.7); color: var(--on-navy-muted); border-color: var(--navy-line); }

/* Image filling a card's media slot — replaces .ph inside .card */
.card-shot {
  display: block;
  width: 100%;
  /* height:auto is required — the width/height attributes would otherwise
     lock the used height and aspect-ratio would be ignored */
  height: auto;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  object-position: center top;
}

/* ---------- Misc ---------- */
.divider { height: 1px; background: var(--line); border: 0; }
.center { text-align: center; }
.mx-auto { margin-inline: auto; }
.stack > * + * { margin-top: var(--gap, 18px); }

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
  .cols-4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 860px) {
  .nav-links, .nav-cta .btn-ghost { display: none; }
  .nav-toggle { display: inline-flex; }
  .cols-3 { grid-template-columns: 1fr; }
  .cols-2 { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .container { padding-inline: 20px; }
  .cols-4 { grid-template-columns: 1fr 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
