:root {
  /* Brand palette derived from the Calivia Digital logo: process blue + neutral grey.
     Chrome is cool and clean so the warm product artwork carries the colour. */
  --surface: #f7f9fb;        /* page background — near-white, cool */
  --surface-2: #eaeef3;      /* raised/alt background */
  --charcoal: #1f2428;       /* primary text */
  --charcoal-soft: #545b61;  /* secondary text (logo grey, darkened for contrast) */
  --blue: #1b75bc;           /* logo blue — actions, links, accents */
  --blue-dark: #135a92;      /* hover / emphasis */
  --ink-blue: #14476f;       /* deep blue — headings accents, prices */
  --slate: #77787b;          /* logo grey — subtle accents, dividers */
  --border: #d9dee5;
  --radius: 14px;
  --max-width: 1120px;
}

* {
  box-sizing: border-box;
}

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--surface);
  color: var(--charcoal);
  line-height: 1.55;
}

h1, h2, h3 {
  font-family: Georgia, "Times New Roman", serif;
  line-height: 1.2;
  margin: 0 0 0.5em;
}

h1 { font-size: clamp(2rem, 5vw, 3rem); }
h2 { font-size: clamp(1.5rem, 3.5vw, 2.1rem); text-align: center; }
h3 { font-size: 1.25rem; }

p { margin: 0 0 1em; }

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

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

/* Header / nav */
.site-header {
  position: sticky;
  top: 0;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  z-index: 100;
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 1rem;
  padding-bottom: 1rem;
}

.brand {
  font-family: Georgia, serif;
  font-size: 1.3rem;
  font-weight: bold;
  color: var(--charcoal);
  text-decoration: none;
}

.brand-amp {
  color: var(--blue);
}

.nav-links {
  list-style: none;
  display: flex;
  gap: 1.75rem;
  margin: 0;
  padding: 0;
}

.nav-links a {
  color: var(--charcoal);
  text-decoration: none;
  font-size: 0.95rem;
}

.nav-links a:hover {
  color: var(--blue);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 26px;
  height: 20px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
}

.nav-toggle span {
  display: block;
  height: 2px;
  width: 100%;
  background: var(--charcoal);
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  border-radius: 999px;
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  border: 2px solid transparent;
  transition: transform 0.15s ease, background 0.15s ease;
}

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

.btn-primary {
  background: var(--blue);
  color: #fff;
}

.btn-primary:hover {
  background: var(--blue-dark);
}

.btn-ghost {
  background: transparent;
  border-color: var(--charcoal);
  color: var(--charcoal);
}

.btn-ghost:hover {
  background: var(--charcoal);
  color: var(--surface);
}

/* Hero */
.hero {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
  padding: 3rem 1.5rem 4rem;
  align-items: center;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.8rem;
  color: var(--blue-dark);
  font-weight: 700;
  margin-bottom: 0.75rem;
}

.hero-sub {
  color: var(--charcoal-soft);
  font-size: 1.05rem;
  max-width: 46ch;
}

.hero-placeholder {
  background: var(--surface-2);
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  aspect-ratio: 4 / 3;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: var(--charcoal-soft);
  font-size: 0.9rem;
}

.hero-placeholder span {
  display: block;
  font-size: 0.75rem;
  opacity: 0.7;
}

/* Products */
#products, #about, #why-calivia, #help, #email-capture {
  scroll-margin-top: 80px;
}

.products {
  padding: 3rem 1.5rem;
}

.section-sub {
  text-align: center;
  color: var(--charcoal-soft);
  max-width: 60ch;
  margin: 0 auto 2.5rem;
}

.product-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

.product-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
}

.product-thumb {
  background: var(--surface-2);
  border-radius: 10px;
  aspect-ratio: 16 / 10;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--charcoal-soft);
  font-size: 0.85rem;
  margin-bottom: 1rem;
  text-align: center;
  padding: 1rem;
  overflow: hidden;
}

.product-thumb.img-fill {
  padding: 0;
}

/* Bundle card — subtly lifted so the best-value offer reads as the headline one */
.product-card.featured {
  border-color: var(--blue);
  box-shadow: 0 4px 18px rgba(27, 117, 188, 0.16);
  position: relative;
}

.product-card.featured::before {
  content: "Best value";
  position: absolute;
  top: 0.9rem;
  right: 0.9rem;
  z-index: 1;
  background: var(--blue);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.28rem 0.65rem;
  border-radius: 999px;
}

/* Struck-through "was" price next to a bundle price */
.product-price .was {
  color: var(--charcoal-soft);
  font-weight: 400;
  font-size: 0.85em;
  margin-left: 0.35rem;
  text-decoration-thickness: 1px;
}

.product-thumb.img-fill img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.product-desc {
  color: var(--charcoal-soft);
  font-size: 0.95rem;
  flex-grow: 1;
}

.product-price {
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--ink-blue);
}

.product-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-top: 0.5rem;
}

/* Detail sections */
.detail-section {
  padding: 3rem 1.5rem;
}

.detail-block {
  max-width: 60ch;
  margin: 0 auto 2.5rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--border);
  scroll-margin-top: 80px;
}

.detail-block:last-child {
  border-bottom: none;
}

.detail-block ul {
  color: var(--charcoal-soft);
  padding-left: 1.2rem;
}

/* Testimonials */
.testimonials {
  padding: 3rem 1.5rem;
  background: var(--surface-2);
}

.testimonial-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  max-width: var(--max-width);
  margin: 0 auto;
}

.testimonial {
  background: #fff;
  border-radius: var(--radius);
  padding: 1.5rem;
  margin: 0;
  border: 1px solid var(--border);
}

.testimonial p {
  font-style: italic;
  color: var(--charcoal-soft);
}

.testimonial cite {
  font-size: 0.85rem;
  color: var(--blue-dark);
  font-style: normal;
  font-weight: 600;
}

/* Email capture */
.email-capture {
  padding: 4rem 1.5rem;
}

.email-box {
  max-width: 560px;
  margin: 0 auto;
  text-align: center;
}

.email-form {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

.email-form input[type="email"] {
  padding: 0.85rem 1rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  font-size: 1rem;
}

.email-form input[type="email"]:focus {
  outline: 2px solid var(--blue);
}

.form-note {
  min-height: 1.2em;
  font-size: 0.9rem;
  color: var(--ink-blue);
  margin-top: 0.75rem;
}

/* Buy modal */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(35, 35, 35, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  z-index: 200;
}

.modal-overlay[hidden] {
  display: none;
}

.modal {
  position: relative;
  background: #fff;
  border-radius: var(--radius);
  padding: 2rem;
  max-width: 420px;
  width: 100%;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.25);
}

.modal-close {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  background: none;
  border: none;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  color: var(--charcoal-soft);
}

.modal-product-name {
  font-weight: 700;
  margin-bottom: 0.25rem;
}

.modal-product-price {
  color: var(--ink-blue);
  font-weight: 700;
  margin-bottom: 1rem;
}

#buyForm {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

#buyForm input {
  padding: 0.85rem 1rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  font-size: 1rem;
  width: 100%;
}

#buyForm input:focus {
  outline: 2px solid var(--blue);
}

.modal-note {
  font-size: 0.8rem;
  color: var(--charcoal-soft);
  margin-top: 1rem;
  margin-bottom: 0;
}

#buyModalSuccessView .btn {
  display: block;
  text-align: center;
  margin-top: 0.5rem;
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 2rem 1.5rem;
}

.footer-inner {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  align-items: center;
  text-align: center;
  color: var(--charcoal-soft);
  font-size: 0.9rem;
}

.social-links {
  list-style: none;
  display: flex;
  gap: 1.25rem;
  margin: 0;
  padding: 0;
}

.social-links a {
  color: var(--charcoal-soft);
  text-decoration: none;
}

.social-links a:hover {
  color: var(--blue);
}

/* Responsive */
@media (min-width: 640px) {
  .product-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .testimonial-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  .email-form {
    flex-direction: row;
  }
  .email-form input[type="email"] {
    flex-grow: 1;
  }
}

@media (min-width: 900px) {
  .hero {
    grid-template-columns: 1.1fr 0.9fr;
    padding: 5rem 1.5rem 6rem;
  }
  .product-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  .footer-inner {
    flex-direction: row;
    justify-content: space-between;
    text-align: left;
  }
}

@media (max-width: 639px) {
  .nav-toggle {
    display: flex;
  }
  .nav-links {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    gap: 0;
    padding: 0.5rem 1.5rem 1rem;
    display: none;
  }
  .nav-links.open {
    display: flex;
  }
  .nav-links li {
    padding: 0.6rem 0;
    border-bottom: 1px solid var(--border);
  }
  .nav-links li:last-child {
    border-bottom: none;
  }
}

/* ============================================================
   Polish layer — modern UX, accessibility, global-access cues
   ============================================================ */

/* Accessibility */
.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  z-index: 300;
  background: var(--ink-blue);
  color: #fff;
  padding: 0.6rem 1.1rem;
  border-radius: 0 0 10px 0;
  text-decoration: none;
  font-size: 0.9rem;
}

.skip-link:focus {
  left: 0;
}

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

/* Header state on scroll */
.site-header {
  transition: box-shadow 0.25s ease;
}

.site-header.scrolled {
  box-shadow: 0 4px 18px rgba(20, 46, 72, 0.08);
}

/* Hero */
.hero-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.hero-visual img {
  width: 100%;
  height: auto;
  display: block;
}

.trust-row {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.4rem;
  padding: 0;
  margin: 1.5rem 0 0;
  font-size: 0.85rem;
  color: var(--charcoal-soft);
}

.trust-row li {
  position: relative;
  padding-left: 1.1rem;
}

.trust-row li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.42em;
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: var(--blue);
}

/* Filter chips */
.filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
  margin-bottom: 2rem;
}

.chip {
  border: 1px solid var(--border);
  background: #fff;
  color: var(--charcoal-soft);
  border-radius: 999px;
  padding: 0.45rem 1.05rem;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.chip:hover {
  border-color: var(--blue);
  color: var(--blue-dark);
}

.chip.is-active {
  background: var(--ink-blue);
  border-color: var(--ink-blue);
  color: #fff;
}

.product-card.is-filtered-out {
  display: none;
}

/* Product cards — lift on hover */
.product-card {
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  .product-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 28px rgba(20, 46, 72, 0.10);
  }
}

/* Coming soon */
.product-card.coming-soon .product-thumb {
  filter: grayscale(0.15);
}

.soon-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.55rem 1.15rem;
  border-radius: 999px;
  background: var(--surface-2);
  border: 1px dashed var(--slate);
  color: var(--charcoal-soft);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.soon-inline {
  font-family: inherit;
  font-size: 0.7em;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--charcoal-soft);
  background: var(--surface-2);
  border-radius: 999px;
  padding: 0.15em 0.7em;
  vertical-align: middle;
  margin-left: 0.4em;
  white-space: nowrap;
}

.soon-note {
  text-align: center;
  color: var(--charcoal-soft);
  font-size: 0.95rem;
  margin-top: 2.25rem;
}

.soon-note a {
  color: var(--blue-dark);
  font-weight: 600;
}

/* Why Calivia (replaces placeholder testimonials) */
.why-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
}

.why-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
}

.why-card h3 {
  font-size: 1.05rem;
  color: var(--ink-blue);
  margin-bottom: 0.5rem;
}

.why-card p {
  color: var(--charcoal-soft);
  font-size: 0.93rem;
  margin: 0;
}

@media (min-width: 640px) {
  .why-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1000px) {
  .why-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* Scroll reveal — subtle, disabled for reduced motion */
@media (prefers-reduced-motion: no-preference) {
  .reveal {
    opacity: 0;
    transform: translateY(14px);
    transition: opacity 0.5s ease, transform 0.5s ease;
  }
  .reveal.is-visible {
    opacity: 1;
    transform: none;
  }
}

/* Back to top */
.back-to-top {
  position: fixed;
  right: 1.25rem;
  bottom: 1.25rem;
  z-index: 150;
  width: 2.9rem;
  height: 2.9rem;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: #fff;
  color: var(--ink-blue);
  font-size: 1.15rem;
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(20, 46, 72, 0.14);
  transition: background 0.15s ease, transform 0.15s ease;
}

.back-to-top:hover {
  background: var(--surface-2);
  transform: translateY(-2px);
}

/* Footer */
.footer-brand {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.footer-logo {
  font-family: Georgia, serif;
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--charcoal);
  margin: 0;
}

.footer-tag {
  font-size: 0.85rem;
  margin: 0;
}

/* Delivery, refunds & help */
.help-section {
  padding: 3.5rem 1.5rem 1rem;
}

.policy-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
}

.policy-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
}

.policy-card h3 {
  font-size: 1.05rem;
  color: var(--ink-blue);
  margin-bottom: 0.6rem;
}

.policy-card p,
.policy-card li {
  color: var(--charcoal-soft);
  font-size: 0.93rem;
}

.policy-card p:last-child {
  margin-bottom: 0;
}

.policy-card ul {
  padding-left: 1.15rem;
  margin: 0 0 1em;
}

.policy-card li {
  margin-bottom: 0.35rem;
}

.policy-note {
  font-size: 0.85rem !important;
  border-top: 1px solid var(--border);
  padding-top: 0.85rem;
  margin-top: 0.25rem;
}

.contact-line {
  font-size: 1.02rem !important;
  font-weight: 600;
  word-break: break-word;
}

.contact-line a,
.footer-contact a,
.modal-note a {
  color: var(--blue-dark);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.contact-line a:hover,
.footer-contact a:hover,
.modal-note a:hover {
  color: var(--blue);
}

.footer-contact {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  font-size: 0.85rem;
  margin: 0.35rem 0 0;
}

@media (min-width: 780px) {
  .policy-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* ============================================================
   Legal / info pages (contact, refunds, terms)
   ============================================================ */
.legal-page {
  max-width: 760px;
  margin: 0 auto;
  padding: 2.5rem 1.5rem 4rem;
}

.legal-page h1 {
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  margin-bottom: 0.6rem;
}

.legal-page h2 {
  text-align: left;
  font-size: 1.25rem;
  color: var(--ink-blue);
  margin-top: 2.6rem;
  margin-bottom: 0.6rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border);
}

.legal-page h3 {
  font-size: 1.02rem;
  color: var(--blue-dark);
  margin-top: 1.6rem;
  margin-bottom: 0.4rem;
}

.legal-page p,
.legal-page li {
  color: var(--charcoal-soft);
  font-size: 0.97rem;
}

.legal-page ul {
  padding-left: 1.25rem;
  margin-bottom: 1.1rem;
}

.legal-page li {
  margin-bottom: 0.45rem;
}

.legal-page a {
  color: var(--blue-dark);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.legal-page a:hover {
  color: var(--blue);
}

.legal-lead {
  font-size: 1.08rem !important;
  color: var(--charcoal) !important;
  border-left: 3px solid var(--blue);
  padding-left: 1rem;
  margin-bottom: 2rem;
}

.legal-back {
  font-size: 0.9rem !important;
  margin-bottom: 1.5rem;
}

.legal-updated {
  margin-top: 3rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border);
  font-size: 0.86rem !important;
  font-style: italic;
}

/* Contact page blocks */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
  margin: 2rem 0 1rem;
}

.contact-block {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.4rem 1.5rem;
}

.contact-block h2 {
  margin-top: 0;
  border-bottom: none;
  padding-bottom: 0;
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--blue-dark);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-weight: 700;
}

.contact-primary {
  font-size: 1.06rem !important;
  font-weight: 600;
  color: var(--charcoal) !important;
  line-height: 1.5;
  margin-bottom: 0.6rem;
  word-break: break-word;
}

.footer-address {
  font-size: 0.8rem;
  margin: 0.3rem 0 0;
  color: var(--charcoal-soft);
}

@media (min-width: 720px) {
  .contact-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* ============================================================
   Brand refresh — Calivia Digital blue/grey, 2026-08-06
   ============================================================ */

/* Soft blue wash behind the hero, fading into the page surface */
.hero {
  background: radial-gradient(1100px 420px at 85% -10%, rgba(27, 117, 188, 0.08), transparent 60%);
}

/* Animated underline on nav links */
.nav-links a {
  position: relative;
  padding-bottom: 3px;
}

.nav-links a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 100%;
  bottom: 0;
  height: 2px;
  border-radius: 2px;
  background: var(--blue);
}

@media (prefers-reduced-motion: no-preference) {
  .nav-links a::after {
    transition: right 0.22s ease;
  }
}

.nav-links a:hover::after,
.nav-links a:focus-visible::after {
  right: 0;
}

/* Primary buttons gain depth on hover */
.btn-primary:hover {
  box-shadow: 0 6px 16px rgba(27, 117, 188, 0.28);
}

/* Ghost buttons pick up the brand blue instead of charcoal */
.btn-ghost {
  border-color: var(--ink-blue);
  color: var(--ink-blue);
}

.btn-ghost:hover {
  background: var(--ink-blue);
  color: #fff;
}

/* Legal-entity attribution line in footers */
.footer-legal {
  font-size: 0.78rem;
  color: var(--slate);
  margin: 0.15rem 0 0;
}
