:root {
  --bg: #111;
  --panel: #1e1e1e;
  --panel-2: #262727;
  --line: rgba(255, 255, 255, 0.18);
  --muted: #aeaece;
  --soft: #b3c0d1;
  --pink: #f894fe;
  --orange: #ffaa87;
  --hot-pink: #fa59c0;
  --lime: #f0fe87;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  width: 100%;
  overflow-x: hidden;
  background: var(--bg);
  color: #fff;
}

button,
input,
textarea {
  font: inherit;
}

.page-shell {
  min-height: 100svh;
  width: 100%;
  background: var(--bg);
  font-family: "Inter", "Pretendard", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: 0.02em;
}

.hero-section {
  position: relative;
  min-height: 100svh;
  overflow: hidden;
  padding: 24px 18px 64px;
  display: flex;
  flex-direction: column;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(17, 17, 17, 0.38) 0%, rgba(17, 17, 17, 0.76) 52%, #111 90%),
    radial-gradient(circle at 24% 18%, rgba(255, 170, 135, 0.48), transparent 34%),
    radial-gradient(circle at 62% 24%, rgba(255, 122, 24, 0.24), transparent 32%),
    radial-gradient(circle at 76% 16%, rgba(248, 148, 254, 0.22), transparent 28%),
    linear-gradient(135deg, #29150d 0%, #17110d 34%, #111 62%, #0b0b0b 100%);
  opacity: 1;
}

.hero-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
  background-size: 34px 34px;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.8), transparent 86%);
}

.hero-nav,
.hero-content,
.tree-section,
.partners-section,
.contact-section {
  position: relative;
  z-index: 1;
}

.hero-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
}

.pf-logo {
  width: 164px;
  height: auto;
}

.language-toggle {
  display: inline-flex;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 4px;
  background: rgba(0, 0, 0, 0.34);
  backdrop-filter: blur(12px);
}

.language-toggle button {
  width: 44px;
  height: 34px;
  border: 0;
  border-radius: 999px;
  color: var(--soft);
  background: transparent;
  font-weight: 800;
  font-size: 12px;
}

.language-toggle button.active {
  color: #111;
  background: linear-gradient(90deg, var(--orange), var(--pink));
}

.hero-content {
  width: 100%;
  max-width: 980px;
  margin: auto;
  padding: 92px 0 24px;
}

.eyebrow {
  margin: 0;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.28em;
  color: var(--muted);
}

.hero-main-logo {
  display: block;
  width: min(88vw, 780px);
  height: auto;
}

.hero-content h1 {
  margin: 18px 0 0;
  font-size: clamp(56px, 13vw, 132px);
  line-height: 0.86;
  font-weight: 900;
  letter-spacing: 0;
}

.hero-title {
  display: block;
  max-width: 820px;
  margin-top: 28px;
  font-size: clamp(28px, 5.4vw, 58px);
  line-height: 1.08;
  font-weight: 800;
  letter-spacing: 0;
  background: linear-gradient(90deg, #fff 0%, var(--orange) 48%, var(--pink) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-desc {
  max-width: 720px;
  margin: 24px 0 0;
  color: #d9d9e8;
  font-size: 17px;
  line-height: 1.8;
}

.lang-ja .hero-title {
  max-width: 900px;
  font-size: clamp(27px, 4.8vw, 50px);
  line-height: 1.22;
}

.lang-ja .hero-desc,
.lang-ja .platform-desc,
.lang-ja .capability-card p,
.lang-ja .contact-body p {
  line-height: 1.85;
}

.lang-ja .section-head h2 {
  line-height: 1.18;
}

.lang-ja .platform-label {
  line-height: 1.7;
}

.primary-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 150px;
  height: 54px;
  margin-top: 34px;
  padding: 0 24px;
  border: 1px solid transparent;
  border-radius: 999px;
  color: #111;
  background: linear-gradient(90deg, var(--orange), var(--pink));
  font-weight: 800;
  text-decoration: none;
}

.tree-section,
.partners-section,
.contact-section {
  padding: 76px 18px;
}

.section-head {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
}

.section-head h2 {
  max-width: 860px;
  margin: 12px 0 0;
  font-size: clamp(30px, 5.6vw, 56px);
  line-height: 1.08;
  font-weight: 800;
  letter-spacing: 0;
}

.platforms-intro {
  max-width: 760px;
  margin: 20px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.75;
}

.tree-wrap {
  position: relative;
  --tree-branch: min(34vw, 230px);
  --tree-stroke: rgba(248, 148, 254, 0.54);
  width: 100%;
  max-width: 920px;
  min-height: 520px;
  margin: 48px auto 0;
}

.tree-line {
  position: absolute;
  background: var(--tree-stroke);
  border-radius: 999px;
}

.tree-line.vertical {
  top: 92px;
  left: 50%;
  width: 2px;
  height: 86px;
}

.tree-line.left,
.tree-line.right {
  top: 178px;
  width: var(--tree-branch);
  height: 2px;
}

.tree-line.left {
  right: 50%;
}

.tree-line.right {
  left: 50%;
}

.tree-line.down-left,
.tree-line.down-right {
  top: 178px;
  width: 2px;
  height: 42px;
}

.tree-line.down-left {
  left: calc(50% - var(--tree-branch));
}

.tree-line.down-right {
  left: calc(50% + var(--tree-branch));
}

.tree-root {
  position: absolute;
  top: 0;
  left: 50%;
  display: flex;
  width: 224px;
  height: 92px;
  transform: translateX(-50%);
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(14px);
  text-decoration: none;
  transition: transform 180ms ease, border-color 180ms ease;
}

.tree-root:hover {
  transform: translateX(-50%) translateY(-3px);
  border-color: rgba(255, 255, 255, 0.34);
}

.tree-root img {
  width: 190px;
}

.platform-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
  padding-top: 220px;
}

.platform-card,
.capability-card,
.contact-card {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(30, 30, 30, 0.9);
}

.platform-card {
  display: grid;
  grid-template-rows: 104px 64px minmax(126px, auto) auto;
  min-width: 0;
  padding: 28px;
  color: #fff;
  text-decoration: none;
  transition: transform 180ms ease, border-color 180ms ease;
}

.platform-card:hover {
  transform: translateY(-4px);
  border-color: rgba(248, 148, 254, 0.58);
}

.platform-card.soundpay:hover {
  border-color: rgba(240, 254, 135, 0.68);
}

.platform-brand {
  display: flex;
  align-items: center;
}

.platform-brand img {
  width: 156px;
  max-width: 100%;
}

.platform-card.allthings .platform-brand img {
  width: 92px;
}

.platform-label {
  align-self: start;
  margin: 0;
  color: var(--pink);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.45;
  text-transform: uppercase;
  letter-spacing: 0.16em;
}

.platform-card.soundpay .platform-label {
  color: var(--lime);
}

.platform-desc {
  margin: 18px 0 0;
  color: #d8d8e8;
  font-size: 15px;
  line-height: 1.8;
}

.platform-card ul {
  display: grid;
  align-self: end;
  gap: 10px;
  margin: 24px 0 0;
  padding: 0;
  list-style: none;
}

.platform-card li {
  display: flex;
  gap: 10px;
  align-items: center;
  color: var(--soft);
  font-size: 13px;
  line-height: 1.45;
}

.platform-card li span {
  flex: 0 0 auto;
  color: var(--orange);
  font-weight: 900;
}

.platform-card.soundpay li span {
  color: var(--lime);
}

.capability-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  width: 100%;
  max-width: 1120px;
  margin: 22px auto 0;
}

.capability-card {
  padding: 22px;
}

.capability-card h3 {
  margin: 0;
  color: #fff;
  font-size: 16px;
  font-weight: 850;
}

.capability-card p {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.65;
}

.partners-section {
  overflow: hidden;
  background: #050505;
}

.partner-marquee {
  width: calc(100% + 36px);
  margin: 34px -18px 0;
  padding: 22px 0;
  overflow: hidden;
  background: transparent;
}

.partner-track {
  display: flex;
  width: max-content;
  gap: 14px;
  padding: 0 14px;
  animation: partner-marquee 26s linear infinite;
}

.partner-logo {
  display: flex;
  width: 170px;
  height: 66px;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 0;
  color: #fff;
  background: transparent;
  font-size: 13px;
  font-weight: 850;
  letter-spacing: 0.08em;
}

.partner-logo img {
  display: block;
  width: 124px;
  max-width: calc(100% - 30px);
  max-height: 34px;
  object-fit: contain;
}

.partner-logo img.logo-mono {
  filter: grayscale(1) brightness(0) invert(1);
}

.partner-logo img.logo-reverse {
  filter: grayscale(1) invert(1) contrast(1.25);
  mix-blend-mode: screen;
}

@keyframes partner-marquee {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-50%);
  }
}

.contact-section {
  background:
    linear-gradient(180deg, #111 0%, #090909 100%),
    radial-gradient(circle at 50% 0%, rgba(250, 89, 192, 0.18), transparent 40%);
  padding-bottom: 92px;
}

.contact-list {
  display: grid;
  gap: 12px;
  width: 100%;
  max-width: 720px;
  margin: 34px auto 0;
}

.contact-card {
  position: relative;
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  column-gap: 18px;
  row-gap: 10px;
  align-items: center;
  padding: 18px 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.contact-card.has-qr {
  padding-right: 116px;
}

.contact-card:not(:last-child)::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: -6px;
  left: 82px;
  height: 1px;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0.04) 78%, transparent);
}

.contact-photo {
  grid-column: 1;
  grid-row: 1;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.22);
  object-fit: cover;
}

.contact-body {
  grid-column: 2;
  grid-row: 1;
  min-width: 0;
}

.contact-body h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 850;
}

.contact-body p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.contact-links {
  grid-column: 2;
  grid-row: 2;
  display: grid;
  gap: 2px;
}

.contact-links a,
.contact-region {
  display: flex;
  gap: 10px;
  align-items: center;
  width: fit-content;
  max-width: 100%;
  margin: 0;
  color: #fff;
  font-size: 13px;
  line-height: 1.7;
  letter-spacing: 0;
  text-decoration: none;
  word-break: break-all;
}

.contact-icon {
  position: relative;
  width: 16px;
  height: 16px;
  flex: 0 0 16px;
  border: 1px solid rgba(240, 254, 135, 0.55);
  border-radius: 50%;
}

.mail-icon::before {
  content: "";
  position: absolute;
  left: 3px;
  top: 5px;
  width: 8px;
  height: 5px;
  border: 1.5px solid var(--lime);
  border-radius: 1px;
}

.mail-icon::after {
  content: "";
  position: absolute;
  left: 5px;
  top: 5px;
  width: 5px;
  height: 5px;
  border-left: 1.5px solid var(--lime);
  border-bottom: 1.5px solid var(--lime);
  transform: rotate(-45deg);
}

.phone-icon::before {
  content: "";
  position: absolute;
  left: 5px;
  top: 3px;
  width: 5px;
  height: 9px;
  border: 1.5px solid var(--lime);
  border-radius: 4px;
  transform: rotate(-28deg);
}

.phone-icon::after {
  content: "";
  position: absolute;
  left: 7px;
  top: 10px;
  width: 3px;
  height: 2px;
  background: var(--lime);
  border-radius: 2px;
  transform: rotate(-28deg);
}

.region-icon {
  width: 16px;
  height: 16px;
  flex: 0 0 16px;
  color: var(--lime);
  stroke: currentColor;
  stroke-width: 1.1;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Legacy text labels, kept harmless if older markup is cached. */
.contact-links a > span:not(.contact-icon) {
  color: var(--lime);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.line-qr {
  position: absolute;
  top: 50%;
  right: 0;
  transform: translateY(-50%);
  display: grid;
  justify-items: center;
  gap: 8px;
}

.line-qr img {
  width: 88px;
  height: 88px;
  border-radius: 8px;
  background: #fff;
}

.line-qr span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.12em;
}

@media (max-width: 1080px) and (min-width: 761px) {
  .contact-card.has-qr {
    padding-right: 128px;
  }

  .contact-links a,
  .contact-region {
    font-size: 14px;
    white-space: nowrap;
    word-break: normal;
  }

  .line-qr img {
    width: 108px;
    height: 108px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .partner-track,
  .platform-card {
    animation: none;
    transition: none;
  }
}

@media (max-width: 760px) {
  .hero-section {
    min-height: 92svh;
    padding: 20px 18px 52px;
  }

  .pf-logo {
    width: 142px;
  }

  .hero-content {
    padding-top: 72px;
  }

  .hero-desc {
    font-size: 15px;
  }

  .lang-ja .hero-title {
    font-size: 27px;
    line-height: 1.25;
  }

  .lang-ja .section-head h2 {
    font-size: 28px;
    line-height: 1.2;
  }

  .tree-section,
  .partners-section,
  .contact-section {
    padding: 62px 18px;
  }

  .tree-wrap {
    --tree-rail: 10px;
    --tree-card-gutter: 30px;
    min-height: auto;
    margin-top: 34px;
    padding-left: 0;
  }

  .tree-line.vertical {
    left: var(--tree-rail);
    top: 40px;
    height: calc(75% - 4px);
    z-index: 2;
    border-radius: 0;
  }

  .tree-line.left {
    display: block;
    top: 40px;
    right: auto;
    left: var(--tree-rail);
    width: calc(50% - var(--tree-rail) - 87px);
    z-index: 2;
    border-radius: 0;
  }

  .tree-line.right,
  .tree-line.down-left,
  .tree-line.down-right {
    display: none;
  }

  .tree-root {
    left: 50%;
    width: 174px;
    height: 82px;
    transform: translateX(-50%);
  }

  .tree-root:hover {
    transform: translateX(-50%) translateY(-3px);
  }

  .tree-root img {
    width: 150px;
  }

  .platform-grid {
    grid-template-columns: 1fr;
    grid-auto-rows: 1fr;
    gap: 10px;
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
    padding-top: 128px;
  }

  .platform-card {
    position: relative;
    width: calc(100% - (2 * var(--tree-card-gutter)));
    margin: 0 auto;
    grid-template-rows: auto auto auto auto;
    padding: 20px;
  }

  .platform-card::before {
    content: "";
    position: absolute;
    left: calc(var(--tree-rail) - var(--tree-card-gutter));
    top: calc(50% - 1px);
    width: calc(var(--tree-card-gutter) - var(--tree-rail));
    height: 2px;
    background: var(--tree-stroke);
    border-radius: 0;
  }

  .platform-brand {
    min-height: 38px;
  }

  .platform-brand img {
    width: 112px;
  }

  .platform-card.allthings .platform-brand img {
    width: 70px;
  }

  .platform-label {
    margin-top: 24px;
    font-size: 10px;
    min-height: 0;
  }

  .platform-desc {
    margin-top: 14px;
    font-size: 13px;
    line-height: 1.7;
  }

  .platform-card li {
    align-items: flex-start;
    font-size: 12px;
  }

  .capability-grid {
    grid-template-columns: 1fr;
  }

  .capability-grid {
    margin-top: 8px;
    padding: 0 30px;
  }

  .partner-logo {
    width: 142px;
    height: 58px;
  }

  .contact-card {
    grid-template-columns: 54px minmax(0, 1fr);
    column-gap: 12px;
    row-gap: 10px;
    padding: 16px;
  }

  .contact-card:not(:last-child)::after {
    right: 16px;
    left: 82px;
  }

  .contact-card.has-qr {
    grid-template-columns: 54px minmax(0, 1fr) 82px;
    padding-right: 0;
  }

  .contact-body {
    padding-right: 0;
  }

  .contact-body h3 {
    font-size: 16px;
  }

  .contact-body p {
    max-width: 140px;
    font-size: 11px;
    line-height: 1.35;
  }

  .contact-links {
    grid-column: 1 / 3;
    grid-row: 2;
    padding-left: 0;
    padding-right: 4px;
  }

  .contact-links a,
  .contact-region {
    gap: 7px;
    font-size: 11px;
    line-height: 1.65;
    white-space: nowrap;
    word-break: normal;
  }

  .contact-icon {
    width: 14px;
    height: 14px;
    flex-basis: 14px;
  }

  .region-icon {
    width: 14px;
    height: 14px;
    flex-basis: 14px;
  }

  .mail-icon::before {
    left: 3px;
    top: 5px;
    width: 7px;
    height: 4px;
  }

  .mail-icon::after {
    left: 5px;
    top: 5px;
    width: 4px;
    height: 4px;
  }

  .contact-photo {
    width: 54px;
    height: 54px;
  }

  .line-qr img {
    width: 76px;
    height: 76px;
    border-radius: 7px;
  }

  .line-qr {
    position: static;
    grid-column: 3;
    grid-row: 1 / 3;
    align-self: center;
    transform: none;
  }

  .line-qr span {
    font-size: 9px;
  }
}
