/* ==========================================================================
   CROSSNINE — corporate site
   Tokens: Ink #0B120E / Paper #F7F8F4 / Forest #1C9A56 / Forest Deep #0E6B3B
           Slate #4B5A52 / Line #D8DED9
   ========================================================================== */

:root {
  --ink: #0B120E;
  --ink-soft: #121B15;
  --paper: #F7F8F4;
  --white: #FFFFFF;
  --forest: #1C9A56;
  --forest-deep: #0E6B3B;
  --forest-tint: #E7F3EC;
  --slate: #4B5A52;
  --line: #D8DED9;
  --line-dark: #24312A;

  --display: "Zen Kaku Gothic New", "Noto Sans JP", sans-serif;
  --body: "Noto Sans JP", sans-serif;
  --mono: "JetBrains Mono", monospace;

  --max: 1180px;
  --gutter: clamp(20px, 5vw, 64px);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.8;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }

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

.wrap {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.eyebrow {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--forest-deep);
}

.eyebrow--on-dark { color: var(--forest); }

h1, h2, h3 {
  font-family: var(--display);
  font-weight: 700;
  line-height: 1.3;
  margin: 0;
  letter-spacing: 0.01em;
}

p { color: var(--slate); margin: 0; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.08em;
  padding: 14px 26px;
  border: 1px solid var(--ink);
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  transition: background 0.25s ease, color 0.25s ease, border-color 0.25s ease;
}
.btn:hover { background: var(--ink); color: var(--paper); }

.btn--primary {
  background: var(--forest);
  border-color: var(--forest);
  color: var(--white);
}
.btn--primary:hover {
  background: var(--forest-deep);
  border-color: var(--forest-deep);
}

.btn--on-dark {
  border-color: rgba(247,248,244,0.4);
  color: var(--paper);
}
.btn--on-dark:hover {
  background: var(--paper);
  color: var(--ink);
}

.btn svg { width: 14px; height: 14px; }

/* ---------------------------- header ---------------------------- */

.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  border-bottom: 1px solid transparent;
  transition: background 0.3s ease, border-color 0.3s ease;
}
.site-header.is-scrolled {
  background: rgba(247,248,244,0.92);
  backdrop-filter: blur(8px);
  border-bottom-color: var(--line);
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 76px;
}

.brand {
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.brand-top {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--display);
  font-weight: 700;
  font-size: 17px;
  letter-spacing: 0.02em;
}
.brand-top img { height: 30px; width: 30px; display: block; }
.brand-sub {
  display: block;
  font-family: var(--mono);
  font-weight: 400;
  font-size: 10px;
  letter-spacing: 0.14em;
  color: var(--slate);
  margin-left: 42px;
}

.nav { display: flex; align-items: center; gap: 38px; }
.nav a {
  font-size: 14px;
  letter-spacing: 0.02em;
  position: relative;
  padding: 6px 0;
}
.nav a::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 1px;
  background: var(--forest);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.25s ease;
}
.nav a:hover::after,
.nav a[aria-current="page"]::after { transform: scaleX(1); }
.nav a[aria-current="page"] { color: var(--forest-deep); }

.nav-toggle {
  display: none;
  width: 32px; height: 32px;
  border: none;
  background: none;
  cursor: pointer;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
}
.nav-toggle span {
  display: block;
  height: 1px;
  background: var(--ink);
}

@media (max-width: 860px) {
  .nav-toggle { display: flex; }
  .nav {
    position: fixed;
    top: 76px; left: 0; right: 0;
    background: var(--paper);
    border-bottom: 1px solid var(--line);
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    padding: 8px var(--gutter) 24px;
    transform: translateY(-8px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
  }
  .nav.is-open {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
  }
  .nav a { width: 100%; padding: 14px 0; border-bottom: 1px solid var(--line); }
}

/* ---------------------------- hero ---------------------------- */

.hero {
  padding: 168px 0 96px;
  background: var(--paper);
  position: relative;
  overflow: hidden;
}

.hero .wrap {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 48px;
  align-items: center;
}

.hero-copy .eyebrow { margin-bottom: 18px; display: block; }

.hero-copy h1 {
  font-size: clamp(32px, 4.2vw, 52px);
  margin-bottom: 24px;
}
.hero-copy h1 em {
  font-style: normal;
  color: var(--forest-deep);
}

.hero-copy p {
  font-size: 16px;
  max-width: 46ch;
  margin-bottom: 36px;
}

.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }

.hero-diagram {
  position: relative;
  aspect-ratio: 1 / 1;
}

.hero-diagram svg { width: 100%; height: 100%; }

.path-line {
  fill: none;
  stroke: var(--forest);
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 900;
  stroke-dashoffset: 900;
  animation: draw 2.6s ease forwards 0.3s;
}
.path-line--deep { stroke: var(--forest-deep); animation-delay: 0.9s; }

.path-node {
  fill: var(--paper);
  stroke: var(--forest);
  stroke-width: 2.5;
  opacity: 0;
  animation: pop 0.5s ease forwards;
}

.logo-outline {
  fill: none;
  stroke: var(--forest);
  stroke-width: 3;
  stroke-linejoin: round;
  stroke-linecap: round;
  animation: draw 2.4s cubic-bezier(0.65,0,0.35,1) forwards 0.2s,
             fade-out-stroke 0.7s ease forwards 3.6s;
}
.logo-outline--deep {
  stroke: var(--forest-deep);
  animation: draw 1.8s cubic-bezier(0.65,0,0.35,1) forwards 1.4s,
             fade-out-stroke 0.7s ease forwards 3.6s;
}
.logo-fill {
  fill: var(--forest);
  opacity: 0;
  animation: fade-in-fill 0.9s ease forwards 3.5s;
}

@keyframes fade-out-stroke {
  to { opacity: 0; }
}
@keyframes fade-in-fill {
  to { opacity: 1; }
}

@keyframes draw {
  to { stroke-dashoffset: 0; }
}
@keyframes pop {
  to { opacity: 1; }
}

@media (max-width: 860px) {
  .hero .wrap { grid-template-columns: 1fr; }
  .hero-diagram { max-width: 320px; margin: 0 auto; }
}

/* ---------------------------- section shells ---------------------------- */

section { padding: 96px 0; }
.section-head {
  max-width: 640px;
  margin-bottom: 56px;
}
.section-head .eyebrow { display: block; margin-bottom: 14px; }
.section-head h2 { font-size: clamp(26px, 3vw, 36px); margin-bottom: 16px; }

.section--dark {
  background: var(--ink);
  color: var(--paper);
}
.section--dark p { color: rgba(247,248,244,0.7); }
.section--dark h2, .section--dark h3 { color: var(--paper); }

.section--tint { background: var(--forest-tint); }

/* ---------------------------- rack / slots ---------------------------- */

.rack { border-top: 1px solid var(--line); }

.slot {
  display: grid;
  grid-template-columns: 90px 1fr auto;
  gap: 28px;
  align-items: center;
  padding: 30px 0;
  border-bottom: 1px solid var(--line);
  transition: background 0.25s ease;
}
.slot:hover { background: rgba(28,154,86,0.05); }

.slot-id {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--forest-deep);
  letter-spacing: 0.06em;
}

.slot-body h3 {
  font-size: 20px;
  margin-bottom: 8px;
}
.slot-body p { font-size: 14.5px; max-width: 60ch; }

.slot-arrow {
  width: 22px; height: 22px;
  color: var(--slate);
  transition: transform 0.25s ease, color 0.25s ease;
}
.slot:hover .slot-arrow { transform: translateX(4px); color: var(--forest); }

@media (max-width: 640px) {
  .slot { grid-template-columns: 60px 1fr; }
  .slot-arrow { display: none; }
}

/* ---------------------------- facts strip ---------------------------- */

.facts {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border: 1px solid var(--line);
}
.fact {
  padding: 28px 24px;
  border-right: 1px solid var(--line);
}
.fact:last-child { border-right: none; }
.fact .eyebrow { display: block; margin-bottom: 10px; }
.fact strong {
  display: block;
  font-family: var(--display);
  font-size: 18px;
  font-weight: 700;
}
.fact span { font-size: 13px; color: var(--slate); }

@media (max-width: 760px) {
  .facts { grid-template-columns: repeat(2, 1fr); }
  .fact { border-bottom: 1px solid var(--line); }
  .fact:nth-child(2n) { border-right: none; }
}

/* ---------------------------- flow (business page) ---------------------------- */

.flow {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}
.flow-step {
  background: var(--paper);
  padding: 32px 26px;
  position: relative;
}
.flow-step .step-no {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--forest);
  letter-spacing: 0.1em;
  display: block;
  margin-bottom: 18px;
}
.flow-step h3 { font-size: 16px; margin-bottom: 10px; }
.flow-step p { font-size: 13.5px; }

@media (max-width: 860px) {
  .flow { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 520px) {
  .flow { grid-template-columns: 1fr; }
}

/* ---------------------------- table (company page) ---------------------------- */

.info-table {
  width: 100%;
  border-collapse: collapse;
  border-top: 1px solid var(--line);
}
.info-table tr { border-bottom: 1px solid var(--line); }
.info-table th, .info-table td {
  text-align: left;
  padding: 22px 20px;
  vertical-align: top;
  font-weight: 400;
}
.info-table th {
  width: 200px;
  font-family: var(--mono);
  font-size: 12.5px;
  letter-spacing: 0.06em;
  color: var(--forest-deep);
}
.info-table td { font-size: 15px; color: var(--ink); }
.info-table td.tbd { color: var(--slate); font-style: normal; }

@media (max-width: 640px) {
  .info-table tr { display: flex; flex-direction: column; padding: 18px 0; }
  .info-table th, .info-table td { padding: 4px 0; width: auto; border: none; }
}

/* ---------------------------- cta band ---------------------------- */

.cta-band {
  background: var(--ink);
  color: var(--paper);
  padding: 88px 0;
  text-align: center;
}
.cta-band h2 { color: var(--paper); font-size: clamp(24px, 3vw, 34px); margin-bottom: 18px; }
.cta-band p { color: rgba(247,248,244,0.7); margin-bottom: 34px; }
.cta-band .hero-actions { justify-content: center; }

/* ---------------------------- footer ---------------------------- */

.site-footer {
  background: var(--ink);
  color: rgba(247,248,244,0.6);
  border-top: 1px solid var(--line-dark);
  padding: 56px 0 32px;
}
.footer-top {
  display: flex;
  justify-content: space-between;
  gap: 32px;
  flex-wrap: wrap;
  padding-bottom: 40px;
  border-bottom: 1px solid var(--line-dark);
  margin-bottom: 24px;
}
.footer-brand { display: flex; align-items: center; gap: 12px; }
.footer-brand img { height: 26px; width: 26px; }
.footer-brand strong {
  font-family: var(--display);
  color: var(--paper);
  font-size: 16px;
}
.footer-nav { display: flex; gap: 30px; flex-wrap: wrap; }
.footer-nav a { font-size: 14px; }
.footer-nav a:hover { color: var(--forest); }
.footer-bottom {
  display: flex;
  justify-content: space-between;
  font-family: var(--mono);
  font-size: 12px;
  flex-wrap: wrap;
  gap: 10px;
}

/* ---------------------------- page hero (sub pages) ---------------------------- */

.page-hero {
  padding: 168px 0 64px;
  border-bottom: 1px solid var(--line);
}
.page-hero .eyebrow { display: block; margin-bottom: 16px; }
.page-hero h1 { font-size: clamp(28px, 3.6vw, 44px); margin-bottom: 18px; }
.page-hero p { max-width: 60ch; font-size: 15.5px; }

/* ---------------------------- lead paragraph ---------------------------- */

.lead {
  font-size: 17px;
  max-width: 68ch;
  color: var(--ink);
  margin-bottom: 20px;
}

.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
}
@media (max-width: 760px) {
  .two-col { grid-template-columns: 1fr; }
}

/* ---------------------------- form (contact page) ---------------------------- */

.form-grid { display: grid; gap: 22px; max-width: 640px; }
.field label {
  display: block;
  font-family: var(--mono);
  font-size: 12.5px;
  letter-spacing: 0.06em;
  color: var(--forest-deep);
  margin-bottom: 8px;
}
.field .req { color: var(--forest); margin-left: 4px; }
.field input,
.field textarea {
  width: 100%;
  border: 1px solid var(--line);
  background: var(--white);
  padding: 14px 16px;
  font-family: var(--body);
  font-size: 15px;
  color: var(--ink);
  transition: border-color 0.2s ease;
}
.field input:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--forest);
}
.field textarea { min-height: 160px; resize: vertical; }
.field-note { font-size: 12.5px; color: var(--slate); margin-top: 6px; }

.form-status {
  font-family: var(--mono);
  font-size: 13px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  display: none;
}
.form-status.is-visible { display: block; }
.form-status.ok { border-color: var(--forest); color: var(--forest-deep); }

.contact-aside {
  border: 1px solid var(--line);
  padding: 32px;
  height: fit-content;
}
.contact-aside .eyebrow { display: block; margin-bottom: 16px; }
.contact-aside h3 { font-size: 18px; margin-bottom: 14px; }
.contact-aside ul { list-style: none; margin: 0; padding: 0; }
.contact-aside li {
  padding: 14px 0;
  border-top: 1px solid var(--line);
  font-size: 14.5px;
  color: var(--slate);
}
.contact-aside li strong {
  display: block;
  color: var(--ink);
  font-family: var(--display);
  font-size: 14px;
  margin-bottom: 4px;
}

/* ---------------------------- hex texture ---------------------------- */

.hex-field {
  position: absolute;
  inset: 0;
  opacity: 0.05;
  pointer-events: none;
  z-index: 0;
}
