/* Liquid Glass design system for Adrian's birthday site.
   Pastel gradient backdrop + genuine Apple-style Liquid Glass surfaces
   (WWDC 2025 / iOS 26 material): highly transparent, refractive/lensing,
   with a bright specular highlight along the top edge — not flat frosted
   glassmorphism. See .glass-panel / .glass-panel-soft / .glass-pill below;
   each uses a `::before` layer for the blur+distortion+highlight so the
   real content on top always stays crisp. */

:root {
  --ink: #1a1226;
  --ink-soft: #3a2a45;
  --ink-muted: #5c4c66;
  --ink-faint: #8a7891;
  --ink-faintest: #a598ab;
  --pink: #ff6fb0;
  --orange: #ff9a56;
  --purple: #7c3aed;
  --teal: #5ad6cd;
  --bg-base: #fdfaf6;
  /* Genuine Liquid Glass is much clearer than frosted glassmorphism: low
     background opacity so the pastel gradient reads vividly through it. */
  --glass-bg: rgba(255, 255, 255, 0.16);
  --glass-bg-strong: rgba(255, 255, 255, 0.20);
  --glass-border: rgba(255, 255, 255, 0.35);
  --glass-shadow: 0 20px 60px rgba(31, 38, 135, 0.22);
  --glass-shadow-soft: 0 8px 32px rgba(31, 38, 135, 0.14);
  --glass-inset: inset 0 1px 1px rgba(255, 255, 255, 0.6);
  /* Specular highlight stack: bright crisp glint on the top edge (light
     catching a curved edge), a faint bounce-light line on the bottom edge,
     plus a soft outer lift shadow. */
  --glass-specular:
    inset 0 1.5px 0 rgba(255, 255, 255, 0.85),
    inset 0 -1px 0 rgba(255, 255, 255, 0.12),
    0 20px 60px rgba(31, 38, 135, 0.22);
  --glass-specular-soft:
    inset 0 1.5px 0 rgba(255, 255, 255, 0.75),
    inset 0 -1px 0 rgba(255, 255, 255, 0.1),
    0 8px 32px rgba(31, 38, 135, 0.14);
  --radius-lg: 32px;
  --radius-md: 20px;
  --radius-sm: 14px;
  --gradient-primary: linear-gradient(135deg, var(--pink), var(--orange));
  --gradient-heading: linear-gradient(135deg, var(--purple), var(--pink) 55%, var(--orange));
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  min-height: 100%;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Rounded', system-ui, 'Segoe UI', sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at 15% 20%, rgba(255, 111, 176, 0.5), transparent 40%),
    radial-gradient(circle at 85% 15%, rgba(255, 196, 102, 0.45), transparent 40%),
    radial-gradient(circle at 75% 85%, rgba(124, 109, 255, 0.4), transparent 45%),
    radial-gradient(circle at 20% 85%, rgba(90, 214, 205, 0.35), transparent 45%),
    var(--bg-base);
  background-attachment: fixed;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--purple); }
a:hover { color: var(--pink); }
::selection { background: rgba(255, 111, 176, 0.35); }

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

button {
  font-family: inherit;
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.6;
}

/* ---------- Glass primitives ----------
   Real Liquid Glass architecture: the element itself stays fully
   transparent and only establishes a self-contained stacking context
   (isolation: isolate). A `::before` sitting behind the content (z-index:
   -1, inset: 0) carries the translucent tint, backdrop blur/saturation,
   and the SVG refraction filter. Because it's a separate layer, the
   distortion filter never touches the text/icons rendered as normal
   in-flow content on top of it — those simply paint above a negative
   z-index child within the isolated stacking context, no extra z-index
   needed on ordinary children. */

.glass-panel,
.glass-panel-soft,
.glass-pill {
  position: relative;
  isolation: isolate;
  background: transparent;
  border: 1px solid var(--glass-border);
}

.glass-panel::before,
.glass-panel-soft::before,
.glass-pill::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: inherit;
  pointer-events: none;
  filter: url(#liquid-glass-distortion);
}

.glass-panel {
  box-shadow: var(--glass-specular);
  border-radius: var(--radius-lg);
}

.glass-panel::before {
  background: var(--glass-bg);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
}

.glass-panel-soft {
  box-shadow: var(--glass-specular-soft);
  border-radius: var(--radius-md);
}

.glass-panel-soft::before {
  background: var(--glass-bg);
  backdrop-filter: blur(18px) saturate(180%);
  -webkit-backdrop-filter: blur(18px) saturate(180%);
}

.glass-pill {
  box-shadow: var(--glass-specular-soft);
  border-radius: 999px;
}

.glass-pill::before {
  background: var(--glass-bg-strong);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
}

.btn {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  border: none;
  border-radius: 999px;
  font-weight: 800;
  font-size: 14px;
  padding: 14px 28px;
  color: #fff;
  background: var(--gradient-primary);
  box-shadow: 0 10px 30px rgba(255, 111, 176, 0.4);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

/* Sheen sweep: a soft diagonal highlight that glides across on hover,
   suggesting the light-catching behaviour of a curved glass edge. Kept to
   a CSS keyframe animation on a ::after layer (no displacement) so button
   text stays perfectly crisp. */
.btn::after,
.btn-secondary::after,
.btn-ghost::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(
    115deg,
    transparent 20%,
    rgba(255, 255, 255, 0.55) 48%,
    rgba(255, 255, 255, 0.55) 52%,
    transparent 80%
  );
  background-size: 250% 250%;
  background-position: 130% 130%;
  opacity: 0;
  transition: opacity 0.15s ease;
}

.btn:hover:not(:disabled)::after,
.btn-secondary:hover:not(:disabled)::after,
.btn-ghost:hover:not(:disabled)::after {
  opacity: 1;
  animation: sheenSweep 1.1s ease forwards;
}

@keyframes sheenSweep {
  from { background-position: 130% 130%; }
  to { background-position: -30% -30%; }
}

.btn:hover:not(:disabled) { transform: translateY(-1px); box-shadow: 0 14px 34px rgba(255, 111, 176, 0.5); }
.btn:active:not(:disabled) { transform: translateY(0); }

.btn-secondary {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background: rgba(124, 58, 237, 0.12);
  color: var(--purple);
  box-shadow: none;
}

.btn-ghost {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background: rgba(0, 0, 0, 0.06);
  color: var(--ink-muted);
  box-shadow: none;
}

.btn-small {
  padding: 10px 18px;
  font-size: 13px;
}

.input {
  width: 100%;
  box-sizing: border-box;
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(0, 0, 0, 0.1);
  background: rgba(255, 255, 255, 0.7);
  font-size: 14px;
  font-family: inherit;
  outline: none;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.input:focus {
  border-color: var(--pink);
  background: rgba(255, 255, 255, 0.9);
}

.gradient-heading {
  background: var(--gradient-heading);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.eyebrow-pill {
  display: inline-block;
  padding: 7px 16px;
  border-radius: 999px;
  background: var(--gradient-primary);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 1.5px;
  text-transform: uppercase;
}

/* ---------- Floating blobs (ambient background motion) ---------- */

.blob-field {
  position: fixed;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
}

.blob {
  position: absolute;
  border-radius: 50%;
  opacity: 0.5;
  filter: blur(2px);
  animation: blobFloat ease-in-out infinite;
}

@keyframes blobFloat {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(-2%, 3%) scale(1.06); }
}

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

.fade-up { animation: fadeUp 0.5s ease; }

/* ---------- Top nav ---------- */

.top-nav {
  position: sticky;
  top: 16px;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 24px;
  margin: 16px;
  flex-wrap: wrap;
}

.top-nav .brand {
  font-weight: 800;
  font-size: 15px;
  color: var(--ink-soft);
  white-space: nowrap;
}

.top-nav .links {
  display: flex;
  gap: 8px;
}

.nav-link {
  border: none;
  text-decoration: none;
  display: inline-block;
  font-size: 13px;
  font-weight: 700;
  padding: 10px 18px;
  border-radius: 999px;
  background: rgba(124, 58, 237, 0.12);
  color: var(--purple);
}

.nav-link.primary {
  background: var(--gradient-primary);
  color: #fff;
  box-shadow: 0 4px 14px rgba(255, 111, 176, 0.4);
}

/* ---------- Layout helpers ---------- */

.page-shell {
  position: relative;
  z-index: 1;
  min-height: 100vh;
}

.center-stage {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 100px 24px 60px;
}

.container-narrow {
  max-width: 560px;
  width: 100%;
}

.container-form {
  max-width: 400px;
  width: 100%;
}

.text-muted { color: var(--ink-muted); }
.text-faint { color: var(--ink-faint); }
.text-center { text-align: center; }

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

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(20, 10, 25, 0.35);
  backdrop-filter: blur(4px);
  padding: 24px;
}

.modal-card {
  max-width: 420px;
  width: 100%;
  padding: 32px;
}

/* ---------- Toast ---------- */

.toast {
  position: fixed;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1500;
  padding: 14px 22px;
  border-radius: 999px;
  background: rgba(30, 20, 40, 0.85);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.3);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(-4px);
}

@media (max-width: 640px) {
  .top-nav { margin: 10px; padding: 12px 16px; }
  .center-stage { padding: 90px 16px 40px; }
}

/* ---------- Reduced transparency fallback (accessibility) ---------- */

@media (prefers-reduced-transparency: reduce) {
  .glass-panel::before,
  .glass-panel-soft::before,
  .glass-pill::before {
    filter: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    background: #fdfaf6;
  }

  .glass-panel,
  .glass-panel-soft,
  .glass-pill {
    border-color: rgba(0, 0, 0, 0.1);
  }

  .btn::after,
  .btn-secondary::after,
  .btn-ghost::after {
    display: none;
  }
}
