/* Page structure: container, header, hero, sections, footer, dock */

.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding-inline: 1.25rem;
}

.section {
  padding-block: 5rem;
}

/* Editorial heading: title on the left, short note or control on the right */
.section__head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem 2rem;
  margin-bottom: 2rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--line);
}

.section__head p {
  max-width: 22rem;
  color: var(--muted);
}

/* ---------- Header ---------- */

.header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  height: 66px;
}

.nav__logo {
  font-family: var(--display);
  font-size: 1.15rem;
  font-weight: 900;
  letter-spacing: -0.02em;
}

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

.nav__links {
  display: flex;
  gap: 0.25rem;
}

.nav__links a {
  padding: 0.4rem 0.8rem;
  border-radius: 8px;
  color: var(--muted);
  font-size: 0.95rem;
  font-weight: 600;
  transition: color 0.15s, background 0.15s;
}

.nav__links a:hover {
  color: var(--text);
  background: var(--surface);
}

.nav__actions {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

/* ---------- Hero ---------- */

.hero {
  display: grid;
  grid-template-columns: 1.25fr 1fr;
  align-items: center;
  gap: 3.5rem;
  padding-block: 6rem 5rem;
}

.hero__title {
  font-size: clamp(2.8rem, 7.5vw, 5.4rem);
  font-weight: 900;
  line-height: 0.98;
  letter-spacing: -0.035em;
}

.hero__title em {
  display: block;
}

.hero__lead {
  max-width: 34rem;
  margin-top: 1.5rem;
  color: var(--muted);
  font-size: 1.12rem;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 2rem;
}

/* ---------- Grids ---------- */

.grid-3,
.grid-4 {
  display: grid;
  gap: 1rem;
}

.grid-3 {
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

.grid-4 {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

/* ---------- Footer ---------- */

.footer {
  overflow: hidden;
  padding-block: 3rem 6.5rem; /* room for the bottom dock */
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.88rem;
}

/* Huge outlined wordmark */
.footer__mark {
  margin-bottom: 1.5rem;
  font-family: var(--display);
  font-size: clamp(3rem, 15vw, 11rem);
  font-weight: 900;
  line-height: 0.9;
  letter-spacing: -0.04em;
  color: transparent;
  -webkit-text-stroke: 1.5px var(--line-2);
  user-select: none;
}

.footer__inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.75rem;
}

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

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

.dock {
  position: fixed;
  bottom: calc(16px + env(safe-area-inset-bottom, 0px));
  left: 50%;
  z-index: 20;
  display: flex;
  gap: 2px;
  max-width: calc(100% - 2rem);
  padding: 5px;
  border: 1px solid var(--line-2);
  border-radius: 99px;
  background: color-mix(in srgb, var(--surface) 90%, transparent);
  backdrop-filter: blur(12px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
  transform: translateX(-50%);
}

.dock a {
  padding: 0.45rem 0.9rem;
  border-radius: 99px;
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 600;
  white-space: nowrap;
  transition: color 0.15s, background 0.15s;
}

.dock a:hover {
  color: var(--text);
}

.dock a.is-active {
  background: var(--accent);
  color: var(--accent-text);
}

/* ---------- Mobile ---------- */

@media (max-width: 860px) {
  .hero {
    grid-template-columns: 1fr;
    gap: 2.5rem;
    padding-block: 3.5rem;
  }

  .nav__links {
    display: none; /* the bottom dock handles navigation */
  }

  .section {
    padding-block: 3.5rem;
  }

  .dock a {
    padding: 0.45rem 0.65rem;
  }
}
