/*
 * Alba Marina — v2 "Limestone". An invented agency's brand; the only thing on the
 * page that is not decoration is #listings, and the --eo-* properties on it are
 * how the real EstateOps widget inherits this look across its shadow root.
 *
 * Rules learned from v1 (design-history/README.md):
 *   1. Colour comes from the photographs, not from drawn shapes.
 *   2. ONE ground from top to bottom — the limestone below. No section gets its
 *      own background colour; the hero photo fades into the same stone.
 *
 * A separate file rather than a <style> block so the page's CSP can stay strict.
 */

:root {
  --stone: #f3ece1;      /* the page, everywhere */
  --stone-deep: #e8dece; /* rules, placeholders */
  --card: #fbf8f3;
  --sea: #1e3a52;        /* type, buttons, badges — from the dusk water */
  --sea-deep: #142838;
  --ink: #1b2430;
  --muted: #5b6573;
  --gold: #9a6d33;       /* the lit limestone; large type only */

  --display: 'DM Serif Display', Georgia, serif;
  --body: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --wrap: 1200px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--body);
  color: var(--ink);
  background: var(--stone);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
em { font-style: italic; }

h1, h2, h3 { font-weight: 400; }
h2 {
  margin: 0;
  font-family: var(--display);
  font-size: clamp(34px, 4.4vw, 56px);
  line-height: 1.05;
  letter-spacing: -0.01em;
  color: var(--sea);
}
h2 em { color: var(--gold); }

.eyebrow {
  margin: 0 0 16px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: #f6e7cc;
}
.eyebrow-dark { color: var(--gold); }

/* ── Demonstration banner ────────────────────────────────────────────────── */

.demo-banner {
  background: repeating-linear-gradient(45deg, var(--sea-deep), var(--sea-deep) 12px, #1b3346 12px, #1b3346 24px);
  color: #e9eef3;
  font-size: 13px;
  padding: 9px 16px;
  text-align: center;
}
.demo-banner strong { color: #f1d39c; letter-spacing: .04em; }

/* ── Hero: the photograph, fading into the stone ─────────────────────────── */

.hero {
  position: relative;
  min-height: min(88vh, 860px);
  display: flex;
  flex-direction: column;
  color: #fff;
  background:
    linear-gradient(180deg, rgba(20, 40, 56, .35) 0%, rgba(20, 40, 56, 0) 28%),
    linear-gradient(90deg, rgba(20, 40, 56, .72) 0%, rgba(20, 40, 56, .35) 42%, rgba(20, 40, 56, 0) 68%),
    linear-gradient(180deg, rgba(243, 236, 225, 0) 78%, var(--stone) 100%),
    url('img/xlendi-dawn.jpg') 62% 55% / cover no-repeat;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  max-width: var(--wrap);
  width: 100%;
  margin: 0 auto;
  padding: 24px;
}

.wordmark {
  font-family: var(--display);
  font-size: 28px;
  text-decoration: none;
  letter-spacing: .01em;
  margin: 0;
}
.wordmark em { color: #f1d39c; }
.wordmark-dark { color: var(--sea); }
.wordmark-dark em { color: var(--gold); }

.topbar-links { display: flex; align-items: center; gap: 28px; font-size: 14px; font-weight: 500; }
.topbar-links a { text-decoration: none; opacity: .9; }
.topbar-links a:hover { opacity: 1; text-decoration: underline; text-underline-offset: 4px; }
.topbar-links .pill {
  padding: 9px 18px;
  border: 1px solid rgba(255, 255, 255, .7);
  border-radius: 999px;
}
.topbar-links .pill:hover { background: rgba(255, 255, 255, .14); text-decoration: none; }

.hero-copy {
  max-width: var(--wrap);
  width: 100%;
  margin: auto auto 0;
  padding: 0 24px 15vh;
}

.hero h1 {
  margin: 0;
  max-width: 11ch;
  font-family: var(--display);
  font-size: clamp(52px, 8vw, 112px);
  line-height: .98;
  letter-spacing: -0.015em;
  text-shadow: 0 2px 30px rgba(20, 40, 56, .35);
}
.hero h1 em { color: #f6e2bd; }

.lede {
  max-width: 40ch;
  margin: 24px 0 0;
  font-size: clamp(16px, 1.4vw, 19px);
  color: rgba(255, 255, 255, .92);
}

.cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }

.btn {
  display: inline-block;
  padding: 14px 26px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 15px;
  text-decoration: none;
  transition: background .2s ease, color .2s ease;
}
.btn-light { background: var(--stone); color: var(--sea); }
.btn-light:hover { background: #fff; }
.btn-outline { color: #fff; border: 1px solid rgba(255, 255, 255, .75); }
.btn-outline:hover { background: rgba(255, 255, 255, .14); }

.photo-caption {
  position: absolute;
  right: 24px;
  bottom: 18px;
  margin: 0;
  font-size: 12px;
  color: var(--muted);
}

/* ── At a glance ─────────────────────────────────────────────────────────── */

.facts {
  list-style: none;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 36px 24px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  border-bottom: 1px solid var(--stone-deep);
  color: var(--muted);
  font-size: 14px;
}
.facts span {
  display: block;
  font-family: var(--display);
  font-size: 24px;
  color: var(--sea);
}

/* ── Listings ────────────────────────────────────────────────────────────── */

.listings { max-width: var(--wrap); margin: 0 auto; padding: 88px 24px 96px; }

.section-head { max-width: 680px; margin-bottom: 40px; }
.section-sub { margin: 18px 0 0; color: var(--muted); font-size: 17px; max-width: 54ch; }

#listings {
  --eo-font: var(--body);
  --eo-fg: var(--ink);
  --eo-muted: var(--muted);
  --eo-bg: transparent;
  --eo-card-bg: var(--card);
  --eo-border: var(--stone-deep);
  --eo-radius: 6px;
  --eo-accent: var(--sea);
  --eo-accent-fg: #fff;
  --eo-gap: 24px;
  display: block;
}

/* Visible only until the widget attaches its shadow root. */
.waking { color: var(--muted); }
.waking p { margin: 0 0 28px; max-width: 52ch; }
.waking strong { color: var(--sea); }
.skeletons { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.skeleton {
  height: 330px;
  border-radius: 6px;
  background: linear-gradient(100deg, var(--stone-deep) 30%, var(--card) 50%, var(--stone-deep) 70%);
  background-size: 300% 100%;
  animation: sheen 1.6s ease-in-out infinite;
}

.cfg {
  margin: 0 0 32px;
  padding: 14px 16px;
  border: 1px dashed var(--stone-deep);
  border-radius: 6px;
  font-size: 13px;
  color: var(--muted);
  background: var(--card);
}
.cfg[hidden] { display: none; }

/* ── About: photo + copy ─────────────────────────────────────────────────── */

.split {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 24px 24px 104px;
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 64px;
  align-items: center;
  border-top: 1px solid var(--stone-deep);
  padding-top: 96px;
}
.split-photo { margin: 0; }
.split-photo img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; border-radius: 6px; }
.split-copy > p { color: var(--muted); font-size: 17px; margin: 22px 0 0; }

.steps { list-style: none; margin: 36px 0 0; padding: 0; display: grid; gap: 22px; }
.steps li { display: grid; grid-template-columns: 52px 1fr; gap: 12px; padding-top: 22px; border-top: 1px solid var(--stone-deep); }
.num { font-family: var(--display); font-size: 28px; line-height: 1; color: var(--gold); }
.steps h3 { margin: 0 0 4px; font-size: 17px; font-weight: 600; color: var(--sea); }
.steps p { margin: 0; color: var(--muted); }

/* ── Photo band ──────────────────────────────────────────────────────────── */

.band { position: relative; max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }
.band img { width: 100%; height: clamp(320px, 46vw, 560px); object-fit: cover; border-radius: 6px; }
/* A stone panel cut into the photo's corner: the same ground as the page, so
   the quote never fights the busy window frames behind it. */
.band-quote {
  position: absolute;
  left: 24px;
  bottom: 0;
  margin: 0;
  padding: 28px 40px 0 0;
  max-width: 19ch;
  background: var(--stone);
  border-top-right-radius: 6px;
  font-family: var(--display);
  font-size: clamp(26px, 3.2vw, 42px);
  line-height: 1.1;
  color: var(--sea);
}
.band-quote em { color: var(--gold); }

/* ── Footer: same stone, sea-blue type ───────────────────────────────────── */

.footer { margin-top: 104px; border-top: 1px solid var(--stone-deep); }
.footer-inner { max-width: var(--wrap); margin: 0 auto; padding: 72px 24px 40px; }
.footer-lead { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 16px; }
.footer h2 { font-size: clamp(36px, 5vw, 64px); }

.contact-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 48px;
  padding-top: 28px;
  border-top: 1px solid var(--stone-deep);
}
.contact-grid p { margin: 0; color: var(--ink); }
.contact-grid .label {
  margin-bottom: 6px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--gold);
}
.fineprint { margin: 56px 0 0; font-size: 13px; color: var(--muted); }
.credits { margin: 8px 0 0; font-size: 12px; color: var(--muted); }
.credits a { color: var(--sea); }

/* ── Motion ──────────────────────────────────────────────────────────────── */

@keyframes sheen {
  from { background-position: 100% 0; }
  to   { background-position: 0 0; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ── Smaller screens ─────────────────────────────────────────────────────── */

@media (max-width: 900px) {
  .split { grid-template-columns: 1fr; gap: 40px; }
  .split-photo img { aspect-ratio: 3 / 2; }
  .facts, .contact-grid, .skeletons { grid-template-columns: 1fr; }
  .facts { gap: 14px; }
  .skeleton:nth-child(n + 2) { display: none; }
}

@media (max-width: 560px) {
  .topbar { padding: 16px; }
  .topbar-links { gap: 14px; }
  .topbar-links a:not(.pill) { display: none; }
  .wordmark { font-size: 24px; }
  .hero { background-position: 70% 55%, 0 0, 0 0, 70% 55%; }
  .hero-copy { padding: 0 16px 12vh; }
  .photo-caption { right: 16px; }
  .facts, .listings, .split, .band, .footer-inner { padding-left: 16px; padding-right: 16px; }
  /* Too narrow to overlap the photo: the quote sits under it instead. */
  .band-quote { position: static; padding: 20px 0 0; max-width: none; }
}
