/*
 * Phone layout (below 768px). mobile.js sets <html data-layout="mobile">.
 * landscape.js adds `is-portrait` to #landscape when the tall picture loaded.
 */

/* Bottom sheet shown when a project object is tapped on a phone. */
.sheet {
  position: fixed;
  inset: 0;
  background: rgba(43, 42, 39, 0.35);
  display: flex;
  align-items: flex-end;
  z-index: 50;
}
/* display:flex would otherwise override the hidden attribute. */
.sheet[hidden] {
  display: none;
}
.sheet-panel {
  position: relative;
  width: 100%;
  background: var(--cream);
  border-radius: var(--radius) var(--radius) 0 0;
  padding: 20px var(--gutter) calc(20px + env(safe-area-inset-bottom));
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 12px;
  box-shadow: 0 -8px 30px rgba(0, 0, 0, 0.15);
}
.sheet-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 600;
}
.sheet-open {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  padding: 0 20px;
  border-radius: 999px;
  background: var(--honey-yellow);
  color: var(--ink);
  font-weight: 600;
  text-decoration: none;
}
.sheet-close {
  position: absolute;
  top: 6px;
  right: 8px;
  width: 44px;
  height: 44px;
  border: 0;
  background: transparent;
  font-size: 1.4rem;
  color: var(--ink-soft);
  cursor: pointer;
}

@media (max-width: 767px) {
  .site-header {
    padding-top: 16px;
  }

  /* The tall picture: the sea starts lower, so the cards do too. */
  .hero-space {
    height: var(--hero-space, 56vh);
  }
  /* The tall picture is anchored at the top: a vertical crop then takes sea
     (which the cards cover anyway) instead of sky. No overscan: there is no
     pointer parallax on touch screens. */
  .landscape.is-portrait {
    --focus: 50%;
    --overscan: 1;
  }
  .landscape.is-portrait svg {
    top: 0;
    bottom: auto;
    transform-origin: var(--focus) 0;
  }

  /* Tooltips are pointless on touch; the sheet takes over. */
  .landscape-tooltip {
    display: none;
  }

  .grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }
  .grid {
    max-width: 420px;
    margin: 0 auto;
  }
  .projects-heading {
    margin-bottom: 8px;
  }
  .site-footer {
    padding-top: 12px;
  }
}
