/* ==========================================================================
   Avoca Spring Water — Design Tokens
   ========================================================================== */
:root {
  --spring-deep:   #0076c0; /* true brand blue, from the logo */
  --spring-ink-bg: #073A5C; /* darker anchor behind the wave layers, for contrast at the top of the hero */
  --spring-teal:   #0076c0;
  --spring-teal-light: #649ed5;
  --wave-front:    #0076c0;
  --wave-mid:      #649ed5;
  --wave-back:     #4692cf;
  --spring-mist:   #EBF2F7; /* pale cool background, not cream */
  --spring-foam:   #FFFFFF;
  --mineral-clay:  #B98D62; /* limestone accent, used sparingly (CTA) */
  --mineral-clay-dark: #97703E;
  --ink:           #142023;
  --ink-soft:      #3C5257;
  --line:          rgba(20, 32, 35, 0.12);

  --font-display: 'Fraunces', Georgia, serif;
  --font-body:    'Inter', -apple-system, Segoe UI, sans-serif;
  --font-mono:    'IBM Plex Mono', ui-monospace, monospace;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--spring-foam);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* Any real <img> dropped into content gets this by default — no inline
   style attribute needed. More specific rules elsewhere (logo, waves,
   placeholder boxes below) override it where a different fit is wanted. */
img {
  max-width: 100%;
  height: auto;
  display: block;
}

h1, h2, h3, .display {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--spring-deep);
}

a { color: var(--spring-teal); text-decoration: none; }
a:hover { color: var(--mineral-clay-dark); }

.mono-label {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--spring-teal-light);
}

/* Visible keyboard focus everywhere */
a:focus-visible, button:focus-visible {
  outline: 3px solid var(--mineral-clay);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

/* ==========================================================================
   Header
   ========================================================================== */
.site-header {
  background: var(--spring-foam);
  border-bottom: 1px solid var(--line);
  padding: 0.9rem 0;
  position: sticky;
  top: 0;
  z-index: 50;
}
.site-header .navbar-brand img,
.site-header .navbar-brand svg { height: 40px; width: auto; }
.site-header .nav-link {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-soft);
  padding: 0.5rem 1rem !important;
}
.site-header .nav-link:hover,
.site-header .nav-link.active { color: var(--spring-teal); }
.site-header .call-cta {
  font-family: var(--font-mono);
  font-weight: 600;
  color: var(--spring-deep);
  border: 1px solid var(--spring-deep);
  border-radius: 999px;
  padding: 0.45rem 1.1rem !important;
  font-size: 0.82rem;
}
.site-header .call-cta:hover {
  background: var(--spring-deep);
  color: var(--spring-foam) !important;
}

/* ==========================================================================
   Hero
   ========================================================================== */
.hero {
  color: var(--spring-foam);
  position: relative;
  overflow: hidden;
  padding: 6rem 0 8rem;
}
.hero-inner {
  max-width: 640px;
  position: relative;
  z-index: 3;
}
.hero .container { position: relative; }
.hero .mono-label { color: rgba(255,255,255,0.85); }
.hero h1 {
  color: var(--spring-foam);
  font-size: clamp(2.4rem, 5vw, 3.6rem);
  line-height: 1.05;
  margin: 0.75rem 0 1.25rem;
}
.hero p.lead {
  color: rgba(255,255,255,0.9);
  font-size: 1.15rem;
  max-width: 46ch;
}
.hero-actions { margin-top: 2rem; display: flex; gap: 1rem; flex-wrap: wrap; }

.btn-clay {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  letter-spacing: 0.04em;
  background: var(--mineral-clay);
  color: var(--ink);
  border: none;
  border-radius: 999px;
  padding: 0.85rem 1.6rem;
  display: inline-block;
  font-weight: 600;
}
.btn-clay:hover { background: var(--mineral-clay-dark); color: var(--spring-foam); }

.btn-outline-foam {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--spring-foam);
  border: 1px solid rgba(255,255,255,0.6);
  border-radius: 999px;
  padding: 0.85rem 1.6rem;
  display: inline-block;
}
.btn-outline-foam:hover { border-color: var(--spring-foam); color: var(--spring-foam); background: rgba(255,255,255,0.12); }

/* the waves — sit behind the content, blended, and drift at real, uneven,
   wave-like speed. Each layer's own artwork is drawn well past its own
   viewBox on purpose (baked into the vector, not created by CSS scaling),
   and we size + center it past the hero's edges again on top of that — so
   the oscillation below never has a hard edge anywhere near the viewport. */
.hero-waves {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  overflow: hidden;
  isolation: isolate; /* contain the blend-mode compositing to this stack */
}
.wave-layer {
  position: absolute;
  top: -14%;
  left: 50%;
  height: 145%;
  width: auto;
  min-width: 180vw;
}
.wave-layer img,
.wave-layer svg { height: 100%; width: auto; display: block; }

.wave-back  { animation: drift-back 15s ease-in-out infinite; }
.wave-mid   { animation: drift-mid 11s ease-in-out infinite; animation-delay: -4s; }
.wave-front { animation: drift-front 8s ease-in-out infinite; animation-delay: -2s; }

@keyframes drift-back {
  0%   { transform: translate(-50%, 0) translateX(0%); }
  22%  { transform: translate(-50%, 0) translateX(-5.5%); }
  50%  { transform: translate(-50%, 0) translateX(-2%); }
  78%  { transform: translate(-50%, 0) translateX(-7%); }
  100% { transform: translate(-50%, 0) translateX(0%); }
}
@keyframes drift-mid {
  0%   { transform: translate(-50%, 0) translateX(0%); }
  30%  { transform: translate(-50%, 0) translateX(6.5%); }
  55%  { transform: translate(-50%, 0) translateX(2%); }
  80%  { transform: translate(-50%, 0) translateX(-5%); }
  100% { transform: translate(-50%, 0) translateX(0%); }
}
@keyframes drift-front {
  0%   { transform: translate(-50%, 0) translateX(0%); }
  20%  { transform: translate(-50%, 0) translateX(-6%); }
  48%  { transform: translate(-50%, 0) translateX(3%); }
  75%  { transform: translate(-50%, 0) translateX(6%); }
  100% { transform: translate(-50%, 0) translateX(0%); }
}

/* stat ticker strip under hero */
.stat-strip {
  background: color-mix(in srgb, var(--spring-teal) 80%, transparent);
  mix-blend-mode: multiply;
  color: var(--spring-foam);
}
.stat-strip .row { padding: 0.9rem 0; }
.stat-strip .stat {
  font-family: var(--font-mono);
  text-align: center;
  border-left: 1px solid rgba(255,255,255,0.25);
}
.stat-strip .stat:first-child { border-left: none; }
.stat-strip .stat .stat-label {
  display: block;
  font-variant-caps: all-small-caps;
  letter-spacing: 0.08em;
  font-size: 0.95rem;
  color: rgba(255,255,255,0.75);
  margin-bottom: 0.15rem;
}
.stat-strip .stat strong {
  display: block;
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--spring-foam);
}

/* ==========================================================================
   Section rhythm
   ========================================================================== */
section.block { padding: 5rem 0; }
.bg-mist { background: var(--spring-mist); }

.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--mineral-clay-dark);
  margin-bottom: 0.75rem;
  display: block;
}

.section-title { font-size: clamp(1.7rem, 3vw, 2.3rem); margin-bottom: 1.1rem; }

.ripple-rule {
  width: 100%;
  height: auto;
  opacity: 0.35;
  display: block;
  margin: 0;
}

.card-plain {
  background: var(--spring-foam);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 2rem;
  height: 100%;
}
.card-plain h3 { font-size: 1.2rem; margin-bottom: 0.6rem; }
.card-plain p { color: var(--ink-soft); margin-bottom: 0; }

/* Delivery / CTA band */
.cta-band {
  background: var(--spring-deep);
  color: var(--spring-foam);
  text-align: center;
  padding: 4.5rem 0;
}
.cta-band h2 { color: var(--spring-foam); }
.cta-band .phone-link {
  font-family: var(--font-mono);
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  color: var(--spring-foam);
  font-weight: 600;
  display: inline-block;
  margin: 1rem 0 0.5rem;
  border-bottom: 2px solid var(--mineral-clay);
}
.cta-band .phone-link:hover { color: var(--mineral-clay); }

/* ==========================================================================
   Utility / inner pages (FAQ, Contact, Legal & Privacy, and similar)
   ========================================================================== */
.page-header {
  background: var(--spring-mist);
  padding: 3.5rem 0 2.5rem;
  border-bottom: 1px solid var(--line);
}
.page-header h1 { margin: 0.4rem 0 0.5rem; font-size: clamp(2rem, 4vw, 2.6rem); }
.page-header p.lead { color: var(--ink-soft); max-width: 60ch; margin: 0; }

.prose { max-width: 70ch; }
.prose p { margin-bottom: 1.1rem; }
.prose h2.mono-label { font-size: 0.8rem; margin-top: 2.4rem; margin-bottom: 0.9rem; color: var(--mineral-clay-dark); }
.prose h2.mono-label:first-child { margin-top: 0; }

/* Fixed-height product photography — bottle renders, packaging shots, etc.
   with a transparent background. Deliberately NOT object-fit: cover (that
   crops to a box); this just scales the whole image, transparency intact,
   to a set height. width:auto keeps the aspect ratio; the global img rule's
   max-width:100% still applies underneath this, so on a narrow viewport
   where a tall size would overflow the column, the browser scales the
   whole image down proportionally instead of letting it run wide.

   Base class sets the shape (width:auto, display:block) and a sensible
   default height. Add a size modifier alongside it to pick a specific
   size: class="product-shot product-shot--sm" */
.product-shot {
  height: 300px; /* same as --med below, if no size modifier is added */
  width: auto;
  display: block;
}
.product-shot--xxs { height: 120px; }
.product-shot--xs  { height: 160px; }
.product-shot--sm  { height: 220px; }
.product-shot--med { height: 300px; }
.product-shot--lrg { height: 400px; }
.product-shot--xl  { height: 550px; }
.product-shot--xxl { height: 720px; }

/* Image / map placeholders — swap for real photography and a real map
   embed later; the labels describe what should go in each slot. */
.img-placeholder {
  background: var(--spring-mist);
  border: 1px dashed var(--line);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: var(--ink-soft);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.03em;
  line-height: 1.4;
  padding: 1.25rem;
  width: 100%;
  /* Fills a definite parent height when one exists — e.g. a Bootstrap
     row's default column-stretch behavior (delivery.php, products.php).
     A percentage height only resolves when the parent has a definite
     height, so this is a no-op (falls back to aspect-ratio below) in
     standalone contexts like the map placeholders, or rows that opt out
     of stretch with align-items-center/align-items-start (the_spring.php). */
  height: 100%;
}
.img-placeholder.ratio-vertical   { aspect-ratio: 3 / 4; }
.img-placeholder.ratio-horizontal { aspect-ratio: 16 / 9; }
.img-placeholder.ratio-square     { aspect-ratio: 1 / 1; }

/* Once a real photo replaces the placeholder label, drop the padding/
   flex-centering meant for text and let the image fill the box exactly,
   clipped to the same rounded corners. No inline style attribute needed —
   just put the <img> inside the existing .img-placeholder / .map-placeholder
   div and remove the label text. */
.img-placeholder:has(img) {
  padding: 0;
  overflow: hidden;
  border-style: solid;
}
.img-placeholder img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.map-placeholder {
  aspect-ratio: 21 / 9;
  min-height: 220px;
}

/* FAQ accordion — retheme Bootstrap's default to match the brand */
.accordion-item {
  border: 1px solid var(--line);
  border-radius: 6px !important;
  margin-bottom: 0.75rem;
  overflow: hidden;
}
.accordion-button {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.05rem;
  color: var(--spring-deep);
  background: var(--spring-foam);
}
.accordion-button:not(.collapsed) {
  color: var(--spring-deep);
  background: var(--spring-mist);
  box-shadow: none;
}
.accordion-button:focus {
  box-shadow: none;
  outline: 3px solid var(--mineral-clay);
  outline-offset: -3px;
}
.accordion-button::after { filter: none; }
.accordion-body { color: var(--ink-soft); }
.accordion-body a { font-weight: 600; }

/* Contact page — quick-contact card */
.contact-card {
  background: var(--spring-foam);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 2rem;
  height: 100%;
}
.contact-card .mono-label { display: block; margin-bottom: 0.5rem; }
.contact-method {
  font-family: var(--font-mono);
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--spring-deep);
  display: block;
  margin-bottom: 1.5rem;
}
.contact-card p:last-child .contact-method,
.contact-method:last-child { margin-bottom: 0; }

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer {
  background: var(--ink);
  color: rgba(255,255,255,0.7);
  padding: 3rem 0 1.5rem;
  font-size: 0.92rem;
}
.site-footer .footer-brand img,
.site-footer .footer-brand svg { height: 32px; margin-bottom: 1rem; }
.site-footer a { color: rgba(255,255,255,0.85); }
.site-footer a:hover { color: var(--spring-teal-light); }
.site-footer h4 {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.5);
  margin-bottom: 1rem;
}
.site-footer .footer-legal {
  border-top: 1px solid rgba(255,255,255,0.12);
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  font-size: 0.8rem;
  color: rgba(255,255,255,0.45);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
}

/* sub-footer — a slim, quiet band for the hosting credit. Deliberately no
   border between this and the footer above; the color step down is what
   separates them. */
.sub-footer {
  background: #0A0E11; /* a shade darker than --ink, so it reads as a distinct, lower band */
  padding: 0.7rem 0;
}
.sub-footer p {
  margin: 0;
  text-align: left;
  font-family: var(--font-mono);
  font-variant-caps: all-small-caps;
  letter-spacing: 0.1em;
  font-size: 0.85rem;
  color: rgba(255,255,255,0.4);
}
.sub-footer a {
  color: rgba(255,255,255,0.62);
}
.sub-footer a:hover { color: var(--spring-teal-light); }

@media (max-width: 767px) {
  .stat-strip .stat { border-left: none; margin-bottom: 0.6rem; }
  .cta-band .phone-link { font-size: 1.7rem; }
}
