:root {
  --bg: #f7f4ec;
  --paper: #fffdfa;
  --ink: #172033;
  --ink-soft: #49536a;
  --muted: #6d756f;
  --line: rgba(23, 32, 51, 0.14);
  --teal: #128476;
  --coral: #df5b39;
  --olive: #6d7d45;
  --navy: #172033;
  --shadow: 0 18px 42px rgba(23, 32, 51, 0.11);
  --radius: 8px;
  --container: 1120px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family:
    Inter, "DM Sans", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont,
    "PingFang SC", "Noto Sans SC", "Microsoft YaHei", sans-serif;
  background:
    linear-gradient(rgba(23, 32, 51, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(23, 32, 51, 0.035) 1px, transparent 1px),
    var(--bg);
  background-size: 36px 36px;
  color: var(--ink);
  line-height: 1.6;
  overflow-x: hidden;
}

a {
  color: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  min-height: 72px;
  padding: 0 clamp(1rem, 4vw, 3rem);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  background: rgba(247, 244, 236, 0.88);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(16px);
}

.brand {
  display: grid;
  gap: 0.1rem;
  text-decoration: none;
}

.brand span {
  font-size: 1.02rem;
  font-weight: 800;
}

.brand small {
  color: var(--muted);
  font-size: 0.72rem;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: clamp(0.75rem, 2vw, 1.4rem);
  color: var(--ink-soft);
  font-size: 0.92rem;
  white-space: nowrap;
}

.site-nav a,
.site-footer a {
  text-decoration: none;
}

.site-nav a:hover,
.site-footer a:hover {
  color: var(--teal);
}

main {
  width: 100%;
}

.hero {
  min-height: min(720px, calc(100svh - 96px));
  padding: clamp(4rem, 8vw, 7rem) clamp(1rem, 4vw, 3rem);
  display: flex;
  align-items: center;
  border-bottom: 1px solid var(--line);
}

.hero-home {
  background-image:
    linear-gradient(
      90deg,
      rgba(247, 244, 236, 0.98) 0%,
      rgba(247, 244, 236, 0.91) 42%,
      rgba(247, 244, 236, 0.28) 100%
    ),
    url("./assets/relationship-ai-workbench.png");
  background-position: center;
  background-size: cover;
}

.hero-page {
  min-height: auto;
  padding-top: clamp(3rem, 7vw, 6rem);
  padding-bottom: clamp(3rem, 7vw, 5.5rem);
  background:
    linear-gradient(135deg, rgba(18, 132, 118, 0.12), transparent 45%),
    linear-gradient(315deg, rgba(223, 91, 57, 0.14), transparent 42%),
    var(--paper);
}

.hero-content,
.section,
.site-footer {
  width: min(100%, var(--container));
  margin: 0 auto;
}

.hero-content {
  display: grid;
  gap: 1.05rem;
}

h1,
h2,
h3,
p {
  margin: 0;
}

h1 {
  max-width: 11ch;
  font-size: clamp(3.1rem, 10vw, 7.6rem);
  line-height: 0.95;
  letter-spacing: 0;
}

.hero-page h1 {
  max-width: 12ch;
  font-size: clamp(2.35rem, 7vw, 5.3rem);
  line-height: 1.02;
}

.hero-statement {
  max-width: 18ch;
  font-size: clamp(1.45rem, 3.2vw, 2.8rem);
  font-weight: 800;
  line-height: 1.14;
  color: var(--coral);
}

.hero-copy {
  max-width: 42rem;
  color: var(--ink-soft);
  font-size: clamp(1rem, 1.6vw, 1.18rem);
}

.hero-actions,
.action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 0.4rem;
}

.button {
  display: inline-flex;
  min-height: 46px;
  align-items: center;
  justify-content: center;
  padding: 0.74rem 1rem;
  border: 1px solid var(--navy);
  border-radius: var(--radius);
  font-weight: 800;
  text-decoration: none;
  transition:
    transform 180ms ease,
    border-color 180ms ease,
    background 180ms ease,
    color 180ms ease;
}

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

.button-primary {
  background: var(--navy);
  color: #ffffff;
}

.button-secondary {
  background: rgba(255, 253, 250, 0.74);
  color: var(--navy);
}

.section {
  padding: clamp(3rem, 7vw, 6rem) clamp(1rem, 4vw, 3rem);
}

.section + .section {
  border-top: 1px solid var(--line);
}

.section-head {
  display: grid;
  gap: 0.65rem;
  margin-bottom: clamp(1.4rem, 3vw, 2.2rem);
}

.section-index {
  width: 2.4rem;
  height: 2.4rem;
  display: inline-grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--teal);
  font-weight: 900;
  font-size: 0.86rem;
}

h2 {
  max-width: 16ch;
  font-size: clamp(2rem, 4vw, 3.55rem);
  line-height: 1.05;
  letter-spacing: 0;
}

.section-head p,
.lead {
  max-width: 48rem;
  color: var(--ink-soft);
  font-size: clamp(1.04rem, 1.45vw, 1.22rem);
}

.split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 0.85fr);
  gap: clamp(1.5rem, 5vw, 4rem);
  align-items: start;
}

.check-list,
.plain-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.7rem;
}

.check-list li,
.plain-list li {
  padding: 0 0 0.72rem;
  border-bottom: 1px solid var(--line);
  color: var(--ink-soft);
}

.check-list li::before {
  content: "";
  width: 0.64rem;
  height: 0.64rem;
  display: inline-block;
  margin-right: 0.62rem;
  border: 2px solid var(--teal);
  border-radius: 50%;
}

.flow-rail {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}

.flow-rail li {
  min-height: 168px;
  padding: 1rem;
  display: grid;
  align-content: space-between;
  gap: 1rem;
  background: rgba(255, 253, 250, 0.68);
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.flow-rail strong {
  font-size: 1.08rem;
}

.flow-rail span {
  color: var(--ink-soft);
  font-size: 0.95rem;
}

.card-grid,
.boundary-grid,
.faq-grid,
.answer-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
}

.article-main .card-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.content-card,
.boundary-grid > div,
.faq-item,
.answer-card,
.info-panel {
  padding: 1rem;
  background: rgba(255, 253, 250, 0.78);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 10px 26px rgba(23, 32, 51, 0.055);
}

.content-card {
  min-height: 230px;
  display: grid;
  align-content: space-between;
  gap: 1rem;
  text-decoration: none;
  transition:
    transform 180ms ease,
    border-color 180ms ease,
    box-shadow 180ms ease;
}

.content-card:hover,
.answer-card:hover {
  transform: translateY(-3px);
  border-color: rgba(18, 132, 118, 0.42);
  box-shadow: var(--shadow);
}

.content-card span,
.answer-card span,
.meta-line {
  color: var(--teal);
  font-size: 0.82rem;
  font-weight: 900;
}

h3 {
  font-size: clamp(1.12rem, 1.8vw, 1.45rem);
  line-height: 1.22;
}

.content-card p,
.boundary-grid p,
.faq-item p,
.answer-card p,
.info-panel p {
  color: var(--ink-soft);
}

.prompt-panel {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(320px, 1.2fr);
  gap: 1rem;
  align-items: stretch;
}

.prompt-panel p,
pre {
  padding: 1rem;
  margin: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
}

pre {
  overflow-x: auto;
  color: #f7f4ec;
  background: var(--navy);
  font-size: 0.95rem;
  line-height: 1.72;
}

code {
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}

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

.boundary-grid > div {
  display: grid;
  gap: 0.7rem;
}

.article-body {
  display: grid;
  grid-template-columns: minmax(0, 0.72fr) minmax(280px, 0.28fr);
  gap: clamp(1.5rem, 5vw, 4rem);
  align-items: start;
}

.article-main {
  display: grid;
  gap: clamp(2rem, 4vw, 3rem);
}

.article-section {
  display: grid;
  gap: 1rem;
}

.article-section h2 {
  max-width: 22ch;
  font-size: clamp(1.8rem, 3vw, 2.6rem);
}

.article-section p {
  color: var(--ink-soft);
}

.article-aside {
  position: sticky;
  top: 96px;
  display: grid;
  gap: 1rem;
}

.info-panel {
  display: grid;
  gap: 0.75rem;
}

.info-panel h2,
.info-panel h3 {
  font-size: 1.18rem;
  line-height: 1.2;
}

.compact-flow {
  margin: 0;
  padding-left: 1.25rem;
  color: var(--ink-soft);
}

.compact-flow li + li {
  margin-top: 0.48rem;
}

.faq-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.faq-item {
  display: grid;
  gap: 0.7rem;
}

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

.answer-card {
  min-height: 210px;
  display: grid;
  gap: 0.85rem;
  align-content: start;
  text-decoration: none;
  transition:
    transform 180ms ease,
    border-color 180ms ease,
    box-shadow 180ms ease;
}

.notice {
  padding: 1rem;
  border: 1px solid rgba(223, 91, 57, 0.34);
  border-radius: var(--radius);
  background: rgba(223, 91, 57, 0.08);
  color: var(--ink-soft);
}

.site-footer {
  padding: 2rem clamp(1rem, 4vw, 3rem) 3rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.92rem;
}

.site-footer div {
  display: flex;
  gap: 1rem;
}

.reveal {
  opacity: 1;
  transform: none;
  transition:
    opacity 620ms ease,
    transform 620ms ease;
}

.reveal.revealed {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}

@media (max-width: 980px) {
  .site-header {
    align-items: flex-start;
    padding-top: 0.9rem;
    padding-bottom: 0.9rem;
    flex-direction: column;
  }

  .site-nav {
    width: 100%;
    overflow-x: auto;
    padding-bottom: 0.2rem;
  }

  .hero {
    min-height: auto;
  }

  .hero-home {
    background-position: 60% center;
  }

  .split,
  .prompt-panel,
  .article-body {
    grid-template-columns: 1fr;
  }

  .article-aside {
    position: static;
  }

  .flow-rail,
  .answer-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .card-grid,
  .boundary-grid,
  .faq-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 640px) {
  .hero {
    padding-top: 3rem;
    padding-bottom: 3rem;
  }

  .hero-home {
    background-image:
      linear-gradient(
        rgba(247, 244, 236, 0.98),
        rgba(247, 244, 236, 0.88)
      ),
      url("./assets/relationship-ai-workbench.png");
    background-position: center top;
  }

  h1 {
    font-size: clamp(2.8rem, 17vw, 4.8rem);
  }

  .hero-page h1 {
    font-size: clamp(2.2rem, 13vw, 3.8rem);
  }

  .hero-statement {
    max-width: 14ch;
  }

  .hero-actions,
  .action-row,
  .site-footer {
    align-items: stretch;
    flex-direction: column;
  }

  .button {
    width: 100%;
  }

  .flow-rail,
  .card-grid,
  .boundary-grid,
  .faq-grid,
  .answer-grid {
    grid-template-columns: 1fr;
  }

  .flow-rail li,
  .content-card,
  .answer-card {
    min-height: auto;
  }
}
