/* =========================================================
   ZIVALOGIX — style.css
   Adaptive theme: follows the visitor's OS/browser setting.
   - Light (default): bright blue/violet/emerald theme
   - Dark (prefers-color-scheme: dark): original dark theme
   All theme colors are CSS custom properties below — edit
   the :root block for light, and the @media block for dark.
   ========================================================= */

:root {
  /* ---- core palette (LIGHT) ---- */
  --primary: #2563EB;
  --secondary: #7C3AED;
  --accent: #059669;
  --bg: #F8FAFC;
  --bg-elevated: #FFFFFF;
  --bg-elevated-2: #F1F5F9;
  --border: rgba(15, 23, 42, 0.09);
  --text: #0F172A;
  --text-muted: #64748B;

  /* ---- derived / effect tokens (LIGHT) ---- */
  --glow-1: rgba(37, 99, 235, 0.10);
  --glow-2: rgba(124, 58, 237, 0.09);
  --glow-3: rgba(5, 150, 105, 0.07);
  --loader-glow-1: rgba(124, 58, 237, 0.25);
  --loader-glow-2: rgba(37, 99, 235, 0.4);
  --navbar-bg: rgba(248, 250, 252, 0.78);
  --nav-active-bg: rgba(37, 99, 235, 0.08);
  --btn-shadow: rgba(37, 99, 235, 0.45);
  --btn-shadow-hover: rgba(37, 99, 235, 0.55);
  --btn-outline-hover-bg: rgba(37, 99, 235, 0.06);
  --btn-outline-hover-border: rgba(37, 99, 235, 0.3);
  --hamburger-bg: rgba(37, 99, 235, 0.05);
  --mobile-menu-shadow: rgba(15, 23, 42, 0.25);
  --scrim-bg: rgba(15, 23, 42, 0.35);
  --card-shadow: 0 1px 2px rgba(15, 23, 42, 0.04), 0 16px 32px -24px rgba(15, 23, 42, 0.18);
  --contact-shadow: 0 1px 2px rgba(15, 23, 42, 0.04), 0 20px 40px -28px rgba(15, 23, 42, 0.2);
  --service-hover-border: rgba(124, 58, 237, 0.35);
  --service-hover-shadow: 0 1px 2px rgba(15, 23, 42, 0.04), 0 24px 40px -20px rgba(37, 99, 235, 0.18);
  --work-hover-border: rgba(5, 150, 105, 0.35);
  --work-hover-shadow: 0 1px 2px rgba(15, 23, 42, 0.04), 0 24px 40px -20px rgba(5, 150, 105, 0.16);
  --tag-bg: rgba(15, 23, 42, 0.04);
  --focus-ring: rgba(37, 99, 235, 0.18);
  --orbit-shadow: rgba(15, 23, 42, 0.22);

  --font-display: "Plus Jakarta Sans", "Inter", sans-serif;
  --font-body: "Inter", "Plus Jakarta Sans", sans-serif;

  --radius-sm: 12px;
  --radius-lg: 16px;

  --nav-height: 76px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* =========== DARK THEME OVERRIDE (matches visitor's OS setting) =========== */
@media (prefers-color-scheme: dark) {
  :root {
    --primary: #4F46E5;
    --secondary: #7C3AED;
    --accent: #10B981;
    --bg: #0F172A;
    --bg-elevated: #16213B;
    --bg-elevated-2: #1B2646;
    --border: rgba(148, 163, 184, 0.14);
    --text: #F8FAFC;
    --text-muted: #94A3B8;

    --glow-1: rgba(79, 70, 229, 0.28);
    --glow-2: rgba(124, 58, 237, 0.22);
    --glow-3: rgba(16, 185, 129, 0.10);
    --loader-glow-1: rgba(124, 58, 237, 0.35);
    --loader-glow-2: rgba(79, 70, 229, 0.6);
    --navbar-bg: rgba(15, 23, 42, 0.72);
    --nav-active-bg: rgba(148, 163, 184, 0.1);
    --btn-shadow: rgba(79, 70, 229, 0.6);
    --btn-shadow-hover: rgba(79, 70, 229, 0.75);
    --btn-outline-hover-bg: rgba(148, 163, 184, 0.08);
    --btn-outline-hover-border: rgba(148, 163, 184, 0.3);
    --hamburger-bg: rgba(148, 163, 184, 0.06);
    --mobile-menu-shadow: rgba(0, 0, 0, 0.5);
    --scrim-bg: rgba(0, 0, 0, 0.5);
    --card-shadow: none;
    --contact-shadow: none;
    --service-hover-border: rgba(124, 58, 237, 0.4);
    --service-hover-shadow: none;
    --work-hover-border: rgba(16, 185, 129, 0.35);
    --work-hover-shadow: none;
    --tag-bg: rgba(148, 163, 184, 0.08);
    --focus-ring: rgba(79, 70, 229, 0.25);
    --orbit-shadow: rgba(0, 0, 0, 0.6);
    --select-arrow-color: %2394A3B8; /* URL-encoded #94A3B8 */
  }
}

* { box-sizing: border-box; }

html, body {
  height: 100%;
  overflow: hidden; /* no traditional page scroll */
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  transition: background 0.3s var(--ease), color 0.3s var(--ease);
}

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

button { font-family: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* Ambient background glow, fixed so it never scrolls */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  background:
    radial-gradient(680px 460px at 12% -6%, var(--glow-1), transparent 60%),
    radial-gradient(620px 460px at 108% 18%, var(--glow-2), transparent 60%),
    radial-gradient(500px 400px at 50% 118%, var(--glow-3), transparent 60%);
  pointer-events: none;
  z-index: 0;
}

/* ================= LOADER ================= */
.loader {
  position: fixed;
  inset: 0;
  z-index: 999;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  background: var(--bg);
  transition: opacity 0.6s var(--ease), visibility 0.6s var(--ease);
}
.loader.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}
.loader-mark {
  width: 64px;
  height: 64px;
  animation: loaderSpin 2.4s linear infinite, loaderPulse 1.4s ease-in-out infinite;
}
.loader-glyph { width: 100%; height: 100%; object-fit: contain; }
@keyframes loaderSpin { to { transform: rotate(360deg); } }
@keyframes loaderPulse {
  0%, 100% { filter: drop-shadow(0 0 6px var(--loader-glow-1)); }
  50% { filter: drop-shadow(0 0 16px var(--loader-glow-2)); }
}
.loader-text {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.32em;
  color: var(--text-muted);
}

/* SVG gradient stop driving the hero orbit-core rings' color —
   flips with the theme like the rest of the palette */
#coreGrad #coreGradStop1 { stop-color: var(--primary); }
#coreGrad #coreGradStop2 { stop-color: var(--accent); }

/* ================= NAVBAR ================= */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--nav-height);
  z-index: 100;
  background: var(--navbar-bg);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}
.navbar-inner {
  max-width: 1280px;
  height: 100%;
  margin: 0 auto;
  padding: 0 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.brand {
  display: flex;
  align-items: center;
  text-decoration: none;
  color: var(--text);
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
}
.brand-name {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 19px;
  letter-spacing: -0.01em;
  box-sizing: border-box;
}
.brand-a { width: 8.0em; height: 2.4em; object-fit: contain; flex-shrink: 0; }
.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
}
.nav-link {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 15px;
  font-weight: 500;
  padding: 9px 16px;
  border-radius: 999px;
  cursor: pointer;
  transition: color 0.25s var(--ease), background 0.25s var(--ease);
}
.nav-link:hover { color: var(--text); }
.nav-link.active {
  color: var(--text);
  background: var(--nav-active-bg);
}
.navbar-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}

/* Buttons */
.btn {
  border: none;
  border-radius: var(--radius-sm);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 15px;
  padding: 13px 26px;
  cursor: pointer;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease), background 0.25s var(--ease);
  white-space: nowrap;
}
.btn-primary {
  color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  box-shadow: 0 10px 26px -8px var(--btn-shadow);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 14px 30px -8px var(--btn-shadow-hover); }
.btn-outline {
  color: var(--text);
  background: transparent;
  border: 1px solid var(--border);
}
.btn-outline:hover { background: var(--btn-outline-hover-bg); border-color: var(--btn-outline-hover-border); }
.btn-small { padding: 10px 20px; font-size: 14px; }

/* Hamburger (hidden on desktop) */
.hamburger {
  display: none;
  width: 42px;
  height: 42px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--hamburger-bg);
  cursor: pointer;
  position: relative;
  flex-shrink: 0;
}
.hamburger span {
  position: absolute;
  left: 10px;
  right: 10px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.35s var(--ease), opacity 0.25s var(--ease), top 0.35s var(--ease);
}
.hamburger span:nth-child(1) { top: 14px; }
.hamburger span:nth-child(2) { top: 20px; }
.hamburger span:nth-child(3) { top: 26px; }
.hamburger.is-open span:nth-child(1) { top: 20px; transform: rotate(45deg); }
.hamburger.is-open span:nth-child(2) { opacity: 0; }
.hamburger.is-open span:nth-child(3) { top: 20px; transform: rotate(-45deg); }

/* ================= MOBILE MENU ================= */
.mobile-menu {
  position: fixed;
  top: 0; right: 0;
  height: 100%;
  width: min(360px, 84vw);
  z-index: 90;
  background: linear-gradient(165deg, var(--bg-elevated), var(--bg));
  border-left: 1px solid var(--border);
  padding: calc(var(--nav-height) + 32px) 32px 40px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transform: translateX(100%);
  transition: transform 0.42s var(--ease);
  box-shadow: -24px 0 60px -20px var(--mobile-menu-shadow);
}
.mobile-menu.is-open { transform: translateX(0); }
.mobile-menu-links {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.mobile-link {
  background: none;
  border: none;
  text-align: left;
  color: var(--text-muted);
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 600;
  padding: 14px 4px;
  cursor: pointer;
  border-bottom: 1px solid var(--border);
  transition: color 0.25s var(--ease), padding-left 0.25s var(--ease);
}
.mobile-link:hover, .mobile-link.active { color: var(--text); padding-left: 10px; }
.mobile-cta { width: 100%; }

/* Scrim behind the mobile menu */
.mobile-menu::before {
  content: "";
  position: fixed;
  inset: 0;
  right: min(360px, 84vw);
  background: rgba(0, 0, 0, 0);
  transition: background 0.42s var(--ease);
  z-index: -1;
  pointer-events: none;
}
body.menu-open .mobile-menu::before {
  pointer-events: auto;
}

/* ================= APP / SECTIONS ================= */
.app {
  position: relative;
  height: 100vh;
  height: 100dvh;
  padding-top: var(--nav-height);
  z-index: 1;
}

.view {
  position: absolute;
  inset: 0;
  top: var(--nav-height);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  opacity: 0;
  transform: translateY(18px);
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.5s var(--ease), transform 0.5s var(--ease), visibility 0.5s var(--ease);
}
.view.active {
  opacity: 1;
  transform: translateY(0);
  visibility: visible;
  pointer-events: auto;
}

.section-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 56px 28px 72px;
  min-height: 100%;
}

.kicker {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 600;
  color: var(--accent);
  margin: 0 0 14px;
}
.section-title {
  font-family: var(--font-display);
  font-size: clamp(28px, 4vw, 42px);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.01em;
  margin: 0 0 14px;
  max-width: 620px;
}
.section-sub {
  font-size: 17px;
  color: var(--text-muted);
  max-width: 560px;
  line-height: 1.6;
  margin: 0 0 44px;
}

/* ================= HOME ================= */
.home-inner {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  align-items: center;
  gap: 48px;
  min-height: calc(100% - 0px);
  padding-top: 60px;
}
.home-content { max-width: 620px; }
.hero-headline {
  font-family: var(--font-display);
  font-size: clamp(34px, 5vw, 56px);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -0.02em;
  margin: 0 0 22px;
}
.hero-sub {
  font-size: 17px;
  line-height: 1.65;
  color: var(--text-muted);
  margin: 0 0 34px;
  max-width: 520px;
}
.hero-actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 52px;
}
.trust-row {
  display: flex;
  gap: 40px;
  padding-top: 28px;
  border-top: 1px solid var(--border);
}
.trust-item { display: flex; flex-direction: column; gap: 4px; }
.trust-number {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 700;
}
.trust-label { font-size: 13px; color: var(--text-muted); }

.home-visual {
  position: relative;
  height: 420px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.orbit-core { width: 240px; height: 240px; animation: coreFloat 7s ease-in-out infinite; }
.core-svg { width: 100%; height: 100%; }
@keyframes coreFloat {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-14px) rotate(6deg); }
}
.orbit-card {
  position: absolute;
  display: flex;
  flex-direction: column;
  gap: 2px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px 18px;
  box-shadow: 0 20px 40px -20px var(--orbit-shadow);
}
.orbit-card.card-1 { top: 6%; left: -4%; animation: orbitFloat 6s ease-in-out infinite; }
.orbit-card.card-2 { bottom: 10%; right: -6%; animation: orbitFloat 6s ease-in-out infinite 1.4s; }
@keyframes orbitFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}
.orbit-label { font-size: 12px; color: var(--text-muted); }
.orbit-value { font-family: var(--font-display); font-weight: 700; font-size: 20px; color: var(--accent); }

/* ================= SERVICES ================= */
.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.service-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px 26px;
  box-shadow: var(--card-shadow);
  transition: transform 0.3s var(--ease), border-color 0.3s var(--ease), box-shadow 0.3s var(--ease);
}
.service-card:hover { transform: translateY(-4px); border-color: var(--service-hover-border); box-shadow: var(--service-hover-shadow); }
.service-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
  color: #fff;
  background: linear-gradient(135deg, var(--icon-a), var(--icon-b));
}
.service-icon svg { width: 22px; height: 22px; }
.service-card h3 {
  font-family: var(--font-display);
  font-size: 19px;
  margin: 0 0 14px;
}
.service-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 9px;
}
.service-list li {
  font-size: 14.5px;
  color: var(--text-muted);
  padding-left: 16px;
  position: relative;
  line-height: 1.5;
}
.service-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 8px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
}

/* ================= WORK ================= */
.work-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.work-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 22px;
  box-shadow: var(--card-shadow);
  transition: transform 0.3s var(--ease), border-color 0.3s var(--ease), box-shadow 0.3s var(--ease);
}
.work-card:hover { transform: translateY(-4px); border-color: var(--work-hover-border); box-shadow: var(--work-hover-shadow); }
.work-thumb {
  height: 120px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
}
.work-thumb-glyph {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 26px;
  color: rgba(255, 255, 255, 0.9);
  letter-spacing: 0.05em;
}
.work-card h3 { font-family: var(--font-display); font-size: 18px; margin: 0 0 8px; }
.work-card p { font-size: 14.5px; color: var(--text-muted); line-height: 1.55; margin: 0 0 16px; }
.tag-row { display: flex; flex-wrap: wrap; gap: 8px; }
.tag {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-muted);
  background: var(--tag-bg);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 5px 12px;
}

/* ================= ABOUT ================= */
.about-inner { padding-top: 56px; }
.about-lead {
  font-size: 16.5px;
  line-height: 1.7;
  color: var(--text-muted);
  max-width: 680px;
  margin: 0 0 18px;
}
.about-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 20px;
  margin-top: 38px;
}
.about-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 26px;
  box-shadow: var(--card-shadow);
}
.about-card h3 { font-family: var(--font-display); font-size: 17px; margin: 0 0 10px; color: var(--accent); }
.about-card p { font-size: 14.5px; line-height: 1.6; color: var(--text-muted); margin: 0; }

/* ================= CONTACT ================= */
.contact-inner {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 56px;
  padding-top: 56px;
}
.contact-detail {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-bottom: 22px;
}
.contact-detail-label { font-size: 12.5px; color: var(--text-muted); text-transform: none; }
.contact-detail-value { font-family: var(--font-display); font-size: 17px; font-weight: 600; }

.social-links-tab {}
.social-link-anchor {}
.contact-anchor-links {color: inherit; text-decoration: none; }
.social-icon {width: 40px; margin: 10px 4px;}

.contact-form {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  box-shadow: var(--contact-shadow);
}
.form-row { display: flex; flex-direction: column; gap: 8px; }
.form-row label { font-size: 13.5px; font-weight: 500; color: var(--text-muted); }
.form-row input,
.form-row select,
.form-row textarea {
  background: var(--bg-elevated-2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 13px 14px;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 15px;
  resize: vertical;
  transition: border-color 0.25s var(--ease), box-shadow 0.25s var(--ease);
}
.form-row input:focus,
.form-row select:focus,
.form-row textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--focus-ring);
}
.form-row select {
  appearance: none;
  cursor: pointer;
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='14' height='9' viewBox='0 0 14 9'><path d='M1 1l6 6 6-6' stroke='#64748B' stroke-width='1.6' fill='none' stroke-linecap='round' stroke-linejoin='round'/></svg>");
}
@media (prefers-color-scheme: dark) {
  .form-row select {
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='14' height='9' viewBox='0 0 14 9'><path d='M1 1l6 6 6-6' stroke='#94A3B8' stroke-width='1.6' fill='none' stroke-linecap='round' stroke-linejoin='round'/></svg>");
  }
}
.form-submit { margin-top: 6px; width: 100%; }

/* ============================================================
   RESPONSIVE BREAKPOINTS
   Mobile: up to 480px | Large mobile/small tablet: 481–768px
   Tablet: 769–1024px | Desktop: 1025px+ | Extra-wide: 1400px+
   ============================================================ */

/* Hide desktop nav / show hamburger below 900px, per spec */
@media (max-width: 900px) {
  .nav-links { display: none; }
  .hamburger { display: block; }
  .navbar-actions .btn-small { display: none; }
}
@media (min-width: 901px) {
  .mobile-menu { display: none; }
}

/* Tablet 769–1024px */
@media (max-width: 1024px) {
  .home-inner { grid-template-columns: 1fr; gap: 36px; padding-top: 32px; }
  .home-visual { height: 300px; order: -1; }
  .orbit-core { width: 190px; height: 190px; }
  .services-grid { grid-template-columns: repeat(2, 1fr); }
  .work-grid { grid-template-columns: repeat(2, 1fr); }
  .about-grid { grid-template-columns: 1fr 1fr; }
  .contact-inner { grid-template-columns: 1fr; gap: 36px; }
}

/* Large mobile / small tablet 481–768px */
@media (max-width: 768px) {
  .navbar-inner { padding: 0 20px; }
  .section-inner { padding: 40px 20px 60px; }
  .hero-actions { flex-direction: column; align-items: stretch; }
  .trust-row { gap: 24px; flex-wrap: wrap; }
  .services-grid { grid-template-columns: 1fr; }
  .work-grid { grid-template-columns: 1fr; }
  .about-grid { grid-template-columns: 1fr; }
  .home-visual { display: none; }
  .home-inner { padding-top: 10px; justify-items: center; }
}

/* Mobile up to 480px */
@media (max-width: 480px) {
  :root { --nav-height: 68px; }
  .brand-name { font-size: 17px; }
  .hero-headline { font-size: 30px; }
  .hero-sub { font-size: 15.5px; }
  .section-title { font-size: 26px; }
  .contact-form { padding: 22px; }
  .btn { padding: 12px 20px; font-size: 14px; }
  .mobile-menu { width: 100%; padding-left: 24px; padding-right: 24px; }
  .mobile-link { font-size: 22px; }
}

/* Very narrow foldables (Z Fold folded, ~280–344px) */
@media (max-width: 320px) {
  .navbar-inner { padding: 0 14px; }
  .section-inner { padding: 32px 14px 52px; }
  .brand-name { font-size: 15px; }
  .hero-headline { font-size: 25px; }
  .trust-row { gap: 18px; }
  .trust-number { font-size: 21px; }
}

/* Extra-wide / unfolded Z Fold 1400px+ */
@media (min-width: 1400px) {
  .section-inner { max-width: 1360px; padding-left: 40px; padding-right: 40px; }
  .home-inner { gap: 80px; }
  .services-grid { grid-template-columns: repeat(5, 1fr); gap: 22px; }
  .work-grid { grid-template-columns: repeat(3, 1fr); }
  .about-grid { grid-template-columns: repeat(3, 1fr); }
  .hero-headline { font-size: 60px; }
}

/* Unfolded Z Fold sits around 850–900px wide with a squarer viewport;
   give it its own tuned layout rather than stretching the tablet rules */
@media (min-width: 820px) and (max-width: 950px) and (min-aspect-ratio: 1/1) {
  .home-inner { grid-template-columns: 1.05fr 0.95fr; }
  .services-grid { grid-template-columns: repeat(3, 1fr); }
  .work-grid { grid-template-columns: repeat(3, 1fr); }
  .about-grid { grid-template-columns: repeat(3, 1fr); }
}

/* Touch target safety */
@media (pointer: coarse) {
  .nav-link, .mobile-link, .hamburger, .btn { min-height: 44px; }
}

/* ================= HOME EXPANDED CONTENT ================= */
.home-details {
  max-width: 1200px;
  margin: 0 auto;
  padding: 10px 28px 80px;
}
.home-details-heading {
  max-width: 760px;
  margin: 0 auto 48px;
  text-align: center;
}
.home-details-heading .section-title,
.home-details-heading .section-sub {
  margin-left: auto;
  margin-right: auto;
}
.home-feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-bottom: 72px;
}
.home-feature-card,
.process-step {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 26px;
  box-shadow: var(--card-shadow);
  transition: transform 0.25s var(--ease), border-color 0.25s var(--ease), box-shadow 0.25s var(--ease);
}
.home-feature-card:hover,
.process-step:hover {
  transform: translateY(-4px);
  border-color: var(--service-hover-border);
  box-shadow: var(--service-hover-shadow);
}
.home-feature-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 28px;
  border-radius: 999px;
  background: var(--nav-active-bg);
  color: var(--primary);
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 20px;
}
.home-feature-card h3,
.process-step h3 {
  font-family: var(--font-display);
  font-size: 18px;
  margin: 0 0 10px;
}
.home-feature-card p,
.process-step p {
  margin: 0;
  color: var(--text-muted);
  font-size: 14px;
  line-height: 1.7;
}
.home-split-section {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 64px;
  align-items: start;
  padding: 68px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.home-secondary-title {
  font-family: var(--font-display);
  font-size: clamp(26px, 3vw, 36px);
  line-height: 1.18;
  letter-spacing: -0.02em;
  margin: 0 0 16px;
  max-width: 650px;
}
.home-secondary-text {
  color: var(--text-muted);
  line-height: 1.7;
  font-size: 15.5px;
  max-width: 650px;
  margin: 0 0 24px;
}
.home-pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}
.home-pill {
  border: 1px solid var(--border);
  background: var(--bg-elevated-2);
  color: var(--text-muted);
  border-radius: 999px;
  padding: 8px 12px;
  font-size: 12px;
  font-weight: 600;
}
.home-checklist {
  display: grid;
  gap: 18px;
}
.home-check-item {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}
.home-check-item > span {
  flex: 0 0 auto;
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: var(--accent);
  background: var(--glow-3);
  font-weight: 800;
}
.home-check-item strong {
  display: block;
  font-family: var(--font-display);
  font-size: 14px;
  margin-bottom: 4px;
}
.home-check-item p {
  margin: 0;
  color: var(--text-muted);
  font-size: 13.5px;
  line-height: 1.6;
}
.home-process {
  padding: 72px 0 68px;
}
.process-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  margin-top: 34px;
}
.process-step {
  padding: 22px;
}
.process-step > span {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 18px;
}
.home-testimonials {
  padding: 0 0 72px;
}
.testimonial-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.testimonial-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 26px;
  box-shadow: var(--card-shadow);
  transition: transform 0.25s var(--ease), border-color 0.25s var(--ease), box-shadow 0.25s var(--ease);
}
.testimonial-card:hover {
  transform: translateY(-4px);
  border-color: var(--service-hover-border);
  box-shadow: var(--service-hover-shadow);
}
.testimonial-message {
  margin: 0 0 22px;
  color: var(--text);
  font-size: 14.5px;
  line-height: 1.75;
}
.testimonial-author {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}
.testimonial-name {
  font-family: var(--font-display);
  font-size: 14.5px;
  font-weight: 700;
  color: var(--text);
}
.testimonial-project {
  font-size: 12.5px;
  color: var(--primary);
  font-weight: 600;
}

.home-cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 36px;
  padding: 38px;
  border: 1px solid var(--border);
  border-radius: 20px;
  background:
    radial-gradient(420px 240px at 0% 0%, var(--glow-1), transparent 70%),
    radial-gradient(420px 240px at 100% 100%, var(--glow-2), transparent 70%),
    var(--bg-elevated);
  box-shadow: var(--card-shadow);
}
.home-cta .kicker { margin-bottom: 8px; }
.home-cta h2 {
  font-family: var(--font-display);
  font-size: clamp(24px, 3vw, 34px);
  line-height: 1.2;
  margin: 0 0 10px;
  max-width: 720px;
}
.home-cta p:not(.kicker) {
  margin: 0;
  color: var(--text-muted);
  font-size: 14.5px;
  line-height: 1.65;
  max-width: 720px;
}
.home-cta .btn { flex: 0 0 auto; }

/* Contact form feedback */
.form-status {
  min-height: 20px;
  margin: 0;
  font-size: 13px;
  line-height: 1.5;
  color: var(--text-muted);
}
.form-status.sending { color: var(--primary); }
.form-status.success { color: var(--accent); }
.form-status.error { color: #DC2626; }
.form-submit:disabled { opacity: 0.65; cursor: wait; transform: none; }

@media (max-width: 1024px) {
  .home-feature-grid { grid-template-columns: 1fr 1fr; }
  .home-feature-card:last-child { grid-column: 1 / -1; }
  .home-split-section { grid-template-columns: 1fr; gap: 42px; }
  .process-grid { grid-template-columns: 1fr 1fr; }
  .testimonial-grid { grid-template-columns: 1fr 1fr; }
  .testimonial-card:last-child { grid-column: 1 / -1; }
}

@media (max-width: 768px) {
  .home-details { padding: 0 20px 60px; }
  .home-feature-grid { grid-template-columns: 1fr; }
  .home-feature-card:last-child { grid-column: auto; }
  .home-split-section { padding: 52px 0; }
  .home-process { padding: 56px 0; }
  .process-grid { grid-template-columns: 1fr; }
  .home-testimonials { padding: 0 0 56px; }
  .testimonial-grid { grid-template-columns: 1fr; }
  .testimonial-card:last-child { grid-column: auto; }
  .home-cta { align-items: flex-start; flex-direction: column; padding: 28px; }
  .home-cta .btn { width: 100%; }
}

@media (max-width: 480px) {
  .home-details { padding-left: 14px; padding-right: 14px; }
  .home-feature-card { padding: 22px; }
  .home-split-section { gap: 32px; }
  .home-pill { font-size: 11.5px; }
  .testimonial-card { padding: 22px; }
  .home-cta { padding: 24px; }
}
