/* Reset + base */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  background: #fff;
  color: #111;
  font-family: -apple-system, "Helvetica Neue", "Inter", system-ui, Arial, sans-serif;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: "kern", "ss01";
  overflow-x: hidden;
}

html { scroll-behavior: auto; } /* JS handles smoothing */

body {
  min-height: 100vh;
}

/* Fixed top-right corner: download + reveal-on-scroll back-to-top */
.corner {
  position: fixed;
  top: 24px;
  right: 32px;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 8px;
}

.download-btn {
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.01em;
  color: #fff;
  text-decoration: none;
  padding: 8px 16px;
  border: 1px solid #111;
  border-radius: 999px;
  background: #111;
  transition: background 0.2s ease, border-color 0.2s ease;
  will-change: transform;
  white-space: nowrap;
}
.download-btn:hover {
  background: #333;
  border-color: #333;
}

/* Back-to-top: hidden by default (width=0), collapses out of the flex row so
   Download hugs the right edge. On .corner.scrolled it eases in — width and
   opacity animate together, and flex naturally slides Download leftward. */
.up-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 0;
  height: 34px;
  padding: 0;
  border: 1px solid #111;
  border-radius: 999px;
  background: #111;
  color: #fff;
  cursor: pointer;
  overflow: hidden;
  opacity: 0;
  transform: scale(0.85);
  transform-origin: right center;
  transition:
    width  0.4s cubic-bezier(0.22, 1, 0.36, 1),
    opacity 0.25s ease 0.05s,
    transform 0.4s cubic-bezier(0.22, 1, 0.36, 1),
    background 0.2s ease,
    border-color 0.2s ease;
}
.up-btn svg { display: block; }
.up-btn:hover { background: #333; border-color: #333; }

.corner.scrolled .up-btn {
  width: 34px;
  opacity: 1;
  transform: scale(1);
}

/* Narrow column, centered */
main {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 32px;
}

/* Each panel = full viewport, content vertically centered. */
.panel {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
  column-gap: 32px;
  align-items: center;
  padding: 64px 0;
}

/* Focus-band effect: JS sets --focus (0..1) per panel based on distance from
   viewport center. 1 = sharp/opaque, 0 = fully blurred/faded. We start at 0
   so pre-JS state is blurred (matches the "everything outside fold is blurred"
   default). */
.panel {
  --focus: 0;
  opacity: calc(0.3 + 0.7 * var(--focus));
  filter: blur(calc((1 - var(--focus)) * 6px));
  will-change: opacity, filter;
}

/* Hero — logo left, tagline right */
.logo {
  justify-self: end;
  width: clamp(120px, 20vw, 200px);
  height: auto;
  display: block;
}
.tag {
  justify-self: start;
  font-size: clamp(20px, 2.4vw, 26px);
  font-weight: 400;
  color: #333;
  line-height: 1.3;
  max-width: 20ch;
  letter-spacing: 0.005em;
}

/* Pronunciation panel — Scrlr big, phonetic below in mono, centered stack.
   Override .panel's grid so heading + phonetic form a tight vertical block
   instead of two stretched grid rows. */
.pronounce {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
}
.pronounce .heading {
  text-align: center;
  font-size: clamp(72px, 12vw, 128px);
  letter-spacing: -0.04em;
  line-height: 0.82;
}
.phonetic {
  font-family: "SF Mono", ui-monospace, "Menlo", "Consolas", monospace;
  font-style: normal;
  font-size: clamp(20px, 2.4vw, 28px);
  color: #666;
  letter-spacing: 0.01em;
  margin-top: 12px;
  text-align: center;
  max-width: none;
}

/* Body panels: heading right-aligned, copy left-aligned */
.heading {
  text-align: right;
  font-size: clamp(36px, 5.5vw, 56px);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.05;
  color: #111;
}
.copy {
  text-align: left;
  font-size: 16px;
  font-weight: 400;
  line-height: 1.55;
  color: #333;
  max-width: 32ch;
}

.mail {
  color: #111;
  text-decoration: none;
  border-bottom: 1px solid #111;
  padding-bottom: 1px;
}
.mail:hover { color: #555; border-color: #555; }

/* Card panel (closed beta) — black rounded plate, single-column,
   heading and copy stacked and left-aligned inside. */
.panel-card {
  grid-template-columns: 1fr;
}
.card {
  background: #111;
  color: #fff;
  border-radius: 24px;
  padding: 64px 48px;
  width: 100%;
}
.card .heading {
  color: #fff;
  text-align: left;
  margin-bottom: 24px;
}
.card .copy {
  color: #ddd;
  text-align: left;
  max-width: 40ch;
}
.card .mail {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.5);
}
.card .mail:hover {
  color: #ddd;
  border-color: #ddd;
}

/* Mobile */
@media (max-width: 640px) {
  main { padding: 0 24px; }
  .panel {
    grid-template-columns: 1fr;
    column-gap: 0;
    row-gap: 16px;
    text-align: left;
  }
  .heading { text-align: left; font-size: clamp(32px, 8vw, 44px); }
  .copy { text-align: left; }
  .corner { top: 16px; right: 16px; }
  .card {
    padding: 40px 28px;
    border-radius: 20px;
  }
}
