/*
Theme Name: Stardust
Theme URI: https://stardustgt.com/
Author: Stardust General Trading LLC
Description: Cinematic single-page-style theme for Stardust General Trading LLC. A continuous WebGL particle field morphs between section motifs as you scroll. Products, services and FAQs are editable as post types; hero copy, stats, colours, contact details and motif artwork are all editable in Appearance > Customize.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.6
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: stardust
Tags: business, portfolio, one-column, custom-colors, custom-menu, custom-logo, translation-ready
*/

/* ============================================================
   Stardust General Trading — style.css
   Luxury / minimal / cinematic. Dark space, gold hairlines.
   ============================================================ */

:root {
  --gold: #f5c66a;
  --gold-dim: rgba(245, 198, 106, 0.55);
  --hairline: rgba(245, 198, 106, 0.22);
  --hairline-soft: rgba(245, 198, 106, 0.12);
  --red: #e63946;
  --ink: #eae6dd;
  --ink-dim: rgba(234, 230, 221, 0.68);
  --ink-faint: rgba(234, 230, 221, 0.45);
  --glass-bg: rgba(10, 10, 22, 0.42);
  --serif: "Cormorant Garamond", "Noto Serif JP", serif;
  --sans: "Inter", "Noto Serif JP", sans-serif;
  --jp: "Noto Serif JP", serif;
  /* Scroll-driven background gradient (tweened by GSAP) */
  --bg-top: #050510;
  --bg-bottom: #090918;
  --glow-op: 0;
  --header-h: 68px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: auto; }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }

body {
  font-family: var(--sans);
  font-weight: 300;
  color: var(--ink);
  background: #050510;
  overflow-x: hidden;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

::selection { background: rgba(245, 198, 106, 0.25); color: #fff; }

/* ---------- Fixed background layers ---------- */
#bg-stars {
  position: fixed; inset: 0; z-index: 0;
  width: 100%; height: 100%; object-fit: cover;
  pointer-events: none;
}
#bg {
  position: fixed; inset: 0; z-index: 1;
  background: linear-gradient(180deg, var(--bg-top) 0%, var(--bg-bottom) 100%);
  opacity: 0.62; /* tints the starfield while keeping the color journey */
  pointer-events: none;
}
#dawn-glow {
  position: fixed; inset: 0; z-index: 2;
  background: radial-gradient(120% 65% at 50% 108%,
    rgba(230, 57, 70, 0.42) 0%, rgba(214, 96, 42, 0.20) 32%, rgba(230, 57, 70, 0.0) 62%);
  opacity: var(--glow-op);
  pointer-events: none;
}
#stage {
  position: fixed; inset: 0; z-index: 3;
  width: 100%; height: 100%;
  pointer-events: none;
}

main, footer, header { position: relative; z-index: 5; }

/* ---------- Type ---------- */
h1, h2, h3, .stat-num, .cta-title { font-family: var(--serif); font-weight: 600; line-height: 1.15; }

/* Keep type readable over the bright particle field */
h1, h2, .cta-title, .kicker, .jp-line, .lead, .section-intro, .stat-num, .stat-label {
  text-shadow: 0 1px 16px rgba(5, 5, 16, 0.9), 0 0 42px rgba(5, 5, 16, 0.75);
}

/* Soft dark scrim pooled behind key text blocks */
.hero-content, .section-head, .cta-inner { position: relative; }
.hero-content::before, .section-head::before, .cta-inner::before {
  content: ""; position: absolute; z-index: -1;
  inset: -3.5rem -5rem;
  background: radial-gradient(58% 62% at 42% 50%, rgba(5, 5, 16, 0.66), rgba(5, 5, 16, 0) 74%);
  pointer-events: none;
}
.section-head.center::before, .cta-inner::before {
  background: radial-gradient(55% 62% at 50% 50%, rgba(5, 5, 16, 0.66), rgba(5, 5, 16, 0) 74%);
}

h1 { font-size: clamp(2.6rem, 6.2vw, 4.6rem); letter-spacing: 0.01em; }
h2 { font-size: clamp(1.9rem, 3.6vw, 2.9rem); letter-spacing: 0.01em; }
h3 { font-size: 1.28rem; color: var(--ink); }

.jp-line {
  font-family: var(--jp);
  color: var(--gold);
  letter-spacing: 0.42em;
  font-size: clamp(0.9rem, 1.6vw, 1.15rem);
  margin-top: 1.1rem;
}

.kicker {
  font-size: 0.74rem;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 0.9rem;
  font-weight: 500;
}

.lead { font-size: clamp(1rem, 1.5vw, 1.16rem); color: var(--ink-dim); max-width: 640px; }
.section-intro { color: var(--ink-dim); max-width: 640px; margin-top: 1rem; }
.section-head.center .section-intro, .container.center .lead { margin-left: auto; margin-right: auto; }

/* ---------- Layout ---------- */
.container { width: min(1180px, 92vw); margin: 0 auto; }
.container.narrow { width: min(860px, 92vw); }
.container.center { text-align: center; }

.section { position: relative; padding: clamp(4.5rem, 9vh, 7rem) 0; }
.section-tall { min-height: 100vh; display: flex; align-items: center; }

.section-head { margin-bottom: 3.2rem; position: relative; }
.section-head.center { text-align: center; }
.section-head h2::after {
  content: ""; display: block; width: 64px; height: 1px;
  background: linear-gradient(90deg, var(--gold), transparent);
  margin-top: 1.2rem;
}
.section-head.center h2::after {
  margin-left: auto; margin-right: auto;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
}

/* ---------- Header ---------- */
#site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  border-bottom: 1px solid var(--hairline-soft);
  background: rgba(5, 5, 16, 0.35);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  transition: background 0.4s ease, border-color 0.4s ease;
}
#site-header.scrolled { background: rgba(5, 5, 16, 0.72); border-color: var(--hairline); }
.header-inner {
  width: min(1180px, 92vw); margin: 0 auto; height: var(--header-h);
  display: flex; align-items: center; justify-content: space-between; gap: 2rem;
}
.logo {
  font-family: var(--serif); font-size: 1.3rem; font-weight: 600;
  color: var(--ink); text-decoration: none; letter-spacing: 0.04em; white-space: nowrap;
}
.logo-star { color: var(--gold); margin-right: 0.15em; }
.logo-sub { font-size: 0.62em; letter-spacing: 0.22em; text-transform: uppercase; color: var(--ink-faint); font-family: var(--sans); font-weight: 400; }

#main-nav { display: flex; align-items: center; gap: 1.9rem; }
#main-nav a:not(.btn) {
  color: var(--ink-dim); text-decoration: none; font-size: 0.86rem; letter-spacing: 0.08em;
  transition: color 0.3s ease; font-weight: 400;
}
#main-nav a:not(.btn):hover { color: var(--gold); }

/* Language switcher */
.lang-switch {
  display: flex; align-items: center; gap: 0.5rem;
  font-size: 0.78rem; letter-spacing: 0.08em;
  padding-left: 1rem; margin-left: 0.2rem;
  border-left: 1px solid var(--hairline-soft);
}
.lang-switch a { color: var(--ink-faint) !important; text-decoration: none; transition: color 0.3s ease; }
.lang-switch a:hover { color: var(--gold) !important; }
.lang-switch a.active { color: var(--gold) !important; }
.lang-switch span { color: rgba(234, 230, 221, 0.22); }

/* ---------- Japanese typography ---------- */
html[lang="ja"] {
  --serif: "Noto Serif JP", "Cormorant Garamond", serif;
  --sans: "Noto Sans JP", "Inter", sans-serif;
}
html[lang="ja"] body { line-height: 1.9; }
html[lang="ja"] h1, html[lang="ja"] h2, html[lang="ja"] .cta-title { line-height: 1.4; letter-spacing: 0.01em; }
html[lang="ja"] h1 { font-size: clamp(2rem, 4.6vw, 3.4rem); }
html[lang="ja"] h2 { font-size: clamp(1.5rem, 2.8vw, 2.2rem); }
html[lang="ja"] h3 { font-size: 1.12rem; }
html[lang="ja"] .kicker { letter-spacing: 0.18em; }
html[lang="ja"] .en-line {
  font-family: "Cormorant Garamond", serif;
  color: var(--gold); letter-spacing: 0.22em;
  font-size: clamp(0.95rem, 1.6vw, 1.2rem); margin-top: 1.1rem;
}
html[lang="ja"] .stat-num { font-family: "Cormorant Garamond", serif; }
html[lang="ja"] .faq-q { font-size: 1rem; line-height: 1.6; }
html[lang="ja"] .chip { letter-spacing: 0.02em; }
/* Japanese must never break mid-word in the nav */
html[lang="ja"] #main-nav { gap: 1.4rem; }
html[lang="ja"] #main-nav a, html[lang="ja"] .lang-switch { white-space: nowrap; }

/* Japanese nav labels are wider, so collapse to the burger menu earlier
   (the same rules as the 768px breakpoint, applied up to 1180px). */
@media (min-width: 769px) and (max-width: 1180px) {
  html[lang="ja"] #main-nav {
    position: fixed; top: var(--header-h); left: 0; right: 0;
    flex-direction: column; align-items: flex-start; gap: 0;
    background: rgba(5, 5, 16, 0.96); backdrop-filter: blur(18px);
    border-bottom: 1px solid var(--hairline);
    padding: 0.6rem 4vw 1.4rem;
    transform: translateY(-8px); opacity: 0; pointer-events: none;
    transition: opacity 0.3s ease, transform 0.3s ease;
  }
  html[lang="ja"] body.nav-open #main-nav { transform: none; opacity: 1; pointer-events: auto; }
  html[lang="ja"] #main-nav a:not(.btn) { padding: 0.8rem 0; font-size: 1rem; }
  html[lang="ja"] #main-nav .btn { margin-top: 1rem; }
  html[lang="ja"] .lang-switch {
    margin: 1.2rem 0 0; padding: 1rem 0 0;
    border-left: none; border-top: 1px solid var(--hairline-soft);
    width: 100%;
  }
  html[lang="ja"] #nav-toggle { display: block; }
}
@media (max-width: 768px) {
  .lang-switch {
    margin: 1.2rem 0 0; padding: 1rem 0 0;
    border-left: none; border-top: 1px solid var(--hairline-soft);
    width: 100%;
  }
}

#nav-toggle {
  display: none; background: none; border: none; cursor: pointer;
  width: 34px; height: 30px; position: relative;
}
#nav-toggle span {
  position: absolute; left: 4px; right: 4px; height: 1px; background: var(--gold);
  transition: transform 0.3s ease, top 0.3s ease;
}
#nav-toggle span:nth-child(1) { top: 11px; }
#nav-toggle span:nth-child(2) { top: 19px; }
body.nav-open #nav-toggle span:nth-child(1) { top: 15px; transform: rotate(45deg); }
body.nav-open #nav-toggle span:nth-child(2) { top: 15px; transform: rotate(-45deg); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-block; text-decoration: none; cursor: pointer;
  font-family: var(--sans); font-weight: 500; font-size: 0.9rem; letter-spacing: 0.1em;
  padding: 0.85rem 2rem; border-radius: 3px;
  transition: all 0.35s ease;
}
.btn-gold {
  background: linear-gradient(135deg, #f5c66a, #d9a53f);
  color: #14100a; border: 1px solid transparent;
}
.btn-gold:hover { box-shadow: 0 0 34px rgba(245, 198, 106, 0.35); transform: translateY(-2px); }
.btn-ghost {
  color: var(--ink); border: 1px solid rgba(234, 230, 221, 0.25); background: transparent;
}
.btn-ghost:hover { border-color: var(--gold); color: var(--gold); }
.btn-outline {
  color: var(--gold); border: 1px solid var(--gold-dim); background: transparent;
}
.btn-outline:hover { background: rgba(245, 198, 106, 0.1); box-shadow: 0 0 22px rgba(245, 198, 106, 0.18); }
.btn-sm { padding: 0.5rem 1.3rem; font-size: 0.8rem; }
.btn-lg { padding: 1.05rem 2.8rem; font-size: 1rem; }

/* ---------- Hero ---------- */
.hero { min-height: 100vh; display: flex; align-items: center; padding-top: calc(var(--header-h) + 2rem); }
.hero-content { max-width: 720px; }
.badge {
  display: inline-block; font-size: 0.78rem; letter-spacing: 0.16em;
  border: 1px solid var(--hairline); border-radius: 100px;
  padding: 0.42rem 1.1rem; color: var(--ink-dim);
  background: rgba(10, 10, 22, 0.35); backdrop-filter: blur(8px);
  margin-bottom: 2rem;
}
.hero h1 { text-shadow: 0 2px 40px rgba(5, 5, 16, 0.9); }
.hero .lead { margin-top: 1.6rem; }
.hero-actions { display: flex; gap: 1rem; margin-top: 2.4rem; flex-wrap: wrap; }
.direct-line { margin-top: 2.2rem; font-size: 0.86rem; color: var(--ink-faint); letter-spacing: 0.1em; }
.direct-line a { color: var(--gold); text-decoration: none; border-bottom: 1px solid var(--hairline); padding-bottom: 1px; }

.scroll-hint {
  position: absolute; bottom: 2.4rem; left: 50%; transform: translateX(-50%);
  width: 1px; height: 64px; overflow: hidden;
}
.scroll-hint span {
  position: absolute; left: 0; top: -50%; width: 1px; height: 50%;
  background: linear-gradient(180deg, transparent, var(--gold));
  animation: scrollhint 2.4s ease-in-out infinite;
}
@keyframes scrollhint { 0% { top: -50%; } 70% { top: 100%; } 100% { top: 100%; } }

/* ---------- Stats ---------- */
.stats { padding: 3rem 0 5rem; }
.stats-grid {
  display: grid; grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid var(--hairline-soft);
  border-bottom: 1px solid var(--hairline-soft);
  padding: 2.6rem 0;
}
.stat { text-align: center; padding: 0.4rem 1rem; position: relative; }
.stat + .stat::before {
  content: ""; position: absolute; left: 0; top: 15%; bottom: 15%; width: 1px;
  background: var(--hairline-soft);
}
.stat-num { font-size: clamp(2.4rem, 4.4vw, 3.6rem); color: var(--gold); }
.stat-label { font-size: 0.76rem; letter-spacing: 0.22em; text-transform: uppercase; color: var(--ink-faint); margin-top: 0.4rem; }

/* ---------- Glass panels & cards ---------- */
.glass {
  background: var(--glass-bg);
  border: 1px solid var(--hairline);
  border-radius: 10px;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}
.grid { display: grid; gap: 1.4rem; }
/* .grid-4 is laid out with flex further down so the last row can centre. */
.grid-5 { grid-template-columns: repeat(5, 1fr); }

.card { padding: 2rem 1.6rem; transition: transform 0.4s ease, border-color 0.4s ease, box-shadow 0.4s ease; }
.card:hover, .product-card:hover {
  transform: translateY(-6px);
  border-color: rgba(245, 198, 106, 0.45);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.45), 0 0 30px rgba(245, 198, 106, 0.07);
}
.card h3 { margin-bottom: 0.7rem; }
.card p { font-size: 0.9rem; color: var(--ink-dim); }

/* Product cards */
.product-card { overflow: hidden; transition: transform 0.4s ease, border-color 0.4s ease, box-shadow 0.4s ease; }
.card-img {
  position: relative; aspect-ratio: 4 / 3;
  background:
    radial-gradient(85% 90% at 50% 22%, rgba(245, 198, 106, 0.13), transparent 60%),
    linear-gradient(180deg, #0d0d1e, #07070f);
  border-bottom: 1px solid var(--hairline-soft);
  display: flex; align-items: center; justify-content: center;
}
.card-img .ph {
  font-family: var(--serif); font-size: 1.1rem; color: var(--gold-dim); letter-spacing: 0.08em;
}
.card-img img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; display: block;
}
.card-body { padding: 1.1rem 1.2rem 1.3rem; }
.card-body h3 { font-size: 1.12rem; }
.tag { font-size: 0.76rem; color: var(--gold); letter-spacing: 0.1em; margin-top: 0.25rem; }
.origin { font-size: 0.78rem; color: var(--ink-faint); margin-top: 0.5rem; }

/* ---------- Chips ---------- */
.chips { display: flex; flex-wrap: wrap; gap: 0.7rem; margin-top: 1.6rem; }
.chips.center { justify-content: center; }
.chip {
  display: inline-flex; align-items: center; gap: 0.45em; line-height: 1.5;
  font-size: 0.8rem; letter-spacing: 0.06em; color: var(--ink-dim);
  border: 1px solid var(--hairline); border-radius: 100px;
  padding: 0.42rem 1.05rem;
  background: rgba(10, 10, 22, 0.35); backdrop-filter: blur(8px);
  transition: border-color 0.3s ease, color 0.3s ease;
}
.chip:hover { border-color: var(--gold); color: var(--ink); }
.big-chips .chip { font-size: 0.94rem; padding: 0.7rem 1.6rem; }

/* ---------- Network / map ---------- */
.network .map-space { height: 24vh; min-height: 140px; }

/* ---------- About ---------- */
.about-layout { display: grid; grid-template-columns: minmax(320px, 520px) 1fr; gap: 3rem; align-items: center; }
.about-copy.panel { padding: 2.8rem 2.6rem; }
.about-copy h2 { margin-bottom: 1.2rem; }
.about-copy p { color: var(--ink-dim); font-size: 0.96rem; }
.castle-space { min-height: 30vh; }
.industries-inline { margin-top: 3.2rem; padding-top: 2.4rem; border-top: 1px solid var(--hairline-soft); }

/* ---------- FAQ ---------- */
.faq-list { display: flex; flex-direction: column; gap: 0.9rem; }
.faq-item { overflow: hidden; }
.faq-q {
  width: 100%; text-align: left; background: none; border: none; cursor: pointer;
  font-family: var(--serif); font-size: 1.12rem; font-weight: 600; color: var(--ink);
  padding: 1.3rem 1.6rem; display: flex; justify-content: space-between; align-items: center; gap: 1rem;
  transition: color 0.3s ease;
}
.faq-q:hover { color: var(--gold); }
.faq-mark { color: var(--gold); font-size: 1rem; transition: transform 0.35s ease; flex-shrink: 0; }
.faq-item.open .faq-mark { transform: rotate(45deg); }
.faq-a { max-height: 0; overflow: hidden; transition: max-height 0.5s cubic-bezier(0.4, 0, 0.2, 1); }
.faq-a p { padding: 0 1.6rem 1.4rem; color: var(--ink-dim); font-size: 0.92rem; }
.faq-item.open .faq-a { max-height: 300px; }

/* ---------- CTA ---------- */
.cta { min-height: 92vh; display: flex; align-items: center; text-align: center; }
.cta-title { font-size: clamp(2.4rem, 5.4vw, 4rem); }
.cta .lead { margin: 1.4rem auto 2.6rem; }
.cta .direct-line { margin-top: 2.6rem; }

/* ============================================================
   CONTENT SUB-PAGES (privacy, terms, company, contact)
   Quiet, readable layout over a single static motif.
   ============================================================ */
body.subpage #stage { opacity: 0.4; }

.page {
  padding: calc(var(--header-h) + clamp(4rem, 9vh, 6.5rem)) 0 clamp(4rem, 8vh, 6rem);
  min-height: 70vh;
}
.page-head { margin-bottom: 3rem; position: relative; }
.page-head::before {
  content: ""; position: absolute; z-index: -1; inset: -3rem -5rem;
  background: radial-gradient(58% 62% at 42% 50%, rgba(5, 5, 16, 0.66), rgba(5, 5, 16, 0) 74%);
  pointer-events: none;
}
.page-head h1 {
  font-size: clamp(2rem, 4.4vw, 3.2rem);
  text-shadow: 0 1px 16px rgba(5, 5, 16, 0.9), 0 0 42px rgba(5, 5, 16, 0.75);
}
.page-head h1::after {
  content: ""; display: block; width: 64px; height: 1px;
  background: linear-gradient(90deg, var(--gold), transparent);
  margin-top: 1.2rem;
}
.page-updated { font-size: 0.8rem; color: var(--ink-faint); letter-spacing: 0.1em; margin-top: 1.2rem; }

/* Prose */
.prose { padding: 2.6rem 2.8rem; }
.prose h2 {
  font-size: clamp(1.15rem, 2vw, 1.4rem);
  color: var(--gold); margin: 2.6rem 0 0.9rem;
  padding-bottom: 0.7rem; border-bottom: 1px solid var(--hairline-soft);
}
.prose h2:first-child { margin-top: 0; }
.prose h3 { font-size: 1.02rem; margin: 1.6rem 0 0.5rem; }
.prose p { color: var(--ink-dim); font-size: 0.94rem; margin-bottom: 1rem; }
.prose ul, .prose ol { color: var(--ink-dim); font-size: 0.94rem; margin: 0 0 1.2rem 1.2rem; }
.prose li { margin-bottom: 0.5rem; padding-left: 0.3rem; }
.prose li::marker { color: var(--gold-dim); }
.prose a { color: var(--gold); text-decoration: none; border-bottom: 1px solid var(--hairline); }
.prose a:hover { border-color: var(--gold); }
.prose strong { color: var(--ink); font-weight: 500; }

/* Company info table */
.info-table { width: 100%; border-collapse: collapse; font-size: 0.94rem; }
.info-table th, .info-table td {
  text-align: left; padding: 1rem 0.4rem;
  border-bottom: 1px solid var(--hairline-soft); vertical-align: top;
}
.info-table th {
  width: 32%; font-weight: 500; color: var(--gold);
  letter-spacing: 0.06em; white-space: nowrap;
}
.info-table td { color: var(--ink-dim); }
.info-table tr:last-child th, .info-table tr:last-child td { border-bottom: none; }

/* Placeholder the owner still needs to fill in */
.todo {
  display: inline-block; color: #ffb4b4;
  background: rgba(230, 57, 70, 0.12);
  border: 1px dashed rgba(230, 57, 70, 0.45);
  border-radius: 3px; padding: 0.1rem 0.55rem;
  font-size: 0.86rem; letter-spacing: 0.04em;
}

/* Contact form */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.2rem; }
.field { display: flex; flex-direction: column; gap: 0.5rem; }
.field.full { grid-column: 1 / -1; }
.field label { font-size: 0.8rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-faint); }
html[lang="ja"] .field label { text-transform: none; letter-spacing: 0.06em; font-size: 0.84rem; }
.field .req { color: var(--red); margin-left: 0.3em; }
.field input, .field select, .field textarea {
  font-family: inherit; font-size: 0.94rem; color: var(--ink);
  background: rgba(6, 6, 16, 0.6);
  border: 1px solid var(--hairline-soft); border-radius: 4px;
  padding: 0.8rem 0.9rem; width: 100%;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}
.field textarea { min-height: 160px; resize: vertical; }
.field select { appearance: none; cursor: pointer; }
.field select option { background: #0a0a16; color: var(--ink); }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--gold-dim);
  box-shadow: 0 0 0 3px rgba(245, 198, 106, 0.08);
}
.field input::placeholder, .field textarea::placeholder { color: rgba(234, 230, 221, 0.28); }
.form-actions { margin-top: 1.8rem; display: flex; align-items: center; gap: 1.4rem; flex-wrap: wrap; }
.form-note { font-size: 0.82rem; color: var(--ink-faint); }
.form-status { margin-top: 1.2rem; font-size: 0.9rem; color: var(--gold); min-height: 1.4em; }

/* Direct-contact cards beside the form */
.contact-methods { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.2rem; margin-bottom: 2.6rem; }
.contact-card { padding: 1.6rem 1.5rem; }
.contact-card h3 { font-size: 1rem; margin-bottom: 0.4rem; }
.contact-card a { color: var(--gold); text-decoration: none; font-size: 1.02rem; border-bottom: 1px solid var(--hairline); }
.contact-card p { font-size: 0.84rem; color: var(--ink-faint); margin-top: 0.6rem; }

@media (max-width: 768px) {
  .prose { padding: 1.8rem 1.4rem; }
  .form-grid, .contact-methods { grid-template-columns: 1fr; }
  .info-table th, .info-table td { display: block; width: 100%; }
  .info-table th { border-bottom: none; padding-bottom: 0.3rem; }
  .info-table td { padding-top: 0; }
}

/* ---------- Footer ---------- */
footer {
  border-top: 1px solid var(--hairline);
  background: rgba(4, 4, 12, 0.72);
  backdrop-filter: blur(14px);
  padding: 4.4rem 0 2rem;
}
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 2.6rem; }
.footer-brand .logo { font-size: 1.25rem; }
.footer-tag { color: var(--ink-faint); font-size: 0.86rem; margin-top: 1.1rem; max-width: 380px; }
.footer-contact { margin-top: 1.2rem; font-size: 0.88rem; line-height: 2; }
.footer-contact a {
  color: var(--gold); text-decoration: none;
  border-bottom: 1px solid var(--hairline); padding-bottom: 1px;
  transition: border-color 0.3s ease;
}
.footer-contact a:hover { border-color: var(--gold); }
.footer-col h4 {
  font-size: 0.74rem; letter-spacing: 0.28em; text-transform: uppercase;
  color: var(--gold); font-weight: 500; margin-bottom: 1.1rem;
}
.footer-col a {
  display: block; color: var(--ink-dim); text-decoration: none;
  font-size: 0.87rem; padding: 0.28rem 0; transition: color 0.3s ease;
}
.footer-col a:hover { color: var(--gold); }
.footer-bottom {
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 0.6rem;
  border-top: 1px solid var(--hairline-soft);
  margin-top: 3.2rem; padding-top: 1.6rem;
  font-size: 0.78rem; color: var(--ink-faint);
}

.spec-note {
  margin: 0.9rem 0 0; font-size: 0.76rem; line-height: 1.65;
  color: var(--ink-faint);
}

/* Submit results. Announced to screen readers via role=status/alert in
   the markup, so the colour is reinforcement rather than the message. */
.form-message {
  margin: 0 0 1.6rem; padding: 0.9rem 1.1rem;
  border-left: 2px solid; border-radius: 2px;
  font-size: 0.92rem; line-height: 1.7;
}
.form-message.is-ok { border-color: var(--gold); background: rgba(245, 198, 106, 0.07); color: var(--ink); }
.form-message.is-error { border-color: #e63946; background: rgba(230, 57, 70, 0.08); color: var(--ink); }

/* The honeypot must be reachable by a bot parsing the HTML and invisible
   to everyone else — so it is moved off-screen, not display:none, which
   some bots check for. */
.sd-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* ---------- Company profile table ([stardust_company]) ---------- */
.company-profile { margin: 2.4rem 0; border-top: 1px solid var(--hairline-soft); }
.company-profile-row {
  display: grid; grid-template-columns: 11rem 1fr; gap: 0 1.6rem;
  padding: 1rem 0;
  border-bottom: 1px solid var(--hairline-soft);
}
.company-profile dt {
  margin: 0;
  font-size: 0.78rem; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--gold); opacity: 0.85;
}
.company-profile dd {
  margin: 0;
  color: var(--ink-dim); line-height: 1.75;
}
@media (max-width: 640px) {
  .company-profile-row { grid-template-columns: 1fr; gap: 0.35rem; }
}
/* Japanese labels are not abbreviations, so drop the uppercase tracking. */
:lang(ja) .company-profile dt,
.lang-ja .company-profile dt { text-transform: none; letter-spacing: 0.02em; }

/* Secondhand dealer licence — a legal disclosure, so it takes its own
   row rather than competing for space with the copyright line. */
.footer-license {
  flex-basis: 100%;
  display: flex; align-items: center; gap: 0.55rem;
  margin: 0.9rem 0 0;
  padding-top: 0.9rem;
  border-top: 1px solid var(--hairline-soft);
  font-size: 0.74rem; letter-spacing: 0.02em;
}
.footer-license .sd-i { width: 15px; height: 15px; flex: none; color: var(--gold); opacity: 0.75; }
.footer-license-auth::before { content: '·'; margin: 0 0.45em; opacity: 0.5; }
.footer-license-no {
  margin-left: 0.45em;
  color: var(--ink-dim);
  font-variant-numeric: tabular-nums;
}

/* ---------- Reveal animations ---------- */
[data-reveal] {
  opacity: 0; transform: translateY(28px);
  transition: opacity 0.9s cubic-bezier(0.22, 1, 0.36, 1), transform 0.9s cubic-bezier(0.22, 1, 0.36, 1);
}
[data-reveal].in { opacity: 1; transform: none; }
[data-delay="1"] { transition-delay: 0.12s; }
[data-delay="2"] { transition-delay: 0.24s; }
[data-delay="3"] { transition-delay: 0.36s; }
[data-delay="4"] { transition-delay: 0.48s; }
[data-delay="5"] { transition-delay: 0.6s; }
[data-delay="6"] { transition-delay: 0.9s; }

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
  .grid-5 { grid-template-columns: repeat(3, 1fr); }
  .about-layout { grid-template-columns: 1fr; }
  .castle-space { min-height: 34vh; }
}
@media (max-width: 768px) {
  #main-nav {
    position: fixed; top: var(--header-h); left: 0; right: 0;
    flex-direction: column; align-items: flex-start; gap: 0;
    background: rgba(5, 5, 16, 0.96); backdrop-filter: blur(18px);
    border-bottom: 1px solid var(--hairline);
    padding: 0.6rem 4vw 1.4rem;
    transform: translateY(-8px); opacity: 0; pointer-events: none;
    transition: opacity 0.3s ease, transform 0.3s ease;
  }
  body.nav-open #main-nav { transform: none; opacity: 1; pointer-events: auto; }
  #main-nav a:not(.btn) { padding: 0.8rem 0; font-size: 1rem; }
  #main-nav .btn { margin-top: 1rem; }
  #nav-toggle { display: block; }

  .stats-grid { grid-template-columns: repeat(2, 1fr); row-gap: 2rem; }
  .stat:nth-child(3)::before { display: none; }
  .grid-5 { grid-template-columns: repeat(2, 1fr); }
  .grid-5, .grid-4 { gap: 0.9rem; }
  .section-tall { min-height: 0; display: block; }
  .network .map-space { height: 26vh; }
  .about-copy.panel { padding: 2rem 1.5rem; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
  .hero-actions .btn { width: 100%; text-align: center; }
}
@media (max-width: 460px) {
  .grid-5 { grid-template-columns: 1fr; }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  [data-reveal] { opacity: 1; transform: none; transition: none; }
  .scroll-hint span { animation: none; }
  * { scroll-behavior: auto !important; }
  #stage { display: none; }
}

/* ============================================================
   WORDPRESS-SPECIFIC ADDITIONS
   ============================================================ */

/* wp_nav_menu wraps items in <li>; make them behave like the
   bare <a> elements the nav flex layout expects. */
#main-nav ul, #main-nav li { list-style: none; margin: 0; padding: 0; }
#main-nav li { display: contents; }
.footer-col ul, .footer-col li { list-style: none; margin: 0; padding: 0; }

/* Accessibility */
.screen-reader-text {
  position: absolute; width: 1px; height: 1px; padding: 0;
  margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.skip-link:focus {
  position: fixed; top: 1rem; left: 1rem; z-index: 100;
  width: auto; height: auto; clip: auto;
  background: #050510; color: var(--gold);
  padding: 0.8rem 1.4rem; border: 1px solid var(--gold);
}

/* Product cards become links */
.product-card .card-link { text-decoration: none; color: inherit; display: block; }
.product-card .card-copy p:last-child, .card-copy p:last-child { margin-bottom: 0; }
.section-more { margin-top: 2.4rem; text-align: center; }

/* ---------- Single product ---------- */
.breadcrumb {
  font-size: 0.8rem; letter-spacing: 0.1em; color: var(--ink-faint);
  margin-bottom: 1.6rem; display: flex; gap: 0.6rem; align-items: center;
}
.breadcrumb a { color: var(--ink-faint); text-decoration: none; }
.breadcrumb a:hover { color: var(--gold); }

.product-tag {
  color: var(--gold); letter-spacing: 0.12em; font-size: 0.9rem; margin-top: 0.8rem;
}
.product-hero, .product-detail, .page-hero {
  overflow: hidden; margin: 0 0 2.4rem; padding: 0; line-height: 0;
}
.product-hero img, .product-detail img, .page-hero img {
  width: 100%; height: auto; display: block;
}
.product-detail { margin: 2.4rem 0; }

.product-layout {
  display: grid; grid-template-columns: 1fr minmax(280px, 360px);
  gap: 1.6rem; align-items: start;
}
.product-aside .info-table th { width: 45%; }
.aside-cta { margin-top: 1.8rem; }
.aside-cta .btn { width: 100%; text-align: center; }

.related-products { margin-top: 4rem; }
.related-products .section-head { margin-bottom: 2rem; }

.archive-group { margin-bottom: 4rem; }
.archive-cta { margin-top: 3rem; text-align: center; }
.archive-cta .lead { margin: 0 auto 1.6rem; }

/* ---------- Blog fallback ---------- */
.post-list { display: flex; flex-direction: column; gap: 1.4rem; }
.post-item { display: grid; grid-template-columns: 220px 1fr; overflow: hidden; }
.post-item .post-thumb { line-height: 0; }
.post-item .post-thumb img { width: 100%; height: 100%; object-fit: cover; }
.post-item .post-body { padding: 1.6rem 1.8rem; }
.post-item h2 { font-size: 1.3rem; margin-bottom: 0.4rem; }
.post-item h2 a { color: var(--ink); text-decoration: none; }
.post-item h2 a:hover { color: var(--gold); }
.post-meta { font-size: 0.78rem; letter-spacing: 0.1em; color: var(--ink-faint); margin-bottom: 0.8rem; }

.pagination { margin-top: 2.6rem; text-align: center; }
.pagination .page-numbers {
  display: inline-block; padding: 0.5rem 0.9rem; margin: 0 0.2rem;
  color: var(--ink-dim); text-decoration: none;
  border: 1px solid var(--hairline-soft); border-radius: 3px;
}
.pagination .page-numbers.current, .pagination .page-numbers:hover {
  color: var(--gold); border-color: var(--gold-dim);
}

@media (max-width: 900px) {
  .product-layout { grid-template-columns: 1fr; }
  .post-item { grid-template-columns: 1fr; }
  .post-item .post-thumb img { height: 200px; }
}

/* ============================================================
   SHIPPING ESTIMATOR
   ============================================================ */
.shipping-tool { padding: 2.4rem 2.6rem; margin: 2rem 0; }

/* ---------- Steps ---------- */
.ship-steps { display: grid; gap: 2rem; }
.ship-step { display: grid; grid-template-columns: auto 1fr; gap: 1.1rem; align-items: start; }
.ship-step-n {
  width: 30px; height: 30px; flex: none;
  display: grid; place-items: center;
  border: 1px solid var(--gold-dim); border-radius: 50%;
  font-family: var(--serif); font-size: 0.95rem; color: var(--gold);
  margin-top: 0.1rem;
}
.ship-step .field { gap: 0.7rem; }
.ship-step label, .field-label {
  font-size: 0.8rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-faint);
}
html[lang="ja"] .ship-step label,
html[lang="ja"] .field-label { text-transform: none; letter-spacing: 0.06em; font-size: 0.86rem; }

/* ---------- Size chooser ---------- */
.ship-sizes { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0.7rem; }
.ship-size {
  position: relative; cursor: pointer; text-align: center;
  padding: 1rem 0.6rem; border-radius: 6px;
  border: 1px solid var(--hairline-soft); background: rgba(6, 6, 16, 0.5);
  transition: border-color 0.25s ease, background 0.25s ease, transform 0.25s ease;
  display: flex; flex-direction: column; gap: 0.5rem; align-items: center;
  text-transform: none; letter-spacing: 0;
}
.ship-size input { position: absolute; opacity: 0; pointer-events: none; }
.ship-size:hover { border-color: var(--gold-dim); transform: translateY(-2px); }
.ship-size.is-on {
  border-color: var(--gold); background: rgba(245, 198, 106, 0.09);
  box-shadow: 0 0 24px rgba(245, 198, 106, 0.10);
}
.ship-size-i { font-size: 1.5rem; line-height: 1; }
.ship-size-t { font-size: 0.76rem; color: var(--ink-dim); line-height: 1.5; }
.ship-size.is-on .ship-size-t { color: var(--ink); }

/* ---------- Result ---------- */
.shipping-result { margin-top: 2.2rem; padding-top: 2rem; border-top: 1px solid var(--hairline-soft); }
.ship-placeholder { color: var(--ink-faint); font-size: 0.9rem; margin: 0; }

.ship-summary {
  display: grid; grid-template-columns: 1fr auto; gap: 2rem; align-items: center;
  padding: 1.6rem 1.8rem; margin-bottom: 2rem; border-radius: 8px;
  border: 1px solid var(--hairline);
  background:
    radial-gradient(120% 140% at 0% 0%, rgba(245, 198, 106, 0.10), transparent 60%),
    rgba(6, 6, 16, 0.55);
}
.ship-badge {
  display: inline-block; font-size: 0.66rem; letter-spacing: 0.18em; text-transform: uppercase;
  color: #14100a; background: linear-gradient(135deg, #f5c66a, #d9a53f);
  padding: 0.22rem 0.7rem; border-radius: 100px; margin-bottom: 0.7rem;
}
html[lang="ja"] .ship-badge { text-transform: none; letter-spacing: 0.08em; }
.ship-summary h3 { font-size: clamp(1.3rem, 2.4vw, 1.7rem); margin-bottom: 0.5rem; }
.ship-route { font-size: 0.88rem; color: var(--ink-dim); margin: 0; }
.ship-port { color: var(--ink-faint); }

.ship-summary-figs { display: flex; gap: 2.2rem; }
.ship-k {
  display: block; font-size: 0.68rem; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--ink-faint); margin-bottom: 0.35rem; white-space: nowrap;
}
html[lang="ja"] .ship-k { text-transform: none; letter-spacing: 0.06em; font-size: 0.76rem; }
.ship-v { font-family: var(--serif); font-size: 1.5rem; color: var(--gold); display: block; white-space: nowrap; }
.ship-v small { font-size: 0.62em; color: var(--ink-dim); }
.ship-unit { font-size: 0.72rem; color: var(--ink-faint); }

/* ---------- Mode comparison ---------- */
.ship-compare-h {
  font-size: 0.7rem; letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--ink-faint); margin-bottom: 0.9rem; font-weight: 500;
}
html[lang="ja"] .ship-compare-h { text-transform: none; letter-spacing: 0.08em; font-size: 0.82rem; }
.ship-modes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.9rem; margin-bottom: 1.8rem; }
.ship-mode {
  border: 1px solid var(--hairline-soft); border-radius: 6px;
  padding: 1.1rem 1.2rem; background: rgba(6, 6, 16, 0.4);
}
.ship-mode.is-picked { border-color: var(--gold-dim); background: rgba(245, 198, 106, 0.06); }
.ship-mode-head { display: flex; align-items: center; gap: 0.5rem; margin-bottom: 0.8rem; flex-wrap: wrap; }
.ship-mode-i { font-size: 1.05rem; }
.ship-mode-n { font-size: 0.88rem; color: var(--ink); }
.ship-tag {
  font-size: 0.6rem; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--ink-faint); border: 1px solid var(--hairline-soft);
  padding: 0.1rem 0.45rem; border-radius: 100px;
}
.ship-tag.is-rec { color: var(--gold); border-color: var(--gold-dim); }
html[lang="ja"] .ship-tag { text-transform: none; letter-spacing: 0.04em; font-size: 0.66rem; }
.ship-mode-days { font-family: var(--serif); font-size: 1.15rem; color: var(--ink); }
.ship-mode-days small, .ship-mode-cost small { font-size: 0.66em; color: var(--ink-faint); }
.ship-mode-cost { font-size: 0.84rem; color: var(--ink-dim); margin-top: 0.3rem; }
.ship-mode.is-picked .ship-mode-days { color: var(--gold); }

/* ---------- Notes and footer ---------- */
.ship-notes {
  border: 1px solid var(--hairline-soft); border-radius: 6px;
  padding: 1.1rem 1.3rem; margin-bottom: 1.6rem; background: rgba(6, 6, 16, 0.35);
}
.ship-notes h4 {
  font-size: 0.68rem; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--gold); margin-bottom: 0.6rem; font-weight: 500;
}
html[lang="ja"] .ship-notes h4 { text-transform: none; letter-spacing: 0.08em; font-size: 0.8rem; }
.ship-notes ul { margin: 0 0 0 1.1rem; }
.ship-notes li { font-size: 0.85rem; color: var(--ink-dim); margin-bottom: 0.35rem; }
.ship-notes li:last-child { margin-bottom: 0; }
.ship-notes li::marker { color: var(--gold-dim); }

.ship-foot { display: flex; align-items: center; gap: 1.6rem; flex-wrap: wrap; }
.ship-disclaimer {
  flex: 1 1 320px; margin: 0;
  font-size: 0.78rem; color: var(--ink-faint); line-height: 1.7;
  border-left: 2px solid var(--hairline); padding-left: 0.9rem;
}
.ship-foot .btn { flex: none; }

@media (max-width: 900px) {
  .ship-modes { grid-template-columns: 1fr; }
  .ship-summary { grid-template-columns: 1fr; gap: 1.4rem; }
  .ship-summary-figs { gap: 1.8rem; }
}
@media (max-width: 768px) {
  .shipping-tool { padding: 1.6rem 1.3rem; }
  .ship-sizes { grid-template-columns: repeat(2, 1fr); }
  .ship-step { grid-template-columns: 1fr; gap: 0.7rem; }
  .ship-step-n { display: none; }
}

/* ============================================================
   ICONS — inline SVG replacing emoji
   ============================================================ */
.sd-i {
  width: 1em; height: 1em; display: inline-block;
  vertical-align: -0.14em; flex: none;
}
.sd-flag {
  width: 1.25em; height: auto; display: inline-block;
  vertical-align: -0.2em; flex: none;
  border-radius: 2px;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.14);
  margin-right: 0.15em;
}

/* Service cards: a framed gold glyph rather than a floating emoji */
.card-icon {
  width: 46px; height: 46px;
  display: grid; place-items: center;
  border: 1px solid var(--hairline);
  border-radius: 10px;
  background: rgba(245, 198, 106, 0.06);
  color: var(--gold);
  margin-bottom: 1.2rem;
  font-size: 1.35rem;
  transition: border-color 0.35s ease, background 0.35s ease;
}
.card:hover .card-icon,
.contact-card:hover .card-icon { border-color: var(--gold-dim); background: rgba(245, 198, 106, 0.12); }
.card-icon .sd-i { width: 22px; height: 22px; }

.contact-card .card-icon { margin-bottom: 1rem; }

/* Chips: icon sizing (base chip styling lives with the other chips above) */
.chip .sd-i { width: 1.05em; height: 1.05em; color: var(--gold); }
.big-chips .chip .sd-i { width: 1.15em; height: 1.15em; }

/* Badge and origin lines */
.badge { display: inline-flex; align-items: center; gap: 0.5em; }
.origin { display: flex; align-items: center; gap: 0.35em; flex-wrap: wrap; }
.info-table td .sd-flag { margin-right: 0.2em; }

/* Shipping tool */
.ship-size-i {
  color: var(--gold); display: grid; place-items: center;
  width: 26px; height: 26px;
}
.ship-size-i .sd-i { width: 24px; height: 24px; }
.ship-size .ship-size-i { opacity: 0.65; transition: opacity 0.25s ease; }
.ship-size.is-on .ship-size-i, .ship-size:hover .ship-size-i { opacity: 1; }

.ship-mode-i { color: var(--gold); display: inline-grid; place-items: center; }
.ship-mode-i .sd-i { width: 17px; height: 17px; }
.ship-summary h3 { display: flex; align-items: center; gap: 0.5em; }
.ship-summary h3 .sd-i { width: 24px; height: 24px; color: var(--gold); }
.ship-route { display: flex; align-items: center; gap: 0.4em; flex-wrap: wrap; }
.ship-arrow { color: var(--gold-dim); }

/* Footer contact rows */
.footer-contact { display: flex; flex-direction: column; gap: 0.3rem; }

/* ============================================================
   SERVICE GRID — tolerate any card count
   The Japanese site offers five services where the English site
   offers four, so a fixed 4-column grid would strand an orphan
   on the left. Flex wrapping with a locked basis keeps four per
   row and centres whatever is left over.
   ============================================================ */
.grid-4 {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
}
.grid-4 > * {
  flex: 0 1 calc((100% - 3 * 1.4rem) / 4);
  max-width: calc((100% - 3 * 1.4rem) / 4);
}
@media (max-width: 1080px) {
  .grid-4 > * {
    flex-basis: calc((100% - 1.4rem) / 2);
    max-width: calc((100% - 1.4rem) / 2);
  }
}
@media (max-width: 768px) {
  .grid-4 > * {
    flex-basis: calc((100% - 0.9rem) / 2);
    max-width: calc((100% - 0.9rem) / 2);
  }
}
@media (max-width: 460px) {
  .grid-4 > * { flex-basis: 100%; max-width: 100%; }
}

/* ============================================================
   KEYBOARD FOCUS
   Only the form fields and the skip link showed focus before, which
   left the nav, buttons, product cards, language switcher and the
   shipment-size chooser invisible to anyone tabbing through.
   :focus-visible keeps the ring off mouse clicks.
   ============================================================ */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
  border-radius: 3px;
}

/* The size chooser hides its radio inside the label, so move the ring
   onto the card. :has() covers current browsers; older ones still get a
   ring on every other control. */
.ship-size:has(input:focus-visible) {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
}

/* Product cards wrap the whole card in a link — ring the card, not the text. */
.product-card:has(a:focus-visible) {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
}
.product-card a:focus-visible { outline: none; }

@media (prefers-reduced-motion: no-preference) {
  a, button { transition: outline-color 0.15s ease; }
}
