@import url('https://fonts.googleapis.com/css2?family=Abril+Fatface&family=Merriweather:wght@300;400;700&display=swap');

:root {
  --ink: #000000;
  --paper: #ffffff;
  --line: #dcdcdc;
  --soft: #f2f2f2;
  --mute: #555555;
  --gap: 24px;
  --dock: 60px;
  --display: "Abril Fatface", Georgia, "Songti SC", serif;
  --body: "Merriweather", Georgia, "Songti SC", serif;
  --ui: Helvetica, "Helvetica Neue", Arial, sans-serif;
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  padding-bottom: var(--dock);
  background: var(--paper);
  color: var(--ink);
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.72;
  font-weight: 400;
  overflow-x: hidden;
}

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

a { color: inherit; }

h1, h2, h3, h4 {
  font-family: var(--display);
  font-weight: 400;
  line-height: 1.05;
  letter-spacing: -0.012em;
  margin: 0 0 0.45em;
}

h1 { font-size: clamp(2.35rem, 5.6vw, 4.4rem); }
h2 { font-size: clamp(1.6rem, 3.4vw, 2.6rem); }
h3 { font-size: clamp(1.15rem, 2.2vw, 1.55rem); }

p { margin: 0 0 1.15em; }
ul, ol { margin: 0 0 1.15em; padding-left: 1.25em; }
li { margin-bottom: 0.35em; }

hr {
  border: 0;
  border-top: 1px solid var(--ink);
  height: 0;
  margin: 1.1rem 0 1.9rem;
}

blockquote {
  margin: 1.6rem 0;
  padding-left: 20px;
  border-left: 3px solid var(--ink);
  font-size: 1.02em;
}

::selection { background: var(--ink); color: var(--paper); }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }

/* ---------- grid shell ---------- */

main.page {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 var(--gap);
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: var(--gap);
  align-items: start;
}

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

.hero {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: var(--gap);
  align-items: end;
  min-height: calc(100vh - var(--dock));
  padding: clamp(48px, 10vh, 120px) 0 40px;
  border-bottom: 2px solid var(--ink);
}

.hero__fig {
  grid-column: 1 / 7;
  margin: 0;
  position: relative;
  height: min(64vh, 620px);
  background: var(--soft);
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  border-radius: 10px;
}

.hero__fig img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  will-change: transform;
}

.badge {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 2;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--ui);
  font-size: 12px;
  letter-spacing: 0.24em;
  padding: 6px 10px 5px;
  border-bottom-right-radius: 10px;
}

.hero__txt {
  grid-column: 7 / 13;
  text-align: right;
  padding-bottom: 6px;
}

.hero__txt h1 { margin: 0; }

/* ---------- flow ---------- */

.flow {
  grid-column: 1 / 10;
  min-width: 0;
  padding-top: 48px;
}

.flow > div {
  background: var(--paper);
  border-radius: 10px;
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.055);
  padding: 42px 36px;
  margin-bottom: 28px;
  scroll-margin-top: 28px;
}

.flow > div > :first-child { margin-top: 0; }
.flow > div > :last-child { margin-bottom: 0; }

.flow a {
  text-decoration: underline;
  text-underline-offset: 2px;
}

.flow h2 + hr, .flow h3 + hr { margin-top: 0.9rem; }

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

.rail {
  grid-column: 10 / 13;
  display: none;
  padding-top: 60px;
  position: sticky;
  top: 0;
}

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

.rail a {
  display: block;
  padding: 11px 0;
  min-height: 40px;
  font-family: var(--ui);
  font-size: 13px;
  line-height: 1.45;
  text-decoration: none;
  border-bottom: 1px solid var(--line);
}

.rail a:hover { text-decoration: underline; }

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

.dock {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 50;
  display: flex;
  height: var(--dock);
  background: var(--paper);
  border-top: 1px solid var(--ink);
}

.dock__brand {
  display: flex;
  align-items: center;
  flex: 0 0 auto;
  padding: 0 16px;
  font-family: var(--display);
  font-size: 1.02rem;
  letter-spacing: -0.01em;
  text-decoration: none;
  white-space: nowrap;
  border-right: 1px solid var(--ink);
}

.dock__nav {
  flex: 1 1 auto;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
}

.dock__nav::-webkit-scrollbar { height: 3px; }
.dock__nav::-webkit-scrollbar-thumb { background: var(--line); }

.dock__nav ul {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
  height: 100%;
}

.dock__nav li { flex: 0 0 auto; display: flex; margin: 0; }

.dock__nav a {
  display: flex;
  align-items: center;
  padding: 0 14px;
  min-height: 44px;
  height: 100%;
  font-family: var(--ui);
  font-size: 14px;
  text-decoration: none;
  white-space: nowrap;
  border-right: 1px solid var(--line);
}

.dock__nav a:hover { text-decoration: underline; }

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

.foot {
  max-width: 1400px;
  margin: 88px auto 0;
  padding: 56px var(--gap) 0;
  border-top: 2px solid var(--ink);
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: var(--gap);
}

.foot__col { grid-column: span 3; min-width: 0; }

.foot__brand {
  font-family: var(--display);
  font-size: 1.5rem;
  text-decoration: none;
  line-height: 1.2;
  display: inline-block;
}

.foot__k {
  font-family: var(--ui);
  font-size: 13px;
  letter-spacing: 0.18em;
  color: var(--mute);
  margin: 0 0 0.85em;
}

.foot__v {
  font-family: var(--ui);
  font-size: 15px;
  word-break: break-all;
  margin: 0;
}

.foot__links { list-style: none; margin: 0; padding: 0; }

.foot__links a {
  display: block;
  padding: 9px 0;
  min-height: 40px;
  font-size: 15px;
  text-decoration: none;
}

.foot__links a:hover { text-decoration: underline; }

.sub { display: flex; flex-wrap: wrap; gap: 8px; }

.sub input {
  flex: 1 1 100%;
  min-height: 44px;
  padding: 10px 12px;
  font: inherit;
  font-family: var(--ui);
  font-size: 15px;
  border: 1px solid var(--ink);
  border-radius: 0;
  background: var(--paper);
  color: var(--ink);
}

.sub button {
  min-height: 44px;
  padding: 10px 22px;
  font: inherit;
  font-family: var(--ui);
  font-size: 15px;
  background: var(--ink);
  color: var(--paper);
  border: 1px solid var(--ink);
  border-radius: 0;
  cursor: pointer;
}

.sub button:hover { background: var(--paper); color: var(--ink); }

.foot__bar {
  grid-column: 1 / -1;
  border-top: 1px solid var(--line);
  margin-top: 24px;
  padding: 20px 0 34px;
  text-align: center;
}

.foot__bar p {
  margin: 0;
  font-family: var(--ui);
  font-size: 14px;
}

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

html.js-reveal .rv {
  opacity: 0;
  transform: translateY(18px);
}

html.js-reveal .rv.in {
  opacity: 1;
  transform: none;
  transition: opacity 0.62s ease, transform 0.62s ease;
}

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

@media (max-width: 1000px) {
  .rail { display: none; }
  .flow { grid-column: 1 / -1; }
}

@media (max-width: 860px) {
  body { font-size: 16.5px; }

  .hero {
    grid-template-columns: 1fr;
    min-height: 0;
    padding: 56px 0 30px;
    align-items: start;
  }

  .hero__txt {
    grid-column: 1 / -1;
    order: 1;
    text-align: left;
    padding-bottom: 0;
  }

  .hero__fig {
    grid-column: 1 / -1;
    order: 2;
    height: auto;
    aspect-ratio: 16 / 10;
    min-height: 0;
  }

  .flow { padding-top: 32px; }

  .flow > div {
    padding: 30px 22px;
    margin-bottom: 22px;
  }

  .foot {
    grid-template-columns: repeat(2, 1fr);
    margin-top: 56px;
    padding-top: 40px;
  }

  .foot__col { grid-column: span 1; }
  .foot__col--brand { grid-column: 1 / -1; }
}

@media (max-width: 560px) {
  .foot { grid-template-columns: 1fr; }
  .dock__brand { font-size: 0.95rem; padding: 0 12px; }
  .dock__nav a { padding: 0 12px; font-size: 13.5px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .rv, html.js-reveal .rv {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
}

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