/* txd.dev styles. Hand-written, no framework. */

:root {
  /* TxD brand: the logo's sky blue on deep navy */
  --blue: #91bdea;
  --blue-strong: #b4d3f2;
  --blue-deep: #5f93c9;
  --blue-glow: rgb(145 189 234 / 0.16);

  --bg: #060b17;
  --bg-raised: #0b1426;
  --surface: #0f1a30;
  --surface-2: #15223c;
  --line: rgb(145 189 234 / 0.12);
  --line-strong: rgb(145 189 234 / 0.28);

  --text: #eef3fa;
  --text-muted: #a9b6c9;
  --text-dim: #7a879b;
  --on-blue: #06101f;

  --font: "Poppins", ui-sans-serif, system-ui, -apple-system, "Segoe UI", "Hiragino Sans",
    "Hiragino Kaku Gothic ProN", "Yu Gothic", Meiryo, sans-serif;
  --font-ja: "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic", YuGothic, Meiryo, "Poppins",
    ui-sans-serif, system-ui, sans-serif;

  --radius-sm: 10px;
  --radius: 18px;
  --radius-lg: 28px;

  --container: 1200px;
  --narrow: 880px;
  --gutter: clamp(1rem, 4vw, 2.5rem);
  --section: clamp(3.5rem, 9vw, 7rem);

  --step--1: clamp(0.85rem, 0.82rem + 0.15vw, 0.95rem);
  --step-0: clamp(1rem, 0.96rem + 0.2vw, 1.1rem);
  --step-1: clamp(1.15rem, 1.05rem + 0.5vw, 1.4rem);
  --step-2: clamp(1.4rem, 1.2rem + 1vw, 2rem);
  --step-3: clamp(1.8rem, 1.4rem + 2vw, 2.9rem);
  --step-4: clamp(2.2rem, 1.5rem + 3.6vw, 4.4rem);

  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  --header-h: 76px;

  color-scheme: dark;
}

/* ---------- Base ---------- */

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: calc(var(--header-h) + 1rem);
}
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: var(--step-0);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

:lang(ja) { font-family: var(--font-ja); line-break: strict; }
html:lang(ja) body { line-height: 1.9; }

h1, h2, h3, h4 {
  margin: 0;
  line-height: 1.15;
  letter-spacing: -0.02em;
  font-weight: 700;
  text-wrap: balance;
}
:lang(ja) :is(h1, h2, h3, h4) { letter-spacing: 0; line-height: 1.4; }
p { margin: 0; text-wrap: pretty; }
img { display: block; max-width: 100%; height: auto; }
a { color: var(--blue); text-underline-offset: 0.2em; }
a:hover { color: var(--blue-strong); }
ul { margin: 0; padding: 0; }
figure { margin: 0; }
address { font-style: normal; }

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

::selection { background: var(--blue); color: var(--on-blue); }

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}

.skip-link {
  position: absolute;
  left: 1rem; top: -100px;
  z-index: 100;
  padding: 0.6rem 1rem;
  background: var(--blue); color: var(--on-blue);
  font-weight: 600; border-radius: var(--radius-sm);
  text-decoration: none;
}
.skip-link:focus { top: 1rem; }

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

.accent { color: var(--blue); }
.lead { font-size: var(--step-1); color: var(--text-muted); line-height: 1.65; }

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 48px;
  padding: 0.7rem 1.4rem;
  border: 2px solid transparent;
  border-radius: 999px;
  font: inherit;
  font-size: 0.98rem;
  font-weight: 600;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.2s var(--ease), color 0.2s var(--ease), border-color 0.2s var(--ease), transform 0.2s var(--ease);
}
.btn--primary { background: var(--blue); color: var(--on-blue); }
.btn--primary:hover { background: var(--blue-strong); color: var(--on-blue); }
.btn--outline { border-color: var(--line-strong); color: var(--text); background: transparent; }
.btn--outline:hover { border-color: var(--blue); color: var(--blue); }
.btn:disabled { opacity: 0.6; cursor: progress; }
@media (prefers-reduced-motion: no-preference) {
  .btn:hover { transform: translateY(-1px); }
}

.link-arrow { font-weight: 600; white-space: nowrap; text-decoration: none; }
.link-arrow::after { content: " \2192"; }
.link-arrow:hover { text-decoration: underline; }

/* ---------- Header and navigation ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgb(0 0 0 / 0.82);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid var(--line);
}
.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: var(--header-h);
  gap: 1rem;
}
.brand img { height: 42px; width: auto; }

.site-nav ul {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  list-style: none;
}
.site-nav a {
  display: block;
  padding: 0.5rem 0.9rem;
  border-radius: 999px;
  color: var(--text-muted);
  font-size: 0.95rem;
  font-weight: 500;
  text-decoration: none;
  transition: color 0.2s var(--ease), background-color 0.2s var(--ease);
}
.site-nav a:hover { color: var(--text); background: rgb(145 189 234 / 0.08); }
.site-nav a[aria-current="page"] { color: var(--blue); }
.site-nav__cta { margin-left: 0.5rem; }
.site-nav__cta .btn { min-height: 42px; padding: 0.45rem 1.2rem; color: var(--text); }
.site-nav__cta .btn:hover,
.site-nav__cta .btn[aria-current="page"] { color: var(--blue); border-color: var(--blue); background: transparent; }

.nav-toggle {
  display: none;
  position: relative;
  width: 44px; height: 44px;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  background: transparent;
  color: var(--text);
  cursor: pointer;
}
.nav-toggle__bar,
.nav-toggle__bar::before,
.nav-toggle__bar::after {
  position: absolute;
  left: 50%;
  width: 18px; height: 2px;
  margin-left: -9px;
  background: currentColor;
  border-radius: 2px;
  transition: transform 0.25s var(--ease), opacity 0.2s;
}
.nav-toggle__bar { top: 50%; margin-top: -1px; }
.nav-toggle__bar::before,
.nav-toggle__bar::after { content: ""; left: 0; margin-left: 0; }
.nav-toggle__bar::before { top: -6px; }
.nav-toggle__bar::after { top: 6px; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bar { background: transparent; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bar::before { transform: translateY(6px) rotate(45deg); background: var(--text); }
.nav-toggle[aria-expanded="true"] .nav-toggle__bar::after { transform: translateY(-6px) rotate(-45deg); background: var(--text); }

@media (max-width: 900px) {
  .nav-toggle { display: block; }
  .js .site-nav {
    position: absolute;
    top: 100%; left: 0; right: 0;
    background: var(--bg-raised);
    border-bottom: 1px solid var(--line);
    box-shadow: 0 24px 40px rgb(0 0 0 / 0.4);
    visibility: hidden;
    opacity: 0;
    transform: translateY(-8px);
    transition: opacity 0.2s var(--ease), transform 0.2s var(--ease), visibility 0s linear 0.2s;
  }
  .js .site-nav.is-open {
    visibility: visible;
    opacity: 1;
    transform: none;
    transition: opacity 0.2s var(--ease), transform 0.2s var(--ease);
  }
  .site-nav ul {
    flex-direction: column;
    align-items: stretch;
    gap: 0.15rem;
    padding: 0.75rem var(--gutter) 1.25rem;
  }
  .site-nav a { padding: 0.8rem 1rem; font-size: 1.05rem; border-radius: var(--radius-sm); }
  .site-nav__cta { margin: 0.5rem 0 0; }
  .site-nav__cta .btn { width: 100%; }
  /* Without JavaScript the menu is simply shown under the header. */
  html:not(.js) .nav-toggle { display: none; }
  html:not(.js) .site-header__inner { flex-wrap: wrap; padding-block: 0.5rem; }
  html:not(.js) .site-nav ul { flex-direction: row; flex-wrap: wrap; padding: 0; }
}

/* ---------- Hero ---------- */

.hero {
  position: relative;
  overflow: hidden;
  padding-block: clamp(3.5rem, 10vw, 7.5rem);
  isolation: isolate;
}
.hero--compact { padding-block: clamp(3rem, 8vw, 5.5rem); }
.hero--full { min-height: calc(100svh - var(--header-h) - 12rem); display: grid; align-items: center; }
.hero__glow {
  position: absolute;
  z-index: -1;
  width: min(36rem, 90vw);
  aspect-ratio: 1;
  right: -12rem; top: -14rem;
  border-radius: 50%;
  background: radial-gradient(circle, rgb(145 189 234 / 0.22), transparent 65%);
  pointer-events: none;
}
.hero__glow--2 { right: auto; top: auto; left: -14rem; bottom: -16rem; opacity: 0.8; }

.hero__grid { display: grid; gap: clamp(2rem, 5vw, 4rem); align-items: center; }
.hero__center { text-align: center; max-width: calc(900px + var(--gutter) * 2); }
.hero__center .hero__lead { margin-inline: auto; }
.hero__title { font-size: var(--step-4); }
.hero__title .accent { display: block; }
.hero__title--ja { font-size: var(--step-3); }
.hero__title--ja .accent { display: inline; }
.hero__lead { margin-top: 1.25rem; max-width: 46rem; }
.hero__lead p + p { margin-top: 0.75rem; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 2rem; }
.hero__actions--center { justify-content: center; }
.hero__actions .btn { flex: 1 1 100%; }

.hero__media {
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--line-strong);
  box-shadow: 0 30px 60px rgb(0 0 0 / 0.45), 0 0 0 6px rgb(145 189 234 / 0.06);
}
.hero__media img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }

@media (min-width: 560px) {
  .hero__actions .btn { flex: 0 0 auto; }
}
@media (min-width: 960px) {
  .hero__grid { grid-template-columns: 1.5fr 1fr; }
  .hero--home .hero__grid { grid-template-columns: 1fr 1.6fr; }
  .hero--home .hero__media { order: -1; }
  .hero__media img { aspect-ratio: 4 / 5; }
}

.thanks__check {
  display: inline-grid;
  place-items: center;
  width: 72px; height: 72px;
  margin-bottom: 1.5rem;
  border-radius: 50%;
  background: var(--blue-glow);
  color: var(--blue);
  border: 1px solid var(--line-strong);
}
.thanks__check svg { width: 34px; height: 34px; }

/* ---------- Intro strip ---------- */

.strip {
  border-block: 1px solid var(--line);
  background: linear-gradient(180deg, var(--bg-raised), var(--bg));
  padding-block: clamp(1.5rem, 4vw, 2.25rem);
}
.strip__facts {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 0;
  list-style: none;
  color: var(--text);
  font-weight: 600;
  font-size: var(--step-0);
}
.strip__facts { flex-direction: column; }
@media (min-width: 720px) {
  .strip__facts { flex-direction: row; }
  .strip__facts li + li::before {
    content: "\00B7";
    margin-inline: 0.6em;
    color: var(--blue);
  }
}
.strip__line { margin-top: 0.6rem; color: var(--text-muted); max-width: 60rem; }
.strip__line strong { color: var(--blue); font-weight: 600; }

/* ---------- Sections ---------- */

.section { padding-block: var(--section); }
.section--tight { padding-block: clamp(2.5rem, 6vw, 4.5rem); }
.section--alt { background: var(--bg-raised); border-block: 1px solid var(--line); }
.section__head { max-width: 48rem; margin-bottom: clamp(2rem, 5vw, 3.5rem); }
.section__head--center { margin-inline: auto; text-align: center; }
.section__head .lead { margin-top: 1rem; }
.section__title { font-size: var(--step-3); color: var(--blue); }
.section__title--center { text-align: center; }
.section__title + .facts { margin-top: 1.5rem; }

.grid { display: grid; gap: clamp(1rem, 3vw, 2rem); }
@media (min-width: 820px) {
  .grid--2 { grid-template-columns: repeat(2, 1fr); }
}

.card {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: clamp(1.5rem, 4vw, 2.5rem);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: border-color 0.25s var(--ease), transform 0.25s var(--ease);
}
.card:hover { border-color: var(--line-strong); }
.card h2, .card h3 { font-size: var(--step-2); }
.card p { color: var(--text-muted); }
.card__action { margin-top: auto; align-self: flex-start; }
.card--center { align-items: center; text-align: center; }
.card--center .card__action { align-self: center; }
.card__title-accent { color: var(--blue); }
@media (prefers-reduced-motion: no-preference) {
  .card:hover { transform: translateY(-3px); }
}

.logo-tile {
  flex: none;
  display: grid;
  place-items: center;
  width: 84px; height: 84px;
  padding: 12px;
  background: #fff;
  border-radius: 20px;
  box-shadow: 0 10px 24px rgb(0 0 0 / 0.3);
}
.logo-tile img { width: 100%; height: 100%; object-fit: contain; }
.logo-tile--lg { width: 104px; height: 104px; padding: 14px; border-radius: 24px; }

.icon-tile {
  display: grid;
  place-items: center;
  width: 104px; height: 104px;
  border-radius: 24px;
  background: linear-gradient(135deg, rgb(145 189 234 / 0.3), rgb(145 189 234 / 0.08));
  color: var(--blue);
}
.icon-tile svg { width: 48px; height: 48px; }

/* ---------- Clients ---------- */

.logo-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
  gap: clamp(0.75rem, 2.5vw, 1.5rem);
  list-style: none;
  margin-top: clamp(1.5rem, 4vw, 2.5rem);
}
.logo-row li {
  display: grid;
  place-items: center;
  aspect-ratio: 1;
  padding: clamp(0.75rem, 2vw, 1.25rem);
  background: #fff;
  border-radius: var(--radius);
}
.logo-row img { width: 100%; height: 100%; object-fit: contain; }
@media (min-width: 820px) {
  .logo-row { grid-template-columns: repeat(5, 1fr); max-width: 960px; margin-inline: auto; }
}

/* ---------- About ---------- */

.facts {
  display: grid;
  gap: 0;
  margin: 2rem 0 0;
  border-top: 1px solid var(--line-strong);
}
.facts > div {
  display: grid;
  gap: 0.15rem;
  padding-block: 0.8rem;
  border-bottom: 1px solid var(--line);
}
.facts dt { color: var(--blue); font-weight: 600; font-size: var(--step--1); }
.facts dd { margin: 0; color: var(--text); }
@media (min-width: 600px) {
  .facts > div { grid-template-columns: 10rem 1fr; gap: 1.5rem; }
  .facts--table > div { grid-template-columns: 9rem 1fr; }
}

.slideshow { position: relative; }
.slideshow__frame {
  position: relative;
  aspect-ratio: 4 / 5;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--line-strong);
  background: var(--surface);
  box-shadow: 0 30px 60px rgb(0 0 0 / 0.45);
}
.slideshow__slide {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.6s var(--ease);
}
.slideshow__slide.is-active { opacity: 1; }
.slideshow__arrow {
  position: absolute;
  top: 50%;
  display: grid;
  place-items: center;
  width: 44px; height: 44px;
  margin-top: -22px;
  border: 0;
  border-radius: 50%;
  background: rgb(6 11 23 / 0.65);
  color: #fff;
  cursor: pointer;
}
.slideshow__arrow:hover { background: rgb(6 11 23 / 0.9); }
.slideshow__arrow svg { width: 22px; height: 22px; fill: currentColor; }
.slideshow__arrow--prev { left: 0.75rem; }
.slideshow__arrow--next { right: 0.75rem; }
.slideshow__dots {
  position: absolute;
  left: 50%; bottom: 1rem;
  display: flex;
  gap: 0.25rem;
  transform: translateX(-50%);
}
.slideshow__dots button {
  width: 28px; height: 28px;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}
.slideshow__dots button::before {
  content: "";
  display: block;
  width: 12px; height: 12px;
  margin: auto;
  border-radius: 50%;
  background: rgb(255 255 255 / 0.7);
  transition: background-color 0.2s;
}
.slideshow__dots button.is-active::before { background: var(--blue); }

.values { display: grid; gap: clamp(1.75rem, 4vw, 3rem) clamp(2rem, 5vw, 4rem); max-width: 1080px; margin-inline: auto; }
@media (min-width: 900px) {
  .values { grid-template-columns: repeat(2, 1fr); }
}
.value { display: flex; gap: 1.25rem; align-items: flex-start; }
.value img {
  flex: none;
  width: 64px; height: 64px;
  object-fit: cover;
  padding: 4px;
  border-radius: 14px;
  background: rgb(145 189 234 / 0.06);
  border: 1px solid var(--line);
}
.value h3 { font-size: var(--step-1); margin-bottom: 0.5rem; }
.value p { color: var(--text-muted); }
.value strong { display: block; margin-bottom: 0.25rem; font-weight: 600; }

/* ---------- Products ---------- */

.feature {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  padding: clamp(1.5rem, 5vw, 2.75rem);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-lg);
  background: linear-gradient(160deg, var(--surface-2), var(--surface));
  box-shadow: 0 0 60px rgb(145 189 234 / 0.1);
}
.feature__body h2 { font-size: var(--step-3); margin-bottom: 1rem; }
.feature__body > p { color: var(--text-muted); }
.feature__sub { margin: 1.5rem 0 2rem; padding-top: 1.25rem; border-top: 1px solid var(--line); }
.feature__sub h3 { font-size: var(--step-0); color: var(--blue); font-weight: 600; margin-bottom: 0.4rem; }
.feature__sub p { color: var(--text-muted); }
@media (min-width: 760px) {
  .feature { flex-direction: row; align-items: flex-start; }
}

.more-title { margin: clamp(3rem, 8vw, 5rem) 0 clamp(1.5rem, 4vw, 2.5rem); font-size: var(--step-2); }

.product {
  display: grid;
  gap: 1rem 1.5rem;
  padding-block: clamp(1.5rem, 4vw, 2.25rem);
  border-top: 1px solid var(--line);
}
.product__body h2 { font-size: var(--step-2); margin-bottom: 0.5rem; }
.product__body p { color: var(--text-muted); }
.product__action { justify-self: start; }
.badge {
  display: inline-block;
  margin-bottom: 0.75rem;
  padding: 0.15rem 0.75rem;
  border: 1px solid var(--blue);
  border-radius: 999px;
  color: var(--blue) !important;
  font-size: var(--step--1);
  font-weight: 500;
}
@media (min-width: 760px) {
  .product { grid-template-columns: auto 1fr auto; align-items: center; }
}

/* ---------- Prose (privacy policy) ---------- */

.panel {
  padding: clamp(1.5rem, 5vw, 3rem);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
}
.prose > section + section { margin-top: clamp(2rem, 5vw, 2.75rem); }
.prose h2 { font-size: var(--step-2); color: var(--blue); margin-bottom: 1rem; }
.prose p, .prose li, .prose address { color: var(--text-muted); }
.prose p + p, .prose p + ul, .prose ul + p, .prose address + p, .prose p + address { margin-top: 1rem; }
.prose ul { padding-left: 1.25rem; }
.prose li + li { margin-top: 0.6rem; }
.prose strong { color: var(--text); font-weight: 600; }
.prose__email { font-size: var(--step-1); font-weight: 600; }
.prose__updated { margin-top: 2.5rem !important; font-size: var(--step--1); color: var(--text-dim) !important; }

/* ---------- Footer ---------- */

.site-footer {
  margin-top: 0;
  padding-top: clamp(3rem, 7vw, 4.5rem);
  background: #000;
  border-top: 1px solid var(--line);
  color: var(--text-muted);
  font-size: 0.95rem;
}
.site-footer__grid { display: grid; gap: 2rem; }
.site-footer__brand img { height: 40px; width: auto; }
.site-footer__name { margin-top: 0.75rem; color: var(--text); font-weight: 600; }
.site-footer__links { display: flex; flex-wrap: wrap; gap: 0.5rem 1.5rem; list-style: none; }
.site-footer__links a { color: var(--text-muted); text-decoration: none; }
.site-footer__links a:hover { color: var(--blue); }
.social { display: flex; gap: 0.75rem; list-style: none; }
.social a {
  display: grid;
  place-items: center;
  width: 44px; height: 44px;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  color: var(--text);
}
.social a:hover { color: var(--blue); border-color: var(--blue); }
.social svg { width: 18px; height: 18px; fill: currentColor; }
.site-footer__legal {
  margin-top: 2.5rem;
  padding-block: 1.5rem;
  border-top: 1px solid var(--line);
  font-size: var(--step--1);
  color: var(--text-dim);
}
@media (min-width: 820px) {
  .site-footer__grid { grid-template-columns: 1fr auto auto; align-items: center; gap: 3rem; }
}

/* ---------- Reveal on scroll ---------- */

@media (prefers-reduced-motion: no-preference) {
  .js .reveal {
    opacity: 0;
    transform: translateY(18px);
    transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
  }
  .js .reveal.d1 { transition-delay: 0.08s; }
  .js .reveal.d2 { transition-delay: 0.16s; }
  .js .reveal.is-visible { opacity: 1; transform: none; }
}
