/* TDRI homepage — original visual system
 * Palette: ink black / paper white / indigo accent (#2A2D7C) — independent of any reference site
 * Type: Inter (Latin) + Noto Sans JP (Japanese) — distinct from reference typography
 */

:root {
  --ink:        #0d0f12;
  --ink-soft:   #1a1d22;
  --paper:      #f7f6f1;
  --paper-soft: #ecebe5;
  --line:       #2a2d34;
  --line-soft:  #d5d2c6;
  --accent:     #2a2d7c;
  --accent-bright: #4a4ee0;
  --accent-soft:#6e72f0;
  --muted:      #6b6b6b;

  --serif: "Inter", "Noto Sans JP", system-ui, -apple-system, sans-serif;
  --jp:    "Noto Sans JP", "Inter", system-ui, sans-serif;

  --gutter: clamp(1.25rem, 4vw, 4rem);
  --max:    1180px;

  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--jp);
  font-weight: 400;
  background: var(--paper);
  color: var(--ink);
  line-height: 1.75;
  letter-spacing: 0.02em;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }

/* ============================================================
   Brand mark — Original geometric monogram (T + dot)
   ============================================================ */
.nav__mark, .footer__mark {
  display: inline-block;
  position: relative;
  width: 28px;
  height: 28px;
  flex: none;
}
.nav__mark-bar, .footer__mark-bar {
  position: absolute;
  left: 4px;
  top: 6px;
  width: 20px;
  height: 3px;
  background: currentColor;
}
.nav__mark-bar::after, .footer__mark-bar::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 0;
  transform: translateX(-50%);
  width: 3px;
  height: 18px;
  background: currentColor;
}
.nav__mark-dot, .footer__mark-dot {
  position: absolute;
  right: 0;
  bottom: 2px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent-bright);
}

/* ============================================================
   Navigation (fixed, glass)
   ============================================================ */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 50;
  padding: 1rem 0;
  transition: background 0.3s var(--ease), backdrop-filter 0.3s var(--ease), box-shadow 0.3s var(--ease);
}
.nav.is-scrolled {
  background: rgba(247, 246, 241, 0.8);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  box-shadow: 0 1px 0 rgba(13, 15, 18, 0.06);
}
.nav__inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}
.nav__brand {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  font-family: var(--serif);
  font-weight: 700;
  letter-spacing: 0.18em;
}
.nav__name { font-size: 1.05rem; }
.nav__links {
  display: flex;
  gap: 1.6rem;
  list-style: none;
  margin: 0;
  padding: 0;
  font-family: var(--serif);
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.nav__links a {
  position: relative;
  padding: 0.3rem 0;
  opacity: 0.75;
  transition: opacity 0.2s var(--ease);
}
.nav__links a:hover { opacity: 1; }
.nav__links a::after {
  content: "";
  position: absolute;
  left: 0; right: 100%;
  bottom: 0;
  height: 1px;
  background: currentColor;
  transition: right 0.3s var(--ease);
}
.nav__links a:hover::after { right: 0; }

@media (max-width: 720px) {
  .nav__links { display: none; }
}

/* ============================================================
   Hero
   ============================================================ */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 8rem var(--gutter) 6rem;
  overflow: hidden;
  background: var(--paper);
}
.hero__bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}
.hero__grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--line-soft) 1px, transparent 1px),
    linear-gradient(90deg, var(--line-soft) 1px, transparent 1px);
  background-size: 56px 56px;
  background-position: -1px -1px;
  opacity: 0.45;
  mask-image: radial-gradient(ellipse at center, black 30%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse at center, black 30%, transparent 75%);
}
.hero__glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.5;
}
.hero__glow--a {
  width: 480px;
  height: 480px;
  top: -120px;
  left: -160px;
  background: radial-gradient(circle, rgba(74, 78, 224, 0.35), transparent 70%);
}
.hero__glow--b {
  width: 380px;
  height: 380px;
  bottom: -120px;
  right: -120px;
  background: radial-gradient(circle, rgba(110, 114, 240, 0.3), transparent 70%);
}
.hero__content {
  position: relative;
  z-index: 1;
  max-width: var(--max);
  margin: 0 auto;
  width: 100%;
}
.hero__eyebrow {
  font-family: var(--serif);
  font-size: 0.78rem;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 2rem;
  display: inline-block;
  padding-left: 1.5rem;
  position: relative;
}
.hero__eyebrow::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  width: 1rem;
  height: 1px;
  background: var(--muted);
}
.hero__title {
  font-family: var(--jp);
  font-weight: 700;
  font-size: clamp(2.4rem, 6.5vw, 5.2rem);
  line-height: 1.15;
  letter-spacing: -0.01em;
  margin: 0 0 2rem;
}
.hero__title span {
  display: block;
}
.hero__title--accent {
  color: var(--accent);
  position: relative;
}
.hero__title--accent::after {
  content: "";
  position: absolute;
  right: -0.4em;
  bottom: 0.2em;
  width: 0.4em;
  height: 0.4em;
  background: var(--accent-bright);
  border-radius: 50%;
}
.hero__lead {
  font-size: clamp(1rem, 1.4vw, 1.15rem);
  max-width: 36em;
  margin: 1.25rem 0 3rem;
  color: var(--ink-soft);
  text-wrap: balance;
  line-break: strict;
}
.hero__cta {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.95rem 1.8rem;
  font-family: var(--serif);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  border-radius: 999px;
  border: 1px solid transparent;
  transition: transform 0.25s var(--ease), background 0.25s var(--ease), color 0.25s var(--ease), border-color 0.25s var(--ease);
}
.btn--primary {
  background: var(--ink);
  color: var(--paper);
}
.btn--primary:hover {
  background: var(--accent);
  transform: translateY(-2px);
}
.btn--ghost {
  border-color: var(--ink);
  color: var(--ink);
}
.btn--ghost:hover {
  background: var(--ink);
  color: var(--paper);
  transform: translateY(-2px);
}
.hero__scroll {
  position: absolute;
  bottom: 2.4rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--serif);
  font-size: 0.7rem;
  letter-spacing: 0.32em;
  color: var(--muted);
  z-index: 1;
}
.hero__scroll-line {
  width: 1px;
  height: 56px;
  background: linear-gradient(to bottom, var(--muted) 0%, transparent 100%);
  position: relative;
  overflow: hidden;
}
.hero__scroll-line::after {
  content: "";
  position: absolute;
  top: -56px;
  left: 0;
  right: 0;
  height: 56px;
  background: linear-gradient(to bottom, var(--accent-bright), transparent);
  animation: scrollPulse 2.4s var(--ease) infinite;
}
@keyframes scrollPulse {
  0%   { transform: translateY(0);    opacity: 0; }
  20%  { opacity: 1; }
  100% { transform: translateY(112px); opacity: 0; }
}

/* ============================================================
   Generic section
   ============================================================ */
.section {
  padding: 8rem var(--gutter);
  position: relative;
  background: var(--paper);
}
.section--dark {
  background: var(--ink);
  color: var(--paper);
}
.section--dark .accent { color: var(--accent-soft); }
.section--accent {
  background:
    radial-gradient(ellipse at top right, rgba(74, 78, 224, 0.18), transparent 60%),
    var(--ink);
  color: var(--paper);
}
.section__inner {
  max-width: var(--max);
  margin: 0 auto;
}
.section__num {
  font-family: var(--serif);
  font-size: 0.78rem;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 1.5rem;
}
.section--dark .section__num { color: rgba(247, 246, 241, 0.55); }
.section__title {
  font-family: var(--jp);
  font-weight: 700;
  font-size: clamp(1.8rem, 4.2vw, 3.2rem);
  line-height: 1.3;
  letter-spacing: -0.005em;
  margin: 0 0 4rem;
  max-width: 22ch;
  /* 日本語見出しの折り返しを綺麗に整える（句読点を行頭に残さない・行幅を均等化） */
  text-wrap: balance;
  line-break: strict;
  overflow-wrap: anywhere;
}
.accent { color: var(--accent); }

/* ============================================================
   Mission
   ============================================================ */
.mission__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  max-width: 60ch;
}
.mission__lead {
  font-size: clamp(1.1rem, 1.6vw, 1.35rem);
  font-weight: 500;
  color: var(--paper);
  line-height: 1.85;
  margin: 0;
}
.mission__body {
  font-size: 1rem;
  color: rgba(247, 246, 241, 0.78);
  line-height: 1.95;
  margin: 0;
}

/* ============================================================
   Cards (Approach)
   ============================================================ */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.25rem;
}
.card {
  position: relative;
  background: var(--paper);
  border: 1px solid var(--line-soft);
  border-radius: 22px;
  padding: 2.2rem 2rem 2.4rem;
  transition: transform 0.4s var(--ease), border-color 0.4s var(--ease), box-shadow 0.4s var(--ease);
}
.card:hover {
  transform: translateY(-6px);
  border-color: var(--accent);
  box-shadow: 0 22px 50px -28px rgba(42, 45, 124, 0.35);
}
.card__num {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 0.85rem;
  letter-spacing: 0.14em;
  color: var(--accent);
  margin: 0 0 0.8rem;
}
.card__title {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.6rem;
  letter-spacing: -0.01em;
  margin: 0 0 0.4rem;
}
.card__lead {
  font-weight: 500;
  font-size: 0.95rem;
  color: var(--ink-soft);
  margin: 0 0 1.2rem;
}
.card__body {
  font-size: 0.92rem;
  color: var(--muted);
  line-height: 1.85;
  margin: 0;
}

/* ============================================================
   Timeline (Works)
   ============================================================ */
.timeline {
  list-style: none;
  margin: 0;
  padding: 0 0 0 2rem;
  position: relative;
}
.timeline::before {
  content: "";
  position: absolute;
  left: 0.45rem;
  top: 0.6rem;
  bottom: 0.6rem;
  width: 1px;
  background: linear-gradient(to bottom, transparent, rgba(247, 246, 241, 0.18), transparent);
}
.timeline__item {
  position: relative;
  padding: 0 0 3rem;
}
.timeline__item:last-child { padding-bottom: 0; }
.timeline__marker {
  position: absolute;
  left: -2rem;
  top: 0.5rem;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--paper);
  border: 1px solid var(--accent-soft);
  transform: translateX(2px);
}
.timeline__marker::after {
  content: "";
  position: absolute;
  inset: 3px;
  border-radius: 50%;
  background: var(--accent-bright);
}
.timeline__head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 1rem;
  margin-bottom: 0.8rem;
}
.timeline__phase {
  font-family: var(--serif);
  font-size: 0.7rem;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--accent-soft);
  padding: 0.25rem 0.7rem;
  border: 1px solid var(--accent-soft);
  border-radius: 999px;
}
.timeline__title {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.5rem;
  margin: 0;
  letter-spacing: -0.01em;
}
.timeline__body {
  font-size: 0.95rem;
  color: rgba(247, 246, 241, 0.7);
  margin: 0;
  max-width: 56ch;
  line-height: 1.85;
}

/* ============================================================
   Contact
   ============================================================ */
.contact {
  text-align: left;
  max-width: 720px;
}
.contact__lead {
  font-size: clamp(1rem, 1.3vw, 1.15rem);
  color: rgba(247, 246, 241, 0.85);
  margin: 0 0 2.5rem;
  line-height: 1.85;
}
.contact__mail {
  display: inline-block;
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(1.5rem, 3.5vw, 2.4rem);
  letter-spacing: 0.01em;
  color: var(--paper);
  border-bottom: 1px solid rgba(247, 246, 241, 0.4);
  padding-bottom: 0.3rem;
  transition: color 0.25s var(--ease), border-color 0.25s var(--ease);
}
.contact__mail:hover {
  color: var(--accent-soft);
  border-color: var(--accent-soft);
}
.contact__note {
  font-size: 0.82rem;
  color: rgba(247, 246, 241, 0.5);
  margin: 2.5rem 0 0;
}

/* ============================================================
   Footer
   ============================================================ */
.footer {
  background: var(--ink);
  color: var(--paper);
  padding: 3rem var(--gutter);
  border-top: 1px solid rgba(247, 246, 241, 0.08);
}
.footer__inner {
  max-width: var(--max);
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 1.5rem;
}
.footer__brand {
  display: flex;
  align-items: center;
  gap: 0.9rem;
}
.footer__name {
  font-family: var(--jp);
  font-weight: 600;
  font-size: 0.95rem;
  margin: 0;
}
.footer__name-en {
  font-family: var(--serif);
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  color: rgba(247, 246, 241, 0.55);
  margin: 0;
}
.footer__copy {
  font-family: var(--serif);
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  color: rgba(247, 246, 241, 0.45);
  margin: 0;
}

/* ============================================================
   Reveal animation (scroll-driven)
   ============================================================ */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.9s var(--ease), transform 0.9s var(--ease);
  transition-delay: 0ms;
  will-change: opacity, transform;
}
.reveal.is-visible {
  opacity: 1;
  transform: none;
}

/* ============================================================
   Reduce motion respect
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .hero__scroll-line::after { animation: none; }
}

/* ============================================================
   IoA-specific additions (#4301 / #4302 / #4182 / #3687)
   ------------------------------------------------------------
   - Hero eyebrow badge variant for IoA tagline
   - Mission inline accent emphasis (IoA highlight)
   - Timeline marker pulse for the leading "Now" item
   ============================================================ */

/* Hero eyebrow becomes a subtle badge when it carries the IoA tagline */
.hero__eyebrow {
  font-weight: 500;
  color: var(--accent);
}
.hero__eyebrow::before {
  background: var(--accent-bright);
}

/* Leading timeline item gets a soft pulse to signal "Now" */
.timeline__item:first-child .timeline__marker::before {
  content: "";
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  border: 1px solid var(--accent-soft);
  opacity: 0;
  animation: timelinePulse 2.6s var(--ease) infinite;
}
@keyframes timelinePulse {
  0%   { transform: scale(0.6); opacity: 0.0; }
  35%  { opacity: 0.8; }
  100% { transform: scale(1.6); opacity: 0.0; }
}

/* Cards: subtle indigo edge ribbon at the top to hint IoA stack layering */
.card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 1.6rem;
  right: 1.6rem;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent-bright), transparent);
  opacity: 0.0;
  transition: opacity 0.4s var(--ease);
  border-radius: 999px;
}
.card:hover::before {
  opacity: 0.85;
}

/* Footer copy line allows wrap on narrow screens */
.footer__copy {
  text-align: right;
  max-width: 38ch;
}
@media (max-width: 720px) {
  .footer__copy {
    text-align: left;
    max-width: none;
  }
}

/* Reduce motion: kill the timeline pulse */
@media (prefers-reduced-motion: reduce) {
  .timeline__item:first-child .timeline__marker::before { animation: none; }
}

/* ============================================================
   Product Preview — iPhone-mock A2A chat UX (2026-05-06)
   ------------------------------------------------------------
   Sits below the 3 Approach cards and shows the actual chat-app
   UI as a phone mock so visitors can feel the A2A experience.
   ============================================================ */
.preview {
  margin-top: 4.5rem;
  display: grid;
  grid-template-columns: minmax(280px, 380px) 1fr;
  align-items: center;
  gap: clamp(2rem, 5vw, 4.5rem);
}
@media (max-width: 820px) {
  .preview {
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
    margin-top: 3.5rem;
  }
}

.preview__device {
  margin: 0;
  display: flex;
  justify-content: center;
}
.preview__phone {
  position: relative;
  width: 100%;
  max-width: 340px;
  background: #0d0f12;
  padding: 14px 14px 22px;
  border-radius: 42px;
  border: 1px solid rgba(110, 114, 240, 0.22);
  box-shadow:
    0 32px 60px -28px rgba(42, 45, 124, 0.45),
    0 12px 24px -12px rgba(13, 15, 18, 0.3),
    inset 0 0 0 1px rgba(247, 246, 241, 0.04);
  transition: transform 0.5s var(--ease), box-shadow 0.5s var(--ease);
}
.preview__phone:hover {
  transform: translateY(-6px);
  box-shadow:
    0 38px 70px -28px rgba(42, 45, 124, 0.55),
    0 14px 28px -12px rgba(13, 15, 18, 0.35),
    inset 0 0 0 1px rgba(110, 114, 240, 0.18);
}
.preview__notch {
  position: absolute;
  top: 18px;
  left: 50%;
  transform: translateX(-50%);
  width: 86px;
  height: 6px;
  border-radius: 999px;
  background: rgba(247, 246, 241, 0.08);
  z-index: 2;
  pointer-events: none;
}
.preview__img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 30px;
  background: var(--paper);
}

.preview__caption {
  max-width: 38ch;
}
.preview__eyebrow {
  font-family: var(--serif);
  font-size: 0.78rem;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 0.9rem;
  display: inline-block;
  padding-left: 1.4rem;
  position: relative;
}
.preview__eyebrow::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  width: 0.9rem;
  height: 1px;
  background: var(--accent-bright);
}
.preview__title {
  font-family: var(--jp);
  font-weight: 700;
  font-size: clamp(1.4rem, 2.4vw, 1.85rem);
  line-height: 1.4;
  letter-spacing: -0.005em;
  margin: 0 0 1rem;
  color: var(--ink);
}
.preview__body {
  font-size: 0.95rem;
  color: var(--ink-soft);
  line-height: 1.85;
  margin: 0;
}
