/* MasterBrain marketing site */
:root {
  --ink: #0c1612;
  --ink-soft: #1a2e26;
  --moss: #2d5a45;
  --leaf: #3d7a5c;
  --mist: #e8f0eb;
  --paper: #f4f7f5;
  --amber: #c4782a;
  --amber-bright: #e0923a;
  --muted: #5a6e64;
  --line: rgba(12, 22, 18, 0.12);
  --glow: rgba(61, 122, 92, 0.35);
  --font-display: "Syne", system-ui, sans-serif;
  --font-body: "Source Serif 4", Georgia, serif;
  --font-ui: "DM Sans", system-ui, sans-serif;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1.125rem;
  line-height: 1.65;
  background: var(--ink);
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--leaf);
  text-underline-offset: 0.18em;
}

a:hover {
  color: var(--amber);
}

.site-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 90% 60% at 70% -10%, rgba(61, 122, 92, 0.45), transparent 55%),
    radial-gradient(ellipse 50% 40% at 10% 80%, rgba(196, 120, 42, 0.18), transparent 50%),
    radial-gradient(ellipse 40% 30% at 90% 70%, rgba(45, 90, 69, 0.35), transparent 45%),
    linear-gradient(165deg, #07110d 0%, #0c1612 40%, #13241c 100%);
}

.site-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.4;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.45'/%3E%3C/svg%3E");
  mix-blend-mode: soft-light;
}

.wrap {
  position: relative;
  z-index: 1;
  width: min(68rem, calc(100% - 2.5rem));
  margin-inline: auto;
}

/* Nav */
.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.35rem 0 0;
}

.top a {
  font-family: var(--font-ui);
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--mist);
  text-decoration: none;
}

.top a:hover {
  color: var(--amber-bright);
}

.top-links {
  display: flex;
  gap: 1.5rem;
}

/* Hero */
.hero {
  display: grid;
  min-height: calc(100vh - 4rem);
  align-content: center;
  padding: 3rem 0 4rem;
  gap: 1.75rem;
}

.brand {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(3.25rem, 9vw, 6.5rem);
  line-height: 0.92;
  letter-spacing: -0.04em;
  color: var(--paper);
  margin: 0;
  animation: rise 0.9s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.headline {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.35rem, 2.8vw, 1.85rem);
  line-height: 1.25;
  letter-spacing: -0.02em;
  color: var(--mist);
  max-width: 22ch;
  margin: 0;
  animation: rise 0.9s cubic-bezier(0.22, 1, 0.36, 1) 0.12s both;
}

.lede {
  font-size: 1.125rem;
  color: rgba(232, 240, 235, 0.78);
  max-width: 34rem;
  margin: 0;
  animation: rise 0.9s cubic-bezier(0.22, 1, 0.36, 1) 0.22s both;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  margin-top: 0.5rem;
  animation: rise 0.9s cubic-bezier(0.22, 1, 0.36, 1) 0.32s both;
}

.btn {
  font-family: var(--font-ui);
  font-size: 0.9375rem;
  font-weight: 600;
  text-decoration: none;
  padding: 0.85rem 1.35rem;
  border-radius: 0.25rem;
  transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease;
}

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

.btn-primary {
  background: var(--amber);
  color: var(--ink);
}

.btn-primary:hover {
  background: var(--amber-bright);
  color: var(--ink);
}

.btn-ghost {
  background: transparent;
  color: var(--mist);
  box-shadow: inset 0 0 0 1.5px rgba(232, 240, 235, 0.35);
}

.btn-ghost:hover {
  color: var(--paper);
  box-shadow: inset 0 0 0 1.5px var(--amber-bright);
}

.hero-visual {
  position: absolute;
  right: -4%;
  top: 12%;
  width: min(48vw, 28rem);
  height: min(48vw, 28rem);
  border-radius: 50%;
  background:
    radial-gradient(circle at 35% 35%, rgba(232, 240, 235, 0.12), transparent 45%),
    radial-gradient(circle at 65% 60%, rgba(196, 120, 42, 0.25), transparent 40%),
    radial-gradient(circle at 50% 50%, rgba(61, 122, 92, 0.5), transparent 70%);
  filter: blur(2px);
  animation: pulse 8s ease-in-out infinite;
  pointer-events: none;
}

.hero-visual::before {
  content: "";
  position: absolute;
  inset: 18%;
  border: 1px solid rgba(232, 240, 235, 0.15);
  border-radius: 50%;
  animation: spin 48s linear infinite;
}

.hero-visual::after {
  content: "";
  position: absolute;
  inset: 32%;
  border: 1px dashed rgba(196, 120, 42, 0.35);
  border-radius: 50%;
  animation: spin 32s linear infinite reverse;
}

@media (max-width: 720px) {
  .hero-visual {
    opacity: 0.55;
    width: 70vw;
    height: 70vw;
    right: -20%;
    top: 0;
  }
}

/* Sections */
.section {
  padding: 4.5rem 0;
  border-top: 1px solid rgba(232, 240, 235, 0.08);
}

.section h2 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.5rem, 3vw, 2rem);
  letter-spacing: -0.03em;
  color: var(--paper);
  margin: 0 0 0.75rem;
}

.section p {
  color: rgba(232, 240, 235, 0.75);
  max-width: 38rem;
  margin: 0 0 1rem;
}

.section .en {
  font-family: var(--font-ui);
  font-size: 0.9375rem;
  color: rgba(232, 240, 235, 0.55);
}

.steps {
  list-style: none;
  padding: 0;
  margin: 1.5rem 0 0;
  counter-reset: step;
  max-width: 36rem;
}

.steps li {
  position: relative;
  padding: 1rem 0 1rem 3rem;
  border-top: 1px solid rgba(232, 240, 235, 0.1);
  color: rgba(232, 240, 235, 0.8);
  font-family: var(--font-ui);
  font-size: 0.975rem;
}

.steps li::before {
  counter-increment: step;
  content: counter(step);
  position: absolute;
  left: 0;
  top: 1rem;
  width: 1.75rem;
  height: 1.75rem;
  display: grid;
  place-items: center;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--ink);
  background: var(--amber);
  border-radius: 0.2rem;
}

.foot {
  padding: 2.5rem 0 3rem;
  border-top: 1px solid rgba(232, 240, 235, 0.08);
  font-family: var(--font-ui);
  font-size: 0.8125rem;
  color: rgba(232, 240, 235, 0.45);
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: space-between;
}

.foot a {
  color: rgba(232, 240, 235, 0.65);
  text-decoration: none;
}

.foot a:hover {
  color: var(--amber-bright);
}

/* Privacy page (light paper on dark frame) */
body.privacy-page {
  background: var(--paper);
  color: var(--ink);
}

body.privacy-page .site-bg {
  background:
    radial-gradient(ellipse 80% 50% at 100% 0%, rgba(61, 122, 92, 0.12), transparent 50%),
    linear-gradient(180deg, #eef3f0 0%, var(--paper) 40%, #e4ebe6 100%);
}

body.privacy-page .site-bg::after {
  opacity: 0.25;
}

body.privacy-page .top a {
  color: var(--ink-soft);
}

body.privacy-page .top a:hover {
  color: var(--amber);
}

.privacy {
  padding: 2.5rem 0 4rem;
  max-width: 42rem;
}

.privacy .brand-mark {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.5rem;
  letter-spacing: -0.03em;
  color: var(--ink);
  text-decoration: none;
  display: inline-block;
  margin-bottom: 2rem;
}

.privacy h1 {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(2rem, 5vw, 2.75rem);
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin: 0 0 0.5rem;
}

.privacy .meta {
  font-family: var(--font-ui);
  font-size: 0.875rem;
  color: var(--muted);
  margin: 0 0 2.5rem;
}

.privacy h2 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.25rem;
  letter-spacing: -0.02em;
  margin: 2rem 0 0.65rem;
}

.privacy p,
.privacy li {
  font-size: 1.05rem;
  color: var(--ink-soft);
}

.privacy ul {
  padding-left: 1.25rem;
  margin: 0.5rem 0 1rem;
}

.privacy li {
  margin-bottom: 0.4rem;
}

.privacy .en-note {
  font-family: var(--font-ui);
  font-size: 0.9rem;
  color: var(--muted);
  border-left: 3px solid var(--moss);
  padding-left: 1rem;
  margin: 1.5rem 0;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(1.25rem);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes pulse {
  0%,
  100% {
    transform: scale(1);
    opacity: 0.85;
  }
  50% {
    transform: scale(1.06);
    opacity: 1;
  }
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

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