/* AttentionHub Official Website Stylesheet */

:root {
  --bg: #ffffff;
  --bg-subtle: #f7f8fa;
  --bg-elevated: #ffffff;
  --header-bg: rgba(255, 255, 255, 0.84);
  --ink: #09090b;
  --ink-secondary: #52525b;
  --ink-muted: #71717a;
  --border: rgba(9, 9, 11, 0.09);
  --border-strong: rgba(9, 9, 11, 0.16);
  --accent: #0066ff;
  --accent-hover: #0052cc;
  --accent-soft: rgba(0, 102, 255, 0.08);
  --mark-bg: #09090b;
  --mark-stroke: transparent;
  --font-sans: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text",
    "PingFang SC", "Hiragino Sans GB", "Noto Sans CJK SC", "Source Han Sans SC",
    "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  --font-mono: "SF Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas,
    "Liberation Mono", monospace;
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --container: 1120px;
  --prose: 760px;
  --header-h: 64px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #09090b;
    --bg-subtle: #111113;
    --bg-elevated: #141416;
    --header-bg: rgba(9, 9, 11, 0.84);
    --ink: #fafafa;
    --ink-secondary: #a1a1aa;
    --ink-muted: #71717a;
    --border: rgba(255, 255, 255, 0.09);
    --border-strong: rgba(255, 255, 255, 0.18);
    --accent: #2f7bff;
    --accent-hover: #5b98ff;
    --accent-soft: rgba(47, 123, 255, 0.14);
    --mark-bg: #141416;
    --mark-stroke: rgba(255, 255, 255, 0.16);
  }
}

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  background: var(--bg);
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.7;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  font-feature-settings: "cv02", "cv03", "cv04", "cv11";
}

main {
  flex: 1 0 auto;
}

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

a {
  color: inherit;
  text-decoration: none;
  transition: color 180ms var(--ease-out), border-color 180ms var(--ease-out),
    opacity 180ms var(--ease-out);
}

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

::selection {
  background: var(--accent-soft);
  color: var(--ink);
}

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 clamp(20px, 5vw, 48px);
}

.container--prose {
  max-width: calc(var(--prose) + clamp(40px, 10vw, 96px));
}

/* Header */

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  height: var(--header-h);
  background: var(--header-bg);
  backdrop-filter: saturate(180%) blur(16px);
  -webkit-backdrop-filter: saturate(180%) blur(16px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  color: var(--ink);
  flex-shrink: 0;
}

.brand-mark {
  width: 26px;
  height: 26px;
  flex-shrink: 0;
}

.brand-wordmark {
  font-size: 15.5px;
  font-weight: 600;
  letter-spacing: -0.025em;
  line-height: 1;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: clamp(18px, 3vw, 32px);
}

.site-nav a {
  position: relative;
  font-size: 14px;
  font-weight: 450;
  color: var(--ink-secondary);
  padding: 6px 0;
  white-space: nowrap;
}

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

.site-nav a[aria-current="page"] {
  color: var(--ink);
  font-weight: 550;
}

.site-nav a[aria-current="page"]::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 1.5px;
  background: var(--accent);
}

/* Homepage Hero */

.hero {
  padding: clamp(68px, 10vh, 116px) 0 clamp(64px, 9vh, 104px);
  overflow-x: clip;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.32fr) minmax(290px, 0.78fr);
  align-items: center;
  gap: clamp(36px, 5vw, 68px);
}

.hero-copy {
  min-width: 0;
}

.hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 24px;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--ink-secondary);
  letter-spacing: 0.01em;
}

.hero-kicker-rule {
  display: inline-block;
  width: 20px;
  height: 1.5px;
  background: var(--accent);
  flex-shrink: 0;
}

.hero h1 {
  margin: 0;
  font-size: clamp(2.1rem, 3.65vw, 3.15rem);
  font-weight: 650;
  line-height: 1.18;
  letter-spacing: -0.03em;
  color: var(--ink);
}

.hero-en {
  margin: 20px 0 0;
  font-size: clamp(0.95rem, 1.2vw, 1.05rem);
  font-weight: 400;
  line-height: 1.55;
  letter-spacing: -0.012em;
  color: var(--ink-muted);
  text-wrap: balance;
}

.hero-lead {
  margin: 28px 0 0;
  max-width: 35em;
  font-size: 16.5px;
  line-height: 1.85;
  color: var(--ink-secondary);
}

.hero-visual {
  display: flex;
  justify-content: flex-end;
  align-items: center;
}

.focus-diagram {
  width: 100%;
  max-width: 416px;
  height: auto;
  color: var(--ink);
  user-select: none;
}

.focus-ring-slow {
  transform-box: view-box;
  transform-origin: 220px 220px;
  animation: slowOrbit 96s linear infinite;
}

.focus-ring-counter {
  transform-box: view-box;
  transform-origin: 220px 220px;
  animation: slowOrbitReverse 140s linear infinite;
}

/* Sections */

.section {
  padding: clamp(68px, 9.5vh, 112px) 0;
  border-top: 1px solid var(--border);
  scroll-margin-top: calc(var(--header-h) + 16px);
}

.section--subtle {
  background: var(--bg-subtle);
}

.editorial-grid {
  display: grid;
  grid-template-columns: minmax(160px, 240px) minmax(0, 1fr);
  gap: clamp(24px, 5vw, 72px);
  align-items: start;
}

.section-label {
  position: sticky;
  top: calc(var(--header-h) + 28px);
}

.section-label h2 {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--ink);
}

.section-label-sub {
  margin: 4px 0 0;
  font-size: 13px;
  color: var(--ink-muted);
  letter-spacing: -0.005em;
}

/* Manifesto */

.manifesto-body {
  max-width: 680px;
}

.manifesto-thesis {
  margin: 0 0 28px;
  font-size: clamp(1.26rem, 2.15vw, 1.68rem);
  font-weight: 560;
  line-height: 1.52;
  letter-spacing: -0.024em;
  color: var(--ink);
}

.manifesto-body p:not(.manifesto-thesis) {
  margin: 0 0 20px;
  font-size: 16px;
  line-height: 1.9;
  color: var(--ink-secondary);
}

.manifesto-body p:last-child {
  margin-bottom: 0;
}

/* Core Values */

.values-header {
  display: grid;
  grid-template-columns: minmax(160px, 240px) minmax(0, 1fr);
  gap: clamp(20px, 5vw, 72px);
  align-items: baseline;
  margin-bottom: clamp(36px, 5vh, 52px);
}

.values-header h2 {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--ink);
}

.values-intro {
  margin: 0;
  max-width: 600px;
  font-size: clamp(1.2rem, 2vw, 1.52rem);
  font-weight: 520;
  line-height: 1.48;
  letter-spacing: -0.02em;
  color: var(--ink);
}

.values-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border-top: 1px solid var(--border);
}

.value-item {
  padding: clamp(28px, 3.8vw, 44px) 0;
  border-bottom: 1px solid var(--border);
  transition: border-color 220ms var(--ease-out);
}

.value-item:nth-child(odd) {
  padding-right: clamp(28px, 4vw, 52px);
  border-right: 1px solid var(--border);
}

.value-item:nth-child(even) {
  padding-left: clamp(28px, 4vw, 52px);
}

.value-item:nth-last-child(-n + 2) {
  border-bottom: none;
  padding-bottom: clamp(12px, 2vw, 20px);
}

.value-index {
  display: inline-block;
  margin-bottom: 16px;
  font-family: var(--font-mono);
  font-size: 12.5px;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--accent);
}

.value-item h3 {
  margin: 0 0 12px;
  font-size: 19px;
  font-weight: 600;
  line-height: 1.35;
  letter-spacing: -0.02em;
  color: var(--ink);
}

.value-item p {
  margin: 0;
  font-size: 15px;
  line-height: 1.85;
  color: var(--ink-secondary);
}

/* About & Contact */

.about-body {
  max-width: 650px;
}

.about-statement {
  margin: 0 0 36px;
  font-size: 16.5px;
  line-height: 1.85;
  color: var(--ink-secondary);
}

.about-statement strong {
  color: var(--ink);
  font-weight: 580;
}

.spec-list {
  margin: 0;
  border-top: 1px solid var(--border);
}

.spec-row {
  display: grid;
  grid-template-columns: 128px minmax(0, 1fr);
  gap: 16px;
  padding: 18px 0;
  border-bottom: 1px solid var(--border);
  align-items: baseline;
}

.spec-row dt {
  font-size: 13.5px;
  color: var(--ink-muted);
}

.spec-row dd {
  margin: 0;
  font-size: 15px;
  color: var(--ink);
}

.contact-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 14.5px;
  color: var(--ink);
  border-bottom: 1px solid var(--border-strong);
  padding-bottom: 2px;
}

.contact-link:hover {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

.contact-arrow {
  font-family: var(--font-sans);
  font-size: 13px;
  color: var(--ink-muted);
  transition: transform 180ms var(--ease-out), color 180ms var(--ease-out);
}

.contact-link:hover .contact-arrow {
  color: var(--accent);
  transform: translate(2px, -2px);
}

/* Subpages (/support & /privacy) */

.doc-hero {
  padding: clamp(52px, 7.5vh, 84px) 0 clamp(36px, 5vh, 48px);
  border-bottom: 1px solid var(--border);
  background: var(--bg-subtle);
}

.doc-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 24px;
  font-size: 13.5px;
  color: var(--ink-muted);
}

.doc-back:hover {
  color: var(--ink);
}

.doc-hero h1 {
  margin: 0;
  font-size: clamp(1.85rem, 3.2vw, 2.5rem);
  font-weight: 650;
  line-height: 1.2;
  letter-spacing: -0.028em;
  color: var(--ink);
}

.doc-lead {
  margin: 16px 0 0;
  max-width: 68ch;
  font-size: 15.5px;
  line-height: 1.8;
  color: var(--ink-secondary);
}

.meta-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 28px;
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  font-size: 13.5px;
  color: var(--ink-secondary);
}

.meta-strip strong {
  font-weight: 550;
  color: var(--ink);
}

.meta-strip a {
  color: var(--accent);
}

.meta-strip a:hover {
  color: var(--accent-hover);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.prose {
  padding: clamp(40px, 6vh, 64px) 0 clamp(68px, 9vh, 100px);
}

.prose-intro {
  margin: 0 0 36px;
  font-size: 15.5px;
  line-height: 1.9;
  color: var(--ink-secondary);
}

.toc {
  margin: 0 0 44px;
  padding: 24px 28px;
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: 10px;
}

.toc-title {
  margin: 0 0 14px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ink);
}

.toc ol {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 28px;
  counter-reset: toc-item;
}

.toc li {
  counter-increment: toc-item;
  font-size: 14px;
  line-height: 1.6;
}

.toc li a {
  display: inline-flex;
  align-items: baseline;
  gap: 10px;
  color: var(--ink-secondary);
}

.toc li a::before {
  content: "0" counter(toc-item);
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--accent);
  flex-shrink: 0;
}

.toc li a:hover {
  color: var(--ink);
}

.prose-section {
  padding-top: 36px;
  margin-top: 36px;
  border-top: 1px solid var(--border);
  scroll-margin-top: calc(var(--header-h) + 24px);
}

.prose-section:first-child,
.toc + .prose-section {
  margin-top: 0;
  padding-top: 0;
  border-top: none;
}

.prose-section h2 {
  margin: 0 0 18px;
  font-size: 19px;
  font-weight: 620;
  line-height: 1.38;
  letter-spacing: -0.02em;
  color: var(--ink);
}

.prose-section p {
  margin: 0 0 15px;
  font-size: 15px;
  line-height: 1.9;
  color: var(--ink-secondary);
}

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

.prose-section a {
  color: var(--accent);
}

.prose-section a:hover {
  color: var(--accent-hover);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* Support Info List & Table */

.info-list {
  display: flex;
  flex-direction: column;
}

.info-item {
  padding: 20px 0;
  border-bottom: 1px solid var(--border);
}

.info-item:first-child {
  padding-top: 4px;
}

.info-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.info-item h3 {
  margin: 0 0 8px;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.015em;
  color: var(--ink);
}

.info-item p {
  margin: 0;
  font-size: 15px;
  line-height: 1.85;
  color: var(--ink-secondary);
}

.support-panel {
  margin-top: 18px;
  padding: 28px;
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: 10px;
}

.support-panel > p:first-child {
  margin-top: 0;
}

.support-table {
  width: 100%;
  border-collapse: collapse;
  margin: 20px 0;
  font-size: 14.5px;
}

.support-table tr {
  border-top: 1px solid var(--border);
}

.support-table tr:last-child {
  border-bottom: 1px solid var(--border);
}

.support-table th,
.support-table td {
  padding: 13px 0;
  text-align: left;
  vertical-align: top;
  line-height: 1.7;
}

.support-table th {
  width: 156px;
  padding-right: 20px;
  font-weight: 550;
  color: var(--ink);
  white-space: nowrap;
}

.support-table td {
  color: var(--ink-secondary);
}

.support-note {
  font-size: 14px;
  color: var(--ink-muted);
}

/* Footer */

.site-footer {
  flex-shrink: 0;
  border-top: 1px solid var(--border);
  padding: 32px 0 40px;
  background: var(--bg);
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px 32px;
}

.footer-legal {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 16px;
  font-size: 13px;
  color: var(--ink-muted);
}

.footer-sep {
  opacity: 0.45;
  user-select: none;
}

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

.footer-links {
  display: flex;
  align-items: center;
  gap: 24px;
  font-size: 13px;
  color: var(--ink-muted);
}

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

/* Entrance Motion */

.reveal {
  animation: fadeUp 620ms var(--ease-out) both;
}

.reveal-delay-1 {
  animation-delay: 80ms;
}

.reveal-delay-2 {
  animation-delay: 160ms;
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slowOrbit {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

@keyframes slowOrbitReverse {
  from {
    transform: rotate(360deg);
  }
  to {
    transform: rotate(0deg);
  }
}

/* Responsive */

@media (max-width: 900px) {
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 44px;
  }

  .hero-visual {
    justify-content: flex-start;
  }

  .focus-diagram {
    max-width: 300px;
  }

  .editorial-grid,
  .values-header {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .section-label {
    position: static;
  }
}

@media (max-width: 720px) {
  .site-nav {
    gap: 18px;
  }

  .hero {
    padding: 48px 0 56px;
  }

  .hero-kicker {
    margin-bottom: 18px;
  }

  .hero h1 {
    font-size: clamp(1.9rem, 7.6vw, 2.35rem);
    line-height: 1.24;
  }

  .hero-lead {
    margin-top: 22px;
    font-size: 15.5px;
  }

  .hero-visual {
    justify-content: center;
  }

  .focus-diagram {
    max-width: 260px;
  }

  .values-grid {
    grid-template-columns: 1fr;
  }

  .value-item,
  .value-item:nth-child(odd),
  .value-item:nth-child(even) {
    padding: 26px 0;
    border-right: none;
    border-bottom: 1px solid var(--border);
  }

  .value-item:nth-last-child(-n + 2) {
    border-bottom: 1px solid var(--border);
    padding-bottom: 26px;
  }

  .value-item:last-child {
    border-bottom: none;
    padding-bottom: 4px;
  }

  .spec-row {
    grid-template-columns: 1fr;
    gap: 4px;
    padding: 15px 0;
  }

  .toc {
    padding: 20px;
  }

  .toc ol {
    grid-template-columns: 1fr;
  }

  .support-panel {
    padding: 20px;
  }

  .support-table th,
  .support-table td {
    display: block;
    width: 100%;
    padding: 4px 0;
  }

  .support-table th {
    padding-top: 14px;
    font-size: 13px;
    color: var(--ink-muted);
  }

  .support-table td {
    padding-bottom: 14px;
  }

  .footer-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
  }

  .footer-legal {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }

  .footer-sep {
    display: none;
  }
}

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

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