/* 株式会社リンクス — li-n-ks.com
   紙(青みの白)・墨・藍を基調に、朱の紐を一本だけ通す。 */

:root {
  --kami: #F2F4F1;      /* 紙: page ground */
  --kami-2: #E8ECE8;    /* 紙の影 */
  --sumi: #15202B;      /* 墨: text */
  --nezu: #5C6873;      /* 鼠: secondary text */
  --sen: #CFD6D3;       /* 線: hairlines */
  --ai: #1E3A66;        /* 藍: primary */
  --ai-deep: #12233F;
  --shu: #D6432A;       /* 朱: the thread */

  --font-ja: "Zen Kaku Gothic New", "Hiragino Kaku Gothic ProN", "Hiragino Sans", "Yu Gothic", Meiryo, sans-serif;
  --font-en: "Bricolage Grotesque", "Zen Kaku Gothic New", "Helvetica Neue", Arial, sans-serif;

  --gutter: clamp(20px, 5vw, 72px);
  --wrap: 1160px;
  --header-h: 72px;
}

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

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

body {
  margin: 0;
  background: var(--kami);
  color: var(--sumi);
  font-family: var(--font-ja);
  font-size: 16px;
  line-height: 1.95;
  font-feature-settings: "palt";
  letter-spacing: 0.04em;
  -webkit-font-smoothing: antialiased;
}

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

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

.wrap { width: 100%; max-width: calc(var(--wrap) + var(--gutter) * 2); margin-inline: auto; padding-inline: var(--gutter); }

.skip { position: absolute; left: -9999px; top: 0; z-index: 100; padding: 8px 16px; background: var(--sumi); color: var(--kami); }
.skip:focus { left: 8px; top: 8px; }

/* 見出しは文節で折り返す */
.hero__title span, .section__title span, .contact__title span { display: inline-block; }

/* ---------- 朱の糸(スクロール進捗) ---------- */
.thread { position: fixed; z-index: 30; left: calc(var(--gutter) / 2); top: 0; bottom: 0; width: 1px; background: var(--sen); pointer-events: none; }
.thread__fill { position: absolute; inset: 0; background: var(--shu); transform-origin: top; transform: scaleY(var(--progress, 0)); }
.thread__fill::after { content: ""; position: absolute; left: -3px; bottom: -3px; width: 7px; height: 7px; border-radius: 50%; background: var(--shu); transform: scaleY(calc(1 / max(var(--progress, 0), 0.001))); transform-origin: bottom; }
@media (max-width: 899px) { .thread { display: none; } }

/* ---------- Header ---------- */
.header {
  position: sticky; top: 0; z-index: 40;
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  height: var(--header-h); padding-inline: var(--gutter);
  background: color-mix(in srgb, var(--kami) 88%, transparent);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid transparent; transition: border-color .3s;
}
.header.is-scrolled { border-bottom-color: var(--sen); }

.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.brand__text { display: flex; flex-direction: column; line-height: 1.15; }
.brand__en { font-family: var(--font-en); font-weight: 700; font-size: 20px; letter-spacing: 0.22em; }
.brand__ja { font-size: 10px; letter-spacing: 0.16em; color: var(--nezu); }

.nav { display: flex; align-items: center; gap: clamp(16px, 2.4vw, 36px); font-size: 14px; font-weight: 500; }
.nav a { text-decoration: none; padding-block: 6px; background: linear-gradient(var(--shu), var(--shu)) left bottom / 0 1px no-repeat; transition: background-size .3s; }
.nav a:hover { background-size: 100% 1px; }
.nav .nav__cta { padding: 9px 20px; border-radius: 999px; background: var(--ai); color: var(--kami); transition: background-color .2s; }
.nav .nav__cta:hover { background: var(--ai-deep); }
.nav-toggle { display: none; }

@media (max-width: 899px) {
  :root { --header-h: 60px; }
  .nav-toggle {
    display: block; font: 500 13px/1 var(--font-ja); letter-spacing: 0.1em; color: var(--sumi);
    padding: 10px 16px; border: 1px solid var(--sumi); border-radius: 999px; background: none; cursor: pointer;
  }
  .nav {
    position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    padding: 8px var(--gutter) 24px; background: var(--kami); border-bottom: 1px solid var(--sen);
    font-size: 16px; visibility: hidden; opacity: 0; transform: translateY(-8px);
    transition: opacity .2s, transform .2s, visibility .2s;
  }
  .nav.is-open { visibility: visible; opacity: 1; transform: none; }
  .nav a { padding-block: 14px; border-bottom: 1px solid var(--sen); background: none; }
  .nav .nav__cta { margin-top: 16px; text-align: center; border-bottom: 0; padding-block: 14px; }
}

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; font-size: 15px; text-decoration: none; }
.btn--primary { padding: 15px 30px; border-radius: 999px; background: var(--ai); color: var(--kami); transition: background-color .2s, transform .2s; }
.btn--primary::after { content: ""; width: 18px; height: 1px; background: currentColor; transition: width .2s; }
.btn--primary:hover { background: var(--ai-deep); }
.btn--primary:hover::after { width: 28px; }
.btn--text { padding-block: 6px; border-bottom: 1px solid var(--sumi); transition: color .2s, border-color .2s; }
.btn--text:hover { color: var(--shu); border-color: var(--shu); }

/* ---------- Hero ---------- */
.hero { position: relative; display: grid; align-items: center; min-height: min(78vh, 760px); overflow: hidden; }
.hero__img { position: absolute; inset: 0; }
.hero__img img { width: 100%; height: 100%; object-fit: cover; object-position: right center; }
.hero__body { position: relative; padding-block: clamp(56px, 9vw, 120px); }
.hero__body > * { max-width: 600px; }
.hero__place { font-family: var(--font-en); font-size: 13px; letter-spacing: 0.18em; color: var(--nezu); margin-bottom: 28px; }
.hero__place::before { content: ""; display: inline-block; vertical-align: middle; width: 36px; height: 1px; margin-right: 14px; background: var(--shu); }
.hero__title { font-size: clamp(34px, 5.6vw, 68px); font-weight: 700; line-height: 1.4; letter-spacing: 0.06em; }
.hero__title em { font-style: normal; color: var(--shu); }
.hero__lead { margin-top: 28px; font-size: clamp(15px, 1.3vw, 17px); max-width: 30em; }
.hero__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 28px; margin-top: 40px; }

@media (max-width: 899px) {
  .hero { display: flex; flex-direction: column-reverse; min-height: 0; }
  .hero__img { position: static; width: 100%; aspect-ratio: 4 / 3; }
  .hero__body { padding-block: 40px 48px; }
}

/* ---------- Sections ---------- */
.section { padding-block: clamp(80px, 11vw, 150px); }
.section__head { margin-bottom: clamp(44px, 6vw, 80px); max-width: 720px; }
.eyebrow { display: flex; align-items: center; gap: 12px; font-family: var(--font-en); font-weight: 600; font-size: 13px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--ai); margin-bottom: 14px; }
/* 結び目 */
.eyebrow::before { content: ""; width: 22px; height: 12px; flex: none; background:
  radial-gradient(circle at 6px 6px, transparent 3.2px, var(--shu) 3.3px 5px, transparent 5.1px),
  radial-gradient(circle at 16px 6px, transparent 3.2px, var(--ai) 3.3px 5px, transparent 5.1px); }
.section__title { font-size: clamp(28px, 3.6vw, 44px); font-weight: 700; line-height: 1.5; letter-spacing: 0.08em; }
.section__lead { margin-top: 22px; color: var(--nezu); max-width: 36em; }

/* ---------- Services ---------- */
.services { display: grid; gap: clamp(64px, 9vw, 120px); }
.service { display: grid; gap: 28px; align-items: center; }
.service__img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 2px; }
.service__en { font-family: var(--font-en); font-size: 13px; letter-spacing: 0.12em; color: var(--nezu); margin-bottom: 8px; }
.service__title { font-size: clamp(22px, 2.4vw, 30px); font-weight: 700; line-height: 1.5; letter-spacing: 0.06em; margin-bottom: 20px; }
.service__list { margin-top: 26px; border-top: 1px solid var(--sen); font-size: 15px; font-weight: 500; }
.service__list li { position: relative; padding: 13px 0 13px 22px; border-bottom: 1px solid var(--sen); line-height: 1.6; }
.service__list li::before { content: ""; position: absolute; left: 2px; top: 1.55em; width: 10px; height: 1px; background: var(--shu); }

@media (min-width: 900px) {
  .service { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: clamp(48px, 7vw, 110px); }
  .service:nth-child(even) .service__img { order: 2; }
  .service:nth-child(even) { grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); }
  .service__body { max-width: 520px; }
}

/* ---------- About ---------- */
.about { position: relative; background: var(--ai-deep); color: #EEF1F0; }
.about__img { width: 100%; height: clamp(260px, 44vw, 560px); object-fit: cover; }
.about__body { padding-block: clamp(64px, 8vw, 110px) clamp(80px, 10vw, 130px); }
.about .eyebrow { color: #A9BBD6; }
.about__text { margin-top: 36px; display: grid; gap: 1.6em; max-width: 40em; color: #D4DBE2; }
@media (min-width: 1000px) {
  .about__body { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); column-gap: 64px; }
  .about__body .eyebrow { grid-column: 1 / -1; }
  .about__text { margin-top: 8px; }
}

/* ---------- Flow ---------- */
.flow { counter-reset: flow; display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 40px 0; }
.flow li { counter-increment: flow; position: relative; padding: 34px 32px 0 0; border-top: 1px solid var(--sen); }
.flow li::before { content: ""; position: absolute; top: -5px; left: 0; width: 9px; height: 9px; border-radius: 50%; background: var(--kami); border: 2px solid var(--shu); }
.flow li::after { content: "0" counter(flow); position: absolute; top: 30px; right: 32px; font-family: var(--font-en); font-size: 13px; letter-spacing: 0.1em; color: var(--nezu); }
.flow h3 { font-size: 19px; font-weight: 700; letter-spacing: 0.06em; margin-bottom: 12px; }
.flow p { font-size: 15px; color: var(--nezu); line-height: 1.85; }

/* ---------- Company ---------- */
.section--company { background: var(--kami-2); }
.company { display: grid; gap: 0; }
@media (min-width: 1000px) {
  .company { grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); column-gap: 64px; }
}
.profile { border-top: 1px solid var(--sumi); }
.profile > div { display: grid; grid-template-columns: 8em minmax(0, 1fr); gap: 8px 24px; padding-block: 22px; border-bottom: 1px solid var(--sen); }
.profile dt { font-weight: 700; font-size: 14px; letter-spacing: 0.12em; color: var(--ai); padding-top: 2px; }
.profile dd { font-size: 15.5px; line-height: 1.85; }
.profile dd ul { display: grid; gap: 8px; }
.profile dd li { position: relative; padding-left: 18px; }
.profile dd li::before { content: ""; position: absolute; left: 0; top: 0.9em; width: 8px; height: 1px; background: var(--nezu); }
.profile .num { font-family: var(--font-en); font-variant-numeric: tabular-nums; letter-spacing: 0.1em; }
.profile a { text-underline-offset: 4px; }
.profile a:hover { color: var(--shu); }
@media (max-width: 559px) {
  .profile > div { grid-template-columns: 1fr; gap: 4px; padding-block: 18px; }
}

/* ---------- Contact ---------- */
.contact { padding-block: clamp(90px, 12vw, 170px); text-align: left; }
.contact__title { font-size: clamp(30px, 4.6vw, 58px); font-weight: 700; line-height: 1.45; letter-spacing: 0.06em; }
.contact__lead { margin-top: 24px; max-width: 34em; color: var(--nezu); }
.contact__mail {
  display: inline-block; margin-top: 44px; font-family: var(--font-en); font-weight: 600;
  font-size: clamp(24px, 4.4vw, 56px); letter-spacing: 0.02em; line-height: 1.3; text-decoration: none; color: var(--ai);
  background: linear-gradient(var(--shu), var(--shu)) left bottom / 100% 2px no-repeat; padding-bottom: 8px;
  transition: color .25s, background-size .4s; overflow-wrap: anywhere;
}
.contact__mail:hover { color: var(--shu); background-size: 0 2px; background-position: right bottom; }
.contact__note { margin-top: 32px; font-size: 13px; color: var(--nezu); }
.contact__note a { text-underline-offset: 3px; }

/* ---------- Footer ---------- */
.footer { border-top: 1px solid var(--sen); padding-block: 44px 52px; font-size: 13px; }
.footer__inner { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 28px 48px; }
.footer__name { font-weight: 700; font-size: 15px; letter-spacing: 0.1em; }
.footer__addr { color: var(--nezu); }
.footer__nav { display: flex; flex-wrap: wrap; gap: 8px 28px; }
.footer__nav a { text-decoration: none; }
.footer__nav a:hover { color: var(--shu); }
.footer__copy { width: 100%; font-family: var(--font-en); letter-spacing: 0.1em; color: var(--nezu); }

/* ---------- Document pages (privacy, 404) ---------- */
.doc { padding-block: clamp(56px, 8vw, 110px) clamp(80px, 10vw, 140px); }
.doc__inner { max-width: 760px; }
.doc h1 { font-size: clamp(28px, 3.6vw, 42px); line-height: 1.5; letter-spacing: 0.08em; margin-bottom: 36px; }
.doc h2 { font-size: 19px; letter-spacing: 0.06em; margin: 48px 0 12px; padding-top: 28px; border-top: 1px solid var(--sen); }
.doc p + p { margin-top: 1em; }
.doc ul { list-style: none; margin-top: 12px; display: grid; gap: 6px; }
.doc ul li { position: relative; padding-left: 20px; }
.doc ul li::before { content: ""; position: absolute; left: 2px; top: 0.95em; width: 9px; height: 1px; background: var(--shu); }
.doc__meta { margin-top: 56px; color: var(--nezu); font-size: 14px; }
.doc a { text-underline-offset: 4px; }
.doc a:hover { color: var(--shu); }

/* ---------- Motion ---------- */
@media (prefers-reduced-motion: no-preference) {
  .js .reveal { opacity: .001; transform: translateY(18px); transition: opacity .8s ease, transform .8s cubic-bezier(.2,.7,.2,1); }
  .js .reveal.is-in { opacity: 1; transform: none; }
  .hero__title span { animation: rise .9s cubic-bezier(.2,.7,.2,1) both; }
  .hero__title span:nth-child(2) { animation-delay: .12s; }
  .hero__title span:nth-child(3) { animation-delay: .24s; }
  @keyframes rise { from { opacity: 0; transform: translateY(20px); } }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; animation: none !important; }
}

/* =====================================================================
   Multi-page additions
   ===================================================================== */

/* ---------- Nav: current page + services submenu ---------- */
.nav a[aria-current] { background-size: 100% 1px; }
.nav__group { position: relative; }
.nav__sub { display: grid; }
.nav__sub a { background: none; }
@media (min-width: 900px) {
  .nav__sub {
    position: absolute; top: 100%; left: -20px; min-width: 260px; padding: 12px 20px;
    background: var(--kami); border: 1px solid var(--sen); border-radius: 4px;
    box-shadow: 0 12px 32px -16px rgb(21 32 43 / .25);
    visibility: hidden; opacity: 0; transform: translateY(-4px); transition: opacity .2s, transform .2s, visibility .2s;
  }
  .nav__group:hover .nav__sub, .nav__group:focus-within .nav__sub { visibility: visible; opacity: 1; transform: none; }
  .nav__sub a { padding-block: 9px; font-size: 13.5px; }
  .nav__sub a:hover { color: var(--shu); }
}
@media (max-width: 899px) {
  .nav__group > a { display: block; }
  .nav__sub a { padding-left: 18px; font-size: 14.5px; color: var(--nezu); }
}

/* ---------- Breadcrumbs ---------- */
.crumbs { display: flex; flex-wrap: wrap; gap: 4px 0; padding-top: 28px; font-size: 12.5px; color: var(--nezu); }
.crumbs a { text-decoration: none; }
.crumbs a:hover { color: var(--shu); }
.crumbs > * + *::before { content: ""; display: inline-block; vertical-align: middle; width: 14px; height: 1px; margin-inline: 10px; background: var(--sen); }

/* ---------- Page head ---------- */
.page-head { padding-block: clamp(44px, 6vw, 84px) clamp(40px, 5vw, 68px); }
.page-head__title { font-size: clamp(30px, 4.4vw, 56px); font-weight: 700; line-height: 1.45; letter-spacing: 0.07em; }
.page-head__title span { display: inline-block; }
.page-head__lead { margin-top: 26px; max-width: 38em; font-size: clamp(15px, 1.25vw, 17px); }
.page-visual { width: 100%; aspect-ratio: 16 / 7; object-fit: cover; border-radius: 2px; }
@media (max-width: 699px) { .page-visual { aspect-ratio: 4 / 3; } }

/* ---------- Section variants ---------- */
.section--flush { padding-top: 0; }
.section--narrow { padding-block: clamp(64px, 8vw, 110px); }
.section--tint { background: var(--kami-2); }

/* ---------- Home: service tiles ---------- */
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); gap: clamp(48px, 6vw, 80px) clamp(32px, 5vw, 72px); }
.tile { display: grid; align-content: start; text-decoration: none; }
.tile .service__img { margin-bottom: 24px; transition: filter .4s; }
.tile__en { font-family: var(--font-en); font-size: 13px; letter-spacing: 0.12em; color: var(--nezu); }
.tile__title { margin-top: 4px; font-size: clamp(20px, 2vw, 25px); font-weight: 700; line-height: 1.5; letter-spacing: 0.06em; }
.tile__text { margin-top: 10px; color: var(--nezu); font-size: 15px; line-height: 1.85; }
.tile__more { justify-self: start; margin-top: 18px; font-weight: 700; font-size: 14px; padding-bottom: 4px; border-bottom: 1px solid currentColor; transition: color .2s; }
.tile__more::after { content: ""; display: inline-block; vertical-align: middle; width: 16px; height: 1px; margin-left: 10px; background: currentColor; transition: width .2s; }
.tile:hover .tile__more { color: var(--shu); }
.tile:hover .tile__more::after { width: 28px; }
.tile:hover .service__img { filter: brightness(1.04) contrast(1.03); }

.service__more { margin-top: 28px; }
.btn--light { border-color: currentColor; color: #EEF1F0; }
.btn--light:hover { color: #F3A08F; border-color: #F3A08F; }

/* ---------- Split rows (detail pages) ---------- */
.split { display: grid; gap: 28px; }
.split__title { font-size: clamp(21px, 2.2vw, 28px); font-weight: 700; line-height: 1.6; letter-spacing: 0.08em; }
@media (min-width: 1000px) { .split { grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); column-gap: 64px; } }

.worries { border-top: 1px solid var(--sumi); }
.worries li { position: relative; padding: 18px 0 18px 30px; border-bottom: 1px solid var(--sen); line-height: 1.75; }
.worries li::before { content: ""; position: absolute; left: 2px; top: 1.85em; width: 14px; height: 1px; background: var(--shu); }

.offers { border-top: 1px solid var(--sumi); }
.offers > div { padding-block: 26px; border-bottom: 1px solid var(--sen); display: grid; gap: 8px; }
.offers dt { font-weight: 700; font-size: 17px; letter-spacing: 0.06em; }
.offers dd { color: var(--nezu); font-size: 15.5px; max-width: 42em; }
.section--tint .offers dd { color: #4C5863; }

.prose { display: grid; gap: 1.6em; max-width: 42em; }

.others { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); border-top: 1px solid var(--sumi); }
.other { display: grid; gap: 2px; padding: 22px 24px 22px 0; border-bottom: 1px solid var(--sen); text-decoration: none; font-weight: 700; letter-spacing: 0.05em; transition: color .2s; }
.other span { font-family: var(--font-en); font-weight: 400; font-size: 12.5px; letter-spacing: 0.1em; color: var(--nezu); }
.other:hover { color: var(--shu); }

/* ---------- About page ---------- */
.about__img--page { height: clamp(240px, 40vw, 520px); }

/* ---------- Company / contact pages ---------- */
.profile { max-width: 860px; }
.profile__more { margin-top: 44px; }
.contact__mail { margin-top: 0; }
.contact__guide { margin-top: clamp(56px, 7vw, 96px); }
.doc__back { margin-top: 40px; }

/* ---------- CTA band ---------- */
.cta { background: var(--ai-deep); color: #EEF1F0; padding-block: clamp(72px, 9vw, 120px); }
.cta__inner { display: grid; gap: 32px; align-items: end; }
.cta .eyebrow { color: #A9BBD6; }
.cta__title { font-size: clamp(28px, 4vw, 50px); font-weight: 700; line-height: 1.45; letter-spacing: 0.06em; }
.cta__title span { display: inline-block; }
.cta__side { display: grid; gap: 26px; justify-items: start; color: #D4DBE2; max-width: 30em; }
.cta .btn--primary { background: var(--kami); color: var(--ai-deep); }
.cta .btn--primary:hover { background: #fff; }
@media (min-width: 900px) { .cta__inner { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); column-gap: 64px; } }

/* ---------- Footer nav (multi-column) ---------- */
.footer__inner { align-items: flex-start; }
.footer__nav { gap: 28px 64px; }
.footer__nav > div { display: grid; gap: 8px; align-content: start; }
.footer__sub { color: var(--nezu); padding-left: 14px; position: relative; }
.footer__sub::before { content: ""; position: absolute; left: 0; top: 50%; width: 7px; height: 1px; background: var(--sen); }

/* document pages now sit inside <main> */
.doc { padding-block: clamp(40px, 6vw, 84px) clamp(80px, 10vw, 140px); }

/* balanced headings; keep Japanese phrases together where supported */
.page-head__title, .split__title, .section__title, .service__title, .tile__title { text-wrap: balance; word-break: auto-phrase; }

/* light CTA (home: follows the dark about band) */
.cta--light { background: var(--kami); color: var(--sumi); }
.cta--light .eyebrow { color: var(--ai); }
.cta--light .cta__side { color: var(--nezu); }
.cta--light .btn--primary { background: var(--ai); color: var(--kami); }
.cta--light .btn--primary:hover { background: var(--ai-deep); }
