/*
 * alt4l.dev（alt4L のページ）
 * 配色と書体は hub.alt4l.dev と揃えている．動きは控えめに．
 */
:root {
  --bg: #F4F6F4;
  --surface: #FFFFFF;
  --sunken: #EAEEEC;
  --ink: #1D2A2B;
  --muted: #5B6B6D;
  --line: #D8E0DD;
  --accent: #2C6E5F;
  --accent-deep: #22594C;
  --accent-weak: #E1EEE9;
  --now: #B8741A;
  --now-weak: #F6EAD8;
  --font: "Zen Kaku Gothic New", "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic", "Meiryo", "Noto Sans JP", "Noto Sans CJK JP", sans-serif;
  --ease: cubic-bezier(.2, .7, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; scroll-padding-top: 80px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0; background: var(--bg); color: var(--ink); font-family: var(--font);
  font-size: 16px; line-height: 1.85; -webkit-font-smoothing: antialiased; word-break: auto-phrase;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-underline-offset: 3px; }
a:hover { color: var(--accent-deep); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
h1, h2, h3 { margin: 0; line-height: 1.35; }
p { margin: 0 0 1em; }
.wrap { width: min(1160px, 100% - 48px); margin-inline: auto; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--surface); padding: 8px 12px; z-index: 50; }
.skip:focus { left: 8px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 10px 22px; border-radius: 8px;
  border: 1px solid var(--line); background: var(--surface); color: var(--ink);
  font: inherit; font-weight: 500; font-size: 15px; text-decoration: none; cursor: pointer;
  transition: border-color .2s var(--ease), background .2s var(--ease);
}
.btn:hover { border-color: var(--muted); color: var(--ink); }
.btn-primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-deep); border-color: var(--accent-deep); color: #fff; }

/* ---------- ヘッダー ---------- */
.top { position: sticky; top: 0; z-index: 20; background: rgba(244, 246, 244, .9); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); border-bottom: 1px solid transparent; transition: border-color .2s var(--ease); }
.top.is-scrolled { border-bottom-color: var(--line); }
.top-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 64px; }
.mark { font-size: 24px; font-weight: 900; letter-spacing: .02em; color: var(--ink); text-decoration: none; }
.mark span { color: var(--accent); }
.mark:hover { color: var(--ink); }
.top-nav { display: flex; gap: 4px; }
.top-nav a { color: var(--muted); text-decoration: none; font-size: 15px; font-weight: 500; padding: 6px 12px; border-radius: 999px; transition: color .2s var(--ease), background .2s var(--ease); }
.top-nav a:hover { color: var(--ink); background: var(--sunken); }

/* ---------- はじめに ---------- */
.hero { padding: 72px 0 88px; overflow: hidden; }
.hero-inner { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: 56px; align-items: center; }
.hero-kicker { margin: 0 0 18px; font-size: 15px; font-weight: 700; color: var(--accent); letter-spacing: .06em; display: flex; align-items: baseline; gap: 10px; }
.hero-kicker span { font-size: 13px; font-weight: 500; color: var(--muted); }
.hero-title { font-size: clamp(30px, 3.6vw, 46px); font-weight: 900; line-height: 1.45; letter-spacing: .02em; }
.hero-title > span { display: inline-block; } /* 文のまとまりで改行する */
.hero-title .hl { color: var(--accent); }
.hero-lead { margin: 22px 0 0; color: var(--muted); font-size: 17px; max-width: 30em; }
.hero-actions { margin: 32px 0 0; display: flex; flex-wrap: wrap; gap: 12px; }
.hero-shots { position: relative; aspect-ratio: 16 / 12; }
.hero-shots img {
  position: absolute; width: 74%; aspect-ratio: 16 / 10; object-fit: cover; object-position: top;
  border: 1px solid var(--line); border-radius: 12px; background: var(--sunken);
  box-shadow: 0 30px 60px -36px rgba(29, 42, 43, .5);
}
.hero-shots .s1 { left: 0; top: 4%; z-index: 3; }
.hero-shots .s2 { right: 0; top: 0; z-index: 2; width: 62%; }
.hero-shots .s3 { right: 6%; bottom: 0; z-index: 1; width: 58%; }

/* ---------- セクション ---------- */
.block { padding: 72px 0; border-top: 1px solid var(--line); }
.block-title { font-size: clamp(24px, 2.6vw, 30px); font-weight: 900; margin-bottom: 14px; }
.block-lead { color: var(--muted); margin-bottom: 36px; }

/* つくったもの：PC では3列 */
.tools { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 40px 28px; }
.tool { display: flex; flex-direction: column; }
.shot { display: block; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: var(--sunken); box-shadow: 0 24px 48px -36px rgba(29, 42, 43, .45); transition: transform .3s var(--ease), box-shadow .3s var(--ease); }
.shot:hover { transform: translateY(-3px); box-shadow: 0 28px 52px -34px rgba(29, 42, 43, .5); }
.shot img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; object-position: top; }
.tool-body { padding-top: 16px; display: flex; flex-direction: column; flex: 1; }
.tool-meta { margin: 0 0 4px; display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); }
.badge { font-size: 12px; font-weight: 500; padding: 0 9px; border-radius: 999px; background: var(--now-weak); color: var(--now); }
.tool h3 { font-size: 19px; margin-bottom: 8px; }
.tool h3 a { color: var(--ink); text-decoration: none; }
.tool h3 a:hover { color: var(--accent); text-decoration: underline; }
.tool-body > p:not(.tool-meta):not(.tool-link) { color: var(--muted); font-size: 15px; margin-bottom: 12px; }
.tool-link { margin: auto 0 0; font-size: 14px; font-weight: 700; }
.tool-link a::after { content: " →"; }

/* 名前について */
.name-inner { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 48px; align-items: start; }
.name-body { max-width: 40em; }
.name-body p:not(.name-formula) { color: var(--muted); }
.name-formula { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin: 0 0 24px; }
.term { display: inline-flex; flex-direction: column; align-items: center; min-width: 96px; padding: 10px 16px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); }
.term b { font-size: 26px; font-weight: 900; line-height: 1.3; letter-spacing: .02em; }
.term small { font-size: 12px; color: var(--muted); }
.term-result { background: var(--accent-weak); border-color: transparent; }
.term-result b { color: var(--accent); }
.op { font-size: 22px; font-weight: 700; color: var(--muted); }

/* お問い合わせ */
.contact { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.handle { font-weight: 700; color: var(--ink); letter-spacing: .02em; }
.contact-card { padding: 28px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); display: flex; flex-direction: column; }
.contact-card h3 { font-size: 19px; margin-bottom: 8px; }
.contact-card p { color: var(--muted); }
.contact-action { margin: auto 0 0; padding-top: 8px; }
.contact-note { margin: 12px 0 0; font-size: 14px; }

.site-footer { border-top: 1px solid var(--line); padding: 28px 0 48px; font-size: 13px; color: var(--muted); }
.site-footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; }
.site-footer p { margin: 0; }
.footer-links { display: flex; gap: 18px; }
.footer-links a { color: var(--muted); text-decoration: none; }
.footer-links a:hover { color: var(--ink); text-decoration: underline; }

/* ---------- 動き（JS が動き，動きを減らす設定でないときだけ） ---------- */
@keyframes rise { from { opacity: 0; transform: translateY(16px); } }
.motion .hero-kicker, .motion .hero-title > span, .motion .hero-lead, .motion .hero-actions { animation: rise .7s var(--ease) both; }
.motion .hero-title > span:nth-child(1) { animation-delay: .08s; }
.motion .hero-title > span:nth-child(2) { animation-delay: .16s; }
.motion .hero-title > span:nth-child(3) { animation-delay: .28s; }
.motion .hero-lead { animation-delay: .4s; }
.motion .hero-actions { animation-delay: .5s; }
@keyframes shot-in { from { opacity: 0; transform: translateY(28px) scale(.98); } }
.motion .hero-shots img { animation: shot-in .9s var(--ease) both; }
.motion .hero-shots .s3 { animation-delay: .2s; }
.motion .hero-shots .s2 { animation-delay: .32s; }
.motion .hero-shots .s1 { animation-delay: .44s; }
.motion .reveal { opacity: 0; transform: translateY(16px); transition: opacity .6s var(--ease), transform .6s var(--ease); }
.motion .reveal.is-in { opacity: 1; transform: none; }

/* ---------- 開いたときのロゴ：ALT ＋ aL が alt4L になる（同じタブで最初の1回だけ．クリックで飛ばせる） ---------- */
.intro { display: none; }
.is-intro .intro, .intro.is-leaving {
  display: grid; place-items: center; position: fixed; inset: 0; z-index: 100; background: var(--bg); cursor: pointer;
}
.intro.is-leaving { animation: intro-out .55s var(--ease) forwards; pointer-events: none; }
.intro-stage { display: grid; justify-items: center; }
.intro-parts, .intro-word { grid-area: 1 / 1; margin: 0; }
.intro-parts { display: flex; align-items: center; gap: 18px; animation: parts-out .4s .95s var(--ease) forwards; }
.ip { font-size: clamp(34px, 6vw, 56px); font-weight: 900; letter-spacing: .02em; animation: rise .5s var(--ease) both; }
.ip-a { animation-delay: .05s; }
.ip-op { color: var(--muted); font-weight: 500; animation-delay: .22s; }
.ip-b { color: var(--accent); animation-delay: .38s; }
.intro-word { font-size: clamp(52px, 9vw, 88px); font-weight: 900; letter-spacing: .02em; line-height: 1.2; animation: word-in .6s 1.1s var(--ease) both; }
.intro-word span { display: inline-block; color: var(--accent); animation: l-pop .5s 1.45s var(--ease) both; }
.intro-read { grid-area: 2 / 1; margin: 6px 0 0; font-size: 15px; font-weight: 500; letter-spacing: .3em; color: var(--muted); animation: rise .5s 1.5s var(--ease) both; }
@keyframes parts-out { to { opacity: 0; transform: scale(.9); filter: blur(4px); } }
@keyframes word-in { from { opacity: 0; transform: scale(.92); filter: blur(6px); } }
@keyframes l-pop { 0% { transform: none; } 45% { transform: translateY(-14%) rotate(-6deg); } 100% { transform: none; } }
@keyframes intro-out { to { opacity: 0; visibility: hidden; } }
.is-intro .hero-kicker, .is-intro .hero-title > span, .is-intro .hero-lead, .is-intro .hero-actions, .is-intro .hero-shots img { animation-play-state: paused; }

/* 名前について：式が左から順に現れる */
.motion .name-formula.reveal { opacity: 1; transform: none; }
.motion .name-formula.reveal > * { opacity: 0; transform: translateY(12px); transition: opacity .5s var(--ease), transform .5s var(--ease); }
.motion .name-formula.is-in > * { opacity: 1; transform: none; }
.motion .name-formula > :nth-child(2) { transition-delay: .12s; }
.motion .name-formula > :nth-child(3) { transition-delay: .24s; }
.motion .name-formula > :nth-child(4) { transition-delay: .4s; }
.motion .name-formula > :nth-child(5) { transition-delay: .52s; }
.motion .name-formula.is-in .term-result { animation: glow 1.2s .9s var(--ease) both; }
@keyframes glow { 0% { box-shadow: 0 0 0 0 rgba(44, 110, 95, .35); } 100% { box-shadow: 0 0 0 14px rgba(44, 110, 95, 0); } }

/* ---------- 中くらいの幅 ---------- */
@media (max-width: 980px) {
  .tools { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .contact { grid-template-columns: minmax(0, 1fr); }
  .hero-inner { grid-template-columns: minmax(0, 1fr); gap: 48px; }
  .hero-shots { max-width: 560px; }
  .name-inner { grid-template-columns: minmax(0, 1fr); gap: 8px; }
}

/* ---------- スマホ ---------- */
@media (max-width: 640px) {
  .wrap { width: min(1160px, 100% - 40px); }
  .top-inner { min-height: 56px; }
  .mark { font-size: 21px; }
  .top-nav a { padding: 6px 8px; font-size: 13.5px; }
  .top-nav a[href="#name"] { display: none; }
  .hero { padding: 44px 0 56px; }
  .hero-lead { font-size: 16px; }
  .block { padding: 56px 0; }
  .tools { grid-template-columns: minmax(0, 1fr); gap: 40px; }
  .contact { grid-template-columns: minmax(0, 1fr); }
  .contact-card { padding: 22px; }
  .term { min-width: 80px; padding: 8px 12px; }
  .term b { font-size: 22px; }
  .op { font-size: 18px; }
}

/* ---------- 動きを減らす設定：すべて止めて最終状態を表示 ---------- */
@media (prefers-reduced-motion: reduce) {
  .motion .reveal { opacity: 1; transform: none; transition: none; }
  .is-intro .intro { display: none; }
  .motion .name-formula.reveal > * { opacity: 1; transform: none; transition: none; }
  .hero-shots img { translate: none !important; }
  .motion .hero-kicker, .motion .hero-title > span, .motion .hero-lead, .motion .hero-actions, .motion .hero-shots img { animation: none; }
  .btn, .shot, .top, .top-nav a { transition: none; }
  .shot:hover { transform: none; }
}
