/* The public site's pages (home.html, legal.html), when a holding site is public
   (stacks/holding.py, specs/public-site.md). The tokens are index.html's, which
   copies them from frontend/src/App.css -- if the brand moves, move all three. */

@font-face {
  font-family: "Amatic SC";
  src: url("/fonts/AmaticSC-Bold.ttf") format("truetype");
  font-weight: 700;
  font-style: normal;
  font-display: block;
}

:root {
  color-scheme: light;
  --color-accent: #c2410c;
  --color-accent-soft: #fbe9df;
  --color-bg: #f7f9fc;
  --color-surface: #fff;
  --color-text: #1a1a1a;
  --color-text-muted: #666;
  --color-border: #e0e0e0;
  --shadow-card: 0 4px 24px rgba(23, 43, 77, 0.1);
  --radius: 8px;
  --font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  --font-brand: "Amatic SC", cursive;
  --bg-wash: rgba(247, 249, 252, 0.85);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --color-accent: #e2571b;
    --color-accent-soft: #3a2519;
    --color-bg: #1b1f26;
    --color-surface: #22272f;
    --color-text: #e6e8eb;
    --color-text-muted: #9aa1ab;
    --color-border: #2f3540;
    --shadow-card: 0 4px 24px rgba(0, 0, 0, 0.5);
    --bg-wash: rgba(19, 22, 28, 0.8);
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --color-accent: #e2571b;
  --color-accent-soft: #3a2519;
  --color-bg: #1b1f26;
  --color-surface: #22272f;
  --color-text: #e6e8eb;
  --color-text-muted: #9aa1ab;
  --color-border: #2f3540;
  --shadow-card: 0 4px 24px rgba(0, 0, 0, 0.5);
  --bg-wash: rgba(19, 22, 28, 0.8);
}

* {
  box-sizing: border-box;
}
body {
  margin: 0;
  /* Under .bg, and what shows before the first photo arrives. */
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.55;
  padding-inline: max(16px, env(safe-area-inset-left, 0px)) max(16px, env(safe-area-inset-right, 0px));
  padding-block: calc(24px + env(safe-area-inset-top, 0px)) calc(32px + env(safe-area-inset-bottom, 0px));
}
a {
  color: var(--color-accent);
  font-weight: 600;
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}
a:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 3px;
  border-radius: 2px;
}

/* The photo background: the app's eight photos and its wash
   (BackgroundSlideshow.css), cross-faded by CSS instead of a timer. Each photo
   holds 30s with a 2.5s fade, as in the app: one 240s cycle, each layer
   offset by 30s, the first starting already faded in. */
.bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  background: var(--color-bg);
}
.bg i {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0;
  animation: bg-fade 240s linear infinite backwards;
}
.bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--bg-wash);
}
@keyframes bg-fade {
  0% {
    opacity: 0;
  }
  1.04% {
    opacity: 1;
  }
  12.5% {
    opacity: 1;
  }
  13.54% {
    opacity: 0;
  }
  100% {
    opacity: 0;
  }
}
.bg i:nth-child(1) {
  background-image: url("/bg-images/Gemini_Victorian_Houses.jpg");
  animation-delay: -2.5s;
}
.bg i:nth-child(2) {
  background-image: url("/bg-images/Gemini_Devon_Coast.jpg");
  animation-delay: 27.5s;
}
.bg i:nth-child(3) {
  background-image: url("/bg-images/Gemini_Kids_Flat.jpg");
  animation-delay: 57.5s;
}
.bg i:nth-child(4) {
  background-image: url("/bg-images/Gemini_CityPark.jpg");
  animation-delay: 87.5s;
}
.bg i:nth-child(5) {
  background-image: url("/bg-images/Gemini_NewBuilds.jpg");
  animation-delay: 117.5s;
}
.bg i:nth-child(6) {
  background-image: url("/bg-images/Gemini_CityBalcony.jpg");
  animation-delay: 147.5s;
}
.bg i:nth-child(7) {
  background-image: url("/bg-images/Gemini_Farm.jpg");
  animation-delay: 177.5s;
}
.bg i:nth-child(8) {
  background-image: url("/bg-images/Gemini_PeakDistrict.jpg");
  animation-delay: 207.5s;
}
@media (prefers-reduced-motion: reduce) {
  .bg i {
    animation: none;
  }
  .bg i:first-child {
    opacity: 1;
  }
}

.site {
  max-width: 760px;
  margin: 0 auto;
  background: var(--color-surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  overflow: hidden;
}
.site-inner {
  padding: 28px 40px 24px;
  display: flex;
  flex-direction: column;
  gap: 22px;
}
.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.lockup-row {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--color-accent);
}
.lockup-row:hover {
  text-decoration: none;
}
.lockup-row svg {
  width: 34px;
  height: 34px;
}
.lockup-row span {
  font: 700 2.4rem/1 var(--font-brand);
}
.signin {
  font-size: 0.92rem;
}

.hero {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.hero h1 {
  margin: 0;
  font-size: 1.9rem;
  line-height: 1.2;
  text-wrap: balance;
  max-width: 22ch;
}
.hero p {
  margin: 0;
  max-width: 60ch;
  color: var(--color-text-muted);
}
.beta-pill {
  align-self: flex-start;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--color-accent);
  background: var(--color-accent-soft);
  padding: 3px 10px;
  border-radius: 999px;
}

section h2 {
  margin: 0 0 8px;
  font-size: 1.15rem;
}
section p {
  margin: 0 0 10px;
  max-width: 65ch;
}
.small {
  font-size: 0.9rem;
  color: var(--color-text-muted);
}
/* The home page (home.html): one narrow card, like the app's sign-in screen. */
.site-slim {
  max-width: 520px;
}
.access {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
}
.access p {
  margin: 0;
}
.cta {
  display: inline-block;
  padding: 10px 18px;
  border-radius: 999px;
  background: var(--color-accent);
  color: #fff;
}
.cta:hover {
  text-decoration: none;
  filter: brightness(1.08);
}
.hero .small {
  margin: 0;
}

.site-footer {
  border-top: 1px solid var(--color-border);
  padding: 18px 40px 22px;
  font-size: 0.85rem;
  color: var(--color-text-muted);
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.site-footer nav {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
}

/* Legal pages: the rendered markdown (legal_pages.to_html). */
.legal {
  max-width: 68ch;
  overflow-wrap: anywhere;
}
.legal h1 {
  margin: 0 0 12px;
  font-size: 1.6rem;
  text-wrap: balance;
}
.legal h2 {
  font-size: 1.1rem;
  margin: 26px 0 8px;
}
.legal h3 {
  font-size: 1rem;
  margin: 18px 0 6px;
}
.legal p,
.legal ul {
  margin: 0 0 10px;
}
.legal li {
  margin-bottom: 4px;
}
.legal hr {
  border: 0;
  border-top: 1px solid var(--color-border);
  margin: 20px 0;
}
.table-scroll {
  overflow-x: auto;
  margin: 0 0 12px;
}
.legal table {
  border-collapse: collapse;
  font-size: 0.9rem;
  min-width: 480px;
  overflow-wrap: normal;
}
.legal th,
.legal td {
  text-align: left;
  border-bottom: 1px solid var(--color-border);
  padding: 6px 10px 6px 0;
  vertical-align: top;
}
.legal th {
  font-weight: 600;
}

@media (max-width: 640px) {
  .site-inner {
    padding: 22px 20px 20px;
    gap: 20px;
  }
  .site-footer {
    padding: 16px 20px 20px;
  }
  .hero h1 {
    font-size: 1.55rem;
  }
}

@media print {
  body {
    background: none;
    padding: 0;
  }
  .bg {
    display: none;
  }
  .site {
    box-shadow: none;
  }
}
