/* ============================================
   NESEN STUDIO — style.css
   Global design system, all pages
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,300;0,9..40,400;0,9..40,500;0,9..40,600;1,9..40,300&family=DM+Mono:wght@300;400;500&display=swap');

/* ─── RESET ─── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
img { max-width: 100%; height: auto; display: block; }
a { text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
ul { list-style: none; }

/* ─── TOKENS ─── */
:root {
  --bg:            #0A121E;
  --bg-card:       #111E30;
  --bg-card-2:     #0D1828;
  --bg-input:      #0C1824;
  --blue:          #2E9FD9;
  --blue-bright:   #4FB8F0;
  --blue-deep:     #1A6FA6;
  --border:        rgba(46,159,217,0.12);
  --border-card:   rgba(46,159,217,0.18);
  --border-hover:  rgba(46,159,217,0.4);
  --text-primary:  #FFFFFF;
  --text-secondary:#93A4B8;
  --text-tertiary: #4E627A;
  --mono:          'DM Mono', monospace;
  --sans:          'DM Sans', sans-serif;
  --radius-sm:     6px;
  --radius-md:     10px;
  --radius-lg:     16px;
  --radius-xl:     24px;
  --nav-height:    112px;
  --container:     1100px;
  --logo-height:   100px;
  --logo-height-sm: 84px;
  --footer-logo-height: 88px;
  --ease-out:      cubic-bezier(0.16, 1, 0.3, 1);
  --ease-smooth:   cubic-bezier(0.4, 0, 0.2, 1);
  --space-section: clamp(3.5rem, 8vw, 5.5rem);
  --space-container: clamp(1rem, 4vw, 2.5rem);
  --touch-min:     44px;
}

/* ─── BASE ─── */
html {
  scroll-behavior: smooth;
  font-size: clamp(15px, 2.5vw, 17px);
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--sans);
  background: var(--bg);
  color: var(--text-primary);
  line-height: 1.65;
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  min-height: 100dvh;
}

body::before {
  content: '';
  position: fixed; inset: 0;
  opacity: 0.022;
  pointer-events: none;
  z-index: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 256px;
}

body::after {
  content: '';
  position: fixed; inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image:
    linear-gradient(rgba(46,159,217,0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(46,159,217,0.025) 1px, transparent 1px);
  background-size: 60px 60px;
}

.page-wrap { position: relative; z-index: 1; }
footer { position: relative; z-index: 1; }

::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--border-card); border-radius: 3px; }

/* ─── CONTAINER ─── */
.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding-inline: var(--space-container);
}

/* ─── NAVIGATION ─── */
nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--nav-height);
  z-index: 400;
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  background: rgba(10,18,30,0.85);
  transition: border-color 350ms var(--ease-smooth), background 350ms var(--ease-smooth);
}

nav.scrolled {
  border-bottom-color: rgba(46,159,217,0.25);
  background: rgba(10,18,30,0.92);
}

.nav-inner {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding-inline: var(--space-container);
  height: 100%;
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px;
}

.logo {
  display: flex;
  align-items: center;
  min-width: 0;
  flex-shrink: 1;
  max-width: min(52vw, 220px);
}
.logo img {
  height: var(--logo-height);
  width: auto;
  max-width: 100%;
  transform-origin: left center;
  transition: transform 0.45s var(--ease-out);
  will-change: transform;
}

.nav-links { display: flex; align-items: center; gap: 2px; }

.nav-links a {
  color: var(--text-secondary);
  font-size: 15px; font-weight: 400;
  padding: 7px 14px;
  border-radius: var(--radius-sm);
  transition: color 200ms var(--ease-smooth), background 200ms var(--ease-smooth);
}

.nav-links a:hover { color: var(--text-primary); background: rgba(255,255,255,0.05); }
.nav-links a.active { color: var(--blue); background: rgba(46,159,217,0.08); }

.nav-cta {
  background: var(--blue) !important;
  color: #04101C !important;
  font-weight: 500 !important;
  padding: 8px 18px !important;
  border-radius: var(--radius-md) !important;
  font-size: 15px !important;
  transition: background 200ms var(--ease-smooth), transform 200ms var(--ease-smooth) !important;
}

.nav-cta:hover { background: var(--blue-bright) !important; color: #04101C !important; transform: translateY(-1px); }
.nav-cta.active { background: var(--blue) !important; color: #04101C !important; }

/* Hamburger */
.hamburger {
  display: none;
  flex-direction: column; justify-content: center; align-items: center; gap: 5px;
  min-width: var(--touch-min); min-height: var(--touch-min);
  width: var(--touch-min); height: var(--touch-min);
  background: none; border: none;
  padding: 10px; border-radius: var(--radius-sm);
  cursor: pointer; z-index: 301;
  flex-shrink: 0;
  -webkit-tap-highlight-color: transparent;
}

.hamburger span {
  display: block;
  width: 22px; height: 2px;
  background: var(--text-secondary);
  border-radius: 2px;
  transition: all 320ms var(--ease-out);
  transform-origin: center;
}

.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); background: var(--text-primary); }
.hamburger.open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); background: var(--text-primary); }

/* Overlay — hidden & non-interactive until menu opens */
.nav-overlay {
  display: none;
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.65);
  z-index: 250;
  opacity: 0;
  pointer-events: none;
  visibility: hidden;
  transition: opacity 300ms ease, visibility 300ms ease;
}

.nav-overlay.active {
  display: block;
  opacity: 1;
  pointer-events: auto;
  visibility: visible;
}

/* Slide-in mobile menu */
.mobile-menu {
  position: fixed;
  top: 0; right: -320px;
  width: 300px; height: 100vh;
  height: 100dvh;
  background: #0D1828;
  border-left: 1px solid var(--border-card);
  z-index: 450;
  padding: calc(var(--nav-height) + 16px) 0 40px;
  display: flex; flex-direction: column;
  transition: right 380ms var(--ease-out);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.mobile-menu.open { right: 0; }

.mobile-menu a {
  color: var(--text-secondary);
  font-size: 17px;
  padding: 16px 32px;
  min-height: var(--touch-min);
  display: flex;
  align-items: center;
  border-bottom: 1px solid var(--border);
  transition: color 150ms ease, background 150ms ease;
}

/* border-top removed: mobile-menu-utils now sits above links and supplies the visual top separator */
.mobile-menu a:hover { color: var(--text-primary); background: rgba(46,159,217,0.05); }
.mobile-menu a.active { color: var(--blue); }

.mobile-menu .mobile-cta {
  margin: 24px 32px 0;
  display: block; text-align: center;
  background: var(--blue); color: #04101C !important;
  font-weight: 500; padding: 14px 24px;
  border-radius: var(--radius-md);
  border-bottom: none !important;
  border-top: none !important;
  transition: background 150ms ease !important;
}

.mobile-menu .mobile-cta:hover { background: var(--blue-bright) !important; }

/* ─── PAGE WRAP ─── */
.page-wrap { padding-top: var(--nav-height); min-height: 100vh; }

/* ─── PAGE HERO (inner pages) ─── */
.page-hero {
  padding: 72px 0 64px;
  border-bottom: 1px solid var(--border);
  position: relative; overflow: hidden;
  animation: heroFadeIn 800ms var(--ease-out) both;
}

@keyframes heroFadeIn {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

.page-hero::before {
  content: '';
  position: absolute;
  top: -100px; left: 50%;
  transform: translateX(-50%);
  width: 600px; height: 400px;
  background: radial-gradient(ellipse at 50% 30%, rgba(46,159,217,0.1) 0%, transparent 70%);
  pointer-events: none;
}

.page-hero { text-align: center; }

.page-hero h1 {
  font-size: clamp(32px, 5vw, 54px);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin-bottom: 16px;
}

.page-hero p {
  font-size: clamp(0.9375rem, 1.5vw, 1.0625rem);
  color: var(--text-secondary);
  font-weight: 300;
  max-width: 36rem;
  line-height: 1.7;
  margin-left: auto;
  margin-right: auto;
}

/* ─── SECTIONS ─── */
section { padding-block: var(--space-section); border-bottom: 1px solid var(--border); }
section:last-of-type { border-bottom: none; }
section.no-border { border-bottom: none; }

/* ─── TYPOGRAPHY ─── */
h1 {
  font-size: clamp(1.875rem, 5vw + 0.5rem, 4.375rem);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.08;
  overflow-wrap: break-word;
}
h2 {
  font-size: clamp(1.625rem, 3.5vw + 0.25rem, 2.75rem);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.15;
  margin-bottom: 14px;
  overflow-wrap: break-word;
}
h3 {
  font-size: clamp(1.0625rem, 1.5vw + 0.5rem, 1.25rem);
  font-weight: 500;
  letter-spacing: -0.02em;
  overflow-wrap: break-word;
}
p {
  font-size: clamp(0.9375rem, 1vw + 0.5rem, 1.0625rem);
  line-height: 1.7;
  overflow-wrap: break-word;
}
.accent { color: var(--blue); }

/* ─── EYEBROW ─── */
.eyebrow {
  font-family: var(--mono);
  font-size: 12px; font-weight: 400;
  letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--blue);
  margin-bottom: 18px;
  display: flex; align-items: center; gap: 10px;
}

.eyebrow::before {
  content: '';
  display: block; width: 20px; height: 1px;
  background: var(--blue); opacity: 0.6; flex-shrink: 0;
}

.eyebrow.centered { justify-content: center; }
.eyebrow.centered::before { display: none; }

/* Center eyebrows that live inside page-hero or section-header */
.page-hero .eyebrow,
.section-header .eyebrow {
  justify-content: center;
}
.page-hero .eyebrow::before,
.section-header .eyebrow::before {
  display: none;
}
/* Restore left-aligned eyebrow in 2-column contexts */
.about-grid .section-header .eyebrow,
.process-2col .section-header .eyebrow {
  justify-content: flex-start;
}
.about-grid .section-header .eyebrow::before,
.process-2col .section-header .eyebrow::before {
  display: block;
}

/* ─── SECTION HEADER ─── */
.section-header { max-width: 600px; margin-bottom: 52px; margin-left: auto; margin-right: auto; text-align: center; }
.section-header.centered { text-align: center; margin-left: auto; margin-right: auto; }
.about-grid .section-header,
.process-2col .section-header { text-align: left; margin-left: 0; margin-right: 0; }
.section-sub {
  font-size: clamp(0.9375rem, 1vw + 0.5rem, 1.0625rem);
  color: var(--text-secondary);
  font-weight: 300;
  line-height: 1.7;
  margin-top: 4px;
}

/* ─── LAYOUT GRIDS (mobile-first) ─── */
.about-grid,
.contact-grid,
.process-2col,
.hero-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: start;
  min-width: 0;
}

.about-grid > *,
.contact-grid > *,
.process-2col > *,
.hero-grid > *,
.services-bento > *,
.card-grid-3 > * {
  min-width: 0;
}

.contact-grid { gap: clamp(2rem, 6vw, 4.5rem); }

.form-2col {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

.services-bento {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1px;
  border: 1px solid var(--border-card);
  border-radius: var(--radius-xl);
  overflow: hidden;
  background: var(--border-card);
}

.card-grid-3 {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(1rem, 3vw, 1.25rem);
}

.service-card {
  background: var(--bg-card);
  padding: clamp(1.5rem, 4vw, 2.375rem) clamp(1.25rem, 3vw, 2rem);
  transition: background 200ms var(--ease-smooth);
}

.service-card:hover { background: #132030; }

.service-card-num {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text-tertiary);
  letter-spacing: 0.08em;
  margin-bottom: 24px;
}

.service-card-icon {
  width: 44px; height: 44px;
  border: 1px solid var(--border-card);
  border-radius: var(--radius-md);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 22px;
  background: rgba(46,159,217,0.06);
  flex-shrink: 0;
}

.service-card-desc {
  font-size: clamp(0.875rem, 1vw + 0.25rem, 0.9375rem);
  color: var(--text-secondary);
  font-weight: 300;
  line-height: 1.65;
  margin-bottom: 20px;
}

/* ─── HOMEPAGE HERO ─── */
#hero {
  min-height: auto;
  display: flex;
  align-items: center;
  padding-top: calc(var(--nav-height) + clamp(2rem, 5vw, 3.5rem));
  padding-bottom: clamp(3rem, 6vw, 4.5rem);
  border-bottom: 1px solid var(--border);
  overflow: hidden;
  position: relative;
}

.hero-glow {
  position: absolute;
  top: -180px; left: 50%;
  transform: translateX(-50%);
  width: min(800px, 140vw);
  height: min(600px, 80vh);
  background: radial-gradient(ellipse at 50% 30%, rgba(46,159,217,0.11) 0%, transparent 70%);
  pointer-events: none;
}

.hero-content { max-width: 42.5rem; }

.hero-eyebrow {
  font-family: var(--mono);
  font-size: clamp(0.6875rem, 1.5vw, 0.75rem);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--blue);
  margin-bottom: 18px;
}

.hero-sub {
  font-size: clamp(1rem, 2vw, 1.125rem);
  font-weight: 300;
  color: var(--text-secondary);
  max-width: 32.5rem;
  margin-bottom: clamp(1.5rem, 4vw, 2.375rem);
  line-height: 1.7;
}

.hero-meta {
  margin-top: clamp(2rem, 5vw, 3rem);
  display: flex;
  align-items: center;
  gap: clamp(1rem, 3vw, 1.75rem);
  flex-wrap: wrap;
}

.hero-meta-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: clamp(0.8125rem, 1.5vw, 0.875rem);
  color: var(--text-tertiary);
}

.cta-group {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.cta-center {
  text-align: center;
  max-width: 35rem;
  margin-inline: auto;
}

.cta-center .cta-group {
  justify-content: center;
}

.about-photo {
  border-radius: var(--radius-xl);
  overflow: hidden;
  border: 1px solid var(--border-card);
  aspect-ratio: 4 / 5;
  position: relative;
  max-height: 480px;
}

.about-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
}

.info-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 4px 0;
  font-size: clamp(0.9375rem, 1vw + 0.5rem, 1rem);
}

.info-grid span:nth-child(odd) {
  color: var(--text-tertiary);
  margin-top: 12px;
}

.info-grid span:nth-child(odd):first-child { margin-top: 0; }

.info-grid span:nth-child(even) { color: var(--text-secondary); }

.privacy-content { max-width: 47.5rem; }

.metrics-row-4 { grid-template-columns: repeat(2, 1fr); }
.metrics-row-2 { grid-template-columns: repeat(2, 1fr); }

.card-centered {
  text-align: center;
  max-width: 37.5rem;
  margin-inline: auto;
}

.card-max { max-width: 50rem; margin-left: auto; margin-right: auto; }

.project-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  color: var(--blue);
  font-family: var(--mono);
  letter-spacing: 0.04em;
  transition: opacity 150ms ease;
  min-height: var(--touch-min);
}

.text-link:hover { opacity: 0.7; }

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.contact-info { padding-top: 8px; }

.faq-wrap { max-width: 47.5rem; margin-inline: auto; }

.section-cta {
  text-align: center;
  margin-top: clamp(2.5rem, 6vw, 3.5rem);
}

.mockup-panel {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  overflow: hidden;
  max-width: 100%;
}

.mockup-bubble {
  background: rgba(46,159,217,0.08);
  border: 1px solid rgba(46,159,217,0.15);
  border-radius: 10px 10px 10px 2px;
  padding: 12px 14px;
  max-width: 100%;
  word-break: break-word;
}

.price-display {
  font-size: clamp(1.375rem, 3vw, 1.75rem);
  font-weight: 600;
  color: var(--blue);
  font-family: var(--mono);
  letter-spacing: -0.02em;
}

/* ─── BUTTONS ─── */
.btn-primary {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: var(--blue); color: #04101C;
  font-size: clamp(0.9375rem, 1vw + 0.25rem, 0.9375rem);
  font-weight: 500; font-family: var(--sans);
  padding: 14px 26px;
  min-height: var(--touch-min);
  border-radius: var(--radius-md);
  border: none;
  transition: background 200ms var(--ease-smooth), transform 200ms var(--ease-smooth), box-shadow 200ms var(--ease-smooth);
}

.btn-primary:hover { background: var(--blue-bright); transform: translateY(-2px); box-shadow: 0 8px 24px rgba(46,159,217,0.2); }
.btn-primary:active { transform: translateY(0) scale(0.98); box-shadow: none; }

.btn-ghost {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: transparent; color: var(--text-secondary);
  font-size: clamp(0.9375rem, 1vw + 0.25rem, 0.9375rem);
  font-weight: 400; font-family: var(--sans);
  padding: 14px 26px;
  min-height: var(--touch-min);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-card);
  transition: color 200ms var(--ease-smooth), border-color 200ms var(--ease-smooth), background 200ms var(--ease-smooth), transform 200ms var(--ease-smooth);
}

.btn-ghost:hover { color: var(--text-primary); border-color: var(--border-hover); background: rgba(46,159,217,0.05); transform: translateY(-1px); }
.btn-ghost:active { transform: scale(0.98); }

/* ─── TAGS / BADGES ─── */
.tag {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--blue-bright);
  background: rgba(26,111,166,0.18);
  border: 1px solid rgba(46,159,217,0.22);
  padding: 4px 10px; border-radius: 5px;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

/* ─── CARDS ─── */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  padding: clamp(1.25rem, 4vw, 2rem);
  transition: border-color 300ms var(--ease-smooth), background 300ms var(--ease-smooth), transform 300ms var(--ease-out), box-shadow 300ms var(--ease-smooth);
}

.card:hover {
  border-color: var(--border-hover);
  background: #132030;
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(0,0,0,0.25);
}

/* ─── REVEAL ANIMATIONS ─── */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 700ms var(--ease-out), transform 700ms var(--ease-out);
}
.reveal.visible { opacity: 1; transform: translateY(0); }
.reveal-delay-1 { transition-delay: 100ms; }
.reveal-delay-2 { transition-delay: 180ms; }
.reveal-delay-3 { transition-delay: 260ms; }
.reveal-delay-4 { transition-delay: 340ms; }
.reveal-delay-5 { transition-delay: 420ms; }

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .logo img { transition: none; }
  .page-hero { animation: none; }
}

/* ─── FOOTER ─── */
footer { border-top: 1px solid var(--border); padding: 40px 0 24px; }

.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 28px; margin-bottom: 28px; }

.footer-brand img {
  height: var(--footer-logo-height);
  width: auto;
  margin-bottom: 14px;
  transition: opacity 300ms var(--ease-smooth);
}
.footer-brand img:hover { opacity: 0.85; }
.footer-brand p { font-size: 14px; color: var(--text-tertiary); line-height: 1.7; font-weight: 300; max-width: 260px; }

.footer-col h4 {
  font-size: 12px; font-weight: 500; color: var(--text-tertiary);
  letter-spacing: 0.09em; text-transform: uppercase;
  font-family: var(--mono); margin-bottom: 10px;
}
.footer-col ul { display: flex; flex-direction: column; gap: 5px; }
.footer-col a { font-size: 14px; color: var(--text-tertiary); transition: color 150ms ease; }
.footer-col a:hover { color: var(--text-primary); }

.footer-bottom {
  padding-top: 24px; border-top: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px;
}

.footer-bottom p, .footer-bottom a { font-family: var(--mono); font-size: 12px; color: var(--text-tertiary); letter-spacing: 0.04em; }
.footer-bottom a:hover { color: var(--blue); }
.footer-legal { display: flex; gap: 20px; }

/* ─── FORM ELEMENTS ─── */
.form-group { display: flex; flex-direction: column; gap: 7px; }

.form-group label {
  font-family: var(--mono); font-size: 12px; font-weight: 500;
  color: var(--text-tertiary); letter-spacing: 0.06em; text-transform: uppercase;
}

.form-group input,
.form-group textarea,
.form-group select {
  background: var(--bg-input);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-md);
  padding: 14px 18px;
  font-size: 16px; font-family: var(--sans);
  color: var(--text-primary);
  outline: none;
  transition: border-color 150ms ease, box-shadow 150ms ease;
  width: 100%;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(46,159,217,0.12);
}

.form-group input::placeholder,
.form-group textarea::placeholder { color: var(--text-tertiary); }
.form-group textarea { resize: vertical; min-height: 130px; }

.form-group select {
  cursor: pointer; appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='none' viewBox='0 0 24 24'%3E%3Cpath stroke='%2393A4B8' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  padding-right: 40px;
}

.form-group select option { background: var(--bg-card); color: var(--text-primary); }

.form-error {
  font-family: var(--mono); font-size: 11px;
  color: #e05252; letter-spacing: 0.04em;
}

.form-group input.input-error,
.form-group textarea.input-error {
  border-color: #e05252;
  box-shadow: 0 0 0 3px rgba(224, 82, 82, 0.12);
}

/* ─── PROCESS / STEPS ─── */
.process-steps { position: relative; }

.process-steps::before {
  content: '';
  position: absolute;
  left: 20px; top: 28px; bottom: 28px; width: 1px;
  background: linear-gradient(to bottom, var(--blue), var(--blue-deep), transparent);
  opacity: 0.25;
  z-index: 0;
}

.process-step {
  display: grid; grid-template-columns: 40px 1fr; gap: 24px;
  padding: 26px 0; border-bottom: 1px solid var(--border);
}

.process-step:last-child { border-bottom: none; }

.step-num {
  width: 40px; height: 40px;
  border: 1px solid var(--border-card); border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--mono); font-size: 13px; color: var(--blue);
  background: var(--bg-card); flex-shrink: 0;
  transition: border-color 200ms ease, background 200ms ease, box-shadow 200ms ease;
  z-index: 1;
}

.process-step:hover .step-num {
  border-color: var(--blue);
  background: rgba(46,159,217,0.1);
  box-shadow: 0 0 0 4px rgba(46,159,217,0.06);
}

.step-content h3 { font-size: 17px; margin-bottom: 6px; padding-top: 9px; color: var(--text-primary); }
.step-content p { font-size: 15px; color: var(--text-secondary); font-weight: 300; line-height: 1.65; }

/* ─── METRICS ROW ─── */
.metrics-row {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--border-card);
  margin-top: 32px;
}

.metric-item { background: var(--bg-card); padding: 24px 20px; text-align: center; }
.metric-value { font-size: 22px; font-weight: 600; color: var(--blue); font-family: var(--mono); letter-spacing: -0.02em; }
.metric-label { font-size: 13px; color: var(--text-tertiary); margin-top: 4px; font-weight: 300; }

/* ─── TECH STRIP ─── */
.tech-strip { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }

/* ─── DIFF LIST ─── */
.diff-list { display: flex; flex-direction: column; gap: 14px; }

.diff-item { display: flex; align-items: flex-start; gap: 12px; font-size: 15px; color: var(--text-secondary); font-weight: 300; }
.diff-icon { width: 18px; height: 18px; flex-shrink: 0; margin-top: 2px; color: var(--blue); }

/* ─── TOOLS GRID ─── */
.tools-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 1px; border: 1px solid var(--border);
  border-radius: var(--radius-lg); overflow: hidden; background: var(--border);
}

.tool-item { background: var(--bg-card); padding: 18px 20px; display: flex; align-items: center; gap: 10px; transition: background 150ms ease; }
.tool-item:hover { background: rgba(46,159,217,0.05); }
.tool-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--blue); opacity: 0.6; flex-shrink: 0; }
.tool-item span { font-size: 14px; color: var(--text-secondary); font-weight: 300; }

/* ─── FAQ ─── */
.faq-list { border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; }
.faq-item { border-bottom: 1px solid var(--border); }
.faq-item:last-child { border-bottom: none; }

.faq-question {
  width: 100%; padding: clamp(1rem, 3vw, 1.375rem) clamp(1.125rem, 3vw, 1.75rem);
  background: var(--bg-card); border: none;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  text-align: left; font-family: var(--sans);
  font-size: clamp(0.9375rem, 1vw + 0.25rem, 1rem);
  font-weight: 400; color: var(--text-primary);
  transition: background 150ms ease;
  min-height: var(--touch-min);
  -webkit-tap-highlight-color: transparent;
}

.faq-question:hover { background: rgba(46,159,217,0.04); }
.faq-chevron { width: 18px; height: 18px; color: var(--text-tertiary); flex-shrink: 0; transition: transform 350ms var(--ease-out), color 350ms var(--ease-smooth); }
.faq-item.open .faq-chevron { transform: rotate(180deg); color: var(--blue); }
.faq-answer { max-height: 0; overflow: hidden; transition: max-height 400ms var(--ease-out); background: var(--bg-card-2); }
.faq-item.open .faq-answer { max-height: 600px; }
.faq-answer p { padding: clamp(0.875rem, 3vw, 1.125rem) clamp(1.125rem, 3vw, 1.75rem); font-size: clamp(0.875rem, 1vw + 0.25rem, 0.9375rem); color: var(--text-secondary); line-height: 1.75; font-weight: 300; }

/* ─── CONTACT ─── */
.contact-link {
  display: flex; align-items: center; gap: 12px;
  color: var(--text-secondary); font-size: clamp(0.875rem, 1vw + 0.25rem, 0.9375rem);
  padding: 15px 20px;
  min-height: var(--touch-min);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-md); background: var(--bg-card);
  transition: color 250ms var(--ease-smooth), border-color 250ms var(--ease-smooth), background 250ms var(--ease-smooth), transform 250ms var(--ease-out);
}

.contact-link:hover {
  color: var(--blue);
  border-color: var(--border-hover);
  background: rgba(46,159,217,0.04);
  transform: translateX(4px);
}
.contact-link svg { width: 17px; height: 17px; flex-shrink: 0; color: var(--blue); opacity: 0.7; }
.contact-link:hover svg { opacity: 1; }

/* ─── STATUS DOT ─── */
.status-dot { display: inline-flex; align-items: center; gap: 8px; font-family: var(--mono); font-size: 12px; color: var(--text-tertiary); }
.status-dot::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: #4ade80; animation: pulse-green 2s ease-in-out infinite; }

@keyframes pulse-green { 0%,100%{opacity:1} 50%{opacity:0.4} }
@keyframes pulse-dot { 0%,100%{opacity:1;transform:scale(1)} 50%{opacity:0.5;transform:scale(0.8)} }
@keyframes blink { 0%,100%{opacity:1} 50%{opacity:0} }

/* ─── HERO TAG ─── */
.hero-tag {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 14px 6px 7px;
  border: 1px solid var(--border-card); border-radius: 99px;
  font-size: 13px; color: var(--text-secondary); margin-bottom: 32px;
  background: rgba(46,159,217,0.04);
}

.hero-tag-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--blue); animation: pulse-dot 2s ease-in-out infinite; }

/* ─── TERMINAL ─── */
.terminal { background: var(--bg-card); border: 1px solid var(--border-card); border-radius: var(--radius-lg); overflow: hidden; box-shadow: 0 24px 48px rgba(0,0,0,0.35); margin-top: clamp(2rem, 5vw, 3.5rem); max-width: 100%; }
.terminal-bar { background: var(--bg-card-2); border-bottom: 1px solid var(--border); padding: 12px 18px; display: flex; align-items: center; gap: 8px; }
.terminal-dot { width: 11px; height: 11px; border-radius: 50%; flex-shrink: 0; }
.terminal-title { font-family: var(--mono); font-size: 12px; color: var(--text-tertiary); margin-left: 8px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.terminal-body { padding: clamp(1rem, 3vw, 1.375rem) clamp(1.125rem, 3vw, 1.75rem); font-family: var(--mono); font-size: clamp(0.6875rem, 1.5vw, 0.84375rem); line-height: 1.85; overflow-x: auto; -webkit-overflow-scrolling: touch; word-break: break-word; }
.t-comment { color: var(--text-tertiary); }
.t-key { color: #4FB8F0; }
.t-string { color: #7EC898; }
.t-num { color: #E5A86A; }
.t-bool { color: #C792EA; }
.t-cursor { display: inline-block; width: 8px; height: 15px; background: var(--blue); margin-left: 2px; vertical-align: middle; animation: blink 1.2s step-end infinite; }

/* ─── NAV CONTROLS (lang + theme) ─── */
.nav-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.nav-controls {
  display: flex;
  align-items: center;
  gap: 6px;
}

.lang-switcher {
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 3px;
}

.lang-btn {
  min-width: 36px;
  min-height: var(--touch-min); /* 44px — meets accessibility tap target requirement */
  padding: 4px 8px;
  border: none;
  border-radius: 4px;
  background: transparent;
  color: var(--text-tertiary);
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: color 150ms ease, background 150ms ease;
  -webkit-tap-highlight-color: transparent;
}

.lang-btn:hover { color: var(--text-primary); }

.lang-btn.active {
  background: rgba(46,159,217,0.15);
  color: var(--blue);
}

.theme-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: var(--touch-min);
  min-height: var(--touch-min);
  width: var(--touch-min);
  height: var(--touch-min);
  border: none;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  transition: color 150ms ease;
  -webkit-tap-highlight-color: transparent;
}

.theme-toggle:hover {
  color: var(--text-primary);
}

.theme-toggle .icon-sun { display: none; }
.theme-toggle .icon-moon { display: block; }

html[data-theme="light"] .theme-toggle .icon-sun { display: block; }
html[data-theme="light"] .theme-toggle .icon-moon { display: none; }

/* Desktop nav: widen toggle to fit icon + text label */
.nav-controls .theme-toggle {
  width: auto;
  padding: 0 10px;
  gap: 5px;
  font-size: 12px;
  font-family: var(--mono);
  letter-spacing: 0.04em;
}

html[data-theme="dark"] .nav-controls .theme-toggle::after { content: 'Dark'; }
html[data-theme="light"] .nav-controls .theme-toggle::after { content: 'Light'; }

/* Mobile menu: full-width toggle row with icon + text label */
.mobile-menu-utils .theme-toggle {
  width: 100%;
  min-width: unset;
  padding: 0 14px;
  gap: 10px;
  justify-content: flex-start;
  border-radius: var(--radius-md);
  font-size: 15px;
  font-family: var(--sans);
}

html[data-theme="dark"] .mobile-menu-utils .theme-toggle::after { content: 'Dark mode'; }
html[data-theme="light"] .mobile-menu-utils .theme-toggle::after { content: 'Light mode'; }

/* Mobile lang switcher: full-width with proper touch targets */
.mobile-menu-utils .lang-switcher {
  width: 100%;
}

.mobile-menu-utils .lang-btn {
  flex: 1;
  min-height: var(--touch-min);
  font-size: 13px;
  text-align: center;
}

.hamburger {
  position: relative;
  z-index: 460;
}

.mobile-menu-utils {
  display: none;
  flex-direction: column;
  gap: 12px;
  padding: 20px 32px;
  /* order: -1 moves it visually to the top of the flex column without HTML changes */
  order: -1;
  border-bottom: 1px solid var(--border);
}

/* ─── LIGHT THEME ─── */
html[data-theme="light"] {
  --bg:            #EFF3F8;
  --bg-card:       #FFFFFF;
  --bg-card-2:     #E8EEF5;
  --bg-input:      #FFFFFF;
  --text-primary:  #0A121E;
  --text-secondary:#4E627A;
  --text-tertiary: #7A8FA5;
  --border:        rgba(10,18,30,0.08);
  --border-card:   rgba(10,18,30,0.12);
  --border-hover:  rgba(46,159,217,0.35);
}

html[data-theme="light"] nav {
  background: rgba(239,243,248,0.92);
}

html[data-theme="light"] nav.scrolled {
  background: rgba(239,243,248,0.97);
}

html[data-theme="light"] .mobile-menu {
  background: #FFFFFF;
}

html[data-theme="light"] .card:hover,
html[data-theme="light"] .service-card:hover {
  background: #F5F8FC;
}

html[data-theme="light"] body::before { opacity: 0.012; }
html[data-theme="light"] body::after { opacity: 0.5; }

/* Fix #5: Logo becomes near-invisible on light backgrounds — invert to black */
html[data-theme="light"] .logo img,
html[data-theme="light"] .footer-brand img {
  filter: brightness(0);
}

/* Increase text weight + darken body color for legibility in light mode */
html[data-theme="light"] body,
html[data-theme="light"] p,
html[data-theme="light"] li,
html[data-theme="light"] span,
html[data-theme="light"] a {
  font-weight: 500;
}
html[data-theme="light"] body {
  color: #0a121e; /* near-black — headings already have explicit weights, unaffected */
}
/* Do not adjust h1–h6 weights; they carry explicit values and are already bold enough */

/* Fix #6: Center services & featured-project section headers on the home page */
body.page-home .section-header {
  text-align: center;
  margin-left: auto;
  margin-right: auto;
}

body.page-home .services-bento,
body.page-home .card-grid-3 {
  justify-items: center;
}

/* ─── SKIP LINK ─── */
.skip-link {
  position: absolute;
  top: -100%;
  left: 1rem;
  padding: 12px 20px;
  background: var(--blue);
  color: #04101C;
  font-weight: 500;
  border-radius: var(--radius-md);
  z-index: 9999;
  font-family: var(--sans);
  font-size: 15px;
  transition: top 0s;
}
.skip-link:focus { top: 1rem; }

/* ─── FOCUS VISIBLE ─── */
:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}
:focus:not(:focus-visible) { outline: none; }

/* ─── SCROLL TO TOP ─── */
.scroll-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--blue);
  color: #04101C;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 300;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 250ms var(--ease-smooth), transform 250ms var(--ease-smooth), background 200ms var(--ease-smooth), box-shadow 200ms var(--ease-smooth);
  pointer-events: none;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(46,159,217,0.25);
}
.scroll-top.visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
.scroll-top:hover { background: var(--blue-bright); box-shadow: 0 6px 20px rgba(46,159,217,0.35); }
.scroll-top:active { transform: scale(0.95); }

/* ─── PAGE TRANSITIONS ─── */
.pt-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: var(--bg);
  pointer-events: none;
}

/* Blue glow line on the right edge — the leading edge when sliding in */
.pt-overlay::after {
  content: '';
  position: absolute;
  top: 0; right: 0;
  width: 2px;
  height: 100%;
  background: linear-gradient(180deg, transparent 0%, var(--blue) 20%, var(--blue) 80%, transparent 100%);
  box-shadow: 0 0 18px 2px rgba(46,159,217,0.45);
}

/* Slide in from left — covers current page before navigating */
.pt-overlay.pt-enter {
  transform: translateX(-101%);
  animation: pt-enter 0.44s cubic-bezier(0.76, 0, 0.24, 1) forwards;
}

/* Slide out to right — reveals the new page */
.pt-overlay.pt-exit {
  animation: pt-exit 0.52s cubic-bezier(0.76, 0, 0.24, 1) forwards;
}

@keyframes pt-enter {
  from { transform: translateX(-101%); }
  to   { transform: translateX(0); }
}

@keyframes pt-exit {
  from { transform: translateX(0); }
  to   { transform: translateX(101%); }
}

@media (prefers-reduced-motion: reduce) {
  .pt-overlay.pt-enter,
  .pt-overlay.pt-exit { animation: none; display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .scroll-top { transition: opacity 0.01ms; }
}

/* ═══════════════════════════════════════════
   DYNAMIC EFFECTS
   ═══════════════════════════════════════════ */

/* ── Cursor glow spotlight ── */
.cursor-glow {
  position: fixed;
  width: 220px;
  height: 220px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(46,159,217,0.07) 0%, transparent 60%);
  pointer-events: none;
  z-index: 9999;
  transform: translate(-50%, -50%);
  left: var(--cursor-x, -9999px);
  top: var(--cursor-y, -9999px);
}

html[data-theme="light"] .cursor-glow {
  background: radial-gradient(circle, rgba(46,159,217,0.05) 0%, transparent 55%);
}

@media (pointer: coarse) { .cursor-glow { display: none; } }

/* ── Accent text shimmer ── */
.accent {
  background: linear-gradient(
    90deg,
    var(--blue)        0%,
    var(--blue-bright) 30%,
    #a8d8f0            50%,
    var(--blue-bright) 70%,
    var(--blue)        100%
  );
  background-size: 250% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: accentShimmer 6s linear infinite;
}

html[data-theme="light"] .accent {
  background: linear-gradient(
    90deg,
    var(--blue-deep)   0%,
    var(--blue)        30%,
    var(--blue-bright) 50%,
    var(--blue)        70%,
    var(--blue-deep)   100%
  );
  background-size: 250% auto;
}

@keyframes accentShimmer {
  0%   { background-position: 100% center; }
  100% { background-position: -100% center; }
}

/* ── Tag hover shine sweep ── */
.tag { position: relative; overflow: hidden; }

.tag::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 70%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
  transform: skewX(-20deg);
  pointer-events: none;
}

.tag:hover::after { animation: tagShine 0.45s ease-out forwards; }

@keyframes tagShine {
  to { left: 150%; }
}

/* ── Enhanced card hover glow ── */
.card:hover {
  box-shadow: 0 0 0 1px rgba(46,159,217,0.18),
              0 12px 32px rgba(0,0,0,0.25),
              0 0 60px rgba(46,159,217,0.06);
}

/* ── Metric value glow on reveal ── */
.reveal.visible .metric-value {
  animation: metricGlow 1.4s var(--ease-out) 500ms both;
}

@keyframes metricGlow {
  0%   { text-shadow: none; }
  45%  { text-shadow: 0 0 28px rgba(46,159,217,0.9), 0 0 8px rgba(46,159,217,0.5); }
  100% { text-shadow: none; }
}

/* ── Ripple effect on buttons ── */
.btn-primary, .btn-ghost { position: relative; overflow: hidden; }

.ripple {
  position: absolute;
  border-radius: 50%;
  transform: scale(0);
  animation: rippleAnim 0.6s linear forwards;
  pointer-events: none;
}

.btn-primary .ripple { background: rgba(255,255,255,0.22); }
.btn-ghost   .ripple { background: rgba(46,159,217,0.18); }

@keyframes rippleAnim {
  to { transform: scale(4); opacity: 0; }
}

/* ── Hero glow float ── */
@keyframes heroGlowFloat {
  0%, 100% { transform: translateX(-50%) translateY(0)    scale(1);    opacity: 1;   }
  50%       { transform: translateX(-50%) translateY(-18px) scale(1.1); opacity: 0.7; }
}

.page-hero::before { animation: heroGlowFloat 9s ease-in-out infinite; }

/* ── Background grid drift ── */
@keyframes gridDrift {
  from { background-position: 0 0, 0 0; }
  to   { background-position: 60px 60px, 60px 60px; }
}

body::after { animation: gridDrift 40s linear infinite; }

/* ── Reduced motion overrides ── */
@media (prefers-reduced-motion: reduce) {
  .accent { animation: none; background: none; -webkit-text-fill-color: var(--blue); color: var(--blue); }
  .tag::after { display: none; }
  .reveal.visible .metric-value { animation: none; }
  .page-hero::before { animation: none; }
  body::after        { animation: none; }
  .ripple            { display: none; }
}
