/* ==========================================================================
   LDG Labs - design tokens
   ========================================================================== */
:root {
  --ink: #111214;
  --paper: #FAFAF8;
  --signal-blue: #2F6FED;
  --signal-blue-dark: #1E54C4;
  --circuit-cyan: #0BB4D6;
  --slate: #6B7280;
  --white: #FFFFFF;
  --line: rgba(17, 18, 20, 0.1);

  --font-display: "Space Grotesk", "Arial Black", sans-serif;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 24px;

  --shadow-card: 0 4px 20px rgba(17, 18, 20, 0.06);
  --shadow-lift: 0 12px 32px rgba(17, 18, 20, 0.12);

  --container: 1180px;
}

/* ==========================================================================
   Reset
   ========================================================================== */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body, h1, h2, h3, h4, p, figure, blockquote, dl, dd { margin: 0; }
ul[class], ol[class] { list-style: none; margin: 0; padding: 0; }
img, picture, svg { display: block; max-width: 100%; }
input, button, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }

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

/* ==========================================================================
   Base
   ========================================================================== */
body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.6;
  overflow-x: hidden;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.01em;
}

h2 { font-size: clamp(1.75rem, 1.4rem + 1.6vw, 2.75rem); }
h3 { font-size: clamp(1.2rem, 1.05rem + 0.6vw, 1.5rem); }

p { color: var(--slate); }

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: 1.25rem;
}

@media (min-width: 640px) {
  .container { padding-inline: 2rem; }
}

section { padding: 4.5rem 0; }

@media (min-width: 1024px) {
  section { padding: 6.5rem 0; }
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-display);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--signal-blue);
  margin-bottom: 1rem;
}

.section-head {
  max-width: 640px;
  margin-bottom: 2.5rem;
}

.section-head p { margin-top: 0.85rem; font-size: 1.05rem; }

.section-head.center { margin-inline: auto; text-align: center; }

/* Focus states - visible everywhere */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 3px solid var(--signal-blue);
  outline-offset: 3px;
  border-radius: 4px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 1000;
  background: var(--ink);
  color: var(--paper);
  padding: 0.85rem 1.25rem;
  border-radius: 0 0 var(--radius-sm) 0;
  font-weight: 600;
}
.skip-link:focus {
  left: 0;
}

/* ==========================================================================
   Buttons
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.95rem 1.75rem;
  border-radius: 999px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1rem;
  border: 2px solid transparent;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease, color 0.15s ease;
  min-height: 48px;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }

.btn-primary {
  background: var(--signal-blue);
  color: var(--white);
  box-shadow: 0 6px 18px rgba(47, 111, 237, 0.3);
}
.btn-primary:hover { background: var(--signal-blue-dark); box-shadow: 0 8px 22px rgba(47, 111, 237, 0.4); }

.btn-ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--line);
}
.btn-ghost:hover { border-color: var(--ink); }

.btn-block { width: 100%; }

/* ==========================================================================
   Navbar
   ========================================================================== */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--ink);
  border-bottom: 1px solid rgba(250, 250, 248, 0.1);
  box-shadow: 0 2px 16px rgba(0, 0, 0, 0.2);
}

.navbar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--paper);
}
.brand img { height: 34px; width: auto; }

.nav-actions {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.nav-email {
  display: none;
  align-items: center;
  gap: 0.55rem;
  height: 42px;
  color: rgba(250, 250, 248, 0.85);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.92rem;
  border-bottom: 1.5px solid transparent;
  transition: color 0.15s ease, border-color 0.15s ease;
}
.nav-email svg { width: 18px; height: 18px; color: var(--circuit-cyan); flex-shrink: 0; }
.nav-email:hover { color: var(--paper); border-color: var(--circuit-cyan); }
@media (min-width: 720px) {
  .nav-email { display: inline-flex; }
}

.nav-cta { display: none; }
@media (min-width: 480px) {
  .nav-cta { display: inline-flex; padding: 0.7rem 1.4rem; font-size: 0.9rem; min-height: 42px; }
}

/* ==========================================================================
   Hero
   ========================================================================== */
.hero {
  padding-top: 3.5rem;
  padding-bottom: 3.5rem;
  position: relative;
}

@media (min-width: 1024px) {
  .hero { padding-top: 5.5rem; padding-bottom: 5rem; }
}

.hero .container {
  display: grid;
  gap: 2.5rem;
  align-items: center;
}

@media (min-width: 900px) {
  .hero .container { grid-template-columns: 1.15fr 0.85fr; gap: 3rem; }
}

.hero h1 {
  font-size: clamp(2.1rem, 1.7rem + 2.4vw, 3.5rem);
  margin-bottom: 1.1rem;
}

.hero .subhead {
  font-size: 1.15rem;
  max-width: 46ch;
  margin-bottom: 2rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
}

.hero-visual {
  position: relative;
  aspect-ratio: 4 / 3;
  border-radius: var(--radius-lg);
  background:
    radial-gradient(circle at 30% 20%, rgba(47, 111, 237, 0.16), transparent 55%),
    radial-gradient(circle at 75% 75%, rgba(11, 180, 214, 0.16), transparent 55%),
    var(--ink);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-visual svg { width: 62%; height: 62%; }

/* ==========================================================================
   Services
   ========================================================================== */
.services-grid {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: 1fr;
}

@media (min-width: 640px) {
  .services-grid { grid-template-columns: repeat(2, 1fr); }
}

.service-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 1.75rem;
  box-shadow: var(--shadow-card);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.service-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lift); }

.service-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-sm);
  background: rgba(47, 111, 237, 0.1);
  color: var(--signal-blue);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.1rem;
}
.service-card.accent .service-icon { background: rgba(11, 180, 214, 0.12); color: var(--circuit-cyan); }
.service-icon svg { width: 24px; height: 24px; }

.service-card h3 { margin-bottom: 0.6rem; }
.service-card p { font-size: 0.98rem; }

/* ==========================================================================
   Process / circuit trace
   ========================================================================== */
.process { background: var(--white); }

.process-track {
  position: relative;
  display: grid;
  gap: 2.5rem;
  grid-template-columns: 1fr;
}

@media (min-width: 860px) {
  .process-track {
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
  }
  .process-track::before {
    content: "";
    position: absolute;
    top: 27px;
    left: var(--line-start, 27px);
    right: var(--line-end, calc(25% - 45px));
    height: 3px;
    background: var(--line);
    z-index: 0;
  }
  .process-track .process-line-fill {
    position: absolute;
    top: 27px;
    left: var(--line-start, 27px);
    height: 3px;
    width: 0;
    background: var(--signal-blue);
    z-index: 1;
    transition: width 1s cubic-bezier(0.65, 0, 0.35, 1);
  }
}

.process-step {
  position: relative;
  z-index: 2;
  text-align: left;
}

.process-step .step-num {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: var(--paper);
  border: 3px solid var(--line);
  color: var(--slate);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.1rem;
  transition: border-color 0.4s ease, color 0.4s ease, background-color 0.4s ease, box-shadow 0.4s ease;
}

.process-step.is-lit .step-num {
  border-color: var(--signal-blue);
  color: var(--signal-blue);
  background: var(--white);
  box-shadow: 0 0 0 6px rgba(47, 111, 237, 0.12);
}

.process-step h3 { margin-bottom: 0.4rem; }
.process-step p { font-size: 0.95rem; }

/* ==========================================================================
   Work / portfolio
   ========================================================================== */
.work-card {
  background: var(--ink);
  color: var(--paper);
  border-radius: var(--radius-lg);
  padding: 2.25rem;
  display: grid;
  gap: 2rem;
  overflow: hidden;
  position: relative;
}

@media (min-width: 860px) {
  .work-card { grid-template-columns: 1fr 1fr; padding: 3rem; align-items: center; }
}

.work-tag {
  display: block;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--circuit-cyan);
  margin-bottom: 0.9rem;
}

.work-card h3 { color: var(--paper); font-size: clamp(1.4rem, 1.2rem + 1vw, 1.9rem); margin-bottom: 0.85rem; }
.work-card p { color: rgba(250, 250, 248, 0.75); font-size: 1.02rem; margin-bottom: 1.5rem; }

.work-visual {
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, rgba(47, 111, 237, 0.25), rgba(11, 180, 214, 0.2));
  aspect-ratio: 16/11;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(250, 250, 248, 0.12);
}
.work-visual svg { width: 40%; height: 40%; opacity: 0.9; }

.work-preview {
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
  overflow: hidden;
  background: var(--white);
}

.browser-chrome {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 6px;
  height: 30px;
  padding: 0 0.7rem;
  background: #dcdde0;
}
.browser-chrome .dot { width: 8px; height: 8px; border-radius: 50%; background: rgba(17, 18, 20, 0.2); }
.browser-chrome .browser-url {
  flex: 1;
  margin-left: 0.4rem;
  padding: 3px 0.7rem;
  border-radius: 999px;
  background: var(--white);
  color: var(--slate);
  font-size: 0.72rem;
  max-width: 160px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.work-preview picture,
.work-preview img {
  flex: 1;
  width: 100%;
  height: 100%;
  min-height: 0;
  object-fit: cover;
  object-position: top;
  display: block;
}

@media (max-width: 859px) {
  .work-preview { aspect-ratio: 3 / 4; }
}

.work-card .btn-primary { background: var(--circuit-cyan); box-shadow: 0 6px 18px rgba(11, 180, 214, 0.3); }
.work-card .btn-primary:hover { background: #0999b8; }

/* ==========================================================================
   Testimonial
   ========================================================================== */
.testimonial { background: var(--paper); }

.testimonial-card {
  max-width: 760px;
  margin-inline: auto;
  text-align: center;
}

.testimonial-card svg { width: 34px; height: 34px; color: var(--signal-blue); margin-inline: auto; margin-bottom: 1.25rem; }

.testimonial-quote {
  font-family: var(--font-display);
  font-size: clamp(1.3rem, 1.1rem + 1vw, 1.8rem);
  font-weight: 500;
  color: var(--ink);
  line-height: 1.35;
  margin-bottom: 1.5rem;
}

.testimonial-attribution {
  color: var(--slate);
  font-weight: 600;
}

/* ==========================================================================
   FAQ
   ========================================================================== */
.faq-list { max-width: 760px; margin-inline: auto; display: grid; gap: 0.85rem; }

.faq-item {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.faq-question {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.25rem 1.4rem;
  background: none;
  border: none;
  text-align: left;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.02rem;
}

.faq-question .icon {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--paper);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.25s ease, background-color 0.25s ease, color 0.25s ease;
}
.faq-question .icon svg { width: 14px; height: 14px; }

.faq-item[open] .faq-question .icon {
  background: var(--signal-blue);
  color: var(--white);
  transform: rotate(45deg);
}

.faq-answer { padding: 0 1.4rem 1.25rem; font-size: 0.98rem; }

.faq-question::-webkit-details-marker { display: none; }
.faq-question::marker { content: ""; }

/* ==========================================================================
   Contact / quote form
   ========================================================================== */
.contact { background: var(--white); }

.contact-grid {
  display: grid;
  gap: 2.5rem;
}

@media (min-width: 900px) {
  .contact-grid { grid-template-columns: 0.85fr 1.15fr; gap: 3.5rem; }
}

.contact-info h2 { margin-bottom: 0.9rem; }
.contact-info p { margin-bottom: 1.5rem; }

.contact-email {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.05rem;
  color: var(--signal-blue);
  padding: 0.9rem 1.25rem;
  background: rgba(47, 111, 237, 0.08);
  border-radius: var(--radius-sm);
}
.contact-email svg { width: 20px; height: 20px; flex-shrink: 0; }

.form-grid {
  display: grid;
  gap: 1.1rem;
}

@media (min-width: 560px) {
  .form-row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1.1rem; }
}

.field label {
  display: block;
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 0.4rem;
}

.field .optional { font-weight: 400; color: var(--slate); }

.field input,
.field select,
.field textarea {
  width: 100%;
  padding: 0.85rem 1rem;
  border: 1.5px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--paper);
  font-size: 1rem;
  min-height: 48px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.field textarea { min-height: 120px; resize: vertical; }

.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: var(--signal-blue);
  outline: none;
  box-shadow: 0 0 0 4px rgba(47, 111, 237, 0.14);
}

.form-legal {
  font-size: 0.85rem;
  color: var(--slate);
  margin-top: 0.9rem;
}
.form-legal a { color: var(--signal-blue); text-decoration: underline; }

.form-status {
  margin-top: 1rem;
  padding: 0.9rem 1.1rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.95rem;
  display: none;
}
.form-status.success { display: block; background: rgba(11, 180, 214, 0.12); color: #0a7f97; }
.form-status.error { display: block; background: rgba(220, 38, 38, 0.1); color: #b91c1c; }

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer {
  background: #000000;
  color: rgba(250, 250, 248, 0.7);
  padding: 3.5rem 0 2rem;
}

.footer-top {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  padding-bottom: 2.5rem;
  border-bottom: 1px solid rgba(250, 250, 248, 0.12);
  margin-bottom: 1.75rem;
}

@media (min-width: 700px) {
  .footer-top { flex-direction: row; align-items: center; justify-content: space-between; }
}

.footer-logo img { height: 76px; width: auto; }

.footer-contact { display: flex; flex-direction: column; align-items: flex-start; gap: 1rem; font-size: 0.95rem; }
.footer-contact a:hover { color: var(--circuit-cyan); }

@media (min-width: 700px) {
  .footer-contact { align-items: flex-end; }
}

.footer-socials { display: flex; align-items: center; gap: 1rem; }
.footer-socials a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: rgba(250, 250, 248, 0.08);
  color: rgba(250, 250, 248, 0.8);
  transition: background-color 0.15s ease, color 0.15s ease;
}
.footer-socials a:hover { background: var(--circuit-cyan); color: var(--ink); }
.footer-socials svg { width: 21px; height: 21px; }

.footer-bottom {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  font-size: 0.85rem;
}

@media (min-width: 700px) {
  .footer-bottom { flex-direction: row; align-items: center; justify-content: space-between; }
}

.footer-links { display: flex; gap: 1.5rem; }
.footer-links a:hover { color: var(--paper); text-decoration: underline; }

/* ==========================================================================
   Floating enquiry button + panel
   ========================================================================== */
.float-btn {
  position: fixed;
  right: 1.1rem;
  bottom: 1.1rem;
  z-index: 200;
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  background: var(--ink);
  color: var(--paper);
  padding: 0.9rem 1.3rem;
  border-radius: 999px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.95rem;
  box-shadow: 0 10px 28px rgba(17, 18, 20, 0.28);
  border: none;
  transition: transform 0.15s ease, background-color 0.15s ease;
}
.float-btn:hover { background: #000; transform: translateY(-2px); }
.float-btn svg { width: 18px; height: 18px; color: var(--circuit-cyan); }

.float-btn.is-hidden { transform: translateY(120%); opacity: 0; pointer-events: none; }

body.panel-open { overflow: hidden; }

.float-panel {
  position: fixed;
  inset: auto 0 0 0;
  z-index: 250;
  background: var(--white);
  border-radius: 20px 20px 0 0;
  box-shadow: 0 -12px 40px rgba(17, 18, 20, 0.22);
  padding: 1.5rem 1.25rem calc(1.5rem + env(safe-area-inset-bottom, 0px));
  transform: translateY(100%);
  transition: transform 0.3s cubic-bezier(0.32, 0.72, 0, 1);
  max-height: 88vh;
  max-height: 88dvh;
  overflow-y: auto;
  visibility: hidden;
}

.float-panel.is-open { visibility: visible; }

@media (min-width: 480px) {
  .float-panel {
    inset: auto 1.1rem 5.5rem auto;
    width: 100%;
    max-width: 380px;
    border-radius: var(--radius-lg);
  }
}

.float-panel.is-open { transform: translateY(0); }

.float-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.1rem;
}
.float-panel-head h3 { font-size: 1.15rem; }

.float-panel-close {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: var(--paper);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.float-panel-close svg { width: 16px; height: 16px; }

.float-panel .field { margin-bottom: 0.9rem; }

.overlay {
  position: fixed;
  inset: 0;
  background: rgba(17, 18, 20, 0.35);
  z-index: 240;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}
.overlay.is-open { opacity: 1; pointer-events: auto; }

/* ==========================================================================
   Legal pages
   ========================================================================== */
.legal-main { padding: 3.5rem 0 5rem; }
.legal-main .container { max-width: 760px; }
.legal-main h1 { margin-bottom: 0.5rem; }
.legal-updated { color: var(--slate); font-size: 0.9rem; margin-bottom: 2.5rem; }
.legal-main h2 { font-size: 1.35rem; margin-top: 2.25rem; margin-bottom: 0.75rem; }
.legal-main p, .legal-main li { color: var(--slate); margin-bottom: 0.9rem; }
.legal-main ul { padding-left: 1.25rem; list-style: disc; }
.legal-main a { color: var(--signal-blue); text-decoration: underline; }
.legal-main strong { color: var(--ink); }

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

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; }
}

/* ==========================================================================
   Utility
   ========================================================================== */
.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}
