/* ============================================================
   FORM DESIGNER PAGE — formdesigner.css
   Design system tokens inherited from shared components.
   All fd-* prefixed classes are local to this page.
   Accent: violet #8B5CF6
   ============================================================ */

/* Nohemi (variable) is declared only once, in components/base.css.
   Global tokens, reset and typography come from components/base.css:
   only this page's own tokens are declared here (never a base token). */
:root {
  --fd-accent: #8B5CF6;          /* violet: fills and decoration */
  --fd-accent-ink: #7238F4;
  --fd-accent-hover: #7C3AED;
  --fd-accent-dim: rgba(139, 92, 246, 0.12);
  --border-dark: rgba(255, 255, 255, 0.1);
  --shadow-glow-orange: 0 0 40px rgba(139, 92, 246, 0.25);
}

/* ── Container ── */
.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--sp-3);
}

/* ── Shared section typography ── */
.eyebrow {
  display: block;
  font-size: var(--fs-label);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--fd-accent-ink);
  margin-bottom: var(--sp-2);
}
.eyebrow--light { color: var(--violet-on-dark); }

.section-title {
  font-family: var(--font-display);
  font-size: clamp(32px, 4vw, 52px);
  font-weight: 500;
  letter-spacing: -0.03em;
  line-height: 1.08;
  color: var(--text-primary);
  margin: 0 0 var(--sp-2);
}
.section-title--light { color: var(--text-on-dark); }

.section-sub {
  font-size: 17px;
  line-height: 1.65;
  color: var(--text-secondary);
  max-width: 560px;
}
.section-sub--light { color: var(--text-muted-on-dark); }

.section-header--center { text-align: center; }
.section-header--center .section-sub { margin: 0 auto; }

/* ── Shared buttons ── */
.fd-btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: var(--radius-pill);
  background: var(--violet-solid);  /* white 5.2:1 — --fd-accent gave 4.23:1 */
  color: #fff;
  font-size: 15px;
  font-weight: 550;
  letter-spacing: -0.01em;
  transition: background var(--transition), box-shadow var(--transition), transform var(--transition);
  box-shadow: var(--shadow-glow-orange);
  white-space: nowrap;
}
@media (hover: hover) and (pointer: fine) {
  .fd-btn-primary:hover {
    background: var(--fd-accent-hover);
    box-shadow: 0 0 60px rgba(139, 92, 246, 0.35);
    transform: translateY(-1px);
  }
}
.fd-btn-primary--lg { padding: 16px 36px; font-size: 16px; }
.fd-btn-primary--inverted {
  background: #F5F5EC;
  color: var(--fd-accent);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.12);
}
.fd-btn-primary--inverted:hover {
  background: #E9E2D7;
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.18);
}

.fd-btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 14px 24px;
  border-radius: var(--radius-pill);
  border: 1.5px solid rgba(255, 255, 255, 0.2);
  color: rgba(255, 255, 255, 0.82);
  font-size: 15px;
  font-weight: 500;
  letter-spacing: -0.01em;
  transition: border-color var(--transition), color var(--transition), background var(--transition), transform var(--transition);
}
.fd-btn-ghost:hover {
  border-color: rgba(255, 255, 255, 0.5);
  color: #fff;
  background: rgba(255, 255, 255, 0.06);
}
/* Press feedback: a quick dip on press that eases back on release */
.fd-btn-primary:active,
.fd-btn-ghost:active { transform: scale(0.98); transition-duration: 0.08s; }

/* ============================================================
   S1 — HERO
   ============================================================ */
.fd-hero {
  position: relative;
  overflow: hidden;
  background: var(--dark-bg);
  padding-bottom: var(--sp-7);
}

/* Multi-layer overlay — deep purple fade from bottom + left glow */
.fd-hero-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: radial-gradient(ellipse 70% 60% at 75% 45%, rgba(139, 92, 246, 0.22) 0%, transparent 65%),
    radial-gradient(ellipse 50% 50% at 10% 90%, rgba(139, 92, 246, 0.08) 0%, transparent 60%);
}
.fd-hero-overlay-bottom {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: radial-gradient(ellipse 45% 35% at 72% 18%, rgba(139, 92, 246, 0.1) 0%, transparent 60%);
}

.fd-hero-noise {
  position: absolute;
  inset: 0;
  z-index: 2;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.03'/%3E%3C/svg%3E");
  pointer-events: none;
  opacity: 0.4;
}

/* 2-col layout — copy left, feature cards right */
.fd-hero-inner {
  position: relative;
  z-index: 3;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
  gap: var(--sp-6);
  align-items: center;
  padding-top: calc(var(--nav-height) + var(--sp-7));
}

.fd-hero-copy {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--sp-3);
}

/* Icon + badge row */
.fd-hero-top-row {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
}

.fd-hero-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  background: rgba(139, 92, 246, 0.15);
  border: 1px solid rgba(139, 92, 246, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 0 20px rgba(139, 92, 246, 0.2);
}
.fd-hero-icon img { width: 32px; height: 32px; object-fit: contain; }

.fd-hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px 6px 10px;
  border-radius: var(--radius-pill);
  background: rgba(139, 92, 246, 0.12);
  border: 1px solid rgba(139, 92, 246, 0.3);
  color: rgba(180, 150, 255, 0.95);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: -0.01em;
  min-height: 44px;               /* it's a link: full touch target */
  transition: background var(--transition), border-color var(--transition);
  backdrop-filter: blur(8px);
}
.fd-hero-badge:hover {
  background: rgba(139, 92, 246, 0.2);
  border-color: rgba(139, 92, 246, 0.5);
}
.fd-hero-badge-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--fd-accent);
  box-shadow: 0 0 8px rgba(139, 92, 246, 0.8);
  animation: fd-pulse 2s ease-in-out  2;   /* ends before 5 s */
}
@keyframes fd-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(1.4); }
}

.fd-hero-headline {
  font-family: var(--font-display);
  font-size: clamp(52px, 6.5vw, 88px);
  font-weight: 450;
  letter-spacing: -0.045em;
  line-height: 1.0;
  color: #fff;
  max-width: 680px;
}
.fd-hero-headline-em {
  background: linear-gradient(135deg, #C4B5FD 0%, #8B5CF6 50%, #A78BFA 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.fd-hero-sub {
  font-size: clamp(16px, 1.8vw, 18px);
  line-height: 1.65;
  color: rgba(255, 255, 255, 0.55);
  max-width: 500px;
}

.fd-hero-ctas {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  flex-wrap: wrap;
}

.fd-hero-note {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: var(--text-muted-on-dark);
  flex-wrap: wrap;
}
.fd-hero-note svg { color: var(--fd-accent); opacity: 0.7; flex-shrink: 0; }

/* ── Hero visual: the real app, with two forms designed in it ── */
.fd-hero-visual {
  position: relative;
  padding: 8% 0 12%;
}
.fd-hero-app img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: var(--radius-lg);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.08), 0 40px 100px rgba(0, 0, 0, 0.5);
}
/* The form images have transparent edges: drop-shadow follows their real shape */
.fd-hero-form {
  position: absolute;
  height: auto;
  filter: drop-shadow(0 24px 40px rgba(0, 0, 0, 0.55));
}
.fd-hero-form--contact { width: 28%; left: -5%; bottom: 0; }
.fd-hero-form--payment { width: 24%; right: -3%; top: 0; }

/* Hero responsive */
@media (max-width: 960px) {
  .fd-hero-inner { grid-template-columns: minmax(0, 1fr); gap: var(--sp-5); }
  .fd-hero-visual { max-width: 640px; }
  .fd-hero-form--contact { left: 0; }
  .fd-hero-form--payment { right: 0; }
}
@media (max-width: 600px) {
  .fd-hero-ctas { flex-direction: column; width: 100%; }
  .fd-hero-ctas .fd-btn-primary,
  .fd-hero-ctas .fd-btn-ghost { width: 100%; justify-content: center; }
  .fd-hero-headline { font-size: clamp(42px, 12vw, 64px); }
}

/* ============================================================
   S2 — STATS BAR
   ============================================================ */
.fd-stats {
  background: var(--surface-card);
  border-bottom: 1px solid var(--border);
  padding: var(--sp-5) 0;
}
.fd-stats-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-5);
  flex-wrap: wrap;
}
.fd-stat {
  display: flex;
  flex-direction: column-reverse;   /* value above the label (<dt> comes first) */
  align-items: center;
  text-align: center;
  gap: 4px;
}
.fd-stat-n {
  white-space: nowrap;
  font-size: 26px;
  font-weight: 600;
  letter-spacing: -0.04em;
  color: var(--text-primary);
  line-height: 1;
}
.fd-stat-plus {
  font-size: 14px;
  font-weight: 500;
  color: var(--violet-on-light);
  letter-spacing: -0.01em;
}
.fd-stat-l {
  font-size: 13px;
  color: var(--text-secondary);
  max-width: 180px;
  line-height: 1.4;
}
.fd-stat-div {
  width: 1px;
  height: 40px;
  background: var(--border);
}

/* ============================================================
   S3 — DESIGN CONTROLS (feature tabs)
   ============================================================ */
.fd-feat-section {
  padding: var(--sp-8) 0;
}
.fd-feat-section--light {
  background: var(--surface-muted);
}
.fd-feat-section--dark {
  background: var(--dark-bg);
}
.fd-feat-header {
  margin-bottom: var(--sp-6);
}

/* Feature tabs + screenshots: shared component (components/feature-tabs.css) */

/* ============================================================
   S5 — GOOGLE FORMS INTEGRATION (dark)
   ============================================================ */
.fd-integration-section {
  padding: var(--sp-8) 0;
}

.fd-comparison {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: var(--sp-4);
  align-items: center;
  margin: var(--sp-6) 0;
}
.fd-comparison-card {
  border-radius: var(--radius-xl);
  overflow: hidden;
  border: 1px solid var(--border-dark);
}
.fd-comparison-card img {
  width: 100%;
  display: block;
}
.fd-comparison-label {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 8px 14px;
  font-size: 12px;
  font-weight: 550;
}
.fd-comparison-label--bad {
  background: rgba(239, 68, 68, 0.1);
  color: #ef4444;
  border-bottom: 1px solid rgba(239, 68, 68, 0.2);
}
.fd-comparison-label--good {
  background: rgba(34, 197, 94, 0.1);
  color: #22c55e;
  border-bottom: 1px solid rgba(34, 197, 94, 0.2);
}
.fd-comparison-caption {
  padding: 12px 14px;
  font-size: 12px;
  font-style: italic;
  color: var(--text-muted-on-dark);
  line-height: 1.5;
  background: rgba(255, 255, 255, 0.02);
}

.fd-comparison-arrow {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: var(--fd-accent);
}
.fd-comparison-arrow span {
  font-size: 12px;
  font-weight: 550;
  white-space: nowrap;
}

.fd-integrations-list {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-4);
  flex-wrap: wrap;
  margin-top: var(--sp-5);
}
.fd-int-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 20px;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-dark);
  color: rgba(255, 255, 255, 0.7);
  font-size: 14px;
  font-weight: 500;
  transition: background var(--transition), color var(--transition);
}
.fd-int-item svg { color: var(--fd-accent); }
.fd-int-item:hover {
  background: rgba(139, 92, 246, 0.08);
  color: rgba(255, 255, 255, 0.9);
}

/* ============================================================
   S6 — ALTERNATING FEATURES
   ============================================================ */
.fd-features-alt {
  padding: var(--sp-8) 0;
  background: var(--surface-card);
}
.fd-alt-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-7);
  align-items: center;
  padding: var(--sp-6) 0;
  border-bottom: 1px solid var(--border);
}
.fd-alt-row:last-child { border-bottom: none; }
.fd-alt-row--reversed { direction: rtl; }
.fd-alt-row--reversed > * { direction: ltr; }

.fd-alt-eyebrow {
  display: block;
  font-size: var(--fs-label);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--violet-on-light);
  margin-bottom: var(--sp-1);
}
.fd-alt-title {
  font-size: clamp(26px, 3vw, 38px);
  font-weight: 550;
  letter-spacing: -0.03em;
  line-height: 1.12;
  color: var(--text-primary);
  margin-bottom: var(--sp-2);
}
.fd-alt-desc {
  font-size: 16px;
  line-height: 1.65;
  color: var(--text-secondary);
  margin-bottom: var(--sp-3);
}
.fd-alt-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.fd-alt-list li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  color: var(--text-secondary);
  font-weight: 500;
}
.fd-alt-list svg { color: var(--fd-accent); flex-shrink: 0; }

.fd-screenshot-frame {
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: 0 0 0 1px var(--border),
    0 20px 60px rgba(0, 0, 0, 0.1);
  transition: transform var(--transition-smooth), box-shadow var(--transition-smooth);
}
@media (hover: hover) and (pointer: fine) {
  .fd-screenshot-frame:hover {
    transform: translateY(-6px) scale(1.01);
    box-shadow: 0 0 0 1px var(--border),
      0 32px 80px rgba(0, 0, 0, 0.15);
  }
}
.fd-screenshot-frame--dark {
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.06),
    0 20px 60px rgba(0, 0, 0, 0.25);
}
.fd-screenshot-frame img {
  width: 100%;
  display: block;
}

/* ============================================================
   S7 — GALLERY
   ============================================================ */
.fd-gallery {
  padding: var(--sp-8) 0;
  background: var(--surface-muted);
}
.fd-gallery-header {
  margin-bottom: var(--sp-6);
}
.fd-gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--sp-3);
}

.fd-gallery-item { border-radius: var(--radius-lg); overflow: hidden; }
.fd-gallery-thumb {
  position: relative;
  aspect-ratio: 4/3;
  overflow: hidden;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
}
.fd-gallery-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s var(--ease-out);
}
@media (hover: hover) and (pointer: fine) { .fd-gallery-thumb:hover img { transform: scale(1.05); } }

/* Caption always visible (it was hover-only: never shown on touch) */
.fd-gallery-caption {
  margin-top: 12px;
  font-size: var(--fs-small);
  font-weight: 500;
  line-height: 1.4;
  color: var(--text-secondary);
}

/* ============================================================
   S8 — PRICING
   ============================================================ */
.fd-pricing {
  position: relative;
  padding: var(--sp-8) 0;
  background: var(--dark-bg);
  overflow: hidden;
}
.fd-pricing-noise {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.04'/%3E%3C/svg%3E");
  opacity: 0.5;
}
.fd-pricing-header { margin-bottom: var(--sp-6); }

/* ============================================================
   S9 — CTA FINAL
   ============================================================ */
.fd-cta-section {
  padding: var(--sp-8) 0 var(--sp-7);
  background: var(--dark-bg);
  border-top: 1px solid var(--border-dark);
  text-align: center;
}
.fd-cta-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--sp-3);
}
.fd-cta-glow {
  position: absolute;
  width: 600px;
  height: 300px;
  border-radius: 50%;
  background: radial-gradient(ellipse, rgba(139, 92, 246, 0.08) 0%, transparent 70%);
  pointer-events: none;
  left: 50%;
  transform: translateX(-50%);
}
.fd-cta-section .section-title {
  max-width: 560px;
  margin: 0 auto var(--sp-1);
}
.fd-cta-sub {
  font-size: 17px;
  color: var(--text-muted-on-dark);
  max-width: 480px;
  line-height: 1.6;
}
.fd-cta-actions {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  flex-wrap: wrap;
  justify-content: center;
}
.fd-cta-link {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.45);
  transition: color var(--transition);
}
.fd-cta-link:hover { color: rgba(255, 255, 255, 0.75); }

/* ============================================================
   RESPONSIVE
   ============================================================ */

/* ── Mobile spacing tokens ── */
@media (max-width: 768px) {
  :root { --sp-5: 32px; --sp-6: 48px; --sp-7: 64px; --sp-8: 96px; }
}
@media (max-width: 480px) {
  :root { --sp-4: 24px; --sp-5: 24px; --sp-6: 36px; --sp-7: 48px; --sp-8: 64px; }
}

@media (max-width: 768px) {
  .fd-hero-headline { font-size: clamp(36px, 10vw, 56px); }

  .fd-stats-inner {
    gap: var(--sp-4);
    padding: 0 var(--sp-2);
  }
  .fd-stat-div { display: none; }

  .fd-comparison {
    grid-template-columns: 1fr;
  }
  .fd-comparison-arrow { flex-direction: row; padding: var(--sp-2) 0; }

  .fd-alt-row {
    grid-template-columns: 1fr;
    gap: var(--sp-4);
  }
  .fd-alt-row--reversed { direction: ltr; }

  .fd-gallery-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  

  .fd-hero-ctas { flex-direction: column; width: 100%; }
  .fd-btn-primary, .fd-btn-ghost { width: 100%; justify-content: center; }
}

@media (max-width: 480px) {
  .fd-gallery-grid { grid-template-columns: 1fr; }
}

/* ============================================================
   PRICING — extra elements
   ============================================================ */

.fd-btn-featured {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 14px 24px;
  border-radius: var(--radius-pill);
  background: var(--violet-solid);  /* white 5.2:1 — --fd-accent gave 4.23:1 */
  color: #fff;
  font-size: 15px;
  font-weight: 550;
  box-shadow: var(--shadow-glow-orange);
  transition: background var(--transition), box-shadow var(--transition), transform var(--transition);
  text-align: center;
}
@media (hover: hover) and (pointer: fine) {
  .fd-btn-featured:hover {
    background: var(--fd-accent-hover);
    box-shadow: 0 0 60px rgba(139, 92, 246, 0.35);
    transform: translateY(-1px);
  }
}
.fd-btn-featured:active { transform: scale(0.98); transition-duration: 0.08s; }

/* ============================================================
   S9 — FINAL CTA
   ============================================================ */
.fd-final-cta {
  position: relative;
  padding: var(--sp-8) 0;
  background: var(--dark-bg);
  border-top: 1px solid var(--border-dark);
  text-align: center;
  overflow: hidden;
}
.fd-final-noise {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(ellipse 60% 50% at 50% 50%, rgba(139, 92, 246, 0.06) 0%, transparent 70%);
}
.fd-final-inner {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--sp-3);
  max-width: 640px;
  margin: 0 auto;
}
.fd-final-icon {
  width: 64px;
  height: 64px;
  border-radius: var(--radius-lg);
  background: rgba(139, 92, 246, 0.1);
  border: 1px solid rgba(139, 92, 246, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
}
.fd-final-inner h2 {
  font-size: clamp(30px, 4vw, 48px);
  font-weight: 500;
  letter-spacing: -0.03em;
  line-height: 1.1;
  color: var(--text-on-dark);
}
.fd-final-inner p {
  font-size: 17px;
  color: var(--text-muted-on-dark);
  line-height: 1.6;
}
.fd-final-actions {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  flex-wrap: wrap;
  justify-content: center;
  margin-top: var(--sp-1);
}

@media (max-width: 480px) {
  .fd-final-actions { flex-direction: column; width: 100%; }
  .fd-final-actions .fd-btn-primary,
  .fd-final-actions .fd-btn-ghost { width: 100%; justify-content: center; }
}

/* ============================================================
   FAQ
   Same pattern as the other product pages (accessible
   accordion: collapsed answer with visibility: hidden).
   ============================================================ */
.fd-faq {
  background: var(--surface);
  padding: var(--sp-8) var(--sp-3);
}
.fd-faq-inner {
  max-width: 760px;
  margin: 0 auto;
}
.fd-faq .section-header--center { margin-bottom: var(--sp-5); }

/* ── FAQ — canonical pattern (matches index.html exactly) ── */

@media (max-width: 640px) {
  .fd-faq { padding: var(--sp-6) var(--sp-2); }
}

/* ── Plan icon image (formerly an inline style) ── */

/* Super Pack icon: a 2×2 mosaic of the real app icons (packs-assets/superpack-icon).
   It carries its own color, so the box drops its tint, border and padding. */

/* Pricing: same accent as every pricing section */
#pricing .eyebrow--light { color: var(--primary-on-dark); }
