/* =========================================================
   Form & Function — GBP Funnel
   Brand variables mirrored from formandfunctionaesthetics.com
   ========================================================= */

/* --- Brand display font (purchased from Sensatype Studio,
       served from the main F&F site assets) ------------------- */
@font-face {
  font-family: 'Parisian';
  font-style: normal;
  font-weight: normal;
  font-display: swap;
  src: url('/assets/fonts/parisian/PARISIAN.woff2') format('woff2'),
       url('/assets/fonts/parisian/PARISIAN.woff') format('woff');
}

:root {
  --color-charcoal: #1c1a1b;
  --color-text: #1c1a1b;
  --color-text-light: #4a4848;
  --color-muted: #6b6868;
  --color-white: #ffffff;
  --color-cream: #f2eeec;
  --color-cream-deep: #ece6e2;
  --color-border: #e5e0db;
  --color-border-strong: #c9c1b9;
  --color-success: #2e7d32;
  --color-error: #b71c1c;

  --font-display: 'Parisian', 'Cormorant Garamond', Georgia, serif;
  --font-body: 'Outfit', 'Helvetica Neue', Arial, sans-serif;
  --font-eyebrow: 'Montserrat', 'Helvetica Neue', Arial, sans-serif;

  --fs-eyebrow: 13px;
  --fs-body: 16px;
  --fs-h1: clamp(2.5rem, 5.5vw, 4.25rem);
  --fs-h2: clamp(1.875rem, 3.5vw, 2.5rem);
  --tracking-eyebrow: 0.18em;
  --tracking-button: 0.14em;

  --header-height: 80px;
  --radius: 2px;
  --transition: 0.3s ease;
  --shadow-card: 0 30px 60px -30px rgba(28, 26, 27, 0.18);
  --shadow-card-hover: 0 40px 80px -30px rgba(28, 26, 27, 0.28);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { font-size: 16px; scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  font-size: var(--fs-body);
  font-weight: 300;
  color: var(--color-text);
  line-height: 1.6;
  background: var(--color-cream);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main { flex: 1; }

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; transition: color var(--transition); }
button { font: inherit; cursor: pointer; }

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 400;
  line-height: 1.15;
  color: var(--color-charcoal);
  letter-spacing: 0;
}

p { line-height: 1.6; }

::selection { background: var(--color-charcoal); color: var(--color-cream); }

/* ===================== LAYOUT ===================== */
.ff-container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}
.ff-container--narrow { max-width: 720px; }

.ff-eyebrow {
  font-family: var(--font-eyebrow);
  font-size: var(--fs-eyebrow);
  font-weight: 500;
  letter-spacing: var(--tracking-eyebrow);
  text-transform: uppercase;
  color: var(--color-text-light);
  margin-bottom: 1.25rem;
}

/* ===================== HEADER ===================== */
.ff-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--color-white);
  border-bottom: 1px solid var(--color-border);
}

.ff-header__inner {
  height: var(--header-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.ff-header__logo img {
  height: 44px;
  width: auto;
  max-width: 220px;
  object-fit: contain;
}

.ff-header__phone {
  display: inline-flex;
  align-items: baseline;
  gap: 0.55rem;
  font-family: var(--font-eyebrow);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-charcoal);
  white-space: nowrap;
}
.ff-header__phone-label { opacity: 0.55; }
.ff-header__phone-number { font-weight: 500; letter-spacing: 0.05em; }

/* ===================== HERO ===================== */
.ff-hero {
  background: var(--color-cream);
  padding: clamp(3.5rem, 8vw, 6.5rem) 0 clamp(3rem, 6vw, 5rem);
  position: relative;
  overflow: hidden;
}

.ff-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 15% 10%, rgba(255, 255, 255, 0.7), transparent 55%),
    radial-gradient(circle at 85% 90%, rgba(28, 26, 27, 0.04), transparent 60%);
  pointer-events: none;
}

.ff-hero .ff-container { position: relative; text-align: center; }
.ff-hero--center .ff-container { text-align: center; }

.ff-hero__title {
  font-family: var(--font-display);
  font-size: var(--fs-h1);
  line-height: 1.05;
  margin-bottom: 0.5rem;
}

.ff-hero__tagline {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 3.2vw, 2.5rem);
  color: var(--color-charcoal);
  margin-bottom: 1.75rem;
  font-style: italic;
  opacity: 0.85;
}

.ff-hero__sub {
  max-width: 620px;
  margin: 0 auto 2.75rem;
  font-size: 1.0625rem;
  color: var(--color-text-light);
}

/* ===================== CHOICES ===================== */
.ff-choices {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.25rem;
  max-width: 880px;
  margin: 0 auto;
  text-align: left;
}

.ff-choice {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  padding: 2rem 2rem 5rem;
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  color: var(--color-charcoal);
  text-align: left;
  cursor: pointer;
  transition:
    transform 0.35s cubic-bezier(0.2, 0.7, 0.2, 1),
    box-shadow 0.35s ease,
    border-color 0.35s ease,
    background-color 0.35s ease;
  box-shadow: var(--shadow-card);
  overflow: hidden;
}

.ff-choice::after {
  content: '';
  position: absolute;
  inset: auto 0 0 0;
  height: 3px;
  background: var(--color-charcoal);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.45s cubic-bezier(0.2, 0.7, 0.2, 1);
}

.ff-choice:hover,
.ff-choice:focus-visible {
  outline: none;
  transform: translateY(-4px);
  border-color: var(--color-charcoal);
  box-shadow: var(--shadow-card-hover);
}
.ff-choice:hover::after,
.ff-choice:focus-visible::after { transform: scaleX(1); }

.ff-choice__eyebrow {
  font-family: var(--font-eyebrow);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: var(--tracking-eyebrow);
  text-transform: uppercase;
  color: var(--color-text-light);
}

.ff-choice__title {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 2.6vw, 2.25rem);
  line-height: 1.1;
  color: var(--color-charcoal);
}

.ff-choice__sub {
  font-size: 0.975rem;
  color: var(--color-text-light);
  line-height: 1.55;
}

.ff-choice__arrow {
  position: absolute;
  right: 1.5rem;
  bottom: 1.5rem;
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--color-border);
  border-radius: 999px;
  background: var(--color-white);
  color: var(--color-charcoal);
  transition: all 0.35s ease;
}
.ff-choice__arrow svg { width: 18px; height: 18px; }
.ff-choice:hover .ff-choice__arrow,
.ff-choice:focus-visible .ff-choice__arrow {
  background: var(--color-charcoal);
  color: var(--color-white);
  border-color: var(--color-charcoal);
  transform: translateX(2px);
}

.ff-choice--existing .ff-choice__title { font-style: italic; }

/* ===================== FORM ===================== */
.ff-form-section {
  background: var(--color-white);
  padding: clamp(3rem, 7vw, 5.5rem) 0 clamp(4rem, 8vw, 6.5rem);
  border-top: 1px solid var(--color-border);
}

.ff-form-card {
  background: var(--color-cream);
  border: 1px solid var(--color-border);
  padding: clamp(2rem, 4vw, 3.5rem);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
}

.ff-form-card__header {
  text-align: center;
  margin-bottom: 2.25rem;
}

.ff-form-card__sparkle {
  width: 44px;
  height: auto;
  margin: 0 auto 1rem;
  opacity: 0.85;
}

.ff-form-card__title {
  font-family: var(--font-display);
  font-size: var(--fs-h2);
  line-height: 1.1;
  margin-bottom: 0.75rem;
}

.ff-form-card__sub {
  color: var(--color-text-light);
  max-width: 520px;
  margin: 0 auto;
}

.ff-form { display: flex; flex-direction: column; gap: 1.1rem; }

.ff-form__row { display: flex; flex-direction: column; gap: 1.1rem; }
.ff-form__row--split { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }

@media (max-width: 540px) {
  .ff-form__row--split { grid-template-columns: 1fr; }
}

.ff-field { display: flex; flex-direction: column; gap: 0.45rem; }

.ff-field__label {
  font-family: var(--font-eyebrow);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-text-light);
}

.ff-field input,
.ff-field select {
  appearance: none;
  -webkit-appearance: none;
  width: 100%;
  padding: 14px 16px;
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 400;
  color: var(--color-charcoal);
  background: var(--color-white);
  border: 1px solid var(--color-border-strong);
  border-radius: var(--radius);
  transition: border-color var(--transition), box-shadow var(--transition);
}

.ff-field input::placeholder { color: #a59f99; }

.ff-field input:focus,
.ff-field select:focus {
  outline: none;
  border-color: var(--color-charcoal);
  box-shadow: 0 0 0 3px rgba(28, 26, 27, 0.08);
}

.ff-field input:invalid:not(:placeholder-shown),
.ff-field select:invalid:not(:focus) {
  /* keep neutral until user actually submits — we handle errors in JS */
}

.ff-select { position: relative; }
.ff-select select {
  padding-right: 44px;
  cursor: pointer;
}
.ff-select__caret {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  pointer-events: none;
  color: var(--color-charcoal);
  opacity: 0.6;
}
.ff-select__caret svg { width: 100%; height: 100%; }

/* Honeypot — completely hidden from real users */
.ff-honeypot {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.ff-consent {
  font-size: 0.78rem;
  color: var(--color-muted);
  line-height: 1.5;
  margin-top: 0.25rem;
}

/* ===================== BUTTONS ===================== */
.ff-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 16px 32px;
  font-family: var(--font-eyebrow);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: var(--tracking-button);
  text-transform: uppercase;
  color: var(--color-charcoal);
  background: transparent;
  border: 2px solid var(--color-charcoal);
  border-radius: var(--radius);
  cursor: pointer;
  transition: all var(--transition);
  text-align: center;
}

.ff-btn:hover,
.ff-btn:focus-visible {
  background: var(--color-charcoal);
  color: var(--color-white);
  outline: none;
}

.ff-btn--filled {
  background: var(--color-charcoal);
  color: var(--color-white);
}
.ff-btn--filled:hover,
.ff-btn--filled:focus-visible {
  background: transparent;
  color: var(--color-charcoal);
}

.ff-form__submit { margin-top: 0.5rem; }

.ff-btn[aria-busy="true"] { pointer-events: none; opacity: 0.85; }
.ff-btn[aria-busy="true"] .ff-btn__label { opacity: 0.5; }
.ff-btn__spinner {
  display: none;
  width: 16px;
  height: 16px;
  border-radius: 999px;
  border: 2px solid currentColor;
  border-top-color: transparent;
  animation: ff-spin 0.7s linear infinite;
}
.ff-btn[aria-busy="true"] .ff-btn__spinner { display: inline-block; }

@keyframes ff-spin { to { transform: rotate(360deg); } }

.ff-form__status {
  min-height: 1.25em;
  margin-top: 0.5rem;
  font-size: 0.9rem;
  text-align: center;
  color: var(--color-text-light);
}
.ff-form__status.is-error { color: var(--color-error); }
.ff-form__status.is-success { color: var(--color-success); }

/* ===================== THANK YOU ===================== */
.ff-thanks__sparkle {
  width: 56px;
  margin: 0 auto 1.25rem;
  opacity: 0.9;
}
.ff-thanks__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
  margin: 2.25rem 0 1.5rem;
}
.ff-thanks__hours {
  font-size: 0.9rem;
  color: var(--color-text-light);
  margin-top: 1.25rem;
}

/* ===================== FOOTER ===================== */
.ff-footer {
  background: var(--color-charcoal);
  color: var(--color-cream);
  padding: 2.5rem 0;
  margin-top: auto;
}

.ff-footer__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.25rem;
  text-align: center;
}

.ff-footer__logo img {
  height: 36px;
  width: auto;
  filter: brightness(0) invert(1);
  opacity: 0.95;
}

.ff-footer__meta { font-size: 0.9rem; opacity: 0.85; line-height: 1.7; }
.ff-footer__meta a { text-decoration: underline; text-underline-offset: 3px; text-decoration-color: rgba(255,255,255,0.3); }
.ff-footer__meta a:hover { text-decoration-color: rgba(255,255,255,0.9); }
.ff-footer__dot { margin: 0 0.5rem; opacity: 0.5; }

.ff-footer__copy {
  font-family: var(--font-eyebrow);
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  opacity: 0.55;
}

/* ===================== REVEAL ANIMATIONS ===================== */
@media (prefers-reduced-motion: no-preference) {
  .ff-hero__title,
  .ff-hero__tagline,
  .ff-hero__sub,
  .ff-choices {
    opacity: 0;
    transform: translateY(12px);
    animation: ff-rise 0.7s ease-out forwards;
  }
  .ff-hero__title { animation-delay: 0.05s; }
  .ff-hero__tagline { animation-delay: 0.15s; }
  .ff-hero__sub { animation-delay: 0.25s; }
  .ff-choices { animation-delay: 0.35s; }

  .ff-form-section[data-revealed="true"] .ff-form-card {
    animation: ff-rise 0.5s ease-out;
  }
}
@keyframes ff-rise {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ===================== RESPONSIVE ===================== */
@media (max-width: 720px) {
  .ff-header__logo img { height: 36px; }
  .ff-header__phone-label { display: none; }
  .ff-choice { padding: 1.5rem 1.5rem 4.5rem; }
  .ff-choice__arrow { right: 1.25rem; bottom: 1.25rem; width: 40px; height: 40px; }
  .ff-form-card { padding: 1.75rem 1.25rem; }
}
