/*
 * "Web Development" service page — creative layer on top of the core
 * theme, deliberately matching the same visual language as
 * assets/css/about-page.css and assets/css/services-page.css (glow orbs,
 * running ribbon, card hover-lift, glow CTA button, GSAP scroll reveals)
 * but under its own .webdev-page scope with its own class names, so this
 * page can be edited independently without any risk to other pages.
 *
 * IMPORTANT: this theme ships a pre-compiled, purged Tailwind build
 * (assets/css/tailwind.css) rather than a live JIT build — only the exact
 * utility classes already used elsewhere in the theme exist in that file.
 * Any new class combination silently does nothing. So layout that isn't
 * already proven safe elsewhere in the theme is written here as real,
 * hand-authored CSS instead of guessed-at Tailwind classes.
 */

.webdev-page {
  overflow-x: clip;
}

.webdev-section-head {
  max-width: 40rem;
  margin-bottom: 2.5rem;
}

/* ---------------------------------------------------------------------
   Hero
   ------------------------------------------------------------------- */

.webdev-hero {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(60% 90% at 15% 0%, hsl(var(--accent) / 0.14), transparent 60%),
    radial-gradient(50% 70% at 100% 30%, hsl(var(--accent) / 0.10), transparent 60%);
}

.webdev-hero-inner {
  position: relative;
  padding-top: 3.5rem;
  padding-bottom: 4rem;
}
@media (min-width: 768px) {
  .webdev-hero-inner { padding-top: 4.5rem; padding-bottom: 5.5rem; }
}

.webdev-glow-orb {
  position: absolute;
  border-radius: 999px;
  filter: blur(70px);
  background: radial-gradient(circle, hsl(var(--accent) / 0.35), transparent 70%);
  pointer-events: none;
  will-change: transform;
  z-index: 0;
}
.webdev-glow-orb--1 { width: 420px; height: 420px; top: -140px; left: -100px; }
.webdev-glow-orb--2 { width: 380px; height: 380px; bottom: -160px; right: -80px; }
.webdev-glow-orb--3 { width: 260px; height: 260px; top: 30%; right: 18%; opacity: 0.6; }

/* Hero code-frame illustration — a purely decorative, self-contained
   "editor window" built from CSS + the animated typing caret in JS.
   No screenshots/images so the hero stays fast and never goes stale. */
.webdev-hero-frame {
  position: relative;
  z-index: 1;
  border: 1px solid hsl(var(--border));
  border-radius: 0.75rem;
  background: hsl(var(--card));
  box-shadow: 0 30px 60px -20px hsl(0 0% 0% / 0.25);
  overflow: hidden;
}
.webdev-hero-frame-bar {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.7rem 0.9rem;
  border-bottom: 1px solid hsl(var(--border));
  background: hsl(var(--secondary));
}
.webdev-hero-frame-dot {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: hsl(var(--muted-foreground) / 0.35);
}
.webdev-hero-frame-dot:nth-child(1) { background: #ef4444; }
.webdev-hero-frame-dot:nth-child(2) { background: #eab308; }
.webdev-hero-frame-dot:nth-child(3) { background: #22c55e; }
.webdev-hero-frame-label {
  margin-left: 0.5rem;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.68rem;
  color: hsl(var(--muted-foreground));
}
.webdev-hero-frame-body {
  padding: 1.25rem 1.4rem 1.5rem;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.78rem;
  line-height: 1.9;
}
.webdev-code-line { white-space: pre; color: hsl(var(--muted-foreground)); }
.webdev-code-indent { padding-left: 1.4rem; display: block; }
.webdev-code-tag { color: hsl(var(--accent)); }
.webdev-code-string { color: hsl(150 45% 45%); }
.dark .webdev-code-string { color: hsl(150 55% 62%); }
.webdev-code-caret {
  display: inline-block;
  width: 7px;
  height: 1.1em;
  background: hsl(var(--accent));
  vertical-align: text-bottom;
  margin-left: 2px;
  animation: webdev-caret-blink 1s step-end infinite;
}
@keyframes webdev-caret-blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

.webdev-hero-content {
  position: relative;
  z-index: 1;
}

.webdev-hero-badge {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.webdev-hero-title {
  max-width: 30rem;
}
.webdev-hero-sub {
  max-width: 34rem;
  font-size: 1.0625rem;
}
@media (min-width: 768px) {
  .webdev-hero-sub { font-size: 1.1875rem; }
}

/* ---------------------------------------------------------------------
   Running ribbon banner — same infinite-scroll marquee technique used
   across the site, here carrying the technology stack instead of a
   list of services.
   ------------------------------------------------------------------- */

.webdev-ribbon-banner {
  position: relative;
  overflow: hidden;
  background: linear-gradient(90deg, hsl(var(--accent)), hsl(var(--accent) / 0.82) 50%, hsl(var(--accent)));
  box-shadow: 0 0 30px hsl(var(--accent) / 0.35), inset 0 0 40px hsl(0 0% 0% / 0.08);
}
.webdev-ribbon-viewport {
  mask-image: linear-gradient(to right, transparent 0, black 40px, black calc(100% - 40px), transparent 100%);
  -webkit-mask-image: linear-gradient(to right, transparent 0, black 40px, black calc(100% - 40px), transparent 100%);
  padding: 0.85rem 0;
}
.webdev-ribbon-track {
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
  width: max-content;
  animation: webdev-ribbon-scroll 30s linear infinite;
}
.webdev-ribbon-viewport:hover .webdev-ribbon-track { animation-play-state: paused; }
.webdev-ribbon-item {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: hsl(var(--accent-foreground));
  padding: 0 1.5rem;
}
.webdev-ribbon-sep {
  color: hsl(var(--accent-foreground) / 0.6);
  font-size: 0.9rem;
}
@keyframes webdev-ribbon-scroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* ---------------------------------------------------------------------
   Reveal primitives (GSAP toggles these via a tween — the CSS just
   supplies the resting/starting state so content is never invisible
   if JS fails to load).
   ------------------------------------------------------------------- */

.webdev-reveal {
  opacity: 1;
}
.js-gsap-ready .webdev-reveal {
  opacity: 0;
  transform: translateY(28px);
}

/* ---------------------------------------------------------------------
   Stat strip
   ------------------------------------------------------------------- */

.webdev-stat-card {
  position: relative;
  overflow: hidden;
}
.webdev-stat-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, hsl(var(--accent) / 0.10), transparent 55%);
  opacity: 0;
  transition: opacity 0.3s ease;
}
.webdev-stat-card:hover::before { opacity: 1; }
.webdev-stat-number {
  font-family: 'Playfair Display', serif;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

/* ---------------------------------------------------------------------
   Generic card treatment — reused for stack cards, process cards,
   region cards and FAQ items.
   ------------------------------------------------------------------- */

.webdev-icon-badge {
  position: relative;
  isolation: isolate;
}
.webdev-icon-badge::after {
  content: '';
  position: absolute;
  inset: -8px;
  border-radius: 999px;
  background: radial-gradient(circle, hsl(var(--accent) / 0.35), transparent 70%);
  opacity: 0;
  transition: opacity 0.35s ease;
  z-index: -1;
}
.webdev-card:hover .webdev-icon-badge::after { opacity: 1; }

.webdev-card {
  position: relative;
  transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}
.webdev-card:hover {
  transform: translateY(-4px);
  border-color: hsl(var(--accent) / 0.45);
  box-shadow: 0 10px 30px -12px hsl(var(--accent) / 0.35);
}

/* ---------------------------------------------------------------------
   Tech stack grid — grouped category cards, each holding a row of
   pill-style skill tags.
   ------------------------------------------------------------------- */

.webdev-stack-tag {
  display: inline-flex;
  align-items: center;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: hsl(var(--foreground));
  background: hsl(var(--secondary));
  border: 1px solid hsl(var(--border));
  border-radius: 999px;
  padding: 0.3rem 0.75rem;
  transition: border-color 0.25s ease, color 0.25s ease, background-color 0.25s ease;
}
.webdev-card:hover .webdev-stack-tag {
  border-color: hsl(var(--accent) / 0.4);
}
.webdev-stack-tag:hover {
  color: hsl(var(--accent));
  background: hsl(var(--accent) / 0.1);
  border-color: hsl(var(--accent) / 0.5);
}

/* ---------------------------------------------------------------------
   Process timeline — single reliable column with a hand-drawn ribbon
   line that "writes itself on" as the section scrolls, same technique
   as the About page's journey timeline. Each milestone also carries a
   typical-duration chip.
   ------------------------------------------------------------------- */

.webdev-timeline-track {
  position: relative;
  padding-left: 3.25rem;
}
.webdev-timeline-line {
  position: absolute;
  left: 21px;
  top: 4px;
  bottom: 4px;
  width: 3px;
}
.webdev-timeline-line svg {
  width: 100%;
  height: 100%;
  overflow: visible;
}
.webdev-timeline-line path {
  fill: none;
  stroke: url(#webdev-ribbon-gradient);
  stroke-width: 3;
  stroke-linecap: round;
  filter: drop-shadow(0 0 5px hsl(var(--accent) / 0.6));
}

.webdev-milestone {
  position: relative;
}
.webdev-milestone-dot {
  position: absolute;
  left: -39px;
  top: 6px;
  width: 14px;
  height: 14px;
  border-radius: 999px;
  background: hsl(var(--accent));
  box-shadow: 0 0 0 4px hsl(var(--background)), 0 0 16px 2px hsl(var(--accent) / 0.7);
}
.webdev-milestone-dot::after {
  content: '';
  position: absolute;
  inset: -6px;
  border-radius: 999px;
  border: 1px solid hsl(var(--accent) / 0.5);
  animation: webdev-pulse-ring 2.4s ease-out infinite;
}
@keyframes webdev-pulse-ring {
  0%   { transform: scale(0.6); opacity: 0.9; }
  100% { transform: scale(1.9); opacity: 0; }
}

.webdev-duration-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: hsl(var(--accent));
  background: hsl(var(--accent) / 0.1);
  border: 1px solid hsl(var(--accent) / 0.3);
  border-radius: 999px;
  padding: 0.2rem 0.65rem;
}

/* ---------------------------------------------------------------------
   Regions we serve — simple priority-ordered cards (UK primary,
   Europe secondary, remote-friendly tertiary).
   ------------------------------------------------------------------- */

.webdev-region-card {
  position: relative;
}
.webdev-region-rank {
  position: absolute;
  top: 1.25rem;
  right: 1.25rem;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: hsl(var(--accent));
  background: hsl(var(--accent) / 0.1);
  border: 1px solid hsl(var(--accent) / 0.3);
  border-radius: 999px;
  padding: 0.2rem 0.6rem;
}

/* ---------------------------------------------------------------------
   Pricing teaser banner — deliberately lightweight (the full pricing
   table lives on its own page); this is a bridge, not a duplicate.
   ------------------------------------------------------------------- */

.webdev-pricing-teaser {
  position: relative;
  overflow: hidden;
  border-radius: 0.75rem;
}
.webdev-pricing-teaser-glow {
  position: absolute;
  inset: -30%;
  background: radial-gradient(circle at 30% 30%, hsl(var(--accent) / 0.16), transparent 60%);
  pointer-events: none;
}

/* ---------------------------------------------------------------------
   FAQ accordion — plain <details>/<summary> so it works with zero JS
   and zero layout shift; the chevron rotate is the only motion, and
   it's pure CSS.
   ------------------------------------------------------------------- */

.webdev-faq-item {
  border: 1px solid hsl(var(--border));
  border-radius: 0.5rem;
  background: hsl(var(--card));
  transition: border-color 0.25s ease;
}
.webdev-faq-item[open] { border-color: hsl(var(--accent) / 0.4); }
.webdev-faq-item summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.1rem 1.25rem;
  font-weight: 600;
  font-size: 0.9rem;
}
.webdev-faq-item summary::-webkit-details-marker { display: none; }
.webdev-faq-chevron {
  flex-shrink: 0;
  transition: transform 0.25s ease;
  color: hsl(var(--muted-foreground));
}
.webdev-faq-item[open] .webdev-faq-chevron {
  transform: rotate(180deg);
  color: hsl(var(--accent));
}
.webdev-faq-answer {
  padding: 0 1.25rem 1.25rem;
  font-size: 0.875rem;
  color: hsl(var(--muted-foreground));
  line-height: 1.7;
}

/* ---------------------------------------------------------------------
   CTA banner — same neon-lit button + rotating gradient backdrop used
   across the site, explicitly z-index layered so the moving background
   never drifts on top of the text.
   ------------------------------------------------------------------- */

.webdev-cta {
  position: relative;
  overflow: hidden;
  background: hsl(var(--foreground) / 0.02);
  padding: 4rem 0;
}
@media (min-width: 768px) {
  .webdev-cta { padding: 6rem 0; }
}
.dark .webdev-cta { background: hsl(0 0% 8%); }

.webdev-cta-ribbon-bg {
  position: absolute;
  inset: -20%;
  z-index: 0;
  background: conic-gradient(from 0deg, hsl(var(--accent) / 0.16), transparent 30%, hsl(var(--accent) / 0.10) 60%, transparent 85%);
  animation: webdev-rotate 22s linear infinite;
  pointer-events: none;
}
@keyframes webdev-rotate {
  to { transform: rotate(360deg); }
}

.webdev-cta-content {
  position: relative;
  z-index: 1;
}

.webdev-glow-btn {
  position: relative;
  box-shadow: 0 0 0 0 hsl(var(--accent) / 0.6);
  transition: box-shadow 0.35s ease, transform 0.25s ease;
}
.webdev-glow-btn:hover {
  box-shadow: 0 0 22px 4px hsl(var(--accent) / 0.55), 0 0 60px 10px hsl(var(--accent) / 0.25);
  transform: translateY(-2px);
}

/* ---------------------------------------------------------------------
   Decorative kite — drifts around the page on a taut thread. Deliberately
   z-index: -1 (see markup comment in the template) so it always paints
   behind real content and only reads as background flavour. Positioned
   and animated in JS (assets/js/web-development-page.js); this block only
   supplies static appearance, the tail flutter, and the reduced-motion
   escape hatch.
   ------------------------------------------------------------------- */

.webdev-kite-layer {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
}

.webdev-kite-anchor {
  position: fixed;
  left: 8%;
  bottom: -12px;
  width: 1px;
  height: 1px;
}

.webdev-kite-thread {
  position: fixed;
  top: 0;
  left: 0;
  width: 0;
  height: 1px;
  background: hsl(var(--foreground) / 0.22);
  transform-origin: 0 0;
  will-change: transform, width;
}
.dark .webdev-kite-thread {
  background: hsl(var(--foreground) / 0.16);
}

.webdev-kite {
  position: fixed;
  top: 0;
  left: 0;
  overflow: visible;
  filter: drop-shadow(0 6px 14px hsl(0 0% 0% / 0.18));
  will-change: transform;
}
@media (min-width: 768px) {
  .webdev-kite { width: 80px; height: 170px; }
}

.webdev-kite-spar {
  stroke: hsl(var(--foreground) / 0.35);
  stroke-width: 1;
}
.webdev-kite-panel--a { fill: hsl(var(--accent)); }
.webdev-kite-panel--b { fill: hsl(var(--accent) / 0.55); }
.webdev-kite-outline {
  fill: none;
  stroke: hsl(var(--foreground) / 0.4);
  stroke-width: 1.5;
  stroke-linejoin: round;
}
.webdev-kite-hub {
  fill: hsl(var(--card));
  stroke: hsl(var(--foreground) / 0.4);
  stroke-width: 1;
}
.webdev-kite-attach {
  opacity: 0;
}
.webdev-kite-tail-line {
  fill: none;
  stroke: hsl(var(--foreground) / 0.35);
  stroke-width: 1.25;
}
.webdev-kite-bow--a { fill: hsl(var(--accent)); }
.webdev-kite-bow--b { fill: hsl(var(--accent) / 0.6); }

/* Tail flutters on its own, independent of the GSAP-driven flight path
   on the parent <svg> — cheap CSS keyframe, no JS cost per frame. */
.webdev-kite-tail {
  transform-origin: 40px 96px;
  animation: webdev-kite-flutter 2.6s ease-in-out infinite;
}
@keyframes webdev-kite-flutter {
  0%, 100% { transform: rotate(-4deg); }
  50%      { transform: rotate(5deg); }
}

@media (max-width: 767px) {
  .webdev-kite { width: 48px; height: 102px; }
}

@media (prefers-reduced-motion: reduce) {
  .webdev-kite-layer { display: none; }
}

/* ---------------------------------------------------------------------
   Reduced motion — keep the theme's site-wide contract: everything
   still looks complete, it just doesn't move.
   ------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  .webdev-glow-orb,
  .webdev-cta-ribbon-bg,
  .webdev-milestone-dot::after,
  .webdev-ribbon-track,
  .webdev-code-caret {
    animation: none !important;
  }
  .webdev-ribbon-viewport { overflow-x: auto; }
  .js-gsap-ready .webdev-reveal {
    opacity: 1 !important;
    transform: none !important;
  }
}
