/* ==========================================================================
   DRONA motion system
   High-end animation primitives for scroll reveals, cursor spotlight,
   marquee, magnetic buttons, gradient shimmer, grain texture, 3D tilt.
   All respect prefers-reduced-motion.
   ========================================================================== */

:root {
  /* Easing tokens */
  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-out-quart: cubic-bezier(0.25, 1, 0.5, 1);
  --ease-out-cubic: cubic-bezier(0.33, 1, 0.68, 1);
  --ease-in-out: cubic-bezier(0.4, 0, 0.2, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --ease-linear: linear;

  /* Durations */
  --dur-fast: 180ms;
  --dur-base: 320ms;
  --dur-slow: 680ms;
  --dur-hero: 1100ms;

  /* Spacing scale (for when you want disciplined rhythm) */
  --sp-1: 4px;
  --sp-2: 8px;
  --sp-3: 12px;
  --sp-4: 16px;
  --sp-5: 24px;
  --sp-6: 32px;
  --sp-7: 48px;
  --sp-8: 64px;
  --sp-9: 80px;
  --sp-10: 120px;
  --sp-11: 160px;
}

/* ==========================================================================
   Grain / noise texture overlay (global)
   Adds a subtle film grain to the whole site. Classic award-site move.
   ========================================================================== */
.grain::after {
  content: '';
  position: fixed; inset: 0;
  pointer-events: none;
  z-index: 9999;
  opacity: 0.04;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='200' height='200' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 200px 200px;
}

/* ==========================================================================
   Scroll reveal — IntersectionObserver adds .in
   ========================================================================== */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity var(--dur-hero) var(--ease-out-expo), transform var(--dur-hero) var(--ease-out-expo);
  will-change: opacity, transform;
}
.reveal.in {
  opacity: 1;
  transform: translateY(0);
}

.reveal-up { transform: translateY(24px); }
.reveal-down { transform: translateY(-18px); }
.reveal-left { transform: translateX(-24px); }
.reveal-right { transform: translateX(24px); }
.reveal-scale { transform: scale(0.98); transform-origin: center; }
.reveal-left.in, .reveal-right.in { transform: translateX(0); }
.reveal-scale.in { transform: scale(1); }

/* Stagger children */
.stagger > *:not(.no-stagger) {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity var(--dur-slow) var(--ease-out-expo), transform var(--dur-slow) var(--ease-out-expo);
}
.stagger.in > *:not(.no-stagger) { opacity: 1; transform: translateY(0); }
.stagger.in > *:nth-child(1) { transition-delay: 0ms; }
.stagger.in > *:nth-child(2) { transition-delay: 70ms; }
.stagger.in > *:nth-child(3) { transition-delay: 140ms; }
.stagger.in > *:nth-child(4) { transition-delay: 210ms; }
.stagger.in > *:nth-child(5) { transition-delay: 280ms; }
.stagger.in > *:nth-child(6) { transition-delay: 350ms; }
.stagger.in > *:nth-child(7) { transition-delay: 420ms; }
.stagger.in > *:nth-child(8) { transition-delay: 490ms; }
.stagger.in > *:nth-child(n+9) { transition-delay: 560ms; }

/* ==========================================================================
   Cursor spotlight (hero backgrounds)
   JS sets --mx / --my in 0-100% — CSS paints a radial gradient that follows.
   ========================================================================== */
.spotlight {
  --mx: 50%;
  --my: 30%;
  position: relative;
}
.spotlight::before {
  content: '';
  position: absolute; inset: 0;
  pointer-events: none;
  background: radial-gradient(600px circle at var(--mx) var(--my), rgba(255, 90, 31, 0.18), transparent 50%);
  transition: background-position var(--dur-fast) var(--ease-linear);
  z-index: 1;
}

/* ==========================================================================
   Gradient shimmer text (hero accent word)
   ========================================================================== */
.shimmer {
  background: linear-gradient(100deg,
    #ff5a1f 0%,
    #ffb071 25%,
    #ffe5cc 50%,
    #ffb071 75%,
    #ff5a1f 100%
  );
  background-size: 300% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  animation: shimmer 6s linear infinite;
  display: inline-block;
}
@keyframes shimmer {
  from { background-position: 200% 0; }
  to   { background-position: -100% 0; }
}

/* Aurora glow behind text */
.aurora-bg {
  position: relative;
  isolation: isolate;
}
.aurora-bg::before {
  content: '';
  position: absolute;
  inset: -20% -10%;
  background:
    radial-gradient(ellipse 60% 40% at 20% 30%, rgba(255,90,31,0.18), transparent 60%),
    radial-gradient(ellipse 50% 40% at 80% 70%, rgba(122,108,255,0.15), transparent 60%),
    radial-gradient(ellipse 40% 30% at 50% 50%, rgba(15,169,120,0.08), transparent 60%);
  filter: blur(40px);
  z-index: -1;
  animation: aurora 18s ease-in-out infinite alternate;
  pointer-events: none;
}
@keyframes aurora {
  0%   { transform: translate(0, 0) scale(1); }
  50%  { transform: translate(-3%, 2%) scale(1.04); }
  100% { transform: translate(2%, -3%) scale(1); }
}

/* ==========================================================================
   Marquee (infinite horizontal scroller)
   ========================================================================== */
.marquee {
  overflow: hidden;
  width: 100%;
  mask-image: linear-gradient(90deg, transparent 0%, #000 6%, #000 94%, transparent 100%);
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 6%, #000 94%, transparent 100%);
}
.marquee-track {
  display: inline-flex;
  gap: 56px;
  animation: marquee 40s linear infinite;
  white-space: nowrap;
  padding: 0 28px;
}
.marquee:hover .marquee-track { animation-play-state: paused; }
.marquee-track > * {
  flex: 0 0 auto;
  color: var(--ink-4);
  font-weight: 600;
  font-size: 15px;
  letter-spacing: -0.01em;
  opacity: 0.65;
  transition: opacity var(--dur-base) var(--ease-out-quart);
}
.marquee-track > *:hover { opacity: 1; color: var(--ink); }
@keyframes marquee {
  to { transform: translateX(-50%); }
}

/* ==========================================================================
   Magnetic buttons — subtle pull toward cursor (JS-driven transform)
   Uses transform, so ensure the element has its own transition
   ========================================================================== */
.magnetic {
  transition: transform var(--dur-base) var(--ease-out-quart), background var(--dur-fast) var(--ease-out-quart), border-color var(--dur-fast) var(--ease-out-quart), color var(--dur-fast) var(--ease-out-quart);
  will-change: transform;
}

/* Button arrow slide on hover */
.btn .arrow,
.inline-cta .arrow {
  display: inline-block;
  transition: transform var(--dur-base) var(--ease-spring);
  will-change: transform;
}
.btn:hover .arrow,
.inline-cta:hover .arrow {
  transform: translateX(3px);
}

/* ==========================================================================
   3D tilt on IDE / mockup cards
   JS sets --tx / --ty in degrees
   ========================================================================== */
.tilt {
  --tx: 0deg;
  --ty: 0deg;
  transform: perspective(1400px) rotateX(var(--tx)) rotateY(var(--ty));
  transition: transform 420ms var(--ease-out-quart);
  will-change: transform;
  transform-style: preserve-3d;
}

/* ==========================================================================
   Animated counter (tabular-nums, tight kerning)
   ========================================================================== */
.counter {
  font-variant-numeric: tabular-nums;
  font-feature-settings: 'tnum' 1;
}

/* Typing caret */
.caret {
  display: inline-block;
  width: 2px;
  height: 1em;
  background: var(--accent);
  vertical-align: -2px;
  margin-left: 2px;
  animation: blink 1.1s var(--ease-in-out) infinite;
}
@keyframes blink {
  0%, 50%  { opacity: 1; }
  51%, 100% { opacity: 0; }
}

/* ==========================================================================
   Hero demo reveal — IDE slides up on load
   ========================================================================== */
.hero-ide-entry {
  opacity: 0;
  transform: translateY(40px) scale(0.985);
  animation: heroEntry 1400ms var(--ease-out-expo) 180ms forwards;
}
@keyframes heroEntry {
  to { opacity: 1; transform: translateY(0) scale(1); }
}

/* ==========================================================================
   Link underline draw-on-hover
   ========================================================================== */
.link-draw {
  position: relative;
  text-decoration: none;
  padding-bottom: 1px;
}
.link-draw::after {
  content: '';
  position: absolute;
  left: 0; bottom: 0;
  height: 1px; width: 100%;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: right;
  transition: transform var(--dur-base) var(--ease-out-quart);
}
.link-draw:hover::after { transform: scaleX(1); transform-origin: left; }

/* ==========================================================================
   Floating chip entrance
   ========================================================================== */
.float-in {
  animation: floatIn 800ms var(--ease-out-expo) both;
}
.float-in.d1 { animation-delay: 100ms; }
.float-in.d2 { animation-delay: 200ms; }
.float-in.d3 { animation-delay: 300ms; }
.float-in.d4 { animation-delay: 400ms; }
.float-in.d5 { animation-delay: 500ms; }
@keyframes floatIn {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ==========================================================================
   Thinking-dot pulse (AI chat "thinking…")
   ========================================================================== */
.thinking-dots { display: inline-flex; gap: 3px; align-items: center; margin-left: 4px; }
.thinking-dots span {
  width: 4px; height: 4px; border-radius: 50%;
  background: currentColor;
  opacity: 0.4;
  animation: dotPulse 1.4s var(--ease-in-out) infinite;
}
.thinking-dots span:nth-child(2) { animation-delay: 0.2s; }
.thinking-dots span:nth-child(3) { animation-delay: 0.4s; }
@keyframes dotPulse {
  0%, 60%, 100% { opacity: 0.3; transform: translateY(0); }
  30% { opacity: 1; transform: translateY(-2px); }
}

/* ==========================================================================
   Status pulse
   ========================================================================== */
.pulse-dot {
  position: relative;
  display: inline-block;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--cyan);
}
.pulse-dot::after {
  content: '';
  position: absolute; inset: 0;
  border-radius: 50%;
  background: var(--cyan);
  opacity: 0.6;
  animation: pulseOut 1.8s var(--ease-out-quart) infinite;
}
@keyframes pulseOut {
  0%   { transform: scale(1);   opacity: 0.5; }
  100% { transform: scale(2.5); opacity: 0; }
}

/* ==========================================================================
   Smoother transitions on nav + global buttons
   ========================================================================== */
nav.top {
  transition: background var(--dur-base) var(--ease-out-quart), border-color var(--dur-base) var(--ease-out-quart);
}
nav.top.scrolled {
  background: rgba(255, 255, 255, 0.96);
  border-bottom-color: var(--line-2);
}

.btn {
  transition: transform var(--dur-fast) var(--ease-spring), background var(--dur-fast) var(--ease-out-quart), border-color var(--dur-fast) var(--ease-out-quart), color var(--dur-fast) var(--ease-out-quart);
}
.btn:active { transform: translateY(1px); }

/* Smoother card hover */
.card, .post, .ind-card, .mission, .tier, .pub, .story, .tg-card, .cap, .scale-card {
  transition: transform var(--dur-base) var(--ease-out-quart), border-color var(--dur-base) var(--ease-out-quart), box-shadow var(--dur-base) var(--ease-out-quart), background var(--dur-base) var(--ease-out-quart);
}

/* ==========================================================================
   Section entry glow (for dark sections)
   ========================================================================== */
.dark-section, .hero, .team, .modeler, .stats-big, .wait-strip, .redline {
  position: relative;
  overflow: hidden;
}

/* Animated thin gradient border above dark sections */
.edge-top::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,90,31,0.6), transparent);
  opacity: 0.6;
}

/* ==========================================================================
   Reduced motion override
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .reveal { opacity: 1; transform: none; }
  .stagger > * { opacity: 1; transform: none; }
  .spotlight::before { display: none; }
  .aurora-bg::before { animation: none; }
  .marquee-track { animation: none; }
  .shimmer { animation: none; background: none; -webkit-text-fill-color: var(--accent); color: var(--accent); }
  .caret { animation: none; }
}

/* ==========================================================================
   Typography refinements
   ========================================================================== */
html {
  font-feature-settings: 'cv11' 1, 'ss01' 1, 'ss03' 1, 'cv04' 1;
  font-optical-sizing: auto;
}
body { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
h1, h2, h3, h4, h5 { font-feature-settings: 'ss01' 1, 'ss03' 1, 'cv11' 1; }
.mono, code, pre { font-feature-settings: 'ss01' 1, 'cv01' 1, 'zero' 1; }
.tabular { font-variant-numeric: tabular-nums; font-feature-settings: 'tnum' 1; }

/* Selection */
::selection { background: var(--accent); color: #fff; }
::-moz-selection { background: var(--accent); color: #fff; }

/* Focus visible */
*:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}


/* Inline SVG icon base class */

.ic { width: 20px; height: 20px; stroke: currentColor; fill: none; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; display: inline-block; vertical-align: -4px; flex-shrink: 0; }
.ic.sm { width: 16px; height: 16px; stroke-width: 1.8; }
.ic.lg { width: 28px; height: 28px; stroke-width: 1.5; }

/* ==========================================================================
   Image treatments
   ========================================================================== */
.img-band {
  position: relative;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--surface);
  isolation: isolate;
}
.img-band img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 900ms var(--ease-out-expo), filter 600ms var(--ease-out-quart);
}
.img-band:hover img { transform: scale(1.025); }
.img-band.dark-shell { background: var(--dark-2); border-color: var(--dark-line); }
.img-band.no-border { border: 0; }

.img-band-full {
  margin: 0;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  position: relative;
  isolation: isolate;
}
.img-band-full img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 1400ms var(--ease-out-expo);
}
.img-band-full .img-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(10,11,15,0.1) 20%, rgba(10,11,15,0.75) 85%, rgba(10,11,15,0.92));
  display: flex; flex-direction: column; justify-content: flex-end;
  padding: 72px 56px;
  color: #fff;
  z-index: 2;
}
.img-band-full .img-overlay .kicker { color: rgba(255,255,255,0.7); margin-bottom: 14px; }
.img-band-full .img-overlay h2 { font-size: clamp(32px, 4vw, 52px); color: #fff; max-width: 22ch; margin: 0 0 18px; letter-spacing: -0.025em; font-weight: 500; }
.img-band-full .img-overlay p { font-size: clamp(16px, 1.8vw, 19px); color: rgba(255,255,255,0.8); max-width: 56ch; margin: 0; line-height: 1.5; }
@media (max-width: 820px) {
  .img-band-full { aspect-ratio: 4 / 5; }
  .img-band-full .img-overlay { padding: 36px 28px; }
}

/* Two-column with image */
.img-split {
  display: grid; grid-template-columns: 1fr 1.1fr;
  align-items: center;
  gap: 60px;
}
@media (max-width: 980px) { .img-split { grid-template-columns: 1fr; gap: 36px; } }
.img-split.reverse > *:first-child { order: 2; }
@media (max-width: 980px) { .img-split.reverse > *:first-child { order: initial; } }

.img-caption {
  font-size: 12px;
  color: var(--ink-4);
  letter-spacing: 0.04em;
  margin-top: 14px;
  font-family: var(--mono);
}
.img-caption.dark { color: var(--dark-ink-3); }

/* Photo-band: full-bleed background image with content above */
.photo-band {
  position: relative;
  padding: 140px 0;
  overflow: hidden;
  isolation: isolate;
  color: #fff;
  margin: 80px 0;
}
.photo-band::before {
  content: '';
  position: absolute; inset: 0;
  background-position: center;
  background-size: cover;
  z-index: -2;
}
.photo-band::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(10,11,15,0.55) 0%, rgba(10,11,15,0.65) 40%, rgba(10,11,15,0.85));
  z-index: -1;
}
.photo-band .kicker { color: rgba(255,255,255,0.7); }
.photo-band h2 { color: #fff; max-width: 22ch; margin-bottom: 18px; }
.photo-band p.lead { color: rgba(255,255,255,0.8); max-width: 560px; }


/* ==========================================================================
   Hero background video (activate by uncommenting <video class="hero-video">
   in index.html once Higgsfield renders land in docs/marketing/video/)
   ========================================================================== */
.hero-video {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  z-index: 0;
  pointer-events: none;
  opacity: 0.55;
  filter: saturate(0.92) contrast(1.02);
}
.hero-video + .wrap,
.hero .wrap { position: relative; z-index: 2; }
/* Darken vignette so headline stays legible over moving video */
.hero:has(.hero-video)::after {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(ellipse 80% 60% at 50% 50%, rgba(10,11,15,0.2), rgba(10,11,15,0.75));
  z-index: 1; pointer-events: none;
}
@media (prefers-reduced-motion: reduce) {
  .hero-video { display: none; }
}

/* ==========================================================================
   Mobile menu — full-screen overlay triggered by the hamburger button
   ========================================================================== */
.mobile-menu {
  position: fixed; inset: 0;
  background: var(--dark);
  color: #fff;
  z-index: 100;
  display: none;
  flex-direction: column;
  padding: 14px 24px 32px;
  opacity: 0;
  transition: opacity 320ms var(--ease-out-quart);
  overflow: hidden;
}
.mobile-menu::before {
  content: '';
  position: absolute; inset: -20% -10% auto auto;
  width: 140%; height: 80%;
  background: radial-gradient(ellipse 60% 40% at 80% 20%, rgba(255,90,31,0.22), transparent 60%);
  filter: blur(30px);
  pointer-events: none;
}
.mobile-menu.open { display: flex; opacity: 1; }
body.menu-open { overflow: hidden; touch-action: none; }

.mobile-menu .mm-top {
  display: flex; justify-content: space-between; align-items: center;
  height: 60px; position: relative; z-index: 2;
}
.mobile-menu .mm-top .brand {
  font-weight: 700; font-size: 16px; letter-spacing: -0.02em;
  display: inline-flex; align-items: center; gap: 5px;
  color: #fff; text-decoration: none;
}
.mobile-menu .mm-top .brand .dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--accent); display: inline-block;
  box-shadow: 0 0 0 3px rgba(255,90,31,0.24);
}
.mobile-menu .mm-close {
  background: transparent; border: 1px solid rgba(255,255,255,0.12);
  width: 40px; height: 40px; border-radius: 10px;
  color: #fff; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  transition: border-color 200ms, background 200ms;
}
.mobile-menu .mm-close:hover { border-color: rgba(255,255,255,0.4); background: rgba(255,255,255,0.05); }
.mobile-menu .mm-close svg { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 1.7; stroke-linecap: round; }

.mobile-menu nav {
  position: relative; z-index: 2;
  margin-top: 24px;
  display: flex; flex-direction: column; gap: 2px;
  flex: 1;
}
.mobile-menu nav a {
  color: #fff;
  font-size: clamp(28px, 6.2vw, 40px);
  font-weight: 500; letter-spacing: -0.025em;
  text-decoration: none;
  padding: 14px 0;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  display: flex; justify-content: space-between; align-items: center;
  transition: color 200ms, padding 200ms, border-color 200ms;
  min-height: 56px;
}
.mobile-menu nav a::after {
  content: '↗';
  color: rgba(255,255,255,0.3);
  font-size: 0.6em;
  transition: color 200ms, transform 200ms var(--ease-spring);
}
.mobile-menu nav a:hover, .mobile-menu nav a:active {
  color: var(--accent-2);
}
.mobile-menu nav a:hover::after, .mobile-menu nav a:active::after {
  color: var(--accent-2);
  transform: translate(3px, -3px);
}
.mobile-menu nav a[aria-current="page"] { color: var(--accent-2); }
.mobile-menu nav a[aria-current="page"]::after { content: '●'; color: var(--accent); font-size: 0.35em; transform: none; }

.mobile-menu .mm-foot {
  position: relative; z-index: 2;
  margin-top: 24px;
  display: flex; flex-direction: column; gap: 16px;
}
.mobile-menu .mm-foot .btn {
  width: 100%; justify-content: center;
  padding: 16px 20px;
  font-size: 15px;
  border-radius: 12px;
  min-height: 52px;
}
.mobile-menu .mm-foot .mm-sub {
  display: flex; gap: 18px; color: var(--dark-ink-3); font-size: 13px; padding-top: 4px;
}
.mobile-menu .mm-foot .mm-sub a { color: inherit; text-decoration: none; }
.mobile-menu .mm-foot .mm-sub a:hover { color: #fff; }

/* Entrance animation for menu links */
.mobile-menu.open nav a {
  opacity: 0; transform: translateY(12px);
  animation: menuIn 500ms var(--ease-out-expo) forwards;
}
.mobile-menu.open nav a:nth-child(1) { animation-delay: 60ms; }
.mobile-menu.open nav a:nth-child(2) { animation-delay: 110ms; }
.mobile-menu.open nav a:nth-child(3) { animation-delay: 160ms; }
.mobile-menu.open nav a:nth-child(4) { animation-delay: 210ms; }
.mobile-menu.open nav a:nth-child(5) { animation-delay: 260ms; }
.mobile-menu.open nav a:nth-child(6) { animation-delay: 310ms; }
.mobile-menu.open nav a:nth-child(7) { animation-delay: 360ms; }
.mobile-menu.open .mm-foot { opacity: 0; animation: menuIn 500ms var(--ease-out-expo) 420ms forwards; }
@keyframes menuIn {
  to { opacity: 1; transform: translateY(0); }
}
@media (prefers-reduced-motion: reduce) {
  .mobile-menu.open nav a,
  .mobile-menu.open .mm-foot { animation: none; opacity: 1; transform: none; }
}

/* ==========================================================================
   Mobile tap-target + polish pass (≤ 820 px)
   ========================================================================== */
@media (max-width: 820px) {
  /* Chip choices need 44px+ tap area */
  .chip-choice .lb { min-height: 40px; padding: 10px 16px; }

  /* IDE bar scales down */
  .ide-bar { padding: 10px 12px; gap: 8px; }
  .ide-bar .project { font-size: 10.5px; }
  .ide-bar .project .dot { margin: 0 2px; }
  .ide-bar .actions button { padding: 5px 10px; font-size: 11.5px; }

  /* Hero eyebrow chip shouldn't overflow */
  .hero-eyebrow { font-size: 11.5px !important; }

  /* Larger tap target on all buttons */
  .btn { min-height: 48px; }
  .btn.sm { min-height: 40px; }

  /* Nav brand slightly tighter */
  nav.top .brand { font-size: 15px; }

  /* More breathing room in mobile section padding */
  .feature { gap: 32px !important; }
  .panel { min-height: 280px; }

  /* Panel IDE body on narrow screens */
  .panel .panel-body { padding: 16px 18px; font-size: 12.5px; }

  /* Dark big-stats numbers scale down cleaner */
  .stat-big .n { font-size: clamp(44px, 12vw, 68px); }
}
@media (max-width: 520px) {
  /* Very-narrow polish */
  nav.top .inner { padding: 0 16px; height: 56px; }
  .hero-ctas { gap: 10px; }
  .hero-ctas .btn { font-size: 14px; padding: 13px 18px; }

  /* Form field padding */
  .wl-form { padding: 20px 18px !important; }
  .field input[type="text"], .field input[type="email"],
  .field select, .field textarea { font-size: 16px; padding: 12px 14px; min-height: 48px; }

  /* Panels slightly less dense */
  .ide-bar .project { display: none; }

  /* Section padding */
  section { padding: 56px 0; }

  /* Inline cta arrow spacing */
  .inline-cta { font-size: 14px; }
}

/* Tap highlight colour */
* { -webkit-tap-highlight-color: rgba(255,90,31,0.15); }

/* Better active-state feedback for touch */
@media (hover: none) {
  .card:hover, .post:hover, .ind-card:hover,
  .mission:hover, .tier:hover, .pub:hover,
  .story:hover, .scale-card:hover { transform: none; }
  .card:active, .post:active, .ind-card:active { transform: scale(0.99); }
}
