/* Casa Bea — casabeahome.com
   Palette: lime-washed plaster, Spanish olive, azulejo blue, clay.
   Type: Gloock (display) / Karla (body) */

:root {
  --paper:      #F6F6F2;
  --surface:    #FFFFFF;
  --surface-2:  #EDEEE7;
  --ink:        #1E241F;
  --ink-soft:   #4C534B;
  --muted:      #757A70;
  --rule:       #DBDDD3;
  --olive:      #55684A;
  --olive-soft: #EAEEE3;
  --azulejo:    #2C5766;
  --clay:       #A86B50;
  --focus:      #2C5766;

  --measure: 34rem;
  --wrap: 68rem;

  --step--1: clamp(0.78rem, 0.76rem + 0.1vw, 0.84rem);
  --step-0:  clamp(1rem, 0.97rem + 0.15vw, 1.09rem);
  --step-1:  clamp(1.2rem, 1.13rem + 0.35vw, 1.42rem);
  --step-2:  clamp(1.5rem, 1.35rem + 0.75vw, 2rem);
  --step-3:  clamp(1.95rem, 1.65rem + 1.5vw, 3rem);
  --step-4:  clamp(2.4rem, 1.85rem + 2.7vw, 4.25rem);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper:      #151915;
    --surface:    #1C211C;
    --surface-2:  #232922;
    --ink:        #E9E9E0;
    --ink-soft:   #B6BBB2;
    --muted:      #8D938A;
    --rule:       #333A32;
    --olive:      #A3B98F;
    --olive-soft: #242C21;
    --azulejo:    #86B6C6;
    --clay:       #D09877;
    --focus:      #86B6C6;
  }
}

:root[data-theme="dark"] {
  --paper:      #151915;
  --surface:    #1C211C;
  --surface-2:  #232922;
  --ink:        #E9E9E0;
  --ink-soft:   #B6BBB2;
  --muted:      #8D938A;
  --rule:       #333A32;
  --olive:      #A3B98F;
  --olive-soft: #242C21;
  --azulejo:    #86B6C6;
  --clay:       #D09877;
  --focus:      #86B6C6;
}

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Karla", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: var(--step-0);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

a { color: inherit; }
a:focus-visible, button:focus-visible, input:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 3px;
}

h1, h2, h3 {
  font-family: "Gloock", ui-serif, Georgia, "Times New Roman", serif;
  font-weight: 400;
  line-height: 1.12;
  text-wrap: balance;
  margin: 0;
  letter-spacing: -0.01em;
}

p { margin: 0; }

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: 20px;
}

.measure { max-width: var(--measure); }

/* ---------- header ---------- */

.site-head {
  position: sticky;
  top: env(safe-area-inset-top, 0px);
  z-index: 20;
  background: color-mix(in srgb, var(--paper) 92%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--rule);
}

.site-head .wrap {
  display: flex;
  align-items: baseline;
  gap: 24px;
  flex-wrap: wrap;
  padding-block: 14px;
}

.brand {
  font-family: "Gloock", ui-serif, Georgia, serif;
  font-size: 1.32rem;
  text-decoration: none;
  letter-spacing: -0.015em;
  white-space: nowrap;
}

.brand em { font-style: normal; color: var(--olive); }

.nav {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  margin-left: auto;
  font-size: var(--step--1);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.nav a { text-decoration: none; color: var(--ink-soft); padding-block: 2px; }
.nav a:hover { color: var(--olive); }
.nav a[aria-current="page"] { color: var(--ink); border-bottom: 1px solid var(--olive); }

/* ---------- shared bits ---------- */

.eyebrow {
  font-size: var(--step--1);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--olive);
  margin: 0;
}

.lede { font-size: var(--step-1); line-height: 1.5; color: var(--ink-soft); }

.section { padding-block: clamp(48px, 7vw, 88px); }
.section + .section { border-top: 1px solid var(--rule); }

.stack { display: flex; flex-direction: column; gap: 16px; }
.stack-lg { display: flex; flex-direction: column; gap: 28px; }

.prose { display: flex; flex-direction: column; gap: 18px; max-width: var(--measure); }
.prose h2 { font-size: var(--step-2); margin-top: 18px; }
.prose h3 { font-size: var(--step-1); margin-top: 10px; }
.prose ul, .prose ol { margin: 0; padding-left: 1.25rem; display: flex; flex-direction: column; gap: 10px; }
.prose a { color: var(--azulejo); text-underline-offset: 3px; }

.btn {
  display: inline-block;
  font-size: var(--step--1);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  text-decoration: none;
  padding: 13px 22px;
  background: var(--olive);
  color: var(--paper);
  border: 0;
  cursor: pointer;
  align-self: flex-start;
}
.btn:hover { background: var(--azulejo); }

.btn-quiet {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--rule);
}
.btn-quiet:hover { background: var(--surface-2); color: var(--ink); }

/* ---------- hero ---------- */

.hero { padding-block: clamp(40px, 6vw, 76px) clamp(36px, 5vw, 64px); }
.hero h1 { font-size: var(--step-4); }
.hero .lede { max-width: 30rem; }
.hero-meta {
  display: flex;
  gap: 10px 20px;
  flex-wrap: wrap;
  font-size: var(--step--1);
  color: var(--muted);
  letter-spacing: 0.04em;
}

/* ---------- room / guide grids ---------- */

.grid {
  display: grid;
  gap: 32px 26px;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 15rem), 1fr));
}

.tile { display: flex; flex-direction: column; gap: 10px; text-decoration: none; }
.tile .frame {
  aspect-ratio: 4 / 5;
  max-width: 100%;
  background: var(--surface-2);
  border: 1px solid var(--rule);
  display: grid;
  place-items: center;
  color: var(--muted);
  font-size: var(--step--1);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-align: center;
  padding: 16px;
}
.tile:hover .frame { border-color: var(--olive); }
.tile h3 { font-size: var(--step-1); }
.tile p { font-size: var(--step--1); color: var(--muted); }

/* ---------- shop-the-room key ---------- */

.room-layout {
  display: grid;
  gap: 36px;
  grid-template-columns: 1fr;
  align-items: start;
}
@media (min-width: 52rem) {
  .room-layout { grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: 48px; }
  .room-layout .room-figure { position: sticky; top: calc(env(safe-area-inset-top, 0px) + 84px); }
}

.room-figure .frame {
  aspect-ratio: 4 / 5;
  max-width: 100%;
  background: var(--surface-2);
  border: 1px solid var(--rule);
  display: grid;
  place-items: center;
  padding: 20px;
  text-align: center;
  color: var(--muted);
  font-size: var(--step--1);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.room-figure figcaption { font-size: var(--step--1); color: var(--muted); margin-top: 10px; }

.key { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }

.key li {
  display: grid;
  grid-template-columns: 2.1rem 1fr auto;
  gap: 4px 14px;
  align-items: baseline;
  padding-block: 16px;
  border-top: 1px solid var(--rule);
}
.key li:last-child { border-bottom: 1px solid var(--rule); }

.key .num {
  font-family: "Gloock", ui-serif, Georgia, serif;
  font-size: 1.1rem;
  color: var(--olive);
  font-variant-numeric: tabular-nums;
}
.key .item { font-weight: 600; }
.key .band {
  font-size: var(--step--1);
  color: var(--muted);
  letter-spacing: 0.04em;
  white-space: nowrap;
}
.key .note {
  grid-column: 2 / -1;
  font-size: var(--step--1);
  color: var(--ink-soft);
  line-height: 1.55;
}
.key .go {
  grid-column: 2 / -1;
  font-size: var(--step--1);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--azulejo);
  text-decoration: none;
  border-bottom: 1px solid currentColor;
  justify-self: start;
  padding-bottom: 1px;
}
.key .go[data-mine="true"] { color: var(--clay); }

/* ---------- callouts ---------- */

.note-box {
  background: var(--olive-soft);
  border-left: 3px solid var(--olive);
  padding: 20px 22px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-width: var(--measure);
}
.note-box .eyebrow { color: var(--olive); }
.note-box p { font-size: var(--step--1); line-height: 1.6; color: var(--ink-soft); }

.disclosure-line {
  font-size: var(--step--1);
  color: var(--muted);
  max-width: var(--measure);
  line-height: 1.55;
}

/* ---------- signup ---------- */

.signup { background: var(--surface-2); }
.signup form { display: flex; gap: 10px; flex-wrap: wrap; max-width: 30rem; }
.signup input[type="email"] {
  flex: 1 1 14rem;
  min-width: 0;
  padding: 13px 14px;
  border: 1px solid var(--rule);
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  font-size: var(--step--1);
}

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

.site-foot {
  border-top: 1px solid var(--rule);
  padding-block: 40px 56px;
  font-size: var(--step--1);
  color: var(--muted);
}
.site-foot .wrap { display: flex; flex-direction: column; gap: 18px; }
.foot-nav { display: flex; gap: 18px; flex-wrap: wrap; }
.foot-nav a { color: var(--ink-soft); text-decoration: none; }
.foot-nav a:hover { color: var(--olive); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

/* ---------- plain key list (finds, no numbering) ---------- */

.key.plain li { grid-template-columns: 1fr auto; }
.key.plain .note,
.key.plain .go { grid-column: 1 / -1; }

.finds-section { scroll-margin-top: calc(env(safe-area-inset-top, 0px) + 84px); }

/* ---------- about: portrait beside the prose ---------- */

.about-layout {
  display: grid;
  gap: 32px;
  grid-template-columns: 1fr;
  align-items: start;
}

@media (min-width: 52rem) {
  .about-layout { grid-template-columns: minmax(0, 17rem) minmax(0, 1fr); gap: 48px; }
  .about-layout .portrait { position: sticky; top: calc(env(safe-area-inset-top, 0px) + 84px); }
}

.portrait { margin: 0; max-width: 24rem; }

.portrait img,
.portrait .frame {
  aspect-ratio: 4 / 5;
  width: 100%;
  max-width: 100%;
  object-fit: cover;
  background: var(--surface-2);
  border: 1px solid var(--rule);
}

.portrait .frame {
  display: grid;
  place-items: center;
  padding: 20px;
  text-align: center;
  color: var(--muted);
  font-size: var(--step--1);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  line-height: 1.7;
}

.portrait figcaption {
  margin-top: 10px;
  font-size: var(--step--1);
  color: var(--muted);
  line-height: 1.5;
}
