/* B — Harbour Edit: magazine cover + mosaic catalog */
:root {
  --bg: #e8eef3;
  --panel: #f4f7fa;
  --ink: #15202b;
  --muted: #5a6b7a;
  --line: rgba(21,32,43,.14);
  --accent: #3d6e8f;
  --accent-soft: #c5d6e4;
  --ok: #1a7a3c;
  --danger: #b42318;
  --font: "Noto Sans TC", system-ui, sans-serif;
  --display: "Cormorant Garamond", Georgia, serif;
  --radius: 2px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font);
  color: var(--ink);
  background:
    radial-gradient(1200px 500px at 10% -10%, rgba(61,110,143,.18), transparent 60%),
    radial-gradient(900px 400px at 90% 0%, rgba(197,214,228,.7), transparent 55%),
    var(--bg);
  min-height: 100vh;
  line-height: 1.55;
}
img { display: block; width: 100%; height: 100%; object-fit: cover; }
a { color: inherit; }
button, input { font: inherit; color: inherit; }
.hidden { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }
.price-was { display: block; font-weight: 500; color: var(--muted); text-decoration: line-through; font-size: .72rem; }

.back-choose {
  position: fixed; z-index: 400;
  top: max(10px, env(safe-area-inset-top));
  left: max(10px, env(safe-area-inset-left));
  padding: 8px 12px; background: var(--ink); color: #fff;
  font-size: .72rem; font-weight: 700; letter-spacing: .04em; text-decoration: none;
}

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; padding: 0 20px; border: 1px solid var(--ink);
  background: var(--panel); font-weight: 700; text-decoration: none; cursor: pointer; font-size: .9rem;
}
.btn--primary { background: var(--accent); color: #fff; border-color: var(--accent); }
.btn--ghost { background: transparent; }
.icon-btn, .text-btn {
  border: 0; background: transparent; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; position: relative;
}
.icon-btn { width: 44px; height: 44px; }
.text-btn { padding: 0 10px; min-height: 44px; font-size: .8rem; font-weight: 700; }
.cartbtn__count {
  position: absolute; top: 2px; right: 2px; min-width: 16px; height: 16px; border-radius: 999px;
  background: var(--accent); color: #fff; font-size: .62rem; font-weight: 800;
  display: none; align-items: center; justify-content: center; padding: 0 4px;
}
.cartbtn__count.show { display: inline-flex; }

/* Masthead: brand dead-center */
.masthead {
  position: sticky; top: 0; z-index: 200;
  background: rgba(232,238,243,.9); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.masthead__inner {
  max-width: 1120px; margin: 0 auto;
  display: grid; grid-template-columns: 1fr auto 1fr;
  align-items: center; gap: 12px; padding: 14px 18px;
}
.masthead__nav { display: none; gap: 16px; font-size: .82rem; }
.masthead__nav a { text-decoration: none; color: var(--muted); }
.masthead__nav a:hover { color: var(--ink); }
.logo {
  font-family: var(--display); font-style: italic; font-size: clamp(1.8rem, 5vw, 2.4rem);
  text-decoration: none; letter-spacing: .02em; text-align: center; justify-self: center;
}
.masthead__actions { justify-self: end; display: flex; align-items: center; gap: 4px; }
@media (min-width: 860px) {
  .masthead__nav { display: flex; }
}

/* Cover: text left / visual right — not full-bleed hero */
.cover {
  max-width: 1120px; margin: 0 auto;
  display: grid; gap: 0;
  min-height: min(78vh, 720px);
  border-bottom: 1px solid var(--line);
}
.cover__copy {
  padding: clamp(28px, 6vw, 64px) clamp(18px, 4vw, 40px);
  display: flex; flex-direction: column; justify-content: center;
  animation: fadeup .7s ease both;
}
.cover__issue {
  font-size: .75rem; letter-spacing: .22em; text-transform: uppercase; color: var(--accent); margin-bottom: 14px;
}
.cover__brand {
  font-family: var(--display); font-style: italic; font-weight: 700;
  font-size: clamp(3.4rem, 12vw, 6.2rem); line-height: .9; letter-spacing: -.02em;
}
.cover__deck {
  margin-top: 16px; font-family: var(--display); font-size: clamp(1.4rem, 3vw, 1.9rem); font-weight: 600;
}
.cover__lede { margin-top: 12px; color: var(--muted); max-width: 36ch; font-size: 1.02rem; }
.cover__cta { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 28px; }
.cover__visual {
  position: relative; min-height: 280px; background: var(--accent-soft);
  overflow: hidden;
}
.cover__slides { position: absolute; inset: 0; }
.hero__slide {
  position: absolute; inset: 0; opacity: 0; transition: opacity .8s ease;
  transform: scale(1.04);
}
.hero__slide.is-active { opacity: 1; transform: scale(1); transition: opacity .8s ease, transform 6s ease; }
.cover__dots {
  position: absolute; right: 16px; bottom: 16px; display: flex; gap: 6px; z-index: 2;
}
.cover__dots button {
  width: 22px; height: 2px; border: 0; background: rgba(255,255,255,.45); cursor: pointer;
}
.cover__dots button.is-active { background: #fff; }
@media (min-width: 900px) {
  .cover { grid-template-columns: 1.05fr .95fr; }
  .cover__visual { min-height: 100%; }
}

.edit-note {
  max-width: 1120px; margin: 0 auto;
  display: grid; gap: 10px; padding: 22px 18px;
  border-bottom: 1px solid var(--line);
  color: var(--muted); font-size: .92rem;
}
@media (min-width: 720px) {
  .edit-note { grid-template-columns: repeat(3, 1fr); gap: 24px; }
  .edit-note p + p { border-left: 1px solid var(--line); padding-left: 24px; }
}

.catalog { max-width: 1120px; margin: 0 auto; padding: 48px 18px 24px; }
.section-head { margin-bottom: 22px; }
.section-head--center { text-align: center; margin-left: auto; margin-right: auto; max-width: 40ch; }
.section-kicker {
  font-size: .72rem; letter-spacing: .2em; text-transform: uppercase; color: var(--accent); margin-bottom: 8px;
}
.section-head h2, .twin h2, .payments h2, .order-cta h2 {
  font-family: var(--display); font-style: italic; font-weight: 700;
  font-size: clamp(2rem, 5vw, 3rem); line-height: 1; margin-bottom: 8px;
}
.section-head p { color: var(--muted); }

.cats {
  display: flex; justify-content: center; gap: 8px; flex-wrap: wrap; margin-bottom: 22px;
}
.cat {
  border: 0; border-bottom: 1px solid transparent; background: transparent;
  padding: 8px 4px; color: var(--muted); cursor: pointer; font-size: .9rem;
}
.cat.active { color: var(--ink); border-bottom-color: var(--ink); font-weight: 700; }

/* Magazine mosaic */
.mag-grid {
  display: grid; gap: 18px;
  grid-template-columns: 1fr;
}
.mag-card {
  display: grid; gap: 12px; animation: fadeup .45s ease both;
}
.mag-card__media {
  aspect-ratio: 4/5; overflow: hidden; background: #d7e2eb;
}
.mag-card__body { display: grid; gap: 8px; }
.mag-card__body h3 { font-family: var(--display); font-size: 1.45rem; font-weight: 700; line-height: 1.15; }
.mag-card__body p { color: var(--muted); font-size: .9rem; }
.badge {
  width: fit-content; font-size: .68rem; letter-spacing: .08em; text-transform: uppercase;
  color: var(--accent); font-weight: 700;
}
.mag-card__row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 4px; }
.price { font-family: var(--display); font-size: 1.35rem; font-weight: 700; }
.add {
  border: 1px solid var(--ink); background: transparent; min-height: 40px; padding: 0 14px;
  cursor: pointer; font-weight: 700; font-size: .82rem;
}
.add:hover { background: var(--ink); color: #fff; }

.mag-card.is-featured {
  grid-column: 1 / -1;
  grid-template-columns: 1.2fr 1fr;
  align-items: center; gap: 24px;
  padding-bottom: 18px; margin-bottom: 8px; border-bottom: 1px solid var(--line);
}
.mag-card.is-featured .mag-card__media { aspect-ratio: 16/11; }
.mag-card.is-featured h3 { font-size: clamp(1.8rem, 4vw, 2.6rem); }

@media (min-width: 720px) {
  .mag-grid { grid-template-columns: repeat(2, 1fr); gap: 28px 22px; }
}
@media (min-width: 1020px) {
  .mag-grid { grid-template-columns: repeat(3, 1fr); }
  .mag-card.is-featured { grid-column: span 2; }
}
@media (max-width: 700px) {
  .mag-card.is-featured { grid-template-columns: 1fr; }
}

.twin {
  max-width: 1120px; margin: 32px auto; padding: 0 18px;
  display: grid; gap: 14px;
}
.twin__col {
  background: rgba(255,255,255,.55); border: 1px solid var(--line);
  padding: clamp(22px, 4vw, 36px);
}
.membership__perks { list-style: none; display: grid; gap: 8px; margin: 16px 0; color: var(--muted); }
.membership__perks li::before { content: "— "; color: var(--accent); }
.membership__summary {
  border-top: 1px solid var(--line); padding-top: 12px; margin-bottom: 14px; display: grid; gap: 4px;
}
.newsletter__form { display: grid; gap: 10px; margin-top: 16px; }
.newsletter__form input[type="email"] {
  border: 0; border-bottom: 1px solid var(--ink); background: transparent; padding: 12px 0; min-height: 48px;
}
.check { display: flex; gap: 10px; align-items: flex-start; font-size: .86rem; }
.form__error { color: var(--danger); font-size: .86rem; }
.newsletter__ok { color: var(--ok); font-size: .9rem; }
@media (min-width: 860px) {
  .twin { grid-template-columns: 1fr 1fr; gap: 0; }
  .twin__col + .twin__col { border-left: 0; }
}

.payments { max-width: 1120px; margin: 0 auto; padding: 40px 18px; }
.payments__band {
  display: grid; gap: 20px; padding: 28px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
}
.payments__list {
  list-style: none; display: flex; flex-wrap: wrap; gap: 10px 18px;
  font-family: var(--display); font-size: 1.35rem; font-style: italic;
}
.payments__note { margin-top: 14px; color: var(--muted); font-size: .9rem; max-width: 56ch; }
@media (min-width: 800px) {
  .payments__band { grid-template-columns: 1fr 1.2fr; align-items: end; }
}

.order-cta {
  text-align: center; padding: 56px 18px 72px; max-width: 560px; margin: 0 auto;
}
.order-cta p { color: var(--muted); margin: 10px 0 22px; }

.site-footer {
  border-top: 1px solid var(--line); padding: 28px 18px 48px; text-align: center; color: var(--muted); font-size: .86rem;
}
.site-footer__brand {
  font-family: var(--display); font-style: italic; color: var(--ink); font-size: 1.6rem; margin-bottom: 8px;
}

.fab-wa {
  position: fixed; right: max(14px, env(safe-area-inset-right)); bottom: max(14px, env(safe-area-inset-bottom));
  width: 54px; height: 54px; border-radius: 50%; background: #25d366; color: #fff;
  display: grid; place-items: center; z-index: 250; text-decoration: none;
  box-shadow: 0 8px 24px rgba(21,32,43,.18);
}

.agegate {
  position: fixed; inset: 0; z-index: 500;
  background: rgba(21,32,43,.78); display: grid; place-items: center; padding: 20px;
}
.agegate__panel {
  width: min(420px, 100%); background: var(--panel); border: 1px solid var(--line);
  padding: 32px 24px; display: grid; gap: 12px;
}
.agegate__brand { font-family: var(--display); font-style: italic; font-size: 1.8rem; }
.agegate__kicker { color: var(--accent); letter-spacing: .18em; font-size: .75rem; }
.agegate h1 { font-family: var(--display); font-size: 1.8rem; line-height: 1.15; }

.overlay {
  position: fixed; inset: 0; background: rgba(21,32,43,.35); z-index: 350;
  opacity: 0; pointer-events: none; transition: opacity .2s;
}
.overlay.show { opacity: 1; pointer-events: auto; }
.drawer {
  position: fixed; top: 0; right: 0; width: min(400px, 100%); height: 100%;
  background: var(--panel); z-index: 360; transform: translateX(100%); transition: transform .25s ease;
  display: flex; flex-direction: column; padding: 18px; border-left: 1px solid var(--line);
}
.drawer.show { transform: none; }
.drawer__head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.drawer__head h2 { font-family: var(--display); font-style: italic; }
.items { flex: 1; overflow: auto; display: grid; gap: 12px; align-content: start; }
.item { display: grid; grid-template-columns: 56px 1fr auto; gap: 10px; align-items: center; }
.item img { width: 56px; height: 56px; object-fit: cover; }
.item .info { display: grid; gap: 2px; font-size: .86rem; }
.qty { display: flex; align-items: center; gap: 6px; }
.qty button { width: 32px; height: 32px; border: 1px solid var(--line); background: #fff; cursor: pointer; }
.total { display: flex; justify-content: space-between; font-family: var(--display); font-size: 1.35rem; margin: 12px 0 6px; }
.cart-note { color: var(--muted); font-size: .8rem; margin-bottom: 10px; }
.checkout { width: 100%; }
.empty { color: var(--muted); padding: 24px 0; }

.modal.hidden { display: none; }
.modal { position: fixed; inset: 0; z-index: 420; display: grid; place-items: center; padding: 16px; }
.modal__backdrop { position: absolute; inset: 0; background: rgba(21,32,43,.4); }
.modal__panel {
  position: relative; width: min(440px, 100%); background: var(--panel);
  border: 1px solid var(--line); padding: 22px; max-height: 90vh; overflow: auto;
}
.modal__head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.modal__head h2 { font-family: var(--display); font-style: italic; }
.modal__lead { color: var(--muted); margin-bottom: 12px; }
.form { display: grid; gap: 12px; }
.form label { display: grid; gap: 6px; font-size: .86rem; font-weight: 700; }
.form input[type="text"], .form input[type="tel"], .form input[type="email"] {
  border: 0; border-bottom: 1px solid var(--ink); background: transparent; padding: 12px 0; min-height: 48px;
}
.member-card { border-top: 1px solid var(--line); padding-top: 14px; margin-bottom: 12px; display: grid; gap: 6px; }
.notice { background: var(--ink); color: #fff; padding: 10px 14px; font-size: .86rem; text-align: center; }

@keyframes fadeup {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: none; }
}
