/* ==========================================================================
   Glaukes Technologies — Core Stylesheet
   ========================================================================== */

:root {
  /* Color tokens */
  --bg: #0A0E16;
  --bg-alt: #0D1320;
  --surface: #111928;
  --surface-2: #141D2E;
  --border: rgba(255, 255, 255, 0.09);
  --border-strong: rgba(255, 255, 255, 0.16);

  --teal: #2FE0DD;
  --teal-soft: rgba(47, 224, 221, 0.12);
  --teal-dim: #1B8785;
  --amber: #FF8A42;
  --amber-soft: rgba(255, 138, 66, 0.12);

  --text: #EAF1F7;
  --text-dim: #93A3B8;
  --text-faint: #56637A;

  --font-display: 'Space Grotesk', 'Inter', sans-serif;
  --font-body: 'Inter', -apple-system, sans-serif;
  --font-mono: 'IBM Plex Mono', monospace;

  --container: 1180px;
  --radius: 10px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; margin: 0; padding: 0; }

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 32px;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
  html { scroll-behavior: auto; }
}

:focus-visible {
  outline: 2px solid var(--teal);
  outline-offset: 3px;
  border-radius: 2px;
}

/* Background texture: faint circuit / grid, industrial not decorative */
.grid-field {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.035) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse 90% 70% at 50% 0%, black 40%, transparent 90%);
  pointer-events: none;
}

/* ==========================================================================
   Typography
   ========================================================================== */

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.12;
  letter-spacing: -0.01em;
  margin: 0;
  color: #F5F9FC;
}

h1 { font-size: clamp(2.6rem, 5vw, 4.2rem); letter-spacing: -0.02em; }
h2 { font-size: clamp(1.9rem, 3.2vw, 2.7rem); }
h3 { font-size: 1.3rem; }

p { margin: 0; color: var(--text-dim); }

.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--teal);
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.eyebrow::before {
  content: '';
  width: 20px;
  height: 1px;
  background: var(--teal);
  display: inline-block;
}

.lede {
  font-size: 1.15rem;
  color: var(--text-dim);
  max-width: 640px;
  margin-top: 18px;
}

.section-head {
  max-width: 700px;
  margin-bottom: 56px;
}
.section-head h2 { margin-top: 16px; }
.section-head p { margin-top: 14px; font-size: 1.05rem; }

.mono-tag {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-faint);
}

/* ==========================================================================
   Buttons
   ========================================================================== */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.94rem;
  padding: 13px 26px;
  border-radius: 7px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }

.btn-primary {
  background: var(--teal);
  color: #06181A;
  box-shadow: 0 0 0 0 rgba(47,224,221,0.4);
}
.btn-primary:hover {
  background: #4EEAE7;
  box-shadow: 0 0 24px rgba(47,224,221,0.35);
}

.btn-ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--border-strong);
}
.btn-ghost:hover {
  border-color: var(--teal);
  color: var(--teal);
}

.btn-arrow { transition: transform 0.2s ease; }
.btn:hover .btn-arrow { transform: translateX(3px); }

/* ==========================================================================
   Header / Nav
   ========================================================================== */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(10, 14, 22, 0.78);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}

.nav-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 78px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.08rem;
  color: var(--text);
}
.brand img { height: 34px; width: auto; filter: brightness(0) invert(1); }
.brand small {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.12em;
  color: var(--text-faint);
  font-weight: 400;
  margin-top: 2px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 40px;
}
.nav-links a {
  font-size: 0.92rem;
  color: var(--text-dim);
  position: relative;
  padding: 6px 0;
  transition: color 0.2s ease;
}
.nav-links a:hover { color: var(--text); }
.nav-links a.active { color: var(--text); }
.nav-links a.active::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: -2px;
  height: 2px;
  background: var(--teal);
}

.nav-actions { display: flex; align-items: center; gap: 18px; }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}
.nav-toggle span {
  width: 22px; height: 2px; background: var(--text);
  transition: all 0.25s ease;
}

.mobile-panel {
  display: none;
  flex-direction: column;
  gap: 4px;
  padding: 14px 0 24px;
  border-top: 1px solid var(--border);
}
.mobile-panel a {
  padding: 12px 4px;
  font-size: 1rem;
  color: var(--text-dim);
  border-bottom: 1px solid var(--border);
}
.mobile-panel a.active { color: var(--teal); }
.mobile-panel .btn { margin-top: 14px; justify-content: center; }

body.nav-open .mobile-panel { display: flex; }
body.nav-open .nav-toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
body.nav-open .nav-toggle span:nth-child(2) { opacity: 0; }
body.nav-open .nav-toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 880px) {
  .nav-links { display: none; }
  .nav-actions .btn-primary.desktop-only { display: none; }
  .nav-toggle { display: flex; }
}

/* ==========================================================================
   Hero
   ========================================================================== */

.hero {
  position: relative;
  padding: 96px 0 90px;
  overflow: hidden;
  border-bottom: 1px solid var(--border);
}

.hero-cube {
  position: absolute;
  right: -80px;
  top: 50%;
  transform: translateY(-50%);
  width: 620px;
  opacity: 0.07;
  filter: brightness(0) invert(1);
  pointer-events: none;
}

.hero-inner {
  position: relative;
  z-index: 1;
  max-width: 760px;
}

.hero h1 { margin-top: 22px; }
.hero .lede { font-size: 1.2rem; margin-top: 22px; max-width: 620px; }

.hero-cta {
  display: flex;
  gap: 16px;
  margin-top: 38px;
  flex-wrap: wrap;
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(4, auto);
  gap: 40px;
  margin-top: 68px;
  padding-top: 32px;
  border-top: 1px solid var(--border);
  max-width: 900px;
}
.hero-stats .stat b {
  display: block;
  font-family: var(--font-display);
  font-size: 1.6rem;
  color: #fff;
}
.hero-stats .stat span {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-faint);
}

@media (max-width: 760px) {
  .hero-stats { grid-template-columns: repeat(2, auto); row-gap: 26px; }
}

/* ==========================================================================
   Sections / Layout utilities
   ========================================================================== */

.section { padding: 100px 0; position: relative; }
.section-tight { padding: 72px 0; }
.section-alt { background: var(--bg-alt); }
.section-border-t { border-top: 1px solid var(--border); }
.section-border-b { border-bottom: 1px solid var(--border); }

.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
@media (max-width: 900px) {
  .grid-3, .grid-2 { grid-template-columns: 1fr; }
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  transition: border-color 0.2s ease, transform 0.2s ease;
}
.card:hover { border-color: var(--border-strong); }

.card-icon {
  width: 44px; height: 44px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 8px;
  background: var(--teal-soft);
  color: var(--teal);
  margin-bottom: 20px;
}
.card-icon svg { width: 22px; height: 22px; }

.card h3 { margin-top: 4px; margin-bottom: 10px; color: #fff; }
.card p { font-size: 0.96rem; }

.card-top-rule {
  border-top: 2px solid var(--teal);
  padding-top: 24px;
}

/* Numbered principle rows (decision-loop list) */
.principle {
  display: flex;
  gap: 18px;
  padding: 26px 0;
  border-top: 1px solid var(--border);
}
.principle:first-child { border-top: none; padding-top: 0; }
.principle-icon {
  flex-shrink: 0;
  width: 38px; height: 38px;
  border-radius: 8px;
  border: 1px solid var(--border-strong);
  display: flex; align-items: center; justify-content: center;
  color: var(--teal);
}
.principle-icon svg { width: 19px; height: 19px; }
.principle h4 { font-family: var(--font-body); font-weight: 600; font-size: 1.02rem; color: #fff; margin-bottom: 6px; }
.principle p { font-size: 0.94rem; }

/* Decision loop diagram */
.loop-diagram {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  background: var(--surface);
}
.loop-box {
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  padding: 18px 20px;
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--bg-alt);
}
.loop-box.accent { border-color: var(--teal); background: rgba(47,224,221,0.06); }
.loop-box .ic { color: var(--teal); flex-shrink: 0; }
.loop-box .ic svg { width: 22px; height: 22px; }
.loop-box b { display: block; font-size: 0.95rem; color: #fff; }
.loop-box span { font-size: 0.8rem; color: var(--text-dim); }
.loop-arrow { display: flex; justify-content: center; padding: 10px 0; color: var(--text-faint); }
.loop-side {
  margin-top: 14px;
  margin-left: 20%;
  border: 1px dashed var(--border-strong);
  border-radius: 8px;
  padding: 14px 18px;
  font-size: 0.82rem;
  color: var(--text-dim);
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

/* ==========================================================================
   Compute ladder chart (signature element)
   ========================================================================== */

.ladder-wrap {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 36px 36px 24px;
}
.ladder-chart {
  display: flex;
  align-items: flex-end;
  gap: 22px;
  height: 260px;
  padding-top: 20px;
  border-bottom: 1px solid var(--border);
}
.ladder-bar {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  height: 100%;
  justify-content: flex-end;
}
.ladder-bar .fill {
  width: 100%;
  max-width: 74px;
  border-radius: 6px 6px 0 0;
  background: linear-gradient(180deg, rgba(47,224,221,0.9), rgba(47,224,221,0.35));
  transform: scaleY(0);
  transform-origin: bottom;
  transition: transform 1s cubic-bezier(.2,.8,.2,1);
}
.ladder-bar.sparse .fill {
  background: linear-gradient(180deg, rgba(255,138,66,0.95), rgba(255,138,66,0.35));
}
.ladder-bar .val {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: #fff;
}
.ladder-wrap.in-view .fill { transform: scaleY(1); }
.ladder-labels {
  display: flex;
  gap: 22px;
  margin-top: 14px;
}
.ladder-labels div {
  flex: 1;
  text-align: center;
  font-size: 0.76rem;
  color: var(--text-dim);
}
.ladder-note {
  margin-top: 22px;
  font-size: 0.82rem;
  color: var(--text-faint);
  border-top: 1px solid var(--border);
  padding-top: 18px;
}

/* Spec sheet */
.spec-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.spec-cell {
  background: var(--surface);
  padding: 26px 28px;
}
.spec-cell h4 {
  font-family: var(--font-body);
  font-weight: 600;
  color: #fff;
  font-size: 0.98rem;
  margin-bottom: 12px;
  display: flex; align-items: center; gap: 10px;
}
.spec-cell h4 svg { width: 18px; height: 18px; color: var(--teal); }
.spec-cell ul li {
  font-size: 0.88rem;
  color: var(--text-dim);
  padding: 5px 0;
  font-family: var(--font-mono);
}
.spec-cell ul li b { color: var(--text); font-weight: 500; }
@media (max-width: 760px) { .spec-grid { grid-template-columns: 1fr; } }

/* Deployment wedge cards with image */
.wedge-card { overflow: hidden; padding: 0; }
.wedge-media { height: 190px; overflow: hidden; position: relative; }
.wedge-media img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s ease; }
.wedge-card:hover .wedge-media img { transform: scale(1.06); }
.wedge-media::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 40%, rgba(10,14,22,0.9));
}
.wedge-body { padding: 26px 28px 30px; }
.wedge-body .mono-tag { color: var(--teal); }
.wedge-body h3 { margin-top: 10px; margin-bottom: 10px; font-size: 1.18rem; }
.wedge-body p { font-size: 0.92rem; }

/* Numbered process steps */
.step-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
@media (max-width: 900px) { .step-row { grid-template-columns: 1fr; } }
.step-card {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-top: 2px solid var(--teal);
  border-radius: var(--radius);
  padding: 30px;
}
.step-num {
  font-family: var(--font-display);
  font-size: 2rem;
  color: var(--teal);
  opacity: 0.55;
}
.step-card h3 { margin-top: 8px; margin-bottom: 12px; font-size: 1.1rem; }
.step-card p { font-size: 0.9rem; }

.step-connector {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-faint);
}

/* Roadmap */
.roadmap-track {
  position: relative;
  height: 2px;
  background: var(--border-strong);
  margin: 0 0 40px;
}
.roadmap-track .dot {
  position: absolute;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 14px; height: 14px;
  border-radius: 50%;
  border: 2px solid var(--bg-alt);
}
.dot-now { background: var(--teal); left: 16.6%; }
.dot-next { background: transparent; border-color: var(--text-dim); left: 50%; }
.dot-explore { background: transparent; border-color: var(--amber); left: 83.3%; }

.roadmap-card { padding: 30px; }
.roadmap-card .mono-tag { font-size: 0.7rem; }
.roadmap-card.now { border-top: 2px solid var(--teal); background: rgba(47,224,221,0.05); }
.roadmap-card.next { border-top: 2px solid var(--border-strong); }
.roadmap-card.explore { border-top: 2px solid var(--amber); }
.roadmap-card .card-icon { background: transparent; border: 1px solid var(--border-strong); color: var(--teal); }
.roadmap-card.explore .card-icon { color: var(--amber); }

/* Callout banner */
.callout {
  display: flex;
  align-items: center;
  gap: 18px;
  border: 1px solid var(--teal-dim);
  background: linear-gradient(90deg, rgba(47,224,221,0.08), rgba(47,224,221,0.02));
  border-radius: var(--radius);
  padding: 22px 26px;
  font-size: 0.94rem;
  color: var(--text);
}
.callout svg { width: 20px; height: 20px; color: var(--teal); flex-shrink: 0; }

/* Stat strip (about page: Morocco context) */
.stat-strip { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
@media (max-width: 900px) { .stat-strip { grid-template-columns: repeat(2, 1fr); } }
.stat-card { padding: 28px 26px; }
.stat-card b {
  display: block;
  font-family: var(--font-display);
  font-size: 2rem;
  color: #fff;
  margin-bottom: 8px;
}
.stat-card .mono-tag { display: block; margin-bottom: 14px; }
.stat-card p { font-size: 0.86rem; }

/* CTA band */
.cta-band {
  border-radius: 16px;
  border: 1px solid var(--border-strong);
  background: radial-gradient(ellipse at top left, rgba(47,224,221,0.1), transparent 60%), var(--surface);
  padding: 64px;
  text-align: center;
}
.cta-band h2 { max-width: 640px; margin: 0 auto; }
.cta-band p { max-width: 520px; margin: 18px auto 0; }
.cta-band .hero-cta { justify-content: center; margin-top: 32px; }
@media (max-width: 700px) { .cta-band { padding: 44px 26px; } }

/* ==========================================================================
   Footer
   ========================================================================== */

.site-footer {
  border-top: 1px solid var(--border);
  padding: 64px 0 32px;
  background: var(--bg-alt);
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.6fr repeat(3, 1fr);
  gap: 40px;
}
@media (max-width: 800px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
.footer-brand { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.footer-brand img { height: 28px; filter: brightness(0) invert(1); }
.footer-brand span { font-family: var(--font-display); font-weight: 600; color: #fff; }
.footer-col h5 {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin: 0 0 16px;
}
.footer-col ul li { margin-bottom: 10px; }
.footer-col ul li a { font-size: 0.88rem; color: var(--text-dim); transition: color 0.2s ease; }
.footer-col ul li a:hover { color: var(--teal); }
.footer-desc { font-size: 0.88rem; max-width: 280px; color: var(--text-dim); }
.footer-bottom {
  margin-top: 56px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8rem;
  color: var(--text-faint);
  flex-wrap: wrap;
  gap: 12px;
}

/* ==========================================================================
   Contact page
   ========================================================================== */

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  gap: 40px;
  align-items: start;
}
@media (max-width: 900px) { .contact-grid { grid-template-columns: 1fr; } }

.contact-info-card {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  padding: 22px 0;
  border-top: 1px solid var(--border);
}
.contact-info-card:first-child { border-top: none; padding-top: 0; }
.contact-info-card .ic {
  width: 40px; height: 40px;
  border-radius: 8px;
  background: var(--teal-soft);
  color: var(--teal);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.contact-info-card .ic svg { width: 19px; height: 19px; }
.contact-info-card h4 { font-family: var(--font-body); font-size: 0.98rem; color: #fff; margin-bottom: 4px; }
.contact-info-card a, .contact-info-card span { font-size: 0.94rem; color: var(--text-dim); }
.contact-info-card a:hover { color: var(--teal); }

.form-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 36px;
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-bottom: 18px; }
@media (max-width: 560px) { .form-row { grid-template-columns: 1fr; } }
.field { display: flex; flex-direction: column; gap: 8px; margin-bottom: 18px; }
.field label {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-faint);
}
.field input, .field select, .field textarea {
  background: var(--bg-alt);
  border: 1px solid var(--border-strong);
  border-radius: 7px;
  padding: 13px 14px;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 0.94rem;
  transition: border-color 0.2s ease;
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none;
  border-color: var(--teal);
}
.field textarea { resize: vertical; min-height: 120px; }
.form-note { font-size: 0.8rem; color: var(--text-faint); margin-top: 4px; }
.form-status { margin-top: 16px; font-size: 0.88rem; }
.form-status.ok { color: var(--teal); }

/* Simple page hero (inner pages) */
.page-hero { padding: 64px 0 56px; border-bottom: 1px solid var(--border); }
.page-hero h1 { margin-top: 16px; font-size: clamp(2.2rem, 4vw, 3.1rem); }
.page-hero .lede { margin-top: 16px; }
.breadcrumb {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-faint);
}
.breadcrumb b { color: var(--teal); font-weight: 500; }

/* Scroll reveal */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal.in-view { opacity: 1; transform: translateY(0); }

/* Value list (about page) */
.value-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 22px 0;
  border-top: 1px solid var(--border);
  gap: 20px;
}
.value-row:first-child { border-top: none; }
.value-row .idx { font-family: var(--font-mono); color: var(--text-faint); font-size: 0.85rem; flex-shrink: 0; }
.value-row h4 { font-family: var(--font-body); font-weight: 600; color: #fff; font-size: 1rem; flex: 0 0 220px; }
.value-row p { font-size: 0.92rem; flex: 1; }
@media (max-width: 760px) {
  .value-row { flex-direction: column; gap: 8px; }
  .value-row h4 { flex: none; }
}

.text-teal { color: var(--teal); }
.text-amber { color: var(--amber); }

.disclaimer { font-size: 0.78rem; color: var(--text-faint); margin-top: 18px; }



