/* pHBytes public website (welcome page, FAQ, policies).
   Shares the app's palette and the litmus strip. */

:root {
  --paper: #F8F7FD;
  --surface: #FFFFFF;
  --ink: #0F2A3A;
  --ink-2: #4A6070;
  --line: #D3E1EA;
  --brand: #0070AB;
  --brand-soft: #DDF1F8;
  --deep: #03405F;
  --green: #2F7D4F;  --green-bg: #E3F1E7;
  --yellow: #A86A00; --yellow-bg: #FBEFD5;
  --red: #B8392A;    --red-bg: #F8E1DC;
  --litmus: linear-gradient(90deg,
    #D3312B 0%, #E8562A 10%, #F08A24 20%, #F4C02C 30%, #C9D33A 38%,
    #7DC04A 46%, #3FA35B 54%, #2C9C8C 62%, #2F7FB8 72%, #3F5DB0 82%, #5A3F9E 92%, #6B2D86 100%);
  --font: "DM Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --display: "Fraunces", Georgia, serif;
  --wrap: 1080px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 18px/1.55 var(--font); }
a { color: var(--brand); }
:focus-visible { outline: 3px solid #2F7FB8; outline-offset: 2px; border-radius: 6px; }
img { max-width: 100%; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 12px; top: 12px; z-index: 99; background: #fff; padding: 8px 12px; }

h1, h2, h3 { line-height: 1.15; margin: 0 0 .5em; }
h1 { font: 700 clamp(2.3rem, 6vw, 3.9rem)/1.05 var(--display); letter-spacing: -.02em; }
h2 { font: 700 clamp(1.7rem, 3.6vw, 2.4rem)/1.1 var(--display); letter-spacing: -.01em; }
h3 { font-size: 1.15rem; font-weight: 700; }
p { margin: 0 0 1em; }

/* ---------- header ---------- */
.site-top { position: sticky; top: 0; z-index: 20; background: rgba(255,255,255,.94); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.site-top .wrap { display: flex; align-items: center; gap: 24px; height: 68px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); margin-right: auto; }
.brand-mark { width: 32px; height: 37px; flex: none; background: url(/icons/logo.svg) center / contain no-repeat; }
.brand-name { font: 700 1.35rem var(--display); }
.brand-name b { font-weight: 500; color: var(--brand); }
.site-nav { display: flex; gap: 22px; }
.site-nav a { color: var(--ink); text-decoration: none; font-weight: 500; font-size: .98rem; }
.site-nav a:hover { color: var(--brand); }
@media (max-width: 760px) { .site-nav { display: none; } }
.site-signin { color: var(--brand); font-weight: 600; text-decoration: none; white-space: nowrap; }
.site-signin:hover { text-decoration: underline; }
@media (max-width: 760px) { .site-top .wrap { gap: 14px; } }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 52px; padding: 0 24px; border-radius: 99px; border: 0; cursor: pointer;
  background: var(--brand); color: #fff; font: 600 1rem var(--font); text-decoration: none;
}
.btn:hover { filter: brightness(1.1); }
.btn.secondary { background: var(--brand-soft); color: var(--brand); }
.btn.light { background: #fff; color: var(--deep); }
.btn.sm { min-height: 42px; padding: 0 18px; font-size: .95rem; }

/* ---------- hero ---------- */
.hero { padding: 64px 0 72px; }
.hero .wrap { display: grid; grid-template-columns: 1.05fr 1fr; gap: 56px; align-items: center; }
@media (max-width: 900px) { .hero .wrap { grid-template-columns: 1fr; gap: 36px; } .hero { padding-top: 40px; } }
.hero-tag { font: 600 clamp(1.2rem, 2.4vw, 1.45rem)/1.35 var(--display); color: var(--brand); max-width: 30em; margin: 0 0 14px; text-wrap: balance; }
.hero-lede { font-size: 1.2rem; color: var(--ink-2); max-width: 34em; margin-bottom: 26px; }
.hero-ctas { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 14px; }
.hero-note { font-size: .92rem; color: var(--ink-2); }

.tryit { background: var(--surface); border: 1px solid var(--line); border-radius: 26px; padding: 26px 24px 22px; box-shadow: 0 1px 2px rgba(15,42,58,.05), 0 20px 50px rgba(15,42,58,.08); }
.tryit-label { font-size: .92rem; font-weight: 600; color: var(--ink-2); margin: 0 0 10px; }
.tryit-foods { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 26px; }
.tryit-foods button { padding: 9px 15px; border-radius: 99px; border: 1.5px solid var(--line); background: #fff; font: 500 .95rem var(--font); color: var(--ink); cursor: pointer; }
.tryit-foods button[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }
.tryit-result { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.tryit-name { font: 700 1.9rem/1.1 var(--display); }
.tryit-ph { font: 700 2.6rem/1 var(--display); }
.tryit-ph small { font: 600 .85rem var(--font); color: var(--ink-2); margin-left: 4px; }

.litmus { position: relative; margin: 18px 0 8px; }
.litmus-bar { height: 26px; border-radius: 7px; background: var(--litmus); box-shadow: inset 0 0 0 1px rgba(0,0,0,.06); }
.litmus-marker { position: absolute; top: -9px; width: 4px; height: 44px; margin-left: -2px; background: var(--ink); border-radius: 2px; transition: left .6s cubic-bezier(.2,.9,.3,1.15); }
.litmus-marker::after { content: ""; position: absolute; left: 50%; top: -7px; transform: translateX(-50%); border: 6px solid transparent; border-top-color: var(--ink); }
@media (prefers-reduced-motion: reduce) { .litmus-marker { transition: none; } }
.litmus-scale { display: flex; justify-content: space-between; font-size: .78rem; color: var(--ink-2); margin-top: 8px; }
.litmus-ends { display: flex; justify-content: space-between; font-size: .82rem; font-weight: 600; color: var(--ink-2); }

.verdict { margin-top: 16px; padding: 14px 16px; border-radius: 14px; }
.verdict b { display: block; font-size: 1.08rem; }
.verdict.green { background: var(--green-bg); } .verdict.green b { color: var(--green); }
.verdict.yellow { background: var(--yellow-bg); } .verdict.yellow b { color: var(--yellow); }
.verdict.red { background: var(--red-bg); } .verdict.red b { color: var(--red); }
.verdict span { font-size: .95rem; }

/* ---------- sections ---------- */
section.band { padding: 80px 0; }
section.band.alt { background: var(--surface); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-lede { color: var(--ink-2); font-size: 1.12rem; max-width: 40em; margin-bottom: 40px; }

.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 36px; }
@media (max-width: 860px) { .features { grid-template-columns: 1fr; gap: 28px; } }
.feature .f-icon { width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center; background: var(--brand-soft); margin-bottom: 16px; }
.feature .f-icon svg { width: 26px; height: 26px; fill: none; stroke: var(--brand); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.feature p { color: var(--ink-2); margin: 0; }
.feature .tag { display: inline-block; font-size: .8rem; font-weight: 700; color: var(--brand); margin-bottom: 6px; }

.origin { display: grid; grid-template-columns: 12px 1fr; gap: 28px; max-width: 760px; }
.origin .bar { border-radius: 6px; background: linear-gradient(180deg, #D3312B, #F4C02C, #3FA35B, #2F7FB8, #6B2D86); }
.origin p.big { font: 500 clamp(1.35rem, 2.6vw, 1.75rem)/1.4 var(--display); margin-bottom: 14px; }
.origin .who { color: var(--ink-2); font-weight: 600; margin: 0; }

/* ---------- pricing ---------- */
.pricing { display: grid; grid-template-columns: 1fr 1.4fr; gap: 24px; align-items: start; }
@media (max-width: 860px) { .pricing { grid-template-columns: 1fr; } }
.tier { background: var(--surface); border: 1px solid var(--line); border-radius: 22px; padding: 28px 26px; }
.tier.premium { background: var(--deep); color: #fff; border-color: var(--deep); }
.tier h3 { font: 700 1.5rem var(--display); margin-bottom: 4px; }
.tier .price-line { color: var(--ink-2); margin-bottom: 18px; }
.tier.premium .price-line { color: #B9DCEC; }
.tier ul { list-style: none; padding: 0; margin: 0 0 24px; }
.tier li { padding: 9px 0 9px 30px; position: relative; border-top: 1px solid var(--line); }
.tier.premium li { border-top-color: rgba(255,255,255,.14); }
.tier li:first-child { border-top: 0; }
.tier li::before { content: ""; position: absolute; left: 2px; top: 15px; width: 14px; height: 8px; border-left: 2.5px solid var(--green); border-bottom: 2.5px solid var(--green); transform: rotate(-45deg); }
.tier.premium li::before { border-color: #7FD3EA; }
.plan-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 22px; }
@media (max-width: 520px) { .plan-row { grid-template-columns: 1fr; } }
.plan-box { border: 1.5px solid rgba(255,255,255,.22); border-radius: 14px; padding: 14px; }
.plan-box.featured { border-color: #7FD3EA; background: rgba(127,211,234,.1); }
.plan-box .n { font-size: .9rem; font-weight: 600; color: #B9DCEC; }
.plan-box .p { font: 700 1.6rem var(--display); }
.plan-box .s { font-size: .82rem; color: #B9DCEC; }
.fine { font-size: .85rem; color: #B9DCEC; margin: 14px 0 0; }

/* ---------- FAQ ---------- */
.faq details { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; margin-bottom: 10px; }
.faq summary { cursor: pointer; padding: 18px 20px; font-weight: 600; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-size: 1.4rem; line-height: 1; color: var(--brand); }
.faq details[open] summary::after { content: "–"; }
.faq details > div { padding: 0 20px 18px; color: var(--ink-2); }
.faq details > div p:last-child { margin-bottom: 0; }

.cta-band { background: var(--deep); color: #fff; padding: 72px 0; }
.cta-band .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 24px; }
.cta-band h2 { margin: 0; max-width: 18em; }

/* ---------- footer ---------- */
.site-foot { padding: 44px 0 56px; font-size: .92rem; color: var(--ink-2); }
.site-foot .cols { display: flex; flex-wrap: wrap; gap: 28px 48px; justify-content: space-between; margin-bottom: 24px; }
.site-foot nav { display: flex; flex-wrap: wrap; gap: 10px 22px; }
.site-foot nav a { color: var(--ink); text-decoration: none; font-weight: 500; }
.site-foot nav a:hover { color: var(--brand); }
.site-foot .disclaimer { max-width: 60em; border-top: 1px solid var(--line); padding-top: 20px; margin: 0; }

/* ---------- document pages (FAQ, policies) ---------- */
.doc { padding: 48px 0 64px; }
.doc .wrap { max-width: 760px; }
.doc h1 { font-size: clamp(2.1rem, 5vw, 3rem); }
.doc h2 { font-size: 1.45rem; margin-top: 1.8em; }
.doc h3 { margin-top: 1.4em; }
.doc .updated { color: var(--ink-2); font-size: .92rem; margin-bottom: 28px; }
.doc .summary { background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--brand); border-radius: 0 14px 14px 0; padding: 18px 20px; margin-bottom: 28px; }
.doc .summary ul { margin: 8px 0 0; padding-left: 20px; }
.doc li { margin-bottom: 6px; }
.doc table { width: 100%; border-collapse: collapse; margin: 10px 0 20px; background: var(--surface); border-radius: 12px; overflow: hidden; border: 1px solid var(--line); }
.doc th, .doc td { text-align: left; padding: 12px 14px; border-top: 1px solid var(--line); vertical-align: top; font-size: .97rem; }
.doc th { background: var(--brand-soft); border-top: 0; }
.doc-nav { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 28px; }
.doc-nav a { padding: 7px 14px; border-radius: 99px; border: 1.5px solid var(--line); text-decoration: none; color: var(--ink); font-size: .92rem; font-weight: 500; background: #fff; }
.doc-nav a[aria-current="page"] { background: var(--ink); border-color: var(--ink); color: #fff; }
.review-note { background: var(--yellow-bg); color: #6A4300; border-radius: 12px; padding: 12px 16px; font-size: .9rem; margin-bottom: 24px; }

/* ---------- about page ---------- */
.about-hero { padding: 56px 0 48px; }
.about-hero .wrap { max-width: 860px; }
.about-hero .hero-lede { margin-bottom: 0; }
.origin h2 { margin-bottom: 14px; }
.origin p { max-width: 40em; }
.loop { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; counter-reset: step; position: relative; }
.loop li { counter-increment: step; position: relative; padding: 64px 20px 0 0; }
.loop li::before { content: counter(step); position: absolute; top: 0; left: 0; width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: var(--deep); color: #fff; font: 700 1.1rem var(--display); z-index: 1; }
.loop li::after { content: ""; position: absolute; top: 21px; left: 44px; right: 0; height: 3px; border-radius: 2px; background: var(--litmus); opacity: .55; }
.loop li:last-child::after { display: none; }
.loop b { display: block; font: 700 1.35rem var(--display); margin-bottom: 6px; }
.loop span { color: var(--ink-2); display: block; }
@media (max-width: 760px) {
  .loop { grid-template-columns: 1fr; gap: 22px; }
  .loop li { padding: 0 0 0 62px; min-height: 44px; }
  .loop li::after { display: none; }
}
.feature-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0 40px; }
@media (max-width: 760px) { .feature-grid { grid-template-columns: 1fr; } }
.feature-grid article { padding: 22px 0; border-top: 1px solid var(--line); min-width: 0; }
.feature-grid h3 { margin: 4px 0 8px; }
.feature-grid p { color: var(--ink-2); margin: 0; }
.feature-grid .tag { display: inline-block; font-size: .8rem; font-weight: 700; color: var(--brand); }
.values { display: grid; grid-template-columns: repeat(2, 1fr); gap: 28px 40px; }
@media (max-width: 760px) { .values { grid-template-columns: 1fr; } }
.values p { color: var(--ink-2); margin: 0; }

/* Bigger logo and name in the top bar */
.site-top .wrap { height: 100px; }
.site-top .brand { gap: 12px; }
.site-top .brand-mark { width: 62px; height: 72px; }
.site-top .brand-name { font-size: 2.5rem; }
@media (max-width: 760px) {
  .site-top .wrap { height: 80px; }
  .site-top .brand-mark { width: 44px; height: 51px; }
  .site-top .brand-name { font-size: 1.75rem; }
}
@media (max-width: 380px) {
  .site-top .brand-name { font-size: 1.4rem; }
  .site-top .brand-mark { width: 34px; height: 39px; }
}
.site-top .btn { white-space: nowrap; }
@media (max-width: 420px) { .site-top .btn.sm { padding: 0 14px; } .site-top .wrap { gap: 10px; } }

/* Highlighted word in the main title: brand blue with a pH-rainbow underline */
.hl { color: var(--brand); white-space: nowrap;
  background: var(--litmus) no-repeat 0 92% / 100% .11em; padding-bottom: .04em; }

/* Soft aqua-to-lavender wash behind the welcome section */
.hero { background:
    linear-gradient(to bottom, rgba(248,247,253,0) 65%, var(--paper) 100%),
    linear-gradient(115deg, #BFEFF3 0%, #D6E6FB 45%, #E6DAFB 100%); }
.hero .btn.secondary { background: #fff; }
