/* ===================================================================
   Mirtilos Goiás — splash page
   Tokens
   Navy deep   #142c49   background scrim / body
   Navy mid    #1d4571   ribbon (atacado) fill
   Gold        #d9a441   ribbon (varejo) fill / accents
   Gold deep   #a9761f   ribbon borders / shadows
   Cream       #f6ecc9   light text on navy, modal surface
   Paper       #fffaf0   modal background
   Display face: Fraunces  |  UI face: Inter
=================================================================== */

:root {
  --navy-deep: #142c49;
  --navy-mid: #1d4571;
  --navy-line: #0d1f36;
  --gold: #d9a441;
  --gold-deep: #a9761f;
  --cream: #f6ecc9;
  --paper: #fffaf0;
  --ink: #16283e;

  --font-display: "Fraunces", Georgia, serif;
  --font-ui: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  background: var(--navy-deep);
  font-family: var(--font-ui);
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }

button { font-family: inherit; }

/* ---------------- Stage / video ---------------- */

.stage {
  position: relative;
  min-height: 100dvh;
  width: 100%;
  overflow: hidden;
  isolation: isolate;
}

.bg-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
}

.bg-scrim {
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(to bottom,
      rgba(10, 22, 39, 0.55) 0%,
      rgba(10, 22, 39, 0.25) 30%,
      rgba(10, 22, 39, 0.55) 62%,
      rgba(8, 18, 32, 0.88) 100%);
}

/* ---------------- Hero ---------------- */

.hero {
  position: relative;
  z-index: 2;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: clamp(18px, 4vh, 30px);
  padding: calc(28px + var(--safe-top)) 20px calc(36px + var(--safe-bottom));
  text-align: center;
}

.logo-wrap {
  width: min(72vw, 320px);
  animation: float-in 900ms cubic-bezier(.2,.8,.2,1) both, hover-float 6s ease-in-out 900ms infinite;
  filter: drop-shadow(0 10px 26px rgba(0,0,0,0.45));
}

.logo { width: 100%; height: auto; }

@keyframes float-in {
  from { opacity: 0; transform: translateY(18px) scale(.94); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes hover-float {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-6px); }
}

.tagline {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(1.05rem, 3.4vw, 1.35rem);
  color: var(--cream);
  margin: 0;
  text-shadow: 0 2px 10px rgba(0,0,0,0.5);
  letter-spacing: 0.01em;
}

/* ---------------- Ribbon buttons ---------------- */

.cta-group {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  width: 100%;
  max-width: 380px;
  margin-top: 4px;
}

.ribbon {
  --notch: 5%;
  position: relative;
  width: 100%;
  padding: 16px 30px;
  clip-path: polygon(
    0% 0%, 100% 0%,
    100% 38%, calc(100% - var(--notch)) 50%, 100% 62%,
    100% 100%, 0% 100%,
    0% 62%, var(--notch) 50%, 0% 38%
  );
  border: none;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  text-decoration: none;
  transition: transform 180ms ease, filter 180ms ease;
  box-shadow: 0 8px 20px rgba(0,0,0,0.35);
}

.ribbon:hover { transform: translateY(-2px); filter: brightness(1.05); }
.ribbon:active { transform: translateY(0); filter: brightness(0.97); }
.ribbon:focus-visible {
  outline: 3px solid var(--cream);
  outline-offset: 4px;
}

.ribbon--gold {
  background: linear-gradient(180deg, #e6b85c 0%, var(--gold) 55%, var(--gold-deep) 100%);
}
.ribbon--navy {
  background: linear-gradient(180deg, #2a5688 0%, var(--navy-mid) 55%, var(--navy-line) 100%);
}

.ribbon__eyebrow {
  font-family: var(--font-ui);
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0.85;
}
.ribbon--gold .ribbon__eyebrow { color: var(--navy-line); }
.ribbon--navy .ribbon__eyebrow { color: var(--cream); }

.ribbon__label {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.1rem, 4vw, 1.3rem);
  letter-spacing: 0.02em;
}
.ribbon--gold .ribbon__label { color: var(--navy-line); }
.ribbon--navy .ribbon__label { color: var(--paper); }

.stars {
  color: var(--gold);
  letter-spacing: 0.4em;
  font-size: 0.85rem;
  padding-left: 0.4em; /* optical centering for letter-spacing */
  text-shadow: 0 2px 6px rgba(0,0,0,0.5);
}

/* ---------------- Modal ---------------- */

.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 10;
  background: rgba(10, 20, 34, 0.72);
  backdrop-filter: blur(3px);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 220ms ease;
}

.modal-overlay.is-open {
  opacity: 1;
  pointer-events: auto;
}

.modal {
  position: relative;
  width: 100%;
  max-width: 480px;
  max-height: 92dvh;
  overflow-y: auto;
  background: var(--paper);
  border-radius: 22px 22px 0 0;
  padding: 28px 24px calc(28px + var(--safe-bottom));
  transform: translateY(24px);
  transition: transform 260ms cubic-bezier(.2,.8,.2,1);
}

@media (min-width: 560px) {
  .modal-overlay { align-items: center; padding: 20px; }
  .modal { border-radius: 20px; }
}

.modal-overlay.is-open .modal { transform: translateY(0); }

.modal__close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: rgba(20,44,73,0.08);
  color: var(--ink);
  font-size: 1rem;
  cursor: pointer;
}

.modal__title {
  font-family: var(--font-display);
  color: var(--navy-deep);
  font-size: 1.5rem;
  margin: 4px 0 2px;
}

.modal__subtitle {
  font-size: 0.9rem;
  color: #5a6472;
  margin: 0 0 20px;
  line-height: 1.4;
}

/* ---------------- Form ---------------- */

.form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--ink);
  text-align: left;
}

.field input,
.field select {
  font-family: var(--font-ui);
  font-size: 1rem;
  font-weight: 400;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1.5px solid #d9d3c2;
  background: #fff;
  color: var(--ink);
  appearance: none;
  -webkit-appearance: none;
}

.field select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23142c49' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 18px;
  padding-right: 36px;
}

.field input:focus,
.field select:focus {
  outline: none;
  border-color: var(--navy-mid);
  box-shadow: 0 0 0 3px rgba(29,69,113,0.15);
}

.field--other { animation: field-in 200ms ease both; }
@keyframes field-in {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}

.submit-btn {
  margin-top: 6px;
  padding: 15px 20px;
  border: none;
  border-radius: 12px;
  background: var(--navy-deep);
  color: var(--paper);
  font-family: var(--font-ui);
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: 0.01em;
  cursor: pointer;
  transition: background 160ms ease, transform 160ms ease;
}
.submit-btn:hover { background: var(--navy-mid); }
.submit-btn:active { transform: scale(0.98); }
.submit-btn:disabled { opacity: 0.6; cursor: default; }

.form__status {
  min-height: 1.2em;
  font-size: 0.88rem;
  text-align: center;
  margin: 2px 0 0;
}
.form__status[data-state="ok"] { color: #1c7a44; }
.form__status[data-state="error"] { color: #b3261e; }

/* ---------------- Reduced motion ---------------- */

@media (prefers-reduced-motion: reduce) {
  .logo-wrap { animation: none; }
  .ribbon, .submit-btn, .modal-overlay, .modal { transition: none; }
}

/* ---------------- Small phones ---------------- */

@media (max-width: 340px) {
  .ribbon { padding: 14px 22px; }
}
