/* ============================================================
   YKB Corporate Site
   ============================================================ */

/* ----- Design tokens ----- */
:root {
  --color-primary: #1F2A6B;
  --color-primary-dark: #14195A;
  --color-accent: #1FB1E6;
  --color-accent-dark: #0E96C7;
  --color-bg: #FFFFFF;
  --color-bg-sub: #F5F7FA;
  --color-text: #1A1A1A;
  --color-text-sub: #555E6D;
  --color-text-muted: #8590A0;
  --color-border: #E5E8EE;
  --color-border-strong: #C9D0DC;

  --font-jp: "Noto Sans JP", "Hiragino Sans", "Yu Gothic", system-ui, sans-serif;
  --font-en: "Inter", system-ui, sans-serif;

  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;

  --shadow-sm: 0 2px 8px rgba(31, 42, 107, 0.04);
  --shadow-md: 0 8px 24px rgba(31, 42, 107, 0.08);

  --container: 1200px;
  --container-narrow: 800px;

  --header-h: 88px;
}

/* ----- Reset ----- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-jp);
  font-size: 18px;
  line-height: 1.85;
  letter-spacing: 0.02em;
  color: var(--color-text);
  background: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
img { max-width: 100%; height: auto; display: block; }
ul, ol { list-style: none; padding: 0; margin: 0; }
a { color: inherit; text-decoration: none; transition: color 0.2s ease, opacity 0.2s ease; }
a:hover { color: var(--color-accent); }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 3px;
}

/* ----- Layout ----- */
.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 32px;
}
.container-narrow { max-width: var(--container-narrow); }

.section {
  padding: 120px 0;
}
.section-services,
.section-process { background: var(--color-bg-sub); }
.section-about,
.section-company { background: var(--color-bg); }

.section-head {
  position: relative;
  padding-left: 24px;
  margin-bottom: 64px;
}
.section-head::before {
  content: "";
  position: absolute;
  left: 0;
  top: 8px;
  bottom: 12px;
  width: 4px;
  background: var(--color-accent);
}
.eyebrow {
  margin: 0 0 10px;
  font-family: var(--font-en);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.18em;
  color: var(--color-accent);
  text-transform: uppercase;
}
.section-title {
  margin: 0;
  font-size: 44px;
  font-weight: 700;
  color: var(--color-primary);
  letter-spacing: 0.04em;
  padding-bottom: 28px;
  border-bottom: 1px solid var(--color-border);
}

.pc-only { display: inline; }

/* ----- Buttons ----- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 20px 36px;
  font-family: var(--font-jp);
  font-size: 17px;
  font-weight: 700;
  border-radius: var(--radius-sm);
  transition: background 0.2s ease, color 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease;
  cursor: pointer;
  text-align: center;
}
.btn-primary {
  background: var(--color-primary);
  color: #fff;
  box-shadow: var(--shadow-sm);
  min-width: 240px;
}
.btn-primary:hover {
  background: var(--color-primary-dark);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}
.btn-primary:active { transform: translateY(0); }
.btn-block { width: 100%; }

/* ============================================================
   HEADER
   ============================================================ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--color-border);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-h);
}
.brand-logo { height: 44px; width: auto; display: block; }
.global-nav .nav-list {
  display: flex;
  gap: 40px;
}
.global-nav a {
  font-size: 16px;
  font-weight: 500;
  color: var(--color-text);
  padding: 8px 0;
  position: relative;
}
.global-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  background: var(--color-accent);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.25s ease;
}
.global-nav a:hover::after { transform: scaleX(1); }

.nav-toggle {
  display: none;
  width: 40px;
  height: 40px;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 6px;
}
.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--color-primary);
  transition: transform 0.25s ease, opacity 0.25s ease;
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

.mobile-nav {
  background: #fff;
  border-bottom: 1px solid var(--color-border);
}
.mobile-nav ul { padding: 16px 32px 24px; }
.mobile-nav li { border-bottom: 1px solid var(--color-border); }
.mobile-nav a {
  display: block;
  padding: 16px 4px;
  font-weight: 500;
  font-size: 16px;
}

/* ============================================================
   HERO
   ============================================================ */
.hero {
  position: relative;
  background: var(--color-bg);
  overflow: hidden;
}
.hero-inner {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  align-items: center;
  min-height: 640px;
  padding-top: 80px;
  padding-bottom: 80px;
}
.hero-content { position: relative; z-index: 2; }
.hero-content .eyebrow { font-size: 16px; margin-bottom: 28px; }
.hero-title {
  margin: 0 0 36px;
  font-size: 68px;
  font-weight: 700;
  line-height: 1.4;
  color: var(--color-primary);
  letter-spacing: 0.02em;
}
.hero-lead {
  margin: 0 0 52px;
  font-size: 19px;
  color: var(--color-text-sub);
  line-height: 2;
  max-width: 600px;
}
.hero-visual {
  position: relative;
  height: 100%;
  min-height: 480px;
}
.hero-visual img {
  position: absolute;
  right: -40px;
  top: 50%;
  transform: translateY(-50%);
  width: 110%;
  max-width: 720px;
  pointer-events: none;
}

/* ============================================================
   SERVICES
   ============================================================ */
.services-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}
.service-card {
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 32px 28px 36px;
  display: flex;
  flex-direction: column;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.service-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: var(--color-accent);
}
.service-num {
  margin: 0 0 16px;
  font-family: var(--font-en);
  font-size: 20px;
  font-weight: 700;
  color: var(--color-accent);
}
.service-figure {
  background: linear-gradient(135deg, #F5F9FD 0%, #EAF1F9 100%);
  border-radius: var(--radius-md);
  padding: 16px;
  margin-bottom: 28px;
  aspect-ratio: 1 / 1;
  display: flex;
  align-items: center;
  justify-content: center;
}
.service-figure img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}
.service-title {
  margin: 0 0 14px;
  font-size: 20px;
  font-weight: 700;
  color: var(--color-primary);
  line-height: 1.55;
}
.service-desc {
  margin: 0;
  font-size: 16px;
  color: var(--color-text-sub);
  line-height: 1.9;
}

/* ============================================================
   ABOUT
   ============================================================ */
.about-grid {
  display: grid;
  grid-template-columns: 380px 1fr;
  gap: 64px;
  align-items: start;
}
.about-portrait {
  position: sticky;
  top: calc(var(--header-h) + 24px);
}
.about-portrait img {
  width: 100%;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
}
.about-name {
  margin: 0 0 20px;
  font-weight: 700;
  color: var(--color-primary);
  line-height: 1.4;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.about-name-title {
  font-size: 25px;
  font-weight: 500;
  color: var(--color-primary);
  letter-spacing: 0.04em;
}
.about-name-jp {
  font-size: 30px;
  font-weight: 700;
  letter-spacing: 0.06em;
}
.about-name-en {
  margin-top: 2px;
  font-family: var(--font-en);
  font-size: 20px;
  font-weight: 500;
  color: var(--color-accent);
  letter-spacing: 0.1em;
}
.about-bio {
  margin: 0 0 44px;
  font-size: 17px;
  color: var(--color-text-sub);
  line-height: 2;
}

.timeline {
  border-top: 1px solid var(--color-border);
}
.timeline-row {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 24px;
  padding: 24px 8px;
  border-bottom: 1px solid var(--color-border);
}
.timeline-row dt {
  font-family: var(--font-en);
  font-weight: 700;
  font-size: 18px;
  color: var(--color-accent);
  letter-spacing: 0.04em;
}
.timeline-row dd {
  margin: 0;
  font-size: 17px;
  color: var(--color-text);
  line-height: 1.85;
}
.timeline-link {
  position: relative;
  color: var(--color-primary);
  text-decoration: none;
  border-bottom: 1px solid var(--color-accent);
  padding-bottom: 1px;
  transition: color 0.2s ease, border-color 0.2s ease;
}
.timeline-link::after {
  content: "↗";
  margin-left: 4px;
  font-size: 0.85em;
  color: var(--color-accent);
  transition: transform 0.2s ease;
  display: inline-block;
}
.timeline-link:hover {
  color: var(--color-accent);
  border-bottom-color: var(--color-primary);
}
.timeline-link:hover::after {
  transform: translate(2px, -2px);
}
.timeline-sub {
  margin: 14px 0 0;
  padding-left: 0;
}
.timeline-sub li {
  position: relative;
  padding-left: 18px;
  font-size: 16px;
  color: var(--color-text-sub);
  line-height: 1.95;
}
.timeline-sub li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.7em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--color-accent);
}

/* ============================================================
   PROCESS
   ============================================================ */
.process-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
  counter-reset: step;
}
.process-step {
  position: relative;
  padding: 0 8px;
}
.process-step::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--color-primary);
}
.process-step:nth-child(3)::before,
.process-step:nth-child(4)::before { background: var(--color-accent); }

.process-num {
  margin: 24px 0 16px;
  font-family: var(--font-en);
  font-size: 44px;
  font-weight: 700;
  color: var(--color-primary);
  letter-spacing: 0.04em;
}
.process-step:nth-child(3) .process-num,
.process-step:nth-child(4) .process-num { color: var(--color-accent); }

.process-figure {
  margin-bottom: 24px;
  aspect-ratio: 1 / 1;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  border-radius: var(--radius-md);
  padding: 8px;
}
.process-figure img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}
.process-title {
  margin: 0 0 14px;
  font-size: 19px;
  font-weight: 700;
  color: var(--color-primary);
  line-height: 1.55;
}
.process-desc {
  margin: 0;
  font-size: 16px;
  color: var(--color-text-sub);
  line-height: 1.9;
}

/* ============================================================
   COMPANY
   ============================================================ */
.company-table {
  border-top: 1px solid var(--color-border);
}
.company-row {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 24px;
  padding: 24px 16px;
  border-bottom: 1px solid var(--color-border);
}
.company-row dt {
  font-weight: 700;
  font-size: 17px;
  color: var(--color-primary);
}
.company-row dd {
  margin: 0;
  font-size: 17px;
  color: var(--color-text);
  line-height: 1.85;
}

/* ============================================================
   CONTACT
   ============================================================ */
.section-contact { background: var(--color-bg); }
.contact-lead {
  margin: 0 0 40px;
  font-size: 17px;
  color: var(--color-text-sub);
}
.contact-form { display: grid; gap: 24px; }
.form-row { display: grid; gap: 8px; }
.form-row label {
  font-size: 16px;
  font-weight: 700;
  color: var(--color-text);
  display: flex;
  align-items: center;
  gap: 8px;
}
.req {
  display: inline-block;
  padding: 2px 8px;
  font-family: var(--font-en);
  font-size: 12px;
  font-weight: 600;
  color: var(--color-accent);
  letter-spacing: 0.06em;
}
.form-row input,
.form-row textarea {
  width: 100%;
  padding: 16px 18px;
  font-family: inherit;
  font-size: 17px;
  color: var(--color-text);
  background: #fff;
  border: 1px solid var(--color-border-strong);
  border-radius: var(--radius-sm);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.form-row input::placeholder,
.form-row textarea::placeholder { color: var(--color-text-muted); }
.form-row input:focus,
.form-row textarea:focus {
  outline: none;
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px rgba(31, 177, 230, 0.18);
}
.form-row textarea { resize: vertical; min-height: 140px; }
.form-row input[aria-invalid="true"],
.form-row textarea[aria-invalid="true"] {
  border-color: #D9534F;
  box-shadow: 0 0 0 3px rgba(217, 83, 79, 0.15);
}
.form-note {
  margin: 8px 0 0;
  font-size: 14px;
  text-align: center;
  min-height: 1.5em;
}
.form-note.success { color: #2E7D32; }
.form-note.error { color: #D9534F; }

/* Honeypot (visually & a11y hidden, but real for bots) */
.hp-field {
  position: absolute !important;
  left: -9999px !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
}

/* Cloudflare Turnstile widget container */
.form-turnstile {
  display: flex;
  justify-content: center;
  margin: 4px 0 4px;
}

/* Submit button spinner */
.btn-spinner {
  display: none;
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255, 255, 255, 0.4);
  border-top-color: #fff;
  border-radius: 50%;
  animation: btn-spin 0.7s linear infinite;
  margin-right: 10px;
  vertical-align: -3px;
}
.btn.is-loading .btn-spinner { display: inline-block; }
@keyframes btn-spin {
  to { transform: rotate(360deg); }
}
@media (prefers-reduced-motion: reduce) {
  .btn-spinner { animation-duration: 1.6s; }
}

/* Submit result cards (success / error) */
.form-result {
  text-align: center;
  padding: 56px 32px;
  border-radius: 12px;
  background: #F4FAFD;
  border: 1px solid var(--color-border);
  animation: form-result-in 0.3s ease-out;
}
.form-result--error {
  background: #FDF4F4;
  border-color: #F4D5D3;
}
.form-result-icon {
  width: 88px;
  height: 88px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 28px;
  color: #fff;
}
.form-result--success .form-result-icon { background: #1FB1E6; }
.form-result--error   .form-result-icon { background: #D9534F; }
.form-result-icon svg { width: 44px; height: 44px; display: block; }
.form-result-title {
  font-size: 32px;
  font-weight: 700;
  line-height: 1.4;
  color: var(--color-primary);
  margin: 0 0 18px;
  letter-spacing: 0.02em;
  outline: none;
}
.form-result-body {
  font-size: 20px;
  line-height: 1.85;
  color: var(--color-text);
  margin: 0 auto 28px;
  max-width: 560px;
}
.form-result .btn { min-width: 200px; }
@keyframes form-result-in {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}
@media (prefers-reduced-motion: reduce) {
  .form-result { animation: none; }
}
@media (max-width: 768px) {
  .form-result { padding: 40px 20px; }
  .form-result-title { font-size: 26px; }
  .form-result-body { font-size: 18px; }
}
@media (max-width: 480px) {
  .form-result-icon { width: 72px; height: 72px; margin-bottom: 20px; }
  .form-result-icon svg { width: 36px; height: 36px; }
  .form-result-title { font-size: 22px; }
}

/* ============================================================
   SOCIAL STRIP
   ============================================================ */
.social-strip {
  background: #fff;
  border-top: 1px solid var(--color-border);
  padding: 32px 0;
}
.social-list {
  display: flex;
  justify-content: center;
  gap: 56px;
  flex-wrap: wrap;
}
.social-link {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  color: var(--color-text-sub);
  font-weight: 500;
  transition: opacity 0.2s ease, transform 0.15s ease;
}
.social-link img { width: 28px; height: 28px; }
.social-link:hover { opacity: 0.7; color: var(--color-text-sub); transform: translateY(-2px); }

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer {
  background: var(--color-primary);
  color: #fff;
  padding: 32px 0;
}
.footer-inner {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 32px;
}
.footer-inner > .footer-nav  { grid-column: 2; justify-self: center; }
.footer-inner > .footer-copy { grid-column: 3; justify-self: end; }
.footer-brand img { height: 32px; width: auto; }
.footer-nav ul {
  display: flex;
  gap: 32px;
  flex-wrap: wrap;
}
.footer-nav a {
  font-size: 15px;
  color: rgba(255, 255, 255, 0.85);
}
.footer-nav a:hover { color: var(--color-accent); }
.footer-copy {
  margin: 0;
  font-family: var(--font-en);
  font-size: 14px;
  color: rgba(255, 255, 255, 0.7);
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1024px) {
  .container { padding: 0 24px; }
  .section { padding: 96px 0; }
  .section-title { font-size: 36px; }

  .hero-inner { min-height: auto; padding: 64px 0; }
  .hero-title { font-size: 54px; }
  .hero-lead { font-size: 18px; }

  .services-grid { grid-template-columns: repeat(2, 1fr); gap: 20px; }
  .process-grid { grid-template-columns: repeat(2, 1fr); gap: 32px 24px; }

  .about-grid { grid-template-columns: 280px 1fr; gap: 40px; }
  .about-portrait { position: static; }

  .pc-only { display: none; }
}

@media (max-width: 768px) {
  .container { padding: 0 20px; }
  .section { padding: 72px 0; }
  .section-head { margin-bottom: 40px; }
  .section-title { font-size: 30px; padding-bottom: 18px; }

  .global-nav { display: none; }
  .nav-toggle { display: flex; }
  .header-inner { height: 64px; }
  :root { --header-h: 64px; }

  .hero-inner {
    grid-template-columns: 1fr;
    padding: 48px 0 64px;
    gap: 32px;
  }
  .hero-title { font-size: 40px; line-height: 1.45; }
  .hero-lead { font-size: 16px; }
  .hero-visual { min-height: 240px; }
  .hero-visual img {
    position: static;
    width: 100%;
    transform: none;
    margin: 0 auto;
    opacity: 0.85;
  }
  .btn-primary { min-width: 100%; padding: 16px 24px; }

  .services-grid { grid-template-columns: 1fr; }
  .service-card { padding: 28px 24px 32px; }

  .about-grid { grid-template-columns: 1fr; gap: 32px; }
  .about-portrait { max-width: 320px; margin: 0 auto; }
  .about-name { align-items: center; text-align: center; }
  .about-name-jp { font-size: 26px; }
  .about-name-title { font-size: 20px; }
  .about-name-en { font-size: 17px; }
  .timeline-row {
    grid-template-columns: 90px 1fr;
    gap: 16px;
    padding: 20px 4px;
  }
  .timeline-row dt { font-size: 16px; }
  .timeline-row dd { font-size: 16px; }
  .timeline-sub li { font-size: 15px; }

  .process-grid { grid-template-columns: 1fr; gap: 32px; }
  .process-num { font-size: 32px; margin-top: 20px; }

  .company-row {
    grid-template-columns: 1fr;
    gap: 4px;
    padding: 18px 8px;
  }
  .company-row dt { color: var(--color-accent); font-size: 15px; }
  .company-row dd { font-size: 16px; }

  .social-list { gap: 32px; }

  .footer-inner { grid-template-columns: 1fr; gap: 20px; text-align: center; }
  .footer-inner > .footer-nav,
  .footer-inner > .footer-copy { grid-column: 1; justify-self: center; }
  .footer-nav ul { justify-content: center; gap: 20px; }
}

@media (max-width: 480px) {
  .hero-title { font-size: 34px; }
  .section-title { font-size: 26px; }
  .footer-nav ul { gap: 12px 18px; }
  .footer-nav a { font-size: 14px; }
}
