/* ============================================================
   PROPENTIAL — shared design system
   Ink, ivory & champagne. Restrained, premium, plain-spoken.
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Fraunces:ital,opsz,wght@0,9..144,400;0,9..144,500;0,9..144,600;1,9..144,400;1,9..144,500;1,9..144,600&family=Hanken+Grotesk:ital,wght@0,300;0,400;0,500;0,600;0,700;1,400&display=swap');

:root {
  /* palette */
  --ink: #0E0F0D;
  --olive: #1D1E15;
  --olive-2: #16170F;
  --champagne: #D6B15E;
  --champagne-bright: #ECD58C;
  --champagne-deep: #B6873A;
  --ivory: #F3EEE2;

  /* derived text */
  --text: #EAE5D9;
  --text-muted: #A7A399;
  --text-faint: #6F6C63;
  --line: rgba(214, 177, 94, 0.18);
  --line-soft: rgba(243, 238, 226, 0.08);

  --gold-grad: linear-gradient(180deg, #ECD58C 0%, #D6B15E 52%, #B6873A 100%);
  --gold-grad-text: linear-gradient(180deg, #F0DA97 0%, #D6B15E 60%, #C0913F 100%);

  /* fonts (font-feel tweak overrides --font-display) */
  --font-display: 'Fraunces', Georgia, 'Times New Roman', serif;
  --font-body: 'Hanken Grotesk', system-ui, -apple-system, sans-serif;

  /* gold intensity tweak controls these */
  --glow-strength: 0.40;
  --accent-line: rgba(214, 177, 94, 0.18);

  --maxw: 1140px;
  --radius: 18px;
  --radius-lg: 26px;
}

/* ---- gold intensity tweak ---- */
html[data-gold="restrained"] { --glow-strength: 0.22; --accent-line: rgba(214,177,94,0.12); }
html[data-gold="present"]    { --glow-strength: 0.70; --accent-line: rgba(214,177,94,0.30); }

/* ---- heading font feel tweak ---- */
html[data-font="neutral"] { --font-display: 'Hanken Grotesk', system-ui, sans-serif; }

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

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--font-body);
  background: var(--ink);
  color: var(--text);
  line-height: normal;
  font-size: 14px;
  letter-spacing: 0.005em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

/* ============================================================
   TYPOGRAPHY
   ============================================================ */
.eyebrow {
  font-family: var(--font-body);
  text-transform: uppercase;
  letter-spacing: 0.32em;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--champagne);
  display: inline-block;
}

/* Fraunces (display) is always rendered at weight 400 */
h1, h2, h3 { font-family: var(--font-display); font-weight: 400; line-height: 1.1; letter-spacing: -0.015em; color: var(--ivory); text-wrap: pretty; }
html[data-font="neutral"] h1,
html[data-font="neutral"] h2,
html[data-font="neutral"] h3 { letter-spacing: -0.03em; font-weight: 600; line-height: 1.08; }

.display { font-size: clamp(2.6rem, 8vw, 4.6rem); }
h2.section-title { font-size: clamp(2rem, 5.2vw, 3.1rem); }

.italic-gold { font-style: italic; color: var(--champagne); }
html[data-font="neutral"] .italic-gold { font-style: normal; }

.lead {
  font-size: clamp(0.8rem, 1vw, 0.875rem);
  color: var(--text-muted);
  line-height: normal;
  max-width: none;
  margin-top: 18px;
  text-wrap: pretty;
}

/* ============================================================
   LAYOUT
   ============================================================ */
.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 22px; }
.section { padding: clamp(64px, 11vw, 128px) 0; position: relative; }
.section--olive { background: var(--olive); }
.section--ivory { background: var(--ivory); color: #2A2A22; }
.section--ivory h2, .section--ivory h3 { color: var(--ink); }
.section--ivory .lead { color: #5C5A50; }
.section--ivory .eyebrow { color: var(--champagne-deep); }

/* light/dark rhythm tweak — flips designated swap sections to ivory */
html[data-rhythm="light"] .section--swap { background: var(--ivory); color: #2A2A22; }
html[data-rhythm="light"] .section--swap h2,
html[data-rhythm="light"] .section--swap h3 { color: var(--ink); }
html[data-rhythm="light"] .section--swap .lead { color: #5C5A50; }
html[data-rhythm="light"] .section--swap .eyebrow { color: var(--champagne-deep); }
html[data-rhythm="light"] .section--swap .feature-card { background: #fff; border-color: rgba(0,0,0,0.07); }
html[data-rhythm="light"] .section--swap .feature-card h3 { color: var(--ink); }
html[data-rhythm="light"] .section--swap .feature-card p { color: #5C5A50; }

.hairline { height: 1px; background: linear-gradient(90deg, transparent, var(--accent-line) 22%, var(--accent-line) 78%, transparent); border: 0; }

/* ============================================================
   MARK + WORDMARK
   ============================================================ */
.mark { display: block; }
.mark svg { display: block; height: 100%; width: auto; }

.wordmark { font-family: var(--font-display); font-weight: 400; letter-spacing: -0.01em; white-space: nowrap; line-height: 1; }
.wordmark .prop { color: var(--ivory); }
.wordmark .ential { color: var(--champagne); font-style: italic; }

.lockup { display: inline-flex; align-items: center; gap: 12px; }

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.875rem;
  letter-spacing: 0.01em;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 15px 28px;
  border-radius: 12px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform .18s ease, box-shadow .25s ease, background .2s ease, color .2s ease, border-color .2s ease;
  text-align: center;
  line-height: 1;
}
.btn-primary {
  background: var(--gold-grad);
  color: #221A08;
  box-shadow: 0 10px 30px -12px rgba(214,177,94,0.6);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 16px 40px -12px rgba(214,177,94,0.8); }
.btn-ghost {
  background: transparent;
  color: var(--ivory);
  border-color: rgba(243,238,226,0.28);
}
.btn-ghost:hover { border-color: var(--champagne); color: var(--champagne); transform: translateY(-2px); }
.btn-lg { padding: 18px 34px; font-size: 0.875rem; }
.btn-block { width: 100%; }
.section--ivory .btn-ghost { color: var(--ink); border-color: rgba(0,0,0,0.2); }

.arrow-link { color: var(--champagne); font-weight: 600; display: inline-flex; align-items: center; gap: 8px; transition: gap .2s ease; }
.arrow-link:hover { gap: 14px; }

/* ============================================================
   NAVBAR
   ============================================================ */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(14,15,13,0.72);
  backdrop-filter: saturate(150%) blur(16px);
  -webkit-backdrop-filter: saturate(150%) blur(16px);
  border-bottom: 1px solid var(--line-soft);
}
.nav__inner { display: flex; align-items: center; justify-content: space-between; height: 72px; }
.nav__brand { display: inline-flex; align-items: center; gap: 11px; }
.nav__brand .mark { height: 32px; }
.nav__brand .wordmark { font-size: 1.42rem; }
.nav__links { display: flex; align-items: center; gap: 34px; list-style: none; }
.nav__links a { color: var(--text-muted); font-size: 0.875rem; font-weight: 500; transition: color .2s ease; position: relative; }
.nav__links a:hover, .nav__links a.is-active { color: var(--ivory); }
.nav__links a.is-active::after { content:""; position:absolute; left:0; right:0; bottom:-6px; height:2px; background: var(--gold-grad); border-radius: 2px; }
.nav__cta { display: flex; align-items: center; gap: 16px; }
.nav__cta .btn { padding: 11px 22px; font-size: 0.875rem; }
.nav__toggle { display: none; background: none; border: 0; cursor: pointer; padding: 8px; width: 44px; height: 44px; align-items: center; justify-content: center; }
.nav__toggle span { display:block; width: 24px; height: 2px; background: var(--ivory); position: relative; transition: .25s; }
.nav__toggle span::before, .nav__toggle span::after { content:""; position:absolute; left:0; width:24px; height:2px; background: var(--ivory); transition:.25s; }
.nav__toggle span::before { top:-7px; } .nav__toggle span::after { top:7px; }
body.menu-open .nav__toggle span { background: transparent; }
body.menu-open .nav__toggle span::before { top:0; transform: rotate(45deg); }
body.menu-open .nav__toggle span::after { top:0; transform: rotate(-45deg); }

@media (max-width: 960px) {
  .nav__toggle { display: inline-flex; }
  .nav__menu {
    position: fixed; inset: 72px 0 auto 0; z-index: 49;
    background: var(--ink);
    border-bottom: 1px solid var(--line-soft);
    flex-direction: column; align-items: stretch;
    padding: 18px 22px 30px;
    gap: 0;
    transform: translateY(-12px); opacity: 0; pointer-events: none;
    transition: .26s ease;
    display: flex;
  }
  body.menu-open .nav__menu { transform: none; opacity: 1; pointer-events: auto; }
  .nav__links { flex-direction: column; align-items: stretch; gap: 0; }
  .nav__links li { border-bottom: 1px solid var(--line-soft); }
  .nav__links a { display: block; padding: 16px 2px; font-size: 1.1rem; }
  .nav__cta { margin-top: 20px; }
  .nav__cta .btn { width: 100%; padding: 15px; font-size: 1rem; }
}
@media (min-width: 961px) {
  .nav__menu { display: flex; align-items: center; gap: 34px; }
}
.nav__links a { white-space: nowrap; }

/* ============================================================
   FEATURE CARDS / TILES
   ============================================================ */
.feature-card {
  background: var(--olive);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  padding: 28px 26px;
  transition: border-color .25s ease, transform .25s ease;
}
.feature-card:hover { border-color: var(--accent-line); transform: translateY(-3px); }
.feature-card .ico { color: var(--champagne); margin-bottom: 16px; }
.feature-card h3 { font-size: 1.12rem; margin-bottom: 8px; color: var(--ivory); }
.feature-card p { color: var(--text-muted); font-size: 0.875rem; line-height: normal; }

.grid { display: grid; gap: 18px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 820px) { .grid-3 { grid-template-columns: repeat(2,1fr); } }
@media (max-width: 560px) { .grid-2, .grid-3 { grid-template-columns: 1fr; } }

/* ============================================================
   HERO PRODUCT CARD
   ============================================================ */
.product-card {
  position: relative;
  background: linear-gradient(165deg, #20211A 0%, #131410 70%);
  border: 1px solid var(--accent-line);
  border-radius: var(--radius-lg);
  padding: 34px 32px 30px;
  overflow: hidden;
  box-shadow: 0 40px 80px -40px rgba(0,0,0,0.8);
}
.product-card::before {
  content:""; position:absolute; inset:0;
  background: radial-gradient(120% 80% at 80% -10%, rgba(214,177,94,calc(var(--glow-strength) * 0.5)), transparent 60%);
  pointer-events:none;
}
.product-card > * { position: relative; }

/* ============================================================
   FORMS
   ============================================================ */
.field { margin-bottom: 22px; }
.field > label { display: block; font-weight: 600; font-size: 0.875rem; color: var(--ivory); margin-bottom: 9px; }
.field .hint { font-size: 0.85rem; color: var(--text-faint); margin-top: 7px; line-height: normal; }
.input, .select, textarea.input {
  width: 100%;
  background: var(--olive);
  border: 1px solid rgba(243,238,226,0.14);
  color: var(--ivory);
  border-radius: 13px;
  padding: 15px 16px;
  font-family: var(--font-body);
  font-size: 0.875rem;
  transition: border-color .2s ease, box-shadow .2s ease;
}
.input::placeholder { color: var(--text-faint); }
.input:focus, .select:focus, textarea.input:focus {
  outline: none;
  border-color: var(--champagne);
  box-shadow: 0 0 0 3px rgba(214,177,94,0.16);
}
.select {
  appearance: none; -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='9' viewBox='0 0 14 9'%3E%3Cpath d='M1 1l6 6 6-6' stroke='%23D6B15E' stroke-width='2' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 16px center;
  padding-right: 42px;
}
.field--error .input, .field--error .select { border-color: #C9603F; }
.error-msg { color: #E08763; font-size: 0.85rem; margin-top: 7px; display: none; }
.field--error .error-msg { display: block; }

/* segmented option chips */
.chip-group { display: flex; flex-wrap: wrap; gap: 10px; }
.chip {
  position: relative; cursor: pointer;
  border: 1px solid rgba(243,238,226,0.16);
  border-radius: 12px;
  padding: 13px 18px;
  font-weight: 500; font-size: 0.875rem; color: var(--text-muted);
  transition: .18s ease; background: var(--olive); white-space: nowrap;
}
.chip input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.chip:hover { border-color: var(--accent-line); color: var(--ivory); }
.chip.is-checked { border-color: var(--champagne); color: var(--ink); background: var(--gold-grad); }

/* repayment frequency toggle */
.freq-toggle { display: inline-flex; gap: 3px; padding: 3px; border-radius: 999px; background: rgba(243,238,226,0.05); border: 1px solid var(--line-soft); }
.freq-opt { appearance: none; -webkit-appearance: none; border: 0; cursor: pointer; background: transparent; color: var(--text-muted); font-family: inherit; font-size: 0.72rem; font-weight: 600; letter-spacing: 0.03em; padding: 7px 15px; border-radius: 999px; transition: .18s ease; white-space: nowrap; line-height: 1; }
.freq-opt:hover { color: var(--ivory); }
.freq-opt.is-active { background: var(--gold-grad); color: var(--ink); box-shadow: 0 0 14px -4px var(--glow); }
.freq-toggle--sm .freq-opt { font-size: 0.64rem; padding: 6px 13px; }

/* consent / checkbox */
.consent { display: flex; gap: 13px; align-items: flex-start; padding: 18px; border: 1px solid var(--line-soft); border-radius: 14px; background: rgba(243,238,226,0.02); }
.consent input[type="checkbox"] { width: 22px; height: 22px; accent-color: var(--champagne); margin-top: 2px; flex-shrink: 0; }
.consent label { font-size: 0.875rem; color: var(--text-muted); line-height: normal; }

/* fine print blocks */
.fineprint { font-size: 0.84rem; color: var(--text-faint); line-height: normal; }
.fineprint strong { color: var(--text-muted); }

.notice {
  border: 1px solid var(--line-soft);
  border-left: 2px solid var(--champagne);
  border-radius: 10px;
  padding: 16px 18px;
  background: rgba(214,177,94,0.04);
}

/* ============================================================
   FOOTER
   ============================================================ */
.footer { background: var(--olive-2); border-top: 1px solid var(--line-soft); padding: 64px 0 40px; }
.footer__top { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 40px; padding-bottom: 44px; }
.footer__brand .wordmark { font-size: 1.5rem; }
.footer__brand p { color: var(--text-faint); font-size: 0.875rem; margin-top: 16px; max-width: none; line-height: normal; }
.footer h4 { font-family: var(--font-body); text-transform: uppercase; letter-spacing: 0.16em; font-size: 0.74rem; color: var(--champagne); margin-bottom: 18px; font-weight: 600; }
.footer__col ul { list-style: none; display: flex; flex-direction: column; gap: 12px; }
.footer__col a { color: var(--text-muted); font-size: 0.875rem; transition: color .2s ease; }
.footer__col a:hover { color: var(--ivory); }
.footer__aoc { font-size: 0.86rem; color: var(--text-faint); line-height: normal; padding: 26px 0; border-top: 1px solid var(--line-soft); max-width: none; }
.footer__legal { font-size: 0.8rem; color: var(--text-faint); line-height: normal; padding-top: 22px; border-top: 1px solid var(--line-soft); }
@media (max-width: 720px) { .footer__top { grid-template-columns: 1fr 1fr; } .footer__brand { grid-column: 1 / -1; } }
@media (max-width: 460px) { .footer__top { grid-template-columns: 1fr; } }

/* ============================================================
   PAGE HEADER (interior pages)
   ============================================================ */
.page-head { padding: clamp(56px, 9vw, 96px) 0 clamp(30px,5vw,52px); position: relative; }
.page-head .eyebrow { margin-bottom: 18px; }
.page-head h1 { font-size: clamp(2.3rem, 6.5vw, 3.8rem); }
.page-head .lead { margin-top: 26px; max-width: 52ch; }

/* glow utility */
.glow-bg { position: relative; }
.glow-bg::before {
  content:""; position: absolute; left: 50%; top: -10%; width: 70%; height: 60%;
  transform: translateX(-50%);
  background: radial-gradient(closest-side, rgba(214,177,94,var(--glow-strength)), transparent 70%);
  opacity: 0.5; pointer-events: none; filter: blur(20px);
}

/* reveal-on-load */
@media (prefers-reduced-motion: no-preference) {
  .reveal { opacity: 0; transform: translateY(16px); transition: opacity .7s ease, transform .7s ease; }
  .reveal.in { opacity: 1; transform: none; }
}

/* focus visibility */
a:focus-visible, button:focus-visible, .btn:focus-visible, input:focus-visible, select:focus-visible, .chip:focus-within {
  outline: 2px solid var(--champagne); outline-offset: 3px; border-radius: 6px;
}

/* skip link */
.skip { position: absolute; left: -999px; top: 8px; background: var(--champagne); color: var(--ink); padding: 10px 16px; border-radius: 8px; z-index: 100; font-weight: 600; }
.skip:focus { left: 12px; }
