/* Contact page – conversational form + video globe + high-tech hero background */
:root{
  --card: #131417;
  --ink: #e6f6e6;
  --muted: #a7b3a7;
  --brand: #00f700;
  --border: #202228;
}

/* ========= HERO (Matrix-inspired) ========= */
.hero{
  position: relative;
  isolation: isolate; /* circuit layer sits between bg and content */
  overflow: clip;
  padding-block: 0; /* spacing is on .hero-grid */
}

/* Base lift + soft vignette */
.hero::before{
  content: "";
  position: absolute; inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(120% 100% at 15% 10%, rgba(0,247,0,.08), rgba(0,0,0,0)),
    linear-gradient(180deg, rgba(0,247,0,0.06), rgba(0,0,0,0));
}

/* Matrix-like animated grid (very subtle) */
.hero::after{
  content: "";
  position: absolute; inset: -10% 0 -10% 0;
  z-index: 0;
  pointer-events: none;
  opacity: .40;
  background:
    /* vertical lines */
    repeating-linear-gradient(
      to right,
      rgba(166,255,0,.10) 0 1px,
      transparent 1px 64px
    ),
    /* horizontal lines */
    repeating-linear-gradient(
      to bottom,
      rgba(0,247,0,.08) 0 1px,
      transparent 1px 36px
    );
  animation: gridDrift 18s linear infinite;
  mix-blend-mode: screen;
}
@keyframes gridDrift{
  0%   { background-position: 0 0, 0 0; }
  100% { background-position: -128px 180px, 0 180px; }
}

/* SVG circuit layer with traveling pulses (inserted by JS) */
.hero-circuit{
  position: absolute;
  inset: 0;
  z-index: 1;        /* above bg, below content */
  pointer-events: none;
  opacity: .85;
  mix-blend-mode: screen;
}
.hero-circuit .circuit-base{
  fill: none;
  stroke: rgba(0,247,0,.18);
  stroke-width: 2;
  filter: drop-shadow(0 0 8px rgba(0,247,0,.22));
}
.hero-circuit .circuit-spark{
  fill: none;
  stroke: #a6ff00;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-dasharray: 1 140;
  animation: dashFlow 2.6s linear infinite;
  filter: drop-shadow(0 0 10px rgba(166,255,0,.85)) drop-shadow(0 0 28px rgba(166,255,0,.35));
}
.hero-circuit .circuit-spark.delay-1{ animation-delay: .4s; }
.hero-circuit .circuit-spark.delay-2{ animation-delay: .9s; }
@keyframes dashFlow{
  to { stroke-dashoffset: -160; }
}

/* Content grid sits above tech layers */
.hero-grid{
  position: relative;
  z-index: 2; /* over circuit + bg */
  display: grid;
  grid-template-columns: 1.05fr 1.2fr; /* give the globe more room on desktop */
  gap: clamp(16px, 4vw, 28px);
  align-items: center;
  padding-block: clamp(28px, 6vw, 48px);
}

.hero-title{
  font-size: clamp(28px, 6vw, 44px);
  margin: 0 0 6px 0;
}
.hero-sub{ margin: 0 0 14px 0; color: var(--muted); }

.hero-cta{ display: flex; gap: 10px; flex-wrap: wrap; }
.btn-primary, .btn-ghost{
  display: inline-flex; align-items: center; justify-content: center;
  padding: 10px 14px; border-radius: 10px; line-height: 1; text-decoration: none;
  font-weight: 600; border: 1px solid transparent;
}
.btn-primary{
  background: var(--brand); color: #041104; border-color: var(--brand);
  box-shadow: 0 8px 24px -10px rgba(0,247,0,.55);
}
.btn-primary:hover{ text-decoration: none; transform: translateY(-1px); }
.btn-primary:disabled,
.btn-primary[disabled]{
  opacity: .55;
  cursor: not-allowed;
  box-shadow: none;
  transform: none;
}
.btn-primary:disabled:hover,
.btn-primary[disabled]:hover{ transform: none; }
.btn-ghost{ color: var(--ink); border-color: #2a2b31; background: rgba(20,22,26,.8); }
.btn-ghost:hover{ text-decoration: none; transform: translateY(-1px); }

/* ========= Globe card (video) ========= */
.globe-wrap{
  position: relative;
  aspect-ratio: 16 / 9;            /* match your footage → minimal crop */
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  background:
    radial-gradient(120% 100% at 15% 10%, rgba(0,247,0,.06), rgba(0,0,0,0));
  box-shadow:
    0 12px 40px -22px rgba(0,0,0,.8),
    inset 0 0 0 1px rgba(0,0,0,.4);
  transform-origin: center center;  /* for CRT-off animation */
}

.globe-video{
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: 50% 50%;
  opacity: .96;
  filter: saturate(130%) contrast(110%) brightness(105%);
}

/* Decorative frame glow */
.globe-wrap::after{
  content: "";
  position: absolute; inset: 0;
  pointer-events: none;
  box-shadow:
    inset 0 0 0 1px rgba(0,247,0,.12),
    inset 0 0 80px rgba(0,247,0,.12);
}

/* TV-off animation class (optional) */
.globe-wrap.crt-off{
  animation: crtClose 680ms cubic-bezier(.4,.0,.2,1) forwards;
}
.globe-wrap.crt-off::before{
  content:"";
  position:absolute; left:0; right:0; top:50%; height:2px;
  background: rgba(204,255,199,.9);
  box-shadow: 0 0 14px rgba(166,255,0,.9), 0 0 40px rgba(166,255,0,.6);
  transform: translateY(-1px);
  opacity: 0;
  animation: crtBeam 680ms cubic-bezier(.4,.0,.2,1) forwards;
}
@keyframes crtClose{
  0%   { transform: scaleY(1) scaleX(1);   opacity: 1; filter: none; }
  80%  { transform: scaleY(.05) scaleX(1); opacity: 1; filter: brightness(200%); }
  100% { transform: scaleY(0)  scaleX(.7); opacity: 0; filter: brightness(240%); }
}
@keyframes crtBeam{
  0%   { opacity: 0; }
  60%  { opacity: 1; }
  100% { opacity: 0; }
}

/* ========= Utilities ========= */
.sr-only{
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}
.hidden{ display: none !important; }

/* ========= Form & Meta ========= */
.form-card{
  background: linear-gradient(180deg, rgba(19,20,23,.92), rgba(19,20,23,.92));
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: 0 14px 44px -28px rgba(0,0,0,.8);
  padding: clamp(14px, 3.5vw, 22px);
}
.form-head{ margin-bottom: 18px; }
.form-title{ margin: 0 0 4px 0; }
.form-sub{ margin: 0; color: var(--muted); }

/* Form toggle buttons */
.form-toggle{
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 20px;
}

.toggle-btn{
  display: grid;
  gap: 4px;
  padding: 12px 14px;
  border: 1px solid #2a2b31;
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(24,26,30,.8), rgba(24,26,30,.8));
  color: var(--muted);
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: left;
}

.toggle-btn strong{
  display: block;
  color: var(--ink);
  font-size: 15px;
}

.toggle-btn small{
  display: block;
  font-size: 13px;
  color: var(--muted);
}

.toggle-btn:hover{
  border-color: rgba(0,247,0,.3);
  background: linear-gradient(180deg, rgba(30,34,38,.9), rgba(24,26,30,.9));
}

.toggle-btn.active{
  border-color: var(--brand);
  background: linear-gradient(180deg, rgba(0,247,0,.12), rgba(0,247,0,.06));
  box-shadow: 0 0 20px -8px rgba(0,247,0,.4);
}

.toggle-btn.active strong{
  color: var(--brand);
}

/* Form error/success messages */
.form-error{
  display: none;
  margin-bottom: 16px;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid rgba(255,122,122,.45);
  background: rgba(255,122,122,.12);
  color: #ffd6d6;
  font-size: 14px;
  line-height: 1.5;
}
.form-error[hidden]{ display: none; }

.success-message{
  padding: 20px 18px;
  margin-bottom: 16px;
  text-align: center;
  border-radius: 12px;
  border: 1px solid rgba(0,247,0,.3);
  background: rgba(0,247,0,.1);
  color: var(--ink);
  font-size: 16px;
  line-height: 1.6;
  box-shadow: 0 0 24px -10px rgba(0,247,0,.3);
}

/* Forms */
form{
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn{
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.grid.two{ display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

.field{ display: grid; gap: 6px; margin-block: 10px; }
.field > span, .field > legend{ color: var(--muted); font-size: 14px; }
.field abbr{ color: var(--brand); text-decoration: none; }

.field input, .field select, .field textarea{
  width: 100%; padding: 10px 12px;
  border: 1px solid #2a2b31; border-radius: 10px; background: rgba(0,0,0,.25); color: var(--ink);
  font-family: inherit;
  font-size: 15px;
}
.field input:focus, .field select:focus, .field textarea:focus{ 
  outline: 2px solid var(--brand); 
  outline-offset: 2px;
  border-color: var(--brand);
}

.err{ 
  color: #ff7a7a; 
  font-size: 13px; 
  min-height: 16px;
  display: block;
}

/* Checkboxes */
.choices{ display: grid; gap: 8px; margin-top: 8px; }
.check{ 
  display: inline-flex; 
  align-items: center; 
  gap: 10px; 
  padding: 10px 12px; 
  border: 1px solid #2a2b31; 
  border-radius: 10px;
  background: rgba(0,0,0,.15);
  cursor: pointer;
  transition: all 0.2s ease;
}
.check:hover{
  border-color: rgba(0,247,0,.3);
  background: rgba(0,0,0,.25);
}
.check input[type="checkbox"]{
  width: auto;
  cursor: pointer;
}

/* Fieldset styling */
fieldset.field{
  border: 1px solid #2a2b31;
  border-radius: 12px;
  padding: 16px;
  background: rgba(0,0,0,.15);
}
fieldset.field legend{
  padding: 0 8px;
  font-weight: 600;
  color: var(--ink);
}

/* Actions */
.actions{ 
  display: flex; 
  justify-content: space-between; 
  gap: 10px; 
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid #2a2b31;
}

.fineprint{
  margin-top: 12px;
  font-size: 13px;
  color: var(--muted);
  text-align: center;
}

/* Meta section */
.meta-grid{ display: grid; grid-template-columns: repeat(3,1fr); gap: 16px; }
.meta-block{ 
  border: 1px solid var(--border); 
  border-radius: 10px; 
  padding: 16px; 
  background: rgba(0,0,0,.2); 
}
.meta-block h3{
  margin: 0 0 8px 0;
  font-size: 16px;
}
.meta-block p{
  margin: 4px 0;
  color: var(--muted);
  font-size: 14px;
}

/* Responsive */
@media (max-width: 980px){
  .hero-grid{ grid-template-columns: 1fr; }
}
@media (max-width: 720px){
  .grid.two{ grid-template-columns: 1fr; }
  .form-toggle{ grid-template-columns: 1fr; }
  .meta-grid{ grid-template-columns: 1fr; }
}
