/* Bebele Tech — site styles */

/* ---------- Fonts (self-hosted, SIL Open Font Licence) ---------- */
@font-face { font-family: "Barlow Semi Condensed"; src: url("../fonts/barlow-semi-condensed-500.woff2") format("woff2"); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: "Barlow Semi Condensed"; src: url("../fonts/barlow-semi-condensed-600.woff2") format("woff2"); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: "Manrope"; src: url("../fonts/manrope-400.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Manrope"; src: url("../fonts/manrope-500.woff2") format("woff2"); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: "Manrope"; src: url("../fonts/manrope-600.woff2") format("woff2"); font-weight: 600; font-style: normal; font-display: swap; }

/* ---------- Brand tokens ---------- */
:root {
  --navy-950: #08111F;
  --navy-900: #0B1628;
  --navy-850: #0E1B31;
  --navy-800: #122340;
  --field: #0A1426;
  --line: #1D2E4C;
  --line-strong: #2A4068;
  --gold: #C9A54C;
  --gold-bright: #E0BE68;
  --ivory: #ECE6D6;
  --text: #C2C8D4;
  --muted: #8C97AD;
  --font-display: "Barlow Semi Condensed", "Arial Narrow", sans-serif;
  --font-body: "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;
  --wrap: 1200px;
  --gutter: clamp(20px, 5vw, 48px);
  --header-h: 78px;
  --section-y: clamp(80px, 11vw, 140px);
  color-scheme: dark;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 12px); -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; } }
body {
  margin: 0;
  background: var(--navy-900);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}
img, svg { display: block; max-width: 100%; }
a { color: var(--gold); text-decoration: none; transition: color .2s ease; }
a:hover { color: var(--gold-bright); }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; border-radius: 2px; }
p { margin: 0 0 1.1em; }
p:last-child { margin-bottom: 0; }
::selection { background: rgba(201, 165, 76, .35); color: var(--ivory); }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }

.skip-link { position: absolute; left: -9999px; top: 0; }
.skip-link:focus { left: 16px; top: 12px; z-index: 100; background: var(--gold); color: var(--navy-900); padding: 10px 16px; font-weight: 600; }

.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* ---------- Type ---------- */
h1, h2, h3 { font-family: var(--font-display); font-weight: 600; color: var(--ivory); margin: 0; letter-spacing: .005em; }
h2 { font-size: clamp(34px, 4.2vw, 52px); line-height: 1.06; }
h3 { font-size: 26px; line-height: 1.15; letter-spacing: .01em; }

.eyebrow {
  display: flex; align-items: center; gap: 14px;
  margin: 0 0 24px;
  font-size: 12px; font-weight: 600; letter-spacing: .32em; text-transform: uppercase; line-height: 1.4;
  color: var(--gold);
}
.eyebrow::before { content: ""; flex: none; width: 36px; height: 1px; background: currentColor; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 12px;
  min-height: 52px; padding: 0 28px;
  font-family: var(--font-body); font-size: 13px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase;
  border: 1px solid var(--gold); border-radius: 2px;
  cursor: pointer;
  transition: background-color .2s ease, color .2s ease, border-color .2s ease;
}
.btn-solid { background: var(--gold); color: var(--navy-900); }
.btn-solid:hover { background: var(--gold-bright); border-color: var(--gold-bright); color: var(--navy-900); }
.btn-ghost { background: transparent; color: var(--gold); }
.btn-ghost:hover { background: rgba(201, 165, 76, .1); color: var(--gold-bright); }
.btn svg { width: 16px; height: 16px; }
.btn[disabled] { opacity: .6; cursor: progress; }

.text-link {
  display: inline-flex; align-items: center; gap: 10px; min-height: 52px;
  font-size: 13px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--ivory);
}
.text-link svg { width: 16px; height: 16px; color: var(--gold); transition: transform .2s ease; }
.text-link:hover { color: var(--ivory); }
.text-link:hover svg { transform: translateX(4px); }

/* ---------- Header ---------- */
.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  height: var(--header-h);
  display: flex; align-items: center;
  border-bottom: 1px solid transparent;
  transition: background-color .3s ease, border-color .3s ease;
}
.site-header.is-scrolled,
.site-header.menu-open {
  background: rgba(11, 22, 40, .9);
  -webkit-backdrop-filter: saturate(140%) blur(12px);
  backdrop-filter: saturate(140%) blur(12px);
  border-bottom-color: var(--line);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; }

.brand { display: inline-flex; align-items: center; gap: 12px; color: var(--ivory); }
.brand:hover { color: var(--ivory); }
.brand img { width: 42px; height: 42px; }
.brand-name { font-family: var(--font-display); font-weight: 600; font-size: 22px; letter-spacing: .05em; line-height: 1; }
.brand-name span { color: var(--gold); }

.site-nav { display: flex; align-items: center; gap: 36px; }
.site-nav a:not(.btn) {
  position: relative;
  font-size: 13px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--text);
  padding: 10px 0;
}
.site-nav a:not(.btn)::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 4px; height: 1px;
  background: var(--gold); transform: scaleX(0); transform-origin: left; transition: transform .25s ease;
}
.site-nav a:not(.btn):hover { color: var(--ivory); }
.site-nav a:not(.btn):hover::after { transform: scaleX(1); }
.site-nav .btn { min-height: 44px; padding: 0 22px; }

.menu-toggle {
  display: none;
  width: 48px; height: 48px; margin-right: -10px;
  align-items: center; justify-content: center;
  background: none; border: 0; color: var(--ivory); cursor: pointer;
}
.menu-toggle svg { width: 26px; height: 26px; }
.menu-toggle .icon-close { display: none; }
.menu-open .menu-toggle .icon-open { display: none; }
.menu-open .menu-toggle .icon-close { display: block; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: min(100vh, 920px);
  display: flex; align-items: center;
  padding: calc(var(--header-h) + 64px) 0 96px;
  overflow: hidden;
  isolation: isolate;
}
.hero-grid {
  position: absolute; inset: 0; z-index: -2;
  background-image:
    linear-gradient(rgba(201, 165, 76, .045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(201, 165, 76, .045) 1px, transparent 1px);
  background-size: 56px 56px;
  -webkit-mask-image: radial-gradient(ellipse 75% 70% at 70% 45%, #000 20%, transparent 75%);
  mask-image: radial-gradient(ellipse 75% 70% at 70% 45%, #000 20%, transparent 75%);
}
.hero-art {
  position: absolute; z-index: -1;
  top: 50%; right: max(-140px, calc((100vw - var(--wrap)) / 2 - 150px));
  width: min(700px, 58vw); height: auto;
  transform: translateY(-46%);
  opacity: .62;
  pointer-events: none; user-select: none;
}
.hero-content { max-width: 640px; }
.hero h1 { font-size: clamp(46px, 6.4vw, 82px); line-height: 1; letter-spacing: 0; }
.hero h1 em { font-style: normal; color: var(--gold); }
.hero .lede { margin: 30px 0 44px; max-width: 33em; font-size: clamp(17px, 1.6vw, 19px); line-height: 1.7; color: var(--text); }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 28px; }

/* ---------- Key facts ---------- */
.facts { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--navy-950); }
.facts-list { list-style: none; margin: 0 auto; padding: 0 var(--gutter); display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.fact { padding: 34px 28px; border-left: 1px solid var(--line); }
.fact:first-child { border-left: 0; padding-left: 0; }
.fact-value { display: block; font-family: var(--font-display); font-weight: 600; font-size: 28px; line-height: 1.1; color: var(--ivory); letter-spacing: .02em; }
.fact-label { display: block; margin-top: 8px; font-size: 14px; line-height: 1.5; color: var(--muted); }

/* ---------- Sections ---------- */
.section { padding: var(--section-y) 0; }
.section-alt { background: var(--navy-850); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }

.about-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: clamp(40px, 7vw, 96px); align-items: start; }
.about-grid h2 { max-width: 12em; }
.prose { font-size: 18px; color: var(--text); }
.prose p:first-child::first-line { color: var(--ivory); }
.about-note { margin-top: 36px; padding-top: 28px; border-top: 1px solid var(--line); display: flex; gap: 16px; align-items: flex-start; font-size: 15px; color: var(--muted); }
.about-note svg { flex: none; width: 22px; height: 22px; color: var(--gold); margin-top: 2px; }

.section-head { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: clamp(40px, 7vw, 96px); align-items: end; margin-bottom: clamp(48px, 6vw, 72px); }
.section-head > p { font-size: 18px; color: var(--text); max-width: 32em; }

/* ---------- Services ---------- */
.services-grid {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px; background: var(--line); border: 1px solid var(--line);
}
.service { background: var(--navy-850); padding: clamp(32px, 4vw, 48px); display: flex; flex-direction: column; gap: 18px; transition: background-color .3s ease; }
.service:hover { background: #10203A; }
.service-top { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 10px; }
.service-icon { width: 44px; height: 44px; color: var(--gold); }
.service-num { font-family: var(--font-display); font-weight: 500; font-size: 15px; letter-spacing: .14em; color: var(--muted); }
.service p { margin: 0; font-size: 16px; color: var(--text); }

/* ---------- Contact ---------- */
.contact-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: clamp(48px, 7vw, 96px); align-items: start; }
.contact-intro > p:not(.eyebrow) { margin-top: 24px; font-size: 18px; max-width: 28em; }
.contact-list { list-style: none; margin: 40px 0 0; padding: 0; border-top: 1px solid var(--line); }
.contact-list li { display: grid; grid-template-columns: 112px minmax(0, 1fr); gap: 16px; align-items: baseline; padding: 18px 0; border-bottom: 1px solid var(--line); }
.contact-label { font-size: 12px; font-weight: 600; letter-spacing: .2em; text-transform: uppercase; color: var(--muted); }
.contact-list a, .contact-list .contact-value { font-size: 17px; color: var(--ivory); overflow-wrap: anywhere; }
.contact-list a { display: inline-flex; align-items: center; gap: 10px; }
.contact-list a:hover { color: var(--gold-bright); }
.contact-list a svg { width: 18px; height: 18px; color: var(--gold); flex: none; }

.contact-form { background: var(--navy-850); border: 1px solid var(--line); padding: clamp(28px, 4vw, 48px); }
.form-title { font-size: 26px; margin-bottom: 8px; }
.form-intro { margin: 0 0 30px; font-size: 15px; color: var(--muted); }
.form-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 20px; }
.field { display: flex; flex-direction: column; gap: 8px; margin-bottom: 22px; }
.field label { font-size: 12px; font-weight: 600; letter-spacing: .18em; text-transform: uppercase; color: var(--muted); }
.field label .opt { letter-spacing: .06em; text-transform: none; font-weight: 500; color: #6F7A90; }
.field input, .field textarea {
  width: 100%;
  font: inherit; font-size: 16px; line-height: 1.5; color: var(--ivory);
  background: var(--field);
  border: 1px solid var(--line-strong); border-radius: 2px;
  padding: 13px 15px;
  transition: border-color .2s ease, box-shadow .2s ease;
}
.field textarea { min-height: 150px; resize: vertical; }
.field input:hover, .field textarea:hover { border-color: #3A5482; }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px rgba(201, 165, 76, .18); }
.field input:-webkit-autofill { -webkit-text-fill-color: var(--ivory); -webkit-box-shadow: 0 0 0 100px var(--field) inset; caret-color: var(--ivory); }
.hp-field { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-footer { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 18px 24px; margin-top: 6px; }
.form-privacy { margin: 0; font-size: 13px; line-height: 1.6; color: var(--muted); max-width: 26em; }
.form-status { margin: 22px 0 0; font-size: 15px; line-height: 1.6; }
.form-status:empty { display: none; }
.form-status.is-success { color: #9FD3A8; }
.form-status.is-error { color: #F0A8A0; }
.form-status.is-info { color: var(--ivory); }

/* ---------- Footer ---------- */
.site-footer { background: var(--navy-950); border-top: 1px solid var(--line); padding: 64px 0 32px; font-size: 15px; }
.footer-top { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) minmax(0, 1.2fr); gap: 40px; padding-bottom: 48px; border-bottom: 1px solid var(--line); }
.footer-brand img { width: 255px; height: auto; }
.footer-heading { margin: 0 0 16px; font-size: 12px; font-weight: 600; letter-spacing: .2em; text-transform: uppercase; color: var(--muted); }
.footer-links { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.footer-links a { color: var(--text); }
.footer-links a:hover { color: var(--gold-bright); }
.footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 24px; padding-top: 28px; font-size: 13px; color: var(--muted); }
.footer-bottom p { margin: 0; }

/* ---------- Simple page (privacy) ---------- */
.page { padding: calc(var(--header-h) + 72px) 0 var(--section-y); }
.page-inner { max-width: 760px; }
.page h1 { font-size: clamp(40px, 5vw, 60px); line-height: 1.04; margin-bottom: 14px; }
.page .updated { color: var(--muted); font-size: 14px; margin-bottom: 48px; }
.page h2 { font-size: 26px; line-height: 1.2; margin: 44px 0 14px; }
.page ul { padding-left: 1.2em; margin: 0 0 1.1em; }
.page li { margin-bottom: .4em; }

/* ---------- Reveal on scroll (only when JS is running) ---------- */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .8s ease, transform .8s ease; }
.js .reveal.is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .js .reveal { opacity: 1; transform: none; } }

/* ---------- Responsive ---------- */
@media (max-width: 1000px) {
  .about-grid, .section-head, .contact-grid { grid-template-columns: minmax(0, 1fr); }
  .section-head { align-items: start; gap: 24px; }
  .facts-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .fact { padding: 28px 24px; }
  .fact:nth-child(odd) { border-left: 0; padding-left: 0; }
  .fact:nth-child(n+3) { border-top: 1px solid var(--line); }
  .footer-top { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .footer-brand { grid-column: 1 / -1; }
}

@media (max-width: 860px) {
  :root { --header-h: 68px; }
  .menu-toggle { display: inline-flex; }
  .site-nav {
    position: fixed; top: var(--header-h); left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    padding: 8px var(--gutter) 28px;
    background: var(--navy-900);
    border-bottom: 1px solid var(--line);
    box-shadow: 0 24px 40px rgba(4, 9, 18, .55);
    transform: translateY(-8px); opacity: 0; visibility: hidden;
    transition: opacity .2s ease, transform .2s ease, visibility 0s linear .2s;
  }
  .menu-open .site-nav { transform: none; opacity: 1; visibility: visible; transition: opacity .2s ease, transform .2s ease; }
  .site-nav a:not(.btn) { padding: 16px 0; font-size: 14px; border-bottom: 1px solid var(--line); }
  .site-nav a:not(.btn)::after { display: none; }
  .site-nav .btn { margin-top: 24px; min-height: 52px; }
  .brand img { width: 38px; height: 38px; }
  .brand-name { font-size: 20px; }

  .hero { min-height: auto; padding: calc(var(--header-h) + 56px) 0 80px; }
  .hero-art { width: 150vw; max-width: 760px; right: -62%; top: 58%; opacity: .2; }
  .hero-grid { -webkit-mask-image: radial-gradient(ellipse 90% 70% at 70% 50%, #000 15%, transparent 75%); mask-image: radial-gradient(ellipse 90% 70% at 70% 50%, #000 15%, transparent 75%); }
}

@media (max-width: 600px) {
  body { font-size: 16px; }
  .facts-list { grid-template-columns: minmax(0, 1fr); }
  .fact, .fact:nth-child(odd) { border-left: 0; padding: 22px 0; }
  .fact + .fact { border-top: 1px solid var(--line); }
  .services-grid { grid-template-columns: minmax(0, 1fr); }
  .form-row { grid-template-columns: minmax(0, 1fr); }
  .contact-list li { grid-template-columns: minmax(0, 1fr); gap: 4px; }
  .footer-top { grid-template-columns: minmax(0, 1fr); }
  .hero-actions .btn { width: 100%; }
  .form-footer .btn { width: 100%; }
}
