/* Heroes: the homepage opens on a full-width photo torn into the page, with a search strip across the tear and a station board;
   inner pages open on a photo banner with the paper torn diagonally across its foot. A deep green shade keeps
   white text readable on photos, and serif red words carry the hook. */
:root {
  --accent-serif: "Playfair Display", Georgia, serif;
  --hero-red: #FF4D52;
  --shade: 8, 36, 20;
}

.btn--glass { background: rgba(255,255,255,.12); color: var(--on-dark); box-shadow: inset 0 0 0 1.5px rgba(255,255,255,.45); backdrop-filter: blur(6px) }
.btn--glass:hover { background: var(--surface); color: var(--navy-deep) }
.btn--glass svg { width: 18px; height: 18px }
.btn--glass:hover svg { transform: none }

/* ===== Homepage: a full-width photo torn into the page, a search strip across the tear, and a station board ===== */
.lhero { --lap: clamp(92px, 8vw, 116px); position: relative }
.lhero__photo { position: relative; isolation: isolate; overflow: hidden; display: flex; align-items: flex-end; min-height: clamp(600px, 94vh, 880px); background: rgb(var(--shade)); color: var(--on-dark) }
.lhero__img { position: absolute; inset: 0; z-index: -2; background: center 42% / cover no-repeat; animation: kenburns 22s ease-out both }
.lhero__photo::before { content: ""; position: absolute; inset: 0; z-index: -1; background:
  linear-gradient(100deg, rgba(var(--shade), .95) 0%, rgba(var(--shade), .82) 42%, rgba(var(--shade), .38) 70%, rgba(var(--shade), .2) 100%),
  linear-gradient(0deg, rgba(var(--shade), .6) 0%, rgba(var(--shade), 0) 45%),
  linear-gradient(180deg, rgba(var(--shade), .6) 0%, rgba(var(--shade), 0) 24%) }
.lhero__copy { position: relative; z-index: 1; padding-block: clamp(140px, 15vw, 190px) calc(var(--lap) + clamp(64px, 7vw, 96px)) }
.lhero h1 { max-width: 15ch; margin: 0; font-family: var(--display); font-weight: 800; font-size: clamp(40px, 5.2vw, 72px); line-height: 1.04; letter-spacing: -.035em; color: var(--on-dark); text-wrap: balance; animation: rise 1s .1s both }
/* The two words that carry the story, in serif red, each underlined by a stroke of ink once the line has settled */
.lhero h1 em { font-family: var(--accent-serif); font-style: italic; font-weight: 700; letter-spacing: -.01em; color: var(--hero-red); padding-bottom: .06em;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 12' preserveAspectRatio='none'%3E%3Cpath d='M3 8.5C48 3.5 120 2.6 197 6' fill='none' stroke='%23FF4D52' stroke-width='3.4' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat 0 100% / 0 .2em;
  animation: ink .7s 1.1s cubic-bezier(.6,0,.2,1) forwards }
.lhero h1 em:last-of-type { animation-delay: 1.45s }
@keyframes ink { to { background-size: 100% .2em } }
.lhero__lead { max-width: 46ch; margin: 24px 0 0; font-size: clamp(16px, 1.3vw, 19px); line-height: 1.6; color: rgba(255,255,255,.86); animation: rise 1s .3s both }
/* The tear peels across from the left as the page opens */
.lhero__tear { animation: peel 1.3s .25s cubic-bezier(.6,0,.2,1) both }
@keyframes peel { from { clip-path: inset(0 100% 0 0) } to { clip-path: inset(0) } }

/* The search strip sits across the tear: half on the photo, half on the page */
.lhero > .wrap { position: relative; z-index: 2; margin-top: calc(-1 * var(--lap)) }
.strip { background: var(--surface); border-radius: 22px; padding: 12px; box-shadow: 0 44px 80px -40px rgba(var(--shade), .6), 0 2px 10px rgba(var(--shade), .08); animation: rise 1s .5s both }
.strip__row { display: grid; grid-template-columns: auto minmax(0, 1fr) minmax(0, 1fr) auto; gap: 10px }
.strip__tabs { display: flex; padding: 5px; border-radius: 15px; background: var(--navy-tint) }
.strip__tabs button { border: 0; border-radius: 11px; padding: 0 24px; background: transparent; font: 800 15px var(--display); color: var(--navy); cursor: pointer; transition: background .2s, color .2s }
.strip__tabs button[aria-selected=true] { background: var(--navy-deep); color: var(--on-dark) }
.strip__tabs button:focus-visible, .strip__field:focus-within { outline: 3px solid var(--navy); outline-offset: 2px }
.strip__field { display: flex; flex-direction: column; justify-content: center; min-width: 0; padding: 9px 16px; border: 1px solid var(--line); border-radius: 15px; cursor: pointer; transition: border-color .2s }
.strip__field:hover { border-color: var(--navy) }
.strip__field span { font-size: 11px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--muted) }
.strip__field select { appearance: none; -webkit-appearance: none; width: 100%; margin: 1px 0 0; padding: 0 22px 0 0; border: 0; outline: 0; background: transparent url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none' stroke='%230E3B22' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M1.5 1.5l4.5 4.5 4.5-4.5'/%3E%3C/svg%3E") no-repeat right 2px center; font: 700 16px var(--body); color: var(--ink); text-overflow: ellipsis; cursor: pointer }
.strip__go { min-height: 62px; padding: 0 30px; font-size: 15px; white-space: nowrap }
.strip__foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 20px; padding: 14px 10px 4px }
.strip__live { margin: 0; font-weight: 700; font-size: 14px; color: var(--muted) }
.strip__live b { color: var(--navy-deep) }
.strip__own { display: inline-flex; align-items: center; gap: 6px; font-weight: 800; font-size: 14px; color: var(--red); text-decoration: none }
.strip__own svg { width: 16px; height: 16px; transition: transform .2s }
.strip__own:hover svg { transform: translateX(3px) }
.lhero__trust { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 6px 10px; margin: 22px 0 0; font-weight: 700; font-size: 14px; color: var(--muted) }
.lhero__trust svg { width: 17px; height: 17px; color: var(--red) }
.lhero__trust i { font-style: normal; color: #B8C2BC }
.lhero__trust a { color: var(--ink); text-decoration: none }
.lhero__trust a:hover { color: var(--red) }

/* The station board: split-flap letters on dark glass; area, kind and price, the price in signal amber */
.board { position: absolute; right: max(16px, env(safe-area-inset-right, 0px)); bottom: 100%; width: min(410px, 36%); margin-bottom: 30px; padding: 18px 16px 14px; border-radius: 18px; background: rgba(6, 22, 13, .74); border: 1px solid rgba(255,255,255,.12); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); box-shadow: 0 34px 60px -30px rgba(0,0,0,.75); color: rgba(255,255,255,.82); animation: rise 1s .7s both }
.board__head { display: flex; align-items: center; gap: 10px; margin: 0 2px 14px; font-family: var(--display); font-weight: 800; font-size: 12px; letter-spacing: .18em; text-transform: uppercase }
.board__head i { width: 8px; height: 8px; border-radius: 50%; background: var(--hero-red); animation: live 1.8s infinite }
.board__head b { margin-left: auto; font-size: 12px; letter-spacing: .08em; color: rgba(255,255,255,.5) }
@keyframes live { 0% { box-shadow: 0 0 0 0 rgba(255,77,82,.65) } 70%, 100% { box-shadow: 0 0 0 9px rgba(255,77,82,0) } }
.board__rows { display: grid; gap: 5px; text-decoration: none; color: #F4EFDF }
.board__row { display: flex; gap: 3px; height: 34px }
.board__row:last-child { color: #F5BE55 }
.flap { position: relative; flex: 1 1 0; min-width: 0; display: grid; place-items: center; border-radius: 3px; background: linear-gradient(180deg, #263F30 0 50%, #1E3528 50%); box-shadow: inset 0 -1px 0 rgba(0,0,0,.5), 0 1px 0 rgba(255,255,255,.04); font-family: var(--display); font-weight: 800; font-size: 18px; line-height: 1; transition: background .25s }
.flap::after { content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 1px; background: rgba(0,0,0,.6) }
.board__rows:hover .flap { background: linear-gradient(180deg, #30503D 0 50%, #263F30 50%) }
.board__rows:focus-visible { outline: 3px solid #F5BE55; outline-offset: 6px; border-radius: 6px }
.board__foot { display: flex; align-items: center; gap: 8px; margin: 12px 2px 0; font-size: 12px; font-weight: 700; color: rgba(255,255,255,.5) }
.board__foot p { margin: 0 auto 0 0 }
/* Previous / next: flip the board by hand; the timer starts over after each tap */
.board__nav { display: grid; place-items: center; width: 34px; height: 34px; flex: none; padding: 0; border-radius: 50%; border: 1px solid rgba(255,255,255,.22); background: rgba(255,255,255,.06); color: #F4EFDF; cursor: pointer; transition: background .2s, border-color .2s }
.board__nav[hidden] { display: none }
.board__nav:hover { background: rgba(245,190,85,.16); border-color: #F5BE55; color: #F5BE55 }
.board__nav:focus-visible { outline: 3px solid #F5BE55; outline-offset: 2px }
.board__nav svg { width: 15px; height: 15px }
#bPrev svg { transform: scaleX(-1) }

@media (prefers-reduced-motion: reduce) {
  .lhero__img, .lhero__tear, .board__head i { animation: none }
  .lhero h1 em { animation: none; background-size: 100% .2em }
}
@media (max-width: 1080px) {
  .board { width: min(380px, 40%) }
  .lhero h1 { max-width: 13ch }
}
/* Tablets and phones: the board drops below the search, onto the page */
@media (max-width: 900px) {
  .lhero__photo { min-height: 0 }
  .lhero h1 { max-width: 16ch }
  .board { position: relative; right: auto; bottom: auto; width: auto; max-width: 520px; margin: 26px auto 0; background: rgb(var(--shade)); animation-delay: .6s }
  .strip__row { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) }
  .strip__tabs, .strip__go { grid-column: 1 / -1 }
  .strip__tabs button { flex: 1; padding-block: 12px }
  .strip__go { min-height: 56px; justify-content: center }
}
@media (max-width: 560px) {
  .lhero { --lap: 64px }
  .lhero__copy { padding-block: 112px calc(var(--lap) + 72px) }
  .lhero h1 { font-size: clamp(34px, 9.6vw, 42px) }
  .lhero__lead { margin-top: 16px; font-size: 16px }
  .strip { padding: 10px; border-radius: 20px }
  .strip__row { gap: 8px }
  .strip__field { padding: 8px 12px }
  .strip__foot { padding: 12px 6px 2px }
  .board__row { height: 30px }
  .flap { font-size: 15px }
}

/* The numbers now sit on white under the hero */
.stats { padding-top: clamp(48px, 6vw, 72px) }
.stats .stats__grid { margin-top: 0 }

/* ===== Inner pages: photo banner ===== */
.page-hero.page-hero--photo { background: rgb(var(--shade)); color: var(--on-dark); min-height: clamp(440px, 62vh, 600px); display: flex; align-items: flex-end }
.page-hero__img { position: absolute; inset: 0; z-index: -2; background: center 35% / cover no-repeat; animation: kenburns 20s ease-out both }
.page-hero.page-hero--photo::before { content: ""; display: block; position: absolute; inset: 0; z-index: -1; background:
  linear-gradient(95deg, rgba(var(--shade), .9) 0%, rgba(var(--shade), .7) 42%, rgba(var(--shade), .25) 80%, rgba(var(--shade), .15) 100%),
  linear-gradient(0deg, rgba(var(--shade), .55) 0%, rgba(var(--shade), 0) 40%),
  linear-gradient(180deg, rgba(var(--shade), .55) 0%, rgba(var(--shade), 0) 26%) }
.page-hero--photo .wrap { padding-block: clamp(140px, 15vw, 180px) clamp(80px, 8vw, 104px) }
.page-hero--photo h1 { color: var(--on-dark); max-width: 15ch; animation: rise .9s .15s both }
.page-hero--photo .page-hero__lead { color: rgba(255,255,255,.86); max-width: 54ch; animation: rise .9s .3s both }
.page-hero--photo .crumbs { color: rgba(255,255,255,.7); animation: fadein .8s both }
.page-hero--photo .crumbs a { color: var(--on-dark) }
.page-hero--photo .facts-row, .page-hero--photo .guide-nav, .page-hero--photo .entry-meta { animation: rise .9s .4s both }
.page-hero--photo .facts-row span { background: rgba(255,255,255,.1); border-color: rgba(255,255,255,.22); color: rgba(255,255,255,.86); backdrop-filter: blur(6px); box-shadow: none }
.page-hero--photo .facts-row b { color: var(--on-dark) }
.page-hero--photo .entry-meta { color: rgba(255,255,255,.75) }
.page-hero--photo .guide-nav a { background: rgba(255,255,255,.1); border-color: rgba(255,255,255,.28); color: var(--on-dark); backdrop-filter: blur(6px); box-shadow: none }
.page-hero--photo .guide-nav a:hover { background: var(--surface); color: var(--navy-deep) }
.page-hero--photo h1 em { font-family: var(--accent-serif); font-style: italic; font-weight: 700; letter-spacing: -.01em; color: var(--hero-red) }
.page-hero--photo .wrap { position: relative; z-index: 1 }

/* The paper torn diagonally across the foot of the photo, with a pale fibre rim along the tear */
.slant { position: absolute; left: 0; right: 0; bottom: -1px; width: 100%; height: clamp(56px, 9vw, 130px); z-index: 0; pointer-events: none }
.slant .slant__rim { fill: #DCE6DF; filter: url(#fibre-s) }
.slant .slant__paper { fill: var(--surface) }

@media (prefers-reduced-motion: reduce) {
  .page-hero__img { animation: none }
}
@media (max-width: 640px) {
  .page-hero.page-hero--photo { min-height: 400px }
  .page-hero--photo .wrap { padding-block: 120px 72px }
}

/* ===== Explore by area: photo tiles ===== */
.atiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); grid-auto-rows: 240px; gap: 18px }
.atile { position: relative; overflow: hidden; border-radius: 20px; display: flex; align-items: flex-end; padding: 22px; color: var(--on-dark); text-decoration: none; isolation: isolate; background: var(--navy-deep) }
.atile:first-child { grid-row: span 2 }
.atile img { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; transition: transform .7s cubic-bezier(.2,.7,.2,1) }
.atile::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(0deg, rgba(var(--shade), .88) 0%, rgba(var(--shade), .25) 55%, rgba(var(--shade), .05) 100%) }
.atile:hover img { transform: scale(1.06) }
.atile__txt b { display: block; font-family: var(--display); font-weight: 800; font-size: 22px; line-height: 1.15 }
.atile:first-child .atile__txt b { font-size: clamp(26px, 3vw, 36px) }
.atile__txt small { display: block; margin-top: 4px; font-weight: 700; font-size: 14px; color: rgba(255,255,255,.82) }
.atile__go { position: absolute; right: 18px; top: 18px; width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; background: rgba(255,255,255,.16); backdrop-filter: blur(6px); transition: background .25s, transform .25s }
.atile__go svg { width: 18px; height: 18px }
.atile:hover .atile__go { background: var(--red); transform: rotate(-45deg) }

/* ===== Landlord calculator ===== */
.calc { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 480px); gap: clamp(36px, 6vw, 88px); align-items: center }
.calc__copy h2 { font-size: clamp(30px, 4.4vw, 48px); font-weight: 800; letter-spacing: -.022em; margin: 12px 0 18px; max-width: 14ch }
.calc__copy h2 em, .section-head h2 em { font-family: var(--accent-serif); font-style: italic; font-weight: 700; color: var(--red); letter-spacing: -.01em }
.calc__copy > p { color: var(--muted); font-size: 17px; max-width: 48ch }
.calc__ticks { margin-top: 26px }
.calc__ticks svg { background: #FDECEC; color: var(--red) }
.calc__box { background: rgb(var(--shade)); color: var(--on-dark); border-radius: 24px; padding: clamp(24px, 3.4vw, 36px); display: grid; gap: 24px; box-shadow: 0 40px 80px -40px rgba(var(--shade), .8) }
.calc__row label { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; font-weight: 700; font-size: 14px; color: rgba(255,255,255,.8); margin-bottom: 12px }
.calc__row output { font-family: var(--display); font-weight: 800; font-size: 20px; color: var(--on-dark) }
.calc input[type=range] { --fill: 50%; width: 100%; height: 6px; border-radius: 999px; appearance: none; -webkit-appearance: none; background: linear-gradient(90deg, var(--hero-red) var(--fill), rgba(255,255,255,.2) var(--fill)); cursor: pointer }
.calc input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 24px; height: 24px; border-radius: 50%; background: var(--surface); border: 5px solid var(--red); box-shadow: 0 4px 10px rgba(0,0,0,.35) }
.calc input[type=range]::-moz-range-thumb { width: 14px; height: 14px; border-radius: 50%; background: var(--surface); border: 5px solid var(--red) }
.calc__out { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px }
.calc__out div { background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.14); border-radius: 16px; padding: 16px }
.calc__out span { display: block; font-size: 13px; font-weight: 700; color: rgba(255,255,255,.7) }
.calc__out b { display: block; margin-top: 4px; font-family: var(--display); font-weight: 800; font-size: clamp(19px, 2vw, 24px); color: var(--on-dark) }
.calc__out b.calc__loss { color: var(--hero-red) }
.calc__box .btn { justify-self: stretch; padding: 16px }
.calc__note { font-size: 13px; color: rgba(255,255,255,.6); text-align: center; margin-top: -10px }

@media (max-width: 900px) {
  .atiles { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-rows: 200px }
  .atile:first-child { grid-row: auto; grid-column: span 2 }
  .calc { grid-template-columns: minmax(0, 1fr) }
}
@media (max-width: 560px) {
  .atiles { grid-template-columns: minmax(0, 1fr); grid-auto-rows: 180px }
  .atile:first-child { grid-column: auto }
  .calc__out { grid-template-columns: minmax(0, 1fr) }
}
