/* ==========================================================================
   ADICHIKO — BASE: reset, typography, layout, header, footer, buttons.
   Styles through tokens.css only. Component 1 (foundation & shell).
   ========================================================================== */

/* --- Reset --- */
*, *::before, *::after { box-sizing: border-box; }
body, h1, h2, h3, h4, h5, h6, p, figure, blockquote, ul, ol, dl { margin: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
img, picture, svg, video { max-width: 100%; display: block; height: auto; }
button, input, select, textarea { font: inherit; color: inherit; }

/* --- Base --- */
body {
  background: var(--ink);
  color: var(--paper-2);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
::selection { background: var(--gold); color: var(--ink); }

h1, h2, h3, h4 {
  font-family: var(--font-serif);
  color: var(--paper);
  font-weight: 500;
  line-height: 1.1;
  text-wrap: balance;
}
h1 { font-size: clamp(2.4rem, 6vw, 4rem); }
h2 { font-size: clamp(1.8rem, 4vw, 2.6rem); }
h3 { font-size: clamp(1.3rem, 3vw, 1.7rem); }

p { max-width: var(--read); }
a { color: var(--gold); text-decoration: none; transition: color .2s var(--ease); }
a:hover { color: var(--gold-bright); }
strong { color: var(--paper); font-weight: 600; }

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

/* --- Layout --- */
.container { max-width: var(--container); margin-inline: auto; padding-inline: var(--s5); }
.site-main { padding-block: var(--s8); min-height: 50vh; }
.eyebrow {
  font-size: .72rem; font-weight: 600; letter-spacing: .22em;
  text-transform: uppercase; color: var(--gold);
}

/* --- Buttons --- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--s2);
  font-family: var(--font-sans); font-weight: 600; letter-spacing: .1em;
  text-transform: uppercase; font-size: .8rem;
  border-radius: var(--r-sm); cursor: pointer; border: 1px solid transparent;
  padding: 14px 26px;
  transition: transform .2s var(--ease), background .2s, color .2s, border-color .2s;
}
.btn--primary { background: var(--gold); color: #100C06; }
.btn--primary:hover { background: var(--gold-bright); color: #100C06; }
.btn--ghost { background: transparent; border-color: var(--line-2); color: var(--paper); }
.btn--ghost:hover { border-color: var(--gold); color: var(--gold); }

/* ==========================================================================
   HEADER
   ========================================================================== */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: color-mix(in srgb, var(--ink) 86%, transparent);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.site-header .header-inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: var(--s5); height: var(--header-h);
}

/* Brand / logo */
.site-brand { display: flex; align-items: center; }
.site-brand .custom-logo { max-height: 40px; width: auto; }
.brand-text {
  font-family: var(--font-serif); font-size: 1.4rem; letter-spacing: .32em;
  color: var(--paper); text-transform: uppercase; padding-left: .32em;
}
.brand-text b { color: var(--gold); font-weight: 500; }

/* Primary nav */
.primary-nav { display: flex; }
.primary-nav ul, .nav-menu {
  display: flex; gap: var(--s6); list-style: none; margin: 0; padding: 0;
}
.primary-nav a, .nav-menu a {
  color: var(--paper-2); font-size: .78rem; letter-spacing: .14em;
  text-transform: uppercase; padding: 6px 0; position: relative;
}
.primary-nav a:hover, .nav-menu a:hover { color: var(--gold); }
.primary-nav .current-menu-item > a { color: var(--paper); }

/* Utility icons */
.header-utils { display: flex; align-items: center; gap: var(--s4); }
.header-utils a { color: var(--paper); display: inline-flex; }
.header-utils a:hover { color: var(--gold); }
.cart-link { position: relative; }
.cart-count {
  position: absolute; top: -8px; right: -10px;
  background: var(--gold); color: var(--ink);
  font-family: var(--font-sans); font-size: .62rem; font-weight: 600;
  min-width: 16px; height: 16px; border-radius: 100px;
  display: inline-flex; align-items: center; justify-content: center;
  padding: 0 4px; letter-spacing: 0;
}
.nav-toggle {
  display: none; background: none; border: 0; cursor: pointer;
  color: var(--paper); padding: 6px;
}

/* Mobile */
@media (max-width: 900px) {
  .primary-nav {
    position: fixed; inset: var(--header-h) 0 0 auto; width: min(82vw, 340px);
    background: var(--ink-2); border-left: 1px solid var(--line);
    transform: translateX(100%); transition: transform var(--dur) var(--ease);
    padding: var(--s6) var(--s5); overflow-y: auto;
  }
  .primary-nav.is-open { transform: translateX(0); }
  .primary-nav ul, .nav-menu { flex-direction: column; gap: var(--s4); }
  .primary-nav a, .nav-menu a { font-size: .95rem; }
  .nav-toggle { display: inline-flex; }
}

/* ==========================================================================
   FOOTER
   ========================================================================== */
.site-footer {
  border-top: 1px solid var(--line);
  background: var(--ink-inset);
  padding-block: var(--s8) var(--s6);
  margin-top: var(--s9);
}
.footer-top {
  display: flex; flex-wrap: wrap; gap: var(--s7); justify-content: space-between;
  padding-bottom: var(--s7); border-bottom: 1px solid var(--line);
}
.footer-brand .brand-text { font-size: 1.2rem; }
.footer-brand p { color: var(--muted); font-size: .88rem; margin-top: var(--s3); max-width: 24rem; }
.footer-nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--s2); }
.footer-nav a { color: var(--paper-2); font-size: .85rem; }
.footer-nav a:hover { color: var(--gold); }
.footer-bottom {
  padding-top: var(--s5); color: var(--muted); font-size: .78rem;
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: var(--s3);
}

/* ==========================================================================
   BASIC CONTENT (fallback until per-template components land)
   ========================================================================== */
.entry-title { margin-bottom: var(--s4); }
.entry-content { max-width: var(--read); }
.entry-content > * + * { margin-top: var(--s4); }
.page-hero { padding-block: var(--s8) var(--s6); }

/* --- Accessibility helpers --- */
.screen-reader-text {
  position: absolute !important;
  width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.skip-link:focus {
  position: fixed; top: 8px; left: 8px; z-index: 200;
  width: auto; height: auto; clip: auto; margin: 0;
  background: var(--gold); color: var(--ink);
  padding: 10px 16px; border-radius: var(--r-sm); font-weight: 600;
}
