/* ==========================================================================
   Component Library — light "Lemon" theme. BEM-ish, reusable.
   ========================================================================== */

/* ---- Layout primitives ---- */
.container { width: 100%; max-width: var(--container-max); margin-inline: auto; padding-inline: var(--gutter); }
.container--wide { max-width: var(--container-wide); }

.section { position: relative; padding-top: var(--section-y); padding-bottom: var(--section-y-end); }
.section--alt { background: var(--bg-elevated-2); }
/* Continuation section — sits tight under the preceding one (no stacked top gap) */
.section--flush-top { padding-top: 0; }

.section__head { max-width: 680px; margin-bottom: var(--space-7); }
.section__head--center { margin-inline: auto; text-align: center; }
/* Section name (eyebrow) → heading: clear, reliable breathing room (block-level so margin actually renders) */
.section__head--center .eyebrow { display: flex; justify-content: center; margin: 0 auto clamp(2.25rem, 3.5vw, 3.25rem); }
/* Centered section-name label → section content: generous distance */
.section-kicker { text-align: center; margin-bottom: clamp(4.5rem, 7vw, 6.5rem); }

.grid { display: grid; gap: var(--space-6); }
.flow > * + * { margin-top: var(--space-5); }
.divider { height: 1px; background: var(--hairline); border: 0; }

/* ---- Buttons ---- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2);
  padding: 0.95rem 1.6rem;
  font-family: var(--font-body); font-size: var(--fs-sm); font-weight: var(--fw-medium); letter-spacing: 0.01em;
  border-radius: var(--radius-pill);
  transition: transform var(--dur-base) var(--ease-out), box-shadow var(--dur-base) var(--ease-out),
              background var(--dur-base) var(--ease-out), border-color var(--dur-base) var(--ease-out), color var(--dur-base) var(--ease-out);
  white-space: nowrap;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }
.btn .btn__icon { transition: transform var(--dur-base) var(--ease-out); }
.btn:hover .btn__icon { transform: translateX(4px); }

.btn--primary { background: var(--color-dark); color: #fff; box-shadow: var(--shadow-md); }
.btn--primary:hover { background: #000; box-shadow: var(--shadow-lg); }

.btn--ghost { background: var(--color-surface); color: var(--text-primary); border: 1px solid var(--glass-border-strong); }
.btn--ghost:hover { border-color: var(--text-primary); }

.btn--lg { padding: 1.1rem 2rem; font-size: var(--fs-body); }
.btn--sm { padding: 0.58rem 1.05rem; font-size: var(--fs-xs); }
.btn--block { width: 100%; white-space: normal; }

/* ---- Cards / surfaces ---- */
.glass { background: var(--glass); border: 1px solid var(--glass-border); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }

.card {
  position: relative;
  background: var(--color-surface);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  padding: var(--space-6);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: transform var(--dur-base) var(--ease-out), border-color var(--dur-base) var(--ease-out), box-shadow var(--dur-base) var(--ease-out);
}
.card--interactive { cursor: pointer; }
.card--interactive:hover { transform: translateY(-6px); border-color: var(--color-yellow); box-shadow: var(--shadow-lg); }

/* ---- Badges / pills ---- */
.badge {
  display: inline-flex; align-items: center; gap: var(--space-2);
  padding: 0.4rem 0.85rem; font-size: var(--fs-xs); font-weight: 600; letter-spacing: 0.02em;
  border-radius: var(--radius-pill); background: var(--color-surface);
  border: 1px solid var(--glass-border); color: var(--text-secondary);
}
.badge--gold { color: var(--text-primary); border-color: var(--color-yellow); background: var(--color-yellow-soft); }
.badge__dot { width: 7px; height: 7px; border-radius: 50%; background: var(--color-yellow-deep); box-shadow: 0 0 0 0 rgba(59,130,246,0.5); animation: pulse-ring 2.4s var(--ease-out) infinite; }

.tag { font-size: var(--fs-xs); padding: 0.3rem 0.7rem; border-radius: var(--radius-sm); background: var(--bg-elevated-2); border: 1px solid var(--hairline); color: var(--text-secondary); }

/* ---- Form controls ---- */
.field { position: relative; }
.field + .field { margin-top: var(--space-4); }
.field__label { display: block; font-size: var(--fs-xs); font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; color: var(--text-tertiary); margin-bottom: var(--space-2); }
.input, .textarea {
  width: 100%; padding: 0.9rem 1.1rem; font-size: var(--fs-sm); color: var(--text-primary);
  background: var(--bg-base); border: 1px solid var(--glass-border); border-radius: var(--radius-md);
  transition: border-color var(--dur-base) var(--ease-out), box-shadow var(--dur-base) var(--ease-out), background var(--dur-base) var(--ease-out);
}
.input::placeholder, .textarea::placeholder { color: var(--text-tertiary); }
.input:focus, .textarea:focus { outline: none; background: var(--color-surface); border-color: var(--color-ink); box-shadow: 0 0 0 4px var(--color-yellow-soft); }
.textarea { resize: vertical; min-height: 110px; }

/* Native <select> styled to match .input (custom chevron, no OS default arrow). */
select.input {
  appearance: none; -webkit-appearance: none; -moz-appearance: none;
  cursor: pointer; padding-right: 2.6rem;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23667085' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 1.1rem center;
}
select.input:invalid { color: var(--text-tertiary); }

/* Honeypot / botcheck — removed from layout and the accessibility tree. */
.hp-field {
  position: absolute !important; left: -9999px !important; top: auto !important;
  width: 1px !important; height: 1px !important; overflow: hidden !important;
}

/* Validation: invalid fields */
.field--invalid .input, .field--invalid .textarea { border-color: #c0392b; }
.field--invalid .input:focus, .field--invalid .textarea:focus { border-color: #c0392b; box-shadow: 0 0 0 4px rgba(192, 57, 43, 0.14); }
.field__error {
  display: none; margin-top: var(--space-2); font-size: var(--fs-xs); font-weight: 500; color: #c0392b;
}
.field--invalid .field__error { display: block; }

.form-status { margin-top: var(--space-4); font-size: var(--fs-sm); min-height: 1.4em; }
.form-status--ok { color: var(--color-yellow-deep); font-weight: 600; }
.form-status--err { color: #c0392b; }


/* ---- Navigation ---- */
.nav { position: fixed; inset: 0 0 auto 0; z-index: var(--z-nav); border-bottom: 1px solid transparent;
  transform: translateY(0);
  transition: transform var(--dur-base) var(--ease-out), background var(--dur-base) var(--ease-out), border-color var(--dur-base) var(--ease-out);
}
.nav.is-scrolled { background: rgba(248,245,239, 0.85); backdrop-filter: blur(16px) saturate(140%); -webkit-backdrop-filter: blur(16px) saturate(140%); border-bottom-color: var(--hairline); }
.nav.is-hidden { transform: translateY(-100%); }
.nav.is-open { transform: translateY(0); }
.nav__inner { display: flex; align-items: center; justify-content: space-between; height: 74px; }
.nav__brand { display: inline-flex; align-items: center; }
.nav__logo { height: 52px; width: auto; display: block; }
.nav__mark { width: 48px; height: 48px; display: grid; place-items: center; border-radius: 50%; background: var(--color-ink); color: var(--color-ink); font-weight: 800; overflow: hidden; }
.nav__mark img { width: 72%; height: 72%; object-fit: contain; }
.nav__menu { display: flex; align-items: center; gap: var(--space-6); }
.nav__link { font-family: var(--font-display); font-size: var(--fs-sm); font-weight: var(--fw-regular); letter-spacing: var(--tracking-snug); color: var(--text-secondary); position: relative; transition: color var(--dur-base) var(--ease-out); }
.nav__link::after { content: ""; position: absolute; left: 0; bottom: -6px; width: 100%; height: 2px; background: var(--color-yellow); transform: scaleX(0); transform-origin: left; transition: transform var(--dur-base) var(--ease-out); }
.nav__link:hover, .nav__link.is-active { color: var(--text-primary); }
.nav__link:hover::after, .nav__link.is-active::after { transform: scaleX(1); }
.nav__actions { display: flex; align-items: center; gap: var(--space-4); }

.nav__toggle { display: none; width: 44px; height: 44px; place-items: center; border-radius: var(--radius-sm); border: 1px solid var(--glass-border); background: var(--color-surface); }
.nav__toggle span { position: relative; width: 18px; height: 2px; background: var(--text-primary); transition: background 0.1s linear; }
.nav__toggle span::before, .nav__toggle span::after { content: ""; position: absolute; left: 0; width: 18px; height: 2px; background: var(--text-primary); transition: transform var(--dur-base) var(--ease-out), top var(--dur-base) var(--ease-out); }
.nav__toggle span::before { top: -6px; } .nav__toggle span::after { top: 6px; }
.nav.is-open .nav__toggle span { background: transparent; }
.nav.is-open .nav__toggle span::before { top: 0; transform: rotate(45deg); }
.nav.is-open .nav__toggle span::after { top: 0; transform: rotate(-45deg); }

/* Scroll progress */
.scroll-progress { position: fixed; top: 0; left: 0; height: 3px; width: 100%; transform: scaleX(0); transform-origin: left; background: var(--color-yellow); z-index: var(--z-nav); will-change: transform; }

/* ---- Stat ---- */
.stat__value { font-family: var(--font-display); font-weight: var(--fw-light); font-size: clamp(2.8rem, 1.6rem + 4.4vw, 5rem); line-height: 1; letter-spacing: var(--tracking-tight); }
.stat__label { margin-top: var(--space-3); font-size: var(--fs-sm); color: var(--text-secondary); max-width: 26ch; }

/* Ambience layer */
.ambience { position: absolute; inset: 0; pointer-events: none; z-index: 0; background: var(--grad-spotlight); }
.section > .container { position: relative; z-index: 1; }

/* ---- Footer policy links ---- */
.footer__policies { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-4); }
.footer__policies a, .footer__policies button { font-size: var(--fs-xs); color: var(--text-tertiary); transition: color var(--dur-base) var(--ease-out); }
.footer__policies a:hover, .footer__policies button:hover { color: var(--color-yellow-deep); }

/* ---- Cookie consent banner ---- */
.cookie { position: fixed; left: 0; right: 0; bottom: 0; z-index: var(--z-overlay); padding: var(--gutter); pointer-events: none; }
.cookie[hidden] { display: none; }
.cookie__banner {
  pointer-events: auto;
  max-width: var(--container-max); margin-inline: auto;
  display: flex; align-items: center; justify-content: space-between; gap: var(--space-5) var(--space-6); flex-wrap: wrap;
  background: var(--glass-strong); -webkit-backdrop-filter: blur(18px) saturate(1.4); backdrop-filter: blur(18px) saturate(1.4);
  border: 1px solid var(--glass-border); border-radius: var(--radius-md); box-shadow: var(--shadow-lg);
  padding: var(--space-4) var(--space-5);
  opacity: 0; transform: translateY(16px);
  transition: opacity var(--dur-slow) var(--ease-out), transform var(--dur-slow) var(--ease-out);
}
.cookie.is-in .cookie__banner { opacity: 1; transform: none; }
.cookie__text { font-size: var(--fs-sm); color: var(--text-secondary); line-height: 1.55; max-width: 62ch; margin: 0; }
.cookie__text a { color: var(--text-primary); text-decoration: underline; text-underline-offset: 2px; }
.cookie__actions { display: flex; flex-wrap: wrap; gap: var(--space-2); flex: none; }

/* ---- Cookie preferences modal ---- */
.cookie-prefs { position: fixed; inset: 0; z-index: var(--z-overlay); display: grid; place-items: center; padding: var(--gutter); }
.cookie-prefs[hidden] { display: none; }
.cookie-prefs__overlay { position: absolute; inset: 0; background: rgba(20, 20, 16, 0.55); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); opacity: 0; transition: opacity var(--dur-base) var(--ease-out); }
.cookie-prefs__dialog {
  position: relative; width: 100%; max-width: 460px;
  max-height: calc(100dvh - 2 * var(--gutter)); overflow-y: auto;
  background: var(--color-surface); border: 1px solid var(--glass-border);
  border-radius: var(--radius-md); box-shadow: var(--shadow-lg);
  padding: clamp(1.5rem, 1rem + 2vw, 2.25rem);
  opacity: 0; transform: translateY(14px) scale(0.985);
  transition: opacity var(--dur-base) var(--ease-out), transform var(--dur-base) var(--ease-out);
}
.cookie-prefs.is-open .cookie-prefs__overlay { opacity: 1; }
.cookie-prefs.is-open .cookie-prefs__dialog { opacity: 1; transform: none; }
.cookie-prefs__close { position: absolute; top: 0.85rem; right: 0.85rem; width: 36px; height: 36px; display: grid; place-items: center; border-radius: 50%; color: var(--text-secondary); background: var(--bg-elevated-2); transition: background var(--dur-base), color var(--dur-base); }
.cookie-prefs__close:hover { background: var(--color-ink); color: #fff; }
.cookie-prefs__title { font-family: var(--font-display); font-size: var(--fs-h3); font-weight: var(--fw-regular); }
.cookie-prefs__intro { margin-top: var(--space-3); font-size: var(--fs-sm); color: var(--text-secondary); line-height: 1.55; }
.cookie-prefs__list { margin-top: var(--space-5); display: grid; gap: var(--space-3); }
.cookie-opt { padding: var(--space-4); border: 1px solid var(--glass-border); border-radius: var(--radius-md); background: var(--bg-base); }
.cookie-opt__head { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); }
.cookie-opt__name { font-weight: 600; font-size: var(--fs-sm); }
.cookie-opt__state { font-size: var(--fs-xs); font-weight: 600; text-transform: uppercase; letter-spacing: var(--tracking-wide); color: var(--color-yellow-deep); }
.cookie-opt__desc { margin-top: var(--space-2); font-size: var(--fs-xs); color: var(--text-tertiary); line-height: 1.5; }
.cookie-prefs__actions { display: flex; flex-wrap: wrap; gap: var(--space-3); justify-content: flex-end; margin-top: var(--space-5); }

/* ---- Toggle switch ---- */
.switch { position: relative; display: inline-flex; flex: none; width: 44px; height: 24px; cursor: pointer; }
.switch input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.switch__track { width: 44px; height: 24px; border-radius: var(--radius-pill); background: var(--color-bg-2); border: 1px solid var(--glass-border-strong); transition: background var(--dur-base) var(--ease-out); }
.switch__track::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: var(--shadow-sm); transition: transform var(--dur-base) var(--ease-spring); }
.switch input:checked + .switch__track { background: var(--color-dark); border-color: var(--color-dark); }
.switch input:checked + .switch__track::after { transform: translateX(20px); }
.switch input:focus-visible + .switch__track { outline: 2px solid var(--color-ink); outline-offset: 2px; }
body.cookie-open { overflow: hidden; }

/* ---- Accredited-investor gate ---- */
.gate { display: flex; flex-direction: column; }
.gate__eyebrow { font-size: var(--fs-overline); font-weight: 700; text-transform: uppercase; letter-spacing: var(--tracking-wide); color: var(--text-tertiary); }
.gate__title { font-family: var(--font-display); font-size: var(--fs-h4); font-weight: var(--fw-medium); letter-spacing: var(--tracking-snug); line-height: 1.2; margin-top: var(--space-2); }
.gate__copy { margin-top: var(--space-3); color: var(--text-secondary); font-size: var(--fs-sm); line-height: 1.6; }
.gate__check { display: flex; gap: var(--space-3); align-items: flex-start; margin-top: var(--space-5); padding: var(--space-4); background: var(--bg-base); border: 1px solid var(--glass-border); border-radius: var(--radius-md); cursor: pointer; transition: border-color var(--dur-base) var(--ease-out), background var(--dur-base) var(--ease-out); }
.gate__check:hover { border-color: var(--glass-border-strong); }
.gate__check:has(input:checked) { border-color: var(--color-dark); background: var(--color-surface); }
.gate__check input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.gate__box { flex: none; width: 22px; height: 22px; margin-top: 1px; border-radius: 6px; border: 1.5px solid var(--glass-border-strong); background: var(--color-surface); display: grid; place-items: center; color: #fff; transition: background var(--dur-base) var(--ease-out), border-color var(--dur-base) var(--ease-out); }
.gate__box svg { opacity: 0; transition: opacity var(--dur-base) var(--ease-out); }
.gate__check input:checked + .gate__box { background: var(--color-dark); border-color: var(--color-dark); }
.gate__check input:checked + .gate__box svg { opacity: 1; }
.gate__check input:focus-visible + .gate__box { outline: 2px solid var(--color-ink); outline-offset: 2px; }
.gate__label { font-size: var(--fs-sm); color: var(--text-primary); line-height: 1.5; }
.gate__disclaimer { display: inline-flex; align-items: center; gap: 5px; margin-top: var(--space-4); font-size: var(--fs-xs); font-weight: 600; color: var(--color-yellow-deep); }
.gate__disclaimer:hover { text-decoration: underline; text-underline-offset: 2px; }
.gate__continue { margin-top: var(--space-4); transition: background var(--dur-base) var(--ease-out), color var(--dur-base) var(--ease-out); }
.gate__continue:disabled { background: var(--bg-elevated-2); color: var(--text-tertiary); box-shadow: none; opacity: 1; cursor: not-allowed; }
.gate__continue:disabled:hover { transform: none; box-shadow: none; }
.gate__continue:disabled .btn__icon { display: none; }
.gate__fine { margin-top: var(--space-4); font-size: var(--fs-xs); color: var(--text-tertiary); line-height: 1.6; }

/* Gate → form reveal */
.gate-form--in { animation: gate-rise 0.5s var(--ease-out) both; }
@keyframes gate-rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.gate__verified { display: flex; align-items: center; gap: var(--space-2); margin-bottom: var(--space-5); font-size: var(--fs-xs); font-weight: 600; color: var(--text-secondary); }
.gate__verified-tick { flex: none; width: 20px; height: 20px; display: grid; place-items: center; border-radius: 50%; background: var(--color-dark); color: #fff; }
@media (prefers-reduced-motion: reduce) { .gate-form--in { animation: none; } }
