:root {
  --bg: #f3f4f7;
  --surface: rgba(255, 255, 255, 0.96);
  --ink: #0f172a;
  --muted: #64748b;
  --line: #d8dee8;
  --primary: #2563eb;
  --accent: #14b8a6;
  --radius-s: 10px;
  --radius-m: 16px;
  --radius-l: 24px;
  --shadow: 0 12px 34px rgba(15, 23, 42, 0.12);
  --max: 1100px;
}

* { box-sizing: border-box; }

html,
body {
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: "IBM Plex Mono", monospace;
  color: var(--ink);
  background:
    radial-gradient(circle at 8% 12%, rgba(20, 184, 166, 0.11), transparent 35%),
    radial-gradient(circle at 92% 10%, rgba(37, 99, 235, 0.14), transparent 34%),
    linear-gradient(140deg, #f3f4f7 0%, #eef2f9 42%, #f8f9fb 100%);
  min-height: 100vh;
}

h1,
h2,
h3,
.brand-title {
  font-family: "Cormorant Garamond", serif;
  margin: 0;
}

a {
  color: inherit;
  text-decoration: none;
}

.container {
  width: min(var(--max), calc(100% - 2rem));
  margin: 0 auto;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 60;
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
  background: rgba(243, 244, 247, 0.76);
}

.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.82rem 0;
  gap: 1rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.brand img {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  border: 1px solid var(--line);
}

.brand-title {
  font-size: 1.42rem;
  line-height: 1;
}

.main-nav {
  display: inline-flex;
  gap: 1.2rem;
  color: var(--muted);
}

.main-nav a:hover {
  color: var(--ink);
}

.lang-switch {
  display: inline-flex;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.2rem;
  background: var(--surface);
}

.lang-btn {
  border: 0;
  background: transparent;
  padding: 0.4rem 0.8rem;
  border-radius: 999px;
  cursor: pointer;
  font: inherit;
  color: var(--muted);
}

.lang-btn.active {
  background: var(--ink);
  color: #fff;
}

.hero {
  position: relative;
  min-height: calc(100vh - 66px);
  display: grid;
  place-items: center;
  overflow: hidden;
}

.hero::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: clamp(140px, 22vh, 240px);
  background: linear-gradient(
    to bottom,
    rgba(243, 244, 247, 0) 0%,
    rgba(243, 244, 247, 0.72) 62%,
    #f3f4f7 100%
  );
  pointer-events: none;
  z-index: 1;
}

.hero-ambient {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(2px);
  opacity: 0.65;
  animation: drift 9s ease-in-out infinite;
}

.orb-a {
  width: 320px;
  height: 320px;
  background: radial-gradient(circle, rgba(20, 184, 166, 0.34), rgba(20, 184, 166, 0));
  top: 14%;
  left: 8%;
}

.orb-b {
  width: 440px;
  height: 440px;
  background: radial-gradient(circle, rgba(37, 99, 235, 0.26), rgba(37, 99, 235, 0));
  right: 3%;
  top: 10%;
  animation-delay: 1.2s;
}

.orb-c {
  width: 360px;
  height: 360px;
  background: radial-gradient(circle, rgba(15, 23, 42, 0.16), rgba(15, 23, 42, 0));
  bottom: -12%;
  left: 40%;
  animation-delay: 2.4s;
}

.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  animation: hero-in 0.8s ease both;
}

.eyebrow {
  margin: 0;
  color: var(--muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.77rem;
}

.hero h1 {
  margin-top: 0.7rem;
  font-size: clamp(2.6rem, 8.5vw, 6.6rem);
  line-height: 0.9;
  max-width: 14ch;
  margin-left: auto;
  margin-right: auto;
}

.hero-author {
  margin: 0.9rem 0 0;
  color: var(--primary);
  font-size: 0.9rem;
}

.hero-line {
  color: var(--muted);
  margin: 1rem auto 0;
  max-width: 52ch;
}

.hero-actions {
  margin-top: 1.5rem;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.8rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  border-radius: 14px;
  padding: 0.55rem 1rem;
  border: 1px solid var(--line);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

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

.btn-primary {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
  box-shadow: 0 10px 18px rgba(37, 99, 235, 0.25);
}

.btn-secondary { background: var(--surface); }

.scroll-hint {
  display: inline-flex;
  margin-top: 1.7rem;
  color: var(--muted);
  border-bottom: 1px solid transparent;
}

.scroll-hint:hover {
  border-color: var(--muted);
}

.section {
  padding: 4rem 0;
}

.section h2 {
  margin-top: 0.4rem;
  font-size: clamp(2rem, 4vw, 3.4rem);
  line-height: 0.95;
}

.section-lead {
  color: var(--muted);
  max-width: 60ch;
}

.cards {
  margin-top: 1.2rem;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.glass {
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.92), rgba(255, 255, 255, 0.75));
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.card,
.flow-item {
  padding: 1.05rem;
  border-radius: var(--radius-m);
}

.card h3,
.flow-item h3 {
  margin-bottom: 0.5rem;
  font-size: 1.35rem;
}

.card p,
.flow-item p {
  color: var(--muted);
  margin: 0;
}

.flow-grid {
  margin-top: 1.2rem;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.flow-item span {
  color: var(--primary);
  font-weight: 600;
  font-size: 0.9rem;
}

.footer {
  border-top: 1px solid var(--line);
  margin-top: 3rem;
  padding: 1rem 0 1.6rem;
  color: var(--muted);
  font-size: 0.86rem;
}

.footer-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  flex-wrap: wrap;
}

.footer-right {
  display: inline-flex;
  gap: 0.45rem;
  align-items: center;
  flex-wrap: wrap;
}

.footer-right a:hover {
  color: var(--ink);
}

.uneed-badge {
  display: inline-flex;
  align-items: center;
}

.uneed-badge img {
  display: block;
  height: 34px;
  width: auto;
}

.footer-embeds {
  margin-top: 0.9rem;
}

.ph-embed-card {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  border: 1px solid rgb(224, 224, 224);
  border-radius: 12px;
  padding: 20px;
  max-width: 500px;
  background: rgb(255, 255, 255);
  box-shadow: rgba(0, 0, 0, 0.05) 0 2px 8px;
}

.ph-embed-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.ph-embed-icon {
  width: 64px;
  height: 64px;
  border-radius: 8px;
  object-fit: cover;
  flex-shrink: 0;
}

.ph-embed-copy {
  flex: 1 1 0%;
  min-width: 0;
}

.ph-embed-copy h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
  color: rgb(26, 26, 26);
  line-height: 1.3;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ph-embed-copy p {
  margin: 4px 0 0;
  font-size: 14px;
  color: rgb(102, 102, 102);
  line-height: 1.4;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.ph-embed-cta {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 12px;
  padding: 8px 16px;
  background: rgb(255, 97, 84);
  color: rgb(255, 255, 255);
  text-decoration: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
}

.ph-embed-cta:hover {
  color: rgb(255, 255, 255);
  filter: brightness(0.95);
}

.legal-page {
  padding: 2rem 0 3rem;
}

.legal-wrap {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-l);
  box-shadow: var(--shadow);
  padding: clamp(1rem, 2.2vw, 2rem);
}

.legal-wrap h1 {
  font-size: clamp(2rem, 4vw, 3rem);
}

.legal-wrap h2 {
  margin-top: 1.4rem;
  font-size: clamp(1.3rem, 2.4vw, 1.8rem);
}

.legal-wrap p,
.legal-wrap li {
  color: #2a3347;
}

.back-link {
  color: var(--primary);
  display: inline-flex;
  margin-bottom: 1rem;
}

.scroll-reveal {
  opacity: 0;
  transform: translateY(28px) scale(0.985);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.scroll-reveal.is-visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}

@keyframes hero-in {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes drift {
  0%, 100% { transform: translateY(0) translateX(0); }
  50% { transform: translateY(-18px) translateX(10px); }
}

@media (max-width: 900px) {
  .main-nav {
    display: none;
  }

  .cards,
  .flow-grid {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: calc(100vh - 62px);
  }

  .hero h1 {
    max-width: 11ch;
  }

  .uneed-badge img {
    height: 30px;
  }

  .ph-embed-card {
    padding: 16px;
  }

  .ph-embed-copy h3 {
    white-space: normal;
  }
}
