/* ============================================================
   Kakaru — Corporate Site
   Design System
   ============================================================ */

:root {
  --brand-900: #081a32;
  --brand-800: #0b2545;
  --brand-700: #133a6a;
  --brand-600: #1e528f;
  --brand-500: #2f6cb0;
  --brand-100: #e8eef7;
  --brand-050: #f3f6fb;

  --ink-900: #0d1726;
  --ink-700: #2a3548;
  --ink-500: #5a6678;
  --ink-400: #8a94a3;
  --ink-200: #d8dde5;
  --ink-100: #eaedf2;
  --ink-050: #f5f6f8;
  --white: #ffffff;

  --accent-100: #f3eedc;
  --accent-500: #b89548;

  --serif: "Noto Serif JP", "Hiragino Mincho ProN", "Yu Mincho", serif;
  --sans: "Noto Sans JP", "Hiragino Kaku Gothic ProN", "Yu Gothic", system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, monospace;

  --container: 1240px;
  --gutter: clamp(20px, 4vw, 48px);
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 14px;

  --ease: cubic-bezier(.2, .7, .2, 1);
}

[data-theme="charcoal"] {
  --brand-900: #0a0a0a;
  --brand-800: #1a1a1a;
  --brand-700: #2a2a2a;
  --brand-600: #3a3a3a;
  --brand-500: #555;
  --brand-100: #ececec;
  --brand-050: #f7f7f7;
}

[data-theme="forest"] {
  --brand-900: #0b2419;
  --brand-800: #143628;
  --brand-700: #1f5440;
  --brand-600: #2b6e54;
  --brand-500: #3e8e70;
  --brand-100: #e4efea;
  --brand-050: #f0f6f3;
}

/* ============================================================ Reset */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  font-family: var(--sans);
  font-weight: 400;
  color: var(--ink-900);
  background: var(--white);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; border: none; background: none; color: inherit; }
input, textarea { font: inherit; color: inherit; }

/* ============================================================ Layout */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

section { scroll-margin-top: 80px; }

/* ============================================================ Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: saturate(140%) blur(12px);
  -webkit-backdrop-filter: saturate(140%) blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s var(--ease), background .3s var(--ease);
}
.site-header.scrolled {
  border-bottom-color: var(--ink-100);
  background: rgba(255, 255, 255, 0.96);
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 76px;
}

.logo {
  font-family: var(--serif);
  font-weight: 700;
  font-size: 26px;
  letter-spacing: .01em;
  color: var(--brand-800);
}
.logo .dot { color: var(--accent-500); }

.nav {
  display: flex;
  align-items: center;
  gap: 36px;
}
.nav a {
  font-size: 14px;
  font-weight: 500;
  letter-spacing: .04em;
  color: var(--ink-700);
  position: relative;
  padding: 6px 0;
  transition: color .2s var(--ease);
}
.nav a::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 0;
  height: 1px;
  width: 0;
  background: var(--brand-800);
  transition: width .3s var(--ease), left .3s var(--ease);
}
.nav a:hover { color: var(--brand-800); }
.nav a:hover::after { width: 100%; left: 0; }

.header-cta {
  background: var(--brand-800);
  color: #fff;
  padding: 12px 22px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .05em;
  border-radius: var(--radius-sm);
  transition: background .2s var(--ease), transform .2s var(--ease);
}
.header-cta:hover { background: var(--brand-700); transform: translateY(-1px); }

.menu-toggle {
  display: none;
  width: 28px;
  height: 28px;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
}
.menu-toggle span {
  display: block;
  height: 1.5px;
  background: var(--ink-900);
  transition: transform .3s var(--ease), opacity .3s var(--ease);
}
.menu-toggle.open span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.menu-toggle.open span:nth-child(2) { opacity: 0; }
.menu-toggle.open span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

/* ============================================================ Hero */
.hero {
  position: relative;
  padding-block: clamp(48px, 7vw, 88px) clamp(64px, 9vw, 120px);
  overflow: hidden;
}
.hero .container {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: clamp(24px, 4vw, 64px);
  align-items: center;
  min-height: 540px;
}
.hero-text { position: relative; z-index: 2; }
.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--brand-700);
  margin-bottom: 28px;
}
.hero-eyebrow::before {
  content: "";
  display: block;
  width: 28px;
  height: 1px;
  background: var(--brand-700);
}
.hero-title {
  font-family: var(--serif);
  font-weight: 700;
  font-size: clamp(40px, 6vw, 76px);
  line-height: 1.18;
  letter-spacing: .02em;
  color: var(--brand-900);
  margin: 0 0 32px;
}
.hero-title .period { color: var(--accent-500); }
.hero-lead {
  font-size: 15px;
  line-height: 2;
  color: var(--ink-700);
  max-width: 480px;
  margin: 0 0 40px;
}
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }
.btn {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  padding: 16px 28px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .08em;
  border-radius: var(--radius-sm);
  transition: all .25s var(--ease);
  border: 1px solid transparent;
  white-space: nowrap;
}
.btn .arrow {
  width: 16px;
  height: 8px;
  transition: transform .25s var(--ease);
}
.btn:hover .arrow { transform: translateX(4px); }
.btn-primary { background: var(--brand-800); color: #fff; }
.btn-primary:hover { background: var(--brand-700); }
.btn-ghost {
  background: transparent;
  color: var(--brand-800);
  border-color: var(--ink-200);
}
.btn-ghost:hover { border-color: var(--brand-800); background: var(--brand-050); }

/* Hero visual — geometric photo panels */
.hero-visual {
  position: relative;
  height: clamp(360px, 50vw, 560px);
  align-self: stretch;
}
.hero-geo {
  position: absolute;
  inset: 0;
  overflow: hidden;
}
.hero-geo-panel {
  position: absolute;
}
.panel-main {
  inset: 0;
  clip-path: polygon(16% 0, 100% 0, 100% 100%, 0% 100%);
  /* ↓ Replace this gradient with: url('your-cityscape.jpg') center / cover no-repeat */
  background:
    linear-gradient(170deg, #c8d6e8 0%, #8fa8c8 35%, #6b8db5 55%, #4a7099 75%, #2b5080 100%);
}
.panel-accent {
  top: 0;
  left: 8%;
  width: 48%;
  height: 100%;
  clip-path: polygon(12% 0, 100% 0, 78% 100%, 0% 100%);
  background: linear-gradient(160deg, rgba(255,255,255,.88) 0%, rgba(255,255,255,.4) 100%);
  backdrop-filter: blur(2px);
}
.panel-small {
  bottom: 0;
  right: 0;
  width: 28%;
  height: 32%;
  clip-path: polygon(28% 0, 100% 0, 100% 100%, 0% 100%);
  background: var(--brand-800);
  opacity: .65;
}

/* ============================================================ Section header */
.section {
  padding-block: clamp(72px, 9vw, 120px);
}
.section--muted { background: var(--ink-050); }
.section--dark { background: var(--brand-900); color: #fff; }

.section-head {
  display: grid;
  grid-template-columns: minmax(380px, 1.1fr) 1fr;
  gap: 64px;
  margin-bottom: clamp(40px, 5vw, 64px);
  align-items: end;
}
.section-eyebrow {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--ink-500);
  margin: 0 0 14px;
}
.section-title {
  font-family: var(--serif);
  font-weight: 700;
  font-size: clamp(36px, 4.5vw, 56px);
  line-height: 1.2;
  letter-spacing: .02em;
  color: var(--brand-900);
  margin: 0;
}
.section-title .en {
  display: block;
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  font-size: .42em;
  letter-spacing: .15em;
  color: var(--ink-500);
  margin-top: 14px;
}
.section--dark .section-title { color: #fff; }
.section--dark .section-eyebrow { color: var(--brand-100); }

.section-lead {
  font-size: 15px;
  line-height: 2;
  color: var(--ink-700);
  max-width: 580px;
  margin: 0;
}
.section--dark .section-lead { color: var(--brand-100); }

/* ============================================================ Business */
.biz-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.biz-card {
  position: relative;
  background: #fff;
  border: 1px solid var(--ink-100);
  padding: 36px 32px 32px;
  display: flex;
  flex-direction: column;
  min-height: 360px;
  transition: transform .35s var(--ease), box-shadow .35s var(--ease), border-color .35s var(--ease);
  text-decoration: none;
  color: inherit;
}
.biz-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 24px 60px -30px rgba(11, 37, 69, .25);
  border-color: transparent;
}
.biz-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 28px;
}
.biz-icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--brand-050);
  display: grid;
  place-items: center;
  color: var(--brand-700);
}
.biz-icon svg { width: 26px; height: 26px; }
.biz-card:nth-child(3) .biz-icon { background: var(--accent-100); color: var(--accent-500); }
.biz-num {
  font-family: var(--serif);
  font-weight: 700;
  font-size: 30px;
  letter-spacing: .04em;
  color: var(--brand-900);
}
.biz-card h3 {
  font-family: var(--serif);
  font-weight: 700;
  font-size: 22px;
  letter-spacing: .04em;
  margin: 0 0 16px;
  color: var(--brand-900);
}
.biz-card .biz-tag {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--ink-400);
  margin: 0 0 10px;
}
.biz-card p {
  font-size: 14px;
  line-height: 1.9;
  color: var(--ink-700);
  margin: 0 0 28px;
  flex: 1;
}
.biz-card .more {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-size: 12px;
  letter-spacing: .12em;
  color: var(--brand-800);
  font-weight: 600;
}
.biz-card .more .arrow { width: 28px; height: 8px; transition: transform .25s var(--ease); }
.biz-card:hover .more .arrow { transform: translateX(6px); }

/* ============================================================ Strength */
.strength-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 48px;
}
.strength-cell {
  text-align: left;
}
.strength-icon {
  width: 48px;
  height: 48px;
  margin-bottom: 24px;
  color: var(--brand-800);
}
.strength-cell h4 {
  font-family: var(--serif);
  font-weight: 700;
  font-size: 18px;
  letter-spacing: .04em;
  margin: 0 0 14px;
  color: var(--brand-900);
}
.strength-cell p {
  font-size: 13.5px;
  line-height: 1.9;
  color: var(--ink-700);
  margin: 0;
}

/* ============================================================ Numbers */
.numbers-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}
.num-cell {
  padding: 32px 8px;
  border-top: 1px solid rgba(255, 255, 255, .18);
}
.num-cell .label {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--brand-100);
  margin: 0 0 18px;
  opacity: .75;
}
.num-cell .value {
  font-family: var(--serif);
  font-weight: 700;
  font-size: clamp(48px, 6vw, 84px);
  line-height: 1;
  letter-spacing: .02em;
  color: #fff;
  display: flex;
  align-items: baseline;
  gap: 4px;
}
.num-cell .value .unit {
  font-family: var(--serif);
  font-size: .32em;
  font-weight: 500;
  color: var(--brand-100);
  margin-left: 4px;
}
.num-cell .caption {
  font-size: 13px;
  color: var(--brand-100);
  margin: 20px 0 0;
  opacity: .85;
}

/* ============================================================ About */
.about-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: clamp(40px, 6vw, 96px);
  align-items: center;
}
.about-text p {
  font-size: 15px;
  line-height: 2.1;
  color: var(--ink-700);
  margin: 0 0 22px;
}
.about-text p:last-of-type { margin-bottom: 36px; }

.about-visual {
  position: relative;
  aspect-ratio: 4/5;
  background: var(--brand-050);
  overflow: hidden;
}
.about-visual::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: repeating-linear-gradient(
    135deg,
    transparent 0,
    transparent 18px,
    rgba(11, 37, 69, .04) 18px,
    rgba(11, 37, 69, .04) 19px
  );
}
.about-visual .badge {
  position: absolute;
  top: 24px;
  left: 24px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: .15em;
  text-transform: uppercase;
  color: var(--ink-400);
}
.about-visual .ph-text {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  text-align: center;
  font-family: var(--serif);
  color: var(--brand-700);
  letter-spacing: .04em;
}
.about-visual .ph-text .big {
  font-size: clamp(44px, 5vw, 64px);
  font-weight: 700;
  display: block;
}
.about-visual .ph-text .small {
  display: block;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--ink-400);
  letter-spacing: .2em;
  margin-top: 12px;
}

/* ============================================================ Leadership */
.leader-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}
.leader-card {
  background: #fff;
  border: 1px solid var(--ink-100);
}
.leader-photo {
  position: relative;
  aspect-ratio: 4/5;
  background: linear-gradient(180deg, var(--ink-100), var(--ink-200));
  overflow: hidden;
}
.leader-photo::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 60% 55% at 50% 38%, rgba(255,255,255,.6), transparent 70%),
    repeating-linear-gradient(
      135deg,
      transparent 0,
      transparent 16px,
      rgba(11, 37, 69, .04) 16px,
      rgba(11, 37, 69, .04) 17px
    );
}
.leader-photo .ph-mark {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-family: var(--serif);
  font-size: 72px;
  font-weight: 700;
  color: rgba(11, 37, 69, .22);
  z-index: 1;
}
.leader-body {
  padding: 24px 24px 22px;
  display: flex;
  flex-direction: column;
  min-height: 200px;
}
.leader-role {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--ink-500);
  margin: 0 0 10px;
}
.leader-name {
  font-family: var(--serif);
  font-weight: 700;
  font-size: 22px;
  letter-spacing: .06em;
  color: var(--brand-900);
  margin: 0 0 4px;
}
.leader-name-en {
  font-family: var(--serif);
  font-style: italic;
  font-size: 13px;
  color: var(--brand-700);
  margin: 0 0 16px;
}
.leader-bio {
  font-size: 13px;
  line-height: 1.9;
  color: var(--ink-700);
  margin: 0;
  flex: 1;
}
.leader-foot {
  margin-top: 18px;
  display: flex;
  justify-content: flex-end;
}
.leader-foot a {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  color: var(--ink-400);
  border: 1px solid var(--ink-200);
  transition: all .2s var(--ease);
}
.leader-foot a:hover { color: var(--brand-800); border-color: var(--brand-800); }

/* ============================================================ Company table */
.company-table {
  width: 100%;
  max-width: 720px;
  border-collapse: collapse;
}
.company-table tr {
  border-bottom: 1px solid var(--ink-100);
}
.company-table th,
.company-table td {
  padding: 20px 0;
  font-size: 14px;
  line-height: 1.8;
  text-align: left;
  vertical-align: top;
}
.company-table th {
  width: 140px;
  font-weight: 600;
  color: var(--ink-700);
  white-space: nowrap;
  padding-right: 32px;
}
.company-table td {
  color: var(--ink-900);
}

/* ============================================================ Contact band */
.cta-band {
  background: var(--brand-800);
  color: #fff;
  padding-block: clamp(48px, 6vw, 72px);
}
.cta-band .container {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 40px;
  align-items: center;
}
.cta-band h2 {
  font-family: var(--serif);
  font-weight: 700;
  font-size: clamp(22px, 2.6vw, 32px);
  line-height: 1.5;
  letter-spacing: .04em;
  margin: 0;
  color: #fff;
}
.cta-band .btn-light {
  background: #fff;
  color: var(--brand-800);
  padding: 18px 32px;
  min-width: 280px;
  justify-content: space-between;
}
.cta-band .btn-light:hover { background: var(--brand-050); }

/* ============================================================ Footer */
.site-footer {
  background: #fff;
  padding-block: 48px 32px;
  border-top: 1px solid var(--ink-100);
}
.site-footer .container {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 40px;
  align-items: center;
}
.foot-nav {
  display: flex;
  justify-content: center;
  gap: 36px;
  flex-wrap: wrap;
}
.foot-nav a {
  font-size: 13px;
  color: var(--ink-700);
  transition: color .2s var(--ease);
}
.foot-nav a:hover { color: var(--brand-800); }
.copy {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--ink-400);
  letter-spacing: .04em;
}

/* ============================================================ Scroll reveal */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .9s var(--ease), transform .9s var(--ease);
}
.reveal.in {
  opacity: 1;
  transform: translateY(0);
}
.reveal[data-delay="1"] { transition-delay: .08s; }
.reveal[data-delay="2"] { transition-delay: .16s; }
.reveal[data-delay="3"] { transition-delay: .24s; }
.reveal[data-delay="4"] { transition-delay: .32s; }

/* ============================================================ Modal */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(8, 26, 50, .88);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  z-index: 100;
  display: grid;
  place-items: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s var(--ease);
  padding: 24px;
}
.modal-backdrop.open { opacity: 1; pointer-events: auto; }
.modal {
  background: #fff;
  width: min(560px, 100%);
  padding: 40px;
  max-height: 90vh;
  overflow: auto;
  transform: translateY(12px);
  transition: transform .35s var(--ease);
}
.modal-backdrop.open .modal { transform: translateY(0); }
.modal h3 {
  font-family: var(--serif);
  font-weight: 700;
  font-size: 24px;
  margin: 0 0 8px;
  color: var(--brand-900);
}
.modal p.sub {
  font-size: 13px;
  color: var(--ink-500);
  margin: 0 0 28px;
}
.modal label {
  display: block;
  font-size: 12px;
  letter-spacing: .08em;
  font-weight: 600;
  color: var(--ink-700);
  margin: 18px 0 8px;
}
.modal input, .modal textarea, .modal select {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--ink-200);
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-family: inherit;
  background: #fff;
  transition: border-color .2s var(--ease);
}
.modal input:focus, .modal textarea:focus, .modal select:focus {
  outline: none;
  border-color: var(--brand-800);
}
.modal textarea { min-height: 110px; resize: vertical; }
.modal .err {
  display: none;
  margin-top: 6px;
  font-size: 11px;
  color: #c0392b;
}
.modal input.invalid, .modal textarea.invalid { border-color: #c0392b; }
.modal input.invalid + .err, .modal textarea.invalid + .err { display: block; }
.modal .modal-actions {
  display: flex;
  gap: 12px;
  margin-top: 28px;
  justify-content: flex-end;
}
.modal .close {
  position: absolute;
  margin-left: auto;
}
.modal-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 8px;
}
.modal .modal-head .close-btn {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  color: var(--ink-500);
  font-size: 22px;
  line-height: 1;
}
.modal .success {
  text-align: center;
  padding: 24px 0;
}
.modal .success .check {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--brand-050);
  color: var(--brand-800);
  display: grid;
  place-items: center;
  margin: 0 auto 18px;
}

/* ============================================================ Responsive */
@media (max-width: 960px) {
  .hero .container { grid-template-columns: 1fr; gap: 32px; }
  .hero-visual { height: 320px; order: -1; }
  .hero-visual .monogram { font-size: 220px; }
  .biz-grid { grid-template-columns: 1fr; }
  .strength-grid { grid-template-columns: repeat(2, 1fr); gap: 32px; }
  .numbers-grid { grid-template-columns: repeat(2, 1fr); }
  .about-grid { grid-template-columns: 1fr; }
  .about-visual { aspect-ratio: 16/10; }
  .leader-grid { grid-template-columns: 1fr; }
  .section-head { grid-template-columns: 1fr; gap: 24px; }
  .cta-band .container { grid-template-columns: 1fr; }
  .site-footer .container { grid-template-columns: 1fr; text-align: center; gap: 24px; }
  .nav { display: none; }
  .menu-toggle { display: flex; }
  .nav.mobile-open {
    display: flex;
    position: fixed;
    top: 76px;
    left: 0;
    right: 0;
    flex-direction: column;
    background: #fff;
    padding: 32px;
    gap: 24px;
    border-bottom: 1px solid var(--ink-100);
  }
  .header-cta { display: none; }
  .modal { padding: 28px 20px; }
  .modal-backdrop { padding: 12px; }
  .modal .modal-actions {
    flex-direction: column-reverse;
    gap: 8px;
  }
  .modal .modal-actions .btn {
    width: 100%;
    text-align: center;
    justify-content: center;
  }
}
