/* ── WEB DEVELOPMENT PAGE — mixed light/dark theme ── */

/* ── HERO — dark ── */
.wd-hero {
  position: relative;
  min-height: calc(86vh - 80px);
  display: flex;
  align-items: center;
  background: #080e1a;
  overflow: hidden;
}

.wd-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    rgba(8, 14, 26, 0.88) 0%,
    rgba(8, 14, 26, 0.52) 55%,
    rgba(8, 14, 26, 0.18) 100%
  );
  z-index: 1;
  pointer-events: none;
}

#wd-hero-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
}

.wd-hero .container {
  position: relative;
  z-index: 2;
}

.wd-hero .hero-eyebrow {
  font-family: 'Courier New', monospace;
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #319dcf;
  margin-bottom: 20px;
  opacity: 0.85;
  display: block;
}

.wd-hero h1 {
  font-family: 'Lato', sans-serif;
  font-size: clamp(2.6rem, 5.5vw, 4.4rem);
  font-weight: 900;
  line-height: 1.08;
  letter-spacing: -0.025em;
  color: #e8f4fb;
  margin-bottom: 28px;
  text-wrap: balance;
  max-width: 16em;
}

.wd-hero .hero-sub {
  font-size: clamp(1rem, 1.8vw, 1.14rem);
  line-height: 1.68;
  color: rgba(200, 225, 240, 0.70);
  max-width: 56ch;
  margin-bottom: 40px;
}

.wd-hero .hero-btns {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

/* ── PLATFORMS — white, editorial numbered rows ── */
.wd-builds {
  background: #ffffff;
  padding: 72px 0;
}

.wd-builds .section-title h2 {
  color: #173f64;
  font-size: clamp(2.4rem, 4vw, 3.4rem);
  letter-spacing: -0.025em;
}

.wd-builds .section-title p {
  color: #64748b;
}

.wd-platform-rows {
  margin-top: 40px;
}

.wd-platform-item {
  display: grid;
  grid-template-columns: 88px 1fr 200px;
  gap: 36px;
  align-items: center;
  padding: 40px 0;
  border-bottom: 1px solid #e8eef5;
  position: relative;
  will-change: transform;
  transform-style: flat;
  transition: background 0.28s ease;
  cursor: default;
}

.wd-platform-item:first-child {
  border-top: 1px solid #e8eef5;
}

.wd-platform-item:hover {
  background: rgba(49, 157, 207, 0.025);
}

.wd-platform-num {
  font-family: 'Lato', sans-serif;
  font-size: clamp(2.4rem, 4vw, 3.2rem);
  font-weight: 900;
  color: rgba(49, 157, 207, 0.18);
  line-height: 1;
  letter-spacing: -0.04em;
  padding-top: 6px;
  user-select: none;
  transition: color 0.4s ease;
}

.wd-platform-item:hover .wd-platform-num {
  color: rgba(49, 157, 207, 0.35);
}

.wd-platform-icon {
  width: 60px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(49, 157, 207, 0.07);
  border: 1px solid rgba(49, 157, 207, 0.14);
  border-radius: 14px;
  color: rgba(49, 157, 207, 0.60);
  flex-shrink: 0;
  transition: background 0.28s, border-color 0.28s, color 0.28s, transform 0.28s;
}

.wd-platform-icon svg {
  width: 28px;
  height: 28px;
}

.wd-platform-item:hover .wd-platform-icon {
  background: rgba(49, 157, 207, 0.13);
  border-color: rgba(49, 157, 207, 0.32);
  color: #319dcf;
  transform: scale(1.06);
}

.wd-platform-tag {
  display: block;
  font-size: 0.70rem;
  font-weight: 600;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: #319dcf;
  margin-bottom: 10px;
}

.wd-platform-content h3 {
  font-family: 'Lato', sans-serif;
  font-size: clamp(1.15rem, 2vw, 1.5rem);
  font-weight: 800;
  color: #173f64;
  margin-bottom: 12px;
  line-height: 1.22;
  letter-spacing: -0.01em;
}

.wd-platform-content p {
  font-size: 0.96rem;
  line-height: 1.70;
  color: #64748b;
  max-width: 58ch;
}

/* ── GALLERY — dark, featured layout ── */
.wd-gallery {
  background: #0c1a30;
  padding: 72px 0 84px;
  position: relative;
}

.wd-gallery .section-title h2 {
  color: #e8f4fb;
  font-size: clamp(2.4rem, 4vw, 3.4rem);
  letter-spacing: -0.025em;
}

.wd-gallery .section-title p {
  color: rgba(200, 225, 240, 0.60);
}

/* Featured + secondary two-column layout */
.wd-gallery-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 20px;
  margin-top: 40px;
  align-items: start;
}

.wd-gallery-secondary {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

/* wide item (5th) spans both secondary columns */
.wd-screen--wide {
  grid-column: 1 / -1;
}

.wd-screen {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  background: #040b18;
  border: 1px solid rgba(255, 255, 255, 0.055);
  margin: 0;
  transition: border-color 0.4s ease, box-shadow 0.4s ease;
}

.wd-screen:hover {
  border-color: rgba(49, 157, 207, 0.28);
  box-shadow:
    0 0 0 1px rgba(49, 157, 207, 0.08),
    0 0 32px rgba(49, 157, 207, 0.10),
    0 20px 52px rgba(0, 0, 0, 0.45);
}

/* Featured image fills column height */
.wd-screen--featured {
  display: flex;
  flex-direction: column;
}

.wd-screen--featured img {
  flex: 1;
  width: 100%;
  min-height: 420px;
  object-fit: cover;
  object-position: top;
  display: block;
  transition: transform 0.70s cubic-bezier(0.22, 1, 0.36, 1);
}

.wd-screen--featured:hover img {
  transform: scale(1.04);
}

/* Secondary images — shorter */
.wd-gallery-secondary .wd-screen img {
  width: 100%;
  height: 185px;
  object-fit: cover;
  object-position: top;
  display: block;
  transition: transform 0.60s cubic-bezier(0.22, 1, 0.36, 1);
}

.wd-gallery-secondary .wd-screen:hover img {
  transform: scale(1.06);
}

/* Wide secondary image slightly taller */
.wd-screen--wide img {
  height: 195px !important;
}

.wd-screen-cap {
  padding: 12px 16px 14px;
  background: rgba(4, 11, 24, 0.90);
  border-top: 1px solid rgba(49, 157, 207, 0.07);
}

.wd-screen-type {
  font-family: 'Courier New', monospace;
  font-size: 0.70rem;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: #ffffff;
  font-weight: 700;
}

/* ── CODE EDITOR SECTION — dark ── */
.wd-process {
  background: #080e1a;
  padding: 72px 0;
  border-top: 1px solid rgba(49, 157, 207, 0.08);
}

.wd-process-inner {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 72px;
  align-items: center;
}

/* macOS-style code editor */
.wd-process-editor {
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: #0d1b2e;
  box-shadow:
    0 0 0 1px rgba(49, 157, 207, 0.06),
    0 32px 80px rgba(0, 0, 0, 0.55);
}

.wd-editor-bar {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 18px;
  background: #091525;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.wd-editor-dots {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}

.wd-editor-dots span {
  width: 11px;
  height: 11px;
  border-radius: 50%;
}

.wd-editor-dots span:nth-child(1) { background: #ff5f57; }
.wd-editor-dots span:nth-child(2) { background: #febc2e; }
.wd-editor-dots span:nth-child(3) { background: #28c840; }

.wd-editor-filename {
  font-family: 'Courier New', monospace;
  font-size: 0.73rem;
  color: rgba(200, 225, 240, 0.38);
  letter-spacing: 0.02em;
}

.wd-editor-body {
  padding: 22px 24px 28px;
  font-family: 'Courier New', monospace;
  font-size: 0.82rem;
  line-height: 1.90;
}

.wd-code-line {
  display: block;
  white-space: pre;
}

.wd-i1 { padding-left: 1.5em; }
.wd-i2 { padding-left: 3.0em; }
.wd-i3 { padding-left: 4.5em; }

.wd-tok-tag     { color: #5cc8f5; }
.wd-tok-attr    { color: #a5d6f7; }
.wd-tok-val     { color: #7ecba0; }
.wd-tok-comment { color: rgba(200, 225, 240, 0.26); font-style: italic; }

/* Process text — right column */
.wd-process-text h2 {
  font-family: 'Lato', sans-serif;
  font-size: clamp(2.0rem, 3.4vw, 2.9rem);
  font-weight: 900;
  color: #e8f4fb;
  line-height: 1.10;
  letter-spacing: -0.022em;
  margin-bottom: 20px;
  text-wrap: balance;
}

.wd-process-text p {
  font-size: 1rem;
  line-height: 1.72;
  color: rgba(200, 225, 240, 0.62);
  margin-bottom: 28px;
  max-width: 44ch;
}

.wd-process-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.wd-process-list li {
  font-size: 0.94rem;
  line-height: 1.55;
  color: rgba(200, 225, 240, 0.58);
  padding-left: 20px;
  position: relative;
}

.wd-process-list li::before {
  content: '›';
  position: absolute;
  left: 0;
  color: #319dcf;
  font-weight: 700;
}

/* ── DELIVERY PRINCIPLES — light (#f8fafc) ── */
.wd-delivery {
  background: #f8fafc;
  padding: 104px 0 80px;
}

.wd-delivery-inner {
  display: grid;
  grid-template-columns: 1fr 1.6fr;
  gap: 80px;
  align-items: center;
}

.wd-delivery-intro h2 {
  font-family: 'Lato', sans-serif;
  font-size: clamp(2.2rem, 3.6vw, 3.0rem);
  font-weight: 900;
  color: #173f64;
  line-height: 1.12;
  letter-spacing: -0.022em;
  margin-bottom: 20px;
  text-wrap: balance;
}

.wd-delivery-intro p {
  font-size: 1rem;
  line-height: 1.70;
  color: #64748b;
  max-width: 38ch;
}

.wd-delivery-principles {
  display: flex;
  flex-direction: column;
}

.wd-principle {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 28px;
  align-items: start;
  padding: 32px 0;
  border-bottom: 1px solid #e8eef5;
}

.wd-principle:first-child {
  border-top: 1px solid #e8eef5;
}

.wd-principle-num {
  font-family: 'Lato', sans-serif;
  font-size: clamp(2.0rem, 3.5vw, 2.8rem);
  font-weight: 900;
  color: rgba(49, 157, 207, 0.16);
  line-height: 1;
  letter-spacing: -0.03em;
  padding-top: 4px;
  transition: color 0.5s ease;
  user-select: none;
}

.wd-principle.is-visible .wd-principle-num {
  color: rgba(49, 157, 207, 0.40);
}

.wd-principle-body h3 {
  font-family: 'Lato', sans-serif;
  font-size: clamp(1.0rem, 1.5vw, 1.14rem);
  font-weight: 700;
  color: #173f64;
  margin-bottom: 10px;
  line-height: 1.25;
}

.wd-principle-body p {
  font-size: 0.94rem;
  line-height: 1.68;
  color: #64748b;
}

/* ── CTA — dark ── */
.wd-cta {
  background: #050d18;
  padding: 96px 0;
  position: relative;
  overflow: hidden;
  text-align: center;
}

.wd-cta-glow {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 680px;
  height: 680px;
  background: radial-gradient(ellipse, rgba(49, 157, 207, 0.08) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
  animation: wd-glow-pulse 5.5s ease-in-out infinite;
}

@keyframes wd-glow-pulse {
  0%, 100% { opacity: 0.65; transform: translate(-50%, -50%) scale(1.00); }
  50%       { opacity: 1.00; transform: translate(-50%, -50%) scale(1.10); }
}

.wd-cta .container {
  position: relative;
  z-index: 1;
}

.wd-cta .cta-inner {
  max-width: 640px;
  margin: 0 auto;
}

.wd-status-line {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: 'Courier New', monospace;
  font-size: 0.73rem;
  letter-spacing: 0.06em;
  color: rgba(49, 157, 207, 0.65);
  margin-bottom: 32px;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.65s ease, transform 0.65s ease;
}

.wd-status-line.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.wd-status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #319dcf;
  flex-shrink: 0;
  animation: wd-status-blink 1.8s ease-in-out infinite;
}

@keyframes wd-status-blink {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.22; }
}

.wd-cta h2 {
  font-family: 'Lato', sans-serif;
  font-size: clamp(2.0rem, 4vw, 3.0rem);
  font-weight: 900;
  color: #e8f4fb;
  line-height: 1.12;
  letter-spacing: -0.025em;
  margin-bottom: 18px;
  text-wrap: balance;
}

.wd-cta p {
  font-size: 1.05rem;
  line-height: 1.65;
  color: rgba(200, 225, 240, 0.62);
  margin-bottom: 42px;
}

.wd-cta .cta-buttons {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

/* ── Responsive ── */
@media (max-width: 1100px) {
  .wd-gallery-grid {
    grid-template-columns: 1.25fr 1fr;
  }

  .wd-process-inner {
    gap: 48px;
  }
}

@media (max-width: 1024px) {
  .wd-platform-item {
    grid-template-columns: 72px 1fr;
    gap: 28px;
  }

  .wd-delivery-inner {
    gap: 52px;
  }
}

@media (max-width: 900px) {
  .wd-gallery-grid {
    grid-template-columns: 1fr;
  }

  .wd-screen--featured img {
    min-height: 280px;
    flex: none;
    height: 280px;
  }

  .wd-gallery-secondary {
    grid-template-columns: 1fr 1fr 1fr;
  }

  .wd-screen--wide {
    grid-column: auto;
  }

  .wd-gallery-secondary .wd-screen img {
    height: 140px;
  }

  .wd-process-inner {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .wd-process-text {
    order: 1;
  }

  .wd-process-editor {
    order: 2;
  }

  .wd-process-text p {
    max-width: 100%;
  }
}

@media (max-width: 860px) {
  .wd-delivery-inner {
    grid-template-columns: 1fr;
    gap: 36px;
  }

  .wd-delivery-intro p {
    max-width: 100%;
  }
}

@media (max-width: 640px) {
  .wd-hero {
    min-height: calc(90vh - 64px);
  }

  #wd-hero-canvas {
    opacity: 0.60;
  }

  .wd-platform-item {
    grid-template-columns: 52px 1fr;
    gap: 18px;
    padding: 28px 0;
  }

  .wd-gallery-secondary {
    grid-template-columns: 1fr 1fr;
  }

  .wd-screen--wide {
    grid-column: 1 / -1;
  }

  .wd-principle {
    grid-template-columns: 54px 1fr;
    gap: 16px;
  }

  .wd-cta-glow {
    width: 360px;
    height: 360px;
  }

  .wd-cta {
    padding: 88px 0;
  }

  .wd-editor-body {
    font-size: 0.74rem;
    padding: 16px 16px 20px;
  }
}

/* ── Cursor spotlight — radial glow follows mouse within hero ── */
.wd-hero-spot {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 2;
  background: radial-gradient(
    circle 700px at var(--spot-x, 50%) var(--spot-y, 60%),
    rgba(49, 157, 207, 0.07) 0%,
    transparent 68%
  );
}

/* ── Noise grain overlay ── */
.wd-hero-grain {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 3;
  opacity: 0.038;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='300' height='300' filter='url(%23n)' opacity='1'/%3E%3C/svg%3E");
  background-size: 300px 300px;
}

/* ── Hero container above canvas layers ── */
.wd-hero > .container {
  position: relative;
  z-index: 5;
}

/* ── Marquee keyword strip between builds + gallery ── */
.wd-marquee {
  overflow: hidden;
  padding: 18px 0;
  background: #0f1e33;
  border-top: 1px solid rgba(49, 157, 207, 0.06);
}

.wd-marquee-track {
  display: flex;
  width: max-content;
  animation: wd-marquee-run 30s linear infinite;
  align-items: center;
  gap: 0 30px;
}

.wd-marquee-track span {
  font-size: 0.67rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(49, 157, 207, 0.30);
  white-space: nowrap;
}

.wd-mdot {
  color: rgba(49, 157, 207, 0.14) !important;
}

@keyframes wd-marquee-run {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* ── Code editor typewriter caret ── */
.wd-editor-caret {
  display: inline-block;
  width: 1.5px;
  height: 0.95em;
  background: #319dcf;
  margin-left: 2px;
  vertical-align: text-bottom;
  opacity: 0;
}

.wd-editor-caret.is-blinking {
  opacity: 1;
  animation: wd-caret-blink 1s step-end infinite;
}

@keyframes wd-caret-blink {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .wd-marquee-track { animation: none; }
  .wd-editor-caret.is-blinking { animation: none; opacity: 1; }
}

@media (max-width: 480px) {
  .wd-platform-item,
  .wd-principle {
    padding: 22px 0;
  }
}

/* ══════════════════════════════════════════════════════════
   SCROLL PROGRESS BAR
   ══════════════════════════════════════════════════════════ */
.wd-progress-bar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 2.5px;
  background: linear-gradient(90deg, #319dcf 0%, #5cc8f5 50%, #319dcf 100%);
  transform-origin: left center;
  transform: scaleX(0);
  z-index: 10002;
  pointer-events: none;
}

/* ══════════════════════════════════════════════════════════
   HORIZONTAL PINNED GALLERY
   ══════════════════════════════════════════════════════════ */
.wd-gallery {
  overflow: hidden;
}

.wd-gallery .section-title {
  margin-bottom: 0;
}

.wd-h-track-wrap {
  margin-top: 40px;
  padding-left: 40px;
}

.wd-h-track {
  display: flex;
  gap: 20px;
  width: max-content;
  align-items: stretch;
  padding-right: 80px;
  will-change: transform;
}

/* Gallery card — macOS browser window */
.wd-h-card {
  width: 420px;
  flex-shrink: 0;
  border-radius: 12px;
  overflow: hidden;
  background: #040b18;
  border: 1px solid rgba(255, 255, 255, 0.07);
  display: flex;
  flex-direction: column;
  cursor: default;
  transition: border-color 0.4s ease, box-shadow 0.4s ease;
  will-change: transform;
}

.wd-h-card:hover {
  border-color: rgba(49, 157, 207, 0.38);
  box-shadow:
    0 0 0 1px rgba(49, 157, 207, 0.10),
    0 36px 88px rgba(0, 0, 0, 0.60);
}

/* macOS-style browser chrome */
.wd-browser-bar {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 16px;
  background: #0d1b30;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  flex-shrink: 0;
}

.wd-browser-dots {
  display: flex;
  gap: 5px;
  flex-shrink: 0;
}

.wd-browser-dots span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.wd-browser-dots span:nth-child(1) { background: #ff5f57; }
.wd-browser-dots span:nth-child(2) { background: #febc2e; }
.wd-browser-dots span:nth-child(3) { background: #28c840; }

.wd-browser-url {
  flex: 1;
  font-family: 'Courier New', monospace;
  font-size: 0.67rem;
  color: rgba(200, 225, 240, 0.24);
  background: rgba(255, 255, 255, 0.04);
  border-radius: 5px;
  padding: 3px 10px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  letter-spacing: 0.02em;
}

.wd-h-card-img {
  overflow: hidden;
  height: 268px;
  flex-shrink: 0;
}

.wd-h-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
  display: block;
  transition: transform 0.72s cubic-bezier(0.22, 1, 0.36, 1);
}

.wd-h-card:hover .wd-h-card-img img {
  transform: scale(1.06);
}

.wd-h-card-cap {
  padding: 12px 16px 14px;
  background: rgba(4, 11, 24, 0.92);
  border-top: 1px solid rgba(49, 157, 207, 0.07);
  flex-shrink: 0;
}

/* Mobile: native touch scroll, no GSAP pin */
@media (max-width: 768px) {
  .wd-h-track-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding-left: 20px;
    padding-bottom: 20px;
    scrollbar-width: none;
  }
  .wd-h-track-wrap::-webkit-scrollbar { display: none; }
  .wd-h-track { padding-right: 20px; }
  .wd-h-card  { width: 300px; transition: transform 0.15s ease, border-color 0.4s ease, box-shadow 0.4s ease; }
  .wd-h-card:active { transform: scale(0.97); }
  .wd-h-card-img { height: 196px; }
  .wd-progress-bar { height: 2px; }
}

/* ══════════════════════════════════════════════════════════
   PLATFORM META — 3rd column tech tags
   ══════════════════════════════════════════════════════════ */
.wd-platform-meta {
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: flex-end;
  justify-content: center;
  padding-left: 12px;
}

.wd-platform-meta span {
  font-size: 0.67rem;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: rgba(23, 63, 100, 0.45);
  background: rgba(49, 157, 207, 0.05);
  border: 1px solid rgba(49, 157, 207, 0.12);
  border-radius: 4px;
  padding: 3px 10px;
  white-space: nowrap;
  transition: color 0.28s, background 0.28s, border-color 0.28s;
}

.wd-platform-item:hover .wd-platform-meta span {
  color: #319dcf;
  background: rgba(49, 157, 207, 0.10);
  border-color: rgba(49, 157, 207, 0.26);
}

@media (max-width: 1024px) {
  .wd-platform-meta { display: none; }
}

/* ══════════════════════════════════════════════════════════
   GALLERY CAROUSEL — nav buttons + dots + Ken Burns
   ══════════════════════════════════════════════════════════ */
.wd-gallery-prev,
.wd-gallery-next {
  position: absolute;
  bottom: 32px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid rgba(92, 200, 245, 0.28);
  background: rgba(9, 18, 36, 0.82);
  color: #5cc8f5;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: background 0.22s, border-color 0.22s, opacity 0.22s, transform 0.18s;
  z-index: 10;
}

.wd-gallery-prev { right: 100px; }
.wd-gallery-next { right: 48px; }

.wd-gallery-prev svg,
.wd-gallery-next svg { width: 16px; height: 16px; pointer-events: none; }

.wd-gallery-prev:hover,
.wd-gallery-next:hover {
  background: rgba(49, 157, 207, 0.20);
  border-color: rgba(92, 200, 245, 0.55);
  transform: scale(1.08);
}

.wd-gallery-prev:disabled {
  opacity: 0.25;
  cursor: default;
  transform: none !important;
}

.wd-gallery-dots {
  position: absolute;
  bottom: 44px;
  left: 44px;
  display: flex;
  gap: 8px;
  align-items: center;
  z-index: 10;
}

.wd-gallery-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(92, 200, 245, 0.22);
  border: none;
  padding: 0;
  cursor: pointer;
  transition: width 0.38s cubic-bezier(0.22, 1, 0.36, 1),
              border-radius 0.38s,
              background 0.38s;
}

.wd-gallery-dot.is-active {
  width: 26px;
  border-radius: 3px;
  background: #5cc8f5;
}

/* Ken Burns: cards rest at scale(1.08), active card reveals at scale(1.0) */
.wd-h-card-img img {
  transform: scale(1.08);
}

.wd-h-card.is-current .wd-h-card-img img {
  transform: scale(1.0);
  transition-duration: 1.0s;
}

.wd-h-card:hover .wd-h-card-img img {
  transform: scale(1.04);
}

@media (max-width: 767px) {
  .wd-gallery-prev,
  .wd-gallery-next { display: none; }
}

/* ══════════════════════════════════════════════════════════
   PLATFORM CODE PREVIEW — hover typewriter
   ══════════════════════════════════════════════════════════ */
.wd-platform-code {
  background: #030b18;
  border: 1px solid rgba(49, 157, 207, 0.14);
  border-radius: 10px;
  overflow: hidden;
  opacity: 0;
  transform: translateX(10px) scale(0.97);
  transition: opacity 0.28s ease, transform 0.28s ease;
  pointer-events: none;
  align-self: center;
  min-width: 0;
}

.wd-platform-code.is-active {
  opacity: 1;
  transform: translateX(0) scale(1);
}

.wd-code-bar {
  display: flex;
  gap: 5px;
  padding: 8px 10px 6px;
  background: rgba(255, 255, 255, 0.03);
  border-bottom: 1px solid rgba(49, 157, 207, 0.09);
}

.wd-code-bar span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.wd-code-bar span:nth-child(1) { background: #ff5f57; }
.wd-code-bar span:nth-child(2) { background: #febc2e; }
.wd-code-bar span:nth-child(3) { background: #28c840; }

.wd-code-content {
  margin: 0;
  padding: 10px 12px 14px;
  white-space: pre;
  font-family: 'Courier New', 'Monaco', monospace;
  font-size: 0.70rem;
  line-height: 1.65;
  color: #7dd3fc;
  min-height: 90px;
  overflow: hidden;
}

.wd-code-content code { color: inherit; }

.wd-code-content code::after {
  content: '|';
  color: #319dcf;
  animation: wd-blink 0.75s step-end infinite;
  margin-left: 1px;
}

@keyframes wd-blink {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0; }
}

@media (max-width: 1024px) {
  /* Touch devices have no hover — code preview becomes a tap-to-reveal
     accordion row spanning the full item width instead of a side column. */
  .wd-platform-code {
    grid-column: 1 / -1;
    max-width: 100%;
    max-height: 0;
    opacity: 0;
    margin-top: 0;
    transform: none;
    transition: max-height 0.35s ease, opacity 0.3s ease, margin-top 0.3s ease;
  }

  .wd-platform-code.is-active {
    max-height: 260px;
    opacity: 1;
    margin-top: 16px;
  }
}

/* ══════════════════════════════════════════════════════════
   ANIMATED GRAIN OVERLAY
   ══════════════════════════════════════════════════════════ */
.wd-grain {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9998;
  opacity: 0.038;
  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='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 200px 200px;
  animation: wd-grain-shift 8s steps(10, end) infinite;
}

@keyframes wd-grain-shift {
  0%,100% { background-position:   0%    0%; }
  10%     { background-position:  -5%  -10%; }
  20%     { background-position: -15%    5%; }
  30%     { background-position:   7%  -25%; }
  40%     { background-position:  -5%   25%; }
  50%     { background-position: -15%   10%; }
  60%     { background-position:  15%   -5%; }
  70%     { background-position:   0%   15%; }
  80%     { background-position:   3%   35%; }
  90%     { background-position: -10%   10%; }
}

@media (prefers-reduced-motion: reduce) {
  .wd-grain { animation: none; }
}

/* ══════════════════════════════════════════════════════════
   RESPONSIVE AUDIT FIXES — 360px → 1920px premium coverage
   ══════════════════════════════════════════════════════════ */

/* ── 1. Code editor: overflow protection
        white-space:pre code lines must never escape the card ── */
.wd-editor-body {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.wd-editor-body::-webkit-scrollbar { display: none; }

/* ── 2. Gallery carousel / native-scroll boundary fix
        wd-horizontal.js exits at max-width:767px;
        CSS mobile scroll was at max-width:768px — 1px mismatch
        caused both to fire simultaneously at exactly 768px.
        Override: re-open overflow-x at 768px+ so carousel JS
        can control the track without fighting CSS scrollability. ── */
@media (min-width: 768px) {
  .wd-h-track-wrap {
    overflow-x: visible;
    padding-bottom: 0;
  }
}

/* ── 3. Tap target: buttons must reach 44px on coarse-pointer devices ── */
@media (pointer: coarse) {
  .btn { min-height: 44px; }
}

/* ── 4. 768px: Section padding resets
        web_development.css rules have equal or higher specificity vs
        shared.css and load after it, so shared.css's
        @media(max-width:768px) .section { padding: 64px 0 } is
        silently overridden. Restore mobile-appropriate padding here. ── */
@media (max-width: 768px) {
  /* Hero container: guarantee vertical breathing room */
  .wd-hero > .container {
    padding-top: 64px;
    padding-bottom: 64px;
  }

  /* Sections that need explicit mobile padding */
  .wd-builds   { padding: 60px 0; }
  .wd-gallery  { padding: 56px 0 64px; }
  .wd-process  { padding: 60px 0; }
  .wd-delivery { padding: 64px 0; }    /* was 104px top — way too much on mobile */
  .wd-cta      { padding: 72px 0; }    /* was 96px — reduce for mobile rhythm */

  /* Hero sub: match shared.css but override any inherited line-height tightness */
  .wd-hero .hero-sub {
    line-height: 1.62;
  }
}

/* ── 5. 640px: Platform icon size fix ──
        The grid column narrows to 52px at this breakpoint,
        but .wd-platform-icon is explicitly 60×60px — causing 8px overflow.
        Shrink icon to exactly match the column. ── */
@media (max-width: 640px) {
  .wd-platform-icon {
    width: 52px;
    height: 52px;
    /* border-radius already 14px — keep it */
  }
  .wd-platform-icon svg {
    width: 24px;
    height: 24px;
  }
}

/* ── 6. 430px: Small phone (iPhone Plus, large Android) ── */
@media (max-width: 430px) {
  /* Hero: tighter vertical to keep content centred on short viewports */
  .wd-hero > .container {
    padding-top: 48px;
    padding-bottom: 48px;
  }

  /* Platform rows: tighter icon column + gap */
  .wd-platform-item {
    grid-template-columns: 44px 1fr;
    gap: 14px;
  }
  .wd-platform-icon {
    width: 44px;
    height: 44px;
    border-radius: 10px;
  }
  .wd-platform-icon svg {
    width: 20px;
    height: 20px;
  }

  /* Delivery principles: tighter number column */
  .wd-principle {
    grid-template-columns: 44px 1fr;
    gap: 14px;
  }
  .wd-principle-num { font-size: 1.7rem; }

  /* Gallery cards: marginally narrower for visual breathing room */
  .wd-h-card     { width: 280px; }
  .wd-h-card-img { height: 180px; }

  /* Section heading scale: keep visual hierarchy at this width */
  .wd-builds .section-title h2,
  .wd-gallery .section-title h2 {
    font-size: clamp(2.0rem, 7vw, 2.4rem);
  }
}

/* ── 7. 390px: Standard small phone (iPhone 14 / 15 / Pixel 8 range) ── */
@media (max-width: 390px) {
  /* Hero h1: safety floor — clamp lower bound tightened */
  .wd-hero h1 {
    font-size: clamp(2.2rem, 7.5vw, 2.6rem);
  }

  /* Delivery intro */
  .wd-delivery-intro h2 {
    font-size: clamp(1.9rem, 6.5vw, 2.2rem);
  }

  /* CTA */
  .wd-cta h2 {
    font-size: clamp(1.8rem, 7vw, 2.0rem);
  }

  /* Body copy: keep above 0.9rem minimum */
  .wd-platform-content p,
  .wd-process-list li {
    font-size: 0.90rem;
  }
  .wd-process-text p {
    font-size: 0.93rem;
  }
}

/* ── 8. 360px: Absolute minimum viewport ── */
@media (max-width: 360px) {
  .wd-hero > .container {
    padding-top: 40px;
    padding-bottom: 40px;
  }

  /* Hard cap on hero headline — prevents any single word
     from overflowing a 320px content area */
  .wd-hero h1 {
    font-size: 2.1rem;
  }

  /* Tighten platform and principle gaps to preserve card padding */
  .wd-platform-item { gap: 12px; }
  .wd-principle     { gap: 12px; }

  /* Marquee: tiny bit smaller to relax letter-spacing render */
  .wd-marquee-track span { font-size: 0.62rem; }
}
