/* =====================================================================
   Swiftly Books — Theme Stylesheet
   ---------------------------------------------------------------------
   HOW TO EDIT THE BRAND COLOR:
   Change --brand below to your exact dark-red hex and everything updates.
   (The header logo uses your uploaded image, so it stays exact regardless.)
   ===================================================================== */

:root {
  /* ---- Brand palette (edit these) ---- */
  --brand:        #8b1e28;   /* primary dark red */
  --brand-600:    #a0232f;   /* hover / lighter red */
  --brand-700:    #74151f;   /* pressed / deeper red */
  --brand-900:    #430c11;   /* footer / darkest red */
  --accent:       #c9a24b;   /* warm gold accent (stars, small highlights) */

  /* ---- Neutrals ---- */
  --ink:          #1b1618;   /* near-black text */
  --body-text:    #45414a;   /* body copy */
  --muted:        #7a7680;   /* secondary text */
  --line:         #ece7e6;   /* hairline borders */
  --paper:        #ffffff;
  --cream:        #faf6f4;   /* warm off-white section bg */
  --cream-2:      #f4edea;

  /* ---- Type ---- */
  --font-head: "Poppins", "Segoe UI", system-ui, -apple-system, Roboto, Helvetica, Arial, sans-serif;
  --font-body: "Inter", "Segoe UI", system-ui, -apple-system, Roboto, Helvetica, Arial, sans-serif;

  /* ---- Layout ---- */
  --wrap: 1160px;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow-sm: 0 2px 10px rgba(27,22,24,.06);
  --shadow-md: 0 12px 34px rgba(27,22,24,.10);
  --shadow-brand: 0 14px 32px rgba(139,30,40,.28);
}

/* ---------- Reset / base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--body-text);
  background: var(--paper);
  line-height: 1.65;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--brand); text-decoration: none; transition: color .18s ease; }
a:hover { color: var(--brand-700); }
h1, h2, h3, h4 { font-family: var(--font-head); color: var(--ink); line-height: 1.15; margin: 0 0 .5em; font-weight: 700; letter-spacing: -.01em; }
h1 { font-size: clamp(2.1rem, 4.6vw, 3.4rem); }
h2 { font-size: clamp(1.7rem, 3.2vw, 2.5rem); }
h3 { font-size: 1.28rem; }
p { margin: 0 0 1.1rem; }
ul { margin: 0 0 1.1rem; padding-left: 1.15rem; }
:focus-visible { outline: 3px solid var(--brand-600); outline-offset: 2px; border-radius: 4px; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }
.section { padding: clamp(56px, 8vw, 104px) 0; }
.section--cream { background: var(--cream); }
.center { text-align: center; }
.eyebrow {
  display: inline-block; font-family: var(--font-head); font-weight: 600;
  font-size: .8rem; letter-spacing: .16em; text-transform: uppercase;
  color: var(--brand); margin-bottom: 14px;
}
.lead { font-size: 1.15rem; color: var(--muted); max-width: 720px; }
.center .lead { margin-left: auto; margin-right: auto; }
.section-head { max-width: 760px; margin: 0 auto 48px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: .5em;
  font-family: var(--font-head); font-weight: 600; font-size: .98rem;
  padding: 15px 30px; border-radius: 999px; border: 2px solid transparent;
  cursor: pointer; transition: transform .15s ease, box-shadow .2s ease, background .2s ease, color .2s ease;
  line-height: 1; white-space: nowrap;
}
.btn--primary { background: var(--brand); color: #fff; box-shadow: var(--shadow-brand); }
.btn--primary:hover { background: var(--brand-600); color: #fff; transform: translateY(-2px); }
.btn--ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn--ghost:hover { border-color: var(--brand); color: var(--brand); transform: translateY(-2px); }
.btn--light { background: #fff; color: var(--brand); }
.btn--light:hover { background: #fff; color: var(--brand-700); transform: translateY(-2px); }
.btn--outline-light { background: transparent; color: #fff; border-color: rgba(255,255,255,.5); }
.btn--outline-light:hover { background: rgba(255,255,255,.12); color:#fff; border-color:#fff; transform: translateY(-2px); }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 60;
  background: rgba(255,255,255,.92);
  backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 20px; height: 78px; }
.brand { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.brand img, .brand .custom-logo { max-height: 46px; width: auto; }
.brand .brand-text { font-family: var(--font-head); font-weight: 700; font-size: 1.25rem; color: var(--brand); letter-spacing: -.02em; }

.main-nav { display: flex; align-items: center; gap: 4px; }
.main-nav ul { list-style: none; display: flex; align-items: center; gap: 4px; margin: 0; padding: 0; }
.main-nav a {
  font-family: var(--font-head); font-weight: 500; font-size: .97rem;
  color: var(--ink); padding: 10px 15px; border-radius: 999px; transition: background .18s ease, color .18s ease;
}
.main-nav a:hover, .main-nav .current-menu-item > a { color: var(--brand); background: var(--cream-2); }
.header-cta { display: flex; align-items: center; gap: 12px; }
.header-cta .login-link { font-family: var(--font-head); font-weight: 500; color: var(--ink); padding: 10px 6px; }
.header-cta .login-link:hover { color: var(--brand); }

/* Mobile nav toggle */
.nav-toggle { display: none; background: none; border: 0; cursor: pointer; padding: 8px; }
.nav-toggle span { display: block; width: 24px; height: 2px; background: var(--ink); margin: 5px 0; transition: transform .25s ease, opacity .25s ease; }
.nav-open .nav-toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-open .nav-toggle span:nth-child(2) { opacity: 0; }
.nav-open .nav-toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero { position: relative; overflow: hidden; background: linear-gradient(180deg, #fff 0%, var(--cream) 100%); }
.hero::before {
  content: ""; position: absolute; inset: 0;
  background:
    radial-gradient(900px 420px at 85% -10%, rgba(139,30,40,.10), transparent 60%),
    radial-gradient(700px 380px at 5% 110%, rgba(201,162,75,.10), transparent 60%);
  pointer-events: none;
}
.hero-inner { position: relative; display: grid; grid-template-columns: 1.05fr .95fr; gap: 56px; align-items: center; padding: clamp(48px, 7vw, 92px) 0; }
.hero h1 { margin-bottom: 18px; }
.hero h1 .accent { color: var(--brand); }
.hero .lead { font-size: 1.22rem; color: var(--body-text); margin-bottom: 30px; max-width: 560px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 26px; }
.hero-trust { display: flex; align-items: center; gap: 14px; color: var(--muted); font-size: .88rem; flex-wrap: nowrap; white-space: nowrap; }
.hero-trust .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--brand); }

/* Hero visual — a stylized dashboard card (pure CSS, no external image needed) */
.hero-visual { position: relative; }
.mock {
  background: #fff; border: 1px solid var(--line); border-radius: 20px;
  box-shadow: var(--shadow-md); padding: 20px; transform: rotate(.4deg);
}
.mock-bar { display: flex; gap: 6px; margin-bottom: 16px; }
.mock-bar i { width: 11px; height: 11px; border-radius: 50%; background: var(--cream-2); display: inline-block; }
.mock-bar i:first-child { background: var(--brand); }
.mock-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.mock-kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 18px; }
.kpi { background: var(--cream); border-radius: 12px; padding: 14px; }
.kpi .k-label { font-size: .72rem; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; }
.kpi .k-value { font-family: var(--font-head); font-weight: 700; color: var(--ink); font-size: 1.25rem; }
.kpi .k-value.up { color: #1c7a45; }
.chart { display: flex; align-items: flex-end; gap: 8px; height: 108px; padding: 12px; background: var(--cream); border-radius: 12px; }
.chart span { flex: 1; background: linear-gradient(180deg, var(--brand-600), var(--brand)); border-radius: 6px 6px 0 0; opacity: .9; }
.hero-badge {
  position: absolute; bottom: -18px; left: -18px; background: #fff; border: 1px solid var(--line);
  border-radius: 14px; box-shadow: var(--shadow-md); padding: 12px 16px; display: flex; align-items: center; gap: 10px;
  font-family: var(--font-head); font-weight: 600; color: var(--ink); font-size: .9rem;
}
.hero-badge .tick { width: 26px; height: 26px; border-radius: 50%; background: #eaf6ee; color: #1c7a45; display: grid; place-items: center; font-size: .85rem; }

/* ---------- Logo strip ---------- */
.logos { padding: 34px 0; border-bottom: 1px solid var(--line); background: #fff; }
.logos p { text-align: center; color: var(--muted); font-size: .82rem; letter-spacing: .12em; text-transform: uppercase; margin: 0 0 18px; }
.logos .row { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px 40px; }
.logos .row span { font-family: var(--font-head); font-weight: 600; color: #b7b1b3; font-size: 1.05rem; }

/* ---------- Feature cards grid ---------- */
.grid { display: grid; gap: 24px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 30px; transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: transparent; }
.card .ico {
  width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center;
  background: linear-gradient(135deg, rgba(139,30,40,.10), rgba(139,30,40,.04));
  color: var(--brand); margin-bottom: 18px;
}
.card .ico svg { width: 26px; height: 26px; }
.card h3 { margin-bottom: 8px; }
.card p { margin: 0; color: var(--muted); font-size: .98rem; }

/* ---------- Split / alternating feature rows ---------- */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 54px; align-items: center; }
.split + .split { margin-top: clamp(48px, 7vw, 90px); }
.split.reverse .split-media { order: 2; }
.split-media {
  background: linear-gradient(160deg, var(--cream) 0%, var(--cream-2) 100%);
  border: 1px solid var(--line); border-radius: var(--radius); padding: 30px; min-height: 280px;
  display: flex; flex-direction: column; justify-content: center; gap: 14px;
}
.split ul.checks { list-style: none; padding: 0; margin: 6px 0 0; }
.split ul.checks li { position: relative; padding-left: 32px; margin-bottom: 12px; color: var(--body-text); }
.split ul.checks li::before {
  content: ""; position: absolute; left: 0; top: 3px; width: 20px; height: 20px; border-radius: 50%;
  background: var(--brand); -webkit-mask: center/12px no-repeat url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='white' d='M9 16.2 4.8 12l-1.4 1.4L9 19 21 7l-1.4-1.4z'/%3E%3C/svg%3E");
          mask: center/12px no-repeat url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='white' d='M9 16.2 4.8 12l-1.4 1.4L9 19 21 7l-1.4-1.4z'/%3E%3C/svg%3E");
}
/* mini stat tiles inside media panels */
.tile { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; box-shadow: var(--shadow-sm); }
.tile .t-top { display: flex; justify-content: space-between; align-items: center; font-size: .8rem; color: var(--muted); }
.tile .t-val { font-family: var(--font-head); font-weight: 700; color: var(--ink); font-size: 1.4rem; }
.tag { display: inline-block; font-size: .74rem; font-weight: 600; padding: 3px 10px; border-radius: 999px; }
.tag.green { background: #eaf6ee; color: #1c7a45; }
.tag.red { background: #fbeaec; color: var(--brand); }

/* ---------- Benefits ---------- */
.benefits { display: grid; grid-template-columns: repeat(4, 1fr); gap: 28px; }
.benefit .b-ico { width: 56px; height: 56px; border-radius: 16px; background: var(--brand); color: #fff; display: grid; place-items: center; margin-bottom: 16px; }
.benefit .b-ico svg { width: 28px; height: 28px; }
.benefit h3 { font-size: 1.15rem; margin-bottom: 6px; }
.benefit p { color: var(--muted); font-size: .96rem; margin: 0; }

/* ---------- Testimonials ---------- */
.tgrid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.quote { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 30px; box-shadow: var(--shadow-sm); display: flex; flex-direction: column; }
.quote .stars { color: var(--accent); letter-spacing: 2px; margin-bottom: 14px; font-size: 1rem; }
.quote p { font-size: 1.02rem; color: var(--body-text); }
.quote .who { margin-top: auto; display: flex; align-items: center; gap: 12px; padding-top: 16px; }
.quote .avatar { width: 42px; height: 42px; border-radius: 50%; background: linear-gradient(135deg, var(--brand), var(--brand-900)); color: #fff; display: grid; place-items: center; font-family: var(--font-head); font-weight: 700; }
.quote .who strong { display: block; font-family: var(--font-head); color: var(--ink); font-size: .95rem; }
.quote .who span { font-size: .84rem; color: var(--muted); }

/* ---------- CTA band ---------- */
.cta-band { background: linear-gradient(135deg, var(--brand-700), var(--brand-900)); color: #fff; border-radius: 24px; padding: clamp(38px, 6vw, 66px); text-align: center; position: relative; overflow: hidden; }
.cta-band::after { content:""; position:absolute; inset:0; background: radial-gradient(600px 300px at 90% -20%, rgba(201,162,75,.22), transparent 60%); pointer-events:none; }
.cta-band h2 { color: #fff; }
.cta-band p { color: rgba(255,255,255,.86); max-width: 620px; margin: 0 auto 26px; font-size: 1.1rem; }
.cta-band .hero-actions { justify-content: center; }

/* ---------- Page hero (inner pages) ---------- */
.page-hero { background: linear-gradient(180deg, #fff, var(--cream)); border-bottom: 1px solid var(--line); text-align: center; padding: clamp(52px, 7vw, 90px) 0 clamp(44px,6vw,72px); }
.page-hero .eyebrow { margin-bottom: 12px; }
.page-hero p { max-width: 680px; margin: 12px auto 0; color: var(--muted); font-size: 1.12rem; }

/* ---------- Category chips (features page) ---------- */
.chips { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; margin-top: 30px; }
.chip { display: inline-flex; align-items: center; gap: 8px; padding: 10px 18px; background: #fff; border: 1px solid var(--line); border-radius: 999px; font-family: var(--font-head); font-weight: 500; font-size: .92rem; color: var(--ink); box-shadow: var(--shadow-sm); }
.chip .d { width: 8px; height: 8px; border-radius: 50%; background: var(--brand); }

/* ---------- About page bits ---------- */
.values { display: grid; grid-template-columns: repeat(3,1fr); gap: 24px; }
.stat-row { display: grid; grid-template-columns: repeat(4,1fr); gap: 24px; text-align: center; }
.stat .n { font-family: var(--font-head); font-weight: 800; font-size: clamp(2rem,4vw,2.8rem); color: var(--brand); line-height: 1; }
.stat .l { color: var(--muted); font-size: .95rem; margin-top: 6px; }

/* ---------- Contact ---------- */
.contact-grid { display: grid; grid-template-columns: .9fr 1.1fr; gap: 44px; align-items: start; }
.contact-info .info-item { display: flex; gap: 16px; padding: 18px 0; border-bottom: 1px solid var(--line); }
.contact-info .info-item:last-child { border-bottom: 0; }
.contact-info .i-ico { flex-shrink: 0; width: 46px; height: 46px; border-radius: 12px; background: var(--cream-2); color: var(--brand); display: grid; place-items: center; }
.contact-info .i-ico svg { width: 22px; height: 22px; }
.contact-info h4 { font-family: var(--font-head); margin: 0 0 3px; color: var(--ink); font-size: 1rem; }
.contact-info p, .contact-info a { margin: 0; color: var(--muted); font-size: .98rem; }
.contact-info a:hover { color: var(--brand); }

.form-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(24px,4vw,38px); box-shadow: var(--shadow-md); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.field { margin-bottom: 18px; }
.field label { display: block; font-family: var(--font-head); font-weight: 500; font-size: .9rem; color: var(--ink); margin-bottom: 7px; }
.field input, .field select, .field textarea {
  width: 100%; padding: 13px 15px; border: 1px solid var(--line); border-radius: 10px; font-family: var(--font-body);
  font-size: 1rem; color: var(--ink); background: #fff; transition: border-color .18s ease, box-shadow .18s ease;
}
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(139,30,40,.12); outline: none; }
.field textarea { min-height: 130px; resize: vertical; }
.form-note { font-size: .84rem; color: var(--muted); margin-top: 6px; }
.form-status { padding: 12px 16px; border-radius: 10px; margin-bottom: 18px; font-size: .95rem; display: none; }
.form-status.ok { display: block; background: #eaf6ee; color: #1c7a45; }
.form-status.err { display: block; background: #fbeaec; color: var(--brand-700); }

/* ---------- Footer ---------- */
.site-footer { background: var(--brand-900); color: rgba(255,255,255,.78); padding: 64px 0 28px; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1.2fr; gap: 40px; }
.site-footer h4 { color: #fff; font-family: var(--font-head); font-size: .82rem; letter-spacing: .12em; text-transform: uppercase; margin: 0 0 18px; opacity: .85; }
.site-footer a { color: rgba(255,255,255,.78); }
.site-footer a:hover { color: #fff; }
.footer-brand .f-logo { font-family: var(--font-head); font-weight: 700; font-size: 1.4rem; color: #fff; margin-bottom: 12px; }
.footer-brand img, .footer-brand .custom-logo { height: 46px; width: auto; max-width: 230px; margin-bottom: 16px; filter: brightness(0) invert(1); }
.footer-brand .custom-logo-link { display: inline-block; line-height: 0; }
.footer-brand p { max-width: 300px; font-size: .95rem; }
.f-list { list-style: none; margin: 0; padding: 0; }
.f-list li { margin-bottom: 11px; font-size: .96rem; }
.f-contact li { display: flex; gap: 10px; margin-bottom: 12px; font-size: .95rem; align-items: flex-start; }
.f-contact svg { width: 18px; height: 18px; flex-shrink: 0; margin-top: 3px; opacity: .8; }
.socials { display: flex; gap: 12px; margin-top: 8px; }
.socials a { width: 38px; height: 38px; border-radius: 50%; background: rgba(255,255,255,.10); display: grid; place-items: center; transition: background .18s ease; }
.socials a:hover { background: rgba(255,255,255,.22); }
.socials svg { width: 18px; height: 18px; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.14); margin-top: 46px; padding-top: 22px; display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; font-size: .88rem; }

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

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  .hero-inner { grid-template-columns: 1fr; gap: 40px; }
  .hero-visual { max-width: 520px; }
  .grid-3, .tgrid, .values { grid-template-columns: 1fr 1fr; }
  .benefits { grid-template-columns: 1fr 1fr; }
  .split, .contact-grid { grid-template-columns: 1fr; gap: 32px; }
  .split.reverse .split-media { order: 0; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
  .stat-row { grid-template-columns: 1fr 1fr; gap: 32px; }
}
@media (max-width: 760px) {
  .nav-toggle { display: block; }
  .main-nav {
    position: fixed; inset: 78px 0 auto 0; background: #fff; border-bottom: 1px solid var(--line);
    flex-direction: column; align-items: stretch; padding: 12px 20px 20px; gap: 6px;
    transform: translateY(-140%); transition: transform .28s ease; box-shadow: var(--shadow-md); z-index: 55;
  }
  .nav-open .main-nav { transform: translateY(0); }
  .main-nav ul { flex-direction: column; align-items: stretch; gap: 2px; width: 100%; }
  .main-nav a { padding: 13px 14px; border-radius: 10px; }
  .header-cta .login-link { display: none; }
}
@media (max-width: 560px) {
  body { font-size: 16px; }
  .grid-3, .tgrid, .values, .benefits, .footer-grid, .form-row, .stat-row { grid-template-columns: 1fr; }
  .hero-actions .btn, .cta-band .btn { width: 100%; justify-content: center; }
  .hero-trust { flex-wrap: wrap; white-space: normal; }
  .footer-bottom { flex-direction: column; }
}
