/* ============================================================
   DAIICHI GROUP — styles
   ============================================================ */
:root {
  --ink: #0b1020;
  --ink-2: #141a2e;
  --ink-3: #1e2640;
  --red: #c8102e;
  --red-dark: #a00d25;
  --paper: #faf8f5;
  --tint: #f2eee8;
  --line: #e4ded5;
  --text: #1a1d29;
  --muted: #5f6475;
  --on-dark: #e9ebf2;
  --on-dark-muted: #9aa1b8;
  --radius: 18px;
  --shadow: 0 1px 2px rgba(11, 16, 32, 0.04), 0 8px 24px rgba(11, 16, 32, 0.06);
  --shadow-lg: 0 2px 4px rgba(11, 16, 32, 0.05), 0 24px 48px rgba(11, 16, 32, 0.12);
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --jp: "Noto Serif JP", "Yu Mincho", serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--text);
  background: var(--paper);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4 { line-height: 1.15; margin: 0 0 0.5em; letter-spacing: -0.02em; }
h2 { font-size: clamp(1.9rem, 4vw, 2.8rem); font-weight: 800; }
h3 { font-size: 1.35rem; font-weight: 700; }
p { margin: 0 0 1em; }

.container { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.muted { color: var(--muted); }
.small { font-size: 0.9rem; }
.accent { color: var(--red); }

.eyebrow {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--red);
  margin-bottom: 14px;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 14px 26px;
  border-radius: 999px;
  font-weight: 600; font-size: 0.98rem;
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: transform 0.2s, background 0.2s, border-color 0.2s, color 0.2s, box-shadow 0.2s;
  font-family: inherit;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--red); color: #fff; box-shadow: 0 8px 20px rgba(200, 16, 46, 0.28); }
.btn-primary:hover { background: var(--red-dark); }
.btn-ghost { border-color: rgba(255, 255, 255, 0.3); color: #fff; }
.btn-ghost:hover { border-color: #fff; background: rgba(255, 255, 255, 0.06); }
.btn-sm { padding: 10px 20px; font-size: 0.9rem; }
.btn-block { width: 100%; }

/* ---------- Header ---------- */
.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  background: rgba(11, 16, 32, 0.6);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  transition: background 0.3s, box-shadow 0.3s;
}
.site-header.scrolled { background: rgba(11, 16, 32, 0.92); box-shadow: 0 6px 24px rgba(0, 0, 0, 0.25); }
.nav { display: flex; align-items: center; justify-content: space-between; height: 72px; }
.brand { display: inline-flex; align-items: center; gap: 12px; color: #fff; }
.brand-mark {
  display: grid; place-items: center;
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--red); color: #fff;
  font-family: var(--jp); font-weight: 900; font-size: 1rem; letter-spacing: -0.05em;
}
.brand-text { display: flex; flex-direction: column; font-weight: 800; letter-spacing: 0.18em; font-size: 1.05rem; line-height: 1.1; }
.brand-text small { font-size: 0.62rem; letter-spacing: 0.42em; color: var(--on-dark-muted); font-weight: 600; }

.nav-links { display: flex; align-items: center; gap: 32px; }
.nav-links a { color: var(--on-dark); font-weight: 500; font-size: 0.95rem; }
.nav-links a:not(.btn):hover { color: #fff; }
.nav-links a.btn { color: #fff; }
.nav-toggle { display: none; background: none; border: 0; padding: 8px; cursor: pointer; }
.nav-toggle span { display: block; width: 24px; height: 2px; background: #fff; margin: 5px 0; transition: transform 0.3s, opacity 0.3s; }

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: hidden;
  background: var(--ink);
  color: #fff;
  padding: 150px 0 60px;
}
.hero-bg { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.hero-photo {
  position: absolute; inset: 0;
  background: url("../assets/images/hero-tokyo.jpg") center 30% / cover no-repeat;
  animation: slowZoom 28s ease-in-out infinite alternate;
}
.hero-overlay {
  position: absolute; inset: 0;
  background:
    linear-gradient(90deg, rgba(11, 16, 32, 0.96) 0%, rgba(11, 16, 32, 0.82) 38%, rgba(11, 16, 32, 0.35) 70%, rgba(11, 16, 32, 0.25) 100%),
    linear-gradient(0deg, var(--ink) 0%, rgba(11, 16, 32, 0) 35%);
}
@keyframes slowZoom { from { transform: scale(1); } to { transform: scale(1.08); } }
.kanji {
  position: absolute; right: 40px; top: 150px;
  font-family: var(--jp); font-weight: 900;
  font-size: 220px; line-height: 1; color: rgba(255, 255, 255, 0.08);
  writing-mode: vertical-rl;
  letter-spacing: -0.05em;
}
.hero-inner { position: relative; max-width: 1200px; }
.hero h1 { font-size: clamp(2.6rem, 7vw, 5.2rem); font-weight: 800; letter-spacing: -0.035em; max-width: 780px; margin-bottom: 24px; }
.hero .eyebrow { color: #ff8a9b; }
.hero .accent { color: #ff4d67; }
.lead { font-size: clamp(1.05rem, 1.6vw, 1.2rem); color: var(--on-dark); max-width: 560px; opacity: 0.9; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 14px; margin: 32px 0 48px; }
.hero-stats { display: flex; gap: 48px; list-style: none; padding: 0; margin: 0 0 56px; }
.hero-stats strong { display: block; font-size: 2.2rem; font-weight: 800; line-height: 1; }
.hero-stats span { font-size: 0.85rem; color: var(--on-dark-muted); letter-spacing: 0.04em; }

/* quick switcher */
.switcher {
  position: relative;
  display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  backdrop-filter: blur(8px);
}
.switch-chip {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 16px; border-radius: 14px;
  color: var(--on-dark); font-weight: 600; font-size: 0.92rem;
  transition: background 0.2s, transform 0.2s;
}
.switch-chip:hover { background: rgba(255, 255, 255, 0.08); transform: translateY(-2px); color: #fff; }
.chip-icon {
  flex: none; display: grid; place-items: center;
  width: 36px; height: 36px; border-radius: 10px;
  background: var(--brand); color: #fff;
}
.chip-icon svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- Sections ---------- */
.section { padding: 110px 0; }
.section-dark { background: var(--ink); color: var(--on-dark); }
.section-dark h2 { color: #fff; }
.section-tint { background: var(--tint); }
.section-head { max-width: 680px; margin-bottom: 56px; }

/* ---------- Company cards ---------- */
.company-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 24px;
}
.company-card { grid-column: span 2; }
.company-card:nth-child(4) { grid-column: 2 / span 2; }
.company-card:nth-child(5) { grid-column: 4 / span 2; }

.company-card {
  position: relative;
  display: flex; flex-direction: column;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  transition: transform 0.3s, box-shadow 0.3s, border-color 0.3s;
  overflow: hidden;
}
.company-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); border-color: transparent; }

.card-media {
  position: relative; height: 200px; overflow: hidden;
  background: var(--brand);
}
.card-media img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 0.8s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.card-media::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(11, 16, 32, 0) 45%, rgba(11, 16, 32, 0.45) 100%);
}
.card-media::before {
  content: ""; position: absolute; inset: auto 0 0 0; height: 4px; z-index: 2;
  background: var(--brand);
}
.company-card:hover .card-media img { transform: scale(1.07); }

.card-body {
  position: relative;
  display: flex; flex-direction: column; flex: 1;
  padding: 0 30px 30px;
}
.card-icon {
  display: grid; place-items: center;
  width: 60px; height: 60px; border-radius: 16px;
  margin: -30px 0 18px; position: relative; z-index: 3;
  background: var(--brand); color: #fff;
  border: 4px solid #fff;
  box-shadow: 0 10px 20px -8px var(--brand);
}
.card-icon svg { width: 28px; height: 28px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.card-sector { font-size: 0.75rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--brand); margin-bottom: 6px; }
.card-tagline { font-weight: 600; color: var(--text); margin-bottom: 10px; }
.card-desc { color: var(--muted); font-size: 0.95rem; }
.card-services { list-style: none; padding: 0; margin: 4px 0 26px; display: flex; flex-wrap: wrap; gap: 8px; }
.card-services li {
  font-size: 0.8rem; font-weight: 500;
  padding: 6px 12px; border-radius: 999px;
  background: var(--tint); color: #3b3f4f;
}
.card-link {
  margin-top: auto;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 13px 20px; border-radius: 12px;
  background: var(--ink); color: #fff; font-weight: 600;
  transition: background 0.2s, gap 0.2s;
}
.card-link svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.company-card:hover .card-link { background: var(--brand); gap: 12px; }
.card-badge {
  position: absolute; top: 16px; right: 16px; z-index: 2;
  font-size: 0.72rem; font-weight: 600;
  padding: 5px 12px; border-radius: 999px;
  background: rgba(11, 16, 32, 0.7); color: #fff;
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
}

/* ---------- About (photo background) ---------- */
.section-about { position: relative; overflow: hidden; }
.section-about::before {
  content: ""; position: absolute; inset: 0;
  background: url("../assets/images/about-pagoda.jpg") center / cover no-repeat;
  opacity: 0.55;
}
.section-about::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(90deg, var(--ink) 0%, rgba(11, 16, 32, 0.9) 45%, rgba(11, 16, 32, 0.45) 100%);
}
.section-about .container { position: relative; z-index: 1; }

/* ---------- CTA band ---------- */
.cta-band {
  position: relative; overflow: hidden;
  padding: 110px 0;
  color: #fff;
  background:
    linear-gradient(100deg, rgba(11, 16, 32, 0.94) 0%, rgba(11, 16, 32, 0.8) 50%, rgba(160, 13, 37, 0.7) 100%),
    url("../assets/images/cta-office.jpg") center / cover no-repeat;
  background-attachment: scroll, fixed;
}
.cta-inner { display: flex; align-items: center; justify-content: space-between; gap: 48px; }
.cta-inner h2 { color: #fff; max-width: 680px; font-size: clamp(1.6rem, 3.2vw, 2.4rem); margin: 0; }
.cta-band .eyebrow { color: #ff8a9b; }
.cta-actions { display: flex; flex-wrap: wrap; gap: 14px; flex: none; }
.btn-light { background: #fff; color: var(--ink); }
.btn-light:hover { background: var(--tint); }


/* ---------- About ---------- */
.about { display: grid; grid-template-columns: 1.1fr 1fr; gap: 64px; align-items: center; }
.about-text p { color: var(--on-dark-muted); font-size: 1.05rem; }
.about-text strong, .about-text em { color: #fff; }
.about-text .btn { margin-top: 12px; }
.orbit { position: relative; width: min(420px, 100%); aspect-ratio: 1; margin: 0 auto; }
.orbit::before {
  content: ""; position: absolute; inset: 12%;
  border: 1px dashed rgba(255, 255, 255, 0.18); border-radius: 50%;
}
.orbit-center {
  position: absolute; inset: 32%;
  display: grid; place-items: center;
  border-radius: 50%;
  background: radial-gradient(circle at 40% 35%, #e3203f, var(--red) 60%, #7a0a1c);
  box-shadow: 0 0 80px rgba(200, 16, 46, 0.5);
  font-family: var(--jp); font-weight: 900; color: #fff;
  font-size: clamp(2rem, 5vw, 3rem);
}
.orbit-ring { position: absolute; inset: 0; animation: spin 60s linear infinite; }
.orbit-node {
  position: absolute; left: 50%; top: 50%;
  width: 64px; height: 64px; margin: -32px 0 0 -32px;
  display: grid; place-items: center;
  border-radius: 50%; background: var(--brand); color: #fff;
  box-shadow: 0 12px 28px -8px var(--brand);
  transform: rotate(var(--a)) translate(min(38vw, 176px)) rotate(calc(-1 * var(--a)));
}
.orbit-node svg { width: 30px; height: 30px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; animation: spin 60s linear infinite reverse; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Values ---------- */
.values-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.value {
  padding: 32px 28px; border-radius: var(--radius);
  background: #fff; border: 1px solid var(--line);
  transition: transform 0.3s, box-shadow 0.3s;
}
.value:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.value-num { display: block; font-family: var(--jp); font-weight: 900; font-size: 2rem; color: var(--red); margin-bottom: 14px; }
.value p { color: var(--muted); font-size: 0.95rem; margin: 0; }

/* ---------- Contact ---------- */
.contact { display: grid; grid-template-columns: 1fr 1.1fr; gap: 64px; align-items: start; }
.office { padding: 18px 0; border-top: 1px solid var(--line); }
.office h4 { font-size: 0.8rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); margin-bottom: 6px; }
.office p { margin: 0; font-weight: 500; }
.office a:hover { color: var(--red); }
.contact-form {
  background: #fff; padding: 36px; border-radius: 22px;
  box-shadow: var(--shadow-lg); border: 1px solid var(--line);
}
.field { margin-bottom: 18px; }
.field label { display: block; font-weight: 600; font-size: 0.88rem; margin-bottom: 8px; }
.field input, .field select, .field textarea {
  width: 100%; font: inherit; color: var(--text);
  padding: 13px 16px; border-radius: 12px;
  border: 1.5px solid var(--line); background: var(--paper);
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}
.field textarea { resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--red); background: #fff;
  box-shadow: 0 0 0 4px rgba(200, 16, 46, 0.12);
}
.hp-field { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.contact-form { position: relative; }
.contact-form button[disabled] { opacity: 0.7; cursor: progress; transform: none; }
.field .optional { font-weight: 400; color: var(--muted); }
.phone-group { display: grid; grid-template-columns: 150px 1fr; gap: 10px; }
.phone-group select { padding-right: 8px; text-overflow: ellipsis; }
.field input:invalid:not(:placeholder-shown) { border-color: var(--red); }
.form-note { margin: 14px 0 0; font-size: 0.9rem; min-height: 1.4em; }
.form-note.ok { color: #0e7a4f; }
.form-note.error { color: var(--red); }

/* ---------- Footer ---------- */
.site-footer { background: var(--ink); color: var(--on-dark-muted); padding: 72px 0 0; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 48px; padding-bottom: 48px; }
.footer-grid .brand { margin-bottom: 16px; }
.site-footer h4 { color: #fff; font-size: 0.85rem; letter-spacing: 0.12em; text-transform: uppercase; margin-bottom: 16px; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: 10px; }
.site-footer a:hover { color: #fff; }
.site-footer .muted { color: var(--on-dark-muted); }
.footer-bottom { border-top: 1px solid rgba(255, 255, 255, 0.08); padding-top: 24px; padding-bottom: 24px; font-size: 0.85rem; }
.footer-bottom p { margin: 0; }

/* ---------- Reveal animation ---------- */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.7s ease, transform 0.7s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .orbit-ring, .orbit-node svg, .hero-photo { animation: none; }
}

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
  .switcher { grid-template-columns: repeat(3, 1fr); }
  .values-grid { grid-template-columns: repeat(2, 1fr); }
  .company-grid { grid-template-columns: repeat(2, 1fr); }
  .company-card, .company-card:nth-child(4), .company-card:nth-child(5) { grid-column: auto; }
  .company-card:nth-child(5) { grid-column: 1 / -1; max-width: calc(50% - 12px); justify-self: center; width: 100%; }
}
@media (max-width: 860px) {
  .nav-toggle { display: block; }
  .nav-links {
    position: absolute; top: 72px; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--ink); padding: 8px 24px 24px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    display: none;
  }
  .site-header.open .nav-links { display: flex; }
  .nav-links a { padding: 14px 0; border-bottom: 1px solid rgba(255, 255, 255, 0.06); }
  .nav-links a.btn { margin-top: 16px; border: 0; padding: 14px; }
  .site-header.open .nav-toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .site-header.open .nav-toggle span:nth-child(2) { opacity: 0; }
  .site-header.open .nav-toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

  .about, .contact { grid-template-columns: 1fr; gap: 48px; }
  .cta-inner { flex-direction: column; align-items: flex-start; }
  .cta-band { background-attachment: scroll, scroll; padding: 80px 0; }
  .hero-overlay { background: linear-gradient(180deg, rgba(11,16,32,0.75) 0%, rgba(11,16,32,0.88) 60%, var(--ink) 100%); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-grid > :first-child { grid-column: 1 / -1; }
  .kanji { font-size: 160px; right: 8px; top: 140px; }
}
@media (max-width: 640px) {
  .container { padding: 0 16px; }
  .section { padding: 80px 0; }
  .hero { padding-top: 120px; }
  .hero-stats { gap: 28px; }
  .switcher { grid-template-columns: 1fr 1fr; }
  .switch-chip:last-child { grid-column: 1 / -1; }
  .company-grid, .values-grid { grid-template-columns: 1fr; }
  .company-card:nth-child(5) { max-width: none; }
  .card-body { padding: 0 22px 26px; }
  .card-media { height: 180px; }
  .contact-form { padding: 26px 20px; }
  .orbit-node { width: 50px; height: 50px; margin: -25px 0 0 -25px; transform: rotate(var(--a)) translate(38vw) rotate(calc(-1 * var(--a))); }
  .orbit-node svg { width: 24px; height: 24px; }
  .footer-grid { grid-template-columns: 1fr; }
}
