/* ==========================================================================
   Scatto — site styles
   1. Tokens  2. Base  3. Layout  4. Header/Nav  5. Buttons  6. Sections
   7. Cards  8. Product  9. Contact  10. FAQ  11. Footer  12. Utilities  13. Motion
   ========================================================================== */

/* 1. Tokens --------------------------------------------------------------- */
:root {
  --navy: #0a385a;       /* brand navy, sampled from the client's banner */
  --navy-deep: #06263f;
  --navy-soft: #dfe8f0;
  --green: #2c5545;      /* course green from the client's photo panels */
  --green-soft: #e9efeb;
  --paper: #f4f6f5;
  --white: #ffffff;
  --ink: #15202b;
  --muted: #56616c;
  --line: #dde2e5;
  --success: #2c5545;
  --error: #a33a2c;

  --font-serif: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --font-sans: "Nunito Sans", "Avenir Next", Avenir, system-ui, -apple-system, "Segoe UI", sans-serif;

  --radius: 8px;
  --radius-lg: 16px;
  --shadow: 0 12px 32px rgba(6, 38, 63, 0.1);
  --container: 1180px;
  --gutter: clamp(16px, 4vw, 32px);
  --section-y: clamp(56px, 9vw, 112px);
  --header-h: 76px;
}

/* 2. Base ------------------------------------------------------------------ */
*, *::before, *::after { box-sizing: border-box; }

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

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 1.03rem;
  line-height: 1.65;
  color: var(--ink);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
}

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

/* Headlines follow the client's artwork: high-contrast serif capitals */
h1, h2, h3 {
  font-family: var(--font-serif);
  font-weight: 600;
  line-height: 1.08;
  color: var(--navy);
  margin: 0 0 0.5em;
  text-wrap: balance;
}
h1, h2 { text-transform: uppercase; letter-spacing: 0.02em; }
h1 { font-size: clamp(2.3rem, 5.4vw, 3.9rem); }
h2 { font-size: clamp(1.9rem, 3.8vw, 2.8rem); }
h3 { font-size: 1.5rem; }

p { margin: 0 0 1em; }

a { color: var(--navy); text-underline-offset: 3px; }
a:hover { color: var(--green); }

:focus-visible { outline: 2px solid var(--green); outline-offset: 3px; }

/* 3. Layout ---------------------------------------------------------------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section { padding-block: var(--section-y); }
.section--paper { background: var(--paper); }
.section--navy { background: var(--navy); color: var(--navy-soft); }
.section--navy h2, .section--navy h3 { color: var(--white); }

.section-head { max-width: 660px; margin: 0 auto clamp(32px, 5vw, 56px); text-align: center; }
.section-head p { color: var(--muted); }

.eyebrow {
  display: inline-block;
  margin-bottom: 14px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--green);
}
.section--navy .eyebrow { color: #a9c7b8; }


.split {
  display: grid;
  gap: clamp(32px, 6vw, 72px);
  align-items: center;
}
@media (min-width: 900px) {
  .split { grid-template-columns: 1fr 1fr; }
  .split--reverse > :first-child { order: 2; }
}

.rounded-img { border-radius: var(--radius-lg); }

/* Video with a corner play/pause/replay button (main.js). The background matches the video's backdrop. */
.video-card { position: relative; overflow: hidden; background: #e4e0da; }
.video-card video { display: block; width: 100%; height: auto; aspect-ratio: 1; }
.video-toggle {
  position: absolute;
  right: 12px;
  bottom: 12px;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(6, 38, 63, 0.72);
  color: var(--white);
  cursor: pointer;
  transition: background 0.2s ease;
}
.video-toggle:hover { background: var(--navy-deep); }
.video-toggle[hidden] { display: none; }
.video-toggle::before {
  content: "";
  width: 16px;
  height: 16px;
  background: currentColor;
  -webkit-mask: var(--icon) center / contain no-repeat;
  mask: var(--icon) center / contain no-repeat;
}
.video-toggle[data-state="playing"] { --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3.5 2h3v12h-3zM9.5 2h3v12h-3z'/%3E%3C/svg%3E"); }
.video-toggle[data-state="paused"] { --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4 2v12l10-6z'/%3E%3C/svg%3E"); }
.video-toggle[data-state="ended"] { --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 8a5 5 0 1 0 1.5-3.5'/%3E%3Cpath d='M4.5 1.5v3h3'/%3E%3C/svg%3E"); }

/* 4. Header / Nav ------------------------------------------------------------ */
.skip-link {
  position: absolute;
  left: 16px;
  top: -100px;
  z-index: 100;
  padding: 10px 16px;
  background: var(--navy);
  color: var(--white);
  border-radius: var(--radius);
}
.skip-link:focus { top: 12px; color: var(--white); }

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

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: var(--header-h);
}

.brand img { width: auto; height: 42px; }

.site-nav { display: flex; align-items: center; gap: 30px; }
.site-nav ul { display: flex; gap: 30px; margin: 0; padding: 0; list-style: none; }
.site-nav a:not(.btn) {
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--ink);
}
.site-nav a:not(.btn):hover,
.site-nav a:not(.btn)[aria-current="page"] { color: var(--navy); box-shadow: inset 0 -2px 0 var(--green); }

.nav-toggle {
  display: none;
  position: relative;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}
.nav-toggle-bar,
.nav-toggle-bar::before,
.nav-toggle-bar::after {
  position: absolute;
  left: 11px;
  width: 22px;
  height: 2px;
  background: var(--navy);
  transition: transform 0.2s ease, opacity 0.2s ease;
  content: "";
}
.nav-toggle-bar { top: 21px; }
.nav-toggle-bar::before { left: 0; top: -7px; }
.nav-toggle-bar::after { left: 0; top: 7px; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar { background: transparent; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar::before { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar::after { transform: translateY(-7px) rotate(-45deg); }

/* Mobile nav: only collapses when JS is available (html.js), so it always works without JS. */
@media (max-width: 767px) {
  :root { --header-h: 64px; }
  .brand img { height: 36px; }
  .header-inner { flex-wrap: wrap; }
  .site-nav { flex-basis: 100%; flex-direction: column; align-items: stretch; gap: 8px; padding-bottom: 16px; }
  .site-nav ul { flex-direction: column; gap: 0; }
  .site-nav a:not(.btn) { display: block; padding: 12px 0; border-bottom: 1px solid var(--line); }
  .site-nav a[aria-current="page"] { box-shadow: none; }
  .site-nav .btn { margin-top: 8px; }

  .js .nav-toggle { display: block; }
  .js .site-nav { display: none; }
  .js .site-nav.is-open { display: flex; }
}

/* 5. Buttons ------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 50px;
  padding: 12px 28px;
  border: 1.5px solid var(--navy);
  border-radius: var(--radius);
  background: var(--navy);
  color: var(--white);
  font: 700 0.82rem/1 var(--font-sans);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}
.btn:hover { background: var(--navy-deep); border-color: var(--navy-deep); color: var(--white); }
.btn--ghost { background: transparent; color: var(--navy); }
.btn--ghost:hover { background: var(--navy); color: var(--white); }
.btn--white { background: var(--white); border-color: var(--white); color: var(--navy); }
.btn--white:hover { background: var(--navy-soft); border-color: var(--navy-soft); color: var(--navy-deep); }
.btn--light { background: transparent; border-color: var(--white); color: var(--white); }
.btn--light:hover { background: var(--white); border-color: var(--white); color: var(--navy-deep); }
.btn-small { min-height: 42px; padding: 8px 20px; font-size: 0.76rem; }

.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }

/* 6. Sections ---------------------------------------------------------------- */

/* Full-width brand banner (logo artwork is part of the photo) */
.banner { background: var(--navy); }
.banner img { width: 100%; }
/* On phones, crop to the logo half so it stays readable */
@media (max-width: 699px) {
  .banner img { aspect-ratio: 2.25; object-fit: cover; object-position: 0 50%; }
}

.intro { padding-block: clamp(40px, 7vw, 88px) var(--section-y); }
.intro .lead { color: #33404c; font-size: 1.12rem; }
.intro .price { margin: 0 0 24px; font-size: 1.4rem; }
.intro-points { display: flex; flex-wrap: wrap; gap: 8px 22px; margin: 26px 0 0; padding: 0; list-style: none; font-size: 0.9rem; color: var(--muted); }
.intro-points li { display: flex; align-items: center; gap: 8px; }
.intro-points li::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--green); }

.page-hero { background: var(--paper); padding-block: clamp(48px, 7vw, 88px); text-align: center; }
.page-hero p { max-width: 600px; margin-inline: auto; color: var(--muted); font-size: 1.08rem; }

/* Square marketing tiles supplied by the client (text is part of the artwork) */
.tile-grid { display: grid; gap: clamp(14px, 2vw, 24px); }
@media (min-width: 700px) { .tile-grid { grid-template-columns: 1fr 1fr; } }
.tile-grid img { width: 100%; border-radius: var(--radius-lg); }

.wide-stack { display: grid; gap: clamp(14px, 2vw, 24px); }
.wide-stack img { width: 100%; border-radius: var(--radius-lg); }

.photo-band img { width: 100%; }

.values { display: grid; gap: 24px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.value { padding: 28px; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--white); }
.value p { color: var(--muted); margin: 0; }
.value-num { font-family: var(--font-serif); font-size: 2rem; color: var(--green); line-height: 1; margin-bottom: 12px; }

.cta-band { text-align: center; }
.cta-band p { max-width: 580px; margin: 0 auto 28px; }
.cta-band .btn-row { justify-content: center; }

.prose { max-width: 680px; }
.prose p { color: #33404c; font-size: 1.06rem; }

/* 7. Cards ------------------------------------------------------------------ */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr));
  gap: 28px;
}

.card {
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--white);
  transition: box-shadow 0.25s ease, transform 0.25s ease;
}
.card:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.card-media img { width: 100%; aspect-ratio: 1; object-fit: cover; }
.card-body { display: flex; flex: 1; flex-direction: column; gap: 6px; padding: 24px; }
.card-body h3 { margin: 0; }
.card-body h3 a { text-decoration: none; }
.card-body h3 a::after { content: ""; position: absolute; inset: 0; } /* whole card clickable */
.card-body p { color: var(--muted); font-size: 0.95rem; margin: 0; }
.card-foot { display: flex; align-items: center; justify-content: space-between; margin-top: auto; padding-top: 16px; }
.price { font-weight: 700; color: var(--navy); }
.card-link { font-weight: 700; font-size: 0.78rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--green); }

.card--custom { background: var(--navy); border-color: var(--navy); color: var(--navy-soft); justify-content: center; }
.card--custom .card-body { justify-content: center; padding: 40px 32px; }
.card--custom h3, .card--custom h3 a { color: var(--white); }
.card--custom p { color: var(--navy-soft); }
.card--custom .eyebrow, .card--custom .card-link { color: #a9c7b8; }

/* 8. Product ---------------------------------------------------------------- */
.breadcrumb { font-size: 0.88rem; color: var(--muted); padding-top: 24px; }
.breadcrumb ol { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
.breadcrumb li + li::before { content: "/"; margin-right: 8px; color: var(--line); }
.breadcrumb a { color: var(--muted); }

.product { display: grid; gap: clamp(32px, 5vw, 64px); padding-block: 32px var(--section-y); }
@media (min-width: 960px) { .product { grid-template-columns: 1.1fr 1fr; align-items: start; } }

.gallery-main {
  position: relative;
  aspect-ratio: 1;
  border-radius: var(--radius-lg);
  background: var(--paper);
  overflow: hidden;
}
.gallery-main img { width: 100%; height: 100%; object-fit: cover; }
/* The video thumbnail adds .is-video, which swaps the photo for the video */
.gallery-main video { display: block; width: 100%; height: 100%; object-fit: cover; }
.gallery-main.is-video { background: #e4e0da; }
.gallery-main.is-video img,
.gallery-main:not(.is-video) video,
.gallery-main:not(.is-video) .video-toggle { display: none; }
.gallery-thumbs {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(62px, 1fr));
  gap: 8px;
  margin: 12px 0 0;
  padding: 0;
  list-style: none;
}
.gallery-thumbs button {
  display: block;
  width: 100%;
  padding: 0;
  border: 2px solid transparent;
  border-radius: var(--radius);
  background: var(--paper);
  overflow: hidden;
  cursor: pointer;
}
.gallery-thumbs button[aria-current="true"] { border-color: var(--navy); }
/* Wider screens keep every thumbnail on one row, shrinking them to fit */
@media (min-width: 600px) {
  .gallery-thumbs { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: minmax(0, 88px); }
}
.gallery-thumbs img { width: 100%; aspect-ratio: 1; object-fit: cover; }
.gallery-thumbs .thumb-video { position: relative; }
.thumb-video::after {
  content: "";
  position: absolute;
  inset: 0;
  width: 26px;
  height: 26px;
  margin: auto;
  border-radius: 50%;
  background: rgba(6, 38, 63, 0.72) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='white' d='M4 2v12l10-6z'/%3E%3C/svg%3E") 58% 50% / 10px no-repeat;
}

@media (min-width: 960px) { .gallery { position: sticky; top: calc(var(--header-h) + 24px); } }
.product-info h1 { font-size: clamp(2.2rem, 4vw, 3.2rem); margin-bottom: 0.2em; }
.product-price { font-size: 1.5rem; font-weight: 700; color: var(--navy); margin-bottom: 20px; }
.product-price small { font-size: 0.85rem; font-weight: 400; color: var(--muted); }
.product-info .lead { color: #33404c; font-size: 1.06rem; }
.product-info .btn-row { margin: 28px 0; }
.product-info h2 { font-size: 1.6rem; margin-top: 36px; }

.checklist { margin: 0 0 8px; padding: 0; list-style: none; }
.checklist li { position: relative; padding: 11px 0 11px 32px; border-bottom: 1px solid var(--line); }
.checklist li::before {
  content: "";
  position: absolute;
  left: 4px;
  top: 18px;
  width: 12px;
  height: 7px;
  border-left: 2px solid var(--green);
  border-bottom: 2px solid var(--green);
  transform: rotate(-45deg);
}
.checklist strong { color: var(--navy); font-weight: 700; }

.specs { width: 100%; border-collapse: collapse; font-size: 0.96rem; }
.specs th, .specs td { padding: 11px 0; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.specs th { width: 36%; padding-right: 16px; font-weight: 600; color: var(--muted); }

/* 9. Contact -------------------------------------------------------------------- */
.contact-layout { display: grid; gap: clamp(40px, 6vw, 72px); }
@media (min-width: 960px) { .contact-layout { grid-template-columns: 1.2fr 1fr; align-items: start; } }

.contact-email h2 { font-size: 1.6rem; }
.contact-email p { max-width: 52ch; color: var(--muted); }
.contact-email p a { font-weight: 700; overflow-wrap: anywhere; }

.contact-aside { padding: 32px; border-radius: var(--radius-lg); background: var(--paper); }
.contact-aside h2 { font-size: 1.6rem; }
.contact-aside ul { margin: 0; padding-left: 18px; color: var(--muted); }
.contact-aside li { margin-bottom: 8px; }

/* 10. FAQ ------------------------------------------------------------------ */
.faq { max-width: 780px; margin-inline: auto; }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  position: relative;
  padding: 20px 40px 20px 0;
  font-family: var(--font-serif);
  font-size: 1.35rem;
  font-weight: 600;
  color: var(--navy);
  list-style: none;
  cursor: pointer;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+";
  position: absolute;
  right: 4px;
  top: 50%;
  transform: translateY(-50%);
  font-family: var(--font-sans);
  font-weight: 300;
  font-size: 1.6rem;
  color: var(--green);
}
.faq details[open] summary::after { content: "–"; }
.faq details p { color: var(--muted); padding-right: 40px; }

/* 11. Footer ---------------------------------------------------------------- */
.site-footer { background: var(--navy-deep); color: #b3c2cf; padding-block: 56px 32px; font-size: 0.93rem; }
.footer-grid { display: grid; gap: 32px; }
@media (min-width: 768px) { .footer-grid { grid-template-columns: 2fr 1fr 1fr; } }
.site-footer img { width: 210px; height: auto; margin-bottom: 18px; }
.site-footer h2 { font-family: var(--font-sans); font-size: 0.76rem; font-weight: 700; letter-spacing: 0.18em; color: #a9c7b8; margin-bottom: 14px; }
.site-footer ul { margin: 0; padding: 0; list-style: none; }
.site-footer li { margin-bottom: 8px; }
.site-footer a { color: #e1e8ee; text-decoration: none; }
.site-footer a:hover { color: var(--white); text-decoration: underline; }
.footer-bottom { margin-top: 40px; padding-top: 24px; border-top: 1px solid rgba(255, 255, 255, 0.1); font-size: 0.85rem; }

/* 12. Utilities -------------------------------------------------------------- */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.center { text-align: center; }
.mt-lg { margin-top: clamp(32px, 5vw, 56px); }

/* 13. Motion ----------------------------------------------------------------- */
/* The client's photos carry their own text, so nothing here crops or pans them. */

/* Scroll reveal: main.js adds .reveal and a --reveal-delay, then .is-visible once in view */
.tile-grid img, .wide-stack img, .rounded-img, .photo-band img {
  transition:
    opacity 0.9s ease var(--reveal-delay, 0s),
    translate 0.9s cubic-bezier(0.2, 0.7, 0.2, 1) var(--reveal-delay, 0s),
    scale 0.4s ease,
    box-shadow 0.4s ease;
}
.reveal:not(.is-visible) { opacity: 0; translate: 0 28px; }
@media print { .reveal { opacity: 1; translate: none; } }

/* Hover: marketing tiles lift slightly */
@media (hover: hover) {
  .tile-grid img:hover, .wide-stack img:hover, .rounded-img:hover { scale: 1.02; box-shadow: var(--shadow); }
}

/* The kit photo floats gently (its white background hides the movement at the edges) */
.float { animation: float 7s ease-in-out infinite; }
@keyframes float { 50% { translate: 0 -10px; } }

/* Product gallery: magnify on hover; main.js moves the zoom point with the cursor */
@media (hover: hover) {
  .gallery-main { cursor: zoom-in; }
  .gallery-main.is-video { cursor: auto; }
  .gallery-main img { transition: scale 0.3s ease; }
  .gallery-main:hover img { scale: 1.6; }
}

/* Shop cards: photo zooms in on hover */
.card-media { overflow: hidden; }
.card-media img { transition: scale 0.5s ease; }
.card:hover .card-media img { scale: 1.04; }

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