/* Tourist Brands — storefront (Brand Guidelines v2.0, mobile-first).
   No literal colors here — everything comes from tokens.css.
   v2 type scale: display 56/36 (home hero only) · h1 40/30 · h2 28/24 ·
   h3 20 · body 17/1.55 · small 14/1.4. Spacing in multiples of 8. */

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--tb-font-body);
  font-size: 1.0625rem; /* 17px */
  line-height: 1.55;
  color: var(--tb-night-swim);
  background: var(--tb-sand);
  font-weight: 400;
}
.wrap { max-width: 68rem; margin: 0 auto; padding: 0 1rem; }

h1, h2, h3 { font-family: var(--tb-font-display); margin: 0 0 .5rem; }
h1 { font-size: clamp(1.875rem, 3.5vw, 2.5rem); line-height: 1.1; font-weight: 800; font-stretch: var(--tb-display-stretch); text-transform: uppercase; letter-spacing: .01em; }
h2 { font-size: clamp(1.5rem, 2.6vw, 1.75rem); line-height: 1.2; font-weight: 700; margin-top: 2rem; }
h3 { font-size: 1.25rem; line-height: 1.3; font-weight: 700; }
.display { font-size: clamp(2.25rem, 6vw, 3.5rem); line-height: 1.0; font-weight: 800; font-stretch: var(--tb-display-stretch); text-transform: uppercase; letter-spacing: .01em; }
p { margin: 0 0 1rem; }
a { color: var(--tb-deep-tide); }
img { max-width: 100%; height: auto; display: block; border-radius: var(--tb-radius); }
small, .fine { font-size: .875rem; line-height: 1.4; }

.skip { position: absolute; left: -999px; top: 0; background: var(--tb-night-swim); color: var(--tb-sand); padding: .5rem 1rem; z-index: 10; }
.skip:focus { left: 0; }
.muted { color: var(--ink-70); }
.fine { color: var(--ink-70); }
.kicker { text-transform: uppercase; letter-spacing: .14em; font-size: .75rem; color: var(--tb-deep-tide); font-weight: 700; margin: 0 0 .4rem; }
.lede { font-size: 1.1rem; color: var(--ink-70); max-width: 44rem; }
.prewrap { white-space: pre-wrap; }
/* Dev/staging marker for empty site.config values (never seen in prod —
   the boot gate refuses to start with empty values). */
.cfg-missing { background: var(--amber-bg); color: var(--amber); border: 1px dashed var(--amber-line); padding: 0 .3em; border-radius: 4px; font-weight: 700; }

/* Focus: Sunset Deep on light grounds (3:1+ vs Sand), Sunset on dark. */
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, [tabindex]:focus-visible {
  outline: 3px solid var(--tb-sunset-deep); outline-offset: 2px;
}

/* ── Header: night bar, sticky. Logo once at 56/40px; hamburger <900px. ── */
.site-header { background: var(--grad-night); border-bottom: 1px solid color-mix(in srgb, var(--tb-line-teal) 25%, transparent); position: sticky; top: 0; z-index: 5; }
.header-row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .5rem 1rem; flex-wrap: wrap; }
.wordmark { text-decoration: none; display: inline-flex; align-items: center; padding: 0; }
.site-nav { display: flex; gap: 1.1rem; align-items: center; flex-wrap: wrap; }
.site-nav a { text-decoration: none; color: var(--tb-sand); font-weight: 600; font-size: .95rem; }
.site-nav a:hover { color: var(--tb-sand); text-decoration: underline; text-underline-offset: 4px; }
.site-nav a:focus-visible, .nav-toggle:focus-visible { outline-color: var(--tb-sunset); }
.site-nav a.btn-nav { background: var(--tb-deep-tide); color: var(--tb-white); border: 1px solid var(--tb-deep-tide); border-radius: 999px; padding: .38rem 1rem; }
.site-nav a.btn-nav:hover { background: color-mix(in srgb, var(--tb-deep-tide) 78%, var(--tb-ink)); color: var(--tb-white); text-decoration: none; }
.nav-toggle { display: none; min-width: 44px; min-height: 44px; background: transparent; border: 1px solid color-mix(in srgb, var(--tb-sand) 45%, transparent); color: var(--tb-sand); border-radius: 10px; font: inherit; font-weight: 600; cursor: pointer; align-items: center; justify-content: center; }
@media (max-width: 56.25rem) {
  .nav-toggle { display: inline-flex; }
  .site-nav { display: none; width: 100%; flex-direction: column; align-items: flex-start; gap: .2rem; padding: .4rem 0 .8rem; }
  .site-nav a { padding: .45rem 0; }
  .site-header.nav-open .site-nav { display: flex; }
}
.footer-brand .brand-logo { height: 44px; max-width: 220px; }

/* ── Buttons: primary = Sunset with Night Swim text (highest contrast). ── */
.btn {
  display: inline-block; background: var(--tb-sunset); color: var(--tb-night-swim); border: 1px solid var(--tb-sunset);
  padding: .55rem 1.2rem; border-radius: 999px; font-weight: 700; font-size: .95rem;
  text-decoration: none; cursor: pointer; font-family: inherit; letter-spacing: .01em;
}
.btn:hover { background: color-mix(in srgb, var(--tb-sunset) 86%, var(--tb-white)); border-color: color-mix(in srgb, var(--tb-sunset) 86%, var(--tb-white)); }
.btn-ghost { background: transparent; color: var(--tb-deep-tide); border-color: var(--tb-deep-tide); }
.btn-ghost:hover { background: var(--teal-ghost); color: var(--tb-deep-tide); border-color: var(--tb-deep-tide); }
.btn-ghost-light { color: var(--tb-sand); border-color: color-mix(in srgb, var(--tb-sand) 65%, transparent); }
.btn-ghost-light:hover { background: color-mix(in srgb, var(--tb-sand) 14%, transparent); color: var(--tb-sand); border-color: var(--tb-sand); }
.btn-big { padding: .8rem 1.6rem; font-size: 1.05rem; }
.btn-light { background: var(--tb-sand); color: var(--tb-night-swim); border-color: var(--tb-sand); }
.btn-light:hover { background: var(--tb-white); border-color: var(--tb-white); }
.btn-nav { padding: .38rem 1rem; }
.btn-small { padding: .3rem .8rem; font-size: .85rem; }
.btn-danger { background: var(--warn); border-color: var(--warn); color: var(--tb-white); }
.btn-danger:hover { background: color-mix(in srgb, var(--warn) 82%, var(--tb-ink)); border-color: color-mix(in srgb, var(--warn) 82%, var(--tb-ink)); }

/* ── Hero: Night Swim → Deep Tide + halftone texture (v2). Small text over
   the bright teal corner fails AA, so the base stays deep. ── */
.hero { background: linear-gradient(155deg, var(--tb-deep-tide) 0%, var(--tb-night-swim) 82%); color: var(--tb-sand); margin: 0 calc(50% - 50vw); padding: 3.5rem 0 3rem; position: relative; overflow: hidden; }
.hero::before { content: ""; position: absolute; inset: 0; background:
  radial-gradient(42rem 22rem at 78% -6%, color-mix(in srgb, var(--tb-sunset) 42%, transparent), transparent 70%),
  linear-gradient(115deg, transparent 55%, color-mix(in srgb, var(--tb-line-teal) 40%, transparent) 100%);
  pointer-events: none; }
.hero .wrap { position: relative; }
.hero h1 { color: var(--tb-sand); max-width: 20ch; }
.hero h1 em { font-style: normal; color: var(--tb-sunset); }
.hero .kicker { color: var(--tb-sand); }
.hero .lede { color: color-mix(in srgb, var(--tb-sand) 88%, transparent); }
.hero-cta { display: flex; gap: .8rem; flex-wrap: wrap; margin-top: 1.5rem; }
.hero-grid { display: grid; gap: 2rem; align-items: center; }
.hero-art { border-radius: var(--radius-lg); box-shadow: var(--shadow-lift); }
@media (min-width: 52rem) { .hero-grid { grid-template-columns: 1.05fr .95fr; } }

/* ── Halftone texture (v2): 45° dots growing toward the top right.
   Texture only — never behind photos. ── */
.halftone { position: absolute; inset: 0; width: 100%; height: 100%; color: var(--tb-sand); opacity: .13; pointer-events: none; }

/* ── Tide Lines (v2): Line Teal contours on light sections, fading out,
   cropped off the right edge. Per-town art slots into the partial. ── */
.tide-wrap { position: relative; overflow: hidden; }
.tidelines { position: absolute; right: 0; top: 0; height: 100%; width: 62%; pointer-events: none; }
.tidelines path { fill: none; stroke: var(--tb-line-teal); stroke-width: 1.5; }

/* ── Location grid / cards ────────────────────────────────────── */
.loc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr)); gap: 1rem; margin-top: 1rem; }
.loc-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--tb-radius);
  padding: 1.1rem 1.2rem; text-decoration: none; color: var(--tb-night-swim); box-shadow: var(--shadow);
  display: block; position: relative; border-top: 4px solid var(--tb-line-teal);
}
.loc-card:hover { border-color: var(--tb-deep-tide); border-top-color: var(--tb-sunset); transform: translateY(-2px); box-shadow: var(--shadow-lift); }
.loc-state { position: absolute; top: 1rem; right: 1.1rem; font-size: .72rem; font-weight: 800; letter-spacing: .1em; color: var(--tb-deep-tide); }
.loc-card h3 { margin: 0 2rem .25rem 0; }
.loc-count { display: inline-flex; align-items: center; gap: .4rem; margin-top: .5rem; font-size: .8rem; font-weight: 700; color: var(--tb-deep-tide); }
.loc-count::before { content: ""; width: .55rem; height: .55rem; border-radius: 3px; background: var(--tb-sunset); }

.split { display: grid; grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr)); gap: 1rem; margin: 1rem 0 2rem; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--tb-radius); padding: 1.2rem 1.4rem; box-shadow: var(--shadow); }
.card h3 { color: var(--tb-deep-tide); }
.band { background: var(--grad-night); color: var(--tb-sand); border-radius: var(--radius-lg); padding: 2.2rem 1.6rem; margin: 2rem 0; position: relative; overflow: hidden; }
.band .wrap, .band > * { position: relative; }
.band h2 { margin-top: 0; color: var(--tb-sand); }
.band p { color: color-mix(in srgb, var(--tb-sand) 85%, transparent); max-width: 46rem; }

/* ── Filter bar ───────────────────────────────────────────────── */
.filter-bar { display: flex; gap: .8rem; flex-wrap: wrap; align-items: end; background: var(--surface); border: 1px solid var(--line); border-radius: var(--tb-radius); padding: 1rem; margin: 1rem 0; }
.filter-bar label { display: flex; flex-direction: column; font-size: .82rem; font-weight: 600; gap: .2rem; }
.filter-bar select, .filter-bar input { min-width: 9rem; }

/* ── Forms ────────────────────────────────────────────────────── */
label { display: block; font-weight: 600; font-size: .9rem; margin-bottom: .8rem; }
input, select, textarea { width: 100%; padding: .55rem .7rem; border: 1px solid var(--line-strong); border-radius: 10px; font: inherit; background: var(--tb-white); color: var(--tb-night-swim); margin-top: .2rem; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--tb-deep-tide); outline-offset: 1px; border-color: var(--tb-deep-tide); }
.row { display: grid; grid-template-columns: 1fr 1fr; gap: .8rem; }
.row-3 { grid-template-columns: 2fr 1fr 1fr; }
.form-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--tb-radius); padding: 1.4rem; box-shadow: var(--shadow); max-width: 46rem; }
.alert { background: var(--warn-bg); border: 1px solid color-mix(in srgb, var(--warn) 35%, var(--surface)); color: var(--warn); padding: .7rem 1rem; border-radius: 10px; }
.hp { position: absolute; left: -9999px; height: 0; overflow: hidden; }

/* ── Pattern grid ─────────────────────────────────────────────── */
.pat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(11rem, 1fr)); gap: 1rem; margin: 1rem 0 2rem; }
.pat-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--tb-radius); overflow: hidden; text-decoration: none; color: var(--tb-night-swim); box-shadow: var(--shadow); display: flex; flex-direction: column; }
.pat-card:hover { border-color: var(--tb-deep-tide); transform: translateY(-2px); box-shadow: var(--shadow-lift); }
.pat-card img { display: block; width: calc(100% - 1rem); margin: .5rem .5rem 0; border-radius: .45rem; background: var(--tb-sand); }
.pat-tile { margin: .5rem .5rem 0; border-radius: .45rem; aspect-ratio: 1; display: grid; place-items: center; background: var(--grad-ocean); color: var(--tb-sand); font-family: var(--tb-font-display); font-weight: 800; font-stretch: var(--tb-display-stretch); font-size: 2.8rem; letter-spacing: .05em; }
.pat-tile-big { min-height: 20rem; font-size: 5rem; border-radius: var(--tb-radius); margin: 0; }
.pat-meta { padding: .8rem .95rem 1rem; display: grid; gap: .15rem; }

/* ── Catalog page structure ───────────────────────────────────── */
.group-section { margin: 3rem 0 0; padding-top: 2.75rem; border-top: 2px solid var(--line-strong); }
.group-section:first-of-type { border-top: 0; padding-top: 0; }
.line-section { margin: 3.5rem 0; }
.line-section:first-of-type { margin-top: 2.25rem; }
.line-section h4 { font-size: 1.35rem; margin-bottom: .2rem; color: var(--tb-deep-tide); }
.badge { display: inline-block; background: var(--surface); border: 1px solid var(--tb-deep-tide); color: var(--tb-deep-tide); border-radius: 999px; padding: .1rem .6rem; font-size: .72rem; font-weight: 700; margin: .1rem .15rem .1rem 0; }
.badge-accent { background: var(--tb-sunset); border-color: var(--tb-sunset); color: var(--tb-night-swim); }
.badge-soft { background: transparent; border-color: var(--line-strong); color: var(--ink-70); }

/* ── Detail ───────────────────────────────────────────────────── */
.crumbs { font-size: .85rem; margin: 1rem 0; color: var(--ink-70); }
.detail { display: grid; grid-template-columns: 1fr; gap: 1.5rem; margin: 1rem 0 2rem; }
@media (min-width: 48rem) { .detail { grid-template-columns: 1fr 1fr; align-items: start; } }
.link-list { line-height: 2; }
.empty { text-align: center; padding: 3rem 1rem; background: var(--surface); border: 1px dashed var(--line-strong); border-radius: var(--tb-radius); margin: 1rem 0; }

/* ── Footer: Night Swim + halftone, Sand text ─────────────────── */
.site-footer { margin-top: 3rem; padding: 2.4rem 0 2.6rem; background: var(--grad-night); color: var(--tb-sand); position: relative; overflow: hidden; }
.site-footer .wrap { position: relative; }
.site-footer .fine { color: color-mix(in srgb, var(--tb-sand) 72%, transparent); }
.footer-row { display: flex; justify-content: space-between; gap: 1.5rem; flex-wrap: wrap; }
.footer-brand { display: flex; align-items: center; gap: .4rem; margin: 0 0 .3rem; }
.footer-brand .wm { font-size: 1.5rem; }
.footer-tag { font-weight: 500; color: color-mix(in srgb, var(--tb-sand) 85%, transparent); }
.footer-nav a { color: var(--tb-sand); white-space: nowrap; display: inline-block; padding: .35rem .15rem; }
.footer-nav a:hover { color: var(--tb-sand); text-decoration: underline; text-underline-offset: 4px; }
.footer-nav a:focus-visible { outline-color: var(--tb-sunset); }

/* ── Product lines ────────────────────────────────────────────── */
.line-group { margin: 2rem 0; }
.line-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(14rem, 1fr)); gap: 1rem; margin-top: .75rem; }
.line-card { display: block; background: var(--surface); border: 1px solid var(--line-strong); border-top: 3px solid var(--tb-line-teal); border-radius: var(--tb-radius); overflow: hidden; text-decoration: none; color: inherit; transition: transform .12s ease, box-shadow .12s ease, border-color .12s ease; }
.line-card:hover { border-color: var(--tb-deep-tide); border-top-color: var(--tb-sunset); transform: translateY(-2px); box-shadow: var(--shadow-lift); }
.line-card img { display: block; width: 100%; aspect-ratio: 6 / 5; object-fit: cover; }
.line-meta { display: block; padding: .7rem .9rem .85rem; }
.line-meta strong { display: block; margin-bottom: .15rem; }
.line-head { display: grid; grid-template-columns: 1fr; gap: 1.25rem; margin: 1rem 0 1.5rem; }
@media (min-width: 48rem) { .line-head { grid-template-columns: minmax(16rem, 24rem) 1fr; align-items: start; } }
.line-cover { width: 100%; border-radius: var(--tb-radius); border: 1px solid var(--line-strong); }
.alert-info { background: color-mix(in srgb, var(--tb-line-teal) 12%, var(--surface)); border: 1px solid var(--tb-deep-tide); border-radius: var(--tb-radius); padding: .8rem 1rem; }
