/* ============================================================
   Jidoka — SPA stylesheet
   Palette: deep charcoal + Japanese vermilion accent
   ============================================================ */

:root {
  --bg:        #1D2E2A;
  --bg-alt:    #22342F;
  --bg-dark:   #15211F;
  --surface:   #243934;
  --surface-2: #2C433D;
  --line:      rgba(236, 232, 224, 0.11);
  --text:      #ECE8E0;
  --muted:     #A9B4AC;
  --muted-2:   #7f9089;
  --accent:    #CD9979;
  --accent-2:  #E0B08C;
  --gold:      #B8872E;
  --sage:      #86A197;
  --accent-soft: rgba(205, 153, 121, 0.16);
  --radius:    16px;
  --radius-sm: 10px;
  --maxw:      1160px;
  --ease:      cubic-bezier(0.22, 1, 0.36, 1);
  --shadow:    0 20px 50px -20px rgba(0, 0, 0, 0.55);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; scroll-padding-top: 84px; -webkit-text-size-adjust: 100%; overflow-x: hidden; }

body {
  font-family: "Manrope", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  overflow-wrap: break-word;
}

#constellation-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  pointer-events: none;
  display: block;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

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

.skip-link {
  position: absolute; left: -999px; top: 0; z-index: 200;
  background: var(--accent); color: #fff; padding: 10px 16px; border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; }

/* ---------- Header ---------- */
.site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  background: rgba(21, 33, 31, 0.72);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
  transition: background .3s var(--ease), border-color .3s var(--ease);
}
.site-header.scrolled { background: rgba(18, 29, 27, 0.92); border-bottom-color: var(--line); }

.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 72px; }

.brand { display: flex; align-items: center; }
.brand-logo { height: 28px; width: auto; display: block; transition: opacity .2s var(--ease); }
.brand:hover .brand-logo { opacity: 0.85; }

.nav-links { display: flex; align-items: center; gap: 30px; }
.nav-links a { color: var(--muted); font-weight: 500; font-size: 0.95rem; position: relative; transition: color .2s var(--ease); }
.nav-links a:not(.nav-cta)::after {
  content: ""; position: absolute; left: 0; bottom: -6px; height: 2px; width: 0;
  background: var(--accent); transition: width .28s var(--ease);
}
.nav-links a:hover { color: var(--text); }
.nav-links a:hover:not(.nav-cta)::after,
.nav-links a.active:not(.nav-cta)::after { width: 100%; }
.nav-links a.active:not(.nav-cta) { color: var(--text); }

.nav-cta {
  background: var(--accent); color: #1a1512 !important; padding: 9px 18px; border-radius: 999px;
  font-weight: 700 !important; transition: transform .2s var(--ease), box-shadow .2s var(--ease), background .2s var(--ease);
}
.nav-cta:hover { transform: translateY(-1px); background: var(--accent-2); box-shadow: 0 8px 20px -6px rgba(205,153,121,0.5); }

.nav-toggle { display: none; flex-direction: column; gap: 5px; background: none; border: 0; cursor: pointer; padding: 8px; }
.nav-toggle span { width: 24px; height: 2px; background: var(--text); border-radius: 2px; transition: transform .3s var(--ease), opacity .3s var(--ease); }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 13px 26px; border-radius: 999px; font-weight: 600; font-size: 0.98rem;
  transition: transform .2s var(--ease), box-shadow .2s var(--ease), background .2s var(--ease);
  cursor: pointer; border: 1px solid transparent;
}
.btn-primary { background: var(--accent); color: #1a1512; }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 14px 30px -10px rgba(205,153,121,0.55); background: var(--accent-2); }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--muted); transform: translateY(-2px); }
.btn-lg { padding: 16px 34px; font-size: 1.05rem; }

/* ---------- Hero ---------- */
.hero { position: relative; min-height: 100svh; display: flex; align-items: center; padding: 96px 0 72px; overflow: hidden; background: transparent; }
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background:
    radial-gradient(130% 95% at 12% 42%, rgba(21,33,31,0.55), transparent 68%),
    linear-gradient(180deg, transparent 78%, var(--bg) 100%);
}
.hero-glow {
  position: absolute; top: -20%; left: 50%; transform: translateX(-50%);
  width: 900px; height: 700px; pointer-events: none; z-index: 1;
  background: radial-gradient(circle at 50% 40%, rgba(205,153,121,0.18), transparent 62%);
  filter: blur(10px);
}
.hero-inner { position: relative; z-index: 2; max-width: 880px; }
.eyebrow {
  text-transform: uppercase; letter-spacing: 0.22em; font-size: 0.78rem; font-weight: 700;
  color: var(--accent-2); margin-bottom: 22px;
}
.hero-title { font-size: clamp(2.6rem, 6vw, 4.6rem); line-height: 1.05; font-weight: 800; letter-spacing: -0.02em; }
.hero-title .accent { color: var(--accent); }
.hero-lead { font-size: clamp(1.05rem, 2vw, 1.28rem); color: var(--muted); margin: 26px 0 34px; max-width: 660px; }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }
.hero-kicker { margin-top: 40px; font-family: "Noto Serif JP", serif; color: var(--muted-2); font-size: 0.98rem; letter-spacing: 0.04em; }

/* ---------- Sections ---------- */
.section { padding: 100px 0; position: relative; z-index: 1; }
.section-alt { background: rgba(21, 33, 31, 0.35); }
.section-dark { background: rgba(15, 33, 31, 0.5); }

.section-head { max-width: 720px; margin-bottom: 56px; }
.section-index {
  display: inline-block; font-family: "Noto Serif JP", serif; color: var(--accent);
  font-size: 0.95rem; letter-spacing: 0.2em; margin-bottom: 14px;
}
.section-head h2 { font-size: clamp(1.9rem, 4vw, 2.9rem); font-weight: 800; letter-spacing: -0.015em; line-height: 1.12; }
.section-sub { color: var(--muted); margin-top: 16px; font-size: 1.08rem; }
.section-sub strong { color: var(--text); font-weight: 600; }

.lead { font-size: 1.15rem; color: var(--text); }
p + p { margin-top: 16px; }

/* ---------- Who we are ---------- */
.who-grid { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 56px; align-items: start; }
.who-copy p { color: var(--muted); }
.who-copy .lead { color: var(--text); }
.who-copy strong { color: var(--text); }

.principles { list-style: none; display: grid; gap: 14px; }
.principles li {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: 16px 18px; font-size: 0.96rem; color: var(--muted);
  transition: transform .2s var(--ease), border-color .2s var(--ease);
}
.principles li:hover { transform: translateX(4px); border-color: var(--accent-soft); }
.p-title { display: block; color: var(--text); font-weight: 700; margin-bottom: 3px; }

/* ---------- Pillars ---------- */
.pillars { display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px; }
.pillar {
  position: relative; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 34px 30px; overflow: hidden;
  transition: transform .28s var(--ease), border-color .28s var(--ease), box-shadow .28s var(--ease);
}
.pillar::before {
  content: ""; position: absolute; left: 0; top: 0; height: 3px; width: 100%;
  background: linear-gradient(90deg, var(--accent), transparent); opacity: 0; transition: opacity .28s var(--ease);
}
.pillar:hover { transform: translateY(-5px); border-color: var(--accent-soft); box-shadow: var(--shadow); }
.pillar:hover::before { opacity: 1; }
.pillar-num { font-family: "Noto Serif JP", serif; color: var(--accent); font-size: 1.1rem; letter-spacing: 0.15em; }
.pillar h3 { font-size: 1.4rem; margin: 8px 0 14px; font-weight: 700; }
.pillar p { color: var(--muted); font-size: 0.98rem; }
.pillar-value { margin-top: 16px; padding-top: 16px; border-top: 1px dashed var(--line); color: var(--text) !important; font-size: 0.94rem !important; }
.pillar-value span { display: block; text-transform: uppercase; letter-spacing: 0.14em; font-size: 0.72rem; color: var(--accent-2); font-weight: 700; margin-bottom: 4px; }

/* ---------- Steps ---------- */
.steps { list-style: none; display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; counter-reset: step; }
.step { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px 24px; transition: transform .25s var(--ease), border-color .25s var(--ease); }
.step:hover { transform: translateY(-4px); border-color: var(--accent-soft); }
.step-num {
  display: grid; place-items: center; width: 42px; height: 42px; border-radius: 50%;
  background: var(--accent-soft); color: var(--accent-2); font-weight: 800; font-size: 1.1rem; margin-bottom: 16px;
}
.step h4 { font-size: 1.12rem; margin-bottom: 8px; }
.step p { color: var(--muted); font-size: 0.94rem; }

.principle-note {
  margin-top: 40px; text-align: center; color: var(--text); font-size: 1.1rem;
  padding: 22px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); max-width: 820px; margin-inline: auto;
}
.principle-note span { color: var(--accent); margin-right: 8px; }

/* ---------- Routes ---------- */
.routes { display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px; }
.route {
  position: relative; background: var(--surface-2); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 34px 30px;
  transition: transform .28s var(--ease), border-color .28s var(--ease), box-shadow .28s var(--ease);
}
.route:hover { transform: translateY(-5px); border-color: var(--accent-soft); box-shadow: var(--shadow); }
.route-num { font-family: "Noto Serif JP", serif; color: var(--accent); font-size: 1.1rem; letter-spacing: 0.15em; }
.route h3 { font-size: 1.5rem; margin: 6px 0 6px; font-weight: 700; }
.route-tag { color: var(--accent-2); font-weight: 600; font-size: 0.95rem; margin-bottom: 12px; }
.route p:not(.route-tag) { color: var(--muted); font-size: 0.97rem; }

/* ---------- Industries ---------- */
.industries { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.industry { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px 24px; transition: transform .25s var(--ease), border-color .25s var(--ease); }
.industry:hover { transform: translateY(-4px); border-color: var(--accent-soft); }
.industry h4 { font-size: 1.15rem; margin-bottom: 14px; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.industry ul { list-style: none; display: grid; gap: 8px; }
.industry li { color: var(--muted); font-size: 0.94rem; padding-left: 18px; position: relative; }
.industry li::before { content: "—"; position: absolute; left: 0; color: var(--accent); }

/* ---------- Why us ---------- */
.why-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; }
.why-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 30px 26px; transition: transform .25s var(--ease), border-color .25s var(--ease); }
.why-card:hover { transform: translateY(-4px); border-color: var(--accent-soft); }
.why-num { font-family: "Noto Serif JP", serif; color: var(--accent); font-size: 1.5rem; }
.why-card h4 { margin: 12px 0 8px; font-size: 1.15rem; }
.why-card p { color: var(--muted); font-size: 0.94rem; }

/* ---------- CTA ---------- */
.cta { position: relative; z-index: 1; padding: 120px 0; text-align: center; overflow: hidden; background: rgba(15, 33, 31, 0.45); }
.cta::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(circle at 50% 120%, rgba(205,153,121,0.20), transparent 55%);
}
.cta-inner { position: relative; max-width: 720px; }
.cta h2 { font-size: clamp(2rem, 5vw, 3.4rem); font-weight: 800; letter-spacing: -0.02em; line-height: 1.1; }
.cta-lead { color: var(--muted); font-size: 1.12rem; margin: 20px auto 34px; max-width: 540px; }

/* ---------- Contact form ---------- */
.contact-form { max-width: 640px; margin: 0 auto; text-align: left; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.field { margin-bottom: 18px; display: flex; flex-direction: column; }
.field label { font-size: 0.86rem; font-weight: 600; color: var(--text); margin-bottom: 7px; }
.field label .opt { color: var(--muted-2); font-weight: 400; }
.field input,
.field select,
.field textarea {
  width: 100%; background: var(--surface); color: var(--text);
  border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: 12px 14px; font-family: inherit; font-size: 0.98rem;
  transition: border-color .2s var(--ease), box-shadow .2s var(--ease);
}
.field textarea { resize: vertical; min-height: 110px; }
.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none; border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.field select { appearance: none; cursor: pointer; }

/* Honeypot — visually and functionally hidden from real users */
.hp-field { position: absolute; left: -9999px; top: auto; width: 1px; height: 1px; overflow: hidden; }

.captcha-holder { margin: 4px 0 18px; min-height: 0; }
.captcha-holder:empty { margin: 0; }

.form-footer { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; margin-top: 6px; }
.form-status { font-size: 0.92rem; margin: 0; }
.form-status.ok { color: #57d38c; }
.form-status.err { color: var(--accent-2); }
.form-fineprint { color: var(--muted-2); font-size: 0.82rem; margin-top: 16px; }
.btn:disabled { opacity: 0.6; cursor: not-allowed; transform: none; box-shadow: none; }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--line); padding: 44px 0; background: rgba(15, 33, 31, 0.55); position: relative; z-index: 1; }
.footer-inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.footer-brand .footer-logo { height: 30px; width: auto; margin-bottom: 8px; }
.footer-brand p { color: var(--muted-2); font-size: 0.86rem; margin-top: 6px; }
.footer-meta { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; color: var(--muted-2); font-size: 0.88rem; }
.footer-meta a { color: var(--muted); }
.footer-meta a:hover { color: var(--accent-2); }

/* ---------- Reveal animation ---------- */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.reveal.in { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .who-grid { grid-template-columns: 1fr; gap: 36px; }
  .pillars, .routes { grid-template-columns: 1fr; }
  .steps, .industries, .why-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 720px) {
  .nav-toggle { display: flex; }
  .nav-links {
    position: fixed; inset: 72px 0 auto 0; flex-direction: column; gap: 0;
    background: var(--bg-dark); border-bottom: 1px solid var(--line);
    padding: 8px 24px 20px; align-items: stretch;
    clip-path: inset(0 0 100% 0); transition: clip-path .35s var(--ease);
  }
  .nav-links.open { clip-path: inset(0 0 0 0); }
  .nav-links a { padding: 14px 0; border-bottom: 1px solid var(--line); font-size: 1.05rem; }
  .nav-links a:not(.nav-cta)::after { display: none; }
  .nav-cta { text-align: center; margin-top: 14px; padding: 14px; }
  .hero { padding: 88px 0 56px; }
  .section { padding: 72px 0; }
  .steps, .industries, .why-grid { grid-template-columns: 1fr; }
  .field-row { grid-template-columns: 1fr; gap: 0; }
  .footer-inner { flex-direction: column; align-items: flex-start; }
  .footer-meta { align-items: flex-start; }
}

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; }
  .reveal { opacity: 1 !important; transform: none !important; transition: none !important; }
}
