/* ════════════════════════════════════════════
   PANCAKE DRAGON — Main Stylesheet
   Palette: Amber #FF9B20 | Cyan #00E5FF | Dark #0a0a0f
════════════════════════════════════════════ */

/* ── Reset & Base ─────────────────────────── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --amber:     #FF9B20;
  --amber-dim: #c97010;
  --cyan:      #00E5FF;
  --cyan-dim:  #009db3;
  --dark:      #0a0a0f;
  --dark-glass: rgba(10, 10, 20, 0.72);
  --white:     #f0f0f0;
  --mono:      'Roboto Mono', monospace;
  --sans:      'Montserrat', sans-serif;
}

html, body {
  height: 100%;
  overflow: hidden;            /* single-screen hero only */
  background: var(--dark);
  color: var(--white);
  font-family: var(--sans);
}

/* ── HERO SECTION ────────────────────────── */
#hero {
  position: relative;
  width: 100%;
  height: 100dvh;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  overflow: hidden;
}

#hero-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  z-index: 0;
  /* Smooth loop — hide the one-frame flash at loop point */
  transition: opacity 0.3s ease;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  /* Gentle vignette: dark edges, clear centre */
  background:
    radial-gradient(ellipse at center, transparent 40%, rgba(10,10,20,0.55) 100%),
    linear-gradient(to top, rgba(10,10,20,0.70) 0%, transparent 35%),
    linear-gradient(to bottom, rgba(10,10,20,0.45) 0%, transparent 25%);
  z-index: 1;
}

/* ── CONTACT BUTTON ──────────────────────── */
.hero-cta {
  position: relative;
  z-index: 2;
  margin-bottom: clamp(2.5rem, 7vh, 5rem);
}

.btn-contact {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.9rem 2.8rem;
  background: transparent;
  border: 2px solid var(--amber);
  color: var(--amber);
  font-family: var(--sans);
  font-size: clamp(0.85rem, 2vw, 1rem);
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  cursor: pointer;
  border-radius: 2px;
  outline: none;
  overflow: hidden;
  transition: color 0.3s ease, border-color 0.3s ease;
}

.btn-contact:hover,
.btn-contact:focus-visible {
  color: var(--dark);
  border-color: var(--amber);
}

/* Fill sweep on hover */
.btn-contact::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--amber);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.35s cubic-bezier(0.4,0,0.2,1);
  z-index: 0;
}
.btn-contact:hover::before,
.btn-contact:focus-visible::before {
  transform: scaleX(1);
}

.btn-label {
  position: relative;
  z-index: 1;
}

/* Neon glow pulse ring */
.btn-glow {
  position: absolute;
  inset: -6px;
  border-radius: 4px;
  border: 1.5px solid var(--amber);
  opacity: 0;
  animation: glow-pulse 2.8s ease-in-out infinite;
}

@keyframes glow-pulse {
  0%, 100% { opacity: 0; transform: scale(1); }
  50%       { opacity: 0.4; transform: scale(1.06); }
}

/* ── DIALOG OVERLAY ──────────────────────── */
.dialog-overlay {
  position: fixed;
  inset: 0;
  background: rgba(5, 5, 12, 0.80);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 100;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s ease;
}

.dialog-overlay.active {
  opacity: 1;
  pointer-events: all;
}

/* ── DIALOG ──────────────────────────────── */
dialog#contact-dialog {
  display: flex;
  flex-direction: column;
  gap: 1.4rem;
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -48%) scale(0.96);
  width: min(90vw, 560px);
  max-height: 92dvh;
  overflow-y: auto;
  background: var(--dark-glass);
  border: 1px solid rgba(255,155,32,0.35);
  border-top: 2px solid var(--amber);
  border-radius: 4px;
  padding: 2.4rem 2.6rem 2rem;
  box-shadow:
    0 0 40px rgba(255,155,32,0.12),
    0 0 80px rgba(0,0,0,0.6),
    inset 0 0 60px rgba(0,229,255,0.03);
  z-index: 101;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s ease, transform 0.35s cubic-bezier(0.34,1.56,0.64,1);

  /* Override user-agent dialog styles */
  margin: 0;
  color: var(--white);
  scrollbar-width: thin;
  scrollbar-color: var(--amber-dim) transparent;
}

dialog#contact-dialog::-webkit-scrollbar { width: 4px; }
dialog#contact-dialog::-webkit-scrollbar-track { background: transparent; }
dialog#contact-dialog::-webkit-scrollbar-thumb { background: var(--amber-dim); border-radius: 2px; }

dialog#contact-dialog.open {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
  pointer-events: all;
}

/* Cyan accent line at bottom */
dialog#contact-dialog::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(to right, transparent, var(--cyan), transparent);
  opacity: 0.5;
}

/* ── DIALOG CLOSE BUTTON ─────────────────── */
.dialog-close {
  position: absolute;
  top: 1.1rem;
  right: 1.2rem;
  background: transparent;
  border: 1px solid rgba(255,155,32,0.3);
  color: var(--amber);
  width: 2rem;
  height: 2rem;
  border-radius: 2px;
  font-size: 0.75rem;
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: background 0.2s, border-color 0.2s;
}

.dialog-close:hover {
  background: rgba(255,155,32,0.15);
  border-color: var(--amber);
}

/* ── DIALOG HEADER ───────────────────────── */
.dialog-header {
  padding-right: 2rem;
}

.dialog-eyebrow {
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--cyan);
  margin-bottom: 0.35rem;
  opacity: 0.85;
}

.dialog-header h2 {
  font-size: clamp(1.4rem, 4vw, 1.85rem);
  font-weight: 900;
  letter-spacing: 0.03em;
  color: var(--white);
  line-height: 1.1;
}

/* ── FORM ────────────────────────────────── */
#contact-form {
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
}

.field-group {
  display: flex;
  flex-direction: column;
  gap: 0.38rem;
}

label {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(240,240,240,0.65);
}

.required {
  color: var(--amber);
}

input,
select,
textarea {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,155,32,0.22);
  border-radius: 2px;
  color: var(--white);
  font-family: var(--sans);
  font-size: 0.9rem;
  padding: 0.65rem 0.85rem;
  outline: none;
  transition: border-color 0.25s, box-shadow 0.25s, background 0.25s;
  width: 100%;
  appearance: none;
  -webkit-appearance: none;
}

input::placeholder,
textarea::placeholder {
  color: rgba(240,240,240,0.28);
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--amber);
  background: rgba(255,155,32,0.06);
  box-shadow: 0 0 0 3px rgba(255,155,32,0.12);
}

/* Invalid highlight */
input:user-invalid,
select:user-invalid,
textarea:user-invalid {
  border-color: #ff4f4f;
}

select {
  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 fill='%23FF9B20' d='M6 8L0 0h12z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.9rem center;
  padding-right: 2.2rem;
}

select option {
  background: #12121e;
  color: var(--white);
}

textarea {
  resize: vertical;
  min-height: 90px;
  line-height: 1.55;
}

/* ── FORM STATUS ─────────────────────────── */
.form-status {
  font-family: var(--mono);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  min-height: 1.2em;
  text-align: center;
  transition: color 0.2s;
}

.form-status.success { color: #50fa7b; }
.form-status.error   { color: #ff5555; }

/* ── SUBMIT BUTTON ───────────────────────── */
.btn-submit {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  width: 100%;
  padding: 0.85rem 1rem;
  background: var(--amber);
  border: none;
  border-radius: 2px;
  color: var(--dark);
  font-family: var(--sans);
  font-size: 0.88rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  cursor: pointer;
  margin-top: 0.3rem;
  overflow: hidden;
  transition: background 0.25s, box-shadow 0.25s, transform 0.15s;
}

.btn-submit:hover:not(:disabled) {
  background: #ffb347;
  box-shadow: 0 0 24px rgba(255,155,32,0.45);
  transform: translateY(-1px);
}

.btn-submit:active:not(:disabled) {
  transform: translateY(0);
}

.btn-submit:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}

/* Spinner */
.submit-spinner {
  display: none;
  width: 1rem;
  height: 1rem;
  border: 2.5px solid rgba(10,10,20,0.3);
  border-top-color: var(--dark);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

.btn-submit.loading .submit-spinner { display: block; }
.btn-submit.loading .submit-label   { opacity: 0.7; }

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ── SCROLLBAR (global, minimal) ─────────── */
::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--amber-dim); border-radius: 2px; }

/* ── RESPONSIVE ADJUSTMENTS ──────────────── */
@media (max-width: 480px) {
  dialog#contact-dialog {
    padding: 2rem 1.4rem 1.6rem;
  }
}
