/* Reusable components: nav, buttons, chips, badges, glass, phone mockup, template art, forms, footer. */

/* ---------- Nav ---------- */
.nav {
  position: fixed; inset: 12px 0 auto; z-index: 50;
  transition: transform 0.4s var(--ease-out);
}
.nav.is-hidden { transform: translateY(-120%); }
.nav-inner {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 10px 10px 10px 20px; border-radius: var(--r-full);
  background: rgba(14, 14, 20, 0.55); border: 1px solid var(--stroke);
  -webkit-backdrop-filter: blur(20px) saturate(140%); backdrop-filter: blur(20px) saturate(140%);
}
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 800; font-size: 1.25rem; letter-spacing: -0.03em; }
.brand-mark { width: 30px; height: 30px; object-fit: contain; }
.nav-links { display: none; gap: 4px; }
.nav-links a {
  padding: 8px 14px; border-radius: var(--r-full); text-decoration: none;
  color: var(--text-2); font-size: var(--fs-small); font-weight: 600; transition: color 0.2s, background 0.2s;
}
.nav-links a:hover { color: var(--text-1); background: rgba(255, 255, 255, 0.06); }
@media (min-width: 900px) { .nav-links { display: flex; } }

/* ---------- Buttons ---------- */
.btn {
  --mx: 0px; --my: 0px;
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: 0 24px; border-radius: var(--r-full); border: 0;
  font-weight: 700; font-size: 0.95rem; text-decoration: none; white-space: nowrap;
  transform: translate(var(--mx), var(--my));
  transition: transform 0.35s var(--ease-spring), box-shadow 0.3s, background 0.3s;
}
.btn:active { transform: translate(var(--mx), var(--my)) scale(0.97); }
.btn-primary { background: var(--gradient); color: #fff; box-shadow: var(--glow); }
.btn-primary::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit;
  background: linear-gradient(120deg, transparent 30%, rgba(255, 255, 255, 0.35) 50%, transparent 70%);
  background-size: 250% 100%; background-position: 120% 0; transition: background-position 0.8s var(--ease-out);
}
.btn-primary:hover::after { background-position: -20% 0; }
.btn-primary:hover { box-shadow: 0 14px 50px -6px rgba(123, 97, 255, 0.75); }
.btn-ghost { background: rgba(255, 255, 255, 0.06); color: var(--text-1); border: 1px solid var(--stroke-strong); }
.btn-ghost:hover { background: rgba(255, 255, 255, 0.1); }
.btn-pro { background: var(--gradient-pro); color: #1b1206; }
.btn-sm { min-height: 40px; padding: 0 18px; font-size: var(--fs-small); }
.btn[disabled] { opacity: 0.5; cursor: not-allowed; }

/* ---------- Chips & badges ---------- */
.chip {
  display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: var(--r-full);
  background: rgba(255, 255, 255, 0.05); border: 1px solid var(--stroke);
  font-size: var(--fs-small); font-weight: 600; color: var(--text-2);
}
.badge {
  display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: var(--r-full);
  font-size: 0.7rem; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase;
}
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge-live { color: var(--success); background: rgba(52, 211, 153, 0.12); }
.badge-dev { color: var(--warning); background: rgba(251, 191, 36, 0.12); }
.badge-soon { color: #b9a9ff; background: rgba(123, 97, 255, 0.16); }
.badge-pro { background: var(--gradient-pro); color: #1b1206; letter-spacing: 0.08em; }
.badge-pro::before { display: none; }

/* ---------- Glass card ---------- */
.glass {
  background: var(--glass-fill); border: 1px solid var(--stroke); border-radius: var(--r-lg);
  -webkit-backdrop-filter: blur(24px); backdrop-filter: blur(24px);
}
.card {
  position: relative; padding: 28px; border-radius: var(--r-lg);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.015));
  border: 1px solid var(--stroke); overflow: hidden;
  transition: transform 0.5s var(--ease-spring), border-color 0.3s;
}
.card::before {
  /* Pointer-following spotlight, position set by JS (--px/--py). */
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity 0.3s;
  background: radial-gradient(420px circle at var(--px, 50%) var(--py, 50%), rgba(123, 97, 255, 0.16), transparent 60%);
}
.card:hover { border-color: var(--stroke-strong); }
.card:hover::before { opacity: 1; }
.card h3 { font-size: var(--fs-h3); letter-spacing: -0.02em; }
.card p { color: var(--text-2); margin-top: 10px; font-size: 0.95rem; }
.icon-tile {
  display: grid; place-items: center; width: 48px; height: 48px; margin-bottom: 20px; border-radius: 14px;
  background: rgba(123, 97, 255, 0.14); color: #c3b8ff; border: 1px solid rgba(123, 97, 255, 0.25);
}
.icon-tile svg { width: 24px; height: 24px; }

/* ---------- Phone mockup ---------- */
.phone {
  position: relative; width: min(300px, 76vw); aspect-ratio: 9 / 19.5; padding: 10px;
  border-radius: 46px; background: linear-gradient(160deg, #2a2a36, #0d0d12 40%, #1c1c26);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.08) inset, 0 40px 120px -30px rgba(123, 97, 255, 0.55), 0 30px 60px -20px rgba(0, 0, 0, 0.8);
}
.phone::after {
  content: ""; position: absolute; top: 20px; left: 50%; width: 76px; height: 20px; translate: -50% 0;
  border-radius: 20px; background: #000; z-index: 5;
}
.phone-screen {
  position: relative; width: 100%; height: 100%; border-radius: 37px; overflow: hidden;
  background: var(--bg-base); isolation: isolate;
}

/* ---------- Template artwork (original, CSS-only) ---------- */
.art {
  --a: #ff4d7e; --b: #7b61ff;
  position: relative; overflow: hidden; border-radius: inherit;
  background:
    radial-gradient(120% 80% at 20% 10%, color-mix(in srgb, var(--a) 85%, transparent), transparent 60%),
    radial-gradient(100% 80% at 90% 90%, color-mix(in srgb, var(--b) 90%, transparent), transparent 65%),
    #120c1c;
}
.art::before, .art::after {
  content: ""; position: absolute; border-radius: 50%; filter: blur(2px);
  background: radial-gradient(circle, rgba(255, 255, 255, 0.55), transparent 65%);
  animation: floaty 7s ease-in-out infinite;
}
.art::before { width: 40%; aspect-ratio: 1; top: 18%; left: 12%; }
.art::after { width: 22%; aspect-ratio: 1; bottom: 22%; right: 14%; animation-delay: -3s; }
.art-love { --a: #ff4d7e; --b: #b0306a; }
.art-bday { --a: #ffb547; --b: #7b61ff; }
.art-diwali { --a: #ffcf5a; --b: #d9480f; }
.art-devo { --a: #ff9e6b; --b: #8a2be2; }
.art-friends { --a: #2ee6d6; --b: #3fa8ff; }
.art-anniv { --a: #ff7aa8; --b: #ffd27a; }
.art-attitude { --a: #6b6b7e; --b: #f43f5e; }
.art-lyrics { --a: #3fa8ff; --b: #7b61ff; }
.art-family { --a: #34d399; --b: #3fa8ff; }

@keyframes floaty {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(8%, -10%) scale(1.12); }
}

/* ---------- Forms ---------- */
.field { display: grid; gap: 8px; }
.field label { font-size: var(--fs-small); font-weight: 600; color: var(--text-2); }
.input {
  width: 100%; min-height: 52px; padding: 0 18px; border-radius: var(--r-md);
  background: rgba(255, 255, 255, 0.04); border: 1px solid var(--stroke-strong);
  transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
}
select.input { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--text-2) 50%), linear-gradient(135deg, var(--text-2) 50%, transparent 50%); background-position: calc(100% - 22px) 23px, calc(100% - 17px) 23px; background-size: 5px 5px; background-repeat: no-repeat; }
select.input option { background: var(--bg-overlay); }
.input::placeholder { color: var(--text-3); }
.input:focus { outline: none; border-color: var(--iris); background: rgba(123, 97, 255, 0.06); box-shadow: 0 0 0 4px rgba(123, 97, 255, 0.18); }
.input[aria-invalid="true"] { border-color: var(--danger); }
.field-error { min-height: 1.2em; font-size: var(--fs-cap); color: var(--danger); }
.check { display: flex; gap: 12px; align-items: flex-start; font-size: var(--fs-small); color: var(--text-2); }
.check input { width: 20px; height: 20px; margin-top: 2px; accent-color: var(--iris); flex: none; }
.form-status { min-height: 1.4em; font-size: var(--fs-small); font-weight: 600; }
.form-status.is-error { color: var(--danger); }
.form-status.is-ok { color: var(--success); }
.hp { position: absolute; left: -9999px; }

/* ---------- Footer ---------- */
.footer { padding: 56px 0 40px; border-top: 1px solid var(--stroke); color: var(--text-3); font-size: var(--fs-small); }
.footer-inner { display: flex; flex-wrap: wrap; gap: 24px; justify-content: space-between; align-items: center; }
.footer nav { display: flex; flex-wrap: wrap; gap: 20px; }
.footer a { text-decoration: none; color: var(--text-2); }
.footer a:hover { color: var(--text-1); }
