/* ==========================================================================
   OSAKA TAIKO SHOWROOM — Light Blue Japanese Luxury
   tokens.css · design tokens, reset, base type, buttons, forms
   Palette: ice-blue and white surfaces, deep navy ink and panels,
   Taiko red kept selective — primary actions and small accents.
   ========================================================================== */

:root {
  /* ---- Ground: ice blue (page), powder blue (secondary), white (cards) -- */
  --glass:     #f2f7fb;
  --glass-2:   #e4eff8;
  --glass-3:   #dce9f4;
  --paper:     #ffffff;   /* cards, product tiles */

  /* ---- Deep navy ink ramp ------------------------------------------------ */
  --forest:    #193b68;
  --forest-2:  #526a7d;
  --forest-3:  #5c7385;
  --forest-4:  #8fa6b8;

  --hairline:      #c9dceb;
  --hairline-soft: #dce9f3;

  /* ---- Accent: Taiko red ------------------------------------------------- */
  --ochre:      #b8322d;
  --ochre-deep: #922622;
  --ochre-wash: rgba(184, 50, 45, 0.12);
  --on-ochre:   #ffffff;
  --ochre-soft: color-mix(in srgb, var(--ochre) 50%, var(--glass));

  /* ---- Secondary brand: deep navy ---------------------------------------- */
  --navy:      #193b68;
  --navy-wash: rgba(25, 59, 104, 0.14);

  /* ---- Functional (shop states, never decoration) ----------------------- */
  --sale:      #b8322d;
  --sale-wash: rgba(184, 50, 45, 0.10);
  --stock:      #3d6b4a;
  --stock-wash: rgba(61, 107, 74, 0.12);
  --low:      #a8720d;
  --low-wash: rgba(168, 114, 13, 0.12);

  /* ---- Type ------------------------------------------------------------- */
  --font-display: "Epilogue", ui-sans-serif, system-ui, "Noto Sans JP", "Noto Sans Myanmar", sans-serif;
  --font-body:    "Be Vietnam Pro", ui-sans-serif, system-ui, "Noto Sans JP", "Noto Sans Myanmar", sans-serif;
  --font-mono:    "Sometype Mono", ui-monospace, "SF Mono", "Noto Sans JP", "Noto Sans Myanmar", monospace;
  --font-label:   var(--font-mono);

  /* Vertical rhythm / tracking — overridden per language below. */
  --heading-lh: 1.18;
  --heading-ls: -0.028em;
  --body-lh: 1.6;
  --paragraph-lh: 1.65;
  --lede-lh: 1.6;
  --read-lh: 1.75;
  --label-ls: 0.11em;

  --text-xs:   0.75rem;
  --text-sm:   0.8438rem;
  --text-base: 0.9375rem;
  --text-md:   1.0625rem;
  --text-lg:   1.3125rem;
  --text-xl:   1.75rem;
  --text-2xl:  clamp(1.75rem, 1.35rem + 1.5vw, 2.6rem);
  /* Shop-first layout: no oversized marketing hero anywhere. */
  --text-hero: clamp(2rem, 1.4rem + 2.4vw, 3.4rem);

  /* ---- Space ------------------------------------------------------------ */
  --s-1: 0.25rem;
  --s-2: 0.5rem;
  --s-3: 0.75rem;
  --s-4: 1rem;
  --s-5: 1.5rem;
  --s-6: 2rem;
  --s-7: 3rem;
  --s-8: 4.5rem;

  --gutter: clamp(1rem, 0.4rem + 2.4vw, 3rem);
  --maxw: 1400px;

  /* ---- Shape ------------------------------------------------------------ */
  --r-sm: 4px;
  --r-md: 8px;
  --r-lg: 14px;
  --r-pill: 999px;

  --shadow-sm: 0 1px 2px rgba(25, 59, 104, 0.06);
  --shadow-md: 0 10px 30px -12px rgba(25, 59, 104, 0.18);
  --shadow-lg: 0 26px 60px -22px rgba(25, 59, 104, 0.24);

  /* ---- Motion ----------------------------------------------------------- */
  --dur-fast: 140ms;
  --dur: 240ms;
  --dur-slow: 620ms;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);

  --z-drawer: 60;
  --z-toast: 80;
}

/* ==========================================================================
   Reset
   ========================================================================== */

*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }

[hidden] { display: none !important; }

html { -webkit-text-size-adjust: 100%; overflow-x: clip; }

body {
  background: var(--glass);
  color: var(--forest);
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: var(--body-lh);
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

img, svg { display: block; max-width: 100%; }
img { height: auto; }

button, input, select, textarea { font: inherit; color: inherit; }
button { background: none; border: 0; cursor: pointer; }

a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; padding: 0; }
table { border-collapse: collapse; width: 100%; }

:focus-visible {
  outline: 2px solid var(--navy);
  outline-offset: 3px;
  border-radius: var(--r-sm);
}

::selection { background: var(--ochre); color: var(--on-ochre); }

/* ==========================================================================
   Typography
   ========================================================================== */

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: var(--heading-ls);
  line-height: var(--heading-lh);
  color: var(--forest);
}

h1 { font-size: var(--text-2xl); }
h2 { font-size: var(--text-xl); }
h3 { font-size: var(--text-md); }

p { line-height: var(--paragraph-lh); }

.label {
  font-family: var(--font-label);
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: var(--label-ls);
  text-transform: uppercase;
  color: var(--forest-3);
  line-height: 1.5;
}

/* Prices and any figure a shopper compares — tabular so columns line up. */
.num {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
}

.muted { color: var(--forest-3); }
.soft  { color: var(--forest-2); }

.lede {
  font-size: var(--text-md);
  line-height: var(--lede-lh);
  color: var(--forest-2);
  max-width: 58ch;
}

.read { max-width: 66ch; color: var(--forest-2); line-height: var(--read-lh); }
.read p + p { margin-top: 1.15em; }

/* ==========================================================================
   Multilingual typography
   --------------------------------------------------------------------------
   One design system, language-aware rendering. English keeps the Fernwick
   stacks (Epilogue / Be Vietnam Pro / Sometype Mono). Japanese and Burmese
   swap in script-native fonts through the same variables and loosen vertical
   rhythm and tracking so diacritics are never clipped or crowded.
   ========================================================================== */

html[lang="ja"] {
  --font-display: "Noto Sans JP", "Hiragino Kaku Gothic ProN", "Yu Gothic", Meiryo, ui-sans-serif, system-ui, sans-serif;
  --font-body:    "Noto Sans JP", "Hiragino Kaku Gothic ProN", "Yu Gothic", Meiryo, ui-sans-serif, system-ui, sans-serif;
  --font-label:   "Noto Sans JP", "Hiragino Kaku Gothic ProN", "Yu Gothic", Meiryo, ui-sans-serif, system-ui, sans-serif;

  --heading-lh: 1.4;
  --heading-ls: 0.01em;
  --body-lh: 1.75;
  --paragraph-lh: 1.85;
  --lede-lh: 1.85;
  --read-lh: 1.9;
  --label-ls: 0.06em;
}

html[lang="my"] {
  --font-display: "Noto Sans Myanmar", "Myanmar Text", "Padauk", ui-sans-serif, system-ui, sans-serif;
  --font-body:    "Noto Sans Myanmar", "Myanmar Text", "Padauk", ui-sans-serif, system-ui, sans-serif;
  --font-label:   "Noto Sans Myanmar", "Myanmar Text", "Padauk", ui-sans-serif, system-ui, sans-serif;

  --heading-lh: 1.6;
  --heading-ls: normal;
  --body-lh: 1.85;
  --paragraph-lh: 1.95;
  --lede-lh: 1.95;
  --read-lh: 2;
  --label-ls: normal;
}

/* Labels/badges are small: give Myanmar script (and the tall Latin in
   Noto Sans JP) enough leading that descenders are never cut. */
html[lang="ja"] .label { line-height: 1.6; }
html[lang="my"] .label,
html[lang="my"] .badge { line-height: 1.7; }

/* Uppercase and wide tracking are Latin-only devices: skip them where the
   script has no case and its marks need to stay tight. */
html[lang="ja"] :is(.label, .badge, .announce p),
html[lang="my"] :is(.label, .badge, .announce p) {
  text-transform: none;
}

html[lang="ja"] :is(.announce p, .badge, .btn, .product__name),
html[lang="my"] :is(.announce p, .badge, .btn, .product__name) {
  letter-spacing: normal;
}

/* Longer JA/MY navigation labels: tighter gaps, a narrower search field,
   and the nav may wrap to a second line instead of overflowing. */
html[lang="ja"] .shopnav,
html[lang="my"] .shopnav { column-gap: var(--s-4); }

html[lang="ja"] .searchbox,
html[lang="my"] .searchbox { width: min(200px, 26vw); }

/* Mid widths: the longer JA/MY labels need that header space, so the
   decorative search field steps aside before the nav starts wrapping. */
@media (max-width: 1100px) {
  html[lang="ja"] .searchbox,
  html[lang="my"] .searchbox { display: none; }
}


.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;
}

/* ==========================================================================
   Layout helpers
   ========================================================================== */

.wrap {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section { padding-block: var(--s-7); }
.section--tight { padding-block: var(--s-6); }

.sechead {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--s-4);
  flex-wrap: wrap;
  margin-bottom: var(--s-5);
}
.sechead p { color: var(--forest-3); font-size: var(--text-sm); margin-top: 4px; }

.rule { height: 1px; background: var(--hairline); border: 0; }

.grid { display: grid; gap: var(--s-5); }
.grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

@media (max-width: 1080px) { .grid--4 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 860px)  { .grid--3, .grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px)  { .grid--2, .grid--3, .grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* ==========================================================================
   Buttons
   ========================================================================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--s-2);
  min-height: 44px;
  height: auto;
  padding: 0.5rem var(--s-5);
  border: 1px solid transparent;
  border-radius: var(--r-pill);
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: 600;
  letter-spacing: -0.005em;
  white-space: nowrap;
  transition: background var(--dur-fast) var(--ease),
              color var(--dur-fast) var(--ease),
              border-color var(--dur-fast) var(--ease),
              transform var(--dur-fast) var(--ease);
}
.btn:active { transform: translateY(1px); }
.btn svg { width: 16px; height: 16px; flex: none; }

.btn--primary { background: var(--ochre); color: var(--on-ochre); }
.btn--primary:hover { background: var(--ochre-deep); }

.btn--ochre { background: var(--ochre); color: var(--on-ochre); }
.btn--ochre:hover { background: var(--ochre-deep); }

.btn--ghost { border-color: var(--hairline); color: var(--forest-2); background: transparent; }
.btn--ghost:hover { border-color: var(--forest); color: var(--forest); background: var(--paper); }

.btn--quiet { color: var(--forest-3); padding: 0.25rem var(--s-3); min-height: 38px; height: auto; }
.btn--quiet:hover { color: var(--forest); }

.btn--sm { min-height: 36px; height: auto; padding: 0.4rem var(--s-4); font-size: var(--text-xs); }
.btn--block { width: 100%; }

.btn[disabled] { opacity: 0.45; pointer-events: none; }

.btn--icon {
  width: 40px; height: 40px;
  padding: 0;
  border-radius: 50%;
  color: var(--forest-2);
  position: relative;
}
.btn--icon:hover { background: var(--glass-2); color: var(--forest); }
.btn--icon svg { width: 19px; height: 19px; }

/* Text link with a growing underline */
.tlink {
  position: relative;
  font-weight: 600;
  color: var(--forest);
  padding-bottom: 2px;
}
.tlink::after {
  content: "";
  position: absolute;
  left: 0; bottom: 0;
  width: 100%; height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.4s var(--ease);
}
.tlink:hover { color: var(--ochre); }
.tlink:hover::after { transform: scaleX(1); transform-origin: left; }

/* ==========================================================================
   Badges — colour carries stock/price state only
   ========================================================================== */

.badge {
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
  padding: 3px 10px;
  border-radius: var(--r-pill);
  font-family: var(--font-mono);
  font-size: 0.6563rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: normal;
  background: var(--glass-3);
  color: var(--forest-2);
}
.badge--sale  { background: var(--sale-wash);  color: var(--sale); }
.badge--stock { background: var(--stock-wash); color: var(--stock); }
.badge--low   { background: var(--low-wash);   color: var(--low); }
.badge--new   { background: var(--forest);     color: var(--paper); }
.badge .dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; flex: none; }

/* ==========================================================================
   Forms
   ========================================================================== */

.field { display: grid; gap: var(--s-2); }
.field > label { font-size: var(--text-sm); font-weight: 600; color: var(--forest-2); }
.field .hint { font-size: var(--text-xs); color: var(--forest-3); }

.input, .select, .textarea {
  width: 100%;
  min-height: 44px;
  height: auto;
  padding: 0.55rem var(--s-4);
  background: var(--paper);
  border: 1px solid var(--hairline);
  border-radius: var(--r-md);
  font-size: var(--text-sm);
  color: var(--forest);
  transition: border-color var(--dur-fast) var(--ease), box-shadow var(--dur-fast) var(--ease);
}
.textarea { height: auto; padding: var(--s-3) var(--s-4); min-height: 110px; resize: vertical; line-height: var(--paragraph-lh); }
.input::placeholder, .textarea::placeholder { color: var(--forest-4); }

.input:focus, .select:focus, .textarea:focus {
  outline: none;
  border-color: var(--navy);
  box-shadow: 0 0 0 3px var(--navy-wash);
}

.select {
  appearance: none;
  cursor: pointer;
  padding-right: var(--s-6);
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%235c7385' stroke-width='1.6' stroke-linecap='round'><path d='M4 6.5 8 10.5 12 6.5'/></svg>");
  background-repeat: no-repeat;
  background-position: right var(--s-3) center;
  background-size: 16px;
}

.check {
  appearance: none;
  width: 17px; height: 17px;
  flex: none;
  border: 1.5px solid var(--forest-4);
  border-radius: 4px;
  cursor: pointer;
  display: grid;
  place-content: center;
  transition: background var(--dur-fast) var(--ease), border-color var(--dur-fast) var(--ease);
}
.check::after {
  content: "";
  width: 8px; height: 4px;
  border-left: 2px solid var(--on-ochre);
  border-bottom: 2px solid var(--on-ochre);
  transform: rotate(-45deg) scale(0);
  transition: transform var(--dur-fast) var(--ease);
  margin-top: -2px;
}
.check:checked { background: var(--ochre); border-color: var(--ochre); }
.check:checked::after { transform: rotate(-45deg) scale(1); }

/* ==========================================================================
   Motion preference
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
