/* ============================================================
   e24 — shared brand layer
   Global nav, footer, store tiles, design tokens.
   Loaded on every page; product pages add their own CSS on top.
   ============================================================ */

:root {
  --paper:   #FAFAFB;
  --paper-2: #FFFFFF;
  --paper-3: #F0F0F2;
  --ink:     #1B1B1F;
  --ink-2:   #57575E;
  --ink-3:   #9A9AA2;
  --line:    rgba(20,20,25,.11);
  --line-2:  rgba(20,20,25,.05);
  --accent:  #F0512B;
  --accent-d:#D63E1B;
  --accent-soft:#FCE7DF;
  --key:     #FFFFFF;
  --key-sh:  #E3E3E7;

  --u: clamp(38px, 4.4vw, 58px);
  --maxw: 1180px;
  --r-lg: 28px;
  --r-md: 18px;
  --r-sm: 12px;
  --nav-h: 50px;

  --font-jp: "Zen Kaku Gothic New", system-ui, sans-serif;
  /* DIN Condensed = logo, labels, keycap legends, numbers (was Space Mono) */
  --font-mono: "D-DIN Condensed", "Saira SemiCondensed", system-ui, sans-serif;
  /* literal code / filenames stay monospaced */
  --font-code: "Space Mono", ui-monospace, monospace;
  --font-pixel: "DotGothic16", monospace;
  --ease: cubic-bezier(.2,.7,.2,1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-jp);
  background: var(--paper);
  color: var(--ink);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; }
::selection { background: var(--accent); color: #fff; }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 28px; }

/* ---------- type helpers ---------- */
.eyebrow {
  font-family: var(--font-mono); font-size: 13px; letter-spacing: .14em;
  text-transform: uppercase; color: var(--accent);
  display: inline-flex; align-items: center; gap: .55em; font-weight: 700;
}
.eyebrow::before { content: "//"; opacity: .9; }
.section-tag { font-family: var(--font-mono); font-size: 12px; letter-spacing: .16em; text-transform: uppercase; color: var(--ink-3); }
h1,h2,h3 { font-weight: 900; line-height: 1.12; letter-spacing: -.01em; text-wrap: balance; }
.display { font-size: clamp(44px, 8.4vw, 116px); font-weight: 900; line-height: 1.02; letter-spacing: -.02em; }
.h2 { font-size: clamp(30px, 4.6vw, 60px); }
.lead { font-size: clamp(17px, 1.8vw, 22px); color: var(--ink-2); line-height: 1.85; }
.accent { color: var(--accent); }

/* ---------- buttons / pills / chip ---------- */
.pill {
  display: inline-flex; align-items: center; gap: .6em;
  font-family: var(--font-jp); font-weight: 700; font-size: 16px;
  padding: 15px 28px; border-radius: 999px; border: none; cursor: pointer; text-decoration: none;
  transition: transform .25s var(--ease), background .25s var(--ease), box-shadow .25s var(--ease);
}
.pill-primary { background: var(--accent); color: #fff; }
.pill-primary:hover { background: var(--accent-d); transform: translateY(-2px); box-shadow: 0 10px 26px -10px var(--accent); }
.pill-ghost { background: transparent; color: var(--ink); border: 1.5px solid var(--line); }
.pill-ghost:hover { border-color: var(--ink); transform: translateY(-2px); }
.chip { font-family: var(--font-mono); font-size: 12px; letter-spacing: .04em; padding: 6px 13px; border-radius: 999px; background: var(--paper-2); border: 1px solid var(--line); color: var(--ink-2); }

/* ---------- reveal: static (scroll-fade disabled) ---------- */
.reveal { opacity: 1; transform: none; transition: none; }
.reveal.in { opacity: 1; transform: none; }
.reveal.d1 { transition-delay: .08s; }
.reveal.d2 { transition-delay: .16s; }
.reveal.d3 { transition-delay: .24s; }
.reveal.d4 { transition-delay: .32s; }
@media (prefers-reduced-motion: reduce){ .reveal { opacity:1; transform:none; transition:none; } html { scroll-behavior:auto; } }

/* ============================================================
   GLOBAL NAV — Apple-style thin bar
   ============================================================ */
.gnav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 200;
  height: var(--nav-h);
  background: rgba(255,255,255,.78);
  backdrop-filter: saturate(1.6) blur(18px);
  -webkit-backdrop-filter: saturate(1.6) blur(18px);
  border-bottom: 1px solid var(--line-2);
}
.gnav-inner { height: 100%; max-width: 1040px; margin: 0 auto; padding: 0 28px; display: flex; align-items: center; gap: 18px; }
.gnav-inner.solo { justify-content: center; }
.gnav .brand {
  display: inline-flex; align-items: baseline; gap: 1px;
  font-family: var(--font-mono); font-weight: 700; font-size: 24px; letter-spacing: .02em; color: var(--ink); text-decoration: none; line-height: 1;
  transition: opacity .2s;
}
.gnav .brand:hover { opacity: .7; }
.gnav span.brand { cursor: default; }
.gnav span.brand:hover { opacity: 1; }
.gnav .brand .e { }
.gnav .brand .num { color: var(--accent); }
.gnav .brand .dot { color: var(--accent); font-size: 24px; }
.gnav .glinks { display: flex; align-items: center; gap: clamp(14px, 2.4vw, 34px); margin: 0 auto; }
.gnav .glinks a {
  font-size: 13px; font-weight: 500; color: var(--ink-2); text-decoration: none;
  letter-spacing: .01em; transition: color .2s; white-space: nowrap;
}
.gnav .glinks a:hover { color: var(--accent); }
.gnav .glinks a.active { color: var(--ink); font-weight: 700; }
.gnav .glinks a.soon { color: var(--ink-3); cursor: default; pointer-events: none; }
.gnav .glinks a.soon::after { content: "近日"; font-family: var(--font-mono); font-size: 8px; vertical-align: super; margin-left: 3px; color: var(--accent); letter-spacing: 0; }
.gnav .gutil { display: flex; align-items: center; gap: 16px; }
.gnav .gutil a { color: var(--ink-2); display: grid; place-items: center; transition: color .2s; }
.gnav .gutil a:hover { color: var(--accent); }
.gnav .gutil svg { width: 18px; height: 18px; }
@media (max-width: 720px) {
  .gnav .glinks { gap: 14px; overflow-x: auto; margin: 0 auto 0 6px; -ms-overflow-style: none; scrollbar-width: none; }
  .gnav .glinks::-webkit-scrollbar { display: none; }
}

/* sub-context strip under nav (breadcrumb-ish, like Apple product subnav) */
.subnav {
  position: sticky; top: var(--nav-h); z-index: 150;
  background: rgba(255,255,255,.72); backdrop-filter: saturate(1.6) blur(16px);
  -webkit-backdrop-filter: saturate(1.6) blur(16px);
  border-bottom: 1px solid var(--line-2);
}
.subnav-inner { max-width: var(--maxw); margin: 0 auto; padding: 0 28px; height: 48px; display: flex; align-items: center; justify-content: space-between; }
.subnav .name { font-weight: 900; font-size: 18px; letter-spacing: .01em; display: flex; align-items: baseline; }
.subnav .name small { font-family: var(--font-mono); font-size: 11px; color: var(--ink-3); font-weight: 400; margin-left: 8px; letter-spacing: .08em; }
.subnav .name .tagline {
  font-family: var(--font-jp); font-size: 12.5px; font-weight: 500; color: var(--ink-2);
  margin-left: 12px; padding-left: 12px; border-left: 1px solid var(--line); letter-spacing: .02em;
}
@media (max-width: 560px){ .subnav .name .tagline { display: none; } }
.subnav-end { display: flex; align-items: center; gap: 22px; }
.subnav .links { display: flex; gap: 22px; align-items: center; }
.subnav .links a { font-size: 13px; color: var(--ink-2); text-decoration: none; transition: color .2s; white-space: nowrap; }
.subnav .links a:hover { color: var(--accent); }
.subnav .links a svg { width: 15px; height: 15px; vertical-align: middle; }
.subnav .links a.back { display: inline-flex; align-items: center; gap: 4px; }

.subnav .buy-btn {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--accent); color: #fff; font-weight: 700; font-size: 13px;
  padding: 7px 16px; border-radius: 999px; text-decoration: none; white-space: nowrap;
  transition: background .2s var(--ease), transform .2s var(--ease);
}
.subnav .buy-btn:hover { background: var(--accent-d); color: #fff; transform: translateY(-1px); }
.subnav .buy-btn svg { width: 15px; height: 15px; }

/* 購入者向け dropdown */
.subnav-owner { position: relative; display: inline-flex; }
.subnav-owner-btn {
  display: inline-flex; align-items: center; gap: 6px;
  background: transparent; color: var(--ink); font-weight: 700; font-size: 13px;
  padding: 7px 14px; border: 1px solid var(--line-2); border-radius: 999px;
  cursor: pointer; white-space: nowrap; transition: border-color .2s var(--ease), color .2s var(--ease);
  -webkit-tap-highlight-color: transparent;
}
.subnav-owner-btn:hover { border-color: var(--ink-3); }
.subnav-owner-btn .lock { width: 13px; height: 13px; }
.subnav-owner-btn .chev { width: 12px; height: 12px; transition: transform .2s var(--ease); }
.subnav-owner.open .subnav-owner-btn { border-color: var(--accent); color: var(--accent); }
.subnav-owner.open .subnav-owner-btn .chev { transform: rotate(180deg); }
.subnav-owner-menu {
  position: absolute; top: calc(100% + 10px); right: 0; min-width: 210px;
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-md);
  box-shadow: 0 18px 40px -16px rgba(20,20,25,.3);
  padding: 6px; z-index: 200;
  opacity: 0; visibility: hidden; transform: translateY(-6px);
  transition: opacity .2s var(--ease), transform .2s var(--ease), visibility .2s;
}
.subnav-owner.open .subnav-owner-menu { opacity: 1; visibility: visible; transform: none; }
.subnav-owner-menu .oh {
  font-family: var(--font-mono); font-size: 10.5px; letter-spacing: .08em; text-transform: uppercase;
  color: var(--ink-3); padding: 9px 12px 7px;
}
.subnav-owner-menu a {
  display: flex; align-items: center; gap: 10px; padding: 11px 12px; border-radius: 8px;
  font-size: 14px; font-weight: 700; color: var(--ink); text-decoration: none; transition: background .15s var(--ease), color .15s var(--ease);
}
.subnav-owner-menu a:hover { background: var(--paper-3); color: var(--accent); }
.subnav-owner-menu a svg { width: 16px; height: 16px; color: var(--accent); flex: none; }

/* owner group inside the mobile burger menu — hidden on desktop */
.subnav .links .owner-group { display: none; }

/* hamburger — hidden on desktop */
.subnav-burger { display: none; }

@media (max-width: 760px){
  .subnav-end { gap: 10px; }
  .subnav-burger {
    display: inline-grid; place-items: center;
    width: 38px; height: 38px; padding: 0; margin-right: -8px;
    border: none; background: none; cursor: pointer; color: var(--ink);
    -webkit-tap-highlight-color: transparent;
  }
  .subnav-burger .bz { position: relative; width: 20px; height: 14px; display: block; }
  .subnav-burger .bz i {
    position: absolute; left: 0; right: 0; height: 2px; border-radius: 2px; background: currentColor;
    transition: transform .26s var(--ease), opacity .18s var(--ease), top .26s var(--ease);
  }
  .subnav-burger .bz i:nth-child(1){ top: 0; }
  .subnav-burger .bz i:nth-child(2){ top: 6px; }
  .subnav-burger .bz i:nth-child(3){ top: 12px; }
  .subnav.menu-open .subnav-burger .bz i:nth-child(1){ top: 6px; transform: rotate(45deg); }
  .subnav.menu-open .subnav-burger .bz i:nth-child(2){ opacity: 0; }
  .subnav.menu-open .subnav-burger .bz i:nth-child(3){ top: 6px; transform: rotate(-45deg); }

  .subnav .links {
    position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--paper); border-bottom: 1px solid var(--line-2);
    box-shadow: 0 16px 30px -16px rgba(20,20,25,.3);
    padding: 4px 0; max-height: 0; overflow: hidden;
    opacity: 0; visibility: hidden;
    transition: max-height .3s var(--ease), opacity .24s var(--ease), visibility .3s;
  }
  .subnav.menu-open .links { max-height: 78vh; overflow-y: auto; opacity: 1; visibility: visible; }
  .subnav .links a {
    font-size: 15px; color: var(--ink); font-weight: 500;
    padding: 14px 28px; border-top: 1px solid var(--line-2);
  }
  .subnav .links a:first-child { border-top: none; }
  .subnav .links a.back { gap: 6px; }

  /* on mobile, the dropdown folds into the burger menu */
  .subnav-owner { display: none; }
  .subnav .links .owner-group { display: block; border-top: 1px solid var(--line-2); }
  .subnav .links .owner-group .og-label {
    display: block; font-family: var(--font-mono); font-size: 10.5px; letter-spacing: .08em; text-transform: uppercase;
    color: var(--ink-3); padding: 14px 28px 4px;
  }
  .subnav .links .owner-group a { border-top: none; padding-top: 8px; padding-bottom: 8px; }
  .subnav .links .owner-group a:last-child { padding-bottom: 16px; }
}

/* ============================================================
   STORE TILES (homepage)
   ============================================================ */
.board { background: var(--paper-3); display: flex; flex-direction: column; gap: 12px; }
.tile {
  position: relative; overflow: hidden; text-align: center;
  display: flex; flex-direction: column; align-items: center;
  padding: clamp(54px, 8vw, 104px) 24px clamp(40px, 6vw, 72px);
}
.tile.light { background: var(--paper-2); }
.tile.paper { background: var(--paper); }
.tile.dark  { background: var(--ink); color: var(--paper); }
.tile .t-eyebrow {
  font-family: var(--font-mono); font-size: 12px; letter-spacing: .16em; text-transform: uppercase;
  color: var(--accent); font-weight: 700; margin-bottom: 14px;
}
.tile h2 { font-size: clamp(40px, 7vw, 88px); font-weight: 900; letter-spacing: -.02em; line-height: 1.02; }
.tile.small h2 { font-size: clamp(30px, 4vw, 48px); }
.tile .t-sub { font-size: clamp(18px, 2.3vw, 27px); color: var(--ink-2); margin-top: 12px; max-width: 22ch; line-height: 1.45; font-weight: 500; }
.tile.dark .t-sub { color: rgba(255,255,255,.72); }
.tile.small .t-sub { font-size: clamp(15px, 1.7vw, 19px); }
.tile .t-price { font-size: 14px; color: var(--ink-3); margin-top: 10px; font-family: var(--font-mono); letter-spacing: .03em; }
.tile .t-links { display: flex; gap: 26px; justify-content: center; margin-top: 20px; flex-wrap: wrap; }
.tlink {
  color: var(--accent); font-size: clamp(16px, 1.7vw, 20px); font-weight: 700; text-decoration: none;
  display: inline-flex; align-items: center; gap: 4px; transition: gap .2s var(--ease);
}
.tlink .arr { transition: transform .2s var(--ease); }
.tlink:hover { text-decoration: underline; }
.tlink:hover .arr { transform: translateX(3px); }
.tlink.muted { color: var(--ink-3); pointer-events: none; text-decoration: none; }
.tile .t-shot { margin-top: clamp(26px, 4vw, 52px); width: 100%; }
.tile .t-shot img { width: 100%; margin: 0 auto; }
.tile.hero-tile .t-shot img { max-width: 1080px; }
.tile.small .t-shot { margin-top: clamp(20px, 3vw, 34px); }
.tile.small .t-shot img { max-width: 480px; border-radius: var(--r-md); }

.tile-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 740px){ .tile-grid { grid-template-columns: 1fr; } }

/* coming-soon teaser look */
.tile.coming { background: linear-gradient(170deg, var(--paper-2), var(--paper-3)); }
.tile.coming .badge {
  font-family: var(--font-mono); font-size: 11px; letter-spacing: .2em; color: var(--accent);
  border: 1px solid var(--accent); border-radius: 999px; padding: 5px 14px; margin-bottom: 18px;
}
.tile.coming .ghost-keys { display: flex; gap: 7px; margin-top: 26px; }
.tile.coming .ghost-keys i {
  width: 30px; height: 30px; border-radius: 7px; background: var(--paper-2);
  border: 1px dashed var(--line); display: block;
}

/* ============================================================
   BACK-TO-TOP BUTTON (shared)
   ============================================================ */
.to-top {
  position: fixed; right: clamp(18px, 3vw, 34px); bottom: clamp(18px, 3vw, 34px); z-index: 300;
  width: 54px; height: 54px; border-radius: 50%; border: none; cursor: pointer;
  background: var(--accent); color: #fff;
  display: grid; place-items: center;
  box-shadow: 0 12px 28px -10px rgba(240,81,43,.6), 0 2px 6px rgba(0,0,0,.12);
  opacity: 0; transform: translateY(14px) scale(.9); pointer-events: none;
  transition: opacity .3s var(--ease), transform .3s var(--ease), background .2s var(--ease);
}
.to-top.show { opacity: 1; transform: none; pointer-events: auto; }
.to-top:hover { background: var(--accent-d); transform: translateY(-3px); }
.to-top svg { width: 22px; height: 22px; }
.to-top .lbl { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
@media (prefers-reduced-motion: reduce){ .to-top { transition: opacity .2s; } .to-top.show { transform: none; } }

/* ============================================================
   GLOBAL FOOTER
   ============================================================ */
.gfoot { background: var(--paper); border-top: 1px solid var(--line); padding: 56px 0 40px; font-size: 13px; color: var(--ink-2); }
.gfoot .top { display: flex; flex-wrap: wrap; gap: 40px; justify-content: space-between; padding-bottom: 36px; border-bottom: 1px solid var(--line); }
.gfoot .brandcol { max-width: 280px; }
.gfoot .brandcol .bm { font-family: var(--font-mono); font-weight: 700; font-size: 30px; letter-spacing: .02em; }
.gfoot .brandcol .bm .num { color: var(--accent); }
.gfoot .brandcol .bm .dot { color: var(--accent); }
.gfoot .brandcol p { color: var(--ink-3); margin-top: 10px; font-size: 13px; line-height: 1.7; }
.gfoot .cols { display: flex; gap: clamp(34px, 6vw, 80px); flex-wrap: wrap; }
.gfoot .col h4 { font-size: 12px; font-family: var(--font-mono); letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 14px; font-weight: 700; }
.gfoot .col a { display: block; color: var(--ink-2); text-decoration: none; margin-bottom: 10px; transition: color .2s; }
.gfoot .col a:hover { color: var(--accent); }
.gfoot .col a .soon-tag { font-family: var(--font-mono); font-size: 9px; color: var(--ink-3); margin-left: 6px; }
.gfoot .foot-cg-note { margin-top: 22px; font-size: 11px; line-height: 1.7; color: var(--ink-3); }
.gfoot .bottom { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 14px; padding-top: 26px; color: var(--ink-3); font-size: 12px; }
.gfoot .bottom .mono { font-family: var(--font-mono); letter-spacing: .06em; }
