/* ==========================================================================
   base.css — shared design tokens, reset and primitives
   Used by: A page, B page, privacy page
   Theme values are injected by JS from data/site-*.json (see applyTheme()).
   Keep this file free of any page-specific routing or links.
   ========================================================================== */

:root {
  /* palette (overridden per page at runtime) */
  --bg: #faf9f7;
  --surface: #ffffff;
  --ink: #14110f;
  --muted: #6f6a61;
  --line: #e3dfd6;
  --accent: #2f3a33;
  --accent-ink: #ffffff;

  /* shape */
  --radius: 2px;
  --scale: 1;

  /* layout */
  --max: 1240px;
  --gutter: 20px;
  --header-h: 62px;

  /* type */
  --font: "Inter", "Helvetica Neue", Helvetica, Arial, "Segoe UI", system-ui, sans-serif;
  --font-display: "Inter", "Helvetica Neue", Helvetica, Arial, sans-serif;

  /* motion */
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 12px);
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: calc(16px * var(--scale));
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

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

img {
  height: auto;
  background: color-mix(in srgb, var(--ink) 6%, transparent);
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
  border: 0;
  background: none;
}

h1,
h2,
h3,
h4,
p,
figure,
blockquote,
dl,
dd {
  margin: 0;
}

ul,
ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

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

::selection {
  background: var(--accent);
  color: var(--accent-ink);
}

/* --------------------------------------------------------------------------
   Layout primitives
   -------------------------------------------------------------------------- */

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

.container--narrow {
  max-width: 860px;
}

.section {
  padding-block: clamp(48px, 7vw, 96px);
}

.section--tight {
  padding-block: clamp(32px, 4vw, 56px);
}

.section-head {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: clamp(24px, 3.4vw, 44px);
}

.section-head .eyebrow {
  order: -1;
}

/* --------------------------------------------------------------------------
   Type primitives
   -------------------------------------------------------------------------- */

.eyebrow {
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
}

.display {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 0.98;
  letter-spacing: -0.025em;
  font-size: clamp(2.35rem, 6.2vw, 4.25rem);
  text-wrap: balance;
}

.h2 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.06;
  letter-spacing: -0.02em;
  font-size: clamp(1.6rem, 3.4vw, 2.5rem);
  text-wrap: balance;
}

.h3 {
  font-size: clamp(1.05rem, 1.6vw, 1.25rem);
  font-weight: 600;
  letter-spacing: -0.01em;
}

.lede {
  color: var(--muted);
  font-size: clamp(0.95rem, 1.2vw, 1.0625rem);
  line-height: 1.6;
  max-width: 56ch;
  text-wrap: pretty;
}

.small {
  font-size: 0.8125rem;
  color: var(--muted);
}

/* --------------------------------------------------------------------------
   Buttons
   -------------------------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 0 22px;
  border-radius: var(--radius);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
  transition: background-color 0.25s var(--ease), color 0.25s var(--ease),
    border-color 0.25s var(--ease), transform 0.25s var(--ease), opacity 0.25s var(--ease);
}

.btn:active {
  transform: translateY(1px);
}

.btn--primary {
  background: var(--accent);
  color: var(--accent-ink);
}

.btn--primary:hover {
  background: color-mix(in srgb, var(--accent) 86%, var(--ink));
}

.btn--ghost {
  border: 1px solid color-mix(in srgb, var(--ink) 22%, transparent);
  color: var(--ink);
}

.btn--ghost:hover {
  border-color: var(--ink);
}

.btn--light {
  background: var(--surface);
  color: var(--ink);
}

.btn--block {
  width: 100%;
}

.btn svg {
  width: 16px;
  height: 16px;
  flex: none;
}

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  border-bottom: 1px solid color-mix(in srgb, var(--ink) 35%, transparent);
  padding-bottom: 2px;
  transition: gap 0.25s var(--ease), border-color 0.25s var(--ease);
}

.link-arrow:hover {
  gap: 10px;
  border-color: var(--ink);
}

/* --------------------------------------------------------------------------
   Announcement bar + header (structure shared, styling per page)
   -------------------------------------------------------------------------- */

.announce {
  background: var(--ink);
  color: var(--bg);
  text-align: center;
  font-size: 0.6875rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 9px var(--gutter);
}

.announce[hidden] {
  display: none;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid var(--line);
}

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

.wordmark {
  display: inline-flex;
  flex-direction: column;
  line-height: 1;
  gap: 3px;
}

.wordmark__main {
  font-size: 0.9375rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.wordmark__sub {
  font-size: 0.5rem;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--muted);
}

.site-nav {
  display: none;
  gap: 26px;
}

.site-nav a {
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  padding-block: 6px;
  border-bottom: 1px solid transparent;
  transition: color 0.2s, border-color 0.2s;
}

.site-nav a:hover {
  color: var(--ink);
  border-color: var(--ink);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.header-wa {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  padding: 9px 14px;
  border: 1px solid color-mix(in srgb, var(--ink) 18%, transparent);
  border-radius: var(--radius);
  transition: border-color 0.2s, background 0.2s;
}

.header-wa:hover {
  border-color: var(--ink);
}

.header-wa svg {
  width: 15px;
  height: 15px;
}

/* --------------------------------------------------------------------------
   Product card (shared structure)
   -------------------------------------------------------------------------- */

.product-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(14px, 2vw, 30px) clamp(10px, 1.6vw, 22px);
}

.product-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.product-card__media {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  background: color-mix(in srgb, var(--ink) 5%, transparent);
  border-radius: var(--radius);
}

.product-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.7s var(--ease);
}

.product-card:hover .product-card__media img {
  transform: scale(1.035);
}

.product-card__badge {
  position: absolute;
  top: 10px;
  left: 10px;
  background: var(--accent);
  color: var(--accent-ink);
  font-size: 0.5625rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 5px 8px;
  border-radius: 1px;
}

.product-card__body {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding-top: 12px;
}

.product-card__row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}

.product-card__title {
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: -0.005em;
  line-height: 1.3;
}

.product-card__price {
  font-size: 0.875rem;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.product-card__price s {
  color: var(--muted);
  font-size: 0.75rem;
  margin-right: 5px;
}

.product-card__desc {
  font-size: 0.75rem;
  line-height: 1.5;
  color: var(--muted);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.sizes {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 4px;
}

.size-chip {
  min-width: 30px;
  height: 26px;
  padding: 0 7px;
  border: 1px solid var(--line);
  border-radius: 1px;
  font-size: 0.625rem;
  letter-spacing: 0.06em;
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.18s var(--ease);
}

.size-chip:hover {
  border-color: var(--ink);
  color: var(--ink);
}

.size-chip[aria-pressed="true"] {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--bg);
}

.product-card__cta {
  margin-top: 6px;
  min-height: 38px;
  font-size: 0.6875rem;
  letter-spacing: 0.1em;
  padding: 0 12px;
}

.product-card__cta svg {
  width: 14px;
  height: 14px;
}

.empty-note {
  padding: 40px 0;
  text-align: center;
  color: var(--muted);
  font-size: 0.875rem;
}

/* --------------------------------------------------------------------------
   FAQ accordion
   -------------------------------------------------------------------------- */

.faq {
  border-top: 1px solid var(--line);
}

.faq__item {
  border-bottom: 1px solid var(--line);
}

.faq__item summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 0;
  font-size: 0.9375rem;
  font-weight: 500;
  cursor: pointer;
  list-style: none;
}

.faq__item summary::-webkit-details-marker {
  display: none;
}

.faq__icon {
  position: relative;
  width: 12px;
  height: 12px;
  flex: none;
}

.faq__icon::before,
.faq__icon::after {
  content: "";
  position: absolute;
  inset: 50% 0 auto 0;
  height: 1px;
  background: currentColor;
  transition: transform 0.28s var(--ease);
}

.faq__icon::after {
  transform: rotate(90deg);
}

.faq__item[open] .faq__icon::after {
  transform: rotate(0deg);
}

.faq__answer {
  padding: 0 0 20px;
  color: var(--muted);
  font-size: 0.875rem;
  line-height: 1.65;
  max-width: 68ch;
}

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */

.site-footer {
  border-top: 1px solid var(--line);
  padding-block: 40px 28px;
}

.footer__top {
  display: flex;
  flex-direction: column;
  gap: 22px;
  padding-bottom: 26px;
}

.footer__contact {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.8125rem;
  color: var(--muted);
}

.footer__contact a:hover {
  color: var(--ink);
}

.footer__links {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  font-size: 0.75rem;
  color: var(--muted);
}

.footer__links a:hover {
  color: var(--ink);
}

.footer__bottom {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  justify-content: space-between;
  border-top: 1px solid var(--line);
  padding-top: 18px;
  font-size: 0.6875rem;
  color: var(--muted);
  letter-spacing: 0.02em;
}

/* --------------------------------------------------------------------------
   Sticky mobile action bar
   -------------------------------------------------------------------------- */

.mobile-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 45;
  display: flex;
  gap: 8px;
  padding: 10px var(--gutter) calc(10px + env(safe-area-inset-bottom));
  background: color-mix(in srgb, var(--bg) 95%, transparent);
  backdrop-filter: blur(12px);
  border-top: 1px solid var(--line);
}

.mobile-bar .btn {
  flex: 1;
  min-height: 44px;
}

@media (min-width: 768px) {
  :root {
    --gutter: 32px;
    --header-h: 72px;
  }

  .site-nav {
    display: flex;
  }

  .mobile-bar {
    display: none;
  }

  .product-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (min-width: 1024px) {
  :root {
    --gutter: 44px;
  }

  .product-grid--4 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  body {
    padding-bottom: 0;
  }
}

/* --------------------------------------------------------------------------
   Motion / reveal
   -------------------------------------------------------------------------- */

[data-reveal] {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
  will-change: opacity, transform;
}

[data-reveal].is-in {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }

  [data-reveal] {
    opacity: 1;
    transform: none;
  }
}

/* --------------------------------------------------------------------------
   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;
}

[hidden] {
  display: none !important;
}

#toast {
  position: fixed;
  left: 50%;
  bottom: 84px;
  transform: translate(-50%, 12px);
  background: var(--ink);
  color: var(--bg);
  font-size: 0.8125rem;
  padding: 10px 18px;
  border-radius: 2px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s, transform 0.25s;
  z-index: 90;
}

#toast.is-on {
  opacity: 1;
  transform: translate(-50%, 0);
}

/* Edit-mode affordances (only active inside the admin preview iframe) */
body.is-editing [data-edit] {
  outline: 1px dashed color-mix(in srgb, #2f6df6 55%, transparent);
  outline-offset: 3px;
  cursor: text;
}

body.is-editing [data-edit]:hover {
  outline-color: #2f6df6;
  background: color-mix(in srgb, #2f6df6 6%, transparent);
}

body.is-editing [data-edit-image] {
  position: relative;
  cursor: pointer;
}

body.is-editing [data-edit-image]::after {
  content: "Replace image";
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  background: #2f6df6;
  color: #fff;
  font-size: 11px;
  letter-spacing: 0.04em;
  padding: 6px 10px;
  border-radius: 3px;
  opacity: 0;
  transition: opacity 0.18s;
  pointer-events: none;
  white-space: nowrap;
}

body.is-editing [data-edit-image]:hover::after {
  opacity: 1;
}

body.is-editing a,
body.is-editing button {
  pointer-events: none;
}
