/* Jan Shade Beach — site styles. Colors come from palette.css (generated from brand/color). */

@font-face {
  font-family: "Petrona";
  src: url("/assets/fonts/petrona-var.woff2") format("woff2");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Petrona";
  src: url("/assets/fonts/petrona-italic-var.woff2") format("woff2");
  font-weight: 400 700;
  font-style: italic;
  font-display: swap;
}

:root {
  --font-head: "Petrona", Georgia, "Times New Roman", serif;
  --font-body: "Petrona", Georgia, "Times New Roman", serif;
  --ink: var(--jsb-ink);
  --muted: var(--jsb-neutral-700);
  --line: var(--jsb-neutral-200);
  --link: var(--jsb-teal-700);
  --cream: #FCF8F1;
  --sand: var(--jsb-sand);
  --wrap: 72rem;
  --gutter: clamp(1rem, 4vw, 2rem);
  --radius: 10px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: #fff;
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1.125rem;
  line-height: 1.6;
  font-optical-sizing: auto;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--link); text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:hover { color: var(--jsb-teal-800); }
:focus-visible { outline: 3px solid var(--jsb-wave); outline-offset: 2px; border-radius: 3px; }

h1, h2, h3 { font-family: var(--font-head); font-weight: 600; line-height: 1.12; margin: 0 0 0.5em; }
h1 { font-size: clamp(1.9rem, 4.4vw, 2.75rem); }
h2 { font-size: clamp(1.5rem, 2.9vw, 2rem); }
h3 { font-size: 1.25rem; }
p { margin: 0 0 1em; }
.lead { font-size: 1.25rem; color: var(--jsb-neutral-800); }
.muted { color: var(--muted); }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.section { padding: clamp(3rem, 8vw, 5.5rem) 0; }
.section.cream { background: var(--cream); }
.section.teal { background: var(--jsb-teal-700); color: #fff; }
.section.teal a:not(.btn) { color: #fff; }
.section-head { max-width: 44rem; margin-bottom: 2rem; }
.center { text-align: center; margin-left: auto; margin-right: auto; }

/* hand-drawn wave from her vertical logo, used as a divider */
img.wave, .split img.wave { display: block; width: 9rem; height: auto; margin: 0 0 1.2rem; border-radius: 0; }
.center .wave, .wave.center { margin-left: auto; margin-right: auto; }

/* buttons */
.btn {
  display: inline-block; padding: 0.7em 1.4em; border-radius: 999px;
  background: var(--jsb-red-500); color: #fff; text-decoration: none;
  font-family: var(--font-body); font-weight: 600; font-size: 1rem; line-height: 1.2;
  border: 2px solid var(--jsb-red-500); transition: background 0.15s, border-color 0.15s;
}
.btn:hover { background: var(--jsb-red-600); border-color: var(--jsb-red-600); color: #fff; }
.btn.ghost { background: transparent; color: var(--link); border-color: currentColor; }
.btn.ghost:hover { background: var(--jsb-teal-50); color: var(--jsb-teal-800); }
.section.teal .btn.ghost { color: #fff; }
.section.teal .btn.ghost:hover { background: rgba(255,255,255,0.12); }
.actions { display: flex; flex-wrap: wrap; gap: 0.75rem 1rem; align-items: center; margin-top: 1.5rem; }

/* header */
.site-header { background: #fff; border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; }
.header-row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 0.6rem 0; transition: padding 0.25s; }
/* the logo starts large and shrinks to a compact size once the page is scrolled (class set in Base.astro) */
.logo img { width: clamp(210px, 26vw, 310px); height: auto; transition: width 0.25s; }
.site-header.compact .header-row { padding: 0.25rem 0; }
.site-header.compact .logo img { width: clamp(150px, 16vw, 190px); }
@media (prefers-reduced-motion: reduce) { .logo img, .header-row { transition: none; } }
.nav { display: flex; gap: 0.25rem 1.4rem; align-items: center; }
.nav a { color: var(--ink); text-decoration: none; font-size: 1.02rem; padding: 0.3em 0; border-bottom: 2px solid transparent; }
.nav a:hover { color: var(--link); }
.nav a[aria-current="page"] { border-bottom-color: var(--jsb-teal); }
.nav .btn { padding: 0.5em 1.1em; border-bottom-width: 2px; color: #fff; }
.nav .btn:hover { color: #fff; }
.nav .btn[aria-current="page"] { border-color: var(--jsb-red-600); }
.menu { display: none; }
@media (max-width: 860px) {
  .nav { display: none; }
  .menu { display: block; position: relative; }
  .menu summary {
    list-style: none; cursor: pointer; font-size: 1rem; padding: 0.5em 0.9em;
    border: 1px solid var(--line); border-radius: 999px;
  }
  .menu summary::-webkit-details-marker { display: none; }
  .menu[open] .nav {
    display: flex; flex-direction: column; align-items: stretch; gap: 0;
    position: absolute; right: 0; top: calc(100% + 0.5rem); min-width: 13rem;
    background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
    padding: 0.5rem; box-shadow: 0 10px 30px rgba(42,37,34,0.12);
  }
  .menu[open] .nav a { padding: 0.6em 0.8em; border: 0; border-radius: 6px; }
  .menu[open] .nav a[aria-current="page"] { background: var(--jsb-teal-50); }
  .menu[open] .nav .btn { margin-top: 0.4rem; text-align: center; }
}

/* hero */
.hero { padding: clamp(2.5rem, 6vw, 4.5rem) 0; background: var(--cream); overflow: hidden; }
.hero-grid { display: grid; grid-template-columns: 1.05fr 1fr; gap: clamp(2rem, 5vw, 4rem); align-items: center; }
.hero h1 { margin-bottom: 0.35em; }
.mosaic { display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: auto auto; gap: 0.8rem; }
.mosaic img { width: 100%; height: 100%; object-fit: cover; border-radius: var(--radius); box-shadow: 0 6px 20px rgba(42,37,34,0.12); }
.mosaic .tall { grid-row: span 2; }
@media (max-width: 860px) { .hero-grid { grid-template-columns: 1fr; } }

/* collection cards */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 10rem), 1fr)); gap: 1.25rem; }
@media (min-width: 1000px) { .cards { grid-template-columns: repeat(5, 1fr); } }
.card { display: block; text-decoration: none; color: var(--ink); background: #fff; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); transition: transform 0.15s, box-shadow 0.15s; }
.card:hover { transform: translateY(-3px); box-shadow: 0 10px 26px rgba(42,37,34,0.12); color: var(--ink); }
.card img { width: 100%; aspect-ratio: 1; object-fit: cover; }
.card-body { padding: 0.9rem 1.1rem 1.1rem; }
.card h3 { margin: 0 0 0.15em; font-size: 1.15rem; }
.card p { margin: 0; color: var(--muted); font-size: 0.95rem; }

/* split: image + text */
.split { display: grid; grid-template-columns: 1fr 1.1fr; gap: clamp(2rem, 5vw, 4rem); align-items: center; }
.split.flip > :first-child { order: 2; }
.split img { border-radius: var(--radius); width: 100%; }
@media (max-width: 860px) { .split { grid-template-columns: 1fr; } .split.flip > :first-child { order: 0; } }
.quote { font-style: italic; font-size: 1.2rem; color: var(--jsb-teal-700); }

/* retailers */
/* plain list of names separated by dots: reads as text, not as buttons or filters */
.retailers { display: flex; flex-wrap: wrap; gap: 0.2rem 0; padding: 0; margin: 1rem 0 0; list-style: none;
  font-family: var(--font-head); font-weight: 600; font-size: 1.15rem; color: var(--jsb-neutral-800); line-height: 1.4; }
.retailers li:not(:last-child)::after { content: "·"; color: var(--jsb-red-500); margin: 0 0.55em; }
.strip { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0.8rem; margin-top: 2rem; }
.strip img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: var(--radius); }
@media (max-width: 700px) { .strip { grid-template-columns: repeat(2, 1fr); } }

/* gallery (masonry columns) + lightbox */
.collection { scroll-margin-top: 6rem; }
.collection + .collection { margin-top: clamp(3rem, 7vw, 5rem); }
.gallery { columns: 4 14rem; column-gap: 1rem; }
.gallery figure { break-inside: avoid; margin: 0 0 1rem; }
.gallery a { display: block; border-radius: var(--radius); overflow: hidden; background: var(--cream); }
.gallery img { width: 100%; transition: transform 0.25s; }
.gallery a:hover img { transform: scale(1.03); }
.gallery figcaption { font-size: 0.92rem; color: var(--muted); padding: 0.35rem 0.1rem 0; line-height: 1.35; }
.chips { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 0 0 2.5rem; padding: 0; list-style: none; }
.chips a { display: inline-block; padding: 0.35em 1em; border-radius: 999px; border: 1px solid var(--line); text-decoration: none; color: var(--ink); background: #fff; }
.chips a:hover { border-color: var(--jsb-teal); color: var(--link); }

.lightbox { border: 0; padding: 0; background: transparent; max-width: min(92vw, 1100px); max-height: 92vh; overflow: visible; }
.lightbox::backdrop { background: rgba(30, 26, 23, 0.86); }
.lightbox figure { margin: 0; display: flex; flex-direction: column; align-items: center; }
.lightbox img { max-width: min(92vw, 1100px); max-height: 80vh; width: auto; height: auto; border-radius: 6px; }
.lightbox figcaption { color: #fff; margin-top: 0.6rem; font-size: 1.05rem; text-align: center; }
.lb-btn {
  position: fixed; top: 50%; transform: translateY(-50%); background: rgba(255,255,255,0.92); color: var(--ink);
  border: 0; width: 2.8rem; height: 2.8rem; border-radius: 50%; font-size: 1.4rem; cursor: pointer; line-height: 1;
}
.lb-prev { left: 1rem; } .lb-next { right: 1rem; }
.lb-close { top: 1rem; right: 1rem; transform: none; }

/* photo grid for adventures */
.photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(13rem, 1fr)); gap: 0.8rem; }
.photos figure { margin: 0; }
.photos img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--radius); }
.photos figcaption { font-size: 0.9rem; color: var(--muted); margin-top: 0.3rem; }

/* prose pages */
.prose { max-width: 42rem; }
.prose h2 { margin-top: 1.6em; }

/* forms */
.form { display: grid; gap: 1.1rem; max-width: 36rem; }
.form label { display: grid; gap: 0.35rem; font-weight: 600; font-size: 1rem; }
.form .opt { font-weight: 400; color: var(--muted); }
.form input, .form select, .form textarea {
  font: inherit; font-weight: 400; font-size: 1rem; padding: 0.7em 0.85em; border: 1px solid var(--jsb-neutral-300);
  border-radius: 8px; background: #fff; color: var(--ink); width: 100%;
}
.form textarea { min-height: 9rem; resize: vertical; }
.form input:focus, .form select:focus, .form textarea:focus { outline: 3px solid var(--jsb-wave-200); border-color: var(--jsb-teal-600); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.notice { padding: 0.8rem 1rem; border-radius: 8px; background: var(--jsb-red-50); border: 1px solid var(--jsb-red-200); color: var(--jsb-red-800); }
.contact-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: clamp(2rem, 5vw, 4rem); align-items: start; }
.contact-card { background: var(--cream); border-radius: var(--radius); padding: 1.5rem; }
.contact-card p { margin-bottom: 0.6em; }
@media (max-width: 860px) { .contact-grid { grid-template-columns: 1fr; } }

/* footer */
.site-footer { background: var(--jsb-neutral-900); color: var(--jsb-neutral-200); padding: 3rem 0 2rem; font-size: 0.98rem; }
.site-footer a { color: #fff; }
.footer-row { display: flex; flex-wrap: wrap; gap: 1.5rem 3rem; justify-content: space-between; align-items: flex-start; }
.footer-row img { width: 200px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 0.4rem 1.2rem; list-style: none; padding: 0; margin: 0; }
.footer-legal { margin-top: 2rem; font-size: 0.88rem; color: var(--jsb-neutral-400); }
