/* =====================================================================
   Mad Sundar — core stylesheet
   Reskinned to match the Madder v Ramsey / DocketDrift "dossier" system:
   purple-black base, pink/cyan/violet neon, monospace stamps, sharp
   radii, reticle corners. Motion preserved, gated behind reduced-motion.
   ===================================================================== */

@font-face {
  font-family: 'Chakra Petch';
  src: url('https://madsundar.com/assets/ChakraPetch-Regular.ttf') format('truetype');
  font-display: swap;
}

/* ─── Design tokens (shared with maddervramsey / docketdrift) ──────── */
:root {
  /* surfaces */
  --bg-deep:       #050505;
  --bg-panel:      rgba(10, 0, 15, 0.85);
  --bg-tile:       rgba(20, 0, 30, 0.6);
  --bg-tile-hover: rgba(30, 0, 50, 0.85);

  /* neon palette */
  --neon-pink:   #ff2bb3;
  --neon-cyan:   #26ffe6;
  --neon-amber:  #ffbf00;
  --neon-violet: #a95eff;
  --neon-lime:   #5fc944;

  /* text */
  --text-primary: #e6e3ec;
  --text-dim:     #948ca1;

  /* borders */
  --border-sharp: 1px solid rgba(169, 94, 255, 0.45);
  --border-soft:  1px solid rgba(169, 94, 255, 0.18);

  /* glows / shadows */
  --shadow-glow-pink: 0 0 6px rgba(255, 43, 179, 0.45);
  --shadow-glow-cyan: 0 0 6px rgba(38, 255, 230, 0.45);
  --shadow-card:       0 2px 14px rgba(0, 0, 0, 0.5);
  --shadow-card-hover: 0 6px 22px rgba(38, 255, 230, 0.18);

  /* layout */
  --maxw:      1140px;
  --radius:    8px;
  --radius-sm: 4px;
  --gap:       1.5rem;

  --focus-ring: 0 0 0 2px var(--bg-deep), 0 0 0 4px var(--neon-cyan);
  --transition: 0.2s ease;
  --mono: ui-monospace, "JetBrains Mono", "IBM Plex Mono", Consolas, monospace;
}

* { box-sizing: border-box; }

/* ─── Skip link (WCAG 2.4.1 Bypass Blocks) ─────────────────────────── */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 200;
  padding: 0.7rem 1.1rem;
  background: var(--bg-deep);
  color: var(--neon-cyan);
  border: var(--border-sharp);
  border-radius: var(--radius-sm);
  font-family: var(--mono);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  text-decoration: none;
}
.skip-link:focus {
  left: 0.5rem;
  top: 0.5rem;
  box-shadow: var(--focus-ring);
}

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  font-family: 'Chakra Petch', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  background-color: var(--bg-deep);
  color: var(--text-primary);
  margin: 0;
  line-height: 1.55;
  overflow-x: hidden;
  min-height: 100vh;
  /* fixed radial backdrop so the page never feels flat */
  background-image:
    radial-gradient(1200px 600px at 80% -10%, rgba(169, 94, 255, 0.08), transparent 60%),
    radial-gradient(900px 500px at -10% 110%, rgba(38, 255, 230, 0.05), transparent 60%);
  background-attachment: fixed;
}

img, svg, video { max-width: 100%; height: auto; }

/* ---------------------------------------------------------------------
   Animated ambient backdrop — slow drifting violet/cyan mesh + grid +
   scanlines. Injected by motion.js, fixed behind everything.
   --------------------------------------------------------------------- */
.fx-backdrop {
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  background:
    radial-gradient(38rem 38rem at 14% 6%, rgba(169, 94, 255, 0.10), transparent 60%),
    radial-gradient(34rem 34rem at 86% 16%, rgba(255, 43, 179, 0.09), transparent 60%),
    radial-gradient(42rem 42rem at 72% 94%, rgba(38, 255, 230, 0.07), transparent 62%);
  background-size: 200% 200%;
  animation: meshDrift 26s ease-in-out infinite alternate;
}
.fx-backdrop::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(169, 94, 255, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(169, 94, 255, 0.05) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(circle at 50% 28%, #000 0%, transparent 75%);
  -webkit-mask-image: radial-gradient(circle at 50% 28%, #000 0%, transparent 75%);
}
.fx-backdrop::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(rgba(0, 0, 0, 0) 50%, rgba(0, 0, 0, 0.16) 50%);
  background-size: 100% 3px;
  opacity: 0.35;
}
@keyframes meshDrift {
  0%   { background-position: 0% 0%; }
  100% { background-position: 100% 100%; }
}

/* ---------------------------------------------------------------------
   Layout
   --------------------------------------------------------------------- */
.wrap {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 1.5rem;
  width: 100%;
}
main.wrap { padding: 2.75rem 1.5rem 4rem; }
.content { max-width: 760px; }

/* ---------------------------------------------------------------------
   Typography
   --------------------------------------------------------------------- */
h1 {
  font-size: clamp(2.2rem, 6vw, 3.6rem);
  color: var(--neon-pink);
  text-transform: uppercase;
  letter-spacing: 2px;
  line-height: 1.08;
  margin: 0 0 1.1rem;
  text-shadow: 0 0 12px rgba(255, 43, 179, 0.4);
}
h2 {
  font-size: clamp(1.3rem, 3vw, 1.8rem);
  color: var(--neon-pink);
  text-transform: uppercase;
  letter-spacing: 1px;
  line-height: 1.2;
  margin: 0 0 1rem;
}
h3 {
  font-size: 1.1rem;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: var(--text-primary);
  margin: 0 0 0.75rem;
}
p { max-width: 70ch; margin: 0 0 1.25rem; color: var(--text-primary); }
.muted { color: var(--text-dim); }
.muted-small { color: var(--text-dim); font-size: 0.85rem; }

/* two-tone neon accents */
.tone-cyan { color: var(--neon-cyan); text-shadow: 0 0 12px rgba(38, 255, 230, 0.4); }
.grad {
  background: linear-gradient(100deg, var(--neon-pink), var(--neon-cyan));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

/* monospace eyebrow / section label */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--mono);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  color: var(--neon-cyan);
  margin-bottom: 1rem;
}
.eyebrow::before {
  content: "";
  width: 1.8rem;
  height: 1px;
  background: linear-gradient(90deg, var(--neon-cyan), transparent);
}

/* pink→transparent section divider */
.section-divider {
  border: none;
  height: 1px;
  background: linear-gradient(to right, var(--neon-pink), transparent 70%);
  box-shadow: 0 0 6px rgba(255, 43, 179, 0.35);
  margin: 0 0 1.5rem;
}

/* ---------------------------------------------------------------------
   Links
   --------------------------------------------------------------------- */
a {
  color: var(--neon-cyan);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color var(--transition), border-color var(--transition), text-shadow var(--transition);
}
a:hover { border-bottom-color: var(--neon-cyan); text-shadow: var(--shadow-glow-cyan); }
a:focus-visible { outline: none; box-shadow: var(--focus-ring); border-radius: 2px; }

/* ---------------------------------------------------------------------
   Buttons — chip style: outline at rest, fills with color on hover
   --------------------------------------------------------------------- */
.cta { display: flex; flex-wrap: wrap; gap: 0.9rem; margin-top: 2rem; }

.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.8rem 1.6rem;
  border-radius: var(--radius-sm);
  font-family: 'Chakra Petch', sans-serif;
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  border: 1px solid currentColor;
  min-height: 44px;
  transition: background var(--transition), color var(--transition), box-shadow var(--transition), transform var(--transition);
}

.btn.primary {
  color: var(--neon-cyan);
  background: rgba(38, 255, 230, 0.06);
}
.btn.primary:hover,
.btn.primary:focus-visible {
  background: var(--neon-cyan);
  color: #050505;
  box-shadow: 0 0 16px rgba(38, 255, 230, 0.5);
  transform: translateY(-2px);
  outline: none;
}

.btn.ghost {
  color: var(--neon-pink);
  background: rgba(255, 43, 179, 0.05);
}
.btn.ghost:hover,
.btn.ghost:focus-visible {
  background: var(--neon-pink);
  color: #050505;
  box-shadow: 0 0 16px rgba(255, 43, 179, 0.5);
  transform: translateY(-2px);
  outline: none;
}

/* ---------------------------------------------------------------------
   Reticle corners — cyan top-left + pink bottom-right ticks bleeding
   from the frame. The signature MvR/DocketDrift card treatment.
   --------------------------------------------------------------------- */
.reticle { position: relative; }
.reticle::after {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  pointer-events: none;
  background:
    linear-gradient(to right,  var(--neon-cyan), transparent) no-repeat left top     / 48px 2px,
    linear-gradient(to bottom, var(--neon-cyan), transparent) no-repeat left top     / 2px 48px,
    linear-gradient(to left,   var(--neon-pink), transparent) no-repeat right bottom / 48px 2px,
    linear-gradient(to top,    var(--neon-pink), transparent) no-repeat right bottom / 2px 48px;
}

/* ---------------------------------------------------------------------
   Hero — glossy frame with reticle, two-tone neon headline, spotlight
   --------------------------------------------------------------------- */
.hero {
  position: relative;
  padding: clamp(2.5rem, 6vw, 4.5rem) clamp(1.5rem, 5vw, 3.5rem);
  margin: 0.5rem 0 3.5rem;
  border-radius: var(--radius);
  background: var(--bg-panel);
  border: var(--border-sharp);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: var(--shadow-card);
  overflow: hidden;
}
/* cursor spotlight (position set by motion.js via --mx/--my) */
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(22rem 22rem at var(--mx, 28%) var(--my, 18%), rgba(38, 255, 230, 0.10), transparent 60%);
  opacity: 0;
  transition: opacity 0.4s var(--transition);
  pointer-events: none;
}
.hero:hover::before { opacity: 1; }
.hero > * { position: relative; z-index: 1; }
.hero h1 { margin-bottom: 1.4rem; }
.hero h1 .grad { display: inline-block; }

.hero h2 {
  color: var(--text-dim);
  text-transform: none;
  letter-spacing: 0;
  font-weight: 400;
  font-size: clamp(1.05rem, 2vw, 1.3rem);
  max-width: 58ch;
  margin: 0 0 1.2rem;
}
.hero-lead {
  font-size: clamp(1rem, 1.5vw, 1.12rem);
  max-width: 60ch;
  color: var(--text-primary);
}

/* floating accent orbs */
.hero .orb { position: absolute; border-radius: 50%; filter: blur(46px); opacity: 0.5; z-index: 0; }
.hero .orb.one { width: 15rem; height: 15rem; right: -4rem; top: -5rem; background: radial-gradient(circle, rgba(255, 43, 179, 0.45), transparent 70%); animation: floatY 12s ease-in-out infinite; }
.hero .orb.two { width: 12rem; height: 12rem; left: -3rem; bottom: -4rem; background: radial-gradient(circle, rgba(38, 255, 230, 0.4), transparent 70%); animation: floatY 14s ease-in-out infinite reverse; }
@keyframes floatY { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-24px); } }

/* ---------------------------------------------------------------------
   Work slider — sliding image cards (scroll-snap + arrows)
   --------------------------------------------------------------------- */
.workslider { position: relative; margin-bottom: 1.5rem; }

.workslider__viewport {
  display: flex;
  gap: var(--gap);
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  padding: 0.5rem 0.25rem 1.4rem;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  /* fade the trailing edge to hint "there's more" */
  mask-image: linear-gradient(90deg, #000 92%, transparent);
  -webkit-mask-image: linear-gradient(90deg, #000 92%, transparent);
}
.workslider__viewport::-webkit-scrollbar { display: none; }
.workslider__viewport:focus-visible { outline: none; box-shadow: var(--focus-ring); border-radius: var(--radius-sm); }

.workcard {
  flex: 0 0 clamp(258px, 80%, 360px);
  scroll-snap-align: start;
  background: var(--bg-tile);
  border: 1px solid rgba(169, 94, 255, 0.25);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-card);
  transition: transform var(--transition), border-color var(--transition), box-shadow var(--transition);
}
.workcard:hover, .workcard:focus-within {
  transform: translateY(-4px);
  border-color: var(--neon-cyan);
  box-shadow: var(--shadow-card-hover);
}

.workcard__media {
  display: block;
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-bottom: 1px solid rgba(169, 94, 255, 0.25);
  border-radius: 0;
  background: #0a0710;
}
.workcard__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  display: block;
  transition: transform 0.45s ease;
}
.workcard:hover .workcard__media img { transform: scale(1.05); }

.workcard__body {
  padding: 1.1rem 1.2rem 1.3rem;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  flex: 1;
}
.workcard__tag {
  font-family: var(--mono);
  font-size: 0.6rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--neon-pink);
}
.workcard__body h3 { margin: 0; color: var(--neon-cyan); }
.workcard__body p { margin: 0; font-size: 0.88rem; color: var(--text-dim); flex: 1; }
.workcard .link-arrow { margin-top: 0.5rem; }

.workslider__nav { display: flex; gap: 0.5rem; justify-content: flex-end; }
.workslider__btn {
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
  color: var(--neon-cyan);
  background: rgba(38, 255, 230, 0.06);
  border: 1px solid currentColor;
  border-radius: var(--radius-sm);
  transition: background var(--transition), color var(--transition), box-shadow var(--transition);
}
.workslider__btn:hover, .workslider__btn:focus-visible {
  background: var(--neon-cyan);
  color: #050505;
  box-shadow: var(--shadow-glow-cyan);
  outline: none;
}

/* ---------------------------------------------------------------------
   Section heads
   --------------------------------------------------------------------- */
.section-head { margin-bottom: 1.8rem; }
.section-head h2 { margin-bottom: 0.5rem; }
.section-head p { margin: 0; color: var(--text-dim); }

section { margin-bottom: 3.5rem; }

/* ---------------------------------------------------------------------
   Grids & tiles
   --------------------------------------------------------------------- */
.grid {
  display: grid;
  gap: var(--gap);
  grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
}

/* Portfolio grid: caps at 4 across, stepping down as space shrinks.
   At >=1280px it breaks out of the 1140px column (body clips overflow-x,
   and at these breakpoints the wider grid still fits the viewport) so
   four cards get ~300px each instead of a cramped ~255px. */
.work-grid { grid-template-columns: 1fr; }
@media (min-width: 560px)  { .work-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 940px)  { .work-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1280px) {
  .work-grid {
    grid-template-columns: repeat(4, 1fr);
    width: 1200px;
    margin-inline: calc((100% - 1200px) / 2);
  }
}
@media (min-width: 1460px) {
  .work-grid {
    width: 1360px;
    margin-inline: calc((100% - 1360px) / 2);
  }
}

.card {
  position: relative;
  background: var(--bg-tile);
  border: 1px solid rgba(38, 255, 230, 0.22);
  border-radius: var(--radius);
  padding: 1.6rem 1.6rem 1.5rem;
  box-shadow: var(--shadow-card);
  transition: transform var(--transition), border-color var(--transition), box-shadow var(--transition), background var(--transition);
  overflow: visible;
}
.card:hover,
.card:focus-within {
  transform: translateY(-4px);
  border-color: var(--neon-cyan);
  background: var(--bg-tile-hover);
  box-shadow: var(--shadow-card-hover);
}
.card h3 { color: var(--text-primary); }
/* Reserve first-line space so long headings don't run under the FILE# stamp,
   which is absolutely positioned over the top-right corner. */
.card:has(.card-index) h3::before {
  content: "";
  float: right;
  width: 4.5rem;
  height: 1.4rem;
}
.card p { color: var(--text-primary); font-size: 0.95rem; }
.card ul { margin: 0; padding-left: 1.1rem; color: var(--text-primary); font-size: 0.95rem; }
.card li { margin-bottom: 0.45rem; }
.card li::marker { color: var(--neon-cyan); }
.card.span-all { grid-column: 1 / -1; }

/* forensic FILE# stamp, top-right of a card */
.card-index {
  position: absolute;
  top: 0.7rem;
  right: 0.7rem;
  z-index: 2;
  background: rgba(5, 5, 5, 0.92);
  color: var(--neon-pink);
  font-family: var(--mono);
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 1.5px;
  padding: 0.3rem 0.55rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-left: 2px solid var(--neon-pink);
  border-radius: 2px;
  text-transform: uppercase;
  white-space: nowrap;
}

/* ---------------------------------------------------------------------
   Recent work — dossier rows
   --------------------------------------------------------------------- */
.worklist { list-style: none; margin: 0; padding: 0; }
.worklist li {
  padding: 1rem 0;
  border-bottom: var(--border-soft);
  transition: padding-left var(--transition);
}
.worklist li:last-child { border-bottom: 0; }
.worklist li:hover { padding-left: 0.6rem; }
.worklist .work-title {
  display: block;
  font-family: 'Chakra Petch', sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-size: 1.02rem;
  color: var(--neon-cyan);
  border-bottom: 0;
  margin-bottom: 0.2rem;
}
.worklist .work-title:hover { text-shadow: var(--shadow-glow-cyan); }
.worklist .work-desc { color: var(--text-dim); font-size: 0.92rem; }

/* ---------------------------------------------------------------------
   Contact
   --------------------------------------------------------------------- */
.contact-card strong { color: var(--neon-pink); }

/* ---------------------------------------------------------------------
   Badges / pills
   --------------------------------------------------------------------- */
.badges { display: flex; flex-wrap: wrap; gap: 0.55rem; margin-top: 1.5rem; }
.badge {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  padding: 0.35rem 0.8rem;
  border-radius: var(--radius-sm);
  border: 1px solid currentColor;
  color: var(--neon-violet);
  background: rgba(169, 94, 255, 0.08);
  text-transform: uppercase;
}

/* ---------------------------------------------------------------------
   Scroll reveal — applied by motion.js
   --------------------------------------------------------------------- */
[data-reveal] {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.65s ease, transform 0.65s ease;
}
[data-reveal].is-visible { opacity: 1; transform: none; }

/* ---------------------------------------------------------------------
   Footer
   --------------------------------------------------------------------- */
footer {
  margin-top: 2rem;
  padding: 1.75rem 0;
  border-top: var(--border-soft);
  text-align: center;
}
footer .wrap { text-align: center; }
footer p {
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin: 0;
}
footer a { color: var(--neon-cyan); }

/* ---------------------------------------------------------------------
   Forms (start page)
   --------------------------------------------------------------------- */
label { display: block; font-size: 0.85rem; margin-bottom: 0.4rem; color: var(--text-primary); text-transform: uppercase; letter-spacing: 0.5px; }
input, select, textarea {
  width: 100%;
  background: #000;
  border: 1px solid rgba(169, 94, 255, 0.35);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  padding: 0.7rem 0.85rem;
  font-family: inherit;
  font-size: 16px;
  transition: border-color var(--transition), box-shadow var(--transition);
}
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--neon-cyan);
  box-shadow: var(--shadow-glow-cyan);
}
textarea { min-height: 120px; resize: vertical; }
.row { margin-bottom: 1.2rem; }
.row.two { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.pillcheck, .inline { display: flex; flex-wrap: wrap; gap: 0.6rem 1rem; }
/* min-height keeps the checkbox/radio hit area at or above the 24x24 CSS px
   floor in WCAG 2.2 SC 2.5.8 (the label is the real target, not just the box). */
.pillcheck label, .inline label { display: flex; align-items: center; gap: 0.4rem; margin: 0; min-height: 24px; color: var(--text-dim); font-size: 0.9rem; text-transform: none; letter-spacing: 0; }
.pillcheck input, .inline input { width: auto; }
.two-col { display: grid; grid-template-columns: 1fr; gap: 1.5rem; }
.help { font-size: 0.8rem; color: var(--text-dim); }
.success { display: none; color: var(--neon-cyan); }
.success.is-visible { display: block; }
.form-error {
  border: 1px solid rgba(255, 43, 179, 0.5);
  background: rgba(255, 43, 179, 0.08);
  color: var(--text-primary);
  padding: 0.8rem 1rem;
  border-radius: var(--radius-sm);
  margin-bottom: 1.2rem;
  font-size: 0.9rem;
}
.form-error ul { margin: 0.4rem 0 0; padding-left: 1.1rem; }
/* Honeypot: parked far off-canvas, not display:none, so naive bots still fill it. */
.hp-field { position: absolute !important; left: -9999px; top: -9999px; width: 1px; height: 1px; overflow: hidden; }

:focus-visible { outline: none; box-shadow: var(--focus-ring); border-radius: 2px; }

/* ---------------------------------------------------------------------
   Responsive
   --------------------------------------------------------------------- */
@media (max-width: 640px) {
  .row.two { grid-template-columns: 1fr; }
  .cta { flex-direction: column; align-items: stretch; }
  .btn { width: 100%; }
  h1 { letter-spacing: 1px; }
}

/* =====================================================================
   PORTAL — auth pages + billing UI (login.php, portal/*.php)
   ===================================================================== */

/* Auth hero: same glossy frame, centered */
.auth-hero { text-align: center; }
.auth-hero .eyebrow, .auth-hero .cta { justify-content: center; }
.auth-hero p { margin-left: auto; margin-right: auto; }

/* Login layout: form + aside */
.auth-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: var(--gap);
  margin-bottom: 3.5rem;
}
@media (max-width: 760px) { .auth-grid { grid-template-columns: 1fr; } }

/* glitch heading — static neon (animation would fail reduced-motion anyway) */
.glitch { position: relative; }

/* form field wrapper + inputs (login uses .input / .field) */
.field { margin-bottom: 1.1rem; }
.field > .inline { justify-content: space-between; align-items: center; }
.input { width: 100%; }

/* inline mono code chip */
.code {
  font-family: var(--mono);
  font-size: 0.88em;
  color: var(--neon-cyan);
  background: rgba(38, 255, 230, 0.07);
  padding: 0.1rem 0.4rem;
  border-radius: 3px;
}
.mono { font-family: var(--mono); }
.tiny { font-size: 0.78rem; color: var(--text-dim); }

/* labelled divider line ("Authentication", "Quick actions") */
.divider {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-family: var(--mono);
  font-size: 0.66rem;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--text-dim);
  margin: 1.25rem 0 1rem;
}
.divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, rgba(169,94,255,0.4), transparent);
}
.keyline {
  border-left: 2px solid var(--neon-violet);
  padding-left: 0.85rem;
  margin: 1rem 0;
}

/* caps lock warning (toggled by login.php JS) */
.caps { display: none; color: var(--neon-amber); font-size: 0.78rem; margin-top: 0.4rem; }

/* alerts */
.alert {
  padding: 0.85rem 1rem;
  border-radius: var(--radius-sm);
  background: rgba(38, 255, 230, 0.05);
  border: 1px solid rgba(38, 255, 230, 0.3);
  border-left: 3px solid var(--neon-cyan);
  color: var(--text-primary);
  font-size: 0.9rem;
  margin: 0 0 1.5rem;
}
.alert-error {
  background: rgba(255, 77, 77, 0.06);
  border-color: rgba(255, 77, 77, 0.4);
  border-left-color: #ff4d4d;
}
.alert-ok {
  background: rgba(95, 201, 68, 0.06);
  border-color: rgba(95, 201, 68, 0.4);
  border-left-color: var(--neon-lime);
}

/* dashboard stat cards */
.stat-card { display: flex; flex-direction: column; }
.stat-value { font-family: 'Chakra Petch', sans-serif; font-size: 2rem; line-height: 1.1; margin: 0.4rem 0 0.2rem; color: var(--text-primary); }
.stat-value.is-due { color: var(--neon-amber); text-shadow: 0 0 12px rgba(255,191,0,0.35); }
.stat-card .btn { align-self: flex-start; margin-top: 1rem; }

/* invoice / ledger tables */
.invoice-table { width: 100%; border-collapse: collapse; font-size: 0.92rem; }
.invoice-table th {
  text-align: left;
  font-family: var(--mono);
  font-size: 0.64rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-dim);
  padding: 0.85rem 1rem;
  border-bottom: 1px solid rgba(169,94,255,0.25);
}
.invoice-table td { padding: 0.85rem 1rem; border-bottom: var(--border-soft); vertical-align: top; }
.invoice-table tbody tr:last-child td { border-bottom: 0; }
.invoice-table tbody tr { transition: background var(--transition); }
.invoice-table tbody tr:hover { background: rgba(38, 255, 230, 0.03); }
.invoice-table .num { text-align: right; white-space: nowrap; }
.invoice-table.line-items { margin-top: 0.5rem; }
.invoice-table tfoot td { padding: 0.85rem 1rem; border-top: 1px solid rgba(169,94,255,0.35); font-weight: 700; }
.invoice-table .total { color: var(--neon-cyan); font-size: 1.05rem; }
.invoice-table input { padding: 0.45rem 0.6rem; font-size: 0.9rem; }

.link-arrow {
  font-family: var(--mono);
  font-size: 0.8rem;
  color: var(--neon-cyan);
  white-space: nowrap;
  border-bottom: 0;
}
.link-arrow:hover { text-shadow: var(--shadow-glow-cyan); }

/* status pills */
.status-pill {
  display: inline-block;
  font-family: var(--mono);
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.22rem 0.6rem;
  border-radius: var(--radius-sm);
  border: 1px solid currentColor;
}
.status-paid     { color: var(--neon-cyan);   background: rgba(38,255,230,0.08); }
.status-open     { color: var(--neon-amber);  background: rgba(255,191,0,0.10); }
.status-draft    { color: var(--text-dim);    background: rgba(148,140,161,0.08); }
.status-void     { color: var(--text-dim);    background: rgba(148,140,161,0.08); }
.status-refunded { color: var(--neon-pink);   background: rgba(255,43,179,0.08); }

/* invoice detail meta + plan price */
.invoice-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem 2.5rem;
  padding-bottom: 1.25rem;
  margin-bottom: 0.5rem;
  border-bottom: var(--border-soft);
  font-size: 0.92rem;
}
.meta-label { font-family: var(--mono); font-size: 0.62rem; text-transform: uppercase; letter-spacing: 0.12em; color: var(--text-dim); }
.plan-price { font-family: 'Chakra Petch', sans-serif; font-size: 1.8rem; color: var(--neon-cyan); margin: 0.3rem 0 0.6rem; }

/* =====================================================================
   LANGUAGE — switcher + translated-page bits (/es)
   ===================================================================== */

/* Nav language switch: reads as a chip, not another menu item.
   Scoped to `.menu a` so it outranks the dim nav-link color. */
.menu a.lang-switch,
.lang-switch {
  color: var(--neon-violet);
  border: 1px solid currentColor;
  border-radius: var(--radius-sm);
  background: rgba(169, 94, 255, 0.08);
  padding: 0.1rem 0.55rem;
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  /* 24px floor per WCAG 2.2 SC 2.5.8 */
  display: inline-flex;
  align-items: center;
  min-height: 24px;
}
.menu a.lang-switch:hover,
.menu a.lang-switch:focus-visible {
  background: var(--neon-violet);
  color: #050505;
  border-bottom: 1px solid var(--neon-violet);
  box-shadow: 0 0 10px rgba(169, 94, 255, 0.45);
}
.menu a.lang-switch::after { content: none; }

footer .footer-alt {
  margin-top: 0.5rem;
  font-size: 0.74rem;
  text-transform: none;
  letter-spacing: 0.02em;
}

/* ---------------------------------------------------------------------
   FAQ accordion (/es)
   --------------------------------------------------------------------- */
.faq { display: grid; gap: 0.75rem; }

.faq-item {
  background: var(--bg-tile);
  border: 1px solid rgba(169, 94, 255, 0.25);
  border-radius: var(--radius);
  padding: 0 1.2rem;
  transition: border-color var(--transition), background var(--transition);
}
.faq-item[open] { border-color: rgba(38, 255, 230, 0.4); background: var(--bg-tile-hover); }
.faq-item:hover { border-color: var(--neon-cyan); }

.faq-item summary {
  cursor: pointer;
  list-style: none;
  padding: 1rem 2rem 1rem 0;
  position: relative;
  font-family: 'Chakra Petch', sans-serif;
  font-size: 1rem;
  letter-spacing: 0.02em;
  color: var(--neon-cyan);
  min-height: 44px;
  display: flex;
  align-items: center;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "+";
  position: absolute;
  right: 0.15rem;
  font-family: var(--mono);
  font-size: 1.25rem;
  line-height: 1;
  color: var(--neon-pink);
  transition: transform var(--transition);
}
.faq-item[open] summary::after { content: "\2212"; }
.faq-item summary:focus-visible { outline: none; box-shadow: var(--focus-ring); border-radius: var(--radius-sm); }

.faq-item > p {
  margin: 0 0 1.1rem;
  color: var(--text-primary);
  font-size: 0.95rem;
  max-width: 68ch;
}

/* ---------------------------------------------------------------------
   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;
  }
  .fx-backdrop { animation: none; }
  .workslider__viewport { scroll-behavior: auto; }
  .workcard:hover .workcard__media img { transform: none; }
  [data-reveal] { opacity: 1; transform: none; }
  .card:hover, .btn:hover, .workcard:hover { transform: none !important; }
}
