/* TaleWind corporate site — bento grid minimal
   tokens are derived from the logo:
   slate #3c4348 / orange #ff7900 (light bg) / white + mint #04e1aa (dark bg) */
:root {
  --bg: #fbfaf7;
  --card: #ffffff;
  --ink: #3c4348;           /* logo slate */
  --ink-deep: #2f363b;      /* dark footer */
  --muted: #6b7278;
  --line: #e7e4dd;
  --accent: #c25400;        /* darkened logo orange: text links / buttons (AA contrast) */
  --accent-bright: #ff7900; /* logo orange: decorative accents / hover */
  --mint: #04e1aa;          /* logo mint: dark-bg accent only */
  --accent-ink: #ffffff;
  --radius: 14px;
  --maxw: 1080px;
  --shadow: 0 1px 2px rgba(47, 54, 59, 0.04);
  --shadow-hover: 0 10px 24px rgba(47, 54, 59, 0.1);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Hiragino Kaku Gothic ProN", "Hiragino Sans", "Yu Gothic Medium", "Yu Gothic", Meiryo, system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.9;
  -webkit-font-smoothing: antialiased;
}
img, video { max-width: 100%; display: block; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(251, 250, 247, 0.92);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap {
  display: flex; align-items: center; justify-content: space-between;
  min-height: 64px; gap: 16px;
}
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); }
.brand:hover { text-decoration: none; }
.brand-mark { width: 34px; height: 34px; }
.brand-type { display: flex; flex-direction: column; line-height: 1.25; }
.brand-jp { font-weight: 800; font-size: 18px; letter-spacing: 0.34em; }
.brand-en { font-size: 9px; letter-spacing: 0.32em; color: var(--muted); font-family: Verdana, "Segoe UI", system-ui, sans-serif; }
.nav-toggle {
  display: none; background: none; border: 1px solid var(--line);
  border-radius: 8px; padding: 8px 12px; font-size: 14px; cursor: pointer; color: var(--ink);
}
.site-nav ul { display: flex; gap: 4px; list-style: none; margin: 0; padding: 0; flex-wrap: wrap; }
.site-nav a {
  display: block; padding: 8px 12px; border-radius: 8px;
  color: var(--ink); font-size: 14px;
}
.site-nav a:hover { background: #f0eee8; text-decoration: none; }
.site-nav a[aria-current="page"] { color: var(--accent); font-weight: 700; }

/* ---------- hero ---------- */
.hero { padding: 88px 0 56px; }
.hero h1 {
  font-size: clamp(30px, 5.4vw, 52px);
  line-height: 1.4; letter-spacing: 0.03em;
  margin: 0 0 24px; font-weight: 700;
}
.hero .sub { max-width: 40em; color: var(--muted); margin: 0 0 32px; }
.cta-row { display: flex; gap: 12px; flex-wrap: wrap; }

.btn {
  display: inline-block; padding: 13px 26px; border-radius: 10px;
  font-size: 15px; font-weight: 700; border: 1px solid transparent;
}
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { background: var(--accent-bright); text-decoration: none; }
.btn-ghost { border-color: var(--line); color: var(--ink); background: var(--card); }
.btn-ghost:hover { background: #f0eee8; text-decoration: none; }

/* ---------- sections / bento ---------- */
.section { padding: 56px 0; }
.section > .wrap > h2 {
  font-size: 24px; margin: 0 0 8px; letter-spacing: 0.04em;
}
.section .lead { color: var(--muted); max-width: 42em; margin: 0 0 32px; }

.bento { display: grid; gap: 16px; grid-template-columns: repeat(12, 1fr); }
.card {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 28px;
  box-shadow: var(--shadow);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
a.card { color: var(--ink); display: block; }
a.card:hover { text-decoration: none; }
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-hover); }
.card h3 { margin: 0 0 10px; font-size: 18px; }
.card p { margin: 0; color: var(--muted); font-size: 15px; }
.card .num {
  display: inline-block; font-size: 13px; font-weight: 700; color: var(--accent);
  border: 1px solid var(--line); border-radius: 999px; padding: 2px 12px; margin-bottom: 14px;
  background: var(--bg);
}
.span-4 { grid-column: span 4; }
.span-6 { grid-column: span 6; }
.span-8 { grid-column: span 8; }
.span-12 { grid-column: span 12; }

.more-link { margin-top: 20px; font-size: 15px; font-weight: 700; display: inline-block; }

/* ---------- works ---------- */
.demo-embed {
  border: 1px solid var(--line); border-radius: 10px; overflow: hidden;
  background: var(--bg); margin-bottom: 8px;
}
.demo-embed iframe { width: 100%; height: 430px; border: 0; display: block; }
.demo-open { font-size: 13px; margin: 0 0 14px; }
.demo-media {
  aspect-ratio: 16 / 9; border-radius: 10px; border: 1px dashed var(--line);
  background: repeating-linear-gradient(45deg, #f7f5f0, #f7f5f0 12px, #f2f0ea 12px, #f2f0ea 24px);
  display: flex; align-items: center; justify-content: center;
  color: var(--muted); font-size: 13px; margin-bottom: 16px;
}
.demo-note { font-size: 12px; color: var(--muted); margin-top: 14px; }

/* ---------- text pages ---------- */
.prose h2 { font-size: 22px; margin: 48px 0 12px; }
.prose h2:first-child { margin-top: 0; }
.prose ul { padding-left: 1.4em; }
.prose li { margin: 6px 0; }

/* ---------- FAQ ---------- */
.faq details {
  background: var(--card); border: 1px solid var(--line); border-radius: 10px;
  padding: 4px 20px; margin-bottom: 10px;
}
.faq summary {
  cursor: pointer; font-weight: 700; padding: 12px 0; list-style-position: outside;
}
.faq details p { margin: 0 0 16px; color: var(--muted); }

/* ---------- tables ---------- */
table.def { width: 100%; border-collapse: collapse; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
table.def th, table.def td { text-align: left; padding: 14px 18px; border-bottom: 1px solid var(--line); font-weight: 400; vertical-align: top; }
table.def tr:last-child th, table.def tr:last-child td { border-bottom: none; }
table.def th { width: 32%; color: var(--muted); background: #faf9f5; }

/* ---------- news ---------- */
.news-list { list-style: none; margin: 0; padding: 0; }
.news-list li { border-bottom: 1px solid var(--line); }
.news-list a { display: flex; gap: 20px; padding: 18px 4px; color: var(--ink); flex-wrap: wrap; }
.news-list a:hover { background: #f5f3ee; text-decoration: none; }
.news-list time { color: var(--muted); font-size: 14px; white-space: nowrap; }
.article time { color: var(--muted); font-size: 14px; }
.article h1 { font-size: 26px; line-height: 1.5; margin: 8px 0 24px; }

/* ---------- forms ---------- */
.form-block { max-width: 640px; }
.field { margin-bottom: 22px; }
.field > label { display: block; font-weight: 700; font-size: 14px; margin-bottom: 8px; }
.req { color: #b4392f; font-size: 12px; margin-left: 6px; }
input[type="text"], input[type="email"], textarea {
  width: 100%; padding: 12px 14px; font-size: 16px; font-family: inherit;
  border: 1px solid var(--line); border-radius: 10px; background: var(--card); color: var(--ink);
}
input:focus, textarea:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
textarea { min-height: 160px; resize: vertical; }
.hint { font-size: 13px; color: var(--muted); margin-top: 6px; }
.radio-row { display: flex; flex-direction: column; gap: 8px; }
.radio-row label { display: flex; gap: 10px; align-items: flex-start; font-size: 15px; cursor: pointer; }
.error-msg { color: #b4392f; font-size: 13px; margin-top: 6px; display: none; }
.field.invalid .error-msg { display: block; }
.field.invalid input, .field.invalid textarea { border-color: #b4392f; }
.notice-succession {
  display: none; background: #fdf1e5; border: 1px solid #f3d4b4; color: #9c4a00;
  border-radius: 10px; padding: 12px 16px; font-size: 14px; font-weight: 700; margin-bottom: 22px;
}
.notice-succession.show { display: block; }

/* ---------- cta band ---------- */
.cta-band { background: var(--card); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); text-align: center; padding: 56px 20px; }
.cta-band p { max-width: 36em; margin: 0 auto 24px; color: var(--muted); }
.cta-band h2 { margin: 0 0 12px; font-size: 22px; }

/* ---------- footer (dark slate + white/mint logo) ---------- */
.site-footer { background: var(--ink-deep); padding: 56px 0 36px; margin-top: 56px; font-size: 14px; color: #c6ccd0; }
.foot-mark { width: 44px; height: 44px; margin-bottom: 14px; }
.site-footer .foot-nav { display: flex; gap: 6px 20px; flex-wrap: wrap; list-style: none; padding: 0; margin: 0 0 24px; }
.site-footer .foot-nav a { color: #e8eaec; }
.site-footer .foot-nav a:hover { color: var(--mint); text-decoration: none; }
.site-footer .tagline { color: #ffffff; font-weight: 700; margin: 0 0 8px; }
.site-footer .legal { display: flex; gap: 20px; flex-wrap: wrap; justify-content: space-between; align-items: center; margin-top: 16px; }
.site-footer .legal a { color: #c6ccd0; }
.site-footer .legal a:hover { color: var(--mint); }

/* ---------- reveal ---------- */
.reveal { opacity: 0; transform: translateY(14px); transition: opacity 0.5s ease, transform 0.5s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .card:hover { transform: none; }
  html { scroll-behavior: auto; }
}

/* ---------- responsive ---------- */
@media (max-width: 860px) {
  .span-4, .span-6, .span-8 { grid-column: span 12; }
  .hero { padding: 56px 0 40px; }
  body { font-size: 16.5px; } /* 高齢読者を想定し文字は落とさない */
  .nav-toggle { display: block; }
  .site-nav { display: none; width: 100%; }
  .site-nav.open { display: block; padding-bottom: 12px; }
  .site-nav ul { flex-direction: column; gap: 0; }
  .site-nav li + li { border-top: 1px solid var(--line); }
  .site-nav a { padding: 14px 8px; font-size: 16px; } /* タッチ領域を確保 */
  .site-header .wrap { flex-wrap: wrap; }
  table.def th { width: 36%; }
}

/* スマホ */
@media (max-width: 640px) {
  .wrap { padding: 0 16px; }
  .section { padding: 40px 0; }
  .section > .wrap > h2 { font-size: 21px; }
  .hero { padding: 44px 0 36px; }
  .card { padding: 20px; }
  .bento { gap: 12px; }

  .cta-row { flex-direction: column; }
  .cta-row .btn, .cta-band .btn { display: block; width: 100%; text-align: center; }
  .cta-band { padding: 40px 16px; }

  .news-list a { flex-direction: column; gap: 2px; padding: 14px 4px; }

  /* 表は縦積みに(会社概要・沿革) */
  table.def tr, table.def th, table.def td { display: block; width: auto; }
  table.def th { padding: 12px 18px 0; background: none; border-bottom: none; font-size: 13px; }
  table.def td { padding: 2px 18px 14px; }
  table.def tr:last-child td { border-bottom: none; }

  .faq details { padding: 2px 16px; }
  .site-footer { padding: 40px 0 28px; }
  .site-footer .foot-nav { flex-direction: column; gap: 0; }
  .site-footer .foot-nav a { display: block; padding: 10px 0; }
  .site-footer .legal { flex-direction: column; align-items: flex-start; gap: 8px; }
}
