/* ============================================================
   TECHNO JAPAN — common.css
   Shared styles loaded by every page.
   Page-specific styles remain inline in each HTML file.
   ============================================================ */

/* ===================== ROOT / RESET ===================== */
:root {
  --bg: #080808;
  --text: #f0ede8;
  --accent: #ff2d2d;          /* sharp neon — small accents, dots, active states */
  --accent-soft: #a82f31;     /* editorial wine — warmer hovers, section tints */
  --font-display: 'Bebas Neue', sans-serif;
  --font-mono: 'Space Mono', monospace;
  --font-body: 'DM Sans', sans-serif;
}

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  overflow-x: hidden;
  cursor: none;
  opacity: 0;
  animation: bodyFadeIn 1s ease forwards;
}

@keyframes bodyFadeIn { to { opacity: 1; } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideUp { from { transform: translateY(100%); } to { transform: translateY(0); } }
@keyframes fadeSlideUp {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

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

* { -webkit-tap-highlight-color: transparent; }

/* ===================== CUSTOM CURSOR ===================== */
.cursor-dot, .cursor-ring {
  position: fixed;
  top: 0; left: 0;
  border-radius: 50%;
  pointer-events: none;
  z-index: 99999;
  mix-blend-mode: difference;
}
.cursor-dot {
  width: 6px; height: 6px;
  background: var(--text);
  transform: translate(-50%, -50%);
  transition: transform 0.1s ease;
}
.cursor-ring {
  width: 36px; height: 36px;
  border: 1px solid var(--text);
  transform: translate(-50%, -50%);
  transition: transform 0.15s ease-out, width 0.3s ease, height 0.3s ease;
}
body:hover .cursor-dot, body:hover .cursor-ring { opacity: 1; }

/* ===================== NAV ===================== */
nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 28px 40px;
  mix-blend-mode: difference;
  opacity: 0;
  animation: fadeIn 0.6s ease forwards;
  animation-delay: 0.3s;
}
nav .logo {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.25em;
  text-transform: uppercase;
}
nav .nav-links {
  display: flex;
  gap: 32px;
}
nav .nav-links a {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  opacity: 0.6;
  transition: opacity 0.3s ease;
}
nav .nav-links a:hover { opacity: 1; }
nav .nav-links .nav-dropdown { position: relative; display: flex; align-items: center; }
nav .nav-links .nav-dropdown > a { cursor: pointer; }
nav .nav-dropdown-menu {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  padding-top: 12px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}
nav .nav-dropdown:hover .nav-dropdown-menu { opacity: 1; pointer-events: auto; }
nav .nav-dropdown-menu-inner {
  background: rgba(8,8,8,0.95);
  border: 1px solid rgba(240,237,232,0.1);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  padding: 12px 0;
  min-width: 160px;
  display: flex;
  flex-direction: column;
}
nav .nav-dropdown-menu-inner a {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  padding: 10px 24px;
  opacity: 0.5;
  transition: opacity 0.2s ease, background 0.2s ease;
  white-space: nowrap;
}
nav .nav-dropdown-menu-inner a:hover {
  opacity: 1;
  background: rgba(240,237,232,0.05);
}

/* social icons in nav */
nav .nav-links .nav-social {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  padding-left: 16px;
  margin-left: 4px;
  border-left: 1px solid rgba(240,237,232,0.15);
}
nav .nav-links .nav-social a {
  display: inline-flex;
  align-items: center;
  opacity: 0.55;
  transition: opacity 0.3s ease;
  padding: 0;
}
nav .nav-links .nav-social a:hover { opacity: 1; }
nav .nav-links .nav-social svg { width: 16px; height: 16px; display: block; }
/* search + favorites buttons inserted into the social cluster inherit the same look */
nav .nav-links .nav-social .gs-trigger,
nav .nav-links .nav-social .tj-fav-nav {
  display: inline-flex; align-items: center; justify-content: center;
  background: none; border: none; color: var(--text);
  opacity: 0.55; transition: opacity 0.3s ease;
  padding: 0; cursor: none;
}
nav .nav-links .nav-social .gs-trigger:hover,
nav .nav-links .nav-social .tj-fav-nav:hover { opacity: 1; }
nav .nav-links .nav-social .gs-trigger svg,
nav .nav-links .nav-social .tj-fav-nav svg { width: 16px; height: 16px; display: block; }
nav .nav-links .nav-social .tj-fav-nav.has-favorites { color: var(--accent, #ff2d2d); opacity: 1; }
nav .nav-links .nav-social .tj-fav-count {
  font-family: var(--font-mono); font-size: 9px; letter-spacing: 0.05em;
}

/* social icons in nav-overlay (mobile) */
.nav-overlay .nav-overlay-social {
  display: flex; align-items: center; gap: 28px;
  margin-top: 12px;
}
.nav-overlay .nav-overlay-social a {
  opacity: 0.55;
  transition: opacity 0.3s ease;
}
.nav-overlay .nav-overlay-social a:hover { opacity: 1; }
.nav-overlay .nav-overlay-social svg { width: 22px; height: 22px; display: block; }

/* ===================== GUIDE / DISCOVER CARDS (shared) ===================== */
.guide-section {
  padding: 0 40px;
  margin-top: 80px;
  border-top: 1px solid rgba(240,237,232,0.06);
}
.guide-header {
  padding-top: 60px;
  margin-bottom: 32px;
}
.guide-label {
  font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.25em; text-transform: uppercase;
  opacity: 0.3; margin-bottom: 8px;
}
.guide-title {
  font-family: var(--font-display); font-size: clamp(40px, 6vw, 72px);
  text-transform: uppercase; line-height: 0.9;
}
.discover-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}
.discover-card {
  display: block; position: relative;
  aspect-ratio: 3 / 4;
  border-radius: 14px;
  overflow: hidden;
  cursor: none;
}
.discover-card-bg {
  position: absolute; inset: 0;
  background-size: cover; background-position: center;
  transition: transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}
.discover-card:hover .discover-card-bg { transform: scale(1.06); }
.discover-card-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(to bottom, rgba(0,0,0,0.15) 0%, rgba(0,0,0,0.55) 100%);
  transition: background 0.4s ease;
}
.discover-card:hover .discover-card-overlay {
  background: linear-gradient(to bottom, rgba(0,0,0,0.05) 0%, rgba(0,0,0,0.45) 100%);
}
.discover-card-content {
  position: absolute; inset: 0;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  padding: 32px 24px;
  text-align: center;
  z-index: 1;
}
.discover-card-title {
  font-family: var(--font-display);
  font-size: 42px;
  text-transform: uppercase; line-height: 1;
  margin-bottom: 12px;
  text-shadow: 0 2px 16px rgba(0,0,0,0.5);
}
.discover-card-desc {
  font-family: var(--font-body); font-weight: 200;
  font-size: 12px; line-height: 1.7;
  opacity: 0.7; max-width: 220px;
  text-shadow: 0 1px 6px rgba(0,0,0,0.3);
}
.discover-card-arrow {
  position: absolute; top: 20px; right: 20px;
  width: 32px; height: 32px;
  border: 1px solid rgba(255,255,255,0.3); border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  opacity: 0; transform: translateY(6px);
  transition: opacity 0.4s ease, transform 0.4s ease;
}
.discover-card:hover .discover-card-arrow { opacity: 1; transform: translateY(0); }
.discover-card-arrow svg { width: 12px; height: 12px; stroke: var(--text); fill: none; stroke-width: 2; }

@media (max-width: 1100px) {
  .discover-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
}
@media (max-width: 768px) {
  .guide-section { padding: 0 24px; margin-top: 60px; }
  .guide-header { padding-top: 40px; }
  .discover-card-title { font-size: 32px; }
}
@media (max-width: 480px) {
  .discover-grid { grid-template-columns: 1fr; }
}
@media (hover: none) and (pointer: coarse) {
  .discover-card { cursor: pointer; }
}

/* social icons in footer */
footer .footer-links .footer-social {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  padding-left: 14px;
  margin-left: 4px;
  border-left: 1px solid rgba(240,237,232,0.15);
}
footer .footer-links .footer-social a {
  display: inline-flex;
  align-items: center;
  opacity: 0.5;
  transition: opacity 0.3s ease;
}
footer .footer-links .footer-social a:hover { opacity: 1; }
footer .footer-links .footer-social svg { width: 14px; height: 14px; display: block; }

/* ===================== HAMBURGER ===================== */
.nav-hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 4px;
  z-index: 10001;
  background: none;
  border: none;
  position: fixed;
  top: 28px;
  right: 48px;
}
.nav-hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text);
  transition: transform 0.3s ease, opacity 0.3s ease;
}
.nav-hamburger.active span:nth-child(1) { transform: rotate(45deg) translate(4px, 5px); }
.nav-hamburger.active span:nth-child(2) { opacity: 0; }
.nav-hamburger.active span:nth-child(3) { transform: rotate(-45deg) translate(4px, -5px); }

/* ===================== NAV OVERLAY ===================== */
.nav-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: #080808;
  z-index: 10000;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 32px;
}
.nav-overlay.active { display: flex; }
.nav-overlay a {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  opacity: 0.6;
  transition: opacity 0.3s ease;
}
.nav-overlay a:hover { opacity: 1; }
.nav-overlay .nav-overlay-sub { display: flex; flex-direction: column; align-items: center; gap: 20px; margin-top: -8px; }
.nav-overlay .nav-overlay-sub a { font-size: 10px; opacity: 0.35; }
.nav-overlay .nav-back {
  position: absolute;
  bottom: 48px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.15em;
  opacity: 0.45;
  transition: opacity 0.3s ease;
  cursor: pointer;
  background: none;
  border: none;
  color: var(--text);
  text-transform: uppercase;
}
.nav-overlay .nav-back:hover { opacity: 1; }
.nav-overlay .nav-close {
  position: absolute; top: 28px; right: 48px;
  width: 28px; height: 28px; background: none; border: none; cursor: pointer; z-index: 10001;
}
.nav-overlay .nav-close::before,
.nav-overlay .nav-close::after {
  content: ''; position: absolute; top: 50%; left: 50%;
  width: 22px; height: 2px; background: var(--text);
}
.nav-overlay .nav-close::before { transform: translate(-50%, -50%) rotate(45deg); }
.nav-overlay .nav-close::after { transform: translate(-50%, -50%) rotate(-45deg); }
.nav-overlay .nav-close:hover { opacity: 0.6; }

/* ===================== FOOTER ===================== */
footer {
  padding: 60px 40px 40px;
  border-top: 1px solid rgba(240,237,232,0.08);
}
.footer-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 80px;
}
.footer-logo {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.25em;
  text-transform: uppercase;
}
.footer-links {
  display: flex;
  gap: 32px;
}
.footer-links a {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  opacity: 0.5;
  transition: opacity 0.3s ease;
}
.footer-links a:hover { opacity: 1; }

/* footer DISCOVER toggle */
.footer-discover {
  position: relative;
  display: inline-flex;
  align-items: center;
}
.footer-discover-btn {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  opacity: 0.5;
  transition: opacity 0.3s ease;
  background: none;
  border: none;
  color: var(--text);
  cursor: pointer;
  padding: 0;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.footer-discover-btn:hover { opacity: 1; }
.footer-discover-btn::after {
  content: '+';
  font-size: 12px;
  opacity: 0.7;
  transition: transform 0.3s ease;
  display: inline-block;
}
.footer-discover-btn.open::after { transform: rotate(45deg); }
.footer-discover-menu {
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(-8px);
  background: rgba(8,8,8,0.97);
  border: 1px solid rgba(240,237,232,0.1);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  padding: 12px 0;
  min-width: 160px;
  display: flex;
  flex-direction: column;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
  z-index: 100;
}
.footer-discover-menu.open {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}
.footer-discover-menu a {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  padding: 10px 24px;
  opacity: 0.5;
  transition: opacity 0.2s ease, background 0.2s ease;
  white-space: nowrap;
  text-align: center;
}
.footer-discover-menu a:hover { opacity: 1; background: rgba(240,237,232,0.05); }
@media (hover: hover) and (pointer: fine) {
  .footer-discover:hover .footer-discover-btn::after { transform: rotate(45deg); }
  .footer-discover:hover .footer-discover-menu {
    opacity: 1;
    pointer-events: auto;
    transform: translateX(-50%) translateY(0);
  }
}

.footer-copy {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.1em;
  opacity: 0.3;
}
.footer-watermark {
  position: relative;
  margin-top: 40px;
  padding-top: 40px;
  border-top: 1px solid rgba(240,237,232,0.06);
  text-align: center;
  overflow: hidden;
}
.footer-watermark span {
  font-family: var(--font-display);
  font-size: clamp(48px, 8vw, 120px);
  opacity: 0.06;
  text-transform: uppercase;
  white-space: nowrap;
}

/* ===================== NEWSLETTER ===================== */
.newsletter {
  border-top: 1px solid rgba(240,237,232,0.08);
  padding: 80px 40px;
  text-align: center;
  position: relative;
  overflow: hidden;
  /* very subtle wine wash for warmth */
  background: radial-gradient(120% 140% at 50% 100%, rgba(168,47,49,0.08) 0%, transparent 60%);
}
.newsletter-eyebrow {
  font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.25em;
  text-transform: uppercase; opacity: 0.4; margin-bottom: 16px;
}
.newsletter-title {
  font-family: var(--font-display);
  font-size: clamp(36px, 5vw, 64px);
  text-transform: uppercase; line-height: 1; margin-bottom: 16px;
}
.newsletter-desc {
  font-family: var(--font-body); font-weight: 200;
  font-size: 14px; line-height: 1.8; opacity: 0.5;
  max-width: 480px; margin: 0 auto 32px;
}
.newsletter-form {
  display: flex; gap: 0;
  max-width: 440px; margin: 0 auto;
  border: 1px solid rgba(240,237,232,0.15);
}
.newsletter-form input {
  flex: 1; min-width: 0;
  background: transparent; border: none; outline: none;
  font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.1em;
  color: var(--text); padding: 14px 20px;
}
.newsletter-form input::placeholder { color: rgba(240,237,232,0.3); }
.newsletter-form button {
  background: var(--text); color: var(--bg); border: none;
  font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.2em;
  text-transform: uppercase; padding: 14px 24px; cursor: pointer;
  transition: opacity 0.3s ease;
}
.newsletter-form button:hover { opacity: 0.85; }

/* ===================== RESPONSIVE (shared chrome only) ===================== */
@media (max-width: 900px) {
  nav { padding: 20px 24px; }
  .footer-top { flex-direction: column; gap: 24px; text-align: center; }
}

@media (max-width: 768px) {
  .nav-hamburger { display: flex; top: 20px; right: 24px; }
  .nav-overlay .nav-close { top: 20px; right: 24px; }
  nav .nav-links { display: none; }
  .footer-links { gap: 20px; flex-wrap: wrap; justify-content: center; }
  .newsletter { padding: 60px 24px; }
  .newsletter-form { flex-direction: column; }
  .newsletter-form button { padding: 14px; }
  /* iOS auto-zoom prevention */
  input, textarea, select { font-size: 16px !important; }
  /* Larger tap targets on touch */
  .tj-fav-heart { width: 38px; height: 38px; }
  .tj-fav-heart.sm { width: 32px; height: 32px; }
  .share-btn, .article-share-btn { width: 38px; height: 38px; }
}

/* Hide custom cursor on touch devices */
@media (hover: none) and (pointer: coarse) {
  body { cursor: auto; }
  .cursor-dot, .cursor-ring { display: none; }
  .cta-btn, .nav-hamburger, .nav-overlay .nav-close, .nav-overlay .nav-back, .nav-overlay a { cursor: pointer; }
}

/* Reduce motion for accessibility */
@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;
  }
}
