/* Palmer Family home page.
   One stylesheet, no framework, no web fonts (nothing leaves the origin). */

:root {
  --bg: #f6f1ea;
  --bg-accent: #fbe6d4;
  --surface: #ffffff;
  --border: #e7ddd0;
  --text: #241d16;
  --muted: #6d6054;
  --accent: #d1452f;
  --ring: #e0714a;
  --shadow: 18px 30px 60px -32px rgba(79, 46, 25, .45);
  --shadow-lift: 18px 36px 64px -28px rgba(79, 46, 25, .5);
  --radius: 18px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #16130f;
    --bg-accent: #2a1d14;
    --surface: #221c16;
    --border: #3a2f26;
    --text: #f3ece3;
    --muted: #a99886;
    --accent: #ff9a6a;
    --ring: #ff9a6a;
    --shadow: 18px 30px 60px -34px rgba(0, 0, 0, .8);
    --shadow-lift: 18px 36px 64px -30px rgba(0, 0, 0, .9);
  }
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100dvh;
  background:
    radial-gradient(120% 90% at 12% -10%, var(--bg-accent) 0%, transparent 58%),
    var(--bg);
  background-attachment: fixed;
  color: var(--text);
  font: 16px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  /* Keep content clear of the notch and the home indicator when installed. */
  padding:
    calc(env(safe-area-inset-top) + 2.2rem)
    calc(env(safe-area-inset-right) + 1.15rem)
    calc(env(safe-area-inset-bottom) + 2rem)
    calc(env(safe-area-inset-left) + 1.15rem);
}

.wrap { max-width: 780px; margin: 0 auto; }

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

/* ----------------------------------------------------------- masthead */

.masthead {
  display: flex;
  align-items: center;
  gap: .95rem;
  margin-bottom: 1.9rem;
}

.mark {
  width: 52px; height: 52px;
  border-radius: 14px;
  box-shadow: var(--shadow);
  flex: none;
}

.masthead h1 {
  margin: 0;
  font-size: clamp(1.6rem, 6vw, 2.1rem);
  letter-spacing: -.021em;
  line-height: 1.15;
}

.tagline { margin: .18rem 0 0; color: var(--muted); font-size: .94rem; }

/* ------------------------------------------------------------- banner */

.banner {
  margin: 0 0 1.25rem;
  padding: .7rem .95rem;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  color: var(--muted);
  font-size: .9rem;
  box-shadow: var(--shadow);
}

.banner button {
  margin-left: .5rem;
  font: inherit;
  font-weight: 600;
  color: var(--accent);
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
  text-decoration: underline;
}

/* -------------------------------------------------------------- cards */

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(232px, 1fr));
  gap: .95rem;
}

.card {
  display: flex;
  flex-direction: column;
  gap: .3rem;
  padding: 1.15rem 1.2rem 1.25rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  color: inherit;
  text-decoration: none;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
  /* Stops iOS from flashing a grey overlay on tap. */
  -webkit-tap-highlight-color: transparent;
}

.card:hover, .card:focus-visible {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lift);
  border-color: var(--ring);
}

.card:focus-visible { outline: 2px solid var(--ring); outline-offset: 3px; }

.card:active { transform: translateY(-1px); }

.card-title {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: .6rem;
  font-size: 1.08rem;
  font-weight: 650;
  letter-spacing: -.012em;
}

.card-arrow {
  color: var(--accent);
  font-size: .95rem;
  transition: transform .18s ease;
  flex: none;
}

.card:hover .card-arrow { transform: translate(2px, -2px); }

.card-note {
  margin: 0;
  color: var(--muted);
  font-size: .9rem;
  line-height: 1.45;
}

.card-host {
  margin-top: .35rem;
  color: var(--muted);
  font-size: .78rem;
  letter-spacing: .02em;
  opacity: .85;
  word-break: break-all;
}

/* ------------------------------------------------------ empty / state */

.state {
  grid-column: 1 / -1;
  margin: 0;
  padding: 2.1rem 1.2rem;
  text-align: center;
  color: var(--muted);
  border: 1px dashed var(--border);
  border-radius: var(--radius);
}

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

/* ------------------------------------------------------------- footer */

.footer { margin-top: 2.4rem; text-align: center; }

.footer a {
  color: var(--muted);
  font-size: .82rem;
  text-decoration: none;
  border-bottom: 1px solid var(--border);
  padding-bottom: 1px;
}

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

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
  .card:hover, .card:focus-visible { transform: none; }
}
