/* Styles for the index template. */
/* ---------- Hero slideshow ---------- */
  .home-hero {
    min-height: 100vh;
    min-height: 100svh;
    padding-bottom: 0;
    align-items: stretch;
    background: var(--blue-deep);
  }
  .home-hero .hero-media::after { display: none; }
  .home-hero .hero-media img { filter: none; }
  .home-hero::after {
    background:
      linear-gradient(180deg, rgba(4,22,46,0.55) 0%, rgba(4,22,46,0.05) 30%, rgba(4,22,46,0.1) 55%, rgba(4,22,46,0.85) 100%),
      linear-gradient(90deg, rgba(4,22,46,0.5) 0%, rgba(4,22,46,0) 60%);
  }

  .slide {
    position: absolute;
    inset: 0;
    opacity: 0;
  }
  .slide.is-active { opacity: 1; z-index: 1; }
  /* The collage carries its own line art, so hide the overlay while it shows */
  .home-hero .hero-lines { transition: opacity .8s ease; }
  .home-hero.lines-off .hero-lines { opacity: 0; }
  .slide img { width: 100%; height: 100%; object-fit: cover; }
  .slide picture { display: block; width: 100%; height: 100%; }
  /* Phones: no slow zoom (it enlarges the photo further and softens it) */
  @media (max-width: 700px) {
    .slide.is-active img { animation: none !important; }
  }
  @media (prefers-reduced-motion: no-preference) {
    .slide { transition: opacity 1.6s ease; }
    .slide.is-active img { animation: kenburns 9s ease-out both; }
    @keyframes kenburns { from { transform: scale(1.12); } to { transform: scale(1.02); } }
  }

  .home-hero .hero-inner {
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    width: 100%;
  }
  .home-hero h1 { max-width: 11em; }
  .home-hero .hero-copy { padding-bottom: 40px; }

  .hero-foot {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
    padding-bottom: 28px;
  }

  .slide-controls {
    display: flex;
    align-items: center;
    gap: 16px;
    color: #fff;
    font-size: 0.875rem;
  }
  .slide-caption { min-width: 12em; color: rgba(255,255,255,0.85); }
  .slide-dots { display: flex; gap: 8px; }
  .slide-dots button {
    position: relative;
    width: 44px;
    height: 40px;
    padding: 0;
    border: 0;
    background: none;
    cursor: pointer;
  }
  .slide-dots button::before,
  .slide-dots button::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    top: 50%;
    height: 2px;
    background: rgba(255,255,255,0.35);
  }
  .slide-dots button::after {
    background: #fff;
    transform-origin: left;
    transform: scaleX(0);
  }
  .slide-dots button[aria-current="true"]::after { transform: scaleX(1); }
  @media (prefers-reduced-motion: no-preference) {
    .slide-dots.is-playing button[aria-current="true"]::after { animation: progress var(--slide-ms, 7000ms) linear both; }
    @keyframes progress { from { transform: scaleX(0); } to { transform: scaleX(1); } }
  }
  .slide-pause {
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    border: 1px solid rgba(255,255,255,0.5);
    border-radius: 50%;
    background: transparent;
    color: #fff;
    cursor: pointer;
  }
  .slide-pause:hover { background: rgba(255,255,255,0.12); }

  .scroll-cue {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    color: rgba(255,255,255,0.85);
    font-size: 0.8125rem;
    text-decoration: none;
  }
  .scroll-cue span.line {
    position: relative;
    width: 1px;
    height: 46px;
    overflow: hidden;
    background: rgba(255,255,255,0.3);
  }
  .scroll-cue span.line::after {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    width: 1px;
    height: 18px;
    background: #fff;
  }
  @media (prefers-reduced-motion: no-preference) {
    .scroll-cue span.line::after { animation: cue 2.2s cubic-bezier(.65,0,.35,1) infinite; }
    @keyframes cue { from { transform: translateY(-18px); } to { transform: translateY(46px); } }
  }

  /* ---------- Statement ---------- */
  .statement {
    display: grid;
    grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
    gap: clamp(32px, 6vw, 96px);
    align-items: end;
  }
  .statement h2 { line-height: 1.18; }
  .statement p { margin: 0 0 28px; color: var(--graphite); }
  .text-link {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 500;
    text-decoration: none;
    border-bottom: 1px solid currentColor;
    padding-bottom: 4px;
  }
  .text-link svg { width: 16px; height: 16px; }
  @media (prefers-reduced-motion: no-preference) {
    .text-link svg { transition: transform .3s ease; }
    .text-link:hover svg { transform: translateX(4px); }
  }

  /* ---------- Featured apartments ---------- */
  .feature-head {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: clamp(36px, 5vw, 64px);
  }
  .feature-head p { margin: 14px 0 0; max-width: 34em; }
  .home-apts {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 22px;
  }
  .h-apt {
    display: flex;
    flex-direction: column;
    border: 1px solid var(--line);
    border-radius: 20px;
    overflow: hidden;
    background: var(--paper);
  }
  .h-apt .h-car-thumbs { border-bottom: 1px solid var(--line); }
  .h-car .tag {
    position: absolute;
    top: 16px;
    left: 16px;
    z-index: 2;
    padding: 5px 14px;
    border-radius: 999px;
    background: rgba(255,255,255,0.92);
    color: var(--ink);
    font-size: 0.8125rem;
  }
  .h-apt-body {
    display: flex;
    flex-direction: column;
    gap: 10px;
    flex: 1;
    padding: 22px 26px 26px;
  }
  .h-apt-body .area { margin: 0; font-size: 0.875rem; font-weight: 500; color: var(--blue); }
  .h-apt-body h3 { margin: 0; font-size: clamp(1.5rem, 1.3rem + 0.5vw, 1.75rem); line-height: 1.15; }
  .h-features {
    display: grid;
    gap: 8px;
    margin: 6px 0 0;
    padding: 14px 0 0;
    border-top: 1px solid var(--line);
    list-style: none;
    font-size: 0.9375rem;
    color: var(--graphite);
  }
  .h-features li { display: flex; align-items: center; gap: 10px; }
  .h-features li::before {
    content: "";
    flex: none;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--silver);
  }
  .h-apt-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: auto;
    padding-top: 12px;
    color: var(--blue);
    font-weight: 500;
    font-size: 0.9375rem;
    text-decoration: none;
  }
  .h-apt-link svg { width: 16px; height: 16px; }
  .h-apt-link:hover { color: var(--blue-deep); }
  .h-apt:hover { border-color: #c3d2e2; box-shadow: 0 24px 48px rgba(7, 47, 95, 0.12); }
  @media (prefers-reduced-motion: no-preference) {
    .h-apt { transition: transform .5s cubic-bezier(.2,.7,.2,1), box-shadow .5s ease, border-color .4s ease; }
    .h-apt:hover { transform: translateY(-4px); }
    .h-apt-link svg { transition: transform .3s ease; }
    .h-apt-link:hover svg { transform: translateX(4px); }
  }

  /* ---------- Metallic icon badge (shared by service tiles and the points below) ---------- */
  .badge {
    position: relative;
    display: grid;
    place-items: center;
    flex: none;
    width: 76px;
    height: 76px;
    border-radius: 50%;
    color: #e9edf1;
    isolation: isolate;
  }
  /* Polished silver ring */
  .badge::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -2;
    border-radius: 50%;
    background: conic-gradient(from 20deg, #6f7884, #f4f6f8 14%, #9aa3ad 30%, #e3e7eb 46%, #6f7884 60%, #d5dbe1 78%, #6f7884);
    box-shadow: 0 12px 26px rgba(7, 47, 95, 0.22);
  }
  /* Gunmetal face */
  .badge::after {
    content: "";
    position: absolute;
    inset: 3px;
    z-index: -1;
    border-radius: 50%;
    background: radial-gradient(circle at 32% 26%, #4d555f 0%, #2a2f36 52%, #191c21 100%);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), inset 0 -6px 12px rgba(0, 0, 0, 0.25);
  }
  .badge svg { width: 34px; height: 34px; }
  .badge-sm { width: 52px; height: 52px; }
  .badge-sm::before { box-shadow: 0 8px 18px rgba(7, 47, 95, 0.18); }
  .badge-sm::after { inset: 2px; }
  .badge-sm svg { width: 24px; height: 24px; }

  /* ---------- Service tiles ---------- */
  .svc-tiles {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
    margin: 0;
    padding: 0;
    list-style: none;
  }
  .svc-tile a {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 12px;
    height: 100%;
    padding: 34px 30px 30px;
    border: 1px solid var(--line);
    border-radius: 20px;
    background: var(--paper);
    color: var(--ink);
    text-decoration: none;
    overflow: hidden;
    isolation: isolate;
  }
  /* Spotlight that follows the pointer (position set in script) */
  .svc-tile a::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background: radial-gradient(380px circle at var(--mx, 50%) var(--my, 0%), rgba(30, 111, 208, 0.11), transparent 62%);
    opacity: 0;
  }
  /* Silver hairline that draws across the top */
  .svc-tile a::after {
    content: "";
    position: absolute;
    top: 0;
    left: 28px;
    right: 28px;
    height: 2px;
    background: var(--silver);
    transform: scaleX(0);
    transform-origin: left;
  }
  .svc-tile .badge { margin-bottom: 10px; }
  .svc-tile strong { font-family: var(--display); font-size: 1.5rem; font-weight: 500; line-height: 1.2; letter-spacing: 0.03em; }
  .svc-tile .desc { color: var(--muted); font-size: 0.9375rem; }
  .svc-tile .more {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: auto;
    padding-top: 10px;
    color: var(--blue);
    font-size: 0.9375rem;
    font-weight: 500;
  }
  .svc-tile .more svg { width: 16px; height: 16px; }
  .svc-tile.is-feature a { background: linear-gradient(160deg, #f4f8fd 0%, var(--paper) 60%); border-color: #cfdcea; }

  .svc-tile a:hover,
  .svc-tile a:focus-visible { border-color: #c3d2e2; box-shadow: 0 24px 48px rgba(7, 47, 95, 0.12); }
  .svc-tile a:hover::before,
  .svc-tile a:focus-visible::before { opacity: 1; }
  .svc-tile a:hover::after,
  .svc-tile a:focus-visible::after { transform: scaleX(1); }
  .svc-tile a:hover .badge::after,
  .svc-tile a:focus-visible .badge::after { background: radial-gradient(circle at 32% 26%, #4f9cf0 0%, var(--blue) 52%, var(--blue-deep) 100%); }
  .svc-tile a:hover .badge::before,
  .svc-tile a:focus-visible .badge::before { transform: rotate(200deg); }
  .svc-tile a:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; }

  @media (hover: hover) {
    .svc-tile .more { opacity: 0; transform: translateX(-8px); }
    .svc-tile a:hover .more,
    .svc-tile a:focus-visible .more { opacity: 1; transform: none; }
  }

  @media (prefers-reduced-motion: no-preference) {
    .svc-tile a { transition: transform .5s cubic-bezier(.2,.7,.2,1), box-shadow .5s ease, border-color .4s ease; }
    .svc-tile a:hover,
    .svc-tile a:focus-visible { transform: translateY(-6px); }
    .svc-tile a::before { transition: opacity .4s ease; }
    .svc-tile a::after { transition: transform .7s cubic-bezier(.65,0,.35,1); }
    .badge::before { transition: transform 1.2s cubic-bezier(.2,.7,.2,1); }
    .badge::after { transition: background .45s ease; }
    .svc-tile .more { transition: opacity .35s ease, transform .35s ease; }
    .svc-tile a:hover .badge .icon-line > *,
    .svc-tile a:focus-visible .badge .icon-line > * {
      stroke-dasharray: 1;
      animation: icon-draw 1s cubic-bezier(.65,0,.35,1) both;
    }
    .live-points li:hover .badge::before { transform: rotate(160deg); }
  }

  /* ---------- Home, not hotel ---------- */
  /* Five-photo collage */
  .live-media { grid-column: 1 / span 7; position: relative; }
  .live-collage {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    grid-template-rows: repeat(6, minmax(0, 1fr));
    gap: 10px;
    aspect-ratio: 1 / 1;
    margin: 0;
  }
  .live-collage figure {
    position: relative;
    margin: 0;
    overflow: hidden;
    border-radius: 12px;
    background: var(--graphite);
  }
  .live-collage img { width: 100%; height: 100%; object-fit: cover; }
  /* Left column: living room and dining area; right column: kitchen, bedroom, lounge */
  .live-collage .c1 { grid-column: 1 / 4; grid-row: 1 / 4; }
  .live-collage .c4 { grid-column: 1 / 4; grid-row: 4 / 7; }
  .live-collage .c2 { grid-column: 4 / 7; grid-row: 1 / 3; }
  .live-collage .c3 { grid-column: 4 / 7; grid-row: 3 / 5; }
  .live-collage .c5 { grid-column: 4 / 7; grid-row: 5 / 7; }
  .live-collage .c4 img { object-position: 60% center; }
  .live-collage .c3 img { object-position: 40% center; }
  @media (max-width: 640px) { .live-collage { aspect-ratio: 4 / 5; gap: 6px; } .live-collage figure { border-radius: 8px; } }
  /* Brand ring tying the photos together */
  .live-collage .ring {
    position: absolute;
    left: 50%;
    top: 50%;
    z-index: 2;
    width: 22%;
    aspect-ratio: 1;
    border: 1.5px solid rgba(255,255,255,0.9);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
  }
  @media (prefers-reduced-motion: no-preference) {
    .live-collage img { transition: transform 1.2s cubic-bezier(.2,.7,.2,1); }
    .live-collage figure:hover img { transform: scale(1.06); }
  }  .live-text { grid-column: 9 / span 4; }
  .live-text p { margin: 0 0 22px; color: var(--graphite); }
  .live-points { margin: 32px 0 36px; padding: 0; list-style: none; display: grid; gap: 18px; }
  .live-points li { display: grid; grid-template-columns: 52px 1fr; gap: 18px; align-items: center; }
  .live-points strong { display: block; font-family: var(--display); font-size: 1.3125rem; font-weight: 500; line-height: 1.2; letter-spacing: 0.03em; }
  .live-points span.muted { font-size: 0.9375rem; }

  /* ---------- Steps ---------- */
  .steps-wrap { position: relative; }
  .steps {
    position: relative;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: clamp(20px, 3vw, 40px);
    margin: 0;
    padding: 0;
    list-style: none;
  }
  .steps-line {
    position: absolute;
    top: 32px;
    left: 32px;
    right: 32px;
    height: 1px;
    background: rgba(255,255,255,0.18);
    overflow: hidden;
  }
  .steps-line::after {
    content: "";
    position: absolute;
    inset: 0;
    background: var(--silver);
    transform-origin: left;
  }
  .motion .steps-line::after { transform: scaleX(0); transition: transform 1.8s cubic-bezier(.65,0,.35,1) .2s; }
  .motion .steps-line.is-in::after { transform: scaleX(1); }
  .steps li { position: relative; }
  .step-num {
    display: grid;
    place-items: center;
    width: 64px;
    height: 64px;
    margin-bottom: 26px;
    border: 1px solid rgba(255,255,255,0.35);
    border-radius: 50%;
    background: linear-gradient(180deg, #3b424b, #262b32);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.14);
    font-family: var(--display);
    font-size: 1.375rem;
    color: #fff;
  }
  /* "How it works" background: darker greys that drift very slowly */
  .steps-section {
    position: relative;
    overflow: hidden;
    isolation: isolate;
    background: #16191d;
  }
  .steps-section::before,
  .steps-section::after {
    content: "";
    position: absolute;
    inset: -40%;
    z-index: -1;
    pointer-events: none;
  }
  .steps-section::before {
    background:
      radial-gradient(38% 45% at 25% 30%, rgba(58, 65, 74, 0.85), transparent 70%),
      radial-gradient(32% 40% at 75% 70%, rgba(44, 50, 58, 0.9), transparent 70%),
      linear-gradient(135deg, #121417 0%, #1d2126 45%, #101215 100%);
  }
  .steps-section::after {
    background:
      radial-gradient(28% 35% at 65% 25%, rgba(78, 86, 96, 0.35), transparent 70%),
      radial-gradient(30% 38% at 30% 75%, rgba(10, 12, 14, 0.7), transparent 70%);
    mix-blend-mode: soft-light;
  }
  @media (prefers-reduced-motion: no-preference) {
    .steps-section::before { animation: grey-drift-a 60s ease-in-out infinite alternate; }
    .steps-section::after { animation: grey-drift-b 75s ease-in-out infinite alternate; }
    @keyframes grey-drift-a {
      0%   { transform: translate3d(0, 0, 0) rotate(0deg); }
      50%  { transform: translate3d(6%, -4%, 0) rotate(4deg); }
      100% { transform: translate3d(-5%, 5%, 0) rotate(-3deg); }
    }
    @keyframes grey-drift-b {
      0%   { transform: translate3d(0, 0, 0) scale(1); }
      50%  { transform: translate3d(-7%, 3%, 0) scale(1.08); }
      100% { transform: translate3d(5%, -6%, 0) scale(0.96); }
    }
  }  .steps h3 { margin: 0 0 10px; font-family: var(--display); font-weight: 500; font-size: 1.375rem; line-height: 1.2; letter-spacing: 0.03em; }
  .steps p { margin: 0; color: var(--on-dark); font-size: 0.9875rem; }

  /* ---------- Closing CTA ---------- */
  .cta {
    position: relative;
    overflow: hidden;
    padding: clamp(96px, 14vw, 180px) 0;
    background: var(--blue-deep);
    color: #fff;
    isolation: isolate;
  }
  .cta .bg { position: absolute; inset: -10% 0; z-index: -2; }
  .cta .bg img { width: 100%; height: 100%; object-fit: cover; filter: grayscale(1) contrast(1.05); }
  .cta .bg::after { content: ""; position: absolute; inset: 0; background: var(--blue-bright); mix-blend-mode: multiply; }
  .cta::after { content: ""; position: absolute; inset: 0; z-index: -1; background: rgba(4,22,46,0.38); }
  .cta svg.lines { position: absolute; inset: 0; z-index: -1; width: 100%; height: 100%; color: rgba(255,255,255,0.75); pointer-events: none; }
  .cta .wrap { text-align: center; }
  .cta h2 { max-width: 14em; margin: 0 auto; }
  .cta p { max-width: 34em; margin: 24px auto 0; color: rgba(255,255,255,0.88); font-size: 1.125rem; }
  .cta .actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 40px; }

  /* ---------- Responsive ---------- */
  @media (max-width: 960px) {
    .statement { grid-template-columns: 1fr; }
    .home-apts { grid-template-columns: 1fr 1fr; }
    /* An odd last card spans the row instead of sitting alone */
    .home-apts > .h-apt:last-child:nth-child(odd) { grid-column: 1 / -1; }
    .home-apts > .h-apt:last-child:nth-child(odd) .h-car { aspect-ratio: 16 / 8; }
    .svc-tiles { grid-template-columns: 1fr 1fr; }
    .live-media, .live-text { grid-column: 1 / -1; }
    .steps { grid-template-columns: 1fr 1fr; row-gap: 48px; }
    .steps-line { display: none; }
    .hero-foot .scroll-cue { display: none; }
  }
  @media (max-width: 640px) {
    .home-hero .hero-copy { padding-bottom: 28px; }
    .hero-foot { flex-direction: column; align-items: flex-start; }
    .slide-caption { display: none; }
    .home-apts { grid-template-columns: 1fr; }
    .home-apts > .h-apt:last-child:nth-child(odd) .h-car { aspect-ratio: 4 / 3; }
    .svc-tiles { grid-template-columns: 1fr; gap: 12px; }
    .svc-tile a { display: grid; grid-template-columns: 60px minmax(0, 1fr); column-gap: 18px; row-gap: 4px; align-items: center; padding: 20px; }
    .svc-tile .badge { grid-row: span 2; width: 60px; height: 60px; margin: 0; }
    .svc-tile .badge svg { width: 28px; height: 28px; }
    .svc-tile .more { display: none; }
    .steps { grid-template-columns: 1fr; }
  }
