/* ============================================================
   Virtish Visva R — Coming Soon
   style.css
   ============================================================ */


/* ── Design tokens ─────────────────────────────────────────── */
:root {
  --accent:       #BF4646;
  --accent-rgb:   191, 70, 70;
  --bg:           #EDDCC6;
  --bg-secondary: #F6EEE5;
  --heading:      #2A2A2A;
  --body-color:   #5A4A45;
  --border:       rgba(191, 70, 70, 0.15);
  --shadow-soft:  0 25px 70px rgba(42,42,42,0.10),
                  0 4px  14px rgba(42,42,42,0.05);
  --ease:         cubic-bezier(.16, .8, .24, 1);
}


/* ── Reset ──────────────────────────────────────────────────── */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}


/* ── No scroll — full-screen lock ──────────────────────────── */
html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
}


/* ── Base body ──────────────────────────────────────────────── */
body {
  background: #EDDCC6;
  font-family: 'Inter', sans-serif;
  color: var(--body-color);
  display: grid;
  place-items: center;
  position: relative;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

::selection {
  background: rgba(191, 70, 70, 0.18);
  color: var(--heading);
}


/* ── Aurora canvas ──────────────────────────────────────────── */
#aurora {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}


/* ── Editorial grid lines ───────────────────────────────────── */
.grid-lines {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  display: flex;
  justify-content: space-between;
  max-width: 1400px;
  margin: 0 auto;
  left: 50%;
  transform: translateX(-50%);
}

.grid-lines i {
  width: 1px;
  height: 100%;
  background: linear-gradient(
    to bottom,
    transparent 0%,
    var(--border) 12%,
    var(--border) 88%,
    transparent 100%
  );
  opacity: .65;
}


/* ── Corner registration marks ──────────────────────────────── */
.corner-mark {
  position: fixed;
  width: 18px;
  height: 18px;
  z-index: 3;
  pointer-events: none;
  opacity: 0;
  transform: scale(.6);
  animation: markIn .8s var(--ease) forwards;
}

.corner-mark::before,
.corner-mark::after {
  content: '';
  position: absolute;
  background: rgba(var(--accent-rgb), 0.40);
}

.corner-mark::before { width: 100%; height: 1px; top: 50%;  left: 0; }
.corner-mark::after  { width: 1px; height: 100%; left: 50%; top: 0;  }

.corner-tl { top: 28px;    left: 28px;   animation-delay: .15s; }
.corner-tr { top: 28px;    right: 28px;  animation-delay: .25s; }
.corner-bl { bottom: 28px; left: 28px;   animation-delay: .25s; }
.corner-br { bottom: 28px; right: 28px;  animation-delay: .35s; }

@keyframes markIn { to { opacity: 1; transform: scale(1); } }


/* ── Rotating diamond mark ──────────────────────────────────── */
.diamond-wrap {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 1;
  pointer-events: none;
  width: min(62vw, 560px);
  height: min(62vw, 560px);
  transform: translate(-50%, -50%);
  will-change: transform;
  transition: transform .6s var(--ease);
}

.diamond-spin {
  width: 100%;
  height: 100%;
  position: relative;
  animation: spin 90s linear infinite;
}

.diamond-shape {
  position: absolute;
  inset: 18%;
  border: 1px solid rgba(var(--accent-rgb), 0.14);
  border-radius: 28px;
  transform: rotate(45deg);
}

.diamond-dot {
  position: absolute;
  top: 0;
  left: 50%;
  width: 5px;
  height: 5px;
  margin-left: -2.5px;
  background: var(--accent);
  border-radius: 50%;
  opacity: .50;
}

@keyframes spin { to { transform: rotate(360deg); } }


/* ── Hero container ─────────────────────────────────────────── */
.hero {
  position: relative;
  z-index: 2;
  max-width: 880px;
  width: 100%;
  padding: clamp(4rem, 8vh, 7rem) 1.75rem clamp(3rem, 6vh, 5rem);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}


/* ── Fade-up entrance animation ─────────────────────────────── */
.fade-up {
  opacity: 0;
  transform: translateY(18px);
  animation: fadeUp .9s var(--ease) forwards;
}

@keyframes fadeUp { to { opacity: 1; transform: translateY(0); } }


/* ── Name heading — Canela ──────────────────────────────────── */
h1.name {
  font-family: 'Canela', Georgia, serif;
  font-weight: 300;                        /* Canela regular */
  font-size: clamp(2.6rem, 8.5vw, 6.5rem);
  line-height: 1.04;
  letter-spacing: -0.015em;
  color: var(--heading);
  margin-bottom: clamp(1.2rem, 3vw, 2.25rem);
  animation-delay: .25s;
}

/* "R" — Canela Bold in crimson */
h1.name .accent-letter {
  font-family: 'Canela', Georgia, serif;
  font-weight: 700;
  color: var(--accent);
}


/* ── Italic quote ───────────────────────────────────────────── */
.quote {
  font-family: 'Fraunces', serif;
  font-style: italic;
  font-weight: 400;
  font-size: clamp(1.05rem, 2.2vw, 1.5rem);
  line-height: 1.5;
  color: var(--heading);
  opacity: .86;
  max-width: 580px;
  margin-bottom: 1.1rem;
  animation-delay: .45s;
}


/* ── Body copy ──────────────────────────────────────────────── */
.body-text {
  font-family: 'Inter', sans-serif;
  font-weight: 400;
  font-size: clamp(0.9rem, 1.3vw, 1.0375rem);
  line-height: 1.75;
  color: var(--body-color);
  max-width: 440px;
  margin-bottom: clamp(1.6rem, 3.5vw, 2.5rem);
  animation-delay: .6s;
}


/* ── Statement with rule beneath ───────────────────────────── */
.statement {
  position: relative;
  font-family: 'Fraunces', serif;
  font-style: italic;
  font-weight: 500;
  font-size: clamp(1.2rem, 2.5vw, 1.75rem);
  line-height: 1.4;
  color: var(--accent);
  margin-bottom: clamp(2rem, 4vw, 3rem);
  padding-bottom: 1.2rem;
  animation-delay: .75s;
}

.statement::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 44px;
  height: 1px;
  background: rgba(var(--accent-rgb), 0.38);
}


/* ── Signup form wrapper ─────────────────────────────────────── */
.signup-form {
  width: 100%;
  max-width: 440px;
  animation-delay: .9s;
}


/* ── Glassmorphism card ──────────────────────────────────────── */
.form-card {
  display: flex;
  flex-direction: column;
  background: rgba(246, 238, 229, 0.52);
  backdrop-filter: blur(22px) saturate(150%);
  -webkit-backdrop-filter: blur(22px) saturate(150%);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 8px;
  box-shadow: var(--shadow-soft);
  transition:
    border-color .45s var(--ease),
    box-shadow   .45s var(--ease),
    opacity      .5s  var(--ease),
    transform    .5s  var(--ease);
}

.form-card:hover,
.form-card:focus-within {
  border-color: rgba(var(--accent-rgb), 0.30);
  box-shadow:
    0 28px 75px rgba(42,42,42,0.12),
    0 4px  14px rgba(42,42,42,0.06);
}


/* ── Inputs ──────────────────────────────────────────────────── */
.form-card input {
  width: 100%;
  background: transparent;
  border: none;
  outline: none;
  border-bottom: 1px solid var(--border);
  font-family: 'Inter', sans-serif;
  font-size: 0.94rem;
  font-weight: 400;
  color: var(--heading);
  padding: 14px 18px;
  transition: border-color .4s var(--ease);
}

.form-card input:last-of-type { border-bottom: none; }
.form-card input:focus        { border-color: rgba(var(--accent-rgb), 0.38); }
.form-card input::placeholder { color: rgba(90, 74, 69, 0.50); }


/* ── Submit button ───────────────────────────────────────────── */
.form-card button {
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  font-size: 0.9rem;
  letter-spacing: 0.01em;
  color: var(--bg);
  background: var(--accent);
  border: none;
  border-radius: 18px;
  padding: 14px;
  margin-top: 6px;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition:
    background    .38s var(--ease),
    box-shadow    .38s var(--ease),
    filter        .45s var(--ease),
    transform     .45s var(--ease),
    opacity       .3s  var(--ease);
}

.form-card button:hover   { filter:brightness(1.08); transform:translateY(-1px); box-shadow:0 12px 26px rgba(var(--accent-rgb),.30); }
.form-card button:active  { transform:translateY(0); filter:brightness(0.97); }
.form-card button:disabled{ opacity:.72; cursor:not-allowed; transform:none; filter:none; box-shadow:none; }

/* Button transitions to outlined ring during animation */
.form-card button.btn-animating {
  background: transparent !important;
  box-shadow: inset 0 0 0 1.5px var(--accent) !important;
  filter: none !important;
}

/* ── Btn label + animation container ────────────────────────── */
.form-card button .btn-label {
  transition: opacity 80ms ease;
  pointer-events: none;
}
.form-card button .btn-anim {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 60ms ease;
  pointer-events: none;
}
.form-card button.btn-animating .btn-label { opacity: 0; }
.form-card button.btn-animating .btn-anim  { opacity: 1; }

/* ── Micro-interaction keyframes ────────────────────────────── */
@keyframes _btnDotIn {
  from { opacity:0; transform:scale(.3); }
  to   { opacity:1; transform:scale(1); }
}
@keyframes _btnPulse {
  0%,100% { transform:scale(1); }
  50%     { transform:scale(1.2); }
}
@keyframes _btnBurst {
  from { opacity:1; transform:scale(1); }
  to   { opacity:0; transform:scale(4.2); }
}
@keyframes _btnRingIn {
  from { opacity:0; transform:scale(.26); }
  to   { opacity:1; transform:scale(1); }
}
@keyframes _btnSpin { to { transform:rotate(360deg); } }
@keyframes _btnCheck {
  from { stroke-dashoffset:42; }
  to   { stroke-dashoffset:0; }
}


/* ── Focus rings ─────────────────────────────────────────────── */
.form-card input:focus-visible,
.form-card button:focus-visible {
  outline: 2px solid rgba(var(--accent-rgb), 0.50);
  outline-offset: 2px;
}


/* ── Form status message (errors only) ──────────────────────── */
.form-message {
  margin-top: .9rem;
  min-height: 1.2em;
  font-size: 0.84rem;
  letter-spacing: 0.02em;
  color: var(--accent);
  opacity: 0;
  transition: opacity .5s var(--ease);
}

.form-message.visible { opacity: 1; }


/* ══════════════════════════════════════════════════════════════
   SUCCESS STATE
   ══════════════════════════════════════════════════════════════ */

/* Signup form becomes position parent */
.signup-form { position: relative; }

/* Form card slides up + fades on success */
.signup-form.success .form-card {
  opacity: 0;
  transform: translateY(-10px) scale(0.96);
  pointer-events: none;
}

/* ── Success card ─────────────────────────────────────────────── */
.success-card {
  position: absolute;
  top: 0; left: 0; right: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 28px 24px 22px;
  background: rgba(246,238,229,0.72);
  backdrop-filter: blur(28px) saturate(170%);
  -webkit-backdrop-filter: blur(28px) saturate(170%);
  border: 1px solid rgba(191,70,70,0.20);
  border-radius: 24px;
  box-shadow: var(--shadow-soft);
  opacity: 0;
  pointer-events: none;
  transform: translateY(18px) scale(0.96);
}

/* Card entrance */
.signup-form.success .success-card {
  animation: scCardIn 0.75s var(--ease) 0.22s forwards;
  pointer-events: auto;
}
@keyframes scCardIn {
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
    box-shadow: var(--shadow-soft), 0 0 36px rgba(191,70,70,0.07);
  }
}

/* Card exit during 15s reset */
.signup-form.resetting .success-card {
  animation: scCardOut 0.55s var(--ease) forwards !important;
  pointer-events: none;
}
@keyframes scCardOut {
  to { opacity: 0; transform: translateY(12px) scale(0.96); }
}

/* Form card glides back in after reset */
.signup-form.resetting .form-card {
  animation: scFormBack 0.65s var(--ease) 0.3s forwards !important;
}
@keyframes scFormBack {
  from { opacity: 0; transform: translateY(12px) scale(0.96); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* ── ✦ Mark — spring bounce in ───────────────────────────────── */
.sc-mark {
  font-size: 1.55rem;
  color: var(--accent);
  opacity: 0;
  transform: scale(0.15) rotate(-45deg);
  line-height: 1;
}
.signup-form.success .sc-mark {
  animation: scMarkIn 0.95s cubic-bezier(0.34, 1.65, 0.64, 1) 0.48s forwards;
}
@keyframes scMarkIn {
  to { opacity: 1; transform: scale(1) rotate(0deg); }
}

/* ── Label ────────────────────────────────────────────────────── */
.sc-label {
  font-family: 'Inter', sans-serif;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent);
  margin-top: 14px;
  opacity: 0;
  transform: translateY(10px);
}
.signup-form.success .sc-label {
  animation: scFadeUp 0.6s var(--ease) 0.72s forwards;
}

/* ── Name in Canela ───────────────────────────────────────────── */
.sc-name {
  font-family: 'Canela', Georgia, serif;
  font-weight: 300;
  font-size: clamp(1.3rem, 3vw, 1.8rem);
  color: var(--heading);
  letter-spacing: -0.01em;
  line-height: 1.2;
  margin-top: 5px;
  opacity: 0;
  transform: translateY(10px);
}
.signup-form.success .sc-name {
  animation: scFadeUp 0.65s var(--ease) 0.90s forwards;
}

/* ── Decorative rule draws from centre ────────────────────────── */
.sc-rule {
  width: 0;
  height: 1px;
  background: rgba(191,70,70,0.30);
  margin: 14px auto;
  border-radius: 1px;
}
.signup-form.success .sc-rule {
  animation: scRuleIn 0.7s var(--ease) 1.10s forwards;
}
@keyframes scRuleIn { to { width: 44px; } }

/* ── Sub-text ─────────────────────────────────────────────────── */
.sc-sub {
  font-family: 'Inter', sans-serif;
  font-size: 0.83rem;
  color: var(--body-color);
  line-height: 1.72;
  max-width: 255px;
  opacity: 0;
  transform: translateY(10px);
}
.signup-form.success .sc-sub {
  animation: scFadeUp 0.65s var(--ease) 1.28s forwards;
}

/* ── Countdown progress bar ───────────────────────────────────── */
.sc-countdown {
  width: 100%;
  height: 2px;
  background: rgba(191,70,70,0.10);
  border-radius: 2px;
  margin-top: 20px;
  overflow: hidden;
  opacity: 0;
}
.signup-form.success .sc-countdown {
  animation: scFadeIn 0.5s var(--ease) 1.65s forwards;
}
.sc-countdown-fill {
  height: 100%;
  width: 100%;
  background: linear-gradient(
    to right,
    rgba(191,70,70,0.18),
    rgba(191,70,70,0.55)
  );
  border-radius: 2px;
  transform-origin: left center;
  transform: scaleX(1);
  /* actual countdown transition driven by JS */
}

/* ── "Returning in Xs" hint ───────────────────────────────────── */
.sc-reset-hint {
  font-family: 'Inter', sans-serif;
  font-size: 0.68rem;
  color: rgba(90,74,69,0.42);
  letter-spacing: 0.03em;
  margin-top: 8px;
  opacity: 0;
  transform: translateY(6px);
}
.signup-form.success .sc-reset-hint {
  animation: scFadeUp 0.5s var(--ease) 1.85s forwards;
}

/* ── Shared keyframes ─────────────────────────────────────────── */
@keyframes scFadeUp { to { opacity: 1; transform: translateY(0); } }
@keyframes scFadeIn { to { opacity: 1; } }


/* ── Responsive ──────────────────────────────────────────────── */
@media (max-width: 560px) {
  .hero { padding: 4.5rem 1.25rem 3rem; }
  .form-card { border-radius: 20px; padding: 6px; }
  .form-card input { padding: 13px 14px; text-align: center; }
  .grid-lines i:nth-child(2) { display: none; }
  .corner-mark { width: 14px; height: 14px; }
  .corner-tl, .corner-tr { top: 18px; }
  .corner-bl, .corner-br { bottom: 18px; }
  .corner-tl, .corner-bl { left: 18px; }
  .corner-tr, .corner-br { right: 18px; }
}

@media (max-width: 380px) {
  h1.name { font-size: 2.35rem; }
}


/* ── Reduced motion ──────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}