/* ============================================================
   CASA TRIGONO — casatrigono.com
   Editorial, photography-led. Bebas Neue + Inter.
   Cream #F1EBDD · Charcoal #1F1B17 · Door Yellow #E9B824
   ============================================================ */

:root {
  --cream: #F1EBDD;
  --cream-deep: #E9E1CE;
  --char: #1F1B17;
  --ink: #141110;
  --yellow: #E9B824;
  --moss: #697E54;
  --adobe: #B66E54;
  --line: rgba(31, 27, 23, 0.2);
  --line-light: rgba(241, 235, 221, 0.22);
  --pad: clamp(20px, 5vw, 64px);
  --max: 1360px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--cream);
  color: var(--char);
  font-family: "Inter", system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; height: auto; }

a { color: inherit; }

::selection { background: var(--yellow); color: var(--ink); }

/* ---------- type ---------- */

.display {
  font-family: "Bebas Neue", sans-serif;
  font-weight: 400;
  line-height: 0.92;
  letter-spacing: 0.01em;
  margin: 0;
  text-wrap: balance;
}

.display-xl { font-size: clamp(56px, 11vw, 170px); }
.display-lg { font-size: clamp(44px, 7vw, 104px); }
.display-md { font-size: clamp(32px, 4.5vw, 64px); }
.display-sm { font-size: clamp(24px, 3vw, 40px); }

.micro {
  font-family: "Inter", sans-serif;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.kicker {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: clamp(20px, 3vw, 36px);
}

.kicker::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line);
}

.dark .kicker::after { background: var(--line-light); }

.kicker .num { color: var(--adobe); }
.dark .kicker .num { color: var(--yellow); }

.lede {
  font-size: clamp(17px, 1.6vw, 21px);
  line-height: 1.65;
  max-width: 56ch;
}

.body-copy { max-width: 62ch; }
.body-copy p { margin: 0 0 1.2em; }

/* ---------- buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 15px 30px 13px;
  border: 1px solid var(--char);
  border-radius: 999px;
  background: var(--char);
  color: var(--cream);
  font-family: "Inter", sans-serif;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  text-decoration: none;
  transition: background 0.2s, color 0.2s, border-color 0.2s, transform 0.2s;
}

.btn:hover { background: transparent; color: var(--char); transform: translateY(-1px); }

.btn--ghost { background: transparent; color: var(--char); }
.btn--ghost:hover { background: var(--char); color: var(--cream); }

.btn--yellow { background: var(--yellow); border-color: var(--yellow); color: var(--ink); }
.btn--yellow:hover { background: transparent; border-color: var(--yellow); color: inherit; }

.dark .btn { border-color: var(--cream); background: var(--cream); color: var(--ink); }
.dark .btn:hover { background: transparent; color: var(--cream); }
.dark .btn--ghost { background: transparent; color: var(--cream); }
.dark .btn--ghost:hover { background: var(--cream); color: var(--ink); }
.dark .btn--yellow { background: var(--yellow); border-color: var(--yellow); color: var(--ink); }
.dark .btn--yellow:hover { background: transparent; color: var(--yellow); }

.btn-row { display: flex; flex-wrap: wrap; gap: 14px; margin-top: clamp(24px, 3vw, 40px); }

/* ---------- layout ---------- */

.wrap { max-width: var(--max); margin: 0 auto; padding-inline: var(--pad); }

section { position: relative; }

.section-pad { padding-block: clamp(72px, 10vw, 160px); }
.section-pad-sm { padding-block: clamp(48px, 6vw, 96px); }

.dark { background: var(--ink); color: var(--cream); }
.dark-soft { background: var(--char); color: var(--cream); }

.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(32px, 6vw, 96px);
  align-items: center;
}

.split--top { align-items: start; }

@media (max-width: 860px) {
  .split { grid-template-columns: 1fr; }
}

/* ---------- header ---------- */

.site-header {
  position: absolute;
  inset: 0 0 auto 0;
  z-index: 50;
  padding-block: clamp(18px, 2.5vw, 30px);
}

.site-header--solid {
  position: relative;
  background: var(--cream);
  border-bottom: 1px solid var(--line);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand { display: flex; flex-direction: column; gap: 6px; text-decoration: none; }
.brand svg.wordmark { width: clamp(170px, 18vw, 250px); height: auto; }
.brand .brand-sub { font-size: 9px; font-weight: 600; letter-spacing: 0.3em; text-transform: uppercase; opacity: 0.85; }

.site-header--overlay { color: var(--cream); }
.site-header--overlay .brand { color: var(--cream); }

.main-nav { display: flex; align-items: center; gap: clamp(18px, 2.4vw, 36px); }

.main-nav a {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  text-decoration: none;
  opacity: 0.9;
  padding-bottom: 4px;
  border-bottom: 1px solid transparent;
  transition: opacity 0.2s, border-color 0.2s;
}

.main-nav a:hover { opacity: 1; border-color: currentColor; }
.main-nav a.is-current { border-color: currentColor; opacity: 1; }

.main-nav .nav-book {
  border: 1px solid currentColor;
  border-radius: 999px;
  padding: 10px 20px 8px;
  opacity: 1;
}

.main-nav .nav-book:hover { background: var(--yellow); border-color: var(--yellow); color: var(--ink); }

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid currentColor;
  border-radius: 999px;
  color: inherit;
  font: 600 11px/1 "Inter", sans-serif;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  padding: 11px 18px;
  cursor: pointer;
}

/* mobile menu */
.mobile-menu {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 100;
  background: var(--ink);
  color: var(--cream);
  padding: var(--pad);
  flex-direction: column;
}

.mobile-menu.is-open { display: flex; }

.mobile-menu__top { display: flex; justify-content: space-between; align-items: center; }
.mobile-menu__top svg.wordmark { width: 180px; height: auto; }

.mobile-menu nav { display: flex; flex-direction: column; justify-content: center; flex: 1; gap: 4px; }

.mobile-menu nav a {
  font-family: "Bebas Neue", sans-serif;
  font-size: clamp(40px, 10vw, 64px);
  line-height: 1.1;
  text-decoration: none;
  opacity: 0.92;
}

.mobile-menu nav a:hover { color: var(--yellow); }

.mobile-menu__foot { display: flex; gap: 20px; flex-wrap: wrap; }
.mobile-menu__foot a { font-size: 11px; letter-spacing: 0.2em; text-transform: uppercase; font-weight: 600; text-decoration: none; opacity: 0.7; }

@media (max-width: 920px) {
  .main-nav { display: none; }
  .nav-toggle { display: inline-block; }
}

/* ---------- hero ---------- */

.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: flex-end;
  color: var(--cream);
  isolation: isolate;
  overflow: hidden;
}

.hero--short { min-height: clamp(480px, 72svh, 760px); }

.hero__media {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: -2;
}

.hero__media picture {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
}

.hero__media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
  object-position: center;
  z-index: -2;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(to bottom, rgba(20,17,16,0.42) 0%, rgba(20,17,16,0.05) 38%, rgba(20,17,16,0.0) 55%, rgba(20,17,16,0.62) 100%);
}

.hero__content { width: 100%; padding-block: clamp(40px, 6vw, 80px); }

.hero__kicker { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; }
.hero__kicker .aicon { width: 30px; height: auto; }

.hero__sub { max-width: 52ch; font-size: clamp(15px, 1.5vw, 19px); line-height: 1.6; margin-top: 22px; }

.hero__foot {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 24px;
  flex-wrap: wrap;
}

.hero .coords { font-size: 11px; letter-spacing: 0.22em; text-transform: uppercase; font-weight: 600; opacity: 0.8; }

/* ---------- stat band ---------- */

.stat-band {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  overflow: hidden;
}

.dark .stat-band { border-color: var(--line-light); }

.stat-band ul {
  list-style: none;
  margin: 0;
  padding: clamp(18px, 2.4vw, 30px) 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  column-gap: clamp(20px, 3.5vw, 56px);
  row-gap: 8px;
}

.stat-band li {
  font-family: "Bebas Neue", sans-serif;
  font-size: clamp(20px, 2.6vw, 34px);
  letter-spacing: 0.04em;
  display: flex;
  align-items: center;
  gap: clamp(20px, 3.5vw, 56px);
  white-space: nowrap;
}

.stat-band li + li::before { content: "◆"; font-size: 0.4em; color: var(--adobe); }

/* ---------- imagery ---------- */

figure { margin: 0; }

figcaption {
  margin-top: 12px;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  opacity: 0.65;
}

.frame img { width: 100%; height: 100%; object-fit: cover; }

.ratio-45 { aspect-ratio: 4 / 5; }
.ratio-34 { aspect-ratio: 3 / 4; }
.ratio-43 { aspect-ratio: 4 / 3; }
.ratio-32 { aspect-ratio: 3 / 2; }
.ratio-169 { aspect-ratio: 16 / 9; }
.ratio-21 { aspect-ratio: 2 / 1; }
.ratio-11 { aspect-ratio: 1 / 1; }

.full-bleed { width: 100%; }
.full-bleed img { width: 100%; max-height: 86svh; object-fit: cover; }

/* editorial photo grid */
.photo-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: clamp(14px, 2vw, 28px);
}

.photo-grid .pg-a { grid-column: 1 / span 7; }
.photo-grid .pg-b { grid-column: 8 / span 5; align-self: end; }
.photo-grid .pg-c { grid-column: 1 / span 5; }
.photo-grid .pg-d { grid-column: 6 / span 7; }

@media (max-width: 760px) {
  .photo-grid .pg-a, .photo-grid .pg-b, .photo-grid .pg-c, .photo-grid .pg-d { grid-column: 1 / -1; }
}

/* simple n-up grid */
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: clamp(14px, 2vw, 28px); }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(14px, 2vw, 28px); }

@media (max-width: 860px) {
  .grid-3 { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 560px) {
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
}

/* horizontal film strip (then/now) */
.strip {
  display: flex;
  gap: clamp(16px, 2vw, 28px);
  overflow-x: auto;
  padding-bottom: 16px;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
}

.strip::-webkit-scrollbar { height: 6px; }
.strip::-webkit-scrollbar-thumb { background: var(--line-light); border-radius: 3px; }

.strip figure {
  flex: 0 0 auto;
  width: clamp(240px, 34vw, 460px);
  scroll-snap-align: start;
}

.strip img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; }

/* ---------- room index (house page) ---------- */

.room-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(28px, 5vw, 80px);
  align-items: center;
  padding-block: clamp(40px, 6vw, 80px);
  border-top: 1px solid var(--line);
}

.room-row:last-of-type { border-bottom: 1px solid var(--line); }

.room-row:nth-of-type(even) .room-row__media { order: 2; }

@media (max-width: 860px) {
  .room-row { grid-template-columns: 1fr; }
  .room-row:nth-of-type(even) .room-row__media { order: 0; }
}

.room-row__num {
  font-family: "Bebas Neue", sans-serif;
  font-size: clamp(15px, 1.4vw, 20px);
  color: var(--adobe);
  letter-spacing: 0.08em;
  margin-bottom: 6px;
}

.room-row h3 { margin-block: 0 14px; }
.room-row p { max-width: 48ch; margin: 0; }

/* ---------- feature tiles (stay page) ---------- */

.tiles { display: grid; grid-template-columns: repeat(2, 1fr); gap: clamp(14px, 2vw, 28px); }

@media (max-width: 760px) { .tiles { grid-template-columns: 1fr; } }

.tile { position: relative; overflow: hidden; color: var(--cream); }
.tile img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; transition: transform 0.6s ease; }
.tile:hover img { transform: scale(1.03); }

.tile__label {
  position: absolute;
  inset: auto 0 0 0;
  padding: 18px 22px;
  background: linear-gradient(to top, rgba(20,17,16,0.72), rgba(20,17,16,0));
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
}

.tile__label .t { font-family: "Bebas Neue", sans-serif; font-size: clamp(22px, 2.6vw, 34px); letter-spacing: 0.04em; }
.tile__label .d { font-size: 10.5px; font-weight: 600; letter-spacing: 0.18em; text-transform: uppercase; opacity: 0.85; text-align: right; }

/* checklist */
.fact-list { list-style: none; margin: 0; padding: 0; }

.fact-list li {
  display: grid;
  grid-template-columns: minmax(120px, 200px) 1fr;
  gap: 18px;
  padding: 16px 0 14px;
  border-top: 1px solid var(--line);
  font-size: 15px;
}

.dark .fact-list li { border-color: var(--line-light); }

.fact-list li:last-child { border-bottom: 1px solid var(--line); }
.dark .fact-list li:last-child { border-color: var(--line-light); }

.fact-list .k { font-family: "Bebas Neue", sans-serif; font-size: 20px; letter-spacing: 0.05em; }

@media (max-width: 560px) {
  .fact-list li { grid-template-columns: 1fr; gap: 2px; }
}

/* ---------- link cards (book page) ---------- */

.link-cards { display: grid; grid-template-columns: repeat(2, 1fr); gap: clamp(14px, 2vw, 28px); }

@media (max-width: 760px) { .link-cards { grid-template-columns: 1fr; } }

.link-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 48px;
  min-height: 250px;
  padding: clamp(24px, 3vw, 40px);
  border: 1px solid var(--line);
  text-decoration: none;
  transition: background 0.25s, color 0.25s, border-color 0.25s;
}

.link-card:hover { background: var(--char); color: var(--cream); border-color: var(--char); }
.link-card:hover .lc-go { color: var(--yellow); }

.dark .link-card { border-color: var(--line-light); }
.dark .link-card:hover { background: var(--cream); color: var(--ink); border-color: var(--cream); }
.dark .link-card:hover .lc-go { color: var(--adobe); }

.link-card .lc-top { display: flex; justify-content: space-between; gap: 16px; align-items: baseline; }
.link-card .lc-title { font-family: "Bebas Neue", sans-serif; font-size: clamp(30px, 3.4vw, 48px); line-height: 1; }
.link-card .lc-go { font-family: "Bebas Neue", sans-serif; font-size: 26px; transition: color 0.25s; }
.link-card .lc-desc { font-size: 14.5px; line-height: 1.6; max-width: 40ch; opacity: 0.85; margin: 0; }

/* ---------- big CTA band ---------- */

.cta-band { position: relative; isolation: isolate; color: var(--cream); overflow: hidden; }

.cta-band__media, .cta-band__media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: -2;
}

.cta-band::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: rgba(20, 17, 16, 0.55);
}

.cta-band .wrap { padding-block: clamp(90px, 14vw, 200px); text-align: center; }
.cta-band .btn-row { justify-content: center; }

/* ---------- footer ---------- */

.site-footer { background: var(--ink); color: var(--cream); padding-block: clamp(56px, 7vw, 96px) 36px; }

.site-footer .wordmark-big { width: min(720px, 86%); height: auto; margin-bottom: clamp(40px, 6vw, 72px); }

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: clamp(28px, 4vw, 64px);
  padding-bottom: clamp(40px, 5vw, 64px);
  border-bottom: 1px solid var(--line-light);
}

@media (max-width: 860px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .footer-grid { grid-template-columns: 1fr; } }

.footer-grid h4 { margin: 0 0 14px; font-size: 11px; font-weight: 600; letter-spacing: 0.22em; text-transform: uppercase; opacity: 0.6; }
.footer-grid ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 9px; }
.footer-grid a { text-decoration: none; font-size: 14px; opacity: 0.9; }
.footer-grid a:hover { color: var(--yellow); opacity: 1; }

.footer-blurb { font-size: 14.5px; line-height: 1.7; opacity: 0.85; max-width: 38ch; margin: 0; }
.footer-grid .aicon { width: 44px; height: auto; margin-bottom: 16px; color: var(--yellow); }

.footer-meta {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding-top: 28px;
  font-size: 10.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-weight: 600;
  opacity: 0.55;
}

/* ---------- reveal ---------- */

.reveal { opacity: 0; transform: translateY(26px); transition: opacity 0.8s ease, transform 0.8s ease; }
.reveal.is-in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}

/* ---------- misc ---------- */

.note-yellow {
  display: inline-block;
  background: var(--yellow);
  color: var(--ink);
  padding: 6px 12px 4px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.divider-icon { display: flex; justify-content: center; padding-block: clamp(40px, 6vw, 72px); }
.divider-icon .aicon { width: 44px; height: auto; color: var(--adobe); }
