/* ── CSS Variables ── */
:root {
  --background: hsl(210,30%,98%);
  --foreground: hsl(220,25%,12%);
  --card: hsl(0,0%,100%);
  --card-foreground: hsl(220,25%,12%);
  --primary: hsl(195,100%,38%);
  --primary-fg: hsl(0,0%,100%);
  --muted-fg: hsl(220,10%,40%);
  --border: hsl(220,15%,88%);
  --surface: hsl(210,25%,96%);
  --glow: hsl(195,100%,45%);
}
html.dark {
  --background: hsl(220,25%,6%);
  --foreground: hsl(210,20%,90%);
  --card: hsl(220,20%,10%);
  --card-foreground: hsl(210,20%,90%);
  --primary: hsl(190,100%,50%);
  --primary-fg: hsl(220,25%,6%);
  --muted-fg: hsl(215,15%,55%);
  --border: hsl(220,15%,18%);
  --surface: hsl(220,18%,12%);
  --glow: hsl(190,100%,50%);
}

/* ── Reset & Base ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--background);
  color: var(--foreground);
  font-family: 'Inter', sans-serif;
  -webkit-font-smoothing: antialiased;
  line-height: 1.6;
  transition: background 0.3s, color 0.3s;
}
a { text-decoration: none; color: inherit; }
button { cursor: pointer; background: none; border: none; font-family: inherit; }
img { max-width: 100%; display: block; }
.font-display { font-family: 'JetBrains Mono', monospace; }

/* ── Container ── */
.container { max-width: 1200px; margin: 0 auto; padding: 0 1.5rem; }

/* ── Utilities ── */
.text-primary { color: var(--primary); }
.text-muted { color: var(--muted-fg); }
.border-color { border-color: var(--border); }

.glow-text {
  text-shadow: 0 0 20px color-mix(in srgb, var(--glow) 40%, transparent),
               0 0 40px color-mix(in srgb, var(--glow) 20%, transparent);
}

/* ── Animations ── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(30px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes bounceY {
  0%,100% { transform: translateY(0); }
  50%     { transform: translateY(-6px); }
}
@keyframes slideDown {
  from { opacity: 0; transform: translateY(-80px); }
  to   { opacity: 1; transform: translateY(0); }
}
.anim-nav    { animation: slideDown 0.6s ease forwards; }
.anim-fade   { opacity: 0; animation: fadeUp 0.8s ease forwards; }
.anim-bounce { animation: bounceY 1.5s ease-in-out infinite; }

/* ── Navbar ── */
#navbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  transition: background 0.3s, border-color 0.3s;
}
#navbar.scrolled {
  background: color-mix(in srgb, var(--background) 90%, transparent);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  display: flex; align-items: center; justify-content: space-between;
  padding: 1rem 1.5rem;
}
.nav-logo {
  font-family: 'JetBrains Mono', monospace;
  font-size: 1.1rem; font-weight: 700; letter-spacing: -0.02em;
}
.nav-links { display: flex; align-items: center; gap: 2rem; }
.nav-links a {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.8rem; color: var(--muted-fg);
  transition: color 0.2s;
}
.nav-links a:hover { color: var(--primary); }
.btn-primary {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.8rem; background: var(--primary); color: var(--primary-fg);
  padding: 0.5rem 1rem; border-radius: 2px;
  transition: opacity 0.2s;
}
.btn-primary:hover { opacity: 0.88; }
.nav-links .btn-primary { color: var(--primary-fg); }
.nav-links .btn-primary:hover { color: var(--primary-fg); opacity: 0.88; }
.lang-btn {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.7rem; font-weight: 600; letter-spacing: 0.05em;
  width: 36px; height: 36px;
  border: 1px solid var(--border); border-radius: 2px; color: var(--muted-fg);
  transition: border-color 0.2s, color 0.2s;
}
.lang-btn:hover { border-color: var(--primary); color: var(--primary); }
.theme-btn {
  width: 36px; height: 36px; display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--border); border-radius: 2px; color: var(--muted-fg);
  transition: border-color 0.2s, color 0.2s;
}
.theme-btn:hover { border-color: var(--primary); color: var(--primary); }
.mobile-toggle { display: none; color: var(--foreground); }
.mobile-menu {
  display: none; flex-direction: column; gap: 1rem;
  padding: 1.5rem; border-top: 1px solid var(--border);
  background: color-mix(in srgb, var(--background) 95%, transparent);
  backdrop-filter: blur(12px);
}
.mobile-menu a {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.85rem; color: var(--muted-fg);
}
.mobile-menu a:hover { color: var(--primary); }
.mobile-menu .btn-primary { text-align: center; }

@media (max-width: 768px) {
  .nav-links { display: none; }
  .mobile-toggle { display: flex; align-items: center; gap: 0.5rem; }
  .mobile-menu.open { display: flex; }
}

/* ── Hero ── */
#hero {
  position: relative; min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
  background-image:
    linear-gradient(color-mix(in srgb, var(--border) 30%, transparent) 1px, transparent 1px),
    linear-gradient(90deg, color-mix(in srgb, var(--border) 30%, transparent) 1px, transparent 1px);
  background-size: 60px 60px;
}
.hero-gradient {
  position: absolute; inset: 0;
  background: linear-gradient(to bottom, var(--background), color-mix(in srgb, var(--background) 80%, transparent), var(--background));
}
.hero-orb {
  position: absolute; top: 33%; left: 50%; transform: translate(-50%, -50%);
  width: 600px; height: 600px; border-radius: 50%;
  background: color-mix(in srgb, var(--primary) 5%, transparent);
  filter: blur(120px); pointer-events: none;
}
.hero-content {
  position: relative; z-index: 10;
  text-align: center; padding: 0 1.5rem; max-width: 900px;
}
.hero-eyebrow {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem; letter-spacing: 0.3em; text-transform: uppercase;
  color: var(--primary); margin-bottom: 1.5rem;
  animation: fadeUp 0.8s 0.3s ease both;
}
.hero-h1 {
  font-family: 'JetBrains Mono', monospace;
  font-size: clamp(2rem, 6vw, 4.5rem); font-weight: 700; line-height: 1.1;
  margin-bottom: 1.5rem;
  animation: fadeUp 0.8s 0.5s ease both;
}
@media(max-width:600px) {
  .hero-h1 { font-size: clamp(2.8rem, 10vw, 3.5rem); line-height: 1.25; }
}
.hero-sub {
  font-size: 1.1rem; color: var(--muted-fg); max-width: 600px; margin: 0 auto 2.5rem;
  animation: fadeUp 0.8s 0.7s ease both;
}
.hero-btns {
  display: flex; flex-wrap: wrap; gap: 1rem; justify-content: center;
  animation: fadeIn 0.8s 0.9s ease both;
}
.hero-btns .btn-primary-lg,
.hero-btns .btn-outline {
  flex: 1; min-width: 180px; max-width: 260px; text-align: center;
}
.btn-outline {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.85rem; border: 1px solid var(--border); color: var(--foreground);
  padding: 0.75rem 2rem; border-radius: 2px; transition: border-color 0.2s, color 0.2s;
}
.btn-outline:hover { border-color: color-mix(in srgb, var(--primary) 50%, transparent); color: var(--primary); }
.btn-primary-lg {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.85rem; background: var(--primary); color: var(--primary-fg);
  padding: 0.75rem 2rem; border-radius: 2px; transition: opacity 0.2s;
}
.btn-primary-lg:hover { opacity: 0.88; }
.hero-arrow {
  position: absolute; bottom: 2.5rem; left: 50%; transform: translateX(-50%);
  color: color-mix(in srgb, var(--primary) 50%, transparent);
  animation: fadeIn 1s 1.5s ease both, bounceY 1.5s 2.5s ease-in-out infinite;
}

/* ── Section shared ── */
section { padding: 6rem 0; }
.section-eyebrow {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.7rem; letter-spacing: 0.3em; text-transform: uppercase;
  color: var(--primary); margin-bottom: 0.75rem;
}
.section-h2 {
  font-family: 'JetBrains Mono', monospace;
  font-size: clamp(1.8rem, 4vw, 2.8rem); font-weight: 700; margin-bottom: 1.5rem;
}

/* InView fade helper */
.reveal { opacity: 0; transform: translateY(30px); transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal.visible { opacity: 1; transform: translateY(0); }
.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }

/* ── Clients ── */
#clients {
  padding: 6rem 0;
  background: hsl(0,0%,93%);
  border-top: 1px solid hsl(0,0%,86%);
  border-bottom: 1px solid hsl(0,0%,86%);
}
html.dark #clients {
  background: hsl(220,15%,18%);
  border-top: 1px solid hsl(220,15%,22%);
  border-bottom: 1px solid hsl(220,15%,22%);
}
.clients-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.65rem; letter-spacing: 0.25em; text-transform: uppercase;
  color: color-mix(in srgb, var(--muted-fg) 60%, transparent);
  text-align: center; margin-bottom: 2rem;
}
.clients-track {
  display: flex; align-items: center; justify-content: center;
  flex-wrap: wrap; gap: 2.5rem 3.5rem;
}
.client-logo {
  height: 48px; width: auto; max-width: 160px;
  object-fit: contain;
  filter: grayscale(1) opacity(0.4);
  transition: filter 0.3s;
}
.client-logo:hover { filter: none; }
html.dark .client-logo {
  filter: brightness(0) invert(1) opacity(0.75);
  transition: none;
}
html.dark .client-logo:hover { filter: brightness(0) invert(1) opacity(0.75); }
html.dark .client-logo[alt="Full Doors"] { filter: opacity(0.85); }
html.dark .client-logo[alt="Full Doors"]:hover { filter: opacity(0.85); }

/* ── Why Us ── */
#why-us {
  background: var(--surface);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.why-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 1.5rem; margin-top: 2rem; }
@media(max-width:768px){ .why-grid { grid-template-columns: 1fr; } }
.why-card {
  position: relative; background: var(--card); border: 1px solid var(--border);
  padding: 2rem; border-radius: 2px; transition: border-color 0.3s, box-shadow 0.3s;
}
.why-card::before {
  content: ''; position: absolute; top: 0; left: 0;
  width: 3rem; height: 2px; background: var(--primary);
}
.why-card:hover {
  border-color: color-mix(in srgb, var(--primary) 22%, transparent);
  box-shadow: 0 6px 24px color-mix(in srgb, var(--glow) 10%, transparent);
}
.why-icon {
  width: 48px; height: 48px; border-radius: 2px;
  background: color-mix(in srgb, var(--primary) 10%, transparent);
  border: 1px solid color-mix(in srgb, var(--primary) 30%, transparent);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 1.5rem; transition: background 0.2s;
}
.why-card:hover .why-icon { background: color-mix(in srgb, var(--primary) 18%, transparent); }
.why-card h3 { font-family: 'JetBrains Mono', monospace; font-size: 1.1rem; font-weight: 700; margin-bottom: 0.75rem; }
.why-card p { color: var(--muted-fg); font-size: 0.875rem; line-height: 1.7; }
.why-num { margin-top: 1.5rem; font-family: 'JetBrains Mono', monospace; font-size: 0.7rem; color: color-mix(in srgb, var(--muted-fg) 50%, transparent); }

/* ── Services ── */
.services-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 1.5rem; margin-top: 2rem; }
@media(max-width:900px){ .services-grid { grid-template-columns: repeat(2,1fr); } }
@media(max-width:600px){ .services-grid { grid-template-columns: 1fr; } }
.service-card {
  position: relative; background: var(--card); border: 1px solid var(--border);
  padding: 2rem; border-radius: 2px; transition: border-color 0.3s, box-shadow 0.3s;
  overflow: hidden;
}
.service-card:hover {
  border-color: color-mix(in srgb, var(--primary) 22%, transparent);
  box-shadow: 0 6px 24px color-mix(in srgb, var(--glow) 10%, transparent);
}
.service-corner {
  position: absolute; top: 0; right: 0; width: 2rem; height: 2rem;
  border-top: 1px solid color-mix(in srgb, var(--primary) 20%, transparent);
  border-right: 1px solid color-mix(in srgb, var(--primary) 20%, transparent);
  border-radius: 0 2px 0 0; opacity: 0; transition: opacity 0.3s;
}
.service-card:hover .service-corner { opacity: 1; }
.service-icon { color: var(--primary); margin-bottom: 1.25rem; }
.service-card h3 { font-family: 'JetBrains Mono', monospace; font-size: 1rem; font-weight: 600; margin-bottom: 0.75rem; }
.service-card p { color: var(--muted-fg); font-size: 0.85rem; line-height: 1.7; }

/* ── References ── */
#references { background: var(--card); }
.ref-tabs { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 3rem; }
.ref-tab {
  font-family: 'JetBrains Mono', monospace; font-size: 0.7rem;
  padding: 0.5rem 1rem; border: 1px solid var(--border); border-radius: 2px;
  color: var(--muted-fg); background: transparent; transition: all 0.2s;
}
.ref-tab:hover { border-color: color-mix(in srgb, var(--primary) 40%, transparent); }
.ref-tab.active { background: var(--primary); color: var(--primary-fg); border-color: var(--primary); }
.ref-content { display: grid; grid-template-columns: 1fr 1fr; gap: 2.5rem; align-items: center; }
@media(max-width:768px){ .ref-content { grid-template-columns: 1fr; } }
.ref-client { font-family: 'JetBrains Mono', monospace; font-size: 0.85rem; color: var(--primary); margin-bottom: 0.75rem; }
.ref-title { font-family: 'JetBrains Mono', monospace; font-size: 1.4rem; font-weight: 700; margin-bottom: 1rem; }
.ref-summary { color: var(--muted-fg); line-height: 1.7; margin-bottom: 1rem; }
.ref-desc { color: color-mix(in srgb, var(--muted-fg) 80%, transparent); font-size: 0.875rem; line-height: 1.7; }
.ref-img-wrap {
  position: relative; border-radius: 2px; overflow: hidden;
}
.ref-img-wrap img { width: 100%; height: auto; max-height: 420px; object-fit: contain; display: block; transition: opacity 0.4s; }
.ref-panel { display: none; }
.ref-panel.active { display: grid; }
.ref-panel.active { animation: fadeUp 0.4s ease; }

/* ── FAQ ── */
.faq-list { display: flex; flex-direction: column; gap: 0.75rem; margin-top: 2rem; }
.faq-item { background: var(--card); border: 1px solid var(--border); border-radius: 2px; overflow: hidden; }
.faq-trigger {
  width: 100%; display: flex; justify-content: space-between; align-items: center;
  padding: 1.25rem 1.5rem; text-align: left; gap: 1rem;
  font-family: 'JetBrains Mono', monospace; font-size: 0.85rem; font-weight: 500;
  color: var(--foreground); transition: color 0.2s;
}
.faq-trigger:hover { color: var(--primary); }
.faq-icon { flex-shrink: 0; transition: transform 0.3s; color: var(--muted-fg); }
.faq-item.open .faq-icon { transform: rotate(180deg); color: var(--primary); }
.faq-body { display: none; padding: 0 1.5rem 1.25rem; }
.faq-body p { color: var(--muted-fg); font-size: 0.875rem; line-height: 1.7; }
.faq-item.open .faq-body { display: block; animation: fadeUp 0.3s ease; }

/* ── Contact ── */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; max-width: 900px; }
@media(max-width:768px){ .contact-grid { grid-template-columns: 1fr; } }
.contact-info p { color: var(--muted-fg); line-height: 1.7; margin-bottom: 2rem; }
.contact-detail { display: flex; align-items: flex-start; gap: 1rem; margin-bottom: 1.25rem; }
.contact-detail svg { color: var(--primary); flex-shrink: 0; margin-top: 2px; }
.contact-detail p { margin-bottom: 0; color: var(--foreground); }
.contact-detail-label{ font-family: 'JetBrains Mono', monospace; font-size: 0.8rem; font-weight: 600; margin-bottom: 0.2rem; color: var(--foreground); }
.contact-detail .contact-detail-val { color: var(--muted-fg); font-size: 0.875rem; }
.contact-detail-val a { color: var(--primary); transition: text-decoration 0.2s; }
.contact-detail-val a:hover { text-decoration: underline; }
.form-group { margin-bottom: 1.25rem; }
.form-label { font-family: 'JetBrains Mono', monospace; font-size: 0.7rem; color: var(--muted-fg); display: block; margin-bottom: 0.5rem; }
.form-input, .form-textarea {
  width: 100%; background: var(--card); border: 1px solid var(--border); border-radius: 2px;
  padding: 0.75rem 1rem; font-size: 0.875rem; color: var(--foreground);
  font-family: 'Inter', sans-serif; transition: border-color 0.2s; outline: none;
}
.form-input:focus, .form-textarea:focus { border-color: var(--primary); }
.form-textarea { resize: none; rows: 4; }
.form-submit {
  width: 100%; font-family: 'JetBrains Mono', monospace; font-size: 0.85rem;
  background: var(--primary); color: var(--primary-fg);
  padding: 0.875rem; border-radius: 2px; transition: opacity 0.2s; margin-top: 0.5rem;
}
.form-submit:hover { opacity: 0.88; }

/* ── Footer ── */
footer {
  border-top: 1px solid var(--border); padding: 2rem 0;
}
.footer-inner {
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: 1rem;
}
.footer-copy { font-family: 'JetBrains Mono', monospace; font-size: 0.8rem; color: var(--muted-fg); }

/* ── SVG Icons ── */
svg { display: inline-block; vertical-align: middle; }
