/* ============================================================
   GLASS BROTHERS — "Pain In The Glass"
   Cyberpunk neon · mobile-first · vanilla CSS
   ============================================================ */

:root {
  --bg: #080810;
  --bg-soft: #0d0d1a;
  --panel: #11111f;
  --ink: #e9f6ff;
  --ink-dim: #9fb3c8;

  --cyan: #00f0ff;
  --pink: #ff2bd6;
  --lime: #b6ff3a;

  --cyan-glow: rgba(0, 240, 255, 0.65);
  --pink-glow: rgba(255, 43, 214, 0.6);
  --lime-glow: rgba(182, 255, 58, 0.6);

  --border-soft: rgba(0, 240, 255, 0.18);
  --radius: 14px;

  --font-display: "Orbitron", system-ui, sans-serif;
  --font-body: "Rajdhani", system-ui, -apple-system, sans-serif;

  --maxw: 1080px;
}

/* ---------- RESET ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 18px;
  line-height: 1.6;
  letter-spacing: 0.01em;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--cyan); text-decoration: none; }
h1, h2, h3 { font-family: var(--font-display); line-height: 1.1; margin: 0; }
svg.svg-defs { position: absolute; width: 0; height: 0; }

/* ---------- ACCESSIBILITY ---------- */
.skip-link {
  position: absolute; left: 8px; top: -48px;
  background: var(--cyan); color: #00121a;
  padding: 10px 16px; border-radius: 8px; font-weight: 700;
  z-index: 9999; transition: top 0.2s ease;
}
.skip-link:focus { top: 8px; }

:focus-visible {
  outline: 3px solid var(--lime);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ---------- NEON HELPERS ---------- */
.neon-cyan { color: var(--cyan); }
.neon-pink { color: var(--pink); }
.neon-lime { color: var(--lime); }

.glow {
  text-shadow:
    0 0 4px currentColor,
    0 0 12px currentColor,
    0 0 28px var(--cyan-glow);
}
.neon-pink.glow,
.pull-quote .neon-pink.glow-sm { text-shadow: 0 0 4px currentColor, 0 0 12px currentColor, 0 0 26px var(--pink-glow); }
.glow-sm {
  text-shadow: 0 0 4px currentColor, 0 0 14px currentColor;
}

/* ---------- BACKGROUND TEXTURE ---------- */
.bg-grid {
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(0, 240, 255, 0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 240, 255, 0.07) 1px, transparent 1px);
  background-size: 46px 46px;
  /* fake perspective fade toward the top */
  transform: perspective(420px) rotateX(58deg) scale(2.2);
  transform-origin: top center;
  opacity: 0.5;
  -webkit-mask-image: linear-gradient(to bottom, #000 0%, transparent 55%);
          mask-image: linear-gradient(to bottom, #000 0%, transparent 55%);
}
.bg-scanlines {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: repeating-linear-gradient(
    to bottom,
    rgba(255, 255, 255, 0.025) 0px,
    rgba(255, 255, 255, 0.025) 1px,
    transparent 1px,
    transparent 3px
  );
  opacity: 0.5;
}

/* ---------- LAYOUT WRAPPER ---------- */
main { display: block; }
section {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 64px 20px;
}
.section-title {
  font-size: clamp(1.8rem, 6vw, 2.8rem);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 24px;
}

/* ---------- HEADER / NAV ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  background: rgba(8, 8, 16, 0.78);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-soft);
}
.wordmark {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(1.05rem, 4.4vw, 1.5rem);
  letter-spacing: 0.06em;
  display: inline-flex;
  gap: 0.4ch;
}
.wordmark-glass {
  color: var(--cyan);
  text-shadow: 0 0 6px var(--cyan-glow), 0 0 16px var(--cyan-glow);
  animation: flicker 7s infinite;
}
.wordmark-bros {
  color: var(--pink);
  text-shadow: 0 0 6px var(--pink-glow), 0 0 16px var(--pink-glow);
}
.site-nav { display: none; gap: 22px; align-items: center; }
.site-nav a {
  font-weight: 600; letter-spacing: 0.03em; color: var(--ink-dim);
  text-transform: uppercase; font-size: 0.9rem; transition: color 0.2s;
}
.site-nav a:hover { color: var(--cyan); }
.site-nav .nav-cta {
  color: var(--lime);
  border: 1px solid var(--lime);
  padding: 8px 14px; border-radius: 999px;
  box-shadow: 0 0 8px var(--lime-glow);
}
.site-nav .nav-cta:hover { color: var(--lime); box-shadow: 0 0 16px var(--lime-glow); }

@media (min-width: 760px) {
  .site-nav { display: flex; }
}

/* ---------- BUTTONS ---------- */
.btn {
  display: inline-block;
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  font-size: 1rem;
  padding: 16px 28px;
  border-radius: 999px;
  cursor: pointer;
  border: 2px solid var(--cyan);
  color: var(--cyan);
  background: transparent;
  box-shadow: 0 0 10px var(--cyan-glow), inset 0 0 10px rgba(0, 240, 255, 0.08);
  transition: box-shadow 0.2s ease, transform 0.1s ease, background 0.2s ease;
  min-height: 52px;
}
.btn:hover, .btn:focus-visible {
  box-shadow: 0 0 24px var(--cyan-glow), inset 0 0 18px rgba(0, 240, 255, 0.18);
  transform: translateY(-1px);
}
.btn:active { transform: translateY(1px); }
.btn-lime {
  border-color: var(--lime);
  color: var(--lime);
  box-shadow: 0 0 12px var(--lime-glow), inset 0 0 10px rgba(182, 255, 58, 0.08);
}
.btn-lime:hover, .btn-lime:focus-visible {
  box-shadow: 0 0 26px var(--lime-glow), inset 0 0 20px rgba(182, 255, 58, 0.2);
}
.btn-block { width: 100%; }

/* ---------- HERO ---------- */
.hero {
  display: grid;
  gap: 32px;
  padding-top: 48px;
  padding-bottom: 32px;
}
.hero-eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.22em;
  font-size: 0.8rem;
  color: var(--ink-dim);
  margin: 0 0 12px;
}
.hero-headline {
  font-size: clamp(2.1rem, 9vw, 4rem);
  font-weight: 900;
  letter-spacing: 0.01em;
  margin-bottom: 16px;
}
.hero-subhead {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(1.1rem, 4.5vw, 1.6rem);
  margin: 0 0 14px;
}
.hero-micro {
  color: var(--ink-dim);
  font-style: italic;
  max-width: 40ch;
  margin: 0 0 28px;
}
.hero-media {
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 0 30px rgba(0, 240, 255, 0.15);
}
.hero-media img { width: 100%; object-fit: cover; max-height: 72vh; }

@media (min-width: 880px) {
  .hero {
    grid-template-columns: 1.05fr 0.95fr;
    align-items: center;
    padding-top: 72px;
    padding-bottom: 48px;
  }
}

/* ---------- PULL QUOTES ---------- */
.pull-quote {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 28px 20px;
  text-align: center;
}
.pull-quote p {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(1.2rem, 5vw, 2rem);
  margin: 0;
  color: var(--ink);
}

/* ---------- STORY ---------- */
.story-body { max-width: 68ch; }
.story-body p { margin: 0 0 18px; font-size: 1.08rem; }
.story-body em { color: var(--cyan); font-style: italic; }
.story-kicker {
  font-family: var(--font-display);
  font-size: 1.15rem;
  color: var(--lime);
  text-shadow: 0 0 12px var(--lime-glow);
  margin-top: 8px;
}

/* ---------- SERVICES CARDS ---------- */
.card-grid {
  display: grid;
  gap: 20px;
  grid-template-columns: 1fr;
}
.card {
  background: linear-gradient(160deg, var(--panel), var(--bg-soft));
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  padding: 28px 24px;
  box-shadow: 0 0 0 1px rgba(0, 240, 255, 0.04), 0 8px 30px rgba(0, 0, 0, 0.5);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.card:hover {
  transform: translateY(-4px);
  border-color: rgba(0, 240, 255, 0.5);
  box-shadow: 0 0 24px rgba(0, 240, 255, 0.22);
}
.card h3 {
  font-size: 1.4rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 10px;
  text-shadow: 0 0 12px var(--cyan-glow);
}
.card p { margin: 0; color: var(--ink-dim); }

@media (min-width: 760px) {
  .card-grid { grid-template-columns: repeat(3, 1fr); }
}

/* ---------- BROTHERS ----------
   Mobile (default): the full landscape photo, uncropped, with the copy
   stacked beneath it — so both brothers are always fully in frame.
   Desktop (>=820px): full-bleed parallax background with overlaid copy. */
.brothers {
  position: relative;
  max-width: none;          /* break out of the centered container */
  margin: 32px 0;
  padding: 0;
  overflow: hidden;
  isolation: isolate;
  border-top: 1px solid var(--border-soft);
  border-bottom: 1px solid var(--border-soft);
}
.brothers-bg {
  position: relative;
  z-index: 0;
  line-height: 0;           /* kill descender gap under the image */
}
.brothers-bg img {
  width: 100%;
  height: auto;             /* full image — nothing cropped on mobile */
  display: block;
}
/* neon scrim (desktop overlay only) */
.brothers::before { content: ""; display: none; }
.brothers-copy {
  position: relative;
  z-index: 2;
  padding: 26px 20px 34px;
  background: linear-gradient(to bottom, rgba(8, 8, 16, 0.94), var(--bg-soft));
}
.brothers-name { font-family: var(--font-display); font-size: 1.3rem; margin: 0 0 8px; }
.brothers-caption { color: var(--ink-dim); font-style: italic; margin: 0; }

@media (min-width: 820px) {
  .brothers {
    min-height: 86vh;
    display: flex;
    align-items: center;
  }
  /* oversized, cover-cropped parallax layer */
  .brothers-bg { position: absolute; inset: 0; overflow: hidden; }
  .brothers-bg img {
    position: absolute;
    top: -20%;
    left: 0;
    height: 140%;
    object-fit: cover;
    object-position: center 30%;
    will-change: transform;
  }
  .brothers::before {
    display: block;
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    background:
      linear-gradient(to top, rgba(8, 8, 16, 0.95) 0%, rgba(8, 8, 16, 0.55) 45%, rgba(8, 8, 16, 0.15) 100%),
      radial-gradient(120% 90% at 20% 100%, rgba(0, 240, 255, 0.18), transparent 55%),
      radial-gradient(120% 90% at 90% 0%, rgba(255, 43, 214, 0.14), transparent 55%);
  }
  .brothers-copy {
    padding: 64px 20px;
    max-width: 56ch;
    margin-left: max(20px, calc((100vw - var(--maxw)) / 2));
    background: none;
  }
}

/* ---------- QUOTE FORM ---------- */
.quote-subhead {
  color: var(--ink-dim);
  font-style: italic;
  margin: -8px 0 28px;
  font-size: 1.1rem;
}
#quote-form {
  background: linear-gradient(160deg, var(--panel), var(--bg-soft));
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  padding: 28px 22px;
  box-shadow: 0 0 30px rgba(0, 240, 255, 0.1);
}
.hidden-field { position: absolute; left: -9999px; }
.field { margin-bottom: 20px; display: flex; flex-direction: column; }
.field-row { display: grid; gap: 0; grid-template-columns: 1fr; }
@media (min-width: 620px) {
  .field-row { grid-template-columns: 1fr 1fr; gap: 18px; }
}
.field label {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 0.85rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink);
  margin-bottom: 8px;
}
.req { color: var(--pink); }
.field-hint { font-size: 0.85rem; color: var(--ink-dim); margin-top: 6px; }

.field input,
.field select,
.field textarea {
  width: 100%;
  font-family: var(--font-body);
  font-size: 1.05rem;
  color: var(--ink);
  background: rgba(0, 0, 0, 0.35);
  border: 1.5px solid rgba(0, 240, 255, 0.28);
  border-radius: 10px;
  padding: 14px 14px;
  min-height: 52px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.field textarea { min-height: 110px; resize: vertical; }
.field input::placeholder,
.field textarea::placeholder { color: rgba(159, 179, 200, 0.55); }
.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--cyan);
  box-shadow: 0 0 0 3px rgba(0, 240, 255, 0.18), 0 0 14px var(--cyan-glow);
}
/* date input legibility on dark */
.field input[type="date"] { color-scheme: dark; }

/* error states */
.field.has-error input,
.field.has-error select,
.field.has-error textarea {
  border-color: var(--pink);
  box-shadow: 0 0 0 3px rgba(255, 43, 214, 0.18), 0 0 14px var(--pink-glow);
}
.error-msg {
  display: none;
  color: var(--pink);
  font-size: 0.85rem;
  margin-top: 6px;
  text-shadow: 0 0 8px var(--pink-glow);
}
.field.has-error .error-msg { display: block; }

/* success / status */
.form-status {
  margin: 20px 0 0;
  padding: 18px;
  border-radius: 10px;
  font-family: var(--font-display);
  font-size: 1.1rem;
  text-align: center;
}
.form-status.success {
  color: var(--lime);
  border: 1.5px solid var(--lime);
  background: rgba(182, 255, 58, 0.06);
  text-shadow: 0 0 12px var(--lime-glow);
  box-shadow: 0 0 22px var(--lime-glow);
}
.form-status.error {
  color: var(--pink);
  border: 1.5px solid var(--pink);
  background: rgba(255, 43, 214, 0.06);
}

/* ---------- FOOTER ---------- */
.site-footer {
  border-top: 1px solid var(--border-soft);
  text-align: center;
  padding: 40px 20px 56px;
  margin-top: 32px;
}
.footer-main { margin: 0 0 8px; color: var(--ink-dim); font-size: 0.95rem; }
.footer-tiny { margin: 0; color: rgba(159, 179, 200, 0.6); font-style: italic; font-size: 0.85rem; }

/* ============================================================
   WIPE-TO-CLEAN LOAD OVERLAY
   ============================================================ */
#wipe-overlay {
  position: fixed;
  inset: 0;
  z-index: 9000;
  pointer-events: none;
  display: none; /* shown only when JS is active (see html.js below) */
}
html.js #wipe-overlay { display: block; }
.wipe-glass,
.wipe-smudge {
  position: absolute;
  inset: 0;
}
.wipe-glass {
  background: rgba(12, 18, 28, 0.55);
  backdrop-filter: blur(9px) saturate(0.8);
  -webkit-backdrop-filter: blur(9px) saturate(0.8);
}
/* greasy/foggy grime via SVG noise filter + smudge gradient */
.wipe-smudge {
  filter: url(#grime);
  opacity: 0.5;
  background:
    radial-gradient(120% 80% at 30% 20%, rgba(220, 235, 255, 0.18), transparent 60%),
    radial-gradient(90% 70% at 75% 80%, rgba(200, 220, 255, 0.14), transparent 60%),
    linear-gradient(115deg, rgba(255,255,255,0.06), rgba(255,255,255,0.02));
  mix-blend-mode: screen;
}
/* the squeegee edge that travels along the wipe line */
.wipe-edge {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 14vh;
  background: linear-gradient(to bottom,
    transparent,
    rgba(0, 240, 255, 0.0) 35%,
    rgba(0, 240, 255, 0.9) 70%,
    #ffffff 88%,
    rgba(0, 240, 255, 0.0) 100%);
  box-shadow: 0 0 26px 4px var(--cyan-glow);
  opacity: 0;
}

/* Active wipe animation (added by JS).
   We animate clip-path top-to-bottom — a reliable, cross-browser
   "squeegee pull" that wipes the grimy glass away to reveal the page. */
.wipe-running .wipe-glass,
.wipe-running .wipe-smudge {
  animation: squeegee-clip 1200ms cubic-bezier(0.7, 0, 0.3, 1) forwards;
}
.wipe-running .wipe-edge {
  opacity: 1;
  animation: squeegee-edge 1200ms cubic-bezier(0.7, 0, 0.3, 1) forwards;
}
@keyframes squeegee-clip {
  0%   { clip-path: inset(0 0 0 0); }
  100% { clip-path: inset(100% 0 0 0); }
}
@keyframes squeegee-edge {
  0%   { transform: translateY(-14vh); opacity: 1; }
  92%  { opacity: 1; }
  100% { transform: translateY(100vh); opacity: 0; }
}

/* When done, hide entirely so it never blocks anything */
#wipe-overlay.wipe-done { display: none !important; }

/* ---------- SMUDGE-ON-HOVER MICRO EFFECT ---------- */
.smudge-hover { position: relative; }
.smudge-hover::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(60% 50% at 35% 30%, rgba(220,235,255,0.16), transparent 60%),
    radial-gradient(50% 45% at 70% 75%, rgba(200,220,255,0.12), transparent 60%);
  opacity: 0.85;
  transition: opacity 0.7s ease;
}
.smudge-hover:hover::after,
.smudge-hover:focus-within::after { opacity: 0; }

/* ---------- LOGO FLICKER ---------- */
@keyframes flicker {
  0%, 18%, 22%, 25%, 53%, 57%, 100% {
    opacity: 1;
    text-shadow: 0 0 6px var(--cyan-glow), 0 0 16px var(--cyan-glow);
  }
  20%, 24%, 55% {
    opacity: 0.55;
    text-shadow: none;
  }
}

/* ============================================================
   REDUCED MOTION
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  #wipe-overlay { display: none !important; }
  .wordmark-glass { animation: none; }
}
