/* ============================================================
   Trinity Applied Systems — design system
   ============================================================ */

:root {
  --bg-0: #060912;
  --bg-1: #0b1120;
  --bg-2: #0f172a;
  --surface: rgba(15, 23, 42, 0.55);
  --surface-strong: rgba(15, 23, 42, 0.85);
  --border: rgba(148, 163, 184, 0.12);
  --border-strong: rgba(148, 163, 184, 0.22);

  --text: #e2e8f0;
  --text-dim: #94a3b8;
  --text-mute: #64748b;
  --text-strong: #f8fafc;

  --accent-1: #22d3ee;
  --accent-2: #818cf8;
  --accent-3: #c084fc;
  --accent-grad: linear-gradient(135deg, #22d3ee 0%, #6366f1 55%, #c084fc 100%);
  --accent-grad-soft: linear-gradient(135deg, rgba(34, 211, 238, 0.18), rgba(129, 140, 248, 0.18));

  --radius-sm: 8px;
  --radius: 14px;
  --radius-lg: 22px;
  --radius-pill: 999px;

  --shadow-soft: 0 10px 30px -12px rgba(2, 6, 23, 0.6);
  --shadow-glow: 0 0 0 1px rgba(99, 102, 241, 0.18), 0 20px 60px -20px rgba(99, 102, 241, 0.35);

  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-display: 'Space Grotesk', var(--font-sans);
  --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;

  --container: 1180px;
}

/* ============================================================ Reset */

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  font-family: var(--font-sans);
  color: var(--text);
  background: var(--bg-0);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img, svg { display: block; max-width: 100%; }
button { font-family: inherit; cursor: pointer; }
a { color: inherit; text-decoration: none; }
:focus-visible {
  outline: 2px solid var(--accent-1);
  outline-offset: 3px;
  border-radius: 4px;
}

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

@media (max-width: 640px) {
  .container { padding: 0 18px; }
}

/* ============================================================ Background */

.bg-gradient {
  position: fixed;
  inset: 0;
  z-index: -3;
  background:
    radial-gradient(ellipse 80% 60% at 50% 0%, rgba(34, 211, 238, 0.08), transparent 60%),
    radial-gradient(ellipse 60% 50% at 80% 30%, rgba(129, 140, 248, 0.08), transparent 60%),
    radial-gradient(ellipse 60% 60% at 20% 70%, rgba(192, 132, 252, 0.06), transparent 60%),
    linear-gradient(180deg, var(--bg-0) 0%, var(--bg-1) 50%, var(--bg-0) 100%);
}

.bg-grid {
  position: fixed;
  inset: 0;
  z-index: -2;
  background-image:
    linear-gradient(rgba(148, 163, 184, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(148, 163, 184, 0.04) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 30%, #000 30%, transparent 80%);
  -webkit-mask-image: radial-gradient(ellipse 80% 60% at 50% 30%, #000 30%, transparent 80%);
}

.bg-orb {
  position: fixed;
  z-index: -1;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.5;
  pointer-events: none;
  animation: orbFloat 18s ease-in-out infinite;
}
.bg-orb--1 {
  width: 480px; height: 480px;
  top: -120px; right: -120px;
  background: radial-gradient(circle, rgba(34, 211, 238, 0.4), transparent 70%);
}
.bg-orb--2 {
  width: 560px; height: 560px;
  bottom: -200px; left: -160px;
  background: radial-gradient(circle, rgba(129, 140, 248, 0.35), transparent 70%);
  animation-delay: -8s;
}
@keyframes orbFloat {
  0%, 100% { transform: translate(0, 0); }
  50%      { transform: translate(30px, -30px); }
}

/* ============================================================ Typography */

h1, h2, h3 {
  font-family: var(--font-display);
  color: var(--text-strong);
  margin: 0;
  letter-spacing: -0.02em;
  font-weight: 600;
}
h1 { font-size: clamp(2.2rem, 1.4rem + 3.4vw, 4rem); line-height: 1.08; }
h2 { font-size: clamp(1.7rem, 1.2rem + 2vw, 2.6rem); line-height: 1.15; }
h3 { font-size: 1.15rem; line-height: 1.35; }
p  { margin: 0; }

.grad-text {
  background: var(--accent-grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ============================================================ Header */

.site-header {
  position: sticky;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  z-index: 50;
  backdrop-filter: blur(16px) saturate(160%);
  -webkit-backdrop-filter: blur(16px) saturate(160%);
  background: linear-gradient(180deg, rgba(6, 9, 18, 0.92), rgba(6, 9, 18, 0.78));
  border-bottom: 1px solid var(--border);
  padding-top: env(safe-area-inset-top, 0px);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}
.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px; height: 40px;
  border-radius: 10px;
  background: var(--accent-grad-soft);
  border: 1px solid var(--border-strong);
}
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-name {
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--text-strong);
  font-size: 1rem;
  letter-spacing: -0.01em;
}
.brand-tag {
  font-size: 0.72rem;
  color: var(--text-dim);
  font-family: var(--font-mono);
  letter-spacing: 0.04em;
  margin-top: 2px;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 28px;
}
.site-nav a {
  color: var(--text-dim);
  font-size: 0.92rem;
  font-weight: 500;
  transition: color 0.15s ease;
  position: relative;
}
.site-nav a:hover { color: var(--text-strong); }

.nav-cta {
  background: var(--accent-grad);
  color: var(--bg-0) !important;
  font-weight: 600 !important;
  padding: 9px 18px;
  border-radius: var(--radius-pill);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  box-shadow: 0 6px 20px -8px rgba(99, 102, 241, 0.6);
}
.nav-cta:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 30px -8px rgba(99, 102, 241, 0.7);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  width: 38px; height: 38px;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  padding: 0;
  align-items: center;
  justify-content: center;
}
.nav-toggle span {
  display: block;
  width: 18px; height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

@media (max-width: 860px) {
  .site-nav {
    position: fixed;
    top: calc(72px + env(safe-area-inset-top, 0px));
    right: 0;
    left: 0;
    bottom: auto;
    flex-direction: column;
    gap: 0;
    background: rgba(6, 9, 18, 0.98);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border);
    padding: 16px 24px 24px;
    transform: translateY(-150%);
    visibility: hidden;
    transition: transform 0.25s ease, visibility 0s linear 0.25s;
  }
  .site-nav.is-open {
    transform: translateY(0);
    visibility: visible;
    transition: transform 0.25s ease, visibility 0s linear 0s;
  }
  .site-nav a {
    padding: 14px 0;
    border-bottom: 1px solid var(--border);
    width: 100%;
  }
  .site-nav a:last-child { border-bottom: 0; }
  .nav-cta {
    margin-top: 14px;
    text-align: center;
  }
  .nav-toggle { display: inline-flex; }
}

/* ============================================================ Buttons */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 22px;
  border-radius: var(--radius-pill);
  font-weight: 600;
  font-size: 0.95rem;
  border: 1px solid transparent;
  transition: transform 0.15s ease, box-shadow 0.2s ease, background 0.2s ease, border-color 0.2s ease;
  white-space: nowrap;
}
.btn-primary {
  background: var(--accent-grad);
  color: var(--bg-0);
  box-shadow: 0 10px 30px -10px rgba(99, 102, 241, 0.55);
}
.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 40px -10px rgba(99, 102, 241, 0.7);
}
.btn-ghost {
  background: var(--surface);
  color: var(--text-strong);
  border-color: var(--border-strong);
  backdrop-filter: blur(8px);
}
.btn-ghost:hover {
  border-color: var(--accent-2);
  color: var(--text-strong);
}
.btn[disabled] {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none !important;
}

/* ============================================================ Hero */

.hero {
  position: relative;
  padding: 72px 0 72px;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 60px;
  align-items: center;
}

.hero-inner > * + * { margin-top: 28px; }
.hero-inner > .hero-title { margin-top: 22px; }
.hero-inner > .hero-lede { margin-top: 22px; }

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 6px 14px;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text-dim);
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-pill);
  backdrop-filter: blur(8px);
}
.pulse-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--accent-1);
  box-shadow: 0 0 0 0 rgba(34, 211, 238, 0.6);
  animation: pulse 2.2s ease-out infinite;
}
@keyframes pulse {
  0%   { box-shadow: 0 0 0 0 rgba(34, 211, 238, 0.55); }
  70%  { box-shadow: 0 0 0 10px rgba(34, 211, 238, 0); }
  100% { box-shadow: 0 0 0 0 rgba(34, 211, 238, 0); }
}

.hero-lede {
  font-size: clamp(1rem, 0.9rem + 0.3vw, 1.18rem);
  color: var(--text-dim);
  max-width: 60ch;
}

.hero-cta {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 8px;
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin-top: 44px;
  padding: 22px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  backdrop-filter: blur(10px);
}
.stat-value {
  font-family: var(--font-display);
  font-size: 1.4rem;
  color: var(--text-strong);
  font-weight: 600;
  background: var(--accent-grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.stat-label {
  font-size: 0.82rem;
  color: var(--text-dim);
  margin-top: 2px;
}

.hero-trust {
  margin-top: 36px;
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  color: var(--text-mute);
  font-size: 0.85rem;
}
.trust-list {
  list-style: none;
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  margin: 0; padding: 0;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--text-dim);
}
.trust-list li { letter-spacing: 0.02em; }

/* Hero visual: code window */
.hero-visual {
  position: relative;
  display: flex;
  justify-content: flex-end;
}
.window {
  width: 100%;
  max-width: 540px;
  background: var(--surface-strong);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-glow);
  transform: perspective(1200px) rotateY(-3deg) rotateX(4deg);
  transition: transform 0.5s ease;
}
.hero-visual:hover .window {
  transform: perspective(1200px) rotateY(-1deg) rotateX(2deg);
}
.window-head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px 16px;
  background: rgba(2, 6, 23, 0.6);
  border-bottom: 1px solid var(--border);
}
.window-head .dot {
  width: 11px; height: 11px;
  border-radius: 50%;
}
.dot-r { background: #ef4444; }
.dot-y { background: #f59e0b; }
.dot-g { background: #22c55e; }
.window-title {
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-mute);
}
.window-body {
  margin: 0;
  padding: 22px 24px;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  line-height: 1.7;
  color: var(--text);
  overflow-x: auto;
}
.c-key { color: #c084fc; }
.c-id  { color: #22d3ee; }
.c-str { color: #34d399; }
.c-fn  { color: #fbbf24; }
.c-c   { color: var(--text-mute); font-style: italic; }

@media (max-width: 980px) {
  .hero { padding: 48px 0 48px; }
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 48px;
  }
  .window { transform: none; }
  .hero-stats { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  .hero { padding: 32px 0 40px; }
  .hero-grid { gap: 36px; }
}
@media (max-width: 500px) {
  .hero-stats { grid-template-columns: 1fr; }
  .brand-tag { display: none; }
  .brand-name { font-size: 0.95rem; }
}

/* ============================================================ Section utilities */

section { padding: 88px 0; position: relative; }
@media (max-width: 700px) { section { padding: 64px 0; } }

.section-head { max-width: 720px; margin-bottom: 56px; }
.section-head--center { margin-left: auto; margin-right: auto; text-align: center; }

.section-eyebrow {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent-1);
  margin-bottom: 14px;
}
.section-title { margin-bottom: 16px; }
.section-lede {
  color: var(--text-dim);
  font-size: 1.05rem;
  max-width: 62ch;
}
.section-head--center .section-lede { margin-left: auto; margin-right: auto; }

/* ============================================================ Services */

.service-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}
@media (max-width: 1100px) { .service-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 820px)  { .service-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 540px)  { .service-grid { grid-template-columns: 1fr; } }

.service {
  position: relative;
  padding: 26px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  backdrop-filter: blur(8px);
  overflow: hidden;
  transition: transform 0.25s ease, border-color 0.25s ease, background 0.25s ease;
}
.service::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--accent-grad-soft);
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}
.service:hover {
  transform: translateY(-4px);
  border-color: var(--border-strong);
}
.service:hover::before { opacity: 1; }
.service > * { position: relative; }

.service-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px; height: 44px;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(34, 211, 238, 0.18), rgba(129, 140, 248, 0.18));
  color: var(--accent-1);
  margin-bottom: 18px;
  border: 1px solid var(--border-strong);
}
.service-icon svg { width: 22px; height: 22px; }

.service h3 { color: var(--text-strong); margin-bottom: 10px; }
.service p {
  color: var(--text-dim);
  font-size: 0.92rem;
  line-height: 1.6;
}
.service-tags {
  list-style: none;
  margin: 16px 0 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.service-tags li {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.02em;
  color: var(--text-dim);
  padding: 4px 10px;
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
}

/* ============================================================ AI section */

.ai-section {
  position: relative;
  background:
    radial-gradient(ellipse 70% 50% at 80% 50%, rgba(129, 140, 248, 0.08), transparent 70%),
    radial-gradient(ellipse 60% 50% at 20% 30%, rgba(34, 211, 238, 0.06), transparent 70%);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.ai-inner {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 60px;
  align-items: center;
}

.ai-eyebrow { color: var(--accent-3); }

.ai-list {
  list-style: none;
  padding: 0;
  margin: 32px 0 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.ai-list li {
  padding: 18px 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  display: flex;
  flex-direction: column;
  gap: 4px;
  transition: border-color 0.2s ease, background 0.2s ease;
}
.ai-list li:hover { border-color: var(--border-strong); background: var(--surface-strong); }
.ai-list strong {
  color: var(--text-strong);
  font-weight: 600;
  font-size: 0.98rem;
}
.ai-list span {
  color: var(--text-dim);
  font-size: 0.9rem;
}

/* AI visual diagram */
.ai-visual {
  position: relative;
  aspect-ratio: 4 / 3.6;
  background:
    radial-gradient(circle at center, rgba(99, 102, 241, 0.08), transparent 70%);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  overflow: hidden;
}
.ai-edges {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
}
.ai-edges path {
  fill: none;
  stroke: url(#aiedge);
  stroke-width: 1.5;
  stroke-dasharray: 5 6;
  animation: dashFlow 4s linear infinite;
}
.ai-edges path:nth-child(1) { stroke: rgba(34, 211, 238, 0.7); }
.ai-edges path:nth-child(2) { stroke: rgba(129, 140, 248, 0.7); }
.ai-edges path:nth-child(3) { stroke: rgba(34, 211, 238, 0.55); }
.ai-edges path:nth-child(4) { stroke: rgba(192, 132, 252, 0.7); }
@keyframes dashFlow {
  to { stroke-dashoffset: -22; }
}
.ai-node {
  position: absolute;
  min-width: 150px;
  padding: 12px 14px;
  background: var(--surface-strong);
  border: 1px solid var(--border-strong);
  border-radius: 12px;
  backdrop-filter: blur(8px);
  text-align: center;
  box-shadow: var(--shadow-soft);
}
.ai-node-title {
  color: var(--text-strong);
  font-size: 0.86rem;
  font-weight: 600;
}
.ai-node-meta {
  color: var(--text-dim);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.02em;
  margin-top: 2px;
}
.ai-node--root {
  top: 4%; left: 50%; transform: translateX(-50%);
  border-color: rgba(34, 211, 238, 0.4);
  box-shadow: 0 0 0 1px rgba(34, 211, 238, 0.18), var(--shadow-soft);
}
.ai-node--a { top: 42%; left: 6%; }
.ai-node--b { top: 42%; right: 6%; }
.ai-node--c { bottom: 4%; left: 18%; border-color: rgba(34, 211, 238, 0.3); }
.ai-node--d { bottom: 4%; right: 18%; border-color: rgba(192, 132, 252, 0.4); }

@media (max-width: 920px) {
  .ai-inner { grid-template-columns: 1fr; gap: 40px; }
  .ai-visual { max-width: 480px; margin: 0 auto; width: 100%; }
}

/* ============================================================ Why */

.why-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
@media (max-width: 900px) { .why-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 580px) { .why-grid { grid-template-columns: 1fr; } }

.why-card {
  position: relative;
  padding: 28px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  backdrop-filter: blur(8px);
  transition: border-color 0.2s ease, transform 0.2s ease;
}
.why-card:hover {
  border-color: var(--border-strong);
  transform: translateY(-3px);
}
.why-num {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.16em;
  color: var(--accent-1);
  margin-bottom: 14px;
}
.why-card h3 { color: var(--text-strong); margin-bottom: 8px; }
.why-card p { color: var(--text-dim); font-size: 0.93rem; }

/* ============================================================ Contact */

.contact-inner {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 60px;
  align-items: start;
}
@media (max-width: 900px) {
  .contact-inner { grid-template-columns: 1fr; gap: 40px; }
}

.contact-points {
  list-style: none;
  padding: 0;
  margin: 28px 0 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
  color: var(--text-dim);
  font-size: 0.95rem;
}
.contact-points li {
  display: flex;
  align-items: center;
  gap: 12px;
}
.contact-points svg {
  color: var(--accent-1);
  flex-shrink: 0;
  padding: 6px;
  background: var(--accent-grad-soft);
  border-radius: 50%;
  width: 32px; height: 32px;
}

/* Form */
.contact-form {
  background: var(--surface-strong);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  padding: 32px;
  backdrop-filter: blur(12px);
  box-shadow: var(--shadow-soft);
}
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  margin-bottom: 18px;
}
@media (max-width: 640px) { .form-row { grid-template-columns: 1fr; } }
.field { display: flex; flex-direction: column; gap: 8px; margin-bottom: 18px; }
.form-row .field { margin-bottom: 0; }
.field label {
  font-size: 0.85rem;
  color: var(--text);
  font-weight: 500;
}
.field label span { color: var(--accent-1); margin-left: 2px; }
.field input,
.field select,
.field textarea {
  width: 100%;
  padding: 12px 14px;
  background: rgba(2, 6, 23, 0.5);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  color: var(--text-strong);
  font-family: inherit;
  font-size: 0.95rem;
  transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}
.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--accent-2);
  background: rgba(2, 6, 23, 0.7);
  box-shadow: 0 0 0 3px rgba(129, 140, 248, 0.18);
}
.field textarea { resize: vertical; min-height: 120px; }
.field select {
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%2394a3b8' stroke-width='1.5' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 36px;
}
.field select option { background: var(--bg-1); color: var(--text); }

.field-error {
  font-size: 0.82rem;
  color: #fb7185;
  min-height: 1em;
}
.field.has-error input,
.field.has-error select,
.field.has-error textarea {
  border-color: #fb7185;
  box-shadow: 0 0 0 3px rgba(251, 113, 133, 0.15);
}

.hp-field {
  position: absolute;
  left: -9999px;
  width: 1px; height: 1px;
  overflow: hidden;
}

.form-foot {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-top: 18px;
  flex-wrap: wrap;
}
.form-note {
  color: var(--text-mute);
  font-size: 0.78rem;
  flex: 1;
  min-width: 220px;
}

.btn-spinner {
  display: none;
  width: 14px; height: 14px;
  border-radius: 50%;
  border: 2px solid rgba(11, 17, 32, 0.3);
  border-top-color: var(--bg-0);
  animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.is-loading .btn-label { opacity: 0.6; }
.is-loading .btn-spinner { display: inline-block; }

.form-status {
  margin-top: 18px;
  padding: 14px 16px;
  border-radius: var(--radius);
  font-size: 0.92rem;
  display: none;
}
.form-status.is-success {
  display: block;
  background: rgba(34, 197, 94, 0.1);
  border: 1px solid rgba(34, 197, 94, 0.3);
  color: #86efac;
}
.form-status.is-error {
  display: block;
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #fca5a5;
}

/* ============================================================ Footer */

.site-footer {
  border-top: 1px solid var(--border);
  padding: 40px 0 calc(40px + env(safe-area-inset-bottom, 0px));
  background: rgba(6, 9, 18, 0.6);
  backdrop-filter: blur(8px);
}
.footer-inner {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1.2fr;
  gap: 30px;
  align-items: center;
}
@media (max-width: 800px) {
  .footer-inner {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 24px;
  }
}
.footer-brand {
  display: flex;
  align-items: center;
  gap: 14px;
}
@media (max-width: 800px) {
  .footer-brand { justify-content: center; }
}
.footer-tag {
  color: var(--text-dim);
  font-size: 0.85rem;
  margin-top: 2px;
}
.footer-links {
  display: flex;
  gap: 26px;
  justify-content: center;
  flex-wrap: wrap;
}
.footer-links a {
  color: var(--text-dim);
  font-size: 0.9rem;
  font-weight: 500;
  transition: color 0.15s ease;
}
.footer-links a:hover { color: var(--text-strong); }
.footer-meta {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 10px;
  color: var(--text-mute);
  font-size: 0.82rem;
}
@media (max-width: 800px) { .footer-meta { justify-content: center; } }

/* ============================================================ Reveal on scroll */

.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001s !important;
    transition-duration: 0.001s !important;
  }
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; }
}
