/* =========================================================
   AMTAF TRADING CARD SHOP — shared stylesheet
   Multilingual balance: ja / en / es / zh
   ========================================================= */

/* ---- Web fonts ----
   Latin (en/es): Poppins (display) + Inter (body)
   Japanese:      Noto Sans JP
   Chinese (SC):  Noto Sans SC
   All are loaded per-page via <link> in <head> so unused
   scripts aren't downloaded on pages that don't need them.
*/

:root {
  --color-bg: #0a0a0a;
  --color-bg-alt: #121212;
  --color-panel: #161616;
  --color-border: #2a2a2a;
  --color-orange: #ff9400;
  --color-orange-soft: #ffb03d;
  --color-white: #f5f5f5;
  --color-gray: #a8a8a8;
  --color-gray-dim: #7a7a7a;
  --max-width: 1200px;

  /* Default (Latin) typography */
  --font-heading: 'Poppins', 'Inter', sans-serif;
  --font-body: 'Inter', sans-serif;
  --heading-tracking: 0.01em;
  --heading-transform: uppercase;
  --body-line-height: 1.6;
  --heading-line-height: 1.05;
  --heading-weight: 800;
  --nav-tracking: 0.04em;
}

/* Japanese balance: no forced uppercase, more line-height/tracking
   for legibility, slightly lighter heading weight so it doesn't
   look heavier than the Latin version at the same size. */
html[lang="ja"] {
  --font-heading: 'Noto Sans JP', sans-serif;
  --font-body: 'Noto Sans JP', sans-serif;
  --heading-tracking: 0;
  --heading-transform: none;
  --body-line-height: 1.9;
  --heading-line-height: 1.4;
  --heading-weight: 700;
  --nav-tracking: 0.02em;
}

/* Chinese (Simplified) balance: similar reasoning to Japanese. */
html[lang="zh"] {
  --font-heading: 'Noto Sans SC', sans-serif;
  --font-body: 'Noto Sans SC', sans-serif;
  --heading-tracking: 0;
  --heading-transform: none;
  --body-line-height: 1.9;
  --heading-line-height: 1.4;
  --heading-weight: 700;
  --nav-tracking: 0.02em;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  background: var(--color-bg);
  color: var(--color-white);
  font-family: var(--font-body);
  line-height: var(--body-line-height);
  -webkit-font-smoothing: antialiased;
}

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

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

ul { list-style: none; }

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

h1, h2, h3 {
  font-family: var(--font-heading);
  font-weight: var(--heading-weight);
  line-height: var(--heading-line-height);
  letter-spacing: var(--heading-tracking);
  text-transform: var(--heading-transform);
}

.eyebrow {
  font-family: var(--font-heading);
  font-weight: 600;
  letter-spacing: var(--nav-tracking);
  text-transform: var(--heading-transform);
  font-size: 0.85rem;
}

.section-label {
  font-family: var(--font-heading);
  font-weight: 700;
  letter-spacing: var(--nav-tracking);
  text-transform: var(--heading-transform);
}

/* ---- Placeholder image blocks ----
   Used instead of real photography until assets are ready.
   Swap by replacing the div with an <img> and removing this class. */
.placeholder-img {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 8px;
  background:
    repeating-linear-gradient(45deg, #1a1a1a, #1a1a1a 10px, #151515 10px, #151515 20px);
  border: 1px dashed #3a3a3a;
  border-radius: 8px;
  color: var(--color-gray-dim);
  font-family: var(--font-body);
  font-size: 0.8rem;
  text-align: center;
  width: 100%;
}

.placeholder-img svg { width: 32px; height: 32px; opacity: 0.5; }

.site-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 8px;
  display: block;
  background: #151515;
}

/* ---- Header ---- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(10, 10, 10, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--color-border);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: 76px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  white-space: nowrap;
}

.logo img {
  height: 40px;
  width: auto;
  display: block;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 28px;
  flex-wrap: wrap;
}

.main-nav a {
  font-family: var(--font-heading);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: var(--nav-tracking);
  text-transform: var(--heading-transform);
  color: var(--color-white);
  opacity: 0.85;
}

.main-nav a:hover { opacity: 1; color: var(--color-orange); }

.lang-switch {
  position: relative;
}

.lang-switch summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--color-border);
  border-radius: 6px;
  padding: 8px 12px;
  font-family: var(--font-heading);
  font-size: 0.75rem;
  font-weight: 700;
}

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

.lang-switch[open] summary { border-color: var(--color-orange); }

.lang-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  background: var(--color-panel);
  border: 1px solid var(--color-border);
  border-radius: 8px;
  overflow: hidden;
  min-width: 140px;
}

.lang-menu a {
  display: block;
  padding: 10px 14px;
  font-size: 0.85rem;
}

.lang-menu a:hover { background: var(--color-bg-alt); color: var(--color-orange); }

.lang-menu a[aria-current="true"] { color: var(--color-orange); }

/* ---- Hero ---- */
.hero {
  position: relative;
  padding: 64px 0 56px;
  overflow: hidden;
  background: linear-gradient(180deg, #141414 0%, #0a0a0a 70%);
}

/* .hero-photo is a plain sibling div (not nested inside .container), using
   the standard "absolute + inset:0 + margin:auto + max-width" centering
   technique — the same well-supported trick used to center any absolutely
   positioned box, no calc()/min()/max() involved.
   - inset:0 (top/right/bottom/left all 0) makes it stretch to fill
     .hero's full height, top to bottom, same as .hero's own padding box.
   - max-width:1200px + margin:0 auto caps its width and centers it exactly
     like .container does, so once the viewport passes 1200px the extra
     space is split evenly left/right instead of the box touching the
     browser edge. */
.hero-photo {
  position: absolute;
  inset: 0;
  max-width: 1200px;
  margin: 0 auto;
  background-image: url('../img/hero.webp');
  background-repeat: no-repeat;
  background-position: right center;
  background-size: auto 100%;
  z-index: 0;
}

.hero .container {
  position: relative;
  z-index: 1;
}

.hero-copy {
  position: relative;
  z-index: 2;
  max-width: 620px;
  text-shadow: 2px 2px 3px black;
  -webkit-text-stroke: 3px #000;
  paint-order: stroke fill;
}

/* Shared, strong black drop shadow for every text element in .hero-copy,
   so it stays legible sitting over the photo. Two layers: a tight, fully
   opaque one right under the letters for a hard dark edge, plus a softer
   wider one for extra separation from busy parts of the photo. */
.hero-eyebrow {
  color: var(--color-orange-soft);
  margin-bottom: 14px;
}

.hero-heading {
  font-size: clamp(2.6rem, 6vw, 4.2rem);
  margin-bottom: 20px;
}

/* .accent fills its letters with a gradient via background-clip:text, so a
   normal text-shadow (which just duplicates the transparent-colored text)
   renders as a strange smear through the middle instead of an outline.
   filter:drop-shadow() shadows the actual rendered (gradient-filled) shape
   of the letters instead, so it looks like a real shadow, not a smear. */
.hero-heading .accent {
  display: block;
  background: linear-gradient(90deg, var(--color-orange), var(--color-orange-soft));
  -webkit-background-clip: text;
  background-clip: text;
  color: orange;
  text-shadow: none;
}

.hero-sub {
  font-size: 1.1rem;
  color: var(--color-gray);
  margin-bottom: 10px;
}

.hero-tags {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 1rem;
  margin-bottom: 18px;
}

.hero-features-inline {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  color: var(--color-gray-dim);
  font-size: 0.85rem;
  padding-top: 14px;
  border-top: 1px solid var(--color-border);
}

/* ---- Feature strip ---- */
.feature-strip {
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
  background: var(--color-bg-alt);
}

.feature-strip .container {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 32px;
  padding: 40px 24px;
}

.feature {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  min-width: 0;
}

.feature > div { min-width: 0; }

.feature-icon {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--color-orange);
  display: flex;
  align-items: center;
  justify-content: center;
}

.feature-icon svg { width: 20px; height: 20px; stroke: var(--color-orange); }

.feature h3 {
  font-size: 0.85rem;
  margin-bottom: 6px;
  text-transform: var(--heading-transform);
}

.feature p {
  font-size: 0.85rem;
  color: var(--color-gray);
  line-height: var(--body-line-height);
}

/* ---- Gallery / collection section ---- */
.collection {
  padding: 72px 0;
}

.collection .container {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.4fr);
  gap: 48px;
  align-items: center;
}

.collection h2 { font-size: clamp(1.6rem, 3vw, 2.3rem); margin-bottom: 16px; }

.collection h2 .accent { color: var(--color-orange); }

.collection p {
  color: var(--color-gray);
  margin-bottom: 22px;
}

.stat-row {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  margin-bottom: 26px;
}

.stat {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.78rem;
  color: var(--color-gray-dim);
}

.stat svg { width: 18px; height: 18px; stroke: var(--color-orange); }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--color-orange);
  color: var(--color-orange);
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.8rem;
  letter-spacing: var(--nav-tracking);
  text-transform: var(--heading-transform);
  padding: 14px 22px;
  border-radius: 4px;
  white-space: nowrap;
  transition: background 0.15s ease, color 0.15s ease;
}

.btn svg { width: 16px; height: 16px; flex-shrink: 0; }

.btn:hover { background: var(--color-orange); color: #0a0a0a; }

.btn-solid {
  background: var(--color-orange);
  color: #0a0a0a;
}

.btn-solid:hover { background: var(--color-orange-soft); }

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.gallery-grid .placeholder-img,
.gallery-grid .site-photo { aspect-ratio: 3 / 4; }

/* ---- Categories ---- */
.categories { padding: 40px 0 72px; }

.categories .section-label {
  display: block;
  text-align: center;
  font-size: 1rem;
  margin-bottom: 28px;
  color: var(--color-gray);
}

.category-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 14px;
}

.category-card {
  background: var(--color-panel);
  border: 1px solid var(--color-border);
  border-radius: 10px;
  padding: 10px 10px 18px;
  text-align: center;
  transition: border-color 0.15s ease;
}

.category-card:hover { border-color: var(--color-orange); }

.category-card .placeholder-img {
  width: 48px;
  height: 48px;
  margin: 0 auto 12px;
  border-radius: 50%;
  aspect-ratio: 1 / 1;
}

.category-icon {
  width: 100%;
  height: 130px;
  margin: 0 auto 10px;
  object-fit: contain;
  background: transparent;
  border-radius: 0;
}

.category-card span {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.8rem;
  letter-spacing: var(--nav-tracking);
  text-transform: var(--heading-transform);
}

/* ---- Store info ---- */
.store {
  background: var(--color-bg-alt);
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
  padding: 64px 0;
}

.store .container {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 32px;
  align-items: center;
}

.store h2 { font-size: 1.4rem; margin-bottom: 20px; }
.store h2 .accent { color: var(--color-orange); }

.store-detail { display: flex; gap: 10px; margin-bottom: 18px; }
.store-detail svg { width: 18px; height: 18px; stroke: var(--color-orange); flex-shrink: 0; margin-top: 3px; }
.store-detail p { font-size: 0.85rem; color: var(--color-gray); }
.store-detail .label { color: var(--color-orange-soft); font-weight: 600; display: block; margin-bottom: 4px; }
.store-detail .address-line { white-space: nowrap; }

.store-media .placeholder-img,
.store-media .site-photo { aspect-ratio: 4 / 3; margin-bottom: 20px; }

.hours-block { margin-bottom: 22px; }
.hours-block h3 { font-size: 0.8rem; margin-bottom: 8px; letter-spacing: var(--nav-tracking); text-transform: var(--heading-transform); }
.hours-block p { color: var(--color-gray); font-size: 0.9rem; }

.social-row { display: flex; gap: 12px; }
.social-row a {
  width: 34px; height: 34px;
  border: 1px solid var(--color-border);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
}
.social-row a:hover { border-color: var(--color-orange); }
.social-row svg { width: 16px; height: 16px; stroke: var(--color-white); }

.map-block .placeholder-img { aspect-ratio: 4 / 3; margin-bottom: 8px; }

.map-embed {
  width: 100%;
  aspect-ratio: 4 / 3;
  margin-bottom: 8px;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  filter: grayscale(0.3) invert(0.92) contrast(0.85);
}

.map-block .btn-solid {
  padding: 9px 16px;
  font-size: 0.75rem;
}

/* ---- Footer CTA ---- */
.footer-cta {
  padding: 56px 0;
  text-align: center;
}

.footer-cta h2 { font-size: clamp(1.6rem, 4vw, 2.4rem); margin-bottom: 14px; }
.footer-cta h2 .accent { color: var(--color-orange); }
.footer-cta p { color: var(--color-gray); margin-bottom: 8px; font-size: 0.9rem; }

.payment-row {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
  margin: 24px 0;
}

.payment-badge {
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--color-border);
  border-radius: 6px;
  padding: 4px 8px;
  background: #fff;
  height: 64px;
}

.payment-badge .site-photo {
  width: auto;
  height: 100%;
  max-width: 110px;
  object-fit: contain;
  border-radius: 0;
  background: transparent;
}

.site-footer {
  border-top: 1px solid var(--color-border);
  padding: 20px 0;
  text-align: center;
  font-size: 0.75rem;
  color: var(--color-gray-dim);
}

/* ---- Responsive ---- */
@media (max-width: 900px) {
  .collection .container,
  .store .container { grid-template-columns: minmax(0, 1fr); }

  .feature-strip .container { grid-template-columns: repeat(2, minmax(0, 1fr)); }

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

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

  .main-nav { display: none; }

  /* At this width "fill the full section height, right-aligned" would make
     the photo wider than the screen and bury the text. Switch it to a
     full-bleed cover photo with a dark scrim behind the text instead. */
  .hero-photo {
    max-width: none;
    background-size: cover;
    background-position: center;
  }

  .hero-photo::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(10, 10, 10, 0.55), rgba(10, 10, 10, 0.88));
    z-index: 0;
  }
}

@media (max-width: 560px) {
  .feature-strip .container { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .category-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .gallery-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 480px) {
  .store-detail .address-line { white-space: normal; }
}
