:root {
  --bg: #0c0c0e;
  --bg-elevated: #141416;
  --bg-card: #161618;
  --border: rgba(255, 255, 255, 0.08);
  --border-soft: rgba(255, 255, 255, 0.05);
  --text: #f4f4f5;
  --muted: #a1a1aa;
  --faint: #71717a;
  --blue: #2f62ff;
  --ease: cubic-bezier(0.25, 0.1, 0.25, 1);
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 5rem;
}

body {
  font-family: "Poppins", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  min-height: 100vh;
}

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button { font: inherit; }

.wrap {
  width: min(980px, calc(100% - 2.5rem));
  margin-inline: auto;
}

.wrap--narrow {
  width: min(720px, calc(100% - 2.5rem));
}

/* Floating glass nav */
.nav-shell {
  position: fixed;
  top: 1rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 50;
  width: min(780px, calc(100% - 1.25rem));
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.45rem 0.5rem 0.45rem 0.9rem;
  border-radius: 999px;
  background: rgba(18, 18, 20, 0.72);
  border: 1px solid var(--border);
  backdrop-filter: blur(20px) saturate(1.2);
  -webkit-backdrop-filter: blur(20px) saturate(1.2);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

.nav__brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--text);
  white-space: nowrap;
}

.nav__mark {
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 50%;
  object-fit: cover;
}

.nav__tabs {
  display: flex;
  gap: 0.15rem;
  padding: 0.15rem;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid var(--border-soft);
  flex-wrap: wrap;
  justify-content: center;
}

.nav__tab {
  border: 0;
  background: transparent;
  color: var(--faint);
  font-size: 0.7rem;
  font-weight: 500;
  padding: 0.4rem 0.7rem;
  border-radius: 999px;
  cursor: pointer;
  transition: color 0.2s var(--ease), background 0.2s var(--ease);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
}

.nav__tab:hover { color: var(--text); text-decoration: none; }

.nav__tab.is-active {
  color: var(--text);
  background: rgba(255, 255, 255, 0.08);
}

.nav__cta {
  display: inline-flex;
  align-items: center;
  padding: 0.42rem 0.85rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 0.7rem;
  font-weight: 500;
  transition: background 0.2s var(--ease), border-color 0.2s var(--ease);
  white-space: nowrap;
}

.nav__cta:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.14);
  text-decoration: none;
}

.nav__cta.is-signed-in {
  border-color: rgba(255, 255, 255, 0.12);
}

@media (max-width: 720px) {
  .nav__brand span { display: none; }
  .nav__tab { padding-inline: 0.45rem; font-size: 0.62rem; }
}

/* Type */
.label {
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--blue);
  margin-bottom: 1rem;
}

h1 {
  font-size: clamp(2.2rem, 5vw, 3.5rem);
  font-weight: 500;
  letter-spacing: -0.035em;
  line-height: 1.08;
  margin-bottom: 1rem;
}

h1 em {
  font-style: normal;
  color: var(--muted);
  font-weight: 400;
}

h2 {
  font-size: clamp(1.5rem, 3vw, 2.1rem);
  font-weight: 500;
  letter-spacing: -0.03em;
  line-height: 1.15;
  margin-bottom: 0.65rem;
}

h3 {
  font-size: 0.95rem;
  font-weight: 500;
  margin-bottom: 0.35rem;
  letter-spacing: -0.01em;
}

.lead {
  font-size: 1.05rem;
  font-weight: 400;
  color: var(--muted);
  max-width: 34rem;
  line-height: 1.6;
  margin-bottom: 1.5rem;
}

.muted { color: var(--muted); }
.faint { color: var(--faint); font-size: 0.9rem; }

/* Buttons */
.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-bottom: 1.25rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.65rem;
  padding: 0.6rem 1.15rem;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 500;
  border: 1px solid transparent;
  transition: background 0.2s var(--ease), border-color 0.2s var(--ease);
}

/* Product CTAs — Tenkura Blue */
.btn--solid,
.btn--blue {
  background: var(--blue);
  color: #fff;
  border-color: transparent;
}

.btn--solid:hover,
.btn--blue:hover {
  background: #3d6fff;
  text-decoration: none;
}

.btn--line {
  background: transparent;
  border-color: var(--border);
  color: var(--text);
}

.btn--line:hover {
  border-color: rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.03);
  text-decoration: none;
}

/* Forms (account / contact) */
.form-card {
  max-width: 420px;
  margin: 0 auto;
  padding: 1.75rem 1.5rem;
  border-radius: 1.15rem;
  background: var(--bg-card);
  border: 1px solid var(--border-soft);
}

.form-card label {
  display: block;
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--faint);
  margin-bottom: 0.4rem;
}

.form-card .field {
  margin-bottom: 1rem;
}

.form-card input,
.form-card textarea {
  width: 100%;
  padding: 0.75rem 0.9rem;
  border-radius: 0.65rem;
  border: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.25);
  color: var(--text);
  font: inherit;
  font-size: 0.9rem;
  outline: none;
  transition: border-color 0.2s var(--ease);
}

.form-card input:focus,
.form-card textarea:focus {
  border-color: rgba(255, 255, 255, 0.2);
}

.form-card textarea {
  min-height: 8rem;
  resize: vertical;
}

.form-error {
  display: none;
  font-size: 0.85rem;
  color: #f87171;
  background: rgba(248, 113, 113, 0.08);
  border: 1px solid rgba(248, 113, 113, 0.2);
  border-radius: 0.65rem;
  padding: 0.65rem 0.85rem;
  margin-bottom: 1rem;
}

.form-error.is-visible { display: block; }

.form-success {
  display: none;
  font-size: 0.9rem;
  color: var(--muted);
  text-align: center;
  padding: 1rem 0;
}

.form-success.is-visible { display: block; }

.form-footer {
  margin-top: 1rem;
  text-align: center;
  font-size: 0.85rem;
  color: var(--faint);
}

.form-footer button {
  background: none;
  border: 0;
  color: var(--blue);
  cursor: pointer;
  font: inherit;
  font-weight: 500;
  padding: 0;
}

.form-footer button:hover { text-decoration: underline; }

.account-panel {
  max-width: 480px;
  margin: 0 auto;
  padding: 1.75rem 1.5rem;
  border-radius: 1.15rem;
  background: var(--bg-card);
  border: 1px solid var(--border-soft);
}

.account-panel h2 {
  font-size: 1.25rem;
  margin-bottom: 0.35rem;
}

.account-row {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--border-soft);
  font-size: 0.9rem;
}

.account-row:last-of-type { border-bottom: 0; }

.account-row span:first-child { color: var(--faint); }
.account-row span:last-child {
  color: var(--text);
  text-align: right;
  word-break: break-all;
}

.account-apps {
  display: grid;
  gap: 0.65rem;
  margin: 1.25rem 0;
}

.account-apps a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.85rem 1rem;
  border-radius: 0.75rem;
  border: 1px solid var(--border-soft);
  background: rgba(0, 0, 0, 0.2);
  font-size: 0.9rem;
  font-weight: 500;
  transition: border-color 0.2s var(--ease), background 0.2s var(--ease);
}

.account-apps a:hover {
  border-color: rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.04);
  text-decoration: none;
}

.account-apps .tag {
  font-size: 0.7rem;
  font-weight: 500;
  color: var(--faint);
}

.meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1.25rem;
  font-size: 0.8rem;
  color: var(--faint);
}

/* Page shells */
.page {
  padding: 7rem 0 4rem;
}

.page-hero {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 2.5rem;
  align-items: center;
  margin-bottom: 3.5rem;
}

@media (max-width: 800px) {
  .page-hero {
    grid-template-columns: 1fr;
  }
  .page-hero__visual { order: -1; max-width: 180px; margin-inline: auto; }
}

.page-hero__visual img,
.page-hero__visual .mark-circle {
  width: min(100%, 200px);
  aspect-ratio: 1;
  border-radius: 50%;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.45);
}

.mark-circle {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-elevated);
  border: 1px solid var(--border-soft);
  font-size: 1.75rem;
  font-weight: 500;
  letter-spacing: -0.03em;
}

.section {
  padding: 2.5rem 0;
  border-top: 1px solid var(--border-soft);
}

.section-intro {
  color: var(--muted);
  font-size: 1rem;
  max-width: 36rem;
  margin-bottom: 1.5rem;
  line-height: 1.6;
}

.cards {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
}

@media (max-width: 640px) {
  .cards { grid-template-columns: 1fr; }
}

.cards--3 {
  grid-template-columns: repeat(3, 1fr);
}

@media (max-width: 800px) {
  .cards--3 { grid-template-columns: 1fr; }
}

.card {
  padding: 1.2rem 1.25rem;
  border-radius: 1rem;
  background: var(--bg-card);
  border: 1px solid var(--border-soft);
}

.card p {
  font-size: 0.88rem;
  color: var(--muted);
  line-height: 1.55;
}

.list {
  list-style: none;
  display: grid;
  gap: 0.5rem;
  margin: 0 0 1rem;
}

.list li {
  font-size: 0.92rem;
  color: var(--muted);
  padding-left: 0.9rem;
  position: relative;
}

.list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55rem;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--faint);
}

.badge {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--faint);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.25rem 0.65rem;
  margin-bottom: 0.85rem;
}

.note {
  font-size: 0.85rem;
  color: var(--faint);
  line-height: 1.5;
}

/* Mahjong tiles on product page */
.tiles {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 0.75rem;
  padding: 1.25rem;
}

.tile {
  width: 4.4rem;
  height: 6rem;
  border-radius: 0.45rem;
  background: linear-gradient(180deg, #323236 0%, #1e1e22 40%, #151518 100%);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow:
    0 14px 28px rgba(0, 0, 0, 0.5),
    inset 0 1px 0 rgba(255, 255, 255, 0.07);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 0.35rem 0.3rem 0.4rem;
}

.tile--mid {
  width: 5rem;
  height: 6.75rem;
  margin-bottom: 0.35rem;
}

.tile__plate {
  width: 100%;
  flex: 1;
  border-radius: 0.28rem;
  background: linear-gradient(165deg, #2c2c30 0%, #1a1a1d 100%);
  border: 1px solid rgba(255, 255, 255, 0.06);
  display: flex;
  align-items: center;
  justify-content: center;
}

.tile__plate svg {
  width: 78%;
  height: 78%;
}

.tile__sub {
  margin-top: 0.28rem;
  font-size: 0.5rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.32);
}

/* Home product panels */
.product {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.5rem;
  align-items: center;
}

.product--flip .product__visual { order: -1; }

@media (max-width: 800px) {
  .product,
  .product--flip {
    grid-template-columns: 1fr;
    gap: 1.75rem;
  }
  .product--flip .product__visual { order: 0; }
}

.product__visual {
  min-height: 17rem;
  border-radius: 1.15rem;
  background: var(--bg-elevated);
  border: 1px solid var(--border-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.product__mark {
  font-size: 3.5rem;
  font-weight: 500;
  letter-spacing: -0.04em;
  color: rgba(255, 255, 255, 0.88);
}

/* Home hero extras */
.hero {
  min-height: 100svh;
  display: flex;
  align-items: center;
  padding: 7rem 0 4.5rem;
}

.hero__inner {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 3.5rem;
  align-items: center;
}

@media (max-width: 860px) {
  .hero__inner {
    grid-template-columns: 1fr;
    gap: 2.75rem;
  }
  .hero__visual { order: -1; max-width: 200px; margin-inline: auto; }
}

.hero__icon {
  width: min(100%, 220px);
  aspect-ratio: 1;
  border-radius: 50%;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.5);
}

.section-block {
  padding: 5.5rem 0;
  border-top: 1px solid var(--border-soft);
}

.section-block--tight { padding-top: 3rem; }

footer {
  padding: 2.5rem 0 4rem;
  border-top: 1px solid var(--border-soft);
  font-size: 0.8rem;
  color: var(--faint);
}

.footer-row {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 1.75rem;
  justify-content: space-between;
  align-items: center;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1.15rem;
}

.footer-links a:hover { color: var(--text); }

.footer-links a.link-blue {
  color: var(--blue);
}

.footer-links a.link-blue:hover {
  color: #5b82ff;
}

.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.55s var(--ease), transform 0.55s var(--ease);
}

.reveal.is-in {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}
