/* ============ MASCOT HERO ============
   The hero takes on the original MK9 badge: its dusty blue paper ground,
   navy ring, flag disc and gold lettering. The dog is a separate layer
   drawn in WebGL so it can look around and blink in front of the badge. */
.mhero {
  --mh-bg: #0a1626;        /* site navy */
  --mh-bg-hi: #0e2038;
  --mh-navy: #ffffff;      /* headline + outlines: white on navy */
  --mh-ink: #ffffff;
  --mh-text: #d5deea;
  --mh-gold: #fddc6c;      /* logo lettering, sampled from the new logo */
  --mh-cream: #f4ecd6;
  position: relative; overflow: hidden;
  background:
    var(--mh-bg);
  color: var(--mh-ink);
}
/* paper grain, like the printed logo */
.mhero::before {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .12; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .2 0 0 0 0 .25 0 0 0 0 .3 0 0 0 .9 0'/%3E%3C/filter%3E%3Crect width='240' height='240' filter='url(%23n)'/%3E%3C/svg%3E");
}
.mhero__inner {
  position: relative;
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.02fr);
  align-items: center; gap: clamp(1.5rem, 4vw, 3.5rem);
  padding-block: clamp(2.5rem, 6vh, 4.5rem) clamp(2.5rem, 6vh, 4rem);
}
.mhero .eyebrow { color: #cdd8e8; }
.mhero .eyebrow__dot { box-shadow: 0 0 0 4px rgba(200, 16, 46, .25); }
.mhero__content { text-shadow: 0 2px 18px rgba(4, 12, 24, .55); }
.mhero__title {
  font-family: 'Anton', sans-serif; font-weight: 400; text-transform: uppercase;
  font-size: clamp(2.7rem, 5.6vw, 5rem); line-height: 1; letter-spacing: .5px;
  margin: 1.1rem 0 1.3rem; text-wrap: balance; color: var(--mh-navy);
}
.mhero__title .red-text { color: var(--red); }
.mhero__sub { font-size: 1.1rem; line-height: 1.65; color: var(--mh-text); max-width: 520px; margin-bottom: 1.9rem; }
.mhero__sub strong { color: var(--mh-ink); }
.mhero__cta { display: flex; gap: .8rem; flex-wrap: wrap; margin-bottom: 1.9rem; }
.mhero .btn--ghost { background: transparent; color: var(--mh-navy); border-color: var(--mh-navy); backdrop-filter: none; }
.mhero .btn--ghost:hover { background: #fff; color: var(--navy-800); }
.mhero__trust { display: flex; flex-direction: column; gap: .55rem; }
.mhero__trust li { display: flex; align-items: center; gap: .6rem; color: var(--mh-text); font-size: .96rem; }
.mhero__trust svg { color: var(--red); flex: none; }
.mhero__trust em { color: var(--mh-ink); font-weight: 600; }
.mhero__where { margin-top: 1.6rem; font-family: 'Oswald', sans-serif; letter-spacing: .1em; text-transform: uppercase; font-size: .85rem; color: var(--mh-navy); }
.mhero__where a { color: inherit; border-bottom: 1px solid currentColor; }

/* ---- badge + dog stage ---- */
.mascot { position: relative; width: 100%; max-width: min(620px, calc(100svh - 150px)); min-width: min(100%, 360px); aspect-ratio: 1; justify-self: end; }
.badge { position: absolute; inset: 0; width: 100%; height: 100%; filter: drop-shadow(0 28px 50px rgba(0, 0, 0, .55)); transition: transform .2s linear; }
.badge__mk9 { font-family: 'Lilita One', 'Anton', sans-serif; font-size: 150px; letter-spacing: 6px; fill: var(--mh-gold); }
.badge__usmc { font-family: 'Lilita One', 'Anton', sans-serif; font-size: 66px; letter-spacing: 3px; fill: var(--mh-gold); }

/* the dog layer: its box is padded 8% on every side so head movement never clips */
.mascot__dog { position: absolute; left: 22.74%; top: 26.3%;  width: 59.5%; height: 59.5%; pointer-events: none; }
.mascot__dog > img { position: absolute; inset: 8%; width: 84%; height: 84%; transition: opacity .15s linear; }
.mascot__dog > canvas { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; transition: opacity .25s ease .1s; }
.mascot.is-live .mascot__dog > canvas { opacity: 1; }
.mascot.is-live .mascot__dog > img { opacity: 0; }


@media (max-width: 980px) {
  .mhero__inner { grid-template-columns: minmax(0, 1fr); }
  .mhero__inner > * { min-width: 0; }
  .mascot { justify-self: center; max-width: 460px; order: -1; }   /* phones: Cali first, the headline below her */
}

/* ---- still American flag filling the hero background ---- */
/* the whole flag at its true 19:10 shape, anchored right and fading into the navy
   on its left edge, so the star field sits mid hero instead of owning the screen */
.mhero__flag {
  position: absolute; z-index: 0; pointer-events: none;
  right: 0; top: 50%; width: min(82%, 1250px); height: auto; aspect-ratio: 19 / 10;
  transform: translateY(-50%);
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 26%), linear-gradient(180deg, transparent 0%, #000 8%, #000 92%, transparent 100%);
  -webkit-mask-composite: source-in;
          mask-image: linear-gradient(90deg, transparent 0%, #000 26%), linear-gradient(180deg, transparent 0%, #000 8%, #000 92%, transparent 100%);
          mask-composite: intersect;
}
@media (max-width: 980px) {
  /* phones: the whole flag at its original phone size (190% wide, true 19:10 shape),
     centered on the badge both ways, with a soft fade top and bottom */
  .mhero { --mh-badge: min(460px, 92vw); --mh-pad: clamp(2.5rem, 6vh, 4.5rem); }
  .mhero__flag { width: min(190%, 1000px); height: auto; left: 50%; right: auto; bottom: auto;
    top: calc(var(--mh-pad) + var(--mh-badge) / 2); transform: translate(-50%, -50%);
    -webkit-mask-image: linear-gradient(180deg, transparent 0%, #000 10%, #000 90%, transparent 100%);
            mask-image: linear-gradient(180deg, transparent 0%, #000 10%, #000 90%, transparent 100%); }
}
.mhero::before { z-index: 1; }
/* dusty blue wash from the logo: strong behind the copy, lighter behind the badge */
.mhero::after {
  content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background:
    radial-gradient(55% 70% at 22% 52%, rgba(7,16,30,.55) 0%, rgba(7,16,30,0) 100%),
    linear-gradient(90deg, rgba(7,16,30,.5) 0%, rgba(7,16,30,.35) 45%, rgba(10,22,38,.15) 70%, rgba(10,22,38,.08) 100%),
    linear-gradient(180deg, rgba(7,16,30,0) 70%, rgba(7,16,30,.6) 100%);
}
.mhero__inner { z-index: 2; }
@media (max-width: 980px) {
  .mhero::after { background: linear-gradient(180deg, rgba(10,22,38,.12) 0%, rgba(10,22,38,.18) 40%, rgba(7,16,30,.62) 62%, rgba(7,16,30,.7) 100%); }
}

/* ============ CORNER COMPANION ============
   A small version of the mascot fixed bottom left on every page position.
   Navy disc with a gold ring like the badge; the head rises above the disc
   so it reads as a sticker rather than a cropped photo. Never takes input. */
.k9-corner {
  --k9: 76px;                                   /* disc diameter */
  position: fixed; z-index: 80; pointer-events: none;
  left: calc(18px + env(safe-area-inset-left, 0px));
  bottom: calc(18px + env(safe-area-inset-bottom, 0px));
  width: var(--k9); height: calc(var(--k9) * 1.16);
  opacity: 0; transform: translateY(12px) scale(.92); transform-origin: 50% 100%;
  transition: opacity .45s ease, transform .45s cubic-bezier(.22, 1, .36, 1), bottom .4s cubic-bezier(.22, 1, .36, 1);
}
.k9-corner.is-live { opacity: 1; transform: none; }
.k9-corner__disc {
  position: absolute; left: 0; bottom: 0; width: var(--k9); height: var(--k9); border-radius: 50%;
  background: radial-gradient(circle at 50% 30%, #154a66 0%, #0b3550 55%, #062638 100%);
  box-shadow: inset 0 0 0 2px rgba(243, 216, 124, .9), inset 0 0 0 5px rgba(6, 38, 56, .9), 0 10px 26px -6px rgba(0, 0, 0, .45);
}
.k9-corner__dog {
  position: absolute; bottom: 0; left: calc(var(--k9) * -0.07);
  width: calc(var(--k9) * 1.14); height: calc(var(--k9) * 1.14);
  /* below the disc's middle the dog is cut to the disc; above it the head is free */
  -webkit-mask-image: radial-gradient(circle calc(var(--k9) / 2 - 2px) at 50% calc(100% - var(--k9) / 2), #000 98%, transparent 100%), linear-gradient(#000, #000);
  -webkit-mask-size: 100% 100%, 100% 58%; -webkit-mask-repeat: no-repeat; -webkit-mask-position: 0 0, 0 0;
          mask-image: radial-gradient(circle calc(var(--k9) / 2 - 2px) at 50% calc(100% - var(--k9) / 2), #000 98%, transparent 100%), linear-gradient(#000, #000);
          mask-size: 100% 100%, 100% 58%; mask-repeat: no-repeat; mask-position: 0 0, 0 0;
  filter: drop-shadow(0 3px 4px rgba(0, 0, 0, .3));
}
@media (max-width: 980px) {
  .k9-corner { --k9: 52px; left: calc(12px + env(safe-area-inset-left, 0px)); bottom: calc(14px + env(safe-area-inset-bottom, 0px)); }
  /* step up out of the way when the sticky booking button slides in */
  .sticky-cta.show ~ .k9-corner { bottom: calc(84px + env(safe-area-inset-bottom, 0px)); }
}
.k9-corner > img { display: none !important; }        /* texture source only; the site styles would otherwise show it */
@media print { .k9-corner { display: none; } }

/* "Woof!" speech bubble above the corner dog */
.k9-corner__woof {
  position: absolute; left: 58%; bottom: calc(100% + 2px);
  padding: .32em .7em .26em; border-radius: 12px 12px 12px 3px;
  background: #fff; color: #0a1626; border: 2px solid #f3d87c;
  font-family: 'Lilita One', 'Anton', sans-serif; font-size: 15px; line-height: 1; letter-spacing: .03em; white-space: nowrap;
  box-shadow: 0 8px 18px -6px rgba(0, 0, 0, .45);
  transform-origin: 0 100%; opacity: 0; transform: translateY(6px) scale(.4);
  transition: opacity .18s ease, transform .4s cubic-bezier(.3, 1.6, .5, 1);
}
.k9-corner__woof::after {                       /* tail, pointing down at his head */
  content: ""; position: absolute; left: -2px; bottom: -8px; width: 12px; height: 10px;
  background: #fff; border-left: 2px solid #f3d87c; border-bottom: 2px solid #f3d87c;
  clip-path: polygon(0 0, 100% 0, 0 100%); border-bottom-left-radius: 2px;
}
.k9-corner__woof.is-on { opacity: 1; transform: none; }
@media (max-width: 980px) { .k9-corner__woof { font-size: 13px; } }
@media (prefers-reduced-motion: reduce) { .k9-corner__woof { transition: none; } }

/* "Hello, I'm Cali!" speech bubble right above the dog's right ear, tail pointing down at it, clear of the Eagle, Globe and Anchor */
.mascot__hello {
  position: absolute; z-index: 3; left: 69%; bottom: 66%; pointer-events: none;
  padding: .4em .85em .32em; border-radius: 16px 16px 16px 4px;
  background: #fff; color: #0a1626; border: 3px solid #f3d87c;
  font-family: 'Lilita One', 'Anton', sans-serif; font-size: clamp(17px, 1.7vw, 24px); line-height: 1; letter-spacing: .03em; white-space: nowrap;
  text-shadow: none; box-shadow: 0 12px 26px -8px rgba(0, 0, 0, .5);
  transform-origin: 0 100%;
  animation: mascot-hello .5s cubic-bezier(.3, 1.6, .5, 1) .9s both;
}
.mascot__hello::after {                         /* tail, pointing down left at her head */
  content: ""; position: absolute; left: -3px; bottom: -11px; width: 16px; height: 13px;
  background: #fff; border-left: 3px solid #f3d87c; border-bottom: 3px solid #f3d87c;
  clip-path: polygon(0 0, 100% 0, 0 100%); border-bottom-left-radius: 3px;
}
@keyframes mascot-hello { from { opacity: 0; transform: translateY(8px) scale(.4); } to { opacity: 1; transform: none; } }
@media (max-width: 980px) { .mascot__hello { left: 69%; bottom: 66%; padding: .38em .7em .3em; font-size: clamp(11px, 3.1vw, 16px); } }
@media (prefers-reduced-motion: reduce) { .mascot__hello { animation: none; } }
