/* Gemnova website. System fonts only, no external resources. Light + dark via prefers-color-scheme. */

:root {
  color-scheme: light dark;

  --bg: #f6f4ff;
  --glow-a: rgb(124 77 255 / 0.17);
  --glow-b: rgb(255 95 208 / 0.11);
  --glow-c: rgb(39 211 242 / 0.11);
  --surface: rgb(255 255 255 / 0.8);
  --surface-solid: #ffffff;
  --surface-muted: rgb(98 54 240 / 0.05);
  --border: rgb(76 52 180 / 0.14);
  --border-strong: rgb(76 52 180 / 0.3);
  --text: #1a1540;
  --text-muted: #4d4777;
  --heading: #120d3a;
  --accent: #6236f0;
  --accent-hover: #4f23d9;
  --link: #5427e0;
  --pink: #b8237f;
  --cyan: #0a779c;
  --focus: #e0379f;
  --badge-bg: #16113d;
  --badge-fg: #ffffff;
  --success: #0b7549;
  --success-bg: #e2f7ec;
  --danger: #b0213d;
  --danger-bg: #fde9ed;
  --shadow: 0 1px 2px rgb(22 18 58 / 0.05), 0 16px 40px -18px rgb(76 52 180 / 0.28);
  --art-shadow: rgb(98 54 240 / 0.32);

  --radius: 22px;
  --radius-sm: 14px;
  --page: 70rem;
  --measure: 46rem;
  --gutter: clamp(16px, 4vw, 32px);
  --font: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans",
    "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic UI", "Yu Gothic", Meiryo, sans-serif, "Apple Color Emoji",
    "Segoe UI Emoji";
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0a0b24;
    --glow-a: rgb(124 77 255 / 0.28);
    --glow-b: rgb(255 95 208 / 0.12);
    --glow-c: rgb(39 211 242 / 0.1);
    --surface: rgb(24 20 68 / 0.72);
    --surface-solid: #151238;
    --surface-muted: rgb(255 255 255 / 0.045);
    --border: rgb(170 150 255 / 0.18);
    --border-strong: rgb(170 150 255 / 0.36);
    --text: #ebe8ff;
    --text-muted: #b5aee0;
    --heading: #ffffff;
    --accent: #9b7bff;
    --accent-hover: #b39cff;
    --link: #bfaaff;
    --pink: #ff86dc;
    --cyan: #6fe4fa;
    --focus: #ff86dc;
    --badge-bg: #ffffff;
    --badge-fg: #120d3a;
    --success: #5ce6a8;
    --success-bg: rgb(47 224 138 / 0.12);
    --danger: #ff9bb0;
    --danger-bg: rgb(255 95 130 / 0.13);
    --shadow: 0 1px 2px rgb(0 0 0 / 0.3), 0 20px 50px -24px rgb(0 0 0 / 0.7);
    --art-shadow: rgb(124 77 255 / 0.45);
  }
}

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

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

html {
  background: var(--bg);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  color: var(--text);
  font: 400 1rem/1.65 var(--font);
  -webkit-font-smoothing: antialiased;
  overflow-wrap: break-word;
}

/* Soft nebula glows; stars are added in dark mode. Fixed layers, so they never repaint on scroll. */
body::before,
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
}

body::before {
  background:
    radial-gradient(52rem 34rem at 8% -8%, var(--glow-a), transparent 70%),
    radial-gradient(44rem 30rem at 100% 4%, var(--glow-b), transparent 70%),
    radial-gradient(50rem 34rem at 60% 115%, var(--glow-c), transparent 70%);
}

@media (prefers-color-scheme: dark) {
  /* A faint star field, strongest at the edges so it never sits visibly behind text. */
  body::after {
    opacity: 0.4;
    background-image:
      radial-gradient(circle at 22px 38px, rgb(255 255 255 / 0.9) 0 0.8px, transparent 1.3px),
      radial-gradient(circle at 131px 92px, rgb(255 255 255 / 0.7) 0 0.6px, transparent 1.1px),
      radial-gradient(circle at 250px 21px, rgb(214 200 255 / 0.9) 0 0.9px, transparent 1.4px),
      radial-gradient(circle at 318px 160px, rgb(255 255 255 / 0.6) 0 0.6px, transparent 1.1px),
      radial-gradient(circle at 76px 220px, rgb(191 233 255 / 0.8) 0 0.8px, transparent 1.3px),
      radial-gradient(circle at 196px 286px, rgb(255 255 255 / 0.75) 0 0.7px, transparent 1.2px),
      radial-gradient(circle at 352px 330px, rgb(255 214 244 / 0.8) 0 0.8px, transparent 1.3px);
    background-size: 380px 380px;
    -webkit-mask-image: radial-gradient(ellipse 70% 65% at 50% 45%, transparent 35%, #000 100%);
    mask-image: radial-gradient(ellipse 70% 65% at 50% 45%, transparent 35%, #000 100%);
  }
}

img,
svg {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: var(--link);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

a:hover {
  text-decoration-thickness: 2px;
}

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

h1,
h2,
h3 {
  color: var(--heading);
  line-height: 1.25;
  letter-spacing: -0.01em;
  text-wrap: balance;
}

p,
li {
  text-wrap: pretty;
}

strong {
  font-weight: 650;
  color: var(--heading);
}

.skip-link {
  position: absolute;
  left: 12px;
  top: -100px;
  z-index: 10;
  padding: 10px 16px;
  border-radius: 10px;
  background: var(--surface-solid);
  color: var(--heading);
  font-weight: 600;
  box-shadow: var(--shadow);
}

.skip-link:focus {
  top: 12px;
}

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

/* ---- Layout -------------------------------------------------------------------------------- */

.wrap {
  width: 100%;
  max-width: calc(var(--page) + 2 * var(--gutter));
  margin-inline: auto;
  padding-inline: max(var(--gutter), env(safe-area-inset-left)) max(var(--gutter), env(safe-area-inset-right));
}

main {
  flex: 1;
  padding-block: clamp(16px, 4vw, 40px) clamp(40px, 8vw, 88px);
}

.site-header .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 20px;
  padding-block: 18px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--heading);
  font-weight: 750;
  font-size: 1.125rem;
  letter-spacing: -0.01em;
  text-decoration: none;
}

.brand img {
  width: 34px;
  height: 34px;
  filter: drop-shadow(0 4px 10px rgb(98 54 240 / 0.35));
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 2px;
}

.site-nav a {
  padding: 7px 12px;
  border-radius: 999px;
  color: var(--text-muted);
  font-weight: 550;
  font-size: 0.95rem;
  text-decoration: none;
}

.site-nav a:hover {
  color: var(--heading);
  background: var(--surface-muted);
}

.site-nav a[aria-current="page"] {
  color: var(--heading);
  background: var(--surface-muted);
  box-shadow: inset 0 0 0 1px var(--border);
}

.site-footer {
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.9rem;
}

.site-footer .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 24px;
  padding-block: 24px max(28px, env(safe-area-inset-bottom));
}

.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 18px;
}

.site-footer a {
  color: var(--text-muted);
}

.site-footer a:hover {
  color: var(--heading);
}

.site-footer p {
  margin: 0;
}

/* ---- Components ---------------------------------------------------------------------------- */

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.eyebrow {
  margin: 0 0 6px;
  color: var(--accent);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.gradient-text {
  background: linear-gradient(100deg, var(--accent) 0%, var(--pink) 55%, var(--cyan) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 12px 26px;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(135deg, #7c4dff 0%, #5a2ee6 60%, #4a22cc 100%);
  color: #ffffff;
  font: 650 1rem/1.2 var(--font);
  text-decoration: none;
  cursor: pointer;
  box-shadow: 0 10px 24px -10px rgb(98 54 240 / 0.8), inset 0 1px 0 rgb(255 255 255 / 0.25);
  transition:
    transform 0.15s ease,
    box-shadow 0.15s ease,
    filter 0.15s ease;
}

.button:hover {
  filter: brightness(1.08);
  box-shadow: 0 14px 28px -10px rgb(98 54 240 / 0.9), inset 0 1px 0 rgb(255 255 255 / 0.25);
}

.button:active {
  transform: translateY(1px);
}

.button:disabled {
  cursor: default;
  filter: saturate(0.4);
  opacity: 0.7;
  box-shadow: none;
}

/* Language switcher */
.lang-switch {
  display: inline-flex;
  gap: 2px;
  padding: 3px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
}

.lang-switch a {
  padding: 5px 14px;
  border-radius: 999px;
  color: var(--text-muted);
  font-size: 0.875rem;
  font-weight: 600;
  text-decoration: none;
}

.lang-switch a:hover {
  color: var(--heading);
}

.lang-switch a[aria-current="page"] {
  background: linear-gradient(135deg, #7c4dff, #5a2ee6);
  color: #ffffff;
}

/* Gem bullets */
.gem-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.gem-list li {
  position: relative;
  padding-left: 1.6em;
}

.gem-list li + li {
  margin-top: 0.6em;
}

.gem-list li::before {
  content: "";
  position: absolute;
  left: 0.2em;
  top: 0.5em;
  width: 0.6em;
  height: 0.6em;
  border-radius: 2px;
  background: linear-gradient(135deg, #c3aaff, #7c4dff 55%, #4f26d6);
  transform: rotate(45deg);
  box-shadow: 0 0 10px rgb(124 77 255 / 0.55);
}

/* ---- Landing page -------------------------------------------------------------------------- */

.hero {
  display: grid;
  align-items: center;
  gap: clamp(28px, 6vw, 72px);
  padding-block: clamp(8px, 3vw, 32px) clamp(32px, 6vw, 64px);
}

@media (min-width: 860px) {
  .hero {
    grid-template-columns: 1.1fr 0.9fr;
  }
}

.hero h1 {
  margin: 0;
  font-size: clamp(3rem, 11vw, 5.5rem);
  font-weight: 850;
  line-height: 1;
  letter-spacing: -0.035em;
}

.hero .subtitle {
  margin: 10px 0 0;
  color: var(--heading);
  font-size: clamp(1.25rem, 3.2vw, 1.6rem);
  font-weight: 650;
  letter-spacing: -0.01em;
}

.hero .pitch {
  max-width: 34rem;
  margin: 18px 0 0;
  color: var(--text-muted);
  font-size: clamp(1.05rem, 2.2vw, 1.2rem);
}

.stores {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
}

.store-badge {
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  min-width: 170px;
  min-height: 56px;
  padding: 8px 22px;
  border-radius: 14px;
  background: var(--badge-bg);
  color: var(--badge-fg);
  line-height: 1.15;
  text-decoration: none;
  box-shadow: var(--shadow);
  transition: transform 0.15s ease;
}

.store-badge:hover {
  transform: translateY(-2px);
}

.store-badge small {
  font-size: 0.72rem;
  font-weight: 500;
  opacity: 0.8;
}

.store-badge span {
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.hero .note {
  margin: 16px 0 0;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.hero-art {
  justify-self: center;
  width: min(100%, 400px);
}

.hero-art img {
  width: 100%;
  filter: drop-shadow(0 28px 44px var(--art-shadow));
}

@media (prefers-reduced-motion: no-preference) {
  .hero-art img {
    animation: float 7s ease-in-out infinite;
  }

  @keyframes float {
    50% {
      transform: translateY(-8px);
    }
  }
}

.features {
  display: grid;
  gap: 16px;
  margin: 0;
  padding: 0;
  list-style: none;
}

@media (min-width: 720px) {
  .features {
    grid-template-columns: repeat(3, 1fr);
  }
}

.feature {
  padding: 24px;
}

.feature h2 {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 8px;
  font-size: 1.1rem;
}

.feature h2::before {
  content: "";
  flex: none;
  width: 14px;
  height: 14px;
  border-radius: 3px;
  background: linear-gradient(135deg, var(--gem-light, #c3aaff), var(--gem, #7c4dff) 55%, var(--gem-dark, #4f26d6));
  transform: rotate(45deg);
  box-shadow: 0 0 14px var(--gem, #7c4dff);
}

.feature:nth-child(2) {
  --gem-light: #ffb0ea;
  --gem: #ff5fd0;
  --gem-dark: #c42a93;
}

.feature:nth-child(3) {
  --gem-light: #a5f3ff;
  --gem: #27d3f2;
  --gem-dark: #0b86b8;
}

.feature p {
  margin: 0;
  color: var(--text-muted);
}

/* ---- Documents (privacy, terms, support) ---------------------------------------------------- */

.doc {
  max-width: calc(var(--measure) + 2 * var(--gutter));
}

.doc-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px 24px;
  margin-bottom: 24px;
}

.doc-head h1 {
  margin: 0;
  font-size: clamp(2rem, 6vw, 2.75rem);
  font-weight: 800;
  letter-spacing: -0.025em;
}

.doc-head .meta {
  margin: 8px 0 0;
  color: var(--text-muted);
  font-size: 0.95rem;
}

.lead {
  margin: 0 0 24px;
  color: var(--text-muted);
  font-size: 1.1rem;
}

.summary,
.toc {
  margin-bottom: 20px;
  padding: 22px clamp(20px, 4vw, 30px);
}

.summary h2,
.toc h2 {
  margin: 0 0 14px;
  font-size: 1rem;
  letter-spacing: 0.02em;
}

.toc ol {
  margin: 0;
  padding-left: 1.4em;
  columns: 2 16rem;
  column-gap: 32px;
}

.toc li {
  break-inside: avoid;
  padding-block: 2px;
}

.toc a {
  text-decoration: none;
}

.toc a:hover {
  text-decoration: underline;
}

.prose {
  padding: clamp(22px, 5vw, 44px);
}

.prose > :first-child {
  margin-top: 0;
}

.prose > :last-child {
  margin-bottom: 0;
}

.prose h2 {
  margin: 2.2em 0 0.6em;
  font-size: 1.3rem;
  scroll-margin-top: 20px;
}

.prose h3 {
  margin: 1.6em 0 0.5em;
  font-size: 1.05rem;
  scroll-margin-top: 20px;
}

.prose p,
.prose ul,
.prose ol {
  margin: 0 0 1em;
}

.prose ul,
.prose ol {
  padding-left: 1.4em;
}

.prose li + li {
  margin-top: 0.4em;
}

.prose li::marker {
  color: var(--accent);
}

.prose .gem-list {
  padding-left: 0;
}

.prose hr {
  margin: 2.4em 0;
  border: 0;
  border-top: 1px solid var(--border);
}

.note-box {
  margin: 1.2em 0;
  padding: 14px 18px;
  border-left: 3px solid var(--accent);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  background: var(--surface-muted);
}

.note-box > :last-child {
  margin-bottom: 0;
}

/* Recipient cards (external transmission disclosure) */
.recipients {
  display: grid;
  gap: 14px;
  margin: 1.2em 0;
}

.recipient {
  padding: 18px 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface-muted);
}

.recipient h4 {
  margin: 0 0 10px;
  color: var(--heading);
  font-size: 1rem;
}

.recipient dl {
  display: grid;
  gap: 8px;
  margin: 0;
}

.recipient dt {
  color: var(--accent);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.recipient dd {
  margin: 0 0 4px;
}

:lang(ja) .recipient dt,
:lang(ja) .eyebrow {
  letter-spacing: 0.04em;
  text-transform: none;
}

.address {
  font-style: normal;
}

/* ---- Support: FAQ and contact form ---------------------------------------------------------- */

.section-title {
  margin: 44px 0 16px;
  font-size: 1.5rem;
  scroll-margin-top: 20px;
}

.faq {
  display: grid;
  gap: 10px;
}

.faq details {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  box-shadow: 0 1px 2px rgb(22 18 58 / 0.04);
}

.faq details[open] {
  border-color: var(--border-strong);
}

.faq summary {
  position: relative;
  padding: 16px 52px 16px 20px;
  color: var(--heading);
  font-weight: 650;
  list-style: none;
  cursor: pointer;
  border-radius: var(--radius-sm);
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary::after {
  content: "";
  position: absolute;
  right: 22px;
  top: 50%;
  width: 9px;
  height: 9px;
  border-right: 2px solid var(--accent);
  border-bottom: 2px solid var(--accent);
  transform: translateY(-70%) rotate(45deg);
  transition: transform 0.2s ease;
}

.faq details[open] summary::after {
  transform: translateY(-25%) rotate(225deg);
}

.faq .answer {
  padding: 0 20px 18px;
  color: var(--text);
}

.faq .answer p {
  margin: 0 0 0.8em;
}

.faq .answer > :last-child {
  margin-bottom: 0;
}

.contact {
  margin-top: 44px;
  padding: clamp(22px, 5vw, 36px);
  scroll-margin-top: 20px;
}

.contact h2 {
  margin: 0 0 8px;
  font-size: 1.5rem;
}

.contact .intro {
  margin: 0 0 22px;
  color: var(--text-muted);
}

.field {
  margin-bottom: 20px;
}

.field label {
  display: block;
  margin-bottom: 6px;
  color: var(--heading);
  font-weight: 650;
}

.field .optional,
.field .hint {
  color: var(--text-muted);
  font-weight: 400;
}

.field .hint {
  display: block;
  margin-top: 6px;
  font-size: 0.875rem;
}

.field-footer {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.counter {
  margin-top: 6px;
  color: var(--text-muted);
  font-size: 0.8rem;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

input[type="email"],
textarea {
  display: block;
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--border-strong);
  border-radius: 12px;
  background: var(--surface-solid);
  color: var(--text);
  font: inherit;
  transition:
    border-color 0.15s ease,
    box-shadow 0.15s ease;
}

textarea {
  min-height: 11rem;
  resize: vertical;
}

input[type="email"]:focus,
textarea:focus {
  border-color: var(--accent);
  outline: none;
  box-shadow: 0 0 0 4px rgb(124 77 255 / 0.22);
}

input::placeholder,
textarea::placeholder {
  color: var(--text-muted);
  opacity: 0.75;
}

/* Honeypot: invisible to people and assistive technology, still present for naive bots. */
.hp-field {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.form-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px 20px;
}

.form-status {
  flex: 1 1 16rem;
  margin: 0;
  font-weight: 550;
}

.form-status:empty {
  display: none;
}

.form-status[data-state="success"],
.form-status[data-state="error"] {
  padding: 10px 14px;
  border-radius: 12px;
}

.form-status[data-state="success"] {
  background: var(--success-bg);
  color: var(--success);
}

.form-status[data-state="error"] {
  background: var(--danger-bg);
  color: var(--danger);
}

.form-status[data-state="pending"] {
  color: var(--text-muted);
}

.privacy-note {
  margin: 20px 0 0;
  color: var(--text-muted);
  font-size: 0.875rem;
}

.noscript {
  margin: 0 0 20px;
  padding: 12px 16px;
  border-radius: 12px;
  background: var(--danger-bg);
  color: var(--danger);
}

/* ---- 404 ----------------------------------------------------------------------------------- */

.not-found {
  max-width: 34rem;
  margin: clamp(24px, 8vw, 80px) auto 0;
  text-align: center;
}

.not-found img {
  width: 72px;
  height: 72px;
  margin: 0 auto 20px;
}

.not-found h1 {
  margin: 0 0 12px;
  font-size: clamp(1.8rem, 6vw, 2.4rem);
}

.not-found p {
  margin: 0 0 24px;
  color: var(--text-muted);
}

/* ---- Accessibility & print ------------------------------------------------------------------ */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition: none !important;
    animation: none !important;
  }
}

@media (forced-colors: active) {
  .gradient-text {
    background: none;
    color: CanvasText;
  }

  .lang-switch a[aria-current="page"] {
    border: 1px solid CanvasText;
  }
}

@media print {
  body::before,
  body::after,
  .site-nav,
  .lang-switch,
  .toc,
  .skip-link {
    display: none !important;
  }

  html,
  body {
    background: #ffffff;
    color: #000000;
  }

  .card {
    border: 0;
    box-shadow: none;
    background: none;
  }

  .prose {
    padding: 0;
  }

  a {
    color: inherit;
  }
}
