/*
 * GRAHAMER.AI — Design System v3
 * Fonts: Plus Jakarta Sans (headings) + DM Sans (body)
 * Shared across all pages
 */

/* ── IMPORT ─────────────────────────────────────────── */
/* ── RESET ──────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: #060a14;
  color: #f0f6ff;
  font-family: 'DM Sans', system-ui, sans-serif;
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
strong { font-weight: 600; }

/* ── TOKENS ─────────────────────────────────────────── */
:root {
  --bg:        #060a14;
  --bg2:       #0c1220;
  --bg3:       #111827;
  --bg4:       #161f2e;
  --border:    rgba(255,255,255,0.08);
  --border2:   rgba(255,255,255,0.14);
  --border3:   rgba(255,255,255,0.22);
  --cyan:      #00e5ff;
  --cyan-dim:  rgba(0,229,255,0.1);
  --cyan-glow: rgba(0,229,255,0.22);
  --indigo:    #6366f1;
  --text:      #f0f6ff;
  --text2:     #c8d6e8;
  --muted:     #8b9ab3;
  --muted2:    #5a6a80;
  --ff-h:      'Plus Jakarta Sans', sans-serif;
  --ff-b:      'DM Sans', sans-serif;
  --ease:      cubic-bezier(.4,0,.2,1);
  --r:         12px;
}

/* ── LAYOUT ─────────────────────────────────────────── */
.g-container { max-width: 1180px; margin: 0 auto; padding: 0 clamp(20px,5vw,52px); }
.g-section   { padding: clamp(72px,9vw,120px) 0; }
.g-divider   { width:100%; height:1px; background: var(--border); }

/* ── TYPE SCALE ─────────────────────────────────────── */
.g-label {
  font-family: var(--ff-h);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: var(--cyan);
  margin-bottom: 0.9rem;
}
.g-h1 {
  font-family: var(--ff-h);
  font-size: clamp(2.4rem, 5vw, 3.8rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.3px;
  margin-bottom: 1.4rem;
}
.g-h2 {
  font-family: var(--ff-h);
  font-size: clamp(1.9rem, 3.8vw, 2.8rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.2px;
  margin-bottom: 1.2rem;
}
.g-h3 {
  font-family: var(--ff-h);
  font-size: clamp(1.3rem, 2.5vw, 1.7rem);
  font-weight: 700;
  line-height: 1.25;
  margin-bottom: 0.8rem;
}
.g-h4 {
  font-family: var(--ff-h);
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}
.g-sub {
  font-size: 1.1rem;
  color: var(--muted);
  line-height: 1.72;
  max-width: 600px;
}
.g-cyan  { color: var(--cyan); }
.g-muted { color: var(--muted); }

/* ── BUTTONS ────────────────────────────────────────── */
.g-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--ff-h);
  font-weight: 700;
  font-size: 0.95rem;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  transition: transform .2s var(--ease), box-shadow .2s var(--ease), background .2s, border-color .2s, color .2s;
  text-decoration: none;
  white-space: nowrap;
}
.g-btn-lg  { padding: 15px 30px; font-size: 1rem; }
.g-btn-md  { padding: 11px 22px; }
.g-btn-sm  { padding: 8px 16px; font-size: 0.85rem; }
.g-btn-primary { background: var(--cyan); color: #050a12; }
.g-btn-primary:hover { transform: translateY(-2px); box-shadow: 0 10px 34px var(--cyan-glow); }
.g-btn-outline { background: transparent; color: var(--text); border: 1.5px solid var(--border2); }
.g-btn-outline:hover { border-color: var(--cyan); color: var(--cyan); transform: translateY(-2px); }
.g-btn-ghost { background: rgba(255,255,255,0.04); color: var(--text2); border: 1.5px solid var(--border); }
.g-btn-ghost:hover { background: rgba(255,255,255,0.08); border-color: var(--border2); }

/* ── NAVIGATION ─────────────────────────────────────── */
.g-nav {
  position: fixed; top:0; left:0; right:0;
  z-index: 200;
  height: 68px;
  border-bottom: 1px solid transparent;
  transition: background .3s var(--ease), border-color .3s var(--ease);
}
.g-nav.is-solid {
  background: rgba(6,10,20,0.94);
  backdrop-filter: blur(20px) saturate(1.4);
  border-color: var(--border);
}
.g-nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
  gap: 1.5rem;
}
.g-nav-logo {
  font-family: var(--ff-h);
  font-size: 1.2rem;
  font-weight: 800;
  letter-spacing: -0.3px;
  flex-shrink: 0;
}
.g-nav-logo em { font-style: normal; color: var(--cyan); }

/* Desktop links */
.g-nav-menu {
  display: flex;
  align-items: center;
  gap: 2px;
  flex: 1;
  justify-content: center;
}
.g-nav-link {
  font-family: var(--ff-h);
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--muted);
  padding: 8px 13px;
  border-radius: 8px;
  transition: color .18s, background .18s;
  white-space: nowrap;
  position: relative;
}
.g-nav-link:hover,
.g-nav-link.is-active { color: var(--text); background: rgba(255,255,255,0.05); }

/* Dropdown */
.g-nav-item { position: relative; }
.g-nav-item:hover .g-dropdown { opacity: 1; pointer-events: all; transform: translateX(-50%) translateY(0); }
.g-dropdown {
  position: absolute;
  top: calc(100% + 6px);
  left: 50%;
  transform: translateX(-50%) translateY(-8px);
  background: var(--bg2);
  border: 1px solid var(--border2);
  border-radius: var(--r);
  padding: 0.5rem;
  min-width: 260px;
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s var(--ease), transform .25s var(--ease);
  box-shadow: 0 24px 60px rgba(0,0,0,0.5);
  /* Stay open longer — invisible bridge between nav link and dropdown */
}
/* Invisible hover bridge so mouse can reach dropdown without gap */
.g-nav-item::after {
  content: '';
  position: absolute;
  top: 100%;
  left: -20px;
  right: -20px;
  height: 14px;
}
.g-nav-item:hover .g-dropdown,
.g-dropdown:hover { opacity: 1; pointer-events: all; transform: translateX(-50%) translateY(0); }
.g-dropdown-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 0.9rem;
  font-family: var(--ff-h);
  font-weight: 600;
  color: var(--text2);
  transition: background .15s, color .15s;
}
.g-dropdown-item:hover { background: rgba(255,255,255,0.06); color: var(--text); }
.g-dropdown-item .dd-icon { font-size: 1rem; width: 22px; text-align:center; flex-shrink:0; }
.g-dropdown-item .dd-sub { font-size: 0.75rem; color: var(--muted2); font-weight: 400; }
.g-dropdown-sep { height: 1px; background: var(--border); margin: 0.4rem 0; }

/* Nav right */
.g-nav-right {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-shrink: 0;
}
.g-nav-tel {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: var(--ff-h);
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--cyan);
  white-space: nowrap;
}
.g-nav-tel svg { width: 13px; height: 13px; flex-shrink: 0; }

/* Hamburger */
.g-hamburger {
  display: none;
  background: none;
  border: 1.5px solid var(--border2);
  border-radius: 8px;
  padding: 8px;
  cursor: pointer;
  color: var(--text);
}
.g-hamburger svg { width: 20px; height: 20px; display: block; }

/* Mobile menu */
.g-mobile-menu {
  display: none;
  position: fixed;
  inset: 0;
  top: 68px;
  background: rgba(6,10,20,0.98);
  backdrop-filter: blur(20px);
  z-index: 199;
  padding: 2rem clamp(20px,5vw,52px);
  overflow-y: auto;
  flex-direction: column;
  gap: 0.25rem;
}
.g-mobile-menu.is-open { display: flex; }
.g-mobile-link {
  font-family: var(--ff-h);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text2);
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.g-mobile-link:hover { color: var(--cyan); }
.g-mobile-sub {
  display: flex;
  flex-direction: column;
  padding: 0.5rem 0 0.5rem 1.2rem;
}
.g-mobile-sub a {
  font-size: 0.95rem;
  color: var(--muted);
  padding: 8px 0;
  font-family: var(--ff-h);
  font-weight: 600;
  transition: color .15s;
}
.g-mobile-sub a:hover { color: var(--text); }

/* ── CARDS ──────────────────────────────────────────── */
.g-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: clamp(1.5rem,3vw,2.2rem);
  transition: border-color .25s, transform .25s;
}
.g-card:hover { border-color: var(--border2); transform: translateY(-3px); }
.g-card-accent { border-left: 3px solid var(--cyan); }

/* ── CHIPS ──────────────────────────────────────────── */
.g-chip {
  display: inline-flex;
  align-items: center;
  font-family: var(--ff-h);
  font-size: 0.82rem;
  font-weight: 700;
  padding: 6px 14px;
  border-radius: 8px;
  border: 1.5px solid var(--border2);
  background: rgba(255,255,255,0.04);
  color: var(--text2);
  transition: border-color .2s, background .2s, transform .2s;
}
.g-chip:hover  { border-color: var(--cyan); background: var(--cyan-dim); transform: translateY(-2px); }
.g-chip-active { border-color: rgba(0,229,255,0.35); color: var(--cyan); background: var(--cyan-dim); }

/* ── PAGE HERO (inner pages) ────────────────────────── */
.g-page-hero {
  padding: calc(68px + clamp(48px,7vw,80px)) 0 clamp(48px,7vw,80px);
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  position: relative;
  overflow: hidden;
}
.g-page-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 70% 80% at 70% 50%, rgba(0,229,255,0.05) 0%, transparent 70%);
  pointer-events: none;
}
.g-breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
  color: var(--muted2);
  margin-bottom: 1.4rem;
  flex-wrap: wrap;
}
.g-breadcrumb a:hover { color: var(--muted); }
.g-breadcrumb-sep { color: var(--muted2); }

/* ── SECTION PATTERNS ───────────────────────────────── */
.g-section-alt { background: var(--bg2); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.g-section-dark { background: var(--bg); }

/* ── FOOTER ─────────────────────────────────────────── */
.g-footer {
  background: var(--bg);
  border-top: 1px solid var(--border);
  padding: 3.5rem 0 2rem;
}
.g-footer-grid {
  display: grid;
  grid-template-columns: 2.2fr 1fr 1fr 1fr;
  gap: 3rem;
  margin-bottom: 2.5rem;
}
.g-footer-brand p { font-size: 0.88rem; color: var(--muted); margin-top: 0.7rem; max-width: 280px; line-height: 1.65; }
.g-footer-col h4 {
  font-family: var(--ff-h);
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 2.5px;
  color: var(--muted2);
  margin-bottom: 1.1rem;
}
.g-footer-col ul { list-style: none; display: flex; flex-direction: column; gap: 0.55rem; }
.g-footer-col ul li a { font-size: 0.88rem; color: var(--muted); transition: color .18s; }
.g-footer-col ul li a:hover { color: var(--text); }
.g-footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  padding-top: 1.8rem;
  border-top: 1px solid var(--border);
  font-size: 0.8rem;
  color: var(--muted2);
}

/* ── REVEAL ANIMATION ───────────────────────────────── */
.g-reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .55s var(--ease), transform .55s var(--ease);
}
.g-reveal.g-d1 { transition-delay: .08s; }
.g-reveal.g-d2 { transition-delay: .16s; }
.g-reveal.g-d3 { transition-delay: .24s; }
.g-reveal.is-visible { opacity: 1; transform: none; }

/* ── PROSE (blog / long content) ────────────────────── */
.g-prose { max-width: 760px; line-height: 1.8; }
.g-prose h2 { font-family: var(--ff-h); font-size: 1.65rem; font-weight: 700; margin: 2.5rem 0 0.9rem; color: var(--text); }
.g-prose h3 { font-family: var(--ff-h); font-size: 1.25rem; font-weight: 700; margin: 1.8rem 0 0.7rem; }
.g-prose p  { margin-bottom: 1.3rem; }
.g-prose ul, .g-prose ol { margin: 1rem 0 1.5rem 1.5rem; }
.g-prose li { margin-bottom: 0.45rem; }
.g-prose strong { color: var(--text); }
.g-prose a  { color: var(--cyan); text-decoration: underline; text-underline-offset: 3px; }
.g-prose table { width:100%; border-collapse:collapse; margin:1.5rem 0; font-size:.92rem; }
.g-prose th, .g-prose td { border:1px solid var(--border); padding: 10px 14px; text-align:left; }
.g-prose th { background: var(--bg2); font-family: var(--ff-h); font-weight: 700; }
.g-prose blockquote { border-left: 3px solid var(--cyan); padding-left:1.3rem; color:var(--muted); font-style:italic; margin:1.5rem 0; }

/* ── COOKIE BANNER ──────────────────────────────────── */
#cookie-banner {
  position: fixed;
  bottom: 20px; left: 20px; right: 20px;
  max-width: 520px;
  z-index: 9999;
  background: var(--bg3);
  border: 1px solid var(--border2);
  border-radius: 16px;
  padding: 1.4rem 1.6rem;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}
#cookie-banner p { font-size: 0.88rem; color: var(--muted); margin-bottom: 1rem; }
#cookie-banner .cookie-buttons { display: flex; gap: 0.75rem; }

/* ── RESPONSIVE ─────────────────────────────────────── */
@media (max-width: 1024px) {
  .g-nav-menu { display: none; }
  .g-hamburger { display: flex; }
  .g-nav-tel { display: none; }
}
@media (max-width: 768px) {
  .g-footer-grid { grid-template-columns: 1fr 1fr; }
  .g-footer-brand { grid-column: 1/-1; }
}
@media (max-width: 480px) {
  .g-footer-grid { grid-template-columns: 1fr; }
  .g-footer-bottom { flex-direction: column; align-items: flex-start; }
}
