/* ==========================================================
   Frontier Works — corporate one-pager
   ========================================================== */

:root {
  --navy-950: #071226;
  --navy-900: #0b1b34;
  --navy-800: #12284a;
  --navy-700: #1b3a66;
  --slate-600: #4a5a73;
  --slate-500: #66758c;
  --slate-200: #dde3ec;
  --slate-100: #eef2f7;
  --slate-50: #f6f8fb;
  --white: #fff;
  --accent: #e0a526;
  --accent-600: #c98f14;
  --text: #16243a;

  --font-ja: "Noto Sans JP", "Hiragino Kaku Gothic ProN", "Hiragino Sans", Meiryo, sans-serif;
  --font-en: "Inter", "Noto Sans JP", sans-serif;

  --container: 1180px;
  --header-h: 76px;
  --radius: 6px;
  --shadow: 0 18px 40px -18px rgba(11, 27, 52, .28);
  --ease: cubic-bezier(.2, .7, .2, 1);
}

*,
*::before,
*::after { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: var(--header-h); -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--font-ja);
  font-size: 16px;
  line-height: 1.85;
  letter-spacing: .04em;
  color: var(--text);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
ul, ol { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, p, dl, dd { margin: 0; }

.container { width: min(100% - 48px, var(--container)); margin-inline: auto; }

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

.skip-link {
  position: absolute; left: 16px; top: -100px; z-index: 100;
  padding: 8px 16px; background: var(--white); color: var(--navy-900); border-radius: var(--radius);
}
.skip-link:focus { top: 12px; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

.pc-only { display: none; }
@media (min-width: 900px) { .pc-only { display: inline; } .sp-only { display: none; } }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .6em;
  font-weight: 700; letter-spacing: .08em; line-height: 1;
  border-radius: 999px; border: 1.5px solid transparent;
  transition: background-color .25s var(--ease), color .25s var(--ease), border-color .25s var(--ease), transform .25s var(--ease), box-shadow .25s var(--ease);
}
.btn-sm { padding: 12px 22px; font-size: 14px; }
.btn-lg { padding: 20px 34px; font-size: 16px; }
.btn-xl { padding: 24px 52px; font-size: 18px; }
.btn-accent { background: var(--accent); color: var(--navy-950); box-shadow: 0 10px 24px -10px rgba(224, 165, 38, .7); }
.btn-accent:hover { background: #f0b73a; transform: translateY(-2px); box-shadow: 0 16px 30px -12px rgba(224, 165, 38, .8); }
.btn-ghost { color: var(--white); border-color: rgba(255, 255, 255, .55); }
.btn-ghost:hover { background: rgba(255, 255, 255, .12); border-color: var(--white); }
.btn .arrow { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; transition: transform .25s var(--ease); }
.btn:hover .arrow { transform: translateX(4px); }

/* ---------- Header ---------- */
.site-header {
  position: fixed; inset: 0 0 auto; z-index: 50; height: var(--header-h);
  color: var(--white);
  transition: background-color .3s var(--ease), box-shadow .3s var(--ease), color .3s var(--ease);
}
.site-header.is-scrolled {
  background: rgba(255, 255, 255, .96);
  color: var(--navy-900);
  box-shadow: 0 1px 0 var(--slate-200), 0 8px 24px -16px rgba(11, 27, 52, .25);
  backdrop-filter: saturate(160%) blur(10px);
}
.header-inner { height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 24px; }

.brand { display: inline-flex; align-items: center; gap: 12px; }
.brand-mark { width: 38px; height: 38px; color: var(--navy-700); flex: none; }
.site-header:not(.is-scrolled) .brand-mark { color: rgba(255, 255, 255, .14); }
.brand-text { display: flex; flex-direction: column; line-height: 1.2; }
.brand-en { font-family: var(--font-en); font-weight: 800; font-size: 18px; letter-spacing: .14em; }
.brand-ja { font-size: 10.5px; letter-spacing: .12em; opacity: .75; }

.global-nav { display: flex; align-items: center; gap: 36px; }
.global-nav ul { display: flex; gap: 32px; }
.global-nav ul a { position: relative; font-size: 14.5px; font-weight: 500; padding: 6px 0; }
.global-nav ul a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px;
  background: var(--accent); transform: scaleX(0); transform-origin: right; transition: transform .3s var(--ease);
}
.global-nav ul a:hover::after { transform: scaleX(1); transform-origin: left; }

.nav-toggle { display: none; }
.nav-open .site-header { backdrop-filter: none; }

@media (max-width: 899px) {
  :root { --header-h: 64px; }
  .brand-en { font-size: 15px; }
  .brand-ja { font-size: 9.5px; }
  .brand-mark { width: 32px; height: 32px; }

  .nav-toggle {
    display: grid; place-items: center; width: 44px; height: 44px; margin-right: -8px;
    background: none; border: 0; color: inherit; cursor: pointer; position: relative; z-index: 2;
  }
  .nav-toggle-bar, .nav-toggle-bar::before, .nav-toggle-bar::after {
    display: block; width: 22px; height: 2px; background: currentColor; border-radius: 2px;
    transition: transform .3s var(--ease), background-color .3s;
  }
  .nav-toggle-bar { position: relative; }
  .nav-toggle-bar::before, .nav-toggle-bar::after { content: ""; position: absolute; left: 0; }
  .nav-toggle-bar::before { top: -7px; }
  .nav-toggle-bar::after { top: 7px; }
  .nav-open .nav-toggle { color: var(--white); }
  .nav-open .nav-toggle-bar { background: transparent; }
  .nav-open .nav-toggle-bar::before { transform: translateY(7px) rotate(45deg); }
  .nav-open .nav-toggle-bar::after { transform: translateY(-7px) rotate(-45deg); }

  .global-nav {
    position: fixed; inset: 0; z-index: 1;
    flex-direction: column; justify-content: center; gap: 40px;
    background: var(--navy-950); color: var(--white);
    opacity: 0; visibility: hidden; transition: opacity .3s var(--ease), visibility .3s;
  }
  .nav-open .global-nav { opacity: 1; visibility: visible; }
  .global-nav ul { flex-direction: column; align-items: center; gap: 26px; }
  .global-nav ul a { font-size: 18px; }
  .global-nav .btn-sm { padding: 16px 40px; font-size: 16px; }
}

/* ---------- Hero ---------- */
.hero {
  position: relative; isolation: isolate; overflow: hidden;
  min-height: min(100svh, 920px); display: flex; align-items: center;
  color: var(--white); background: var(--navy-950);
}
.hero-bg {
  position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%;
  object-fit: cover; object-position: 70% 50%;
  animation: heroZoom 14s var(--ease) both;
}
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(90deg, rgba(7, 18, 38, .94) 0%, rgba(7, 18, 38, .78) 38%, rgba(7, 18, 38, .25) 75%, rgba(7, 18, 38, .15) 100%),
    linear-gradient(0deg, rgba(7, 18, 38, .6) 0%, rgba(7, 18, 38, 0) 35%);
}
.hero-inner { padding: calc(var(--header-h) + 56px) 0 120px; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 14px;
  font-family: var(--font-en); font-size: 13px; font-weight: 600; letter-spacing: .28em; color: var(--accent);
}
.eyebrow::before { content: ""; width: 40px; height: 1.5px; background: currentColor; }
.hero-title {
  margin-top: 22px;
  font-size: clamp(38px, 6.2vw, 76px); font-weight: 900; line-height: 1.28; letter-spacing: .06em;
  text-shadow: 0 2px 30px rgba(0, 0, 0, .25);
}
.hero-lead { margin-top: 28px; max-width: 40em; font-size: clamp(15px, 1.4vw, 18px); line-height: 2; color: rgba(255, 255, 255, .86); }
.hero-actions { margin-top: 44px; display: flex; flex-wrap: wrap; gap: 16px; }

.hero-inner > * { animation: fadeUp 1s var(--ease) both; }
.hero-inner > :nth-child(2) { animation-delay: .12s; }
.hero-inner > :nth-child(3) { animation-delay: .24s; }
.hero-inner > :nth-child(4) { animation-delay: .36s; }

.hero-scroll {
  position: absolute; left: 50%; bottom: 28px; transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  font-family: var(--font-en); font-size: 10px; letter-spacing: .3em; color: rgba(255, 255, 255, .7);
}
.hero-scroll::after {
  content: ""; width: 1px; height: 48px;
  background: linear-gradient(rgba(255, 255, 255, .8), rgba(255, 255, 255, 0));
  animation: scrollLine 2.2s var(--ease) infinite;
  transform-origin: top;
}

@keyframes heroZoom { from { transform: scale(1.08); } to { transform: scale(1); } }
@keyframes fadeUp { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }
@keyframes scrollLine { 0% { transform: scaleY(0); } 50% { transform: scaleY(1); transform-origin: top; } 51% { transform-origin: bottom; } 100% { transform: scaleY(0); transform-origin: bottom; } }

@media (max-width: 899px) {
  .hero { min-height: 640px; }
  .hero-bg { object-position: 68% 50%; }
  .hero::before { background: linear-gradient(180deg, rgba(7, 18, 38, .55) 0%, rgba(7, 18, 38, .85) 60%, rgba(7, 18, 38, .95) 100%); }
  .hero-inner { padding-bottom: 72px; }
  .hero-scroll { display: none; }
  .eyebrow { font-size: 11px; letter-spacing: .18em; gap: 10px; }
  .eyebrow::before { width: 24px; }
  .hero-actions .btn { flex: 1 1 100%; }
}

/* ---------- Numbers ---------- */
.numbers { position: relative; background: var(--navy-900); color: var(--white); padding: 64px 0 40px; }
.numbers-list { display: grid; grid-template-columns: repeat(4, 1fr); }
.numbers-list li { text-align: center; padding: 8px 16px; }
.numbers-list li + li { border-left: 1px solid rgba(255, 255, 255, .14); }
.num { font-family: var(--font-en); font-weight: 700; line-height: 1; display: flex; align-items: baseline; justify-content: center; gap: 4px; }
.num-value { font-size: clamp(36px, 4.4vw, 56px); letter-spacing: -.01em; font-variant-numeric: tabular-nums; }
.num-unit { font-family: var(--font-ja); font-size: 16px; font-weight: 700; color: var(--accent); }
.num-label { margin-top: 14px; font-size: 13.5px; color: rgba(255, 255, 255, .72); letter-spacing: .08em; }
.numbers-note { margin-top: 28px; text-align: right; font-size: 11.5px; color: rgba(255, 255, 255, .45); }

@media (max-width: 899px) {
  .numbers-list { grid-template-columns: repeat(2, 1fr); row-gap: 32px; }
  .numbers-list li:nth-child(3) { border-left: 0; }
  .numbers-list li { padding: 8px 6px; }
  .num { white-space: nowrap; }
  .num-value { font-size: 32px; }
  .num-unit { font-size: 13px; }
  .num-label { font-size: 12px; letter-spacing: .02em; }
}

/* ---------- Section commons ---------- */
.section { padding: clamp(88px, 11vw, 140px) 0; }
.section-head { margin-bottom: clamp(40px, 5vw, 64px); }
.section-head.center { text-align: center; }
.section-en {
  display: inline-flex; align-items: center; gap: 12px;
  font-family: var(--font-en); font-size: 13px; font-weight: 700; letter-spacing: .3em; color: var(--navy-700);
}
.section-en::before { content: ""; width: 8px; height: 8px; background: var(--accent); transform: rotate(45deg); }
.section-en.light { color: var(--accent); }
.section-title {
  margin-top: 14px;
  font-size: clamp(26px, 3.2vw, 40px); font-weight: 900; line-height: 1.5; letter-spacing: .06em; color: var(--navy-900);
}
.section-lead { margin-top: 20px; max-width: 46em; color: var(--slate-600); }

/* ---------- Problems ---------- */
.problems { background: var(--slate-50); }
.problem-list { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.problem-list li {
  background: var(--white); border-radius: var(--radius); padding: 36px 20px 32px; text-align: center;
  box-shadow: 0 1px 0 var(--slate-200);
  border-top: 3px solid var(--navy-800);
}
.problem-list svg { width: 44px; height: 44px; margin: 0 auto 18px; color: var(--navy-700); }
.problem-list p { font-weight: 700; line-height: 1.75; color: var(--navy-900); }
.problems-answer {
  margin-top: 56px; text-align: center;
  font-size: clamp(20px, 2.4vw, 28px); font-weight: 700; color: var(--navy-900); letter-spacing: .06em;
}
.problems-answer strong {
  font-weight: 900; color: var(--navy-700);
  background: linear-gradient(transparent 68%, rgba(224, 165, 38, .45) 68%);
}
@media (max-width: 899px) {
  .problem-list { grid-template-columns: repeat(2, 1fr); gap: 14px; }
  .problem-list li { padding: 28px 12px 24px; }
  .problem-list p { font-size: 13.5px; }
  .problem-list br { display: none; }
}

/* ---------- Service ---------- */
.service-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.service-card {
  display: flex; flex-direction: column; background: var(--white);
  border: 1px solid var(--slate-200); border-radius: var(--radius); overflow: hidden;
  transition: transform .35s var(--ease), box-shadow .35s var(--ease), border-color .35s var(--ease);
}
.service-card:hover { transform: translateY(-6px); box-shadow: var(--shadow); border-color: transparent; }
.service-img { aspect-ratio: 16 / 10; overflow: hidden; }
.service-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease); }
.service-card:hover .service-img img { transform: scale(1.05); }
.service-body { position: relative; padding: 44px 30px 34px; flex: 1; display: flex; flex-direction: column; }
.service-body .service-no {
  position: absolute; top: -24px; left: 30px; margin: 0; flex: none;
  display: grid; place-items: center; width: 48px; height: 48px; border-radius: 4px;
  font-family: var(--font-en); font-size: 16px; font-weight: 800; letter-spacing: .06em; line-height: 1;
  background: var(--navy-900); color: var(--white); box-shadow: 0 8px 18px -8px rgba(11, 27, 52, .6);
}
.service-body h3 { font-size: 21px; font-weight: 900; color: var(--navy-900); letter-spacing: .05em; }
.service-body h3::after { content: ""; display: block; width: 28px; height: 3px; margin-top: 14px; background: var(--accent); }
.service-body p { margin-top: 16px; font-size: 15px; color: var(--slate-600); line-height: 1.9; flex: 1; }
.tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 22px; }
.tags li { font-size: 12px; font-weight: 500; padding: 5px 12px; background: var(--slate-100); color: var(--navy-700); border-radius: 999px; }

@media (max-width: 1023px) {
  .service-grid { grid-template-columns: 1fr; max-width: 620px; margin-inline: auto; }
}

/* ---------- Strength ---------- */
.strength { background: var(--slate-50); overflow: hidden; }
.strength-inner { display: grid; grid-template-columns: 1fr 1.05fr; gap: clamp(48px, 6vw, 96px); align-items: center; }
.strength-visual { position: relative; }
.strength-visual img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; object-position: 60% 50%; border-radius: var(--radius); box-shadow: var(--shadow); }
.strength-visual::before {
  content: ""; position: absolute; inset: 28px -28px -28px 28px; z-index: -1;
  border: 1.5px solid var(--navy-700); border-radius: var(--radius); opacity: .25;
}
.strength-visual { isolation: isolate; }
.strength-badge {
  position: absolute; left: -24px; bottom: 40px;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  width: 148px; height: 148px; border-radius: 50%;
  background: var(--navy-900); color: var(--white); box-shadow: var(--shadow);
}
.badge-num { font-family: var(--font-en); font-size: 44px; font-weight: 800; line-height: 1; }
.badge-num small { font-size: 20px; color: var(--accent); margin-left: 2px; }
.badge-label { margin-top: 8px; font-size: 12px; letter-spacing: .1em; color: rgba(255, 255, 255, .8); }

.strength-list { display: grid; gap: 36px; }
.strength-list li { display: grid; grid-template-columns: 72px 1fr; gap: 20px; padding-bottom: 36px; border-bottom: 1px solid var(--slate-200); }
.strength-list li:last-child { padding-bottom: 0; border-bottom: 0; }
.strength-no {
  font-family: var(--font-en); font-size: 44px; font-weight: 800; line-height: 1;
  color: transparent; -webkit-text-stroke: 1.5px var(--navy-700);
}
.strength-list h3 { font-size: 20px; font-weight: 900; color: var(--navy-900); letter-spacing: .05em; line-height: 1.5; }
.strength-list p { margin-top: 10px; font-size: 15px; color: var(--slate-600); }

@media (max-width: 1023px) {
  .strength-inner { grid-template-columns: 1fr; }
  .strength-visual { max-width: 560px; margin: 0 auto 24px; width: calc(100% - 28px); }
  .strength-visual img { aspect-ratio: 4 / 3; }
  .strength-badge { width: 116px; height: 116px; left: -12px; bottom: -28px; }
  .badge-num { font-size: 34px; }
  .strength-list li { grid-template-columns: 56px 1fr; gap: 12px; }
  .strength-no { font-size: 34px; }
  .strength-list h3 { font-size: 17px; }
}

/* ---------- Flow ---------- */
.flow-list { display: grid; grid-template-columns: repeat(5, 1fr); gap: 16px; counter-reset: flow; }
.flow-list li {
  position: relative; padding: 32px 22px 30px; background: var(--white);
  border: 1px solid var(--slate-200); border-radius: var(--radius);
}
.flow-list li:not(:last-child)::after {
  content: ""; position: absolute; top: 50%; right: -13px; z-index: 1;
  width: 10px; height: 10px; border-top: 2px solid var(--accent); border-right: 2px solid var(--accent);
  transform: translateY(-50%) rotate(45deg);
}
.flow-step { font-family: var(--font-en); font-size: 12px; font-weight: 700; letter-spacing: .2em; color: var(--accent-600); }
.flow-list h3 { margin-top: 10px; font-size: 19px; font-weight: 900; color: var(--navy-900); }
.flow-list p { margin-top: 10px; font-size: 14px; line-height: 1.8; color: var(--slate-600); }

@media (max-width: 1023px) {
  .flow-list { grid-template-columns: 1fr; gap: 22px; max-width: 620px; margin-inline: auto; }
  .flow-list li { display: grid; grid-template-columns: 96px 1fr; column-gap: 16px; align-items: baseline; padding: 24px; }
  .flow-list li p { grid-column: 2; margin-top: 4px; }
  .flow-list h3 { margin-top: 0; }
  .flow-list li:not(:last-child)::after { top: auto; bottom: -17px; right: 50%; transform: translateX(50%) rotate(135deg); }
}

/* ---------- Company ---------- */
.company { background: var(--slate-50); }
.company-inner { display: grid; grid-template-columns: 280px 1fr; gap: 56px; align-items: start; }
.company-table { border-top: 2px solid var(--navy-900); }
.company-table > div { display: grid; grid-template-columns: 180px 1fr; border-bottom: 1px solid var(--slate-200); }
.company-table dt { padding: 24px 0; font-weight: 700; color: var(--navy-900); }
.company-table dd { padding: 24px 0; color: var(--slate-600); }
.company-table .en { font-family: var(--font-en); font-size: 13px; color: var(--slate-500); }
.dash li { position: relative; padding-left: 1.2em; }
.dash li::before { content: ""; position: absolute; left: 0; top: .95em; width: .6em; height: 1.5px; background: var(--accent); }

@media (max-width: 1023px) {
  .company-inner { grid-template-columns: 1fr; gap: 0; }
}
@media (max-width: 599px) {
  .company-table > div { grid-template-columns: 1fr; }
  .company-table dt { padding: 20px 0 0; }
  .company-table dd { padding: 4px 0 20px; }
}

/* ---------- Contact ---------- */
.contact { position: relative; isolation: isolate; overflow: hidden; padding: clamp(96px, 12vw, 150px) 0; color: var(--white); text-align: center; background: var(--navy-950); }
.contact-bg { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; }
.contact::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(7, 18, 38, .86), rgba(11, 27, 52, .92)); }
.contact-title { margin-top: 18px; font-size: clamp(26px, 3.6vw, 44px); font-weight: 900; letter-spacing: .06em; line-height: 1.5; }
.contact-lead { margin: 22px auto 0; max-width: 40em; color: rgba(255, 255, 255, .8); }
.contact .btn-xl { margin-top: 44px; }
.icon-mail { width: 22px; height: 22px; }
.contact-mail { margin-top: 18px; font-family: var(--font-en); font-size: 14px; letter-spacing: .1em; color: rgba(255, 255, 255, .6); }
@media (max-width: 599px) { .btn-xl { padding: 22px 28px; font-size: 16px; width: 100%; } }

/* ---------- Footer ---------- */
.site-footer { background: var(--navy-950); color: rgba(255, 255, 255, .75); padding: 56px 0 28px; }
.footer-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 28px; padding-bottom: 36px; border-bottom: 1px solid rgba(255, 255, 255, .1); }
.brand-light { color: var(--white); }
.brand-light .brand-mark { color: var(--navy-700); }
.footer-nav { display: flex; flex-wrap: wrap; gap: 12px 28px; font-size: 13.5px; }
.footer-nav a:hover { color: var(--white); }
.copyright { padding-top: 24px; font-family: var(--font-en); font-size: 12px; letter-spacing: .08em; color: rgba(255, 255, 255, .45); }

/* ---------- Reveal on scroll ---------- */
.js .reveal { opacity: 0; transform: translateY(28px); transition: opacity .9s var(--ease), transform .9s var(--ease); }
.js .reveal.is-visible { opacity: 1; transform: none; }
.service-grid .reveal:nth-child(2), .problem-list .reveal:nth-child(2), .numbers-list .reveal:nth-child(2), .flow-list .reveal:nth-child(2) { transition-delay: .1s; }
.service-grid .reveal:nth-child(3), .problem-list .reveal:nth-child(3), .numbers-list .reveal:nth-child(3), .flow-list .reveal:nth-child(3) { transition-delay: .2s; }
.problem-list .reveal:nth-child(4), .numbers-list .reveal:nth-child(4), .flow-list .reveal:nth-child(4) { transition-delay: .3s; }
.flow-list .reveal:nth-child(5) { transition-delay: .4s; }

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