/* AHEAD 360 — HTML + CSS. */

/* ---------- Tokens ---------- */
:root {
  --paper: #f5f3ee;
  --paper-2: #ebe8e1;
  --ink: #141414;
  --ink-2: #3c3c3a;
  --mute: #6a6964;
  --line: rgba(20, 20, 20, .9);
  --hair: rgba(20, 20, 20, .14);
  --red: #d80100;
  --white: #fff;

  --font-ja: "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Noto Sans JP", "Noto Sans CJK JP", "Yu Gothic UI", "YuGothic", "Meiryo", system-ui, sans-serif;
  --font-en: "Helvetica Neue", "Inter", "Arial", var(--font-ja);
  --font-num: ui-monospace, "SFMono-Regular", "Menlo", "Consolas", "DejaVu Sans Mono", monospace;

  --wrap: 1200px;
  --gutter: clamp(20px, 5vw, 56px);
  --space: clamp(88px, 12vw, 168px);
  --radius: 14px;
  --ease: cubic-bezier(.2, .7, .2, 1);
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 24px; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-ja);
  font-size: 15px;
  line-height: 1.95;
  letter-spacing: .04em;
  font-feature-settings: "palt" 1;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-underline-offset: .25em; text-decoration-thickness: 1px; }
a:hover { color: var(--red); }
:focus-visible { outline: 2px solid var(--red); outline-offset: 3px; border-radius: 2px; }
h1, h2, h3, p, ol, ul, dl, dd { margin: 0; }
ul, ol { padding: 0; list-style: none; }
.wrap { width: min(100% - var(--gutter) * 2, var(--wrap)); margin-inline: auto; }
.sr-only { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }

/* ---------- Section heading (borrowed idea: EN display + small JA, numbered) ---------- */
.sec { padding-block: var(--space); position: relative; }
.sec-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: clamp(16px, 2.4vw, 32px); }
.sec-head { grid-column: 1 / span 4; align-self: start; }
.sec-body { grid-column: 6 / -1; }
.sec-head .num { font-family: var(--font-num); font-size: 12px; color: var(--red); letter-spacing: .08em; display: flex; align-items: center; gap: 12px; }
.sec-head .num::after { content: ""; width: 48px; height: 1px; background: var(--red); }
.sec-head .en { font-family: var(--font-en); font-weight: 700; font-size: clamp(44px, 6.4vw, 84px); line-height: .98; letter-spacing: -.035em; margin-top: 18px; }
.sec-head .ja { display: block; font-size: 13px; letter-spacing: .18em; color: var(--ink-2); margin-top: 16px; }
.lead-ttl { font-size: clamp(22px, 2.6vw, 32px); line-height: 1.65; letter-spacing: .06em; font-weight: 600; }
.lead-txt { margin-top: 28px; color: var(--ink-2); }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; gap: 14px; text-decoration: none; font-size: 14px; letter-spacing: .12em; border: 1px solid var(--line); border-radius: 999px; padding: 15px 26px 15px 28px; transition: background-color .3s, color .3s, border-color .3s; }
.btn::after { content: ""; width: 26px; height: 1px; background: currentColor; transition: width .3s var(--ease); }
.btn:hover { background: var(--ink); color: var(--white); border-color: var(--ink); }
.btn:hover::after { width: 38px; }

/* ---------- Hero ---------- */

/* ticker */
.ticker { border-block: 1px solid var(--line); overflow: hidden; white-space: nowrap; background: var(--paper); }
.ticker-track { display: inline-flex; padding-block: 18px; }
.ticker-track span { font-family: var(--font-en); font-weight: 700; font-size: clamp(18px, 2vw, 24px); letter-spacing: -.01em; padding-inline: 28px; display: inline-flex; align-items: center; gap: 56px; }
.ticker-track span::after { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--red); }

/* ---------- Services flow (borrowed idea: line-connected cards) ---------- */
.flow { grid-column: 1 / -1; margin-top: clamp(56px, 7vw, 88px); display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 40px; position: relative; }
.flow-item { position: relative; display: flex; flex-direction: column; }
.flow-card { border: 1px solid var(--line); border-radius: var(--radius); display: flex; align-items: center; gap: 16px; padding: 14px 18px 14px 14px; background: var(--paper); position: relative; z-index: 1; }
.flow-item:not(:last-child) .flow-card::after { content: ""; position: absolute; left: 100%; top: 50%; width: 41px; height: 1px; background: var(--line); }
.flow-card .ico { width: 52px; height: 52px; border-radius: 10px; background: var(--paper-2); display: grid; place-items: center; flex: none; }
.flow-card .ico svg { width: 26px; height: 26px; stroke: var(--ink); fill: none; stroke-width: 1.4; }
.flow-card h3 { font-size: 16px; font-weight: 600; letter-spacing: .06em; line-height: 1.5; }
.flow-card .idx { margin-left: auto; font-family: var(--font-num); font-size: 11px; color: var(--red); }
.flow-item p { margin-top: 22px; color: var(--ink-2); padding-inline: 4px; }


/* ---------- Statement ---------- */
.statement { padding-block: var(--space); position: relative; overflow: hidden; isolation: isolate; border-top: 1px solid var(--hair); }
.statement-bg { position: absolute; inset: 0; z-index: -1; }
.statement-bg img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 0%; }
.statement-bg::after { content: ""; position: absolute; inset: 0; background:
  linear-gradient(90deg, rgba(245,243,238,.78) 0%, rgba(245,243,238,.66) 45%, rgba(245,243,238,.45) 100%),
  linear-gradient(180deg, rgba(245,243,238,.35) 0%, rgba(245,243,238,0) 30%, rgba(245,243,238,0) 70%, rgba(245,243,238,.35) 100%); }
.statement p { font-size: clamp(22px, 3vw, 38px); line-height: 1.8; letter-spacing: .06em; font-weight: 600; max-width: 22em; position: relative; z-index: 1; }
.statement p .red { color: var(--red); }
.statement .deco { position: absolute; right: -8vw; top: 50%; width: min(56vw, 640px); aspect-ratio: 1; translate: 0 -50%; border: 1px solid var(--hair); border-radius: 50%; }
.statement .deco::before, .statement .deco::after { content: ""; position: absolute; border-radius: 50%; border: 1px solid var(--hair); }
.statement .deco::before { inset: 14%; }
.statement .deco::after { inset: 30%; border-color: rgba(216,1,0,.35); }
.statement .en { font-family: var(--font-num); font-size: 12px; letter-spacing: .1em; color: var(--mute); margin-bottom: 28px; display: block; }

.cta-list { border-top: 1px solid var(--line); }
.cta-list a { display: grid; grid-template-columns: 104px 1fr auto; align-items: center; gap: 12px; padding: 20px 0; border-bottom: 1px solid var(--hair); text-decoration: none; }
.cta-list .k { font-family: var(--font-num); font-size: 11px; letter-spacing: .1em; color: var(--mute); }
.cta-list .v { font-family: var(--font-en); font-size: clamp(18px, 2vw, 24px); letter-spacing: .01em; font-weight: 600; overflow-wrap: anywhere; }
.cta-list .arw { width: 24px; height: 1px; background: currentColor; }

/* ---------- Footer ---------- */
/* ---------- Sub pages ---------- */
.page-hero { padding-block: clamp(64px, 9vw, 120px) clamp(40px, 5vw, 64px); border-bottom: 1px solid var(--line); position: relative; overflow: hidden; }
.page-hero .sec-head { grid-column: 1 / -1; }
.page-hero .sec-head .en { font-size: clamp(52px, 9vw, 128px); }
.page-hero .deco { position: absolute; right: -120px; top: -160px; width: 460px; aspect-ratio: 1; border-radius: 50%; border: 1px solid var(--hair); }
.page-hero .deco::after { content: ""; position: absolute; inset: 18%; border-radius: 50%; border: 1px dashed rgba(216,1,0,.45); }

.prose h3 { font-size: 18px; letter-spacing: .06em; font-weight: 600; margin-top: 56px; padding-top: 22px; border-top: 1px solid var(--line); display: flex; gap: 14px; align-items: baseline; }
.prose h3 .idx { font-family: var(--font-num); font-size: 11px; color: var(--red); font-weight: 400; }
.prose p { margin-top: 1.1em; color: var(--ink-2); }

.def { border-top: 1px solid var(--line); }
.def > div { display: grid; grid-template-columns: 160px 1fr; gap: 24px; padding: 22px 0; border-bottom: 1px solid var(--hair); }
.def dt { font-size: 12px; letter-spacing: .14em; color: var(--mute); padding-top: .25em; }
.def dd { color: var(--ink); }

/* ---------- Motion (CSS only) ---------- */
@media (prefers-reduced-motion: no-preference) {
  .hero-rings .spin { animation: spin 36s linear infinite; }
  .hero-rings .r2 { animation: spin 120s linear infinite reverse; }
  .ticker-track { animation: tick 42s linear infinite; }
  .hero-rings { animation: fade 1.6s .2s ease both; }
  .hero-copy > * { animation: rise 1s var(--ease) both; }
  .hero-copy > :nth-child(2) { animation-delay: .12s; }
  .hero-copy > :nth-child(3) { animation-delay: .28s; }
  .page-hero .sec-head > * { animation: rise .9s var(--ease) both; }
  .page-hero .sec-head > :nth-child(2) { animation-delay: .1s; }
  .page-hero .sec-head > :nth-child(3) { animation-delay: .2s; }

  /* scroll-driven reveal only where supported; content is fully visible otherwise */
  @supports (animation-timeline: view()) {
    .reveal { animation: rise linear both; animation-timeline: view(); animation-range: entry 0% entry 40%; }
  }
}
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes tick { to { transform: translateX(-50%); } }
@keyframes rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
@keyframes fade { from { opacity: 0; transform: scale(.97); } to { opacity: 1; transform: none; } }
@keyframes draw { from { transform: scaleX(0); } to { transform: scaleX(1); } }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; animation: none !important; }
}

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .sec-head { grid-column: 1 / -1; margin-bottom: 40px; }
  .sec-body { grid-column: 1 / -1; }
  .flow { gap: 24px; }
  .flow-item:not(:last-child) .flow-card::after { width: 25px; }
}
@media (max-width: 860px) {
  .flow { grid-template-columns: 1fr; gap: 0; }
  .flow-item { padding-bottom: 40px; }
  .flow-item:not(:last-child)::before { content: ""; position: absolute; left: 40px; top: 40px; bottom: 0; width: 1px; background: var(--line); }
  .flow-item:not(:last-child) .flow-card::after { display: none; }
  .flow-item p { padding-left: 82px; }
}
@media (max-width: 560px) {
  body { font-size: 14px; line-height: 1.9; }
  .def > div { grid-template-columns: 1fr; gap: 4px; }
  .btn { padding: 13px 22px; }
}
@media print {
  .ticker, .hero-rings { display: none; }
  body { background: #fff; }
}

/* ---------- Additions ---------- */
h1, h2, h3, .lead-ttl, .statement p { word-break: auto-phrase; text-wrap: pretty; }
@media (max-width: 560px) {
  .cta-list .v { font-size: 16px; }
  .sec-head .en { font-size: 44px; }
}

/* ---------- One-page additions ---------- */
@media (max-width: 560px) { .cta-list a { grid-template-columns: 76px 1fr auto; } .cta-list .k { font-size: 10px; } .cta-list .v { font-size: 15px; } }

/* ---------- v3: Solutions — crosshair 2x2 with 360° progress markers (vs. Approach: boxed cards in a row) ---------- */
.sol-wrap { grid-column: 1 / -1; margin-top: clamp(40px, 4vw, 56px); position: relative; }
.sol-grid { display: grid; grid-template-columns: 1fr 1fr; grid-auto-rows: 1fr; border-block: 1px solid var(--line); position: relative; }
.sol-grid::before, .sol-grid::after { content: ""; position: absolute; background: var(--hair); }
.sol-grid::before { left: 50%; top: 0; bottom: 0; width: 1px; }
.sol-grid::after { top: 50%; left: 0; right: 0; height: 1px; }
.sol { display: grid; grid-template-columns: 64px 1fr; column-gap: 28px; align-content: start; padding: 48px 56px 52px 0; }
.sol:nth-child(2n) { padding: 48px 0 52px 56px; }
.sol h3 { grid-column: 2; font-size: 18px; line-height: 1.65; letter-spacing: .05em; font-weight: 600; word-break: auto-phrase; }
.sol p { grid-column: 2; margin-top: 12px; color: var(--ink-2); font-size: 14px; }
.sol-mark { grid-row: 1 / span 2; width: 64px; aspect-ratio: 1; border-radius: 50%; border: 1px solid var(--line); display: grid; place-items: center; font-family: var(--font-num); font-size: 13px; letter-spacing: .04em; position: relative; --deg: 90deg; }
.sol:nth-child(2) .sol-mark { --deg: 180deg; }
.sol:nth-child(3) .sol-mark { --deg: 270deg; }
.sol:nth-child(4) .sol-mark { --deg: 360deg; }
.sol-mark::before { content: ""; position: absolute; inset: 7px; border-radius: 50%; border: 1px dashed rgba(20,20,20,.3); }
.sol-mark i { position: absolute; inset: -1px; border-radius: 50%; background: conic-gradient(var(--red) var(--deg), transparent 0); -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 2px), #000 calc(100% - 2px)); mask: radial-gradient(farthest-side, transparent calc(100% - 2px), #000 calc(100% - 2px)); }
.sol-mark::after { content: ""; position: absolute; left: 50%; top: 50%; width: 8px; height: 8px; margin: -4px 0 0 -4px; border-radius: 50%; background: var(--red); transform: rotate(var(--deg)) translateY(-32px); }
.sol-hub { position: absolute; left: 50%; top: 50%; width: 24px; height: 24px; margin: -12px 0 0 -12px; border-radius: 50%; border: 1px solid var(--line); background: var(--paper); z-index: 1; }
.sol-hub::after { content: ""; position: absolute; inset: 8px; border-radius: 50%; background: var(--red); }

/* ---------- v3: compact Contact ---------- */
.contact { border-top: 1px solid var(--line); }
.contact-inner { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: 32px; padding-block: clamp(72px, 9vw, 120px); align-items: center; }
.contact-head { grid-column: 1 / span 5; }
.contact .big { font-family: var(--font-en); font-weight: 700; font-size: clamp(56px, 8.4vw, 116px); line-height: .9; letter-spacing: -.05em; }
.contact .big span { color: var(--red); }
.contact-head .ja { margin-top: 20px; font-size: 13px; letter-spacing: .12em; color: var(--ink-2); }
.contact-body { grid-column: 7 / -1; }
.sns { display: flex; gap: 12px; margin-top: 28px; }
.sns a { width: 48px; height: 48px; border: 1px solid var(--line); border-radius: 50%; display: grid; place-items: center; transition: background-color .3s, color .3s; }
.sns a:hover { background: var(--ink); color: var(--white); }
.sns svg { width: 18px; height: 18px; }
.sns .fill { fill: currentColor; }
.sns .stroke { fill: none; stroke: currentColor; stroke-width: 2.1; }

/* ---------- privacy ---------- */
.sec-tight { padding-block: clamp(56px, 7vw, 96px); }

@media (max-width: 860px) {
  .sol-grid { grid-template-columns: 1fr; grid-auto-rows: auto; }
  .sol-grid::before, .sol-grid::after, .sol-hub { display: none; }
  .sol, .sol:nth-child(2n) { padding: 32px 0; }
  .sol + .sol { border-top: 1px solid var(--hair); }
  .contact-inner { grid-template-columns: 1fr; row-gap: 36px; }
  .contact-head, .contact-body { grid-column: 1; }
}
@media (max-width: 560px) {
  .sol { grid-template-columns: 52px 1fr; column-gap: 20px; }
  .sol-mark { width: 52px; font-size: 12px; }
  .sol-mark::before { inset: 6px; }
  .sol-mark::after { transform: rotate(var(--deg)) translateY(-26px); }
}

/* ---------- v4: bottom line (replaces footer), back link ---------- */
.bottom-line { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; border-top: 1px solid var(--hair); padding-block: 20px 28px; font-size: 12px; color: var(--mute); letter-spacing: .06em; }
.bottom-line a { text-decoration: none; }
.bottom-line a:hover { text-decoration: underline; }
.contact .bottom-line { margin-top: -8px; }
.back { margin-top: 36px; font-size: 13px; letter-spacing: .08em; }
.back a { text-decoration: none; }
.back a:hover { text-decoration: underline; }
.sec-tight .bottom-line { margin-top: clamp(56px, 7vw, 88px); }
@media (max-width: 860px) {
  .statement-bg::after { background: rgba(245,243,238,.7); }
}
@media (max-width: 560px) {
}

/* ---------- v6: logo-led hero ---------- */
.hero { position: relative; overflow: hidden; isolation: isolate; min-height: min(80vh, 720px); display: grid; place-items: center; padding: clamp(64px, 8vw, 96px) var(--gutter); }
.hero-bg { position: absolute; inset: 0; z-index: -2; }
.hero-bg img { width: 100%; height: 100%; object-fit: cover; object-position: 60% 70%; }
.hero-bg::after { content: ""; position: absolute; inset: 0; background:
  radial-gradient(ellipse 60% 62% at 50% 50%, rgba(245,243,238,.88) 0%, rgba(245,243,238,.76) 55%, rgba(245,243,238,.5) 100%),
  linear-gradient(180deg, rgba(245,243,238,.2) 0%, rgba(245,243,238,0) 40%, rgba(245,243,238,.55) 100%); }
.hero-stage { position: relative; display: grid; place-items: center; width: 100%; }
.hero-copy { position: relative; z-index: 1; text-align: center; display: flex; flex-direction: column; align-items: center; }
.hero .eyebrow { font-family: var(--font-num); font-size: 12px; letter-spacing: .14em; color: var(--mute); display: flex; align-items: center; gap: 14px; }
.hero .eyebrow::before, .hero .eyebrow::after { content: ""; width: 24px; height: 1px; background: var(--red); }
.hero h1 { margin-top: clamp(22px, 2.6vw, 30px); display: flex; flex-direction: column; align-items: center; gap: clamp(22px, 2.6vw, 30px); font-weight: 500; }
.hero-logo { width: clamp(240px, 33vw, 420px); height: auto; }
.hero-lead { font-size: clamp(13px, 1.25vw, 15px); letter-spacing: .14em; line-height: 1.8; color: var(--ink-2); }
.hero-lead .sep { color: var(--red); margin-inline: .5em; }
.hero-lead .svc { white-space: nowrap; }
.btn-sm { font-size: 13px; padding: 11px 20px 11px 22px; gap: 12px; }
.btn-sm::after { width: 20px; }
.hero-cta { margin-top: clamp(30px, 3.4vw, 40px); background: rgba(245,243,238,.5); }
.hero-rings { position: absolute; z-index: 0; left: 50%; top: 50%; width: min(52vw, 540px); aspect-ratio: 1; translate: -50% -50%; pointer-events: none; }
.hero-rings .ring { position: absolute; border-radius: 50%; border: 1px solid rgba(20,20,20,.4); }
.hero-rings .r1 { inset: 0; }
.hero-rings .r2 { inset: 9%; border-style: dashed; border-color: rgba(20,20,20,.25); }
.hero-rings .spin { position: absolute; inset: 0; border-radius: 50%; }
.hero-rings .spin::before { content: ""; position: absolute; top: -5px; left: calc(50% - 5px); width: 10px; height: 10px; border-radius: 50%; background: var(--red); box-shadow: 0 0 0 5px color-mix(in srgb, var(--red) 15%, transparent); }
.hero-rings .deg { position: absolute; right: -6%; bottom: 8%; font-family: var(--font-num); font-size: 11px; letter-spacing: .1em; color: var(--ink); text-shadow: 0 0 6px rgba(245,243,238,.95), 0 0 14px rgba(245,243,238,.85); }
.hero-rings .deg b { font-family: var(--font-en); font-size: 34px; letter-spacing: -.04em; font-weight: 700; display: block; line-height: 1; }
@media (max-width: 860px) {
  .hero { min-height: 540px; padding-block: 56px; }
  .hero-bg img { object-position: 64% 100%; }
  .hero-rings { width: min(92vw, 420px); }
  .hero-rings .deg { right: 0; bottom: -2%; }
  .hero-rings .deg b { font-size: 26px; }
}
@media (max-width: 560px) {
  .hero-lead { display: flex; flex-direction: column; gap: 2px; letter-spacing: .1em; }
  .hero-lead .sep { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .hero-rings .deg { right: -2%; bottom: -4%; }
}

/* ---------- v6: 600+ proof in Approach ---------- */
.proof { margin-top: 32px; display: flex; align-items: center; gap: clamp(20px, 3vw, 36px); }
.stat { display: flex; flex-direction: column; flex: none; padding-right: clamp(20px, 3vw, 36px); border-right: 1px solid var(--hair); }
.stat-num { font-family: var(--font-en); font-weight: 700; font-size: clamp(56px, 6.4vw, 84px); line-height: .9; letter-spacing: -.05em; color: var(--ink); }
.stat-num small { font-size: .5em; color: var(--red); margin-left: .06em; vertical-align: .55em; letter-spacing: 0; }
.stat-label { margin-top: 10px; font-size: 12px; letter-spacing: .1em; color: var(--ink-2); }
.proof .lead-txt { margin-top: 0; }
@media (max-width: 560px) {
  .proof { margin-top: 24px; gap: 18px; align-items: flex-start; }
  .stat { padding-right: 18px; }
  .stat-num { font-size: 52px; }
  .stat-label { font-size: 11px; letter-spacing: .04em; }
  .proof .lead-txt { font-size: 13px; line-height: 1.85; }
}
