/* ==========================================================================
   Blue Jug Alkaline Water & Health Market — Kyle, TX
   Mobile-first. Change the palette in :root and the whole site follows.
   ========================================================================== */

:root {
  /* Blues — full ramp. Swap for real brand colors once a logo exists. */
  --blue-950: #041e38;
  --blue-900: #072f52;
  --blue-800: #0b4f8a;
  --blue-700: #0e63ab;
  --blue-600: #1273c4;
  --blue-500: #2a90e0;
  --blue-400: #58aeee;
  --blue-300: #8fcbf5;
  --blue-200: #bfe1fa;
  --blue-100: #e3f0fb;
  --blue-50:  #f2f8fd;

  /* Aqua — the "water" hue */
  --aqua-700: #027d87;
  --aqua-600: #039aa6;
  --aqua-500: #00b8c4;
  --aqua-400: #22d3d9;
  --aqua-200: #a5eef2;
  --aqua-100: #d7f6f8;

  /* Mint — the "fresh / health market" hue */
  --mint-700: #0f8f5f;
  --mint-600: #14a86f;
  --mint-500: #22c58b;
  --mint-400: #4ade9f;
  --mint-200: #b6f2d6;
  --mint-100: #ddfaec;

  /* Sun — reserved for ratings and small highlights */
  --sun-600: #d98613;
  --sun-500: #f5a524;
  --sun-400: #fbbf4d;
  --sun-100: #fef2da;

  /* Text — blue-tinted rather than neutral gray, so type feels part of the palette */
  --ink:       #0d2b45;   /* headings: deep navy */
  --ink-body:  #33566e;   /* body copy: blue slate */
  --ink-soft:  #5b7d94;   /* secondary / captions */
  --line:      #cfe0ec;
  --bg:        #ffffff;
  --bg-alt:    var(--blue-50);

  --accent:   var(--blue-600);
  --accent-ink: #ffffff;

  --grad-deep:  linear-gradient(135deg, var(--blue-800), var(--blue-950));
  --grad-cta:   linear-gradient(135deg, var(--aqua-500), var(--blue-700));
  --grad-aqua:  linear-gradient(135deg, var(--aqua-500), var(--blue-600));
  --grad-mint:  linear-gradient(135deg, var(--mint-500), var(--aqua-500));
  --grad-sun:   linear-gradient(135deg, var(--sun-400), var(--sun-600));
  --grad-head:  linear-gradient(115deg, var(--blue-800) 10%, var(--aqua-500) 55%, var(--mint-500) 95%);

  --maxw: 1120px;
  --radius: 12px;
  --shadow: 0 1px 2px rgba(7, 47, 82, .06), 0 8px 24px rgba(7, 47, 82, .07);

  --step: clamp(3rem, 7vw, 5.5rem);
}

/* --------------------------------------------------------------- reset -- */
*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

/* Offset anchor targets so the sticky header doesn't cover headings */
:target { scroll-margin-top: 5.5rem; }
section[id] { scroll-margin-top: 4.5rem; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink-body);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
               "Helvetica Neue", Arial, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

img, iframe { max-width: 100%; }

h1, h2, h3 {
  line-height: 1.2; margin: 0 0 .5em;
  letter-spacing: -.025em; color: var(--ink);
}
h1 { font-size: clamp(2.1rem, 6vw, 3.4rem); font-weight: 800; }
h2 { font-size: clamp(1.6rem, 4vw, 2.3rem); font-weight: 800; }
h3 { font-size: 1.15rem; font-weight: 700; }
p  { margin: 0 0 1rem; }

strong { color: var(--ink); }

a { color: var(--aqua-700); font-weight: 500; }
a:hover { color: var(--blue-700); }

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

.visually-hidden {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.skip-link {
  position: absolute; left: -9999px;
  background: var(--blue-900); color: #fff;
  padding: .75rem 1.25rem; z-index: 200; border-radius: 0 0 var(--radius) 0;
}
.skip-link:focus { left: 0; top: 0; color: #fff; }

/* -------------------------------------------------------------- layout -- */
.wrap { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: 1.25rem; }
.wrap-narrow { max-width: 720px; }
.center { text-align: center; }

.section { padding-block: var(--step); position: relative; }

/* Each section carries its own hue via --hue, set per-section below. */
.section { --hue: var(--grad-aqua); }
#jugs   { --hue: var(--grad-mint); }
#reviews{ --hue: var(--grad-sun); }
#visit  { --hue: var(--grad-cta); }

.section-alt {
  background:
    radial-gradient(34rem 18rem at 88% 0%, rgba(34, 211, 217, .16), transparent 62%),
    radial-gradient(30rem 16rem at 4% 100%, rgba(34, 197, 139, .16), transparent 60%),
    linear-gradient(180deg, var(--blue-50), var(--aqua-100));
  border-block: 1px solid var(--aqua-200);
}

/* Reviews get the warm treatment so the page isn't wall-to-wall blue */
#reviews.section-alt {
  background:
    radial-gradient(32rem 18rem at 85% 2%, rgba(245, 165, 36, .16), transparent 62%),
    linear-gradient(180deg, var(--sun-100), var(--blue-50) 70%);
  border-block-color: #f3ddb4;
}

/* Accent rule under every section heading, colored by the section's hue */
.section h2::after {
  content: ""; display: block;
  width: 3.5rem; height: 5px; margin-top: .75rem;
  border-radius: 999px; background: var(--hue);
}
.center h2::after { margin-inline: auto; }

.section-lede {
  font-size: 1.125rem; color: var(--ink-soft);
  max-width: 60ch; margin-bottom: 2.5rem;
}
.center .section-lede { margin-inline: auto; }

/* ========================================================== intro overlay ==
   "The jug fills." Timeline (total 2.5s):
     0.00-0.55  jug scales in
     0.30-1.85  water rises inside it, wave crests drifting
     0.85-1.75  name + subtitle rise
     1.95-2.50  iris closes on the jug, revealing the page
   Runs on CSS keyframes alone - if JS never loads, the overlay still clears.
   ========================================================================== */

.intro {
  position: fixed; inset: 0; z-index: 9999;
  display: grid; place-items: center;
  background:
    radial-gradient(30rem 22rem at 50% 42%, rgba(34, 211, 217, .30), transparent 68%),
    radial-gradient(26rem 20rem at 18% 88%, rgba(34, 197, 139, .26), transparent 66%),
    linear-gradient(150deg, var(--blue-800), var(--blue-950) 65%);
  clip-path: circle(150% at 50% 42%);
  animation: intro-iris .55s cubic-bezier(.65, 0, .35, 1) 1.95s forwards;
}

.intro-stage { position: relative; display: grid; place-items: center; text-align: center; }

.intro-jug {
  opacity: 0;
  animation: intro-jug-in .55s cubic-bezier(.2, .9, .3, 1.25) forwards;
  filter: drop-shadow(0 10px 30px rgba(0, 184, 196, .38));
}

/* The water column slides up from below the jug's base */
.intro-water {
  transform: translateY(150px);
  animation: intro-fill 1.55s cubic-bezier(.35, .1, .3, 1) .3s forwards;
}

/* Horizontal drift gives the surface its motion. Each path is far wider than
   the viewBox, so translating by one wavelength (120u) loops seamlessly. */
.intro-wave-front { animation: intro-wave-drift 2.1s linear 2; }
.intro-wave-back  { animation: intro-wave-drift 3.1s linear 1 reverse; }

.intro-name {
  margin: 1.15rem 0 .25rem; color: #fff;
  font-size: clamp(2.2rem, 8vw, 3.6rem); font-weight: 800; letter-spacing: -.03em;
  opacity: 0; animation: intro-rise .85s cubic-bezier(.2, .8, .3, 1) .85s forwards;
}

.intro-sub {
  margin: 0;
  background: linear-gradient(90deg, var(--mint-400), var(--aqua-400));
  -webkit-background-clip: text; background-clip: text; color: transparent;
  font-size: clamp(.72rem, 2.6vw, .92rem); font-weight: 700;
  text-transform: uppercase; letter-spacing: .24em;
  opacity: 0; animation: intro-rise .85s cubic-bezier(.2, .8, .3, 1) 1.02s forwards;
}

@keyframes intro-jug-in {
  0%   { opacity: 0; transform: scale(.72) translateY(14px); }
  100% { opacity: 1; transform: scale(1) translateY(0); }
}

@keyframes intro-fill {
  0%   { transform: translateY(150px); }
  100% { transform: translateY(-6px); }
}

@keyframes intro-wave-drift {
  0%   { transform: translateX(0); }
  100% { transform: translateX(120px); }
}

@keyframes intro-rise {
  0%   { opacity: 0; transform: translateY(1.1rem); }
  100% { opacity: 1; transform: translateY(0); }
}

@keyframes intro-iris {
  to { clip-path: circle(0% at 50% 42%); visibility: hidden; }
}

/* JS adds this to dismiss instantly (repeat visit, click, or key press) */
.intro.intro-done { display: none; }

/* -------------------------------------------------------------- header -- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255, 255, 255, .92);
  backdrop-filter: saturate(160%) blur(10px);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; min-height: 4rem;
}

.brand { display: flex; align-items: center; gap: .6rem; text-decoration: none; color: inherit; }

.brand-mark {
  width: 30px; height: 30px; flex: none; border-radius: 50% 50% 50% 8px;
  background: linear-gradient(160deg, var(--blue-600), var(--blue-900));
}

.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-text strong { font-size: 1.05rem; letter-spacing: -.01em; }
.brand-text span { font-size: .68rem; color: var(--ink-soft); text-transform: uppercase; letter-spacing: .06em; }

/* Mobile nav toggle — a 44px tap target with a CSS-drawn burger */
.nav-toggle {
  width: 44px; height: 44px; flex: none;
  display: grid; place-items: center;
  background: none; border: 1px solid var(--line); border-radius: 8px;
  cursor: pointer;
}
.nav-toggle-bar,
.nav-toggle-bar::before,
.nav-toggle-bar::after {
  display: block; width: 20px; height: 2px;
  background: var(--ink); border-radius: 2px;
  transition: transform .2s ease, background-color .2s ease;
}
.nav-toggle-bar { position: relative; }
.nav-toggle-bar::before, .nav-toggle-bar::after { content: ""; position: absolute; left: 0; }
.nav-toggle-bar::before { transform: translateY(-6px); }
.nav-toggle-bar::after  { transform: translateY(6px); }

.nav-toggle[aria-expanded="true"] .nav-toggle-bar { background: transparent; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar::before { transform: rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar::after  { transform: rotate(-45deg); }

.site-nav {
  display: none;
  position: absolute; inset: 100% 0 auto 0;
  background: #fff; border-bottom: 1px solid var(--line);
  padding: 1rem 1.25rem 1.5rem;
  box-shadow: var(--shadow);
}
.site-nav.is-open { display: block; }

.site-nav ul { list-style: none; margin: 0 0 1rem; padding: 0; }
.site-nav li + li { border-top: 1px solid var(--line); }
.site-nav a {
  display: block; padding: .8rem .25rem;
  text-decoration: none; font-weight: 600; color: var(--ink);
}
.header-call { width: 100%; justify-content: center; }

/* ------------------------------------------------------------- buttons -- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  min-height: 44px; padding: .75rem 1.4rem;
  border-radius: 999px; border: 2px solid transparent;
  font-weight: 700; font-size: 1rem; text-decoration: none;
  cursor: pointer; transition: transform .12s ease, background-color .12s ease;
}
.btn:active { transform: translateY(1px); }

.btn-primary {
  background: var(--grad-cta); color: var(--accent-ink);
  box-shadow: 0 4px 14px rgba(11, 79, 138, .3);
}
.btn-primary:hover {
  background: linear-gradient(135deg, var(--blue-500), var(--blue-700));
  color: #fff; box-shadow: 0 6px 20px rgba(11, 79, 138, .38);
}

.btn-ghost {
  border-color: var(--blue-600); color: var(--blue-800);
  background: rgba(255, 255, 255, .7);
}
.btn-ghost:hover { background: var(--blue-100); color: var(--blue-900); border-color: var(--blue-800); }

.btn-lg { font-size: 1.0625rem; padding: .95rem 1.8rem; }
.btn-sm { font-size: .95rem; padding: .6rem 1.1rem; min-height: 40px; }

/* ---------------------------------------------------------------- hero -- */
.hero {
  position: relative;
  background:
    radial-gradient(34rem 20rem at 84% -10%, rgba(34, 211, 217, .42), transparent 64%),
    radial-gradient(30rem 20rem at 96% 42%, rgba(34, 197, 139, .30), transparent 60%),
    radial-gradient(42rem 24rem at 2% 96%, rgba(88, 174, 238, .38), transparent 62%),
    radial-gradient(26rem 16rem at 32% 8%, rgba(245, 165, 36, .16), transparent 58%),
    linear-gradient(165deg, var(--blue-100) 0%, var(--aqua-100) 40%, var(--bg) 100%);
  padding-block: clamp(3.5rem, 9vw, 7rem) clamp(5rem, 11vw, 9rem);
  overflow: hidden;
}

/* Wave divider into the white section below. Fill is white to match. */
.hero::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -1px;
  height: clamp(38px, 6vw, 72px);
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 80' preserveAspectRatio='none'%3E%3Cpath d='M0,44 C220,84 430,6 720,32 C1010,58 1230,12 1440,40 L1440,80 L0,80 Z' fill='%23ffffff'/%3E%3C/svg%3E") no-repeat center / 100% 100%;
}

.hero-inner { max-width: 780px; position: relative; z-index: 1; }

.eyebrow {
  display: inline-block;
  text-transform: uppercase; letter-spacing: .09em;
  font-size: .78rem; font-weight: 800; color: var(--mint-700);
  margin-bottom: 1rem;
  padding: .35rem .9rem; border-radius: 999px;
  background: rgba(255, 255, 255, .82);
  border: 1px solid var(--mint-200);
  box-shadow: 0 2px 10px rgba(20, 168, 111, .14);
}

.hero h1 { color: var(--blue-950); }

/* Aqua-to-mint wash on the headline's second line */
.hero h1 .tint {
  background: var(--grad-head);
  -webkit-background-clip: text; background-clip: text;
  color: transparent;
}

.hero .lede { color: var(--ink-body); }
.hero-rating strong { color: var(--sun-600); }

.lede { font-size: 1.2rem; color: var(--ink-soft); max-width: 58ch; margin-bottom: 2rem; }

.cta-row { display: flex; flex-wrap: wrap; gap: .85rem; margin-bottom: 2rem; }

.hero-rating { display: flex; align-items: center; gap: .6rem; font-size: .98rem; color: var(--ink-soft); margin: 0; }
.stars { color: var(--sun-500); letter-spacing: .1em; text-shadow: 0 1px 2px rgba(217,134,19,.25); }

/* --------------------------------------------------------------- cards -- */
.cards { display: grid; gap: 1.25rem; }
@media (min-width: 700px) {
  .cards-2 { grid-template-columns: repeat(2, 1fr); }
  .cards-3 { grid-template-columns: repeat(3, 1fr); }
}

.card {
  position: relative; overflow: hidden;
  background: #fff; border: 1px solid var(--line);
  border-radius: var(--radius); padding: 1.6rem;
  box-shadow: var(--shadow);
  transition: transform .18s ease, box-shadow .18s ease;
}
/* Colored cap on each card, inheriting the section's hue */
.card::before {
  content: ""; position: absolute; inset: 0 0 auto 0; height: 5px;
  background: var(--hue);
}
/* Vary the cap within a row so a group of cards reads as a set, not a stripe */
.cards .card:nth-child(2)::before { filter: hue-rotate(-18deg) saturate(1.15); }
.cards .card:nth-child(3)::before { filter: hue-rotate(-36deg) saturate(1.25); }
.card:hover { transform: translateY(-3px); box-shadow: 0 2px 4px rgba(7,47,82,.07), 0 14px 34px rgba(7,47,82,.13); }
.card h3 { color: var(--blue-900); }
.note { color: var(--ink-soft); }
.card p:last-child { margin-bottom: 0; }

.card-accent {
  border-color: var(--blue-500);
  background: linear-gradient(180deg, var(--blue-50), #fff 55%);
}
.card-accent::before { background: linear-gradient(135deg, var(--blue-600), var(--blue-900)); height: 5px; }

.quote { display: flex; flex-direction: column; margin: 0; }
.quote p { font-size: 1.02rem; color: var(--ink); }
.quote footer {
  margin-top: auto; padding-top: .75rem;
  font-size: .9rem; color: var(--sun-600); font-weight: 700;
}

/* --------------------------------------------------------- scroll reveal --
   Only hidden when JS is present (`.js` set before first paint), so content is
   never permanently invisible if the script fails to load. */
.js .reveal { opacity: 0; transform: translateY(1.5rem); }
.js .reveal.is-visible {
  opacity: 1; transform: none;
  transition: opacity .6s ease, transform .6s cubic-bezier(.2, .8, .3, 1);
}
/* Stagger cards within a row */
.js .reveal:nth-child(2).is-visible { transition-delay: .09s; }
.js .reveal:nth-child(3).is-visible { transition-delay: .18s; }

.note { margin-top: 1.75rem; color: var(--ink-soft); font-size: 1rem; }

.callout {
  margin-top: 2rem; padding: 1.6rem;
  border-left: 4px solid var(--blue-600);
  background: #fff; border-radius: 0 var(--radius) var(--radius) 0;
}
.callout h3 { margin-top: 0; }
.callout p:last-child { margin-bottom: 0; }

/* --------------------------------------------------------------- visit -- */
.visit-grid { display: grid; gap: 2rem; }
@media (min-width: 860px) {
  .visit-grid { grid-template-columns: 1fr 1.2fr; align-items: start; }
}

.visit-details h3 {
  margin-top: 1.75rem; font-size: .78rem; text-transform: uppercase;
  letter-spacing: .1em; font-weight: 800; color: var(--aqua-700);
}
.visit-details h3:first-child { margin-top: 0; }

.phone-link {
  font-size: 1.55rem; font-weight: 800; text-decoration: none;
  background: var(--grad-cta); -webkit-background-clip: text; background-clip: text; color: transparent;
}

.hours { border-collapse: collapse; width: 100%; max-width: 22rem; }
.hours th, .hours td { padding: .55rem 0; text-align: left; border-bottom: 1px solid var(--aqua-200); font-weight: 400; }
.hours th { color: var(--ink); font-weight: 600; }
.hours td { text-align: right; font-variant-numeric: tabular-nums; }
.hours .closed { color: var(--ink-soft); font-style: italic; }

.visit-map {
  border-radius: var(--radius); overflow: hidden;
  border: 1px solid var(--line); box-shadow: var(--shadow);
  line-height: 0;
}
.visit-map iframe { width: 100%; height: 380px; }

/* -------------------------------------------------------------- footer -- */
.site-footer {
  position: relative;
  background: var(--grad-deep); color: #cfe2f2;
  padding-block: 3rem 2rem;
  /* Clear the fixed mobile call bar */
  padding-bottom: 6rem;
}
/* Aqua hairline across the top of the footer */
.site-footer::before {
  content: ""; position: absolute; inset: 0 0 auto 0; height: 3px;
  background: linear-gradient(90deg, var(--aqua-500), var(--blue-500), var(--aqua-500));
}
.site-footer a { color: #fff; }
.footer-inner p { margin: 0 0 .35rem; font-size: .95rem; }
.footer-brand { font-weight: 700; color: #fff; font-size: 1.05rem; margin-bottom: .6rem !important; }
.copyright { margin-top: 2rem !important; font-size: .85rem; color: #8fb4d4; }

/* ----------------------------------------------------- mobile call bar -- */
.call-bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 90;
  display: flex; align-items: center; justify-content: center; gap: .5rem;
  min-height: 56px; padding: 1rem;
  padding-bottom: calc(1rem + env(safe-area-inset-bottom));
  background: var(--grad-cta); color: #fff;
  font-weight: 700; font-size: 1.05rem; text-decoration: none;
  box-shadow: 0 -4px 16px rgba(7, 47, 82, .18);
}

/* ------------------------------------------------------------ desktop -- */
@media (min-width: 900px) {
  .nav-toggle { display: none; }

  .site-nav {
    display: flex; align-items: center; gap: 1.75rem;
    position: static; padding: 0; border: 0; box-shadow: none; background: none;
  }
  .site-nav ul { display: flex; gap: 1.5rem; margin: 0; }
  .site-nav li + li { border-top: 0; }
  .site-nav a { padding: .25rem 0; font-weight: 600; font-size: .97rem; }
  .site-nav a:hover { color: var(--blue-600); }

  .header-call { width: auto; }

  /* Desktop has the header call button, so the sticky bar is redundant */
  .call-bar { display: none; }
  .site-footer { padding-bottom: 2rem; }
}

/* ------------------------------------------------------------- motion -- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
  /* No opening animation at all — go straight to the page. */
  .intro { display: none !important; }
  /* Never leave reveal content stranded at opacity 0. */
  .js .reveal { opacity: 1 !important; transform: none !important; }
}

/* --------------------------------------------------------------- print -- */
@media print {
  .site-header, .call-bar, .visit-map, .nav-toggle { display: none !important; }
  body { font-size: 12pt; }
}
