:root {
  --bg: #f7f4ef;
  --paper: #fffdf9;
  --paper-strong: #fffaf2;
  --text: #171717;
  --muted: #6f6a63;
  --muted-soft: #8c857d;
  --border: #e7ded2;
  --border-strong: #d8c7b2;
  --accent: #ff6a13;
  --accent-soft: #fff0e7;
  --shadow-soft: 0 18px 44px rgba(23, 23, 23, 0.08);
  --shadow-key: 0 10px 18px rgba(23, 23, 23, 0.06), inset 0 1px 0 rgba(255, 255, 255, 0.8);
  --radius-lg: 28px;
  --radius-md: 20px;
  --max-width: 1360px;
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  background:
    radial-gradient(circle at 50% -12%, rgba(255, 253, 249, 0.95), rgba(247, 244, 239, 0) 34rem),
    var(--bg);
  color: var(--text);
  font-family: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", Georgia, serif;
  text-transform: lowercase;
}

body.modal-open {
  overflow: hidden;
}

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

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

button {
  border: 0;
  color: inherit;
  font: inherit;
}

p,
h1,
h2 {
  margin: 0;
}

.page-shell {
  width: min(var(--max-width), calc(100% - 40px));
  margin: 0 auto;
  padding: 26px 0 52px;
}

.site-header,
.hero,
.about-section,
.site-footer {
  border-top: 1px solid rgba(231, 222, 210, 0.94);
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding-top: 22px;
}

.brand-mark,
h1,
.about-grid h2 {
  font-family: Impact, Haettenschweiler, "Arial Narrow Bold", sans-serif;
  letter-spacing: 0.01em;
}

.brand-mark {
  font-size: clamp(1.35rem, 2vw, 1.9rem);
  line-height: 0.9;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: clamp(18px, 3vw, 42px);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 1.05rem;
}

.nav-link {
  position: relative;
  padding: 3px 0 8px;
}

.nav-link::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 180ms var(--ease-out);
}

.nav-link:hover::after,
.nav-link:focus-visible::after,
.nav-link.is-active::after {
  transform: scaleX(1);
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(500px, 0.95fr);
  gap: clamp(34px, 4.4vw, 64px);
  align-items: start;
  padding-top: 46px;
}

.hero-copy {
  max-width: 680px;
}

.hero-kicker,
.section-label,
.section-note,
.wall-caption,
.site-footer,
.modal-status {
  font-family: "SF Mono", ui-monospace, Menlo, Monaco, monospace;
}

.hero-kicker,
.section-label {
  color: var(--text);
  font-size: 0.86rem;
  letter-spacing: 0.08em;
}

h1 {
  display: flex;
  flex-direction: column;
  margin-top: 14px;
  font-size: clamp(4rem, 10vw, 8rem);
  line-height: 0.82;
}

.underline {
  position: relative;
  width: fit-content;
}

.underline::after {
  content: "";
  position: absolute;
  left: 0.03em;
  right: 0;
  bottom: -0.08em;
  height: 0.12em;
  background: var(--accent);
  border-radius: 999px 60% 999px 70%;
  transform: rotate(-2deg);
  z-index: -1;
}

.hero-intro {
  max-width: 55ch;
  margin-top: 28px;
  font-size: clamp(1.24rem, 2vw, 1.65rem);
  line-height: 1.28;
}

.hero-note,
.about-note {
  color: var(--text);
  font-family: "Bradley Hand", "Segoe Print", "Comic Sans MS", cursive;
  font-size: clamp(1.05rem, 1.8vw, 1.38rem);
  line-height: 1.22;
  transform: rotate(-8deg);
}

.hero-note {
  position: absolute;
  right: 4px;
  bottom: -84px;
  max-width: 190px;
}

.hero-note span,
.about-note span {
  display: block;
  width: 128px;
  height: 8px;
  margin: 8px 0 12px;
  border-bottom: 3px solid var(--accent);
  border-top: 2px solid var(--accent);
  transform: rotate(-8deg);
}

.about-section {
  margin-top: 64px;
  padding-top: 26px;
}

.hero-wall-top,
.section-label-row,
.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.section-note,
.wall-caption,
.site-footer {
  color: var(--muted);
  font-size: 0.9rem;
}

.keyboard-wall {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: clamp(12px, 1.05vw, 16px);
  margin-top: 20px;
}

.key {
  position: relative;
  display: grid;
  place-items: center;
  min-height: clamp(72px, 5.6vw, 86px);
  aspect-ratio: 1.12;
  border: 1px solid rgba(216, 199, 178, 0.9);
  border-radius: 13px;
  background: linear-gradient(145deg, rgba(255, 253, 249, 0.92), rgba(240, 235, 228, 0.72));
  box-shadow: var(--shadow-key);
}

.key-filled {
  cursor: pointer;
  transition:
    transform 180ms var(--ease-out),
    border-color 180ms var(--ease-out),
    box-shadow 180ms var(--ease-out),
    background-color 180ms var(--ease-out);
}

.key-filled:hover,
.key-filled:focus-visible {
  transform: translateY(-3px);
  border-color: var(--border-strong);
  box-shadow: 0 16px 28px rgba(23, 23, 23, 0.11), inset 0 1px 0 rgba(255, 255, 255, 0.85);
}

.key-filled:active {
  transform: translateY(-1px) scale(0.98);
}

.key-empty {
  opacity: 0.56;
}

.key-icon {
  width: clamp(48px, 4vw, 62px);
  height: clamp(48px, 4vw, 62px);
  border-radius: 15px;
  object-fit: cover;
  box-shadow: 0 8px 18px rgba(23, 23, 23, 0.13);
}

.wall-caption {
  margin-top: 20px;
}

.hero-wall {
  position: relative;
  align-self: center;
  width: 100%;
  padding: 18px 0 72px;
}

.about-grid {
  display: grid;
  grid-template-columns: minmax(260px, 0.82fr) minmax(280px, 1fr) minmax(170px, 0.45fr);
  gap: clamp(28px, 5vw, 74px);
  align-items: start;
  margin-top: 42px;
}

.about-grid h2 {
  font-size: clamp(3.2rem, 6vw, 5.3rem);
  line-height: 0.85;
}

.about-copy {
  display: grid;
  gap: 22px;
  max-width: 58ch;
  font-size: clamp(1.14rem, 1.6vw, 1.3rem);
  line-height: 1.42;
}

.about-note {
  margin-top: 18px;
}

.site-footer {
  margin-top: 66px;
  padding-top: 18px;
}

.site-footer a:hover,
.site-footer a:focus-visible {
  color: var(--text);
}

.accent {
  color: var(--accent);
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: grid;
  place-items: center;
  padding: 22px;
  background: rgba(23, 23, 23, 0.34);
}

.modal-backdrop[hidden] {
  display: none;
}

.app-modal {
  position: relative;
  display: grid;
  justify-items: center;
  width: min(100%, 300px);
  padding: 24px 26px 28px;
  border: 1px solid rgba(231, 222, 210, 0.92);
  border-radius: 28px;
  background: rgba(255, 253, 249, 0.96);
  box-shadow: var(--shadow-soft);
}

.modal-close {
  position: absolute;
  top: 14px;
  left: 14px;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(255, 253, 249, 0.86);
  cursor: pointer;
  transition: transform 160ms var(--ease-out), border-color 160ms var(--ease-out);
}

.modal-close:hover,
.modal-close:focus-visible {
  transform: scale(0.97);
  border-color: var(--border-strong);
}

.modal-close span,
.modal-close span::before {
  display: block;
  width: 20px;
  height: 2px;
  border-radius: 999px;
  background: var(--text);
}

.modal-close span {
  transform: rotate(45deg);
}

.modal-close span::before {
  content: "";
  transform: rotate(90deg);
}

.modal-label {
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 1.18rem;
  font-weight: 700;
  text-transform: none;
}

.modal-icon {
  width: 86px;
  height: 86px;
  margin-top: 26px;
  border-radius: 20px;
  object-fit: cover;
  box-shadow: 0 14px 24px rgba(23, 23, 23, 0.16);
}

.modal-title {
  margin-top: 18px;
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 1.42rem;
  line-height: 1.08;
  text-align: center;
  text-transform: none;
}

.modal-status {
  min-height: 1.1em;
  margin-top: 10px;
  color: var(--muted);
  font-size: 0.76rem;
  text-align: center;
}

.modal-store-badge {
  margin-top: 20px;
  border-radius: 12px;
  line-height: 0;
  transition: transform 160ms var(--ease-out);
}

.modal-store-badge:hover,
.modal-store-badge:focus-visible {
  transform: scale(0.98);
}

.modal-store-badge img {
  width: 158px;
  height: auto;
}

.modal-store-badge.is-disabled {
  display: none;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

a:focus-visible,
button:focus-visible,
.key-filled:focus-visible,
.app-modal:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}

@media (max-width: 980px) {
  .hero,
  .about-grid {
    grid-template-columns: 1fr;
  }

  .hero-note,
  .about-note {
    margin-left: 18px;
  }

  .hero-wall {
    max-width: 720px;
    padding-bottom: 28px;
  }

  .hero-note {
    position: static;
    margin-top: 22px;
  }

  .keyboard-wall {
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 11px;
  }

  .key {
    min-height: clamp(58px, 10vw, 78px);
  }

  .key-icon {
    width: clamp(42px, 7vw, 56px);
    height: clamp(42px, 7vw, 56px);
  }
}

@media (max-width: 640px) {
  .page-shell {
    width: min(100% - 28px, var(--max-width));
    padding-bottom: 38px;
  }

  .site-header,
  .section-label-row,
  .site-footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .site-nav {
    width: 100%;
    justify-content: space-between;
    gap: 12px;
    font-size: 1rem;
  }

  .hero {
    gap: 28px;
    padding-top: 38px;
  }

  h1 {
    font-size: clamp(3.55rem, 20vw, 5.4rem);
  }

  .hero-intro {
    margin-top: 24px;
    font-size: 1.18rem;
  }

  .keyboard-wall {
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 8px;
  }

  .key {
    min-height: 52px;
    border-radius: 12px;
  }

  .key-icon {
    width: 38px;
    height: 38px;
    border-radius: 11px;
  }

  .about-grid h2 {
    font-size: clamp(3rem, 15vw, 4.5rem);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }

  .key-filled:hover,
  .key-filled:focus-visible,
  .modal-store-badge:hover,
  .modal-store-badge:focus-visible {
    transform: none;
  }
}
