/* Tavil 紹介サイト */
:root {
  --ink: #14213a;
  --indigo: #1b3a6b;
  --sky: #dfe9f3;
  --paper: #f6f9fb;
  --white: #ffffff;
  --yamabuki: #f0b429;
  --muted: #55627a;
  --line: #c5d3e2;
  --mincho: "Zen Old Mincho", "Hiragino Mincho ProN", "Yu Mincho", serif;
  --gothic: "Zen Kaku Gothic New", "Hiragino Kaku Gothic ProN", "Yu Gothic", sans-serif;
  --wrap: 68rem;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--gothic);
  font-size: 1rem;
  line-height: 1.9;
  line-break: strict;
  overflow-wrap: anywhere;
}
h1, h2, h3, p, ul, ol, dl, dd, figure { margin: 0; padding: 0; }
ul, ol { list-style: none; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--yamabuki); outline-offset: 3px; }

/* 上部 */
.top {
  display: flex; align-items: baseline; justify-content: space-between; gap: 1rem;
  max-width: var(--wrap); margin: 0 auto; padding: 1.25rem 1.5rem;
}
.brand { font-family: var(--mincho); font-weight: 700; font-size: 1.5rem; letter-spacing: .04em; text-decoration: none; color: var(--indigo); }
.top nav { display: flex; gap: 1.5rem; font-size: .9rem; }
.top nav a { text-decoration: none; }
.top nav a:hover { text-decoration: underline; text-underline-offset: .3em; }

/* ヒーロー */
.hero {
  max-width: var(--wrap); margin: 0 auto; padding: 2rem 1.5rem 5rem;
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(18rem, 22rem); gap: 2.5rem; align-items: start;
}
.hero-copy { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 2.5rem; align-items: end; }
.hero > *, .split > *, .flow > *, .three > * { min-width: 0; }
.tategaki {
  writing-mode: vertical-rl;
  font-family: var(--mincho); font-weight: 700;
  font-size: clamp(2.25rem, 5.2vw, 4rem);
  line-height: 1.5; letter-spacing: .08em;
  color: var(--indigo);
  height: 10.6em;
  font-feature-settings: "vpal" 0;
}
.tategaki span { display: block; }
.tategaki span:nth-child(2) { padding-top: 1.2em; }
.tategaki span:nth-child(3) { padding-top: 0; }
.lead { font-size: 1.05rem; max-width: 24em; padding-bottom: .5rem; grid-column: 2; grid-row: 1; align-self: end; }
.hero-note { grid-column: 1 / -1; }
.button {
  display: inline-block; padding: .8rem 1.6rem; border-radius: 999px;
  background: var(--indigo); color: var(--white); text-decoration: none; font-weight: 700; font-size: .95rem;
}
.button:hover { background: var(--ink); }

/* トークの例 */
.talk { background: var(--sky); border-radius: 1.75rem; padding: 1.25rem 1rem .75rem; }
.talk-body { display: flex; flex-direction: column; gap: .7rem; }
.msg { max-width: 85%; padding: .65rem .95rem; border-radius: 1.1rem; font-size: .9rem; line-height: 1.65; }
.msg.me { align-self: flex-end; background: var(--indigo); color: var(--white); border-bottom-right-radius: .3rem; }
.msg.bot { align-self: flex-start; background: var(--white); border-bottom-left-radius: .3rem; }
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: .5rem; }
.cards li { background: var(--white); border-radius: .8rem; overflow: hidden; padding-bottom: .55rem; font-size: .72rem; line-height: 1.45; }
.cards b, .cards small { display: block; padding: 0 .5rem; }
.cards b { margin-top: .4rem; font-weight: 700; }
.cards small { color: var(--muted); font-size: .68rem; }
.ph { display: block; aspect-ratio: 4 / 3; }
.ph-a { background: linear-gradient(160deg, #6f8fb8, #2c4f86); }
.ph-b { background: linear-gradient(160deg, #f6cf6b, #e09a1f); }
.ph-c { background: linear-gradient(160deg, #9fc3c9, #3f7f8c); }
.cards li:nth-child(2) { outline: 2px solid var(--yamabuki); outline-offset: -2px; }
.talk figcaption { text-align: center; font-size: .72rem; color: var(--muted); margin-top: .6rem; }

@media (prefers-reduced-motion: no-preference) {
  .talk-body > * { opacity: 0; transform: translateY(.5rem); animation: appear .45s ease-out forwards; }
  .talk-body > :nth-child(1) { animation-delay: .3s; }
  .talk-body > :nth-child(2) { animation-delay: 1.1s; }
  .talk-body > :nth-child(3) { animation-delay: 1.6s; }
  .talk-body > :nth-child(4) { animation-delay: 2.6s; }
  .talk-body > :nth-child(5) { animation-delay: 3.4s; }
  @keyframes appear { to { opacity: 1; transform: none; } }
}

/* 各ブロック */
.block { max-width: var(--wrap); margin: 0 auto; padding: 4.5rem 1.5rem; border-top: 1px solid var(--line); }
.block h2 { font-family: var(--mincho); font-weight: 700; font-size: clamp(1.6rem, 3.2vw, 2.25rem); line-height: 1.5; color: var(--indigo); margin-bottom: 1.25rem; text-wrap: balance; word-break: auto-phrase; }
.block h3 { font-size: 1.1rem; font-weight: 700; margin-bottom: .4rem; }
.block p { max-width: 36em; }
.block p + p { margin-top: 1rem; }
.block-lead { margin-bottom: 2.5rem; }

.flow { display: grid; grid-template-columns: repeat(4, 1fr); gap: 2rem; }
.flow li { border-top: 3px solid var(--indigo); padding-top: 1rem; }
.flow p { font-size: .93rem; }
.num { display: block; font-family: var(--mincho); font-weight: 700; font-size: 2rem; line-height: 1.2; color: var(--yamabuki); -webkit-text-stroke: .5px #b98300; margin-bottom: .5rem; }

.split { display: grid; grid-template-columns: 1fr 1fr; gap: 3.5rem; align-items: start; }
.memo { background: var(--white); border-left: 6px solid var(--yamabuki); padding: .5rem 1.5rem; }
.memo div { display: grid; grid-template-columns: 7em 1fr; gap: 1rem; padding: .8rem 0; border-bottom: 1px dashed var(--line); }
.memo div:last-child { border-bottom: 0; }
.memo dt { font-weight: 700; color: var(--indigo); }

.plain li { position: relative; padding-left: 1.3em; font-size: .95rem; max-width: 36em; }
.plain li + li { margin-top: .8rem; }
.plain li::before { content: ""; position: absolute; left: 0; top: .8em; width: .5em; height: .5em; border-radius: 50%; background: var(--yamabuki); }
.split .plain { padding-top: .5rem; }

.three { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem; margin-bottom: 2rem; }
.three li { background: var(--sky); padding: 1.5rem; border-radius: .25rem 1.5rem .25rem .25rem; }
.three p { font-size: .93rem; }

.status { background: var(--indigo); color: var(--white); max-width: none; border-top: 0; padding-left: max(1.5rem, calc((100% - var(--wrap)) / 2 + 1.5rem)); padding-right: max(1.5rem, calc((100% - var(--wrap)) / 2 + 1.5rem)); }
.status h2 { color: var(--white); }
.status .plain { margin-top: 1.75rem; }

.foot { max-width: var(--wrap); margin: 0 auto; padding: 2.5rem 1.5rem 3rem; font-size: .85rem; color: var(--muted); }
.foot .brand { font-size: 1.25rem; }
.fine { font-size: .75rem; margin-top: .5rem; }

.notfound main { max-width: 36rem; margin: 0 auto; padding: 4rem 1.5rem; }
.notfound h1 { font-family: var(--mincho); font-size: 1.6rem; color: var(--indigo); margin: 2rem 0 1rem; }
.textlink { text-underline-offset: .3em; }

@media (max-width: 60rem) {
  .hero { grid-template-columns: 1fr; gap: 2.5rem; padding-top: 1rem; }
  .talk { max-width: 24rem; width: 100%; justify-self: center; }
  .flow { grid-template-columns: repeat(2, 1fr); }
  .split { grid-template-columns: 1fr; gap: 2rem; }
  .three { grid-template-columns: 1fr; gap: 1rem; }
}
@media (max-width: 40rem) {
  .top nav { display: none; }
  .hero-copy { grid-template-columns: 1fr; gap: 1.5rem; justify-items: start; }
  .tategaki { justify-self: center; font-size: 2.25rem; }
  .lead { grid-column: 1; grid-row: auto; }
  .flow { grid-template-columns: 1fr; gap: 1.5rem; }
  .block { padding: 3.25rem 1.25rem; }
  .memo div { grid-template-columns: 1fr; gap: 0; }
}
