/* =========================================================
   Bastion — static site stylesheet
   Palette and type lifted from the original Beaver Builder theme:
   bg #0D021C / panel #190F27, text #ACA1BF, headings #fff,
   accent gradient #20C4F4 → #33B8AB, Poppins.
   ========================================================= */

@font-face { font-family: "Poppins"; font-weight: 400; font-style: normal; font-display: swap; src: url("/assets/fonts/poppins-400.woff") format("woff"); }
@font-face { font-family: "Poppins"; font-weight: 500; font-style: normal; font-display: swap; src: url("/assets/fonts/poppins-500.woff") format("woff"); }
@font-face { font-family: "Poppins"; font-weight: 700; font-style: normal; font-display: swap; src: url("/assets/fonts/poppins-700.woff") format("woff"); }

:root {
  --bg: #0D021C;
  --bg-2: #190F27;
  --bg-3: #140123;
  --panel: rgba(25, 15, 39, 0.72);
  --line: rgba(172, 161, 191, 0.14);
  --line-strong: rgba(172, 161, 191, 0.28);
  --text: #ACA1BF;
  --text-strong: #ffffff;
  --muted: #74859B;
  --cyan: #20C4F4;
  --teal: #33B8AB;
  --teal-dark: #268981;
  --accent-grad: linear-gradient(to right, #20C4F4, #33B8AB, #20C4F4);
  --orange: #DD6420;
  --radius: 16px;
  --radius-sm: 6px;
  --container: 1180px;
  --font: "Poppins", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --ease: cubic-bezier(.2,.7,.2,1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.9;
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
[hidden] { display: none !important; }
a { color: var(--teal); text-decoration: none; transition: color .2s var(--ease); }
a:hover, a:focus-visible { color: var(--cyan); }
h1, h2, h3, h4 { color: var(--text-strong); font-weight: 500; line-height: 1.3; margin: 0 0 .5em; }
h1 { font-size: clamp(34px, 5.2vw, 56px); line-height: 1.18; letter-spacing: -0.01em; }
h2 { font-size: clamp(28px, 3.6vw, 42px); }
h3 { font-size: 20px; }
h4 { font-size: 16px; }
p { margin: 0 0 1em; }
:focus-visible { outline: 2px solid var(--cyan); outline-offset: 3px; border-radius: 3px; }

.container { width: min(100% - 40px, var(--container)); margin-inline: auto; }
.skip { position: absolute; left: -9999px; top: 8px; background: var(--cyan); color: #000; padding: 8px 14px; border-radius: 4px; z-index: 1000; }
.skip:focus { left: 8px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 13px 28px; border-radius: 5px; border: 1px solid transparent;
  font: 500 15px/1.2 var(--font); color: #fff; cursor: pointer;
  transition: background-position .35s var(--ease), transform .15s var(--ease), border-color .2s, color .2s, box-shadow .3s;
}
.btn-primary {
  background: var(--accent-grad); background-size: 200% auto; background-position: left center;
  box-shadow: 0 8px 28px -10px rgba(32, 196, 244, .55);
}
.btn-primary:hover, .btn-primary:focus-visible { background-position: right center; color: #fff; box-shadow: 0 10px 32px -8px rgba(32, 196, 244, .7); }
.btn:active { transform: translateY(1px); }
.btn-ghost { border-color: var(--line-strong); color: var(--text-strong); background: rgba(255,255,255,.02); }
.btn-ghost:hover, .btn-ghost:focus-visible { border-color: var(--cyan); color: var(--cyan); }
.btn-ghost .arrow { transition: transform .2s var(--ease); }
.btn-ghost:hover .arrow { transform: translateX(3px); }
.btn-sm { padding: 9px 18px; font-size: 14px; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: linear-gradient(180deg, rgba(13,2,28,.92), rgba(13,2,28,.6));
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s, background .3s;
}
.site-header.scrolled { border-bottom-color: var(--line); background: rgba(13,2,28,.88); }
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 84px; }
.brand { display: inline-flex; align-items: center; gap: 12px; color: var(--text-strong); }
.brand img { width: 44px; height: auto; }
.brand-name { font-weight: 700; letter-spacing: .22em; font-size: 15px; }
.nav-list { list-style: none; margin: 0; padding: 0; display: flex; align-items: center; gap: 34px; }
.nav-list a:not(.btn) { color: var(--text); font-size: 14px; font-weight: 500; position: relative; }
.nav-list a:not(.btn)::after { content: ""; position: absolute; left: 0; right: 100%; bottom: -6px; height: 2px; background: var(--accent-grad); transition: right .25s var(--ease); }
.nav-list a:not(.btn):hover::after, .nav-list a:not(.btn):focus-visible::after { right: 0; }
.nav-list a:not(.btn):hover { color: #fff; }
.nav-toggle { display: none; background: none; border: 0; width: 44px; height: 44px; padding: 10px; cursor: pointer; }
.nav-toggle span { display: block; height: 2px; background: #fff; margin: 5px 0; transition: transform .25s, opacity .25s; border-radius: 2px; }

/* ---------- Hero ---------- */
.hero { position: relative; padding: 70px 0 0; text-align: center; overflow: hidden; }
.hero-inner { position: relative; z-index: 2; }
.hero-glow { position: absolute; pointer-events: none; filter: blur(40px); opacity: .75; z-index: 0; }
.hero-glow-a { top: -120px; left: 50%; transform: translateX(-50%); width: 760px; height: 420px; background: url("/assets/img/glow-1.png") center / contain no-repeat; }
.hero-glow-b { bottom: 10%; left: -120px; width: 420px; height: 420px; background: url("/assets/img/glow-2.png") center / contain no-repeat; opacity: .55; }
.hero::before { content: ""; position: absolute; inset: 0; background: url("/assets/img/stars.svg") repeat; opacity: .5; pointer-events: none; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 7px 16px; border-radius: 999px; border: 1px solid var(--line-strong);
  background: rgba(25,15,39,.6); font-size: 12.5px; letter-spacing: .04em; color: var(--text);
}
.eyebrow .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--teal); box-shadow: 0 0 0 4px rgba(51,184,171,.18); animation: pulse 2.4s infinite; }
.hero h1 { margin: 26px auto 18px; max-width: 900px; }
.lead { max-width: 760px; margin: 0 auto 32px; font-size: 16px; }
.hero-actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

.hero-art { position: relative; width: min(560px, 90%); margin: 46px auto 0; }
.hero-city, .hero-spires { width: 100%; }
.hero-spires { position: absolute; inset: 0; animation: float 6s ease-in-out infinite; }
.hero-fade { position: absolute; left: 50%; transform: translateX(-50%); bottom: -2px; width: 200%; height: 240px; background: linear-gradient(0deg, var(--bg) 18%, rgba(13,2,28,0) 100%); }

/* ---------- Stats strip ---------- */
.strip { position: relative; z-index: 3; margin-top: -40px; padding: 0 0 20px; }
.strip-grid {
  display: grid; grid-template-columns: repeat(4, 1fr);
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  backdrop-filter: blur(9px); -webkit-backdrop-filter: blur(9px);
  overflow: hidden;
}
.stat { padding: 26px 26px; display: flex; flex-direction: column; gap: 2px; border-right: 1px solid var(--line); }
.stat:last-child { border-right: 0; }
.stat-value { color: #fff; font-size: 24px; font-weight: 500; background: var(--accent-grad); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.stat-label { font-size: 13px; line-height: 1.5; }

/* ---------- Sections ---------- */
.section { padding: 96px 0; position: relative; }
.section-title { text-align: center; margin-bottom: 10px; }
.section-sub { text-align: center; max-width: 620px; margin: 0 auto 56px; }

/* About */
.about-grid { display: grid; grid-template-columns: 1fr 1.15fr; gap: 64px; align-items: center; }
.about-art { position: relative; display: grid; place-items: center; }
.about-art::before { content: ""; position: absolute; width: 70%; aspect-ratio: 1; border-radius: 50%; background: radial-gradient(circle, rgba(32,196,244,.22), rgba(13,2,28,0) 70%); filter: blur(10px); }
.about-art img { position: relative; width: min(380px, 80%); filter: drop-shadow(0 30px 40px rgba(0,0,0,.5)); }
.checklist { list-style: none; padding: 0; margin: 10px 0 0; display: grid; gap: 10px; }
.checklist li { position: relative; padding-left: 32px; color: #d8d1e6; }
.checklist li::before {
  content: ""; position: absolute; left: 0; top: 7px; width: 18px; height: 18px; border-radius: 50%;
  background: var(--accent-grad); -webkit-mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'><circle cx='10' cy='10' r='9' fill='none' stroke='black' stroke-width='1.6'/><path d='M6 10.5l2.6 2.6L14 7.5' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/></svg>") center / contain no-repeat;
  mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'><circle cx='10' cy='10' r='9' fill='none' stroke='black' stroke-width='1.6'/><path d='M6 10.5l2.6 2.6L14 7.5' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/></svg>") center / contain no-repeat;
}

/* Services */
.services { background: linear-gradient(180deg, var(--bg) 0%, var(--bg-2) 50%, var(--bg) 100%); }
.cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; }
.card {
  position: relative; padding: 36px 26px 30px; border-radius: var(--radius);
  background: var(--panel); border: 1px solid var(--line);
  backdrop-filter: blur(9px); -webkit-backdrop-filter: blur(9px);
  transition: transform .3s var(--ease), border-color .3s, box-shadow .3s;
}
.card::before { content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1px; background: linear-gradient(135deg, rgba(32,196,244,.55), rgba(51,184,171,.05) 45%, rgba(32,196,244,.0)); -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; opacity: 0; transition: opacity .3s; pointer-events: none; }
.card:hover { transform: translateY(-6px); border-color: rgba(32,196,244,.35); box-shadow: 0 24px 50px -30px rgba(32,196,244,.5); }
.card:hover::before { opacity: 1; }
.card-icon { width: 90px; height: 90px; margin-bottom: 22px; }
.card-icon img { width: 90px; height: 90px; }
.card h3 { font-size: 19px; }
.card p { font-size: 14px; margin: 0; }

/* Principles */
.principles { padding-top: 40px; }
.principles-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.principle { padding: 44px 34px; border-right: 1px solid var(--line); }
.principle:last-child { border-right: 0; }
.principle-num { display: block; font-size: 12px; letter-spacing: .3em; color: var(--teal); margin-bottom: 14px; }
.principle p { font-size: 14px; margin: 0; }

/* Contact */
.contact { padding-top: 110px; overflow: hidden; }
.contact-glow { position: absolute; left: 50%; top: -120px; transform: translateX(-50%); width: 700px; height: 300px; background: url("/assets/img/glow-1.png") center / contain no-repeat; filter: blur(50px); opacity: .4; pointer-events: none; }
.contact-card {
  position: relative; max-width: 760px; margin: 70px auto 0; padding: 70px 44px 44px;
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  backdrop-filter: blur(9px); -webkit-backdrop-filter: blur(9px);
}
.contact-badge {
  position: absolute; top: -45px; left: 50%; transform: translateX(-50%);
  width: 90px; height: 90px; border-radius: 50%; display: grid; place-items: center;
  background: var(--bg-2); border: 1px solid var(--line-strong); box-shadow: 0 10px 40px -10px rgba(32,196,244,.5);
}
.contact-badge img { width: 90px; height: 90px; }
/* Email reveal gate */
.gate { display: grid; gap: 18px; text-align: center; }
.gate-intro { margin: 0 auto; max-width: 520px; font-size: 14px; }
.gate-challenge { display: grid; gap: 16px; justify-items: center; }
.gate-canvas-wrap { position: relative; display: inline-block; padding: 10px 14px; border-radius: 12px; background: rgba(13,2,28,.75); border: 1px solid var(--line-strong); }
#gate-canvas { display: block; width: 280px; height: 80px; max-width: 100%; }
.gate-refresh {
  position: absolute; right: -14px; top: -14px; width: 32px; height: 32px; border-radius: 50%;
  border: 1px solid var(--line-strong); background: var(--bg-2); color: var(--text); cursor: pointer;
  font: 500 16px/1 var(--font); display: grid; place-items: center; transition: color .2s, border-color .2s, transform .3s var(--ease);
}
.gate-refresh:hover { color: var(--cyan); border-color: var(--cyan); transform: rotate(180deg); }
.gate-form { display: flex; gap: 12px; align-items: end; flex-wrap: wrap; justify-content: center; }
.gate-form .field { text-align: left; width: 170px; }
.gate-form .btn { height: 46px; }
.field { display: grid; gap: 6px; }
.field span { font-size: 13px; color: #d8d1e6; }
.field input {
  width: 100%; padding: 12px 16px; border-radius: var(--radius-sm);
  background: rgba(13,2,28,.7); border: 1px solid var(--line-strong); color: #fff;
  font: 500 16px/1.4 var(--font); letter-spacing: .06em; transition: border-color .2s, box-shadow .2s;
}
.field input::placeholder { color: var(--muted); font-weight: 400; letter-spacing: 0; }
.field input:focus { outline: none; border-color: var(--cyan); box-shadow: 0 0 0 3px rgba(32,196,244,.18); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-status { margin: 0; font-size: 13px; min-height: 1.2em; }
.form-status.ok { color: var(--teal); }
.form-status.err { color: var(--orange); }
.gate-result { display: grid; gap: 14px; justify-items: center; animation: fadeIn .5s var(--ease); }
.gate-label { font-size: 13px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.gate-address {
  font-size: clamp(20px, 3.4vw, 30px); font-weight: 500; color: #fff; word-break: break-all;
  background: var(--accent-grad); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.gate-actions { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; }
.gate-fine { margin: 4px 0 0; font-size: 13px; color: var(--muted); max-width: 460px; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--line); padding: 64px 0 28px; background: linear-gradient(180deg, var(--bg) 0%, var(--bg-3) 100%); }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 40px; }
.footer-brand img { width: 64px; }
.footer-tag { margin-top: 14px; letter-spacing: .08em; font-size: 13px; }
.footer-col h4 { margin-bottom: 14px; }
.footer-col ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.footer-col a { color: var(--text); font-size: 14px; }
.footer-col a:hover { color: var(--cyan); }
.footer-bottom { display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; margin-top: 48px; padding-top: 22px; border-top: 1px solid var(--line); font-size: 13px; }
.footer-bottom p { margin: 0; }
.footer-fine { color: var(--muted); }

/* ---------- 404 ---------- */
.error-page { min-height: calc(100vh - 84px); display: grid; place-items: center; text-align: center; padding: 60px 0; }
.error-code { font-size: clamp(90px, 18vw, 180px); font-weight: 700; line-height: 1; background: var(--accent-grad); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }

/* ---------- Motion ---------- */
.reveal { opacity: 0; transform: translate3d(0, 28px, 0); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
.no-js .reveal { opacity: 1; transform: none; }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-14px); } }
@keyframes pulse { 0%, 100% { box-shadow: 0 0 0 4px rgba(51,184,171,.18); } 50% { box-shadow: 0 0 0 8px rgba(51,184,171,.05); } }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .hero-spires, .eyebrow .dot { animation: none; }
  .card:hover { transform: none; }
}

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .cards { grid-template-columns: repeat(2, 1fr); }
  .strip-grid { grid-template-columns: repeat(2, 1fr); }
  .stat:nth-child(2) { border-right: 0; }
  .stat:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
}
@media (max-width: 860px) {
  .about-grid { grid-template-columns: 1fr; gap: 30px; text-align: center; }
  .about-art img { width: min(300px, 70%); }
  .checklist { text-align: left; max-width: 520px; margin-inline: auto; }
  .principles-grid { grid-template-columns: 1fr; }
  .principle { border-right: 0; border-bottom: 1px solid var(--line); padding: 30px 10px; }
  .principle:last-child { border-bottom: 0; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
}
@media (max-width: 760px) {
  .header-inner { height: 72px; }
  .nav-toggle { display: block; }
  .nav-list {
    position: fixed; inset: 72px 0 auto 0; flex-direction: column; align-items: stretch; gap: 0;
    background: rgba(13,2,28,.97); border-bottom: 1px solid var(--line); padding: 10px 20px 20px;
    transform: translateY(-8px); opacity: 0; visibility: hidden; transition: opacity .25s, transform .25s, visibility .25s;
  }
  .nav-list.open { transform: none; opacity: 1; visibility: visible; }
  .nav-list li a:not(.btn) { display: block; padding: 14px 4px; font-size: 16px; border-bottom: 1px solid var(--line); }
  .nav-list a:not(.btn)::after { display: none; }
  .nav-cta { padding-top: 16px; }
  .nav-cta .btn { width: 100%; justify-content: center; }
  .nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
  .nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
  .hero { padding-top: 48px; }
  .section { padding: 70px 0; }
  .cards { grid-template-columns: 1fr; }
  .contact-card { padding: 64px 22px 28px; }
  .footer-bottom { justify-content: center; text-align: center; }
}
@media (max-width: 480px) {
  .strip-grid { grid-template-columns: 1fr; }
  .stat { border-right: 0; border-bottom: 1px solid var(--line); }
  .stat:last-child { border-bottom: 0; }
  .hero-actions .btn { width: 100%; justify-content: center; }
  .hero h1 br { display: none; }
}
