/* Token Saver Engine early access page. White premium palette: one gold accent, three text tones. */
:root {
  --page: #ffffff;          /* page background */
  --page-2: #f5f5f7;        /* alternate sections and the form panel */
  --page-3: #e8e8ed;        /* pressed and hover surfaces */
  --ink: #1d1d1f;           /* darkest tone: text on gold, dark circles */
  --text: #1d1d1f;          /* primary text: headings, values */
  --text-2: #424245;        /* secondary text: body copy */
  --muted: #636366;         /* tertiary text: captions, hints, placeholders */
  --gold: #d4a853;          /* accent fill: primary buttons */
  --gold-hi: #e6c27d;       /* gradient top and hover fill */
  --gold-text: #8a6420;     /* accent for text, links, eyebrows, focus */
  --gold-deep: #8a6420;
  --danger: #c0392b;        /* errors only */
  --focus: #8a6420;
  --line: rgba(29,29,31,0.10);
  --line-strong: rgba(29,29,31,0.18);
  --glass: rgba(255,255,255,0.72);
  --field: #ffffff;         /* inputs sit white on the grey form panel */
  --panel: #f5f5f7;         /* cards on white */
  --panel-2: #ffffff;       /* raised surfaces: consent banner */
  --panel-3: #e8e8ed;
  --shadow-soft: 0 2px 12px rgba(0,0,0,0.05);
  --shadow-lift: 0 18px 50px rgba(0,0,0,0.10);
  --radius: 20px;           /* unchanged */
  --shell: min(1080px, calc(100% - 32px));   /* unchanged */
  --teal: var(--gold-text); /* deprecated alias, so no teal remains */
  --burn: var(--danger);    /* deprecated alias */
  --ink-soft: var(--page-2);/* deprecated alias, for backgrounds only */
}

* {
  box-sizing: border-box;
}

/* The hidden attribute must always hide. Without this, component display rules (for example the
   consent banner's grid) override it and the banner never goes away. */
[hidden] {
  display: none !important;
}

html {
  background: var(--page);
  scroll-behavior: smooth;
  scroll-padding-top: 92px;
}

body {
  margin: 0;
  color: var(--text);
  background: var(--page);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--gold-text);
  text-decoration: underline;
  text-decoration-color: rgba(138, 100, 32, 0.4);
  text-underline-offset: 3px;
}

a:hover {
  color: var(--text);
}

:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 3px;
}

::selection {
  background: rgba(212, 168, 83, 0.35);
  color: var(--text);
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 8px;
}

.skip-link:focus {
  left: 12px;
  z-index: 100;
  padding: 8px 12px;
  border-radius: 8px;
  background: var(--gold);
  color: var(--ink);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

.hp {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  margin: 0;
  padding: 14px max(16px, calc((100% - 1080px) / 2));
  background: var(--glass);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
}

.brand img {
  width: 168px;
  height: 28px;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 14px;
}

.site-nav a {
  color: var(--muted);
  text-decoration: none;
}

.site-nav a:hover {
  color: var(--text);
}

.site-nav .nav-cta {
  padding: 8px 14px;
  border-radius: 999px;
  background: var(--gold);
  color: var(--ink);
  font-weight: 700;
}

.site-nav .nav-cta:hover {
  background: var(--gold-hi);
}

/* Hero */
.hero {
  position: relative;
  isolation: isolate;
  width: var(--shell);
  margin: 0 auto;
  padding: 48px 0 40px;
}

/* One soft warm glow. isolation keeps it above the page background, which would otherwise hide it. */
.hero::before {
  content: "";
  position: absolute;
  top: -40px;
  left: 0;
  right: 0;
  height: 360px;
  background: radial-gradient(ellipse 34% 83% at 35% 10%, rgba(212, 168, 83, 0.08), transparent 100%);
  pointer-events: none;
  z-index: -1;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--gold-text);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.hero-title {
  margin: 0;
  font-size: clamp(2.6rem, 9vw, 5.6rem);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.03em;
}

.tagline {
  margin: 24px 0 0;
  color: var(--gold-text);
  font-size: clamp(1.1rem, 2.6vw, 1.4rem);
  font-weight: 600;
}

.lead {
  max-width: 62ch;
  margin: 20px 0 0;
  color: var(--text-2);
  font-size: clamp(1.02rem, 2.2vw, 1.2rem);
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.hero-note {
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 14px;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 20px;
  border: 1px solid transparent;
  border-radius: 999px;
  font: inherit;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn:disabled {
  opacity: 0.6;
  cursor: wait;
}

.btn-primary {
  background: var(--gold);
  color: var(--ink);
}

.btn-primary:hover {
  background: var(--gold-hi);
}

.btn-ghost {
  border-color: var(--line-strong);
  background: transparent;
  color: var(--text);
}

.btn-ghost:hover {
  background: var(--page-2);
}

.btn-block {
  width: 100%;
}

/* Sections */
.section {
  width: 100%;
  padding: 56px 0;
  border-top: 1px solid var(--line);
}

.section > *:not(.eyebrow) {
  width: var(--shell);
  margin-left: auto;
  margin-right: auto;
}

.section > .eyebrow {
  width: var(--shell);
  margin-left: auto;
  margin-right: auto;
}

.section-alt {
  background: var(--page-2);
}

.section h2 {
  margin: 0 0 12px;
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  line-height: 1.1;
  letter-spacing: -0.02em;
}

/* Scoped under .section so it outranks the centring rule above and the paragraph lines up with its heading. */
.section > .section-copy {
  max-width: 60ch;
  width: min(60ch, var(--shell));
  margin: 0 0 24px;
  margin-left: calc((100% - var(--shell)) / 2);
  margin-right: 0;
  color: var(--text-2);
}

.fine {
  margin: 16px 0 0;
  color: var(--muted);
  font-size: 13px;
}

/* How it works */
.steps {
  display: grid;
  gap: 14px;
  margin: 24px 0 0;
  padding: 0;
  list-style: none;
}

.steps li {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--page);
  box-shadow: var(--shadow-soft);
}

.step-num {
  display: inline-grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--ink);
  color: #ffffff;
  font-weight: 700;
}

.steps h3 {
  margin: 12px 0 6px;
  font-size: 1.05rem;
}

.steps p {
  margin: 0;
  color: var(--text-2);
}

/* Pricing */
.price-grid {
  display: grid;
  gap: 14px;
}

.price-card {
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: var(--shadow-soft);
}

.price-card h3 {
  margin: 0 0 8px;
  font-size: 1rem;
  color: var(--muted);
  font-weight: 600;
}

.price {
  margin: 0;
}

.price strong {
  font-size: 2.2rem;
  background: linear-gradient(180deg, #b07d2c, #8a6420);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
}

.price span {
  color: var(--muted);
}

/* Form */
.apply-form {
  display: grid;
  gap: 18px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--page);
  box-shadow: var(--shadow-soft);
}

.field-row {
  display: grid;
  gap: 18px;
}

.field {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

label,
legend {
  display: block;
  margin-bottom: 6px;
  font-size: 14px;
  font-weight: 600;
}

input[type="text"],
input[type="email"],
input[type="tel"],
select,
textarea {
  width: 100%;
  min-height: 48px;
  padding: 12px 14px;
  border: 1px solid #86868b;
  border-radius: 12px;
  background: var(--field);
  color: var(--text);
  font: inherit;
  font-size: 16px;
}

textarea {
  min-height: 110px;
  resize: vertical;
}

select option {
  background: var(--field);
  color: var(--text);
}

::placeholder {
  color: var(--muted);
  opacity: 1;
}

.phone-input {
  display: flex;
  gap: 8px;
  align-items: stretch;
}

.dial {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 72px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--page);
  color: var(--gold-text);
  font-weight: 700;
}

.phone-input input {
  flex: 1;
}

.help {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.error {
  margin: 6px 0 0;
  color: var(--danger);
  font-size: 13px;
}

.req {
  color: var(--gold-text);
}

.consent-check input {
  accent-color: var(--gold-text);
}

.consent-check {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin: 0;
  color: var(--text-2);
  font-size: 14px;
  font-weight: 400;
  cursor: pointer;
}

.consent-check input {
  margin-top: 4px;
}

.form-status {
  min-height: 1.4em;
  margin: 0;
  color: var(--gold-text);
  font-weight: 600;
}

.form-status.error-text {
  color: var(--danger);
}

/* Footer */
.site-footer {
  padding: 40px 0 120px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 14px;
}

.footer-inner {
  width: var(--shell);
  margin: 0 auto;
  display: grid;
  gap: 12px;
}

.footer-inner img {
  width: 168px;
  height: 28px;
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

.footer-nav a {
  color: var(--text);
}

/* Consent banner */
.consent {
  position: fixed;
  left: 12px;
  right: 12px;
  bottom: 12px;
  z-index: 50;
  display: grid;
  gap: 12px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--panel-2);
  box-shadow: var(--shadow-lift);
  font-size: 13px;
  color: var(--text-2);
}

.consent p {
  margin: 0;
}

.consent-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

.consent-actions .btn {
  min-height: 42px;
}

/* Legal pages */
.doc {
  width: var(--shell);
  max-width: 780px;
  margin: 0 auto;
  padding: 24px 0 64px;
}

.doc h1 {
  font-size: clamp(1.8rem, 5vw, 2.4rem);
  line-height: 1.15;
  letter-spacing: -0.02em;
}

.doc h2 {
  margin-top: 32px;
  font-size: 1.2rem;
}

.doc p,
.doc li {
  color: var(--text-2);
}

.draft-banner {
  padding: 12px 14px;
  border: 1px solid rgba(138, 100, 32, 0.35);
  border-radius: 12px;
  background: rgba(212, 168, 83, 0.12);
  color: var(--gold-text);
  font-weight: 600;
}

/* Wider screens */
@media (min-width: 760px) {
  .site-nav {
    font-size: 15px;
  }

  .field-row {
    grid-template-columns: 1fr 1fr;
  }

  .apply-form {
    padding: 28px;
  }

  .steps {
    grid-template-columns: repeat(5, 1fr);
  }

  .price-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .consent {
    left: auto;
    right: 24px;
    bottom: 24px;
    max-width: 560px;
  }
}

@media (max-width: 560px) {
  .site-nav a:not(.nav-cta) {
    display: none;
  }
}

/* On phones, lift the page's bottom padding while the consent banner shows, so the form's
   submit button can always be scrolled above the banner. */
@media (max-width: 759px) {
  body.consent-open {
    padding-bottom: var(--consent-h, 0px);
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  * {
    transition: none !important;
  }
}

@media (prefers-reduced-transparency: reduce) {
  .site-header {
    background: var(--page);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }
}
