@import url('https://fonts.googleapis.com/css2?family=Archivo:wght@300;400;500;600;700&family=Space+Grotesk:wght@300;400;500;600;700&display=swap');

:root {
  --ink: #0E0E10;
  --flame: #FF5A1F;
  --cream: #F4EBDD;
  --line: rgba(244, 235, 221, 0.14);
  --dim: rgba(244, 235, 221, 0.74);
  --faint: rgba(244, 235, 221, 0.5);
  --r: 28px;
  --pad: clamp(18px, 5vw, 72px);
  --dockh: 84px;
  --sans: 'Archivo', system-ui, -apple-system, 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
  --display: 'Space Grotesk', 'Archivo', system-ui, 'PingFang SC', 'Microsoft YaHei', sans-serif;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 24px;
  scroll-padding-bottom: calc(var(--dockh) + 24px);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--ink);
  color: var(--cream);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.62;
  letter-spacing: 0.01em;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
  font-family: var(--display);
  font-weight: 600;
  line-height: 1.04;
  letter-spacing: -0.035em;
  margin: 0;
}

p { margin: 0 0 1.1em; }

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

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

ul, menu, ol { margin: 0; }

.skip {
  position: fixed;
  left: 16px;
  top: -90px;
  z-index: 120;
  background: var(--flame);
  color: var(--ink);
  font-weight: 600;
  padding: 12px 20px;
  border-radius: 999px;
  transition: top 0.22s ease;
}
.skip:focus { top: 16px; }

.shell {
  padding: 0 var(--pad);
  max-width: 1280px;
  margin: 0 auto;
}

/* ---------- hero ---------- */

.hero {
  position: relative;
  min-height: 70vh;
  display: flex;
  align-items: center;
  gap: clamp(18px, 5vw, 56px);
  padding: clamp(56px, 12vh, 120px) 0 clamp(44px, 9vh, 88px);
  overflow: hidden;
  isolation: isolate;
}

.ghost {
  position: absolute;
  left: -0.07em;
  top: 50%;
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(7rem, 30vw, 21rem);
  line-height: 0.8;
  letter-spacing: -0.07em;
  color: transparent;
  -webkit-text-stroke: 1px rgba(244, 235, 221, 0.14);
  pointer-events: none;
  white-space: nowrap;
  z-index: 0;
  animation: drift 20s ease-in-out infinite alternate;
}

@keyframes drift {
  from { transform: translate(-2%, -50%); }
  to { transform: translate(2%, -50%); }
}

.hero-copy {
  position: relative;
  z-index: 1;
  flex: 1 1 auto;
  min-width: 0;
}

.hero-h1 {
  font-size: clamp(2.35rem, 9.6vw, 6rem);
  font-weight: 600;
  text-wrap: balance;
}

.hero-h1::after {
  content: '';
  display: inline-block;
  width: 0.07em;
  height: 0.74em;
  margin-left: 0.06em;
  background: var(--flame);
  translate: 0 0.04em;
  animation: blink 1.1s steps(1, end) infinite;
}

@keyframes blink {
  0%, 50% { opacity: 1; }
  51%, 100% { opacity: 0; }
}

.hero-mark {
  margin: 0;
  flex: 0 0 auto;
  width: clamp(84px, 19vw, 176px);
  aspect-ratio: 1;
  border-radius: var(--r);
  background: var(--flame);
  color: var(--ink);
  display: grid;
  place-items: center;
  overflow: hidden;
  position: relative;
  z-index: 1;
  animation: pop 0.7s cubic-bezier(0.2, 0.8, 0.3, 1) both;
}

@keyframes pop {
  from { opacity: 0; transform: scale(0.86) rotate(-6deg); }
  to { opacity: 1; transform: none; }
}

.mark-img { width: 62%; height: auto; object-fit: contain; }

.mark-letter {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(2.2rem, 7vw, 4rem);
  line-height: 1;
}

/* ---------- content ---------- */

.read {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 238px;
  gap: clamp(28px, 5vw, 64px);
  align-items: start;
  padding-bottom: clamp(48px, 9vh, 110px);
}

.prose {
  min-width: 0;
  max-width: 70ch;
}

.prose > div {
  padding: clamp(30px, 6vh, 58px) 0;
  border-top: 1px solid var(--line);
  scroll-margin-top: 24px;
}

.prose > div:first-child {
  border-top: 0;
  padding-top: 0;
}

.prose h2 {
  font-size: clamp(1.55rem, 4.4vw, 2.45rem);
  margin-bottom: 0.55em;
}

.prose h3 {
  font-size: clamp(1.2rem, 3.2vw, 1.55rem);
  margin: 1.5em 0 0.5em;
}

.prose p,
.prose li {
  font-size: 1.0625rem;
  line-height: 1.8;
  color: var(--dim);
}

.prose strong { color: var(--cream); }

.prose a {
  color: var(--flame);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
}

.prose ul, .prose ol {
  padding-left: 1.25em;
  margin: 0 0 1.1em;
}
.prose li { margin-bottom: 0.4em; }

.prose figure { margin: 1.5em 0; }

.prose img { border-radius: 20px; height: auto; }

.prose blockquote {
  margin: 1.5em 0;
  padding: 18px 24px;
  border-left: 3px solid var(--flame);
  border-radius: 0 var(--r) var(--r) 0;
  background: rgba(244, 235, 221, 0.06);
}
.prose blockquote p:last-child { margin-bottom: 0; }

/* ---------- rail ---------- */

.rail {
  position: sticky;
  top: 24px;
  align-self: start;
  background: rgba(244, 235, 221, 0.06);
  border-radius: var(--r);
  padding: 22px 22px 12px;
}

.rail small {
  display: block;
  font-size: 0.78rem;
  letter-spacing: 0.28em;
  color: var(--flame);
  margin-bottom: 8px;
}

.rail h2 {
  font-size: 1.1rem;
  letter-spacing: -0.02em;
  margin-bottom: 10px;
  word-break: break-word;
}

.rail ul { list-style: none; padding: 0; }

.rail a {
  display: block;
  padding: 11px 0;
  font-size: 0.94rem;
  line-height: 1.45;
  color: var(--dim);
  border-bottom: 1px dashed rgba(244, 235, 221, 0.14);
  transition: color 0.18s ease;
}
.rail li:last-child a { border-bottom: 0; }
.rail a:hover, .rail a:focus-visible { color: var(--flame); }

/* ---------- footer ---------- */

.foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 34px;
  padding: 30px var(--pad) calc(var(--dockh) + 26px);
  border-top: 1px solid var(--line);
  max-width: 1280px;
  margin: 0 auto;
}

.foot-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 44px;
}

.foot-logo {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: var(--flame);
  overflow: hidden;
}

.foot-img { width: 70%; height: auto; object-fit: contain; }

.foot-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--ink);
}

.foot-name {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(1.5rem, 6.4vw, 2.9rem);
  letter-spacing: -0.045em;
  line-height: 1;
}

.foot-nav ul {
  list-style: none;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0 16px;
}

.foot-nav a {
  display: inline-block;
  padding: 12px 0;
  font-size: 0.9rem;
  color: var(--faint);
  transition: color 0.18s ease;
}
.foot-nav a:hover, .foot-nav a:focus-visible { color: var(--cream); }

.foot-copy { font-size: 0.84rem; color: rgba(244, 235, 221, 0.42); }

/* ---------- dock ---------- */

.dock {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 80;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px var(--pad) calc(10px + env(safe-area-inset-bottom));
  background: rgba(14, 14, 16, 0.78);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-top: 1px solid var(--line);
}

.dock-brand {
  position: relative;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 14px;
  background: var(--cream);
  overflow: hidden;
}

.dock-img { width: 68%; height: auto; object-fit: contain; }

.dock-dot {
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: var(--ink);
}

.dock-summary {
  position: relative;
  z-index: 2;
  list-style: none;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 46px;
  padding: 11px 20px;
  border-radius: 999px;
  background: var(--flame);
  color: var(--ink);
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  user-select: none;
  transition: transform 0.18s ease;
}

.dock-summary::-webkit-details-marker { display: none; }
.dock-summary:active { transform: scale(0.96); }

.bars { display: grid; gap: 4px; }
.bars i {
  display: block;
  width: 17px;
  height: 2px;
  background: currentColor;
  transition: transform 0.24s ease;
}

.dock-menu[open] .bars i:first-child { transform: translateY(3px) rotate(45deg); }
.dock-menu[open] .bars i:last-child { transform: translateY(-3px) rotate(-45deg); }

.dock-list {
  position: fixed;
  inset: 0;
  z-index: 1;
  list-style: none;
  padding: clamp(78px, 13vh, 132px) var(--pad) calc(var(--dockh) + 40px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 2px;
  background: var(--ink);
  overflow-y: auto;
  overscroll-behavior: contain;
}

.dock-list li {
  opacity: 0;
  transform: translateY(16px);
}

.dock-menu[open] .dock-list li {
  animation: slideIn 0.46s cubic-bezier(0.2, 0.75, 0.25, 1) forwards;
}

.dock-list li:nth-child(1) { animation-delay: 0.04s; }
.dock-list li:nth-child(2) { animation-delay: 0.08s; }
.dock-list li:nth-child(3) { animation-delay: 0.12s; }
.dock-list li:nth-child(4) { animation-delay: 0.16s; }
.dock-list li:nth-child(5) { animation-delay: 0.2s; }
.dock-list li:nth-child(6) { animation-delay: 0.24s; }
.dock-list li:nth-child(7) { animation-delay: 0.28s; }

@keyframes slideIn {
  to { opacity: 1; transform: none; }
}

.dock-list a {
  display: block;
  padding: 11px 0;
  font-family: var(--display);
  font-weight: 500;
  font-size: clamp(1.45rem, 6.6vw, 2.7rem);
  letter-spacing: -0.035em;
  line-height: 1.18;
  color: var(--cream);
  transition: color 0.16s ease, translate 0.2s ease;
}
.dock-list a:hover, .dock-list a:focus-visible {
  color: var(--flame);
  translate: 8px 0;
}

/* ---------- reveal ---------- */

.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.6s ease, transform 0.6s cubic-bezier(0.2, 0.75, 0.25, 1);
}
.reveal.in { opacity: 1; transform: none; }

/* ---------- responsive ---------- */

@media (max-width: 900px) {
  .read { grid-template-columns: minmax(0, 1fr); }
  .rail { position: static; order: 2; padding: 20px 20px 10px; }
  .prose { max-width: none; }
}

@media (max-width: 640px) {
  body { font-size: 16px; }
  .hero { min-height: 66vh; gap: 16px; align-items: flex-end; }
  .hero-mark { width: 72px; border-radius: 20px; }
  .ghost { font-size: clamp(6rem, 44vw, 11rem); }
  .foot { flex-direction: column; align-items: flex-start; }
  .foot-nav ul { gap: 0 18px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .ghost, .hero-h1::after, .hero-mark, .dock-menu[open] .dock-list li { animation: none; }
  .dock-list li { opacity: 1; transform: none; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .dock-list a:hover, .dock-list a:focus-visible { translate: none; }
}

button[aria-expanded]{min-width:44px;min-height:44px}
