/* Funnel Finish Line portal stylesheet.
   Tokens copied from the FFL site's :root (funnel-finish-line/public/build/index.html) so the
   portal wears the same cream, purple, teal, pink, and lilac. Components are the FFL ones
   (nav with the script "F", rounded lilac-bordered cards, gradient buttons with dark-purple
   text, wave dividers, dark footer) rebuilt for a gallery. This sheet is loaded only on the
   Funnel Finish Line host and shares nothing with the other brand's stylesheet. */

:root {
  --cream:        #FDF8FF;
  --cream-deep:   #F5EEFA;
  --white:        #FFFFFF;
  --purple:       #4A2D6B;
  --purple-light: #7B5EA7;
  --purple-faint: #D4B8E8;
  --teal:         #7ECBC0;
  --teal-deep:    #5BA89E;
  --teal-text:    #5BA89E; /* = teal-deep; the FFL site has no darker teal */
  --pink:         #F5A0C0;
  --pink-deep:    #E0789F;
  --pink-text:    #B94A74;
  --text:         #3D3D3D;
  --text-muted:   #6B6B6B;
  --border:       #D4B8E8;
  --border-light: #EDE0F5;
  --error:        #DC2626; /* the FFL site's own error red */
  --dark-bg:      #2D1B4E;
  --dark-surface: #3A2560;
  --dark-text:    #F5EEFA;
  --dark-muted:   #C4A8D8;

  --gradient-cta:       linear-gradient(135deg, #F5A0C0 0%, #C084D8 100%);
  --gradient-cta-hover: linear-gradient(135deg, #E0789F 0%, #A86BC4 100%);
  --gradient-hero: radial-gradient(circle at 90% 30%, rgba(245,160,192,0.35) 0%, transparent 30%),
                   radial-gradient(circle at 80% 75%, rgba(240,170,200,0.25) 0%, transparent 25%);

  --font-heading: 'Playfair Display', Georgia, serif;
  --font-body:    'Quicksand', 'Segoe UI', sans-serif;
  --font-script:  'Sacramento', cursive;

  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;

  --radius-sm:  8px;
  --radius-md:  16px;
  --radius-lg:  24px;
  --radius-pill: 40px;

  --shadow-sm:   0 1px 4px rgba(74,45,107,0.06);
  --shadow-md:   0 6px 20px rgba(74,45,107,0.08);
  --shadow-lg:   0 12px 40px rgba(74,45,107,0.1);
  --shadow-card: 0 4px 20px rgba(74,45,107,0.08);
  --shadow-glow: 0 0 24px rgba(245,160,192,0.3);

  --ease: cubic-bezier(0.4, 0, 0.2, 1);
  --duration: 0.3s;
  --nav-height: 76px;
}

/* --- Base --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
/* scroll-padding keeps anchor targets and keyboard focus clear of the fixed nav (and, on phones,
   the sticky CTA bar; see the 768px block). */
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--nav-height) + 16px); }
html, body { overflow-x: clip; }
body {
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 16px;
  line-height: 1.7;
  color: var(--text);
  background: var(--cream);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }
ul, ol { list-style: none; }
/* Light teal is under 2:1 on the cream surfaces; the deep teal keeps the ring visible (>= 3:1). */
:focus-visible { outline: 3px solid var(--teal-text); outline-offset: 3px; border-radius: 6px; }
.section--dark :focus-visible, .footer :focus-visible, .mobile-cta-bar :focus-visible { outline-color: var(--teal); }

.container { max-width: 1140px; margin: 0 auto; padding: 0 var(--space-6); }
.container--narrow { max-width: 760px; }

h1, h2, h3, h4 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.2;
  color: var(--purple);
  text-wrap: balance;
}
h1 { font-size: clamp(2.35rem, 5vw, 3.75rem); letter-spacing: -0.02em; }
h2 { font-size: clamp(1.9rem, 4vw, 2.75rem); letter-spacing: -0.01em; }
h3 { font-size: clamp(1.15rem, 2.5vw, 1.35rem); }

.text-script {
  font-family: var(--font-script);
  font-weight: 400;
  font-size: 1.15em;
  color: var(--teal-text); /* the darker FFL teal: mid-teal on cream is under 3:1 even at display size */
  line-height: 1;
}

.section-label {
  display: inline-block;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--pink-text);
  margin-bottom: var(--space-3);
}
.section-subtitle {
  font-size: 1.1rem;
  color: var(--text-muted);
  max-width: 640px;
  text-wrap: balance;
}
.section--dark .section-label { color: var(--pink); }
/* Rose on the deeper cream is 4.3:1; purple keeps the label on-palette and readable. */
.section--cream-deep .section-label { color: var(--purple); }
.section--dark h2, .section--dark h3 { color: var(--white); }
.section--dark .section-subtitle { color: var(--dark-muted); }

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  min-height: 48px;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.02em;
  padding: 0.8rem 2rem;
  border-radius: var(--radius-pill);
  transition: transform var(--duration) var(--ease), box-shadow var(--duration) var(--ease), background var(--duration) var(--ease), border-color var(--duration) var(--ease);
  white-space: nowrap;
}
/* Doubled class on purpose: outranks `.nav__links a` so the nav button keeps dark-purple text. */
.btn.btn--primary,
.btn.btn--primary:hover { color: var(--dark-bg); }
.btn--primary {
  background: var(--gradient-cta);
  box-shadow: var(--shadow-md), var(--shadow-glow);
}
.btn--primary:hover {
  /* Keep the rest gradient: the darker hover end drops the dark-purple label below AA. */
  background: var(--gradient-cta);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg), 0 0 30px rgba(245,160,192,0.4);
}
.btn--secondary {
  background: transparent;
  color: var(--purple);
  border: 2px solid var(--purple-faint);
}
.btn--secondary:hover { background: var(--purple-faint); }
.section--dark .btn--secondary { color: var(--white); border-color: rgba(255,255,255,0.35); }
.section--dark .btn--secondary:hover { background: rgba(255,255,255,0.1); border-color: rgba(255,255,255,0.6); }
.btn--lg { padding: 1rem 2.6rem; font-size: 1.05rem; }
.btn--block { width: 100%; }

/* --- Navigation --- */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  background: rgba(253,248,255,0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-light);
  transition: box-shadow var(--duration) var(--ease);
}
.nav--scrolled { box-shadow: var(--shadow-sm); }
.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  max-width: 1140px;
  min-height: var(--nav-height);
  margin: 0 auto;
  padding: var(--space-3) var(--space-6);
}
.nav__logo,
.footer__brand-name {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--purple);
  position: relative;
  display: inline-block;
  white-space: nowrap;
}
.nav__logo .logo-script,
.footer__brand-name .logo-script {
  font-family: var(--font-script);
  font-size: 1.6rem;
  color: var(--pink);
  margin-right: 2px;
}
/* Checkered finish-line flag, faint, centered behind the wordmark (same as the FFL site). */
.nav__logo::before,
.footer__brand-name::before {
  content: '';
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 220px; height: 36px;
  opacity: 0.12;
  pointer-events: none;
  z-index: 0;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 60'%3E%3Cdefs%3E%3CclipPath id='w'%3E%3Cpath d='M10 5 Q50 0 100 8 Q150 16 190 5 L190 55 Q150 48 100 52 Q50 60 10 55 Z'/%3E%3C/clipPath%3E%3C/defs%3E%3Cg clip-path='url(%23w)' fill='%23D4B8E8'%3E%3Crect x='0' y='0' width='25' height='15'/%3E%3Crect x='50' y='0' width='25' height='15'/%3E%3Crect x='100' y='0' width='25' height='15'/%3E%3Crect x='150' y='0' width='25' height='15'/%3E%3Crect x='25' y='15' width='25' height='15'/%3E%3Crect x='75' y='15' width='25' height='15'/%3E%3Crect x='125' y='15' width='25' height='15'/%3E%3Crect x='175' y='15' width='25' height='15'/%3E%3Crect x='0' y='30' width='25' height='15'/%3E%3Crect x='50' y='30' width='25' height='15'/%3E%3Crect x='100' y='30' width='25' height='15'/%3E%3Crect x='150' y='30' width='25' height='15'/%3E%3Crect x='25' y='45' width='25' height='15'/%3E%3Crect x='75' y='45' width='25' height='15'/%3E%3Crect x='125' y='45' width='25' height='15'/%3E%3Crect x='175' y='45' width='25' height='15'/%3E%3C/g%3E%3C/svg%3E") center / contain no-repeat;
}
.footer__brand-name::before { opacity: 0.15; }
.nav__logo > *, .footer__brand-name > * { position: relative; z-index: 1; }

.nav__links { display: flex; align-items: center; gap: var(--space-8); }
.nav__links a:not(.btn) {
  display: inline-block;
  padding: 13px 0;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text-muted);
  transition: color var(--duration) var(--ease);
}
.nav__links a:not(.btn):hover { color: var(--purple); }
.nav__logo { padding: 2px 0; }
.nav__cta { margin-left: var(--space-2); min-height: 44px; padding: 0.6rem 1.5rem; }

.nav__hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px; height: 44px;
  padding: 0 8px;
}
.nav__hamburger span {
  display: block;
  width: 100%; height: 2px;
  background: var(--purple);
  border-radius: 2px;
  transition: transform var(--duration) var(--ease), opacity var(--duration) var(--ease);
}
.nav__hamburger.active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav__hamburger.active span:nth-child(2) { opacity: 0; }
.nav__hamburger.active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.nav__mobile {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(45,27,78,0.5);
  backdrop-filter: blur(4px);
  z-index: 999;
  opacity: 0;
  visibility: hidden; /* keeps the closed menu's links out of the keyboard tab order */
  pointer-events: none;
  transition: opacity var(--duration) var(--ease), visibility 0s linear var(--duration);
}
.nav__mobile.open { opacity: 1; visibility: visible; pointer-events: auto; transition-delay: 0s; }
.nav__mobile-inner {
  position: absolute;
  right: 0; top: 0; bottom: 0;
  width: min(300px, 86vw);
  background: var(--white);
  padding: calc(var(--nav-height) + var(--space-6)) var(--space-6) var(--space-8);
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  transform: translateX(100%);
  transition: transform var(--duration) var(--ease);
}
.nav__mobile.open .nav__mobile-inner { transform: translateX(0); }
.nav__mobile-inner a:not(.btn) {
  font-weight: 600;
  font-size: 1rem;
  color: var(--text);
  padding: var(--space-3) 0;
  border-bottom: 1px solid var(--border-light);
}
.nav__mobile-inner .btn { margin-top: var(--space-4); }

@media (max-width: 768px) {
  .nav__links { display: none; }
  .nav__hamburger { display: flex; }
  .nav__mobile { display: block; }
}

/* --- Hero --- */
.hero {
  position: relative;
  padding: calc(var(--nav-height) + var(--space-16)) 0 0;
  background: var(--cream);
  overflow: hidden;
  text-align: center;
}
.hero::before {
  content: '';
  position: absolute;
  inset: -20px;
  background: var(--gradient-hero);
  filter: blur(40px);
  pointer-events: none;
}
.hero__inner { position: relative; z-index: 1; max-width: 760px; margin: 0 auto; padding-bottom: var(--space-6); }
.hero__title { margin-bottom: var(--space-5); }
.hero__title .text-script { display: inline; }
.hero__subtitle {
  font-size: 1.15rem;
  color: var(--text-muted);
  line-height: 1.7;
  margin: 0 auto var(--space-6);
  max-width: 560px;
  text-wrap: balance;
}
.hero__ctas {
  display: flex;
  justify-content: center;
  gap: var(--space-3);
  flex-wrap: wrap;
  margin-bottom: var(--space-5);
}
.hero__note {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
}
.hero__note strong { color: var(--purple); }

/* --- Waves (the FFL section divider) --- */
.wave-divider { position: relative; width: 100%; line-height: 0; font-size: 0; }
.wave-divider svg { display: block; width: 100%; height: auto; }

/* --- Bands --- */
.section { padding: var(--space-16) 0; position: relative; }
.section--cream { background: var(--cream); }
.section--cream-deep { background: var(--cream-deep); }
.section--dark { background: var(--dark-bg); color: var(--dark-text); }
.section__header { max-width: 720px; margin-bottom: var(--space-10); }
.section__header h2 { margin-bottom: var(--space-3); }

/* --- Cards --- */
.pf-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-6);
}
.pf-grid--wide { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.pf-card {
  display: flex;
  flex-direction: column;
  background: var(--white);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  transition: transform var(--duration) var(--ease), box-shadow var(--duration) var(--ease), border-color var(--duration) var(--ease);
}
.pf-card:hover, .pf-card:focus-visible {
  transform: translateY(-6px);
  border-color: var(--purple-faint);
  box-shadow: 0 12px 40px rgba(74,45,107,0.14);
}
.pf-card__thumb {
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(126,203,192,0.08), rgba(192,132,216,0.08));
  border-bottom: 1px solid var(--border-light);
}
.pf-card__thumb img { width: 100%; height: 100%; object-fit: cover; object-position: top; }
.pf-card__body { padding: var(--space-5) var(--space-6) var(--space-6); display: flex; flex-direction: column; gap: var(--space-2); flex: 1; }
.pf-card__body h3 { color: var(--purple); }
.pf-card__body p { font-size: 0.92rem; color: var(--text-muted); }
.pf-chip {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  padding: 3px 11px;
  border-radius: var(--radius-pill);
  background: var(--border-light);
  color: var(--purple);
}
/* Chip tints are the palette colours at low opacity, never new hex values. */
.pf-chip--teal { background: rgba(126,203,192,0.22); color: var(--purple); }
.pf-chip--pink { background: rgba(245,160,192,0.25); color: var(--pink-text); }
.pf-card__go {
  margin-top: auto;
  padding-top: var(--space-2);
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--teal-text);
}
.pf-card:hover .pf-card__go { color: var(--purple); }

/* --- Closing invite --- */
.invite { text-align: center; padding: var(--space-12) 0 var(--space-20); }
.invite__inner { max-width: 640px; margin: 0 auto; }
.invite h2 { margin-bottom: var(--space-4); }
.invite p { color: var(--dark-muted); font-size: 1.1rem; margin-bottom: var(--space-8); text-wrap: balance; }

/* --- Footer --- */
.footer { background: var(--dark-bg); color: var(--dark-text); padding: var(--space-16) 0 var(--space-8); border-top: 1px solid rgba(255,255,255,0.06); }
.footer__inner {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: var(--space-12);
  margin-bottom: var(--space-12);
}
.footer__brand-name { color: var(--white); font-size: 1.3rem; margin-bottom: var(--space-3); }
.footer__brand-text { font-size: 0.9rem; color: var(--dark-muted); line-height: 1.7; max-width: 340px; }
.footer__heading {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--teal);
  margin-bottom: var(--space-4);
}
.footer__links li { margin-bottom: var(--space-2); }
.footer__links a { display: inline-block; padding: 10px 0; font-size: 0.9rem; color: var(--dark-muted); transition: color var(--duration) var(--ease); }
.footer__legal a { display: inline-block; padding: 12px 0; }
.hero__note, .footer__brand-text, .gate__card p, .pf-card__body p { text-wrap: pretty; }
.footer__links a:hover { color: var(--white); }
.footer__bottom {
  border-top: 1px solid rgba(255,255,255,0.08);
  padding-top: var(--space-6);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-4);
  font-size: 0.8rem;
  color: var(--dark-muted);
}
.footer__legal { display: flex; gap: var(--space-6); }
.footer__legal a:hover { color: var(--white); }

/* --- Sticky mobile CTA (appears after the hero) --- */
.mobile-cta-bar {
  display: none;
  position: fixed;
  bottom: 0; left: 0; right: 0;
  background: var(--white);
  border-top: 1px solid var(--border-light);
  padding: var(--space-3) var(--space-4) calc(var(--space-3) + env(safe-area-inset-bottom));
  z-index: 998;
  transform: translateY(100%);
  transition: transform var(--duration) var(--ease);
  box-shadow: 0 -4px 20px rgba(74,45,107,0.08);
}
.mobile-cta-bar.visible { transform: translateY(0); }

/* --- Login / not-found card --- */
.gate {
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  place-items: center;
  padding: var(--space-8) var(--space-5);
  position: relative;
  overflow: hidden;
}
.gate::before {
  content: '';
  position: absolute;
  inset: -20px;
  background: var(--gradient-hero);
  filter: blur(40px);
  pointer-events: none;
}
.gate__card {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 460px;
  background: var(--white);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: var(--space-10) var(--space-8);
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}
.gate__card .nav__logo { align-self: flex-start; margin-bottom: var(--space-2); }
.gate__card .nav__logo::before { display: none; } /* the faint flag reads as a smudge under a lone wordmark */
.gate__card h1 { font-size: clamp(1.7rem, 4vw, 2.2rem); }
.gate__card p { color: var(--text-muted); }
.gate__label { font-weight: 700; font-size: 0.85rem; color: var(--purple); }
.gate__input {
  width: 100%;
  min-height: 50px;
  padding: 0.7rem 1rem;
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
  background: var(--cream);
  border: 2px solid var(--border);
  border-radius: 14px;
  transition: border-color var(--duration) var(--ease), box-shadow var(--duration) var(--ease);
}
.gate__input:focus { outline: none; border-color: var(--teal-deep); box-shadow: 0 0 0 4px rgba(126,203,192,0.3); }
.gate__input[aria-invalid="true"] { border-color: var(--error); }
.gate__input[aria-invalid="true"]:focus { border-color: var(--error); box-shadow: 0 0 0 4px rgba(220,38,38,0.18); }
.gate__error {
  padding: var(--space-3) var(--space-4);
  border-radius: 12px;
  background: rgba(220,38,38,0.08);
  color: var(--error);
  font-weight: 600;
  font-size: 0.92rem;
}
.gate__note { font-size: 0.82rem; color: var(--text-muted); }

/* --- Responsive --- */
@media (max-width: 1024px) {
  .pf-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 768px) {
  html { scroll-padding-bottom: 96px; } /* keeps focused links above the sticky CTA bar */
  .section { padding: var(--space-12) 0; }
  .footer__inner { grid-template-columns: 1fr; gap: var(--space-8); }
  .footer__bottom { flex-direction: column; text-align: center; }
}
@media (max-width: 640px) {
  .pf-grid, .pf-grid--wide { grid-template-columns: 1fr; }
  .hero { padding-top: calc(var(--nav-height) + var(--space-10)); }
  .hero__subtitle { font-size: 1.05rem; }
  .hero__ctas { flex-direction: column; align-items: stretch; }
  .hero__ctas .btn { width: 100%; }
  .gate__card { padding: var(--space-8) var(--space-5); }
}
@media (max-width: 360px) {
  .container { padding-left: var(--space-4); padding-right: var(--space-4); }
  .nav__logo { font-size: 1.1rem; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
