/* ==========================================================================
   Loyalease — design system
   Single stylesheet, no build step. Edit tokens below to restyle the site.
   ========================================================================== */

:root {
  /* Brand */
  --ink:        #0A1421;
  --ink-2:      #12202F;
  --ink-3:      #1C2E42;
  --paper:      #FAF8F5;
  --paper-2:    #F1EDE7;
  --line:       #EBE5DB;

  --accent:     #E09B3D;   /* amber — CTAs, highlights */
  --accent-ink: #7A4E10;
  --accent-soft:#FBEFDC;
  --mint:       #17A67C;   /* success / metrics */
  --mint-soft:  #DDF3EB;

  --text:       #0A1421;
  --text-2:     #4A5A6B;
  --text-3:     #7A8794;
  --on-dark:    #F3F0EA;
  --on-dark-2:  #A9B7C6;

  /* Type */
  --font-sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Inter, Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-display: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;

  /* Space */
  --wrap: 1140px;
  --gutter: clamp(1.25rem, 4vw, 2.5rem);
  --section-y: clamp(5.5rem, 11vw, 10rem);

  --radius: 14px;
  --radius-lg: 22px;
  --shadow: none;
  --shadow-lg: 0 12px 40px -20px rgba(10,20,33,.16);
}

/* --------------------------------------------------------- reset + base */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 1.0625rem;
  line-height: 1.72;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img, svg, video { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
button { font: inherit; }

h1, h2, h3, h4 { line-height: 1.15; margin: 0 0 .5em; letter-spacing: -.02em; font-weight: 640; }
h1 { font-size: clamp(2.4rem, 6vw, 4rem); letter-spacing: -.035em; }
h2 { font-size: clamp(1.9rem, 4.2vw, 2.9rem); letter-spacing: -.03em; }
h3 { font-size: clamp(1.2rem, 2.2vw, 1.45rem); }
p  { margin: 0 0 1.1em; }
p:last-child { margin-bottom: 0; }

.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }
.section { padding-block: var(--section-y); }
.section--tight { padding-block: clamp(4rem, 8vw, 6rem); }

.lede { font-size: clamp(1.05rem, 1.6vw, 1.25rem); color: var(--text-2); max-width: 60ch; }
.center { text-align: center; }
.center .lede { margin-inline: auto; }

/* skip link */
.skip {
  position: absolute; left: -9999px; top: 0; z-index: 200;
  background: var(--ink); color: var(--on-dark); padding: .75rem 1.25rem; border-radius: 0 0 10px 0;
}
.skip:focus { left: 0; }

:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

/* ------------------------------------------------------------ eyebrow */
.eyebrow {
  display: inline-flex; align-items: center; gap: .55rem;
  font-size: .74rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
  color: var(--text-3); margin-bottom: 1.15rem;
}
.eyebrow::before {
  content: ""; width: 22px; height: 1.5px; background: var(--line); border-radius: 2px;
}
.on-dark .eyebrow { color: var(--accent); }

/* ------------------------------------------------------------- buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .55rem;
  padding: .85rem 1.5rem; border-radius: 999px;
  font-weight: 620; font-size: .97rem; text-decoration: none; cursor: pointer;
  border: 1.5px solid transparent; transition: transform .16s ease, box-shadow .16s ease, background .16s ease, color .16s ease;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }

.btn--primary { background: var(--accent); color: #2A1A03; box-shadow: none; }
.btn--primary:hover { background: #EDA84A; box-shadow: 0 8px 20px -10px rgba(224,155,61,.7); }

.btn--dark { background: var(--ink); color: var(--on-dark); }
.btn--dark:hover { background: var(--ink-2); }

.btn--ghost { border-color: var(--line); background: transparent; color: var(--text); }
.btn--ghost:hover { border-color: var(--ink); background: #fff; }
.on-dark .btn--ghost { border-color: rgba(255,255,255,.28); color: var(--on-dark); }
.on-dark .btn--ghost:hover { border-color: rgba(255,255,255,.6); background: rgba(255,255,255,.06); }

.btn--block { width: 100%; }
.btn--sm { padding: .6rem 1.1rem; font-size: .88rem; }

.btn-row { display: flex; flex-wrap: wrap; gap: .75rem; }
.center .btn-row { justify-content: center; }

/* --------------------------------------------------------------- header */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(250,248,245,.82);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s ease, box-shadow .2s ease;
}
.site-header.is-stuck { border-bottom-color: var(--line); box-shadow: 0 4px 20px -14px rgba(10,20,33,.5); }

.nav { display: flex; align-items: center; gap: 1rem; height: 74px; }

.brand { display: inline-flex; align-items: center; gap: .6rem; text-decoration: none; font-weight: 700; letter-spacing: -.02em; font-size: 1.14rem; margin-right: auto; }
.brand-mark {
  width: 32px; height: 32px; border-radius: 9px; flex: none;
  background: linear-gradient(140deg, var(--ink) 0%, var(--ink-3) 100%);
  color: var(--accent); display: grid; place-items: center;
  font-family: var(--font-display); font-size: 1.05rem; font-weight: 700; letter-spacing: 0;
}
.brand span em { font-style: normal; color: var(--text-3); font-weight: 500; }

.nav-links { display: flex; align-items: center; gap: .25rem; list-style: none; margin: 0; padding: 0; }
.nav-links a {
  text-decoration: none; padding: .5rem .8rem; border-radius: 8px;
  font-size: .95rem; font-weight: 520; color: var(--text-2);
  transition: color .15s ease, background .15s ease;
}
.nav-links a:hover { color: var(--text); background: rgba(10,20,33,.05); }
.nav-links a[aria-current="page"] { color: var(--text); font-weight: 620; }

.nav-cta { display: flex; align-items: center; gap: .5rem; }

.nav-toggle {
  display: none; width: 42px; height: 42px; border: 1.5px solid var(--line); background: #fff;
  border-radius: 11px; cursor: pointer; padding: 0; place-items: center; color: var(--text);
}
.nav-toggle svg { width: 20px; height: 20px; }
.nav-toggle .icon-close { display: none; }
.nav-toggle[aria-expanded="true"] .icon-open { display: none; }
.nav-toggle[aria-expanded="true"] .icon-close { display: block; }

@media (max-width: 900px) {
  .nav-toggle { display: grid; }
  .nav-links, .nav-cta { display: none; }
  .site-nav[data-open="true"] .nav-links,
  .site-nav[data-open="true"] .nav-cta {
    display: flex; flex-direction: column; align-items: stretch; gap: .25rem;
  }
  .site-nav[data-open="true"] {
    position: absolute; left: 0; right: 0; top: 74px;
    background: var(--paper); border-bottom: 1px solid var(--line);
    padding: 1rem var(--gutter) 1.5rem; box-shadow: var(--shadow-lg);
  }
  .site-nav[data-open="true"] .nav-links a { padding: .8rem .6rem; font-size: 1.05rem; }
  .site-nav[data-open="true"] .nav-cta { margin-top: .75rem; }
  .site-nav[data-open="true"] .btn { width: 100%; }
}

/* ----------------------------------------------------------------- hero */
.hero { position: relative; padding-block: clamp(4.5rem, 10vw, 8rem) clamp(3.5rem, 8vw, 6rem); overflow: hidden; }
/* Deliberately no decorative glow — the headline carries the page. */
.hero > * { position: relative; z-index: 1; }
.hero h1 { max-width: 16ch; }
.hero .lede { margin-top: 1.25rem; font-size: clamp(1.08rem, 1.8vw, 1.3rem); }
.hero .btn-row { margin-top: 2rem; }

.hero-flags { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem 1.4rem; margin-top: 2.5rem; font-size: .9rem; color: var(--text-3); }
.hero-flags strong { color: var(--text-2); font-weight: 620; }

/* --------------------------------------------------------------- badges */
.badge-row { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 1.5rem; }
.badge {
  display: inline-flex; align-items: center; gap: .45rem;
  background: #fff; border: 1px solid var(--line); border-radius: 999px;
  padding: .4rem .9rem; font-size: .84rem; font-weight: 560; color: var(--text-2);
}
.badge svg { width: 15px; height: 15px; color: var(--text-3); flex: none; }

/* ---------------------------------------------------------------- cards */
.grid { display: grid; gap: 1.25rem; }
.grid--3 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.grid--2 { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }
.grid--4 { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }

.card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: clamp(1.75rem, 3.4vw, 2.4rem); box-shadow: var(--shadow);
  display: flex; flex-direction: column; gap: .5rem;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.card--link:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); border-color: #DED6C9; }
.card h3 { margin-bottom: .35rem; }
.card p { color: var(--text-2); font-size: .99rem; }
.card .card-foot { margin-top: auto; padding-top: 1.25rem; }

.card-icon {
  width: 46px; height: 46px; border-radius: 13px; display: grid; place-items: center;
  background: var(--paper-2); color: var(--text-2); margin-bottom: 1.25rem;
}
.card-icon svg { width: 23px; height: 23px; }
.card-kicker { font-size: .72rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--text-3); margin-bottom: .6rem; }

.arrow-link {
  display: inline-flex; align-items: center; gap: .4rem; text-decoration: none;
  font-weight: 620; font-size: .94rem; color: var(--text);
}
.arrow-link svg { width: 16px; height: 16px; transition: transform .16s ease; }
.arrow-link:hover svg { transform: translateX(3px); }

/* --------------------------------------------------------- dark section */
.on-dark { background: var(--ink); color: var(--on-dark); }
.on-dark h2, .on-dark h3 { color: #fff; }
.on-dark p, .on-dark .lede { color: var(--on-dark-2); }
.on-dark .card { background: var(--ink-2); border-color: rgba(255,255,255,.09); box-shadow: none; }
.on-dark .card p { color: var(--on-dark-2); }
.on-dark .card-icon { background: rgba(224,155,61,.14); color: var(--accent); }
.on-dark .card-kicker { color: var(--on-dark-2); }
.on-dark .arrow-link { color: var(--accent); }

/* ----------------------------------------------------------- case study */
.case { display: grid; gap: 1.5rem; }
.case-tag {
  font-size: .72rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
  color: var(--accent);
}
.metrics { display: flex; flex-wrap: wrap; gap: 1.5rem 2.5rem; margin-top: 1.5rem; padding-top: 1.5rem; border-top: 1px solid rgba(255,255,255,.1); }
.metric-value { font-size: clamp(1.5rem, 3vw, 2rem); font-weight: 700; letter-spacing: -.03em; color: #fff; line-height: 1.1; }
.metric-label { font-size: .74rem; letter-spacing: .1em; text-transform: uppercase; color: var(--on-dark-2); margin-top: .3rem; }

/* light metrics */
.stat-strip { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 1.5rem; }
.stat-strip .metric-value { color: var(--text); }
.stat-strip .metric-label { color: var(--text-3); }

/* ---------------------------------------------------------------- steps */
.steps { counter-reset: step; display: grid; gap: 1.25rem; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.step { position: relative; padding-top: 3.25rem; }
.step::before {
  counter-increment: step; content: counter(step);
  position: absolute; top: 0; left: 0;
  width: 42px; height: 42px; border-radius: 999px;
  background: var(--ink); color: var(--accent);
  display: grid; place-items: center; font-weight: 700; font-size: 1rem;
}
.step h3 { font-size: 1.12rem; }
.step p { color: var(--text-2); font-size: .97rem; }

/* -------------------------------------------------------------- pricing */
.price-grid { display: grid; gap: 1.25rem; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); align-items: start; }
.plan { position: relative; }
.plan--featured { border-color: #E4D6BC; box-shadow: 0 14px 44px -24px rgba(10,20,33,.22); }
.plan-flag {
  position: absolute; top: -.75rem; left: 50%; transform: translateX(-50%);
  background: var(--accent); color: #2A1A03; font-size: .72rem; font-weight: 700;
  letter-spacing: .1em; text-transform: uppercase; padding: .3rem .85rem; border-radius: 999px; white-space: nowrap;
}
.plan-name { font-size: 1.05rem; font-weight: 700; margin-bottom: .25rem; }
.plan-price { display: flex; align-items: baseline; gap: .3rem; margin: .5rem 0 .25rem; }
.plan-price b { font-size: clamp(2rem, 4vw, 2.5rem); font-weight: 700; letter-spacing: -.035em; }
.plan-price span { color: var(--text-3); font-size: .95rem; }
.plan-note { font-size: .88rem; color: var(--text-3); margin-bottom: 1.25rem; }
.plan ul { list-style: none; margin: 0 0 1.5rem; padding: 0; display: grid; gap: .6rem; }
.plan li { display: flex; gap: .6rem; align-items: flex-start; font-size: .95rem; color: var(--text-2); }
.plan li svg { width: 17px; height: 17px; color: var(--mint); flex: none; margin-top: .25rem; }

/* ------------------------------------------------------------------ FAQ */
.faq { display: grid; gap: .75rem; max-width: 780px; margin-inline: auto; }
.faq details {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 0; overflow: hidden;
}
.faq summary {
  cursor: pointer; list-style: none; padding: 1.15rem 1.4rem;
  font-weight: 600; font-size: 1.02rem; display: flex; align-items: center; justify-content: space-between; gap: 1rem;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; flex: none; width: 11px; height: 11px;
  border-right: 2px solid var(--text-3); border-bottom: 2px solid var(--text-3);
  transform: rotate(45deg) translate(-2px, -2px); transition: transform .2s ease;
}
.faq details[open] summary::after { transform: rotate(-135deg) translate(-2px,-2px); }
.faq details[open] summary { border-bottom: 1px solid var(--line); }
.faq .faq-body { padding: 1.15rem 1.4rem; color: var(--text-2); font-size: .99rem; }

/* ----------------------------------------------------------------- form */
.form { display: grid; gap: 1rem; }
.field { display: grid; gap: .4rem; }
.field label { font-size: .88rem; font-weight: 620; color: var(--text-2); }
.field .req { color: #C0392B; }
.field input, .field select, .field textarea {
  width: 100%; padding: .8rem 1rem; font: inherit; font-size: 1rem;
  border: 1.5px solid var(--line); border-radius: 11px; background: #fff; color: var(--text);
  transition: border-color .15s ease, box-shadow .15s ease;
}
.field textarea { min-height: 130px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px rgba(224,155,61,.16);
}
.field input[aria-invalid="true"], .field textarea[aria-invalid="true"], .field select[aria-invalid="true"] {
  border-color: #C0392B; box-shadow: 0 0 0 4px rgba(192,57,43,.12);
}
.field-error { font-size: .84rem; color: #C0392B; min-height: 0; }
.field-error:empty { display: none; }
.form-row { display: grid; gap: 1rem; grid-template-columns: 1fr 1fr; }
@media (max-width: 620px) { .form-row { grid-template-columns: 1fr; } }

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

.form-status { border-radius: 11px; padding: .9rem 1.1rem; font-size: .95rem; display: none; }
.form-status.is-error { display: block; background: #FDECEA; border: 1px solid #F3B8B0; color: #8E241A; }
.form-status.is-ok { display: block; background: var(--mint-soft); border: 1px solid #A6DCC9; color: #0B5C44; }

.btn[aria-busy="true"] { opacity: .65; pointer-events: none; }

/* ----------------------------------------------------------------- misc */
.split { display: grid; gap: clamp(2rem, 5vw, 4rem); grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); align-items: center; }
.panel {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: clamp(1.75rem, 4vw, 2.75rem); box-shadow: var(--shadow);
}
.on-dark .panel { background: var(--ink-2); border-color: rgba(255,255,255,.1); }

.divider { height: 1px; background: var(--line); border: 0; margin: 0; }

.tick-list { list-style: none; margin: 0; padding: 0; display: grid; gap: .7rem; }
.tick-list li { display: flex; gap: .65rem; align-items: flex-start; color: var(--text-2); }
.tick-list li svg { width: 18px; height: 18px; color: var(--mint); flex: none; margin-top: .3rem; }
.on-dark .tick-list li { color: var(--on-dark-2); }

/* ---------------------------------------------------------------- CTA band */
.cta-band { background: linear-gradient(150deg, var(--ink) 0%, var(--ink-3) 100%); color: var(--on-dark); border-radius: var(--radius-lg); padding: clamp(2rem, 5vw, 3.5rem); text-align: center; }
.cta-band h2 { color: #fff; }
.cta-band p { color: var(--on-dark-2); max-width: 54ch; margin-inline: auto; }
.cta-band .btn-row { justify-content: center; margin-top: 1.75rem; }

/* --------------------------------------------------------------- footer */
.site-footer { background: var(--ink); color: var(--on-dark-2); padding-block: clamp(3rem, 6vw, 4.5rem) 2rem; }
.footer-grid { display: grid; gap: 2.5rem; grid-template-columns: 1.4fr 1fr 1fr 1fr; }
@media (max-width: 860px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .footer-grid { grid-template-columns: 1fr; } }
.site-footer .brand { color: #fff; margin-right: 0; }
.site-footer h4 { color: #fff; font-size: .78rem; letter-spacing: .12em; text-transform: uppercase; margin-bottom: 1rem; font-weight: 700; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .6rem; }
.site-footer a { text-decoration: none; color: var(--on-dark-2); font-size: .95rem; }
.site-footer a:hover { color: #fff; text-decoration: underline; text-underline-offset: 3px; }
.footer-bottom {
  margin-top: 3rem; padding-top: 1.5rem; border-top: 1px solid rgba(255,255,255,.1);
  display: flex; flex-wrap: wrap; gap: 1rem; justify-content: space-between; font-size: .87rem;
}

/* ------------------------------------------------------------ utilities */
.mt-0 { margin-top: 0; }
.mt-1 { margin-top: .5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.75rem; }
.mt-4 { margin-top: 2.5rem; }
.mb-0 { margin-bottom: 0; }
.muted { color: var(--text-3); font-size: .9rem; }
.on-dark .muted { color: var(--on-dark-2); }
.nowrap { white-space: nowrap; }

/* reveal on scroll */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
.reveal.is-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; } }

/* wide table scroll guard */
.scroll-x { overflow-x: auto; -webkit-overflow-scrolling: touch; }
