/* =========================================================
   ZEROTRY.CO.JP — Holdings home
   - PC : single viewport (100vh, no scroll)
   - Mobile : scrollable
   - Header / Footer : minimal, brand-first
   - Hero center : reuses zerotry HP look
   ========================================================= */

:root {
  --c-zerotry:   #e8ff5a;
  --c-chip:       #7ab9ff;
  --c-pos:       #f5f5f5;
  --c-logistics: #ff9a3a;

  --pad-x: clamp(20px, 4vw, 56px);
  --t-display: 'Space Grotesk', 'Zen Kaku Gothic New', sans-serif;
  --t-jp:      'Zen Kaku Gothic New', 'Space Grotesk', sans-serif;
  --t-mono:    'JetBrains Mono', ui-monospace, monospace;
  --t-body:    'Space Grotesk', 'Zen Kaku Gothic New', sans-serif;

  --header-h: 72px;
  --footer-h: 110px;
}

*,*::before,*::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

/* ---------- PC: lock to one viewport ---------- */
.z-body {
  background: var(--bg, #0a0a0a);
  color: var(--fg, #f5f5f5);
  font-family: var(--t-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: 'palt';

  display: flex;
  flex-direction: column;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
}
@media (max-width: 1024px) {
  .z-body {
    height: auto;
    overflow: auto;
  }
}

a { color: inherit; text-decoration: none; }
img, svg, video { display: block; max-width: 100%; }
button { background: none; border: none; color: inherit; cursor: pointer; font: inherit; }
::selection { background: var(--accent, #e8ff5a); color: #0a0a0a; }

.noise {
  position: fixed; inset: 0; z-index: 1000; pointer-events: none;
  opacity: .04; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3' stitchTiles='stitch'/></filter><rect width='100%' height='100%' filter='url(%23n)' opacity='0.6'/></svg>");
}

/* =========================================================
   HEADER  (block-style: clean, minimal, brand-first)
   ========================================================= */
.z-header {
  flex: 0 0 auto;
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 var(--pad-x);
  position: relative;
  z-index: 100;     /* above mobile menu overlay (95) so burger stays tappable */
  /* sits over hero — light text only */
  background: transparent;
}
.z-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--t-display);
  font-weight: 400;
  letter-spacing: .04em;
  font-size: 18px;
  color: var(--fg);
}
.z-mark { color: var(--accent, #e8ff5a); transform: translateY(-1px); }

.z-nav {
  display: flex;
  gap: clamp(20px, 2.4vw, 36px);
  align-items: center;
}
.z-link {
  position: relative;
  font-family: var(--t-display);
  font-weight: 500;
  font-size: 13px;
  letter-spacing: .04em;
  color: var(--fg-mute, #a1a1a1);
  padding: 6px 0;
  transition: color .25s ease;
}
.z-link::after {
  content: '';
  position: absolute;
  left: 0; bottom: -2px;
  width: 0; height: 1px;
  background: var(--accent, #e8ff5a);
  transition: width .35s cubic-bezier(.6,.1,.2,1);
}
.z-link:hover { color: var(--fg); }
.z-link:hover::after { width: 100%; }
.z-link.is-current {
  color: var(--fg);
}
.z-link.is-current::after {
  width: 100%;
}

.z-burger {
  display: none;
  width: 30px; height: 30px;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  color: var(--fg);
}
.z-burger span {
  width: 22px; height: 1.5px;
  background: currentColor;
  display: block;
  transition: transform .3s;
}
.z-burger.open span:nth-child(1) { transform: translateY(3.5px) rotate(45deg); }
.z-burger.open span:nth-child(2) { transform: translateY(-3.5px) rotate(-45deg); }

.z-mob {
  position: fixed; inset: 0; z-index: 95;
  background: rgba(10,10,10,.97);
  backdrop-filter: blur(20px);
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 22px;
  opacity: 0;
  pointer-events: none;
  transition: opacity .3s;
}
.z-mob.open { opacity: 1; pointer-events: auto; }
.z-mob a {
  font-family: var(--t-display);
  font-size: clamp(28px, 7vw, 44px);
  font-weight: 500;
  letter-spacing: -.02em;
}

/* =========================================================
   HERO (matches existing zerotry HP — video + logo image)
   ========================================================= */
.hero {
  flex: 1 1 auto;
  min-height: 0;            /* allow shrink in flex column */
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 24px var(--pad-x) 32px;
  overflow: hidden;
}
.hero-video-wrap { position: absolute; inset: 0; z-index: 0; overflow: hidden; }
.hero-video {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  filter: contrast(1.1) saturate(.85) brightness(.7);
  transition: opacity .6s ease;
}

/* product-specific bg layers — fade in over video on footer hover */
.hero-bg-swap {
  position: absolute; inset: 0;
  pointer-events: none;
  z-index: 1;          /* above video, below vignette/grid */
}
.hbs-layer {
  position: absolute; inset: 0;
  opacity: 0;
  transform: scale(1.04);
  transition: opacity .55s ease, transform 1.2s cubic-bezier(.2,.8,.2,1);
  filter: contrast(1.05) saturate(.9) brightness(.78);
  /* loading-state gradient (shows under video while it buffers) */
  background:
    radial-gradient(ellipse 60% 40% at 50% 50%,
      color-mix(in srgb, var(--c, #e8ff5a) 14%, #0a0a0a) 0%,
      #060606 70%);
}
.hbs-layer[data-key="zerotry"]   { --c: #e8ff5a; }
.hbs-layer[data-key="chip"]       { --c: #7ab9ff; }
.hbs-layer[data-key="pos"]       { --c: #f5f5f5; }
.hbs-layer[data-key="logistics"] { --c: #ff9a3a; }
.hbs-layer svg {
  width: 100%; height: 100%;
  display: block;
}
.hbs-layer.show {
  opacity: 1;
  transform: scale(1);
}

/* dynamically-injected product video — covers the SVG when available */
.hbs-vid {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  z-index: 2;
  opacity: 0;
  transition: opacity .55s ease;
  pointer-events: none;
}
.hbs-vid.ready { opacity: 1; }
/* if video fails / not found, the underlying SVG shows through */
/* when a product layer is visible, dim the default video a touch */
.hero-video-wrap.show-product .hero-video {
  opacity: .55;
}
.hero-vignette {
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse at center, transparent 30%, rgba(10,10,10,.6) 80%),
    linear-gradient(180deg, rgba(10,10,10,.3) 0%, rgba(10,10,10,.1) 30%, rgba(10,10,10,.5) 70%, rgba(10,10,10,1) 100%);
  pointer-events: none;
}
.hero-grid {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.04) 1px, transparent 1px);
  background-size: 80px 80px;
  pointer-events: none;
  mask-image: radial-gradient(ellipse at center, #000 30%, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse at center, #000 30%, transparent 70%);
}

.hero-meta-top {
  position: relative; z-index: 2;
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--t-mono);
  font-size: 11px;
  letter-spacing: .15em;
  color: var(--fg-mute, #a1a1a1);
  text-transform: uppercase;
  align-self: flex-start;
  margin-top: 6px;
}
.meta-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent, #e8ff5a);
  animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: .4; transform: scale(.8); }
}

.hero-content {
  position: relative; z-index: 2;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  margin: 0 auto;
  max-width: 1100px;
  padding: 24px 0;
}
.kicker {
  font-family: var(--t-mono);
  font-size: 12px;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--fg-mute);
  display: inline-flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 22px;
}
.kicker-line {
  display: inline-block;
  width: 48px; height: 1px;
  background: var(--accent, #e8ff5a);
}

.hero-logo-title {
  margin: 0;
  line-height: 0;
}
.hero-logo-image {
  width: clamp(180px, 28vw, 420px);
  height: auto;
  user-select: none;
  pointer-events: none;
  filter:
    invert(1)
    brightness(2.7)
    contrast(1.08)
    drop-shadow(0 0 18px rgba(255,255,255,.2))
    drop-shadow(0 22px 80px rgba(0,0,0,.78));
}

.hero-sub {
  font-family: var(--t-jp);
  font-size: clamp(14px, 1.3vw, 17px);
  line-height: 1.85;
  color: #d6d6d6;
  max-width: 640px;
  margin-bottom: 28px;
}

.hero-actions {
  display: flex; flex-wrap: wrap; gap: 14px;
}
.btn-primary, .btn-ghost {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 14px 24px;
  font-family: var(--t-display);
  font-size: 14px;
  letter-spacing: .04em;
  font-weight: 500;
  border-radius: 999px;
  transition: all .35s cubic-bezier(.6,.05,.1,1);
  white-space: nowrap;
}
.btn-primary {
  background: var(--accent, #e8ff5a);
  color: #0a0a0a;
}
.btn-primary:hover {
  background: var(--fg);
  transform: translateY(-2px);
  box-shadow: 0 12px 30px -8px rgba(232,255,90,.4);
}
.btn-primary svg { transition: transform .3s ease; }
.btn-primary:hover svg { transform: translate(3px, -3px); }
.btn-ghost {
  border: 1px solid var(--line, #262626);
  color: var(--fg);
}
.btn-ghost:hover {
  border-color: var(--fg);
  background: rgba(255,255,255,.05);
  transform: translateY(-2px);
}

.hero-meta-bottom {
  position: relative; z-index: 2;
  display: flex;
  align-items: flex-end;
  justify-content: flex-start;
  margin-top: auto;
}
.hero-stats {
  display: flex; gap: clamp(28px, 5vw, 56px);
  flex-wrap: wrap;
}
.stat { display: flex; flex-direction: column; gap: 4px; }
.stat-num {
  font-family: var(--t-display);
  font-size: clamp(24px, 2.6vw, 36px);
  font-weight: 500;
  line-height: 1;
  letter-spacing: -.02em;
  color: var(--fg);
}
.stat-num em {
  font-style: normal;
  color: var(--accent, #e8ff5a);
  font-size: .6em;
  margin-left: 2px;
}
.stat-label {
  font-family: var(--t-mono);
  font-size: 11px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--fg-mute);
}

/* =========================================================
   FOOTER (block-style: products with hover-image preview)
   ========================================================= */
.z-foot {
  flex: 0 0 auto;
  position: relative;
  border-top: 1px solid var(--line, #262626);
  background: rgba(6, 6, 6, .92);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  z-index: 30;
}

/* foot row */
.z-foot-row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: clamp(20px, 4vw, 56px);
  height: var(--footer-h);
  padding: 0 var(--pad-x);
  position: relative;
  z-index: 2;
}
.z-foot-brand {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--t-display);
  font-weight: 400;
  letter-spacing: .04em;
  font-size: 16px;
}
.z-foot-prods {
  display: flex;
  gap: clamp(8px, 1.4vw, 18px);
  justify-content: center;
  flex-wrap: wrap;
}
.z-prod {
  position: relative;
  font-family: var(--t-display);
  font-weight: 600;
  font-size: 14px;
  letter-spacing: .02em;
  color: var(--fg-mute, #a1a1a1);
  padding: 10px 14px;
  border-radius: 999px;
  transition: color .25s, background .25s;
  white-space: nowrap;
}
.z-prod span { position: relative; z-index: 1; }
.z-prod::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 999px;
  background: rgba(255,255,255,.04);
  opacity: 0;
  transition: opacity .25s;
}
.z-prod:hover {
  color: var(--fg);
}
.z-prod:hover::before { opacity: 1; }

/* dot per product when hovered */
.z-prod[data-key="zerotry"]:hover   { color: var(--c-zerotry); }
.z-prod[data-key="chip"]:hover       { color: var(--c-chip); }
.z-prod[data-key="pos"]:hover       { color: var(--c-pos); }
.z-prod[data-key="logistics"]:hover { color: var(--c-logistics); }

.z-foot-meta {
  display: flex; flex-direction: column; align-items: flex-end; gap: 4px;
  text-align: right;
}
.z-foot-mail {
  font-family: var(--t-display);
  font-weight: 600;
  font-size: 13px;
  letter-spacing: .02em;
  color: var(--fg);
  border-bottom: 1px solid transparent;
  transition: border-color .25s, color .25s;
}
.z-foot-mail:hover {
  color: var(--accent, #e8ff5a);
  border-bottom-color: var(--accent, #e8ff5a);
}
.z-foot-copy {
  font-family: var(--t-mono);
  font-size: 10px;
  letter-spacing: .15em;
  color: var(--fg-dim, #6b6b6b);
  text-transform: uppercase;
}

/* =========================================================
   PRODUCTS — MOBILE (horizontal swipe carousel)
   ========================================================= */
.z-products-mobile {
  display: none;          /* hidden on desktop — covered by hero/footer */
}

.z-pm-head {
  padding: 28px var(--pad-x) 18px;
}
.z-pm-kicker {
  font-family: var(--t-mono);
  font-size: 11px;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--fg-mute, #a1a1a1);
  margin-bottom: 14px;
}
.z-pm-title {
  font-family: var(--t-display);
  font-weight: 400;
  font-size: clamp(32px, 8vw, 52px);
  line-height: 1;
  letter-spacing: -.03em;
  color: var(--fg);
}
.z-pm-hint {
  margin-top: 18px;
  font-family: var(--t-mono);
  font-size: 11px;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--fg-dim, #6b6b6b);
  animation: pmHint 2.4s ease-in-out infinite;
}
@keyframes pmHint {
  0%, 100% { transform: translateY(0); opacity: .55; }
  50%      { transform: translateY(6px); opacity: 1; }
}

.z-pm-track {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 8px var(--pad-x) 32px;
}

.z-pm-card {
  width: 100%;
  aspect-ratio: 3/4;
  position: relative;
  overflow: hidden;
  border-radius: 18px;
  background:
    radial-gradient(ellipse 80% 60% at 50% 60%,
      color-mix(in srgb, var(--c) 18%, #0a0a0a) 0%,
      #060606 75%);
  isolation: isolate;
  display: block;
  box-shadow:
    0 1px 0 rgba(255,255,255,.04) inset,
    0 28px 48px -28px rgba(0,0,0,.7);
  transition: transform .5s cubic-bezier(.2,.8,.2,1);
}
.z-pm-card:active { transform: scale(.985); }

.z-pm-art {
  position: absolute; inset: 0;
  z-index: 0;
}
.z-pm-art svg {
  width: 100%; height: 100%;
  display: block;
}

/* video covers SVG when ready */
.z-pm-vid {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  z-index: 1;
  opacity: 0;
  transition: opacity .6s ease;
}
.z-pm-vid.ready { opacity: 1; }

.z-pm-card::before {
  content: '';
  position: absolute; inset: 0;
  z-index: 2;
  background:
    radial-gradient(ellipse 80% 35% at 50% 100%, color-mix(in srgb, var(--c) 26%, transparent) 0%, transparent 70%),
    linear-gradient(180deg, rgba(0,0,0,0) 28%, rgba(0,0,0,.55) 75%, rgba(0,0,0,.94) 100%),
    linear-gradient(0deg,   rgba(0,0,0,0) 78%, rgba(0,0,0,.45) 100%);
  pointer-events: none;
}
.z-pm-card::after {
  content: '';
  position: absolute; inset: 0;
  z-index: 3;
  border-radius: 18px;
  border: 1px solid color-mix(in srgb, var(--c) 32%, transparent);
  pointer-events: none;
}

.z-pm-overlay {
  position: absolute;
  bottom: 30px; left: 28px; right: 28px;
  z-index: 4;
  color: #fff;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.z-pm-cat {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--t-mono);
  font-size: 10px;
  letter-spacing: .25em;
  text-transform: uppercase;
  color: var(--c);
}
.z-pm-cat::before {
  content: '';
  display: inline-block;
  width: 24px; height: 1px;
  background: var(--c);
  opacity: .8;
}
.z-pm-name {
  font-family: var(--t-display);
  font-weight: 400;
  font-size: clamp(46px, 13vw, 72px);
  line-height: .92;
  letter-spacing: -.045em;
  color: var(--c);
  margin: 8px 0 6px;
  text-shadow: 0 4px 24px rgba(0,0,0,.45);
}
.z-pm-tag {
  font-family: var(--t-jp);
  font-weight: 500;
  font-size: 14px;
  line-height: 1.6;
  color: rgba(255,255,255,.92);
  max-width: 26em;
}
.z-pm-go {
  margin-top: 14px;
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--t-display);
  font-weight: 600;
  font-size: 12px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--c);
  padding-bottom: 6px;
  border-bottom: 1px solid color-mix(in srgb, var(--c) 50%, transparent);
  width: max-content;
}

/* =========================================================
   RESPONSIVE
   ========================================================= */
@media (max-width: 1024px) {
  :root { --header-h: 64px; --footer-h: auto; }
  .z-brand { display: none; }      /* ヒーローの大きいロゴが主役。小ロゴは消す */
  .z-nav { display: none; }
  .z-burger { display: flex; margin-left: auto; }
  .z-mob { display: flex; }

  .hero {
    min-height: 74vh;
    padding: 24px var(--pad-x) 32px;
    align-items: stretch;
    justify-content: center;
  }
  .hero-content {
    padding: 18px 0;
    width: 100%;
    max-width: 100%;
    align-items: center;
    text-align: center;
  }
  .hero-logo-title {
    width: 100%;
    margin: 0;
    text-align: center;
  }
  .hero-logo-image {
    margin: 0 auto !important;
    width: min(78vw, 540px) !important;
  }

  /* hero hover-swap is desktop-only — touch devices skip it */
  .hero-bg-swap { display: none; }

  /* show the swipeable product carousel */
  .z-products-mobile { display: block; }

  /* footer: simplified, products go to carousel above */
  .z-foot-row {
    grid-template-columns: 1fr;
    height: auto;
    padding: 28px var(--pad-x);
    gap: 18px;
    text-align: center;
  }
  .z-foot-brand { justify-content: center; }
  .z-foot-prods { display: none; }   /* replaced by .z-products-mobile carousel */
  .z-foot-meta { align-items: center; text-align: center; }
}

@media (max-width: 600px) {
  .hero-meta-bottom { display: none; }   /* tighter mobile hero */
  .hero-content { justify-content: center; padding: 0; }
  .z-prod { padding: 8px 10px; font-size: 13px; }
  .z-foot-prods { gap: 4px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    transition-duration: .01ms !important;
  }
}
