/* =========================================================================
   Maxonix — Vacation Landing Page (Version 2: "Postmark" — elevated concept)

   Design direction: the brand's own story — the workshop is too hot in a
   Florida August, so the shop is closed — is treated as a hand-stamped
   postcard rather than a generic hero section. The existing "Patented /
   Made in USA" stamp graphic becomes part of that motif instead of sitting
   apart from the design. A single signature element (the rotating sun
   postmark) carries the concept; everything else stays quiet.

   Modern CSS: Grid with named-area layout, custom properties, clamp() fluid
   type, color-mix(), SVG <textPath> for the circular badge copy, and a
   slow ambient CSS animation on the sun rays (paused for reduced motion).
   Target browsers: current Chrome, Firefox, Safari (desktop + iOS), Edge,
   Opera — released within the last 4 months.
   ========================================================================= */

/* ---------- Design tokens ---------- */
:root {
  /* Palette — cream paper + brand blue (from the logo) + a warm sun amber,
     deliberately not the near-terracotta tone that reads as an AI default */
  --color-bg:        #f6f1e6;
  --color-bg-deep:   #efe7d6;
  --color-font:      #46424f;
  --color-title:     #3f527c;
  --color-ink:       #2d2a3a;
  --color-card-bg:   #ededed;
  --color-menu-bg:   #e6e5f7;
  --color-menu-font: #498ae6;
  --color-amber:     #d97f2b;
  --color-amber-deep:#b5651d;
  --color-teal:      #1f6f6b;
  --color-footer-bg: #4c4b52; /* ~15% lighter than the original #2c2b33 */
  --color-footer-font:#f1f0fa;

  --font-body: 'Google Sans', system-ui, -apple-system, sans-serif;
  --font-display: 'Amaranth', var(--font-body);
  --font-stamp: 'Alfa Slab One', var(--font-display);
  --font-vacation: 'La Belle Aurore', var(--font-display);

  --page-max-width: 78rem;
  --gutter: clamp(1.25rem, 4vw, 3.5rem);
  --menu-height: clamp(4rem, 8vw, 5.5rem);

  --transition-fast: 180ms ease;
  --transition-medium: 320ms cubic-bezier(0.22, 0.61, 0.36, 1);
}

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

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

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

body {
  margin: 0;
  min-height: 100svh;
  background:
    radial-gradient(120% 90% at 15% 0%, var(--color-bg-deep), transparent 60%),
    var(--color-bg);
  color: var(--color-font);
  font-family: var(--font-body);
  line-height: 1.6;
  display: grid;
  grid-template-rows: auto 1fr auto;
  position: relative;
}

img { max-width: 100%; display: block; }

/* ---------- Watermark ---------- */
.watermark {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  pointer-events: none;
  z-index: 0;
  padding-inline: clamp(1rem, 6vw, 6rem);
}
.watermark img {
  width: min(112%, 1400px);
  opacity: 0.06;
}

/* ---------- Menu bar ---------- */
.menu-bar {
  position: relative;
  z-index: 2;
  background: var(--color-menu-bg);
  color: var(--color-menu-font);
  min-height: var(--menu-height);
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  padding-inline: var(--gutter);
  gap: 1rem;
}
.menu-bar__left { display: flex; align-items: center; gap: 0.75rem; justify-self: start; }
.menu-bar__right { justify-self: end; }
.logo { height: clamp(1.75rem, 4vw, 2.5rem); width: auto; }
.logo--symbol { height: clamp(1.5rem, 3.4vw, 2.1rem); }
.logo--nospike { height: clamp(1.33rem, 3.04vw, 1.9rem); } /* 5% smaller than original */

/* ---------- Postcard hero layout ---------- */
.postcard {
  position: relative;
  z-index: 1;
  max-width: var(--page-max-width);
  margin-inline: auto;
  padding: clamp(2rem, 5vw, 4.5rem) var(--gutter);
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) auto minmax(0, 1.15fr);
  align-items: center;
  gap: clamp(1.5rem, 4vw, 3rem);
}

@media (max-width: 860px) {
  .postcard {
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
  }
}

/* ---------- Signature element: the postmark badge ---------- */
.postcard__stamp-panel { position: relative; z-index: 2; display: grid; place-items: center; }

.postmark {
  position: relative;
  width: min(78vw, 22rem);
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  transform: rotate(-6deg);
  animation: postmark-in 700ms cubic-bezier(0.22, 0.61, 0.36, 1) both;
}

@keyframes postmark-in {
  from { opacity: 0; transform: rotate(-6deg) translateY(14px) scale(0.96); }
  to   { opacity: 1; transform: rotate(-6deg) translateY(0) scale(1); }
}

.postmark__rays {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  animation: rays-spin 90s linear infinite;
}
.postmark__rays path { fill: var(--color-amber); opacity: 0.55; }

@keyframes rays-spin {
  to { transform: rotate(360deg); }
}

.postmark__ring {
  position: absolute;
  inset: 8%;
}
.postmark__ring svg { width: 100%; height: 100%; }
.postmark__ring circle {
  fill: none;
  stroke: var(--color-ink);
  stroke-width: 3;
}

.postmark__center {
  position: relative;
  display: grid;
  justify-items: center;
  row-gap: 0.35rem;
  width: 62%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: color-mix(in srgb, var(--color-bg) 88%, white);
  align-content: center;
  padding: 1rem;
  text-align: center;
}
/* SVG stroke-dasharray instead of CSS `border: dashed` — every browser renders
   border-dashed differently (dash/gap length isn't controllable), this renders
   identically everywhere with the longer dash/gap look we wanted. */
.postmark__center-dash {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}
.postmark__center-dash circle {
  fill: none;
  stroke: var(--color-ink);
  stroke-width: 3;
  stroke-dasharray: 14 9;
}
.postmark__eyebrow {
  font-family: var(--font-stamp);
  font-size: clamp(1.045rem, 2.64vw, 1.265rem);
  letter-spacing: 0.1em;
  color: var(--color-amber-deep);
  transform: translateY(-0.15em);
}
.postmark__eyebrow:last-of-type {
  transform: translateY(calc(-0.15em - 2px));
}
.postmark__word {
  font-family: var(--font-vacation);
  color: var(--color-title);
  font-size: clamp(2.52rem, 7.875vw, 3.57rem);
  line-height: 1;
  /* La Belle Aurore has no medium/bold weight; a slight stroke adds a touch
     more visual weight. Supported in Chrome/Safari/Edge/Opera; Firefox has
     no text-stroke support at all (prefixed or not) and simply shows the
     unstroked script, which still reads fine. */
  -webkit-text-stroke: 0.6px var(--color-title);
  transform: translateY(0.016em);
}

/* ---------- Torn-edge divider ---------- */
.postcard__tear { position: relative; z-index: 1; height: 100%; display: grid; align-items: stretch; }
.postcard__tear svg {
  fill: var(--color-bg-deep);
  filter: drop-shadow(1px 0 0 color-mix(in srgb, var(--color-ink) 12%, transparent));
}
.tear--vertical { width: 1.5rem; height: 100%; }
.tear--horizontal { display: none; width: 100%; height: 1.5rem; }

@media (max-width: 860px) {
  .postcard__tear {
    width: min(100%, 22rem);
    height: auto;
    margin-block: 0.25rem;
  }
  .tear--vertical { display: none; }
  .tear--horizontal { display: block; }
}

/* ---------- Note panel ---------- */
.postcard__note {
  display: grid;
  row-gap: 1.5rem;
  max-width: 34rem;
}

.intro {
  font-size: clamp(1rem, 1vw + 0.7rem, 1.1rem);
  color: var(--color-title);
  font-weight: 500;
  margin: 0;
}

.note-card {
  background: var(--color-card-bg);
  border-radius: 0.75rem;
  padding: clamp(1.25rem, 3vw, 2rem);
  display: grid;
  row-gap: 1.1rem;
  color: var(--color-ink);
  position: relative;
}
.note-card::before {
  /* A restrained nod to postal ephemera — a thin rule like a letter's fold line */
  content: "";
  position: absolute;
  inset: 0.6rem;
  border: 1px solid color-mix(in srgb, var(--color-ink) 12%, transparent);
  border-radius: 0.5rem;
  pointer-events: none;
}
.note-card p { margin: 0; }

.signoff { margin-top: 0.25rem; font-family: var(--font-display); font-size: 1.05em; }
.signoff__title { color: var(--color-title); font-size: 0.75em; font-family: var(--font-body); }

.stamp {
  width: clamp(5.5rem, 12vw, 7rem);
  justify-self: start;
  transform: rotate(-7deg);
}

@media (max-width: 860px) {
  .stamp { justify-self: center; }
}

/* ---------- Footer ---------- */
.site-footer {
  position: relative;
  z-index: 2;
  background: var(--color-footer-bg);
  color: var(--color-footer-font);
  padding: clamp(1.5rem, 4vw, 2.5rem) var(--gutter);
  display: grid;
  grid-template-columns: 1fr;
  row-gap: 1rem;
  justify-items: start;
}
.footer-logo {
  height: clamp(1.0rem, 2.26vw, 1.33rem); /* an additional ~5% smaller */
  width: auto;
  /* brightness(0) invert(1) gives a pure white silhouette; sepia + hue-rotate
     + saturate nudge that white toward a subtle blue-gray rather than neutral
     white, then opacity dims it further against the footer background. */
  filter: brightness(0) invert(1) sepia(25%) hue-rotate(175deg) saturate(250%) opacity(0.45);
}
.footer-legal {
  margin: 0;
  max-width: 56rem;
  font-size: 0.78rem;
  line-height: 1.6;
  color: color-mix(in srgb, var(--color-footer-font) 85%, transparent);
}

/* ---------- Back-to-top button ---------- */
.top-button {
  position: fixed;
  right: clamp(1rem, 3vw, 2rem);
  bottom: clamp(1rem, 3vw, 2rem);
  z-index: 10;
  width: 3.25rem;
  height: 3.25rem;
  border-radius: 50%;
  border: 2px dashed color-mix(in srgb, #fff 70%, transparent);
  cursor: pointer;
  display: grid;
  place-items: center;
  background: color-mix(in srgb, var(--color-amber-deep) 65%, transparent);
  color: #fff;
  opacity: 0;
  visibility: hidden;
  transform: translateY(0.5rem);
  transition:
    opacity var(--transition-medium),
    transform var(--transition-medium),
    background var(--transition-fast),
    visibility var(--transition-medium);
}
.top-button.is-visible { opacity: 1; visibility: visible; transform: translateY(0); }
.top-button:hover, .top-button:focus-visible {
  background: color-mix(in srgb, var(--color-amber-deep) 95%, transparent);
}
.top-button svg { width: 1.4rem; height: 1.4rem; fill: currentColor; }

.top-button__tooltip {
  position: absolute;
  right: calc(100% + 0.6rem);
  top: 50%;
  transform: translateY(-50%);
  background: var(--color-footer-bg);
  color: var(--color-footer-font);
  font-size: 0.75rem;
  padding: 0.3rem 0.6rem;
  border-radius: 0.3rem;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-fast);
}
.top-button:hover .top-button__tooltip,
.top-button:focus-visible .top-button__tooltip { opacity: 1; }

:focus-visible {
  outline: 2px solid var(--color-menu-font);
  outline-offset: 2px;
}
