/* ==========================================================================
   onlineprimex.com — Online Primex Inc.
   Self-reflection quiz site stylesheet (no frameworks, no web fonts, no CDN)

   PALETTE (sampled from images/logo.png by pixel averaging)
     Logo sage green ........ #8FA373   (knot + wordmark)
     Logo dusty rose ........ #D1A09B
     Logo warm orange ....... #DE9854
   Derived tokens
     --sage-deep  #56693F  primary buttons / links (AA on light backgrounds)
     --sage-ink   #2C3624  body text / headings
     --rose-deep  #9A5B54  accent text
     --orange-deep#A45E1E  accent text / focus
     --cream      #FBF8F3  page background
     --sand       #F3ECE2  alt sections
     --sage-tint  #EDF1E6  quiz surface
     --rose-tint  #F7EAE7  callouts
     --orange-tint#FBEEDF  callouts
     --line       #E3DBCF  borders

   IMAGE CREDITS (Pexels License, free to use)
     featured_image.webp  https://www.pexels.com/photo/photo-of-woman-writing-on-a-notebook-4049667/
     content_image.webp   https://www.pexels.com/photo/women-having-conversation-while-looking-at-each-other-5234582/
   ========================================================================== */

:root {
  --sage: #8FA373;
  --sage-deep: #56693F;
  --sage-ink: #2C3624;
  --rose: #D1A09B;
  --rose-deep: #9A5B54;
  --orange: #DE9854;
  --orange-deep: #A45E1E;
  --cream: #FBF8F3;
  --sand: #F3ECE2;
  --sage-tint: #EDF1E6;
  --rose-tint: #F7EAE7;
  --orange-tint: #FBEEDF;
  --line: #E3DBCF;
  --muted: #5E6656;
  --white: #FFFFFF;

  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  --r-sm: 10px;
  --r-md: 18px;
  --r-lg: 28px;
  --shadow: 0 1px 2px rgba(44, 54, 36, .06), 0 12px 32px -12px rgba(44, 54, 36, .18);
  --shell: 1140px;
}

*, *::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 { transition: none !important; animation: none !important; } }

body {
  margin: 0;
  background: var(--cream);
  color: var(--sage-ink);
  font: 17px/1.65 var(--sans);
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--sage-deep); text-underline-offset: 3px; }
a:hover { color: var(--orange-deep); }
:focus-visible { outline: 3px solid var(--orange); outline-offset: 3px; border-radius: 6px; }
[tabindex="-1"]:focus { outline: none; }

h1, h2, h3, h4 { font-family: var(--serif); font-weight: 600; line-height: 1.2; margin: 0 0 .5em; color: var(--sage-ink); letter-spacing: -.01em; }
h1 { font-size: clamp(2.1rem, 4.6vw, 3.4rem); }
h2 { font-size: clamp(1.6rem, 3vw, 2.3rem); }
h3 { font-size: 1.25rem; }
p { margin: 0 0 1em; }

.shell { width: 100%; max-width: var(--shell); margin: 0 auto; padding: 0 20px; }
.narrow { max-width: 780px; }
.skip { position: absolute; left: -9999px; top: 0; background: var(--sage-ink); color: #fff; padding: 10px 16px; z-index: 100; }
.skip:focus { left: 12px; top: 12px; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; font-size: .8rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--rose-deep); margin-bottom: 14px; }
.eyebrow::before { content: ""; width: 22px; height: 2px; background: var(--orange); border-radius: 2px; }
.muted { color: var(--muted); }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 14px 26px; border-radius: 999px; border: 2px solid transparent;
  font: 600 1rem/1.2 var(--sans); text-decoration: none; cursor: pointer;
  transition: transform .15s ease, background .2s ease, color .2s ease, border-color .2s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--sage-deep); color: #fff; }
.btn-primary:hover { background: var(--sage-ink); color: #fff; }
.btn-ghost { background: transparent; color: var(--sage-ink); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--sage); color: var(--sage-ink); }
.btn-sm { padding: 9px 18px; font-size: .92rem; }
.btn[disabled] { opacity: .45; cursor: not-allowed; transform: none; }

/* ---------- header ---------- */
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(251, 248, 243, .92); backdrop-filter: saturate(140%) blur(10px); border-bottom: 1px solid var(--line); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 72px; }
.brand img { width: 170px; height: auto; }
.nav { display: flex; align-items: center; gap: 22px; }
.nav a { text-decoration: none; color: var(--sage-ink); font-weight: 500; font-size: .96rem; }
.nav a:hover { color: var(--sage-deep); }
.nav a.btn-primary, .nav a.btn-primary:hover { color: #fff; }
@media (max-width: 760px) { .nav a:not(.btn) { display: none; } .brand img { width: 140px; } }

/* ---------- hero ---------- */
.hero { position: relative; padding: 64px 0 48px; overflow: hidden; }
.hero::before {
  content: ""; position: absolute; inset: auto -10% -40% auto; width: 520px; height: 520px; border-radius: 50%;
  background: radial-gradient(closest-side, rgba(209, 160, 155, .35), transparent 70%); pointer-events: none;
}
.hero::after {
  content: ""; position: absolute; left: -140px; top: -120px; width: 420px; height: 420px; border-radius: 50%;
  background: radial-gradient(closest-side, rgba(143, 163, 115, .25), transparent 70%); pointer-events: none;
}
.hero-grid { position: relative; z-index: 1; display: grid; grid-template-columns: 1.05fr .95fr; gap: 48px; align-items: center; }
.hero-lede { font-size: 1.14rem; color: var(--muted); max-width: 34em; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 26px 0 18px; }
.hero-facts { display: flex; flex-wrap: wrap; gap: 10px; padding: 0; margin: 0; list-style: none; }
.hero-facts li { background: var(--white); border: 1px solid var(--line); border-radius: 999px; padding: 6px 14px; font-size: .88rem; }
.hero-facts li b { color: var(--sage-deep); }
.hero-figure { position: relative; margin: 0; }
.hero-figure img { border-radius: var(--r-lg); box-shadow: var(--shadow); aspect-ratio: 5 / 4; object-fit: cover; object-position: 55% 30%; width: 100%; }
.hero-figure figcaption { position: absolute; left: -18px; bottom: 22px; max-width: 250px; background: var(--white); border-radius: var(--r-md); padding: 14px 16px; box-shadow: var(--shadow); font-size: .9rem; border-left: 4px solid var(--orange); }
@media (max-width: 900px) {
  .hero { padding-top: 36px; }
  .hero-grid { grid-template-columns: 1fr; gap: 32px; }
  .hero-figure figcaption { left: 12px; bottom: 12px; }
}

/* ---------- note strip ---------- */
.note-strip { background: var(--rose-tint); border-top: 1px solid #EBD3CF; border-bottom: 1px solid #EBD3CF; }
.note-strip p { margin: 0; padding: 14px 0; font-size: .94rem; }

/* ---------- sections ---------- */
.section { padding: 80px 0; }
.section-alt { background: var(--sand); }
.section-head { max-width: 680px; margin-bottom: 36px; }
.section-head p { color: var(--muted); }

/* ---------- quiz ---------- */
.quiz-wrap { background: var(--sage-tint); }
.quiz-card { background: var(--white); border-radius: var(--r-lg); box-shadow: var(--shadow); padding: clamp(22px, 4vw, 44px); max-width: 820px; margin: 0 auto; border: 1px solid #DCE3D1; }
.quiz-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; font-size: .9rem; color: var(--muted); margin-bottom: 10px; }
.quiz-area { font-weight: 700; color: var(--rose-deep); text-transform: uppercase; letter-spacing: .08em; font-size: .76rem; }
.progress { height: 10px; background: var(--sand); border-radius: 999px; overflow: hidden; margin-bottom: 28px; }
.progress-bar { height: 100%; width: 0; background: linear-gradient(90deg, var(--sage), var(--orange)); border-radius: 999px; transition: width .35s ease; }
.quiz-q { font-family: var(--serif); font-size: clamp(1.3rem, 2.6vw, 1.7rem); line-height: 1.35; margin: 0 0 26px; min-height: 2.7em; }
.scale { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; border: 0; padding: 0; margin: 0 0 26px; }
.scale legend { margin-bottom: 12px; }
.scale label { position: relative; display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; font-size: .85rem; line-height: 1.25; cursor: pointer; padding: 14px 6px; border-radius: var(--r-md); border: 2px solid var(--line); background: var(--cream); transition: border-color .15s, background .15s; }
.scale input { position: absolute; opacity: 0; pointer-events: none; }
.scale .dot { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--sage); background: var(--white); transition: background .15s, box-shadow .15s; }
.scale label:hover { border-color: var(--sage); }
.scale input:checked + .dot { background: var(--sage-deep); border-color: var(--sage-deep); box-shadow: inset 0 0 0 4px var(--white); }
.scale input:checked ~ span:last-child { font-weight: 700; }
.scale label:has(input:checked) { border-color: var(--sage-deep); background: var(--sage-tint); }
.scale input:focus-visible + .dot { outline: 3px solid var(--orange); outline-offset: 3px; }
.quiz-nav { display: flex; justify-content: space-between; gap: 12px; }
@media (max-width: 600px) {
  .scale { grid-template-columns: 1fr; gap: 8px; }
  .scale label { flex-direction: row; justify-content: flex-start; padding: 12px 14px; text-align: left; }
}

.quiz-intro h3 { font-size: 1.5rem; }
.quiz-intro ul { padding-left: 1.2em; color: var(--muted); }
.quiz-intro .btn { margin-top: 8px; }

/* results */
.result-band { display: inline-block; padding: 6px 14px; border-radius: 999px; font-weight: 700; font-size: .85rem; letter-spacing: .04em; margin-bottom: 14px; }
.band-low { background: var(--sage-tint); color: var(--sage-deep); }
.band-mid { background: var(--orange-tint); color: var(--orange-deep); }
.band-high { background: var(--rose-tint); color: var(--rose-deep); }
.meter { position: relative; height: 14px; border-radius: 999px; background: linear-gradient(90deg, var(--sage) 0 35%, var(--orange) 35% 65%, var(--rose) 65% 100%); margin: 22px 0 8px; }
.meter-pin { position: absolute; top: 50%; width: 26px; height: 26px; border-radius: 50%; background: var(--white); border: 4px solid var(--sage-ink); transform: translate(-50%, -50%); left: 0; transition: left .6s ease; }
.meter-legend { display: flex; justify-content: space-between; font-size: .8rem; color: var(--muted); margin-bottom: 22px; }
.areas { display: grid; gap: 10px; margin: 18px 0 24px; padding: 0; list-style: none; }
.areas li { display: grid; grid-template-columns: 170px 1fr 44px; gap: 12px; align-items: center; font-size: .92rem; }
.areas .bar { height: 8px; background: var(--sand); border-radius: 999px; overflow: hidden; }
.areas .bar i { display: block; height: 100%; background: var(--sage); border-radius: 999px; }
@media (max-width: 520px) { .areas li { grid-template-columns: 1fr 44px; } .areas .bar { grid-column: 1 / -1; grid-row: 2; } }
.result-note { background: var(--orange-tint); border-radius: var(--r-md); padding: 16px 18px; font-size: .93rem; margin: 18px 0; }

/* ---------- article ---------- */
.article { display: grid; grid-template-columns: 240px 1fr; gap: 56px; align-items: start; }
.toc { position: sticky; top: 96px; font-size: .92rem; }
.toc p { font-weight: 700; margin-bottom: 8px; }
.toc ol { margin: 0; padding-left: 1.1em; display: grid; gap: 6px; }
.toc a { color: var(--muted); text-decoration: none; }
.toc a:hover { color: var(--sage-deep); }
.prose { max-width: 720px; }
.prose h2 { margin-top: 1.6em; scroll-margin-top: 96px; }
.prose h2:first-child { margin-top: 0; }
.prose ul { padding-left: 1.2em; }
.prose li { margin-bottom: .4em; }
.prose figure { margin: 32px 0; }
.prose figure img { border-radius: var(--r-md); }
.prose figcaption { font-size: .85rem; color: var(--muted); margin-top: 8px; }
.compare { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin: 24px 0; }
.compare > div { border-radius: var(--r-md); padding: 20px; border: 1px solid var(--line); background: var(--white); }
.compare > div:first-child { border-top: 5px solid var(--sage); }
.compare > div:last-child { border-top: 5px solid var(--rose); }
.compare h3 { font-size: 1.1rem; }
.compare ul { margin: 0; }
.callout { border-radius: var(--r-md); padding: 20px 22px; margin: 26px 0; background: var(--rose-tint); border-left: 5px solid var(--rose-deep); }
.callout strong { color: var(--rose-deep); }
.sources { font-size: .9rem; border-top: 1px solid var(--line); padding-top: 18px; margin-top: 36px; }
.sources ol { padding-left: 1.2em; }
@media (max-width: 900px) {
  .article { grid-template-columns: 1fr; gap: 24px; }
  .toc { position: static; background: var(--white); border: 1px solid var(--line); border-radius: var(--r-md); padding: 16px 18px; }
}
@media (max-width: 600px) { .compare { grid-template-columns: 1fr; } }

/* ---------- FAQ ---------- */
.faq { max-width: 820px; margin: 0 auto; display: grid; gap: 12px; }
.faq-item { background: var(--white); border: 1px solid var(--line); border-radius: var(--r-md); }
.faq-q { width: 100%; display: flex; justify-content: space-between; align-items: center; gap: 16px; text-align: left; background: none; border: 0; padding: 18px 20px; font: 600 1.02rem/1.4 var(--sans); color: var(--sage-ink); cursor: pointer; }
.faq-q::after { content: "+"; flex: none; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--sage-tint); color: var(--sage-deep); font-size: 1.3rem; transition: transform .2s; }
.faq-q[aria-expanded="true"]::after { transform: rotate(45deg); background: var(--orange-tint); color: var(--orange-deep); }
.faq-a { padding: 0 20px 18px; color: var(--muted); }
.faq-a p:last-child { margin-bottom: 0; }

/* ---------- newsletter ---------- */
.newsletter { background: var(--sage-ink); color: #EEF1E8; border-radius: var(--r-lg); padding: clamp(28px, 5vw, 56px); display: grid; grid-template-columns: 1.1fr 1fr; gap: 32px; align-items: center; position: relative; overflow: hidden; }
.newsletter::after { content: ""; position: absolute; right: -80px; top: -80px; width: 260px; height: 260px; border-radius: 50%; border: 40px solid rgba(222, 152, 84, .18); }
.newsletter h2 { color: #fff; }
.newsletter p { color: #D5DCCB; }
.nl-form { position: relative; z-index: 1; display: grid; gap: 10px; }
.nl-row { display: flex; gap: 10px; flex-wrap: wrap; }
.nl-row input { flex: 1 1 220px; min-width: 0; padding: 14px 18px; border-radius: 999px; border: 2px solid transparent; font: inherit; background: #fff; color: var(--sage-ink); }
.nl-row .btn { background: var(--orange); color: var(--sage-ink); }
.nl-row .btn:hover { background: #E9AE74; color: var(--sage-ink); }
.nl-small { font-size: .82rem; color: #BFC8B3 !important; margin: 0; }
.nl-small a { color: #F1D1CD; }
.form-msg { margin: 0; font-weight: 600; min-height: 1.4em; }
.form-msg.ok { color: #CFE3B5; }
.form-msg.err { color: #F5C3BD; }
@media (max-width: 800px) { .newsletter { grid-template-columns: 1fr; } }

/* ---------- help band ---------- */
.help-band { display: grid; grid-template-columns: auto 1fr; gap: 18px; align-items: start; background: var(--white); border: 1px solid var(--line); border-radius: var(--r-md); padding: 22px; margin-top: 28px; }
.help-band .icon { width: 46px; height: 46px; border-radius: 50%; background: var(--orange-tint); display: grid; place-items: center; color: var(--orange-deep); }
.help-band p { margin: 0; }

/* ---------- inner pages ---------- */
.page-hero { padding: 64px 0 36px; background: linear-gradient(180deg, var(--sage-tint), var(--cream)); border-bottom: 1px solid var(--line); }
.page-hero p { color: var(--muted); max-width: 40em; font-size: 1.08rem; }
.page-body { padding: 48px 0 80px; }
.page-body .prose { max-width: 780px; }
.page-body .prose h2 { font-size: 1.45rem; }
.info-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 16px; margin: 28px 0; }
.info-card { background: var(--white); border: 1px solid var(--line); border-radius: var(--r-md); padding: 20px; }
.info-card h3 { font-size: 1.05rem; margin-bottom: .35em; }
.info-card p { margin: 0; color: var(--muted); font-size: .95rem; overflow-wrap: anywhere; }
.contact-form { display: grid; gap: 14px; background: var(--white); border: 1px solid var(--line); border-radius: var(--r-lg); padding: clamp(20px, 4vw, 32px); margin-top: 24px; }
.contact-form label { font-weight: 600; font-size: .92rem; display: grid; gap: 6px; }
.contact-form input, .contact-form textarea, .contact-form select { font: inherit; padding: 12px 14px; border-radius: var(--r-sm); border: 1.5px solid var(--line); background: var(--cream); color: var(--sage-ink); width: 100%; }
.contact-form input:focus, .contact-form textarea:focus { border-color: var(--sage); outline: none; box-shadow: 0 0 0 3px rgba(143, 163, 115, .3); }
.contact-form .form-msg.ok { color: var(--sage-deep); }
.contact-form .form-msg.err { color: var(--rose-deep); }

/* ---------- footer ---------- */
.site-footer { background: var(--sand); border-top: 1px solid var(--line); padding: 56px 0 28px; font-size: .94rem; }
.foot-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 36px; }
.foot-brand img { width: 170px; margin-bottom: 14px; }
.foot-brand p { color: var(--muted); max-width: 30em; }
.site-footer h4 { font-family: var(--sans); font-size: .8rem; text-transform: uppercase; letter-spacing: .1em; color: var(--rose-deep); margin-bottom: 12px; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.site-footer a { color: var(--sage-ink); text-decoration: none; }
.site-footer a:hover { color: var(--sage-deep); text-decoration: underline; }
.site-footer address { font-style: normal; line-height: 1.7; }
.foot-bottom { margin-top: 36px; padding-top: 20px; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; color: var(--muted); font-size: .86rem; }
@media (max-width: 800px) { .foot-grid { grid-template-columns: 1fr; gap: 28px; } }
