/* Stone Owl — stoneowl.co */

:root {
  --ink: #000;
  --paper: #fff;
  --muted: #8a8a8a;
  --rule: 3px;
  --gutter: 16px;
}

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

html, body { margin: 0; }

body {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--paper);
  color: var(--ink);
  font-family: Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

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

/* ---------- Top bar ---------- */

.topbar {
  border-bottom: var(--rule) solid var(--ink);
  padding: 14px var(--gutter);
}

.social {
  list-style: none;
  margin: 0 auto;
  padding: 0;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: clamp(2px, 3vw, 44px);
}

.social a {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 10px;
  color: var(--ink);
  fill: currentColor;
  transition: background-color .2s ease, color .2s ease, transform .2s ease;
}

.social svg { width: 24px; height: 24px; }

.social a:hover,
.social a:focus-visible {
  background: var(--ink);
  color: var(--paper);
  transform: translateY(-2px);
}

.social a:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }

@media (max-width: 520px) {
  .topbar { padding-block: 10px; }
  .social { gap: 0; justify-content: space-between; max-width: 360px; }
  .social a { width: 38px; height: 38px; }
  .social svg { width: 22px; height: 22px; }
}

/* ---------- Stage ---------- */

.stage {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  padding: clamp(20px, 3vw, 28px) var(--gutter) 0;
  --stack-gap: clamp(18px, 4vw, 40px);
  gap: var(--stack-gap);
  overflow-x: clip; /* the zoomed skyline can be wider than a phone screen */
}

.wordmark {
  margin: 0;
  width: min(865px, 100%);
}

.owl {
  width: min(664px, 92%);
  margin-top: auto; /* any spare height goes above the owl, so it stays perched on the skyline */
}

.skyline {
  width: min(979px, 100%);
  margin-bottom: -1px; /* sit flush on the footer */
  /* Tuck up under the owl: the middle of the skyline image is open sky, so the owl's
     point drops into it. 8% of the skyline's width ≈ 28% of its height. */
  margin-top: calc(-1 * var(--stack-gap) - min(979px, 100%) * 0.08);
  mix-blend-mode: multiply; /* white background drops out, so the growing skyline never covers the owl */
}

/* Scale from the bottom edge so the skyline grows upward and stays planted on the footer */
.skyline img {
  transform-origin: 50% 100%;
}

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

.footer {
  background: var(--ink);
  color: var(--paper);
  text-align: center;
  padding: 40px var(--gutter) 44px;
  font-size: 13px;
  letter-spacing: .06em;
}

.footer p { margin: 0; }

.footer .credit {
  margin-top: 8px;
  font-size: 11px;
  color: var(--muted);
  letter-spacing: .04em;
}

.footer a {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color .2s ease, border-color .2s ease;
}

.footer a:hover,
.footer a:focus-visible { color: var(--paper); border-color: currentColor; }

/* ---------- Entrance ---------- */

@media (prefers-reduced-motion: no-preference) {
  .wordmark, .owl, .skyline {
    animation: rise .9s cubic-bezier(.2, .7, .2, 1) both;
  }
  .owl     { animation-delay: .12s; }
  .skyline { animation-delay: .24s; }

  /* Slow push-in on the skyline: 100% → 120%, then holds */
  .skyline img {
    animation: skyline-zoom 30s cubic-bezier(.25, .1, .25, 1) .6s both;
  }

  @keyframes skyline-zoom {
    from { transform: scale(1); }
    to   { transform: scale(1.2); }
  }

  @keyframes rise {
    from { opacity: 0; transform: translateY(12px); }
    to   { opacity: 1; transform: none; }
  }
}
