:root {
  --ink: #0a0a0b;
  --ink-2: #131316;
  --paper: #f6f6f4;
  --paper-2: #ffffff;
  --fg-dark: #f4f4f5;       /* text on dark */
  --muted-dark: #9a9a9f;
  --dim-dark: #5a5a60;
  --fg-light: #161618;      /* text on light */
  --muted-light: #5f5f63;
  --dim-light: #9a9a9e;
  --line-dark: rgba(255, 255, 255, 0.12);
  --line-light: rgba(0, 0, 0, 0.1);
  --accent: #e9eefc;
  --glow: rgba(150, 180, 255, 0.45);
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --pad-x: clamp(1.5rem, 5vw, 5rem);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  background: var(--ink);
  color: var(--fg-dark);
  font-family: "Inter", "Noto Sans JP", system-ui, sans-serif;
  font-weight: 300;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  line-height: 1.5;
  overflow-x: hidden;
}

body.lang-jp {
  font-family: "Noto Sans JP", "Inter", system-ui, sans-serif;
}

img { display: block; max-width: 100%; }

/* ============ Shared media panels ============ */
.media {
  position: relative;
  overflow: hidden;
  background-color: #0d0d10;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  /* radial sheen as fallback when no photo is set */
  background-image:
    radial-gradient(120% 90% at 70% 25%, rgba(120, 150, 220, 0.16) 0%, transparent 55%),
    radial-gradient(80% 80% at 30% 90%, rgba(40, 45, 70, 0.5) 0%, transparent 60%),
    linear-gradient(160deg, #16161b 0%, #0a0a0c 100%);
}

.media-scrim {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

/* Each photo dissolves into its own section's dark on the seam (left) edge,
   with a soft floor/top vignette so nothing reads as a hard rectangle. */
.hero-media .media-scrim {
  background:
    linear-gradient(90deg, var(--ink) 0%, rgba(10, 10, 11, 0.6) 16%, transparent 46%),
    linear-gradient(0deg, rgba(10, 10, 11, 0.85) 0%, transparent 38%),
    linear-gradient(180deg, rgba(10, 10, 11, 0.5) 0%, transparent 28%);
}
.about-media .media-scrim {
  background:
    linear-gradient(90deg, var(--ink-2) 0%, rgba(19, 19, 22, 0.6) 16%, transparent 46%),
    linear-gradient(180deg, rgba(19, 19, 22, 0.6) 0%, transparent 32%),
    linear-gradient(0deg, rgba(19, 19, 22, 0.55) 0%, transparent 32%);
}
.updated-media .media-scrim {
  background:
    linear-gradient(90deg, var(--ink) 0%, rgba(10, 10, 11, 0.55) 18%, transparent 48%),
    linear-gradient(270deg, rgba(10, 10, 11, 0.65) 0%, transparent 42%),
    linear-gradient(180deg, rgba(10, 10, 11, 0.4) 0%, transparent 30%);
}

/* ============ Nav ============ */
.nav {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding: clamp(1.25rem, 2.5vw, 2rem) var(--pad-x);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  text-decoration: none;
  color: var(--fg-dark);
}
.brand-mark { width: 30px; height: 30px; display: inline-block; }
.brand-mark svg { width: 100%; height: 100%; }
.brand-name {
  font-size: 1.05rem;
  font-weight: 500;
  letter-spacing: -0.01em;
}
.brand-name .tld { color: var(--muted-dark); font-weight: 400; }

.nav-links {
  display: flex;
  gap: clamp(1.25rem, 3vw, 2.75rem);
  margin-left: auto;
  margin-right: clamp(1.5rem, 4vw, 3.5rem);
}
.nav-links a {
  color: var(--fg-dark);
  text-decoration: none;
  font-size: 0.72rem;
  font-weight: 400;
  letter-spacing: 0.18em;
  opacity: 0.85;
  transition: opacity 0.3s var(--ease);
}
.nav-links a:hover { opacity: 1; }

.lang {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.72rem;
  letter-spacing: 0.14em;
}
.lang-btn {
  background: none; border: none; cursor: pointer;
  color: var(--dim-dark);
  font: inherit; letter-spacing: inherit;
  padding: 0.35rem 0.25rem;
  transition: color 0.3s var(--ease);
}
.lang-btn:hover { color: var(--muted-dark); }
.lang-btn.is-active { color: var(--fg-dark); font-weight: 500; }
.lang-sep { color: var(--dim-dark); }

/* ============ Hero ============ */
.hero {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 100vh;
}

.hero-text {
  background: var(--ink);
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(6rem, 12vh, 9rem) var(--pad-x) clamp(3rem, 8vh, 5rem);
}

.eyebrow {
  font-size: clamp(0.62rem, 1.1vw, 0.74rem);
  letter-spacing: 0.34em;
  color: var(--muted-dark);
  text-transform: uppercase;
  margin-bottom: clamp(1.25rem, 3vh, 2rem);
  animation: rise 0.9s var(--ease) both;
}

.hero-title {
  font-size: clamp(2.8rem, 6vw, 5.5rem);
  font-weight: 300;
  line-height: 1.02;
  letter-spacing: -0.02em;
  color: #fff;
  animation: rise 0.9s var(--ease) 0.08s both;
}
body.lang-jp .hero-title { font-weight: 400; letter-spacing: 0; line-height: 1.18; }

.hero-sub {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-top: clamp(1.5rem, 3.5vh, 2.5rem);
  color: var(--muted-dark);
  font-size: clamp(0.92rem, 1.5vw, 1.1rem);
  font-weight: 300;
  animation: rise 0.9s var(--ease) 0.16s both;
}
.dash { width: 32px; height: 1px; background: var(--dim-dark); flex-shrink: 0; }

.hero-meta {
  display: flex;
  align-items: flex-start;
  gap: 0.7rem;
  margin-top: clamp(2.5rem, 6vh, 4rem);
  color: var(--muted-dark);
  animation: rise 0.9s var(--ease) 0.24s both;
}
.pin { width: 22px; height: 22px; color: var(--muted-dark); flex-shrink: 0; margin-top: 2px; }
.pin svg { width: 100%; height: 100%; }
.hero-meta-text { display: flex; flex-direction: column; gap: 0.35rem; }
.hero-meta-text > span:first-child { color: var(--fg-dark); font-size: 0.95rem; letter-spacing: 0.02em; }
.hero-date { font-size: 0.8rem; letter-spacing: 0.3em; color: var(--muted-dark); }

.hero-media { min-height: 50vh; background-color: var(--ink); }

.media-logo {
  position: absolute;
  left: clamp(2rem, 6%, 5rem);
  bottom: clamp(2.5rem, 12%, 6rem);
  display: flex;
  flex-direction: column;
  gap: 1rem;
  z-index: 2;
}
.glow-mark {
  width: 54px; height: 54px;
  color: #fff;
  filter: drop-shadow(0 0 14px var(--glow)) drop-shadow(0 0 30px var(--glow));
  animation: flicker 5s ease-in-out infinite;
}
.glow-mark svg { width: 100%; height: 100%; }
.media-logo-text {
  font-size: clamp(1.4rem, 2.4vw, 2rem);
  font-weight: 400;
  line-height: 1.05;
  color: #fff;
  text-shadow: 0 2px 24px rgba(0, 0, 0, 0.6);
}
.media-logo-text .tld { color: var(--muted-dark); }

/* ============ About ============ */
.about {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  background: var(--ink-2);
  color: var(--fg-dark);
  border-top: 1px solid var(--line-dark);
}
.about-text {
  padding: clamp(3.5rem, 9vh, 7rem) var(--pad-x);
  display: flex;
  flex-direction: column;
}
.label {
  font-size: 0.68rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--muted-dark);
  margin-bottom: 1.5rem;
}
.about-title {
  font-size: clamp(1.7rem, 3vw, 2.6rem);
  font-weight: 300;
  line-height: 1.15;
  letter-spacing: -0.015em;
  max-width: 16ch;
  color: #fff;
}
body.lang-jp .about-title { font-weight: 400; line-height: 1.4; max-width: 24ch; }
.about-sub {
  margin-top: 1.25rem;
  font-size: clamp(1rem, 1.6vw, 1.2rem);
  color: var(--accent);
  font-weight: 300;
}
.about-body {
  margin-top: 1.25rem;
  max-width: 46ch;
  color: var(--muted-dark);
  font-size: 0.95rem;
  line-height: 1.8;
}

.features {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: clamp(1.5rem, 2.5vw, 2.25rem);
  margin-top: clamp(2.5rem, 6vh, 4rem);
}
.features li {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}
.feat-icon {
  width: 24px; height: 24px;
  color: var(--accent);
  opacity: 0.9;
  margin-bottom: clamp(1.5rem, 3vw, 2.25rem);
}
.feat-icon svg { width: 100%; height: 100%; }
.feat-en {
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  color: var(--fg-dark);
  line-height: 1.35;
  min-height: 2.7em;          /* reserve two lines so titles + labels align */
  margin-bottom: 0.4rem;
}
.feat-jp { font-size: 0.72rem; color: var(--dim-dark); line-height: 1.4; }

.about-media { min-height: 360px; background-color: var(--ink-2); }

/* ============ Stay updated ============ */
.updated {
  display: grid;
  grid-template-columns: 1fr 1fr;
  background:
    radial-gradient(90% 120% at 0% 100%, rgba(120, 150, 220, 0.08) 0%, transparent 55%),
    var(--ink);
  border-top: 1px solid var(--line-dark);
}
.updated .label { color: var(--muted-dark); }
.updated-text {
  padding: clamp(3.5rem, 9vh, 7rem) var(--pad-x);
  display: flex;
  flex-direction: column;
}
.updated-title {
  font-size: clamp(1.8rem, 3vw, 2.8rem);
  font-weight: 300;
  letter-spacing: -0.015em;
  color: #fff;
}
body.lang-jp .updated-title { font-weight: 400; }
.updated-body {
  margin-top: 1rem;
  color: var(--muted-dark);
  font-size: 0.98rem;
  max-width: 42ch;
}

/* signup */
.signup { margin-top: clamp(2rem, 5vh, 3rem); width: min(100%, 460px); }
.field {
  display: flex;
  border: 1px solid var(--line-dark);
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.02);
  overflow: hidden;
  transition: border-color 0.3s var(--ease), box-shadow 0.3s var(--ease);
}
.field:focus-within {
  border-color: rgba(255, 255, 255, 0.4);
  box-shadow: 0 0 32px rgba(120, 160, 255, 0.1);
}
.field input {
  flex: 1; min-width: 0;
  background: none; border: none; outline: none;
  color: var(--fg-dark);
  font-family: inherit; font-size: 0.9rem;
  padding: 0 1.1rem;
}
.field input::placeholder { color: var(--dim-dark); }
.field button {
  flex-shrink: 0;
  background: #fff; color: #000; border: none; cursor: pointer;
  font-family: inherit; font-size: 0.72rem; font-weight: 500;
  letter-spacing: 0.16em;
  padding: 1rem 1.6rem;
  transition: background 0.3s var(--ease);
}
.field button:hover { background: var(--muted-dark); color: #fff; }
.form-note {
  margin-top: 0.85rem; min-height: 1.1em;
  font-size: 0.74rem; letter-spacing: 0.04em; color: var(--dim-dark);
}
.form-note.is-success { color: #84d6a6; }
.form-note.is-error { color: #e58a8a; }

.socials { display: flex; gap: 1.1rem; margin-top: clamp(2rem, 5vh, 3rem); }
.socials a {
  width: 38px; height: 38px;
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--line-dark);
  border-radius: 4px;
  color: var(--muted-dark);
  transition: color 0.3s var(--ease), border-color 0.3s var(--ease), transform 0.3s var(--ease);
}
.socials a svg { width: 17px; height: 17px; }
.socials a:hover { color: #fff; border-color: rgba(255,255,255,0.4); transform: translateY(-2px); }

.updated-media {
  min-height: 360px;
  background-color: var(--ink);
  background-size: contain;        /* show the whole robot, head included */
  background-position: left bottom;
}
.media-caption {
  position: absolute;
  right: clamp(2rem, 8%, 5rem);
  top: 50%;
  transform: translateY(-50%);
  text-align: right;
  z-index: 2;
  display: flex; flex-direction: column; align-items: flex-end; gap: 1.4rem;
}
.cap-eyebrow { font-size: 0.74rem; letter-spacing: 0.26em; color: var(--fg-dark); line-height: 1.7; }
.cap-rule { width: 40px; height: 1px; background: var(--dim-dark); }
.cap-stack { font-size: clamp(0.95rem, 1.6vw, 1.25rem); letter-spacing: 0.18em; color: var(--muted-dark); line-height: 1.9; font-weight: 300; }
.cap-soon { font-size: 0.7rem; letter-spacing: 0.24em; color: var(--dim-dark); line-height: 1.8; }

/* ============ Footer ============ */
.footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  padding: clamp(1.5rem, 3vh, 2rem) var(--pad-x);
  background: var(--ink);
  border-top: 1px solid var(--line-dark);
  font-size: 0.68rem;
  letter-spacing: 0.06em;
  color: var(--dim-dark);
}
.foot-links { display: flex; gap: 1.5rem; }
.foot-links a {
  color: var(--dim-dark);
  text-decoration: none;
  letter-spacing: 0.16em;
  transition: color 0.3s var(--ease);
}
.foot-links a:hover { color: var(--muted-dark); }

/* ============ Animations ============ */
@keyframes rise {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes flicker {
  0%, 100% { opacity: 1; }
  92% { opacity: 1; }
  94% { opacity: 0.55; }
  96% { opacity: 1; }
}

/* ============ Responsive ============ */
@media (max-width: 900px) {
  .nav-links { display: none; }
  .hero, .about, .updated { grid-template-columns: 1fr; }
  .hero { min-height: auto; }
  .hero-text { padding-top: clamp(6rem, 16vh, 9rem); padding-bottom: 3rem; }
  .about { display: flex; flex-direction: column; }

  /* Portrait cutout robots: show the whole figure instead of cropping it. */
  .hero-media, .updated-media {
    order: 2;
    min-height: 68vh;
    background-size: contain;
    background-position: center bottom;
  }
  .about-media { order: -1; min-height: 56vw; }

  /* stacked: dissolve the horizontal seam instead of the vertical one */
  .hero-media .media-scrim {
    background:
      linear-gradient(180deg, var(--ink) 0%, rgba(10, 10, 11, 0.55) 12%, transparent 38%),
      linear-gradient(0deg, rgba(10, 10, 11, 0.6) 0%, transparent 26%);
  }
  .updated-media .media-scrim {
    background:
      linear-gradient(180deg, var(--ink) 0%, rgba(10, 10, 11, 0.5) 12%, transparent 34%),
      linear-gradient(0deg, rgba(10, 10, 11, 0.85) 0%, transparent 40%);
  }
  .about-media .media-scrim {
    background:
      linear-gradient(0deg, var(--ink-2) 0%, rgba(19, 19, 22, 0.55) 12%, transparent 38%),
      linear-gradient(180deg, rgba(19, 19, 22, 0.45) 0%, transparent 28%);
  }

  .media-logo { left: var(--pad-x); bottom: 1.75rem; }

  /* Stay-updated caption sits cleanly at the bottom over the robot's legs */
  .updated-media { display: flex; flex-direction: column; justify-content: flex-end; }
  .media-caption {
    position: static;
    transform: none;
    text-align: left;
    align-items: flex-start;
    gap: 1rem;
    padding: 2rem var(--pad-x);
  }

  .features { grid-template-columns: repeat(2, 1fr); gap: 2rem 1.75rem; }
}

@media (max-width: 600px) {
  .hero-title { font-size: clamp(2.4rem, 11vw, 3.4rem); }
  .about-title { font-size: clamp(1.55rem, 7vw, 2.1rem); }
  .updated-title { font-size: clamp(1.6rem, 7.5vw, 2.2rem); }
  .hero-media, .updated-media { min-height: 56vh; }
  .features { grid-template-columns: 1fr; gap: 1.75rem; }
  .feat-en { min-height: 0; }
  .nav { gap: 1rem; }
  .brand-name { font-size: 0.98rem; }
}

@media (max-width: 540px) {
  .field { flex-direction: column; }
  .field input { padding: 0.95rem 1.1rem; }
  .field button { width: 100%; padding: 0.95rem; }
  .footer { justify-content: center; text-align: center; }
  .foot-links { justify-content: center; flex-wrap: wrap; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  html { scroll-behavior: auto; }
}
