/* ===========================================================================
   Indie Stays — public landing. Scoped under .landing so it overrides ui.css
   (which is also loaded on this page). Theme tokens follow the app's
   data-theme + prefers-color-scheme model. Port of the "Indie Stays" artifact.
   =========================================================================== */

.landing {
  --font: "Plus Jakarta Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --display: "Fraunces", Georgia, "Times New Roman", serif;
  --bg: #f6f5fb; --surface: #ffffff; --surface-2: #f1f0f9; --ground: #eceaffaa;
  --fg: #171334; --muted: #5c5878; --faint: #928ea8; --border: #e8e6f3; --border-strong: #d9d6ec;
  --primary: #4f46e5; --primary-ink: #fff; --primary-soft: #ecebfe; --primary-deep: #4338ca;
  --violet: #8b5cf6; --good: #10b981; --good-soft: #d9f5ea; --good-ink: #05674a;
  --warn: #f59e0b; --warn-soft: #fdeecd; --sky: #0ea5e9; --rose: #fb7185;
  --shadow-card: 0 1px 2px rgba(23,19,52,.04), 0 12px 32px -18px rgba(23,19,52,.22);
  --shadow-lift: 0 24px 60px -24px rgba(60,40,150,.42);
  --radius: 20px; --maxw: 1120px;

  font-family: var(--font); background: var(--bg); color: var(--fg);
  -webkit-font-smoothing: antialiased; line-height: 1.6; min-height: 100vh; overflow-x: hidden;

  & * { box-sizing: border-box; }
  & button { font-family: inherit; color: inherit; cursor: pointer; }
  & a { color: inherit; }
  & img { max-width: 100%; }
  & [hidden] { display: none !important; }
  & .wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }

  /* photo frame + real image */
  & .ph { position: relative; border-radius: var(--radius); overflow: hidden; background: linear-gradient(135deg, var(--primary), var(--violet)); display: grid; place-items: center; }
  & .ph.g2 { background: linear-gradient(135deg, var(--sky), var(--primary)); }
  & .ph.g3 { background: linear-gradient(135deg, var(--violet), var(--rose)); }
  & .ph.g4 { background: linear-gradient(135deg, #f59e0b, var(--rose)); }
  & .ph.g5 { background: linear-gradient(135deg, var(--good), var(--sky)); }
  & .ph .scene { position: absolute; inset: 0; width: 100%; height: 100%; display: block; object-fit: cover; }
  & .ph .tag { position: relative; z-index: 2; display: inline-flex; align-items: center; gap: 8px; color: #fff; font-size: 12.5px; font-weight: 700; background: rgba(0,0,0,.34); padding: 7px 13px; border-radius: 999px; backdrop-filter: blur(3px); }
  & .ph .tag svg { width: 15px; height: 15px; }

  /* nav */
  & header.nav { position: sticky; top: 0; z-index: 50; background: color-mix(in srgb, var(--bg) 86%, transparent); backdrop-filter: blur(12px); border-bottom: 1px solid var(--border); }
  & .nav-in { display: flex; align-items: center; gap: 16px; height: 68px; }
  & .brand { display: flex; align-items: center; gap: 11px; text-decoration: none; min-width: 0; }
  & .brand .logo { width: 40px; height: 40px; border-radius: 12px; background: linear-gradient(135deg, var(--primary), var(--violet)); display: grid; place-items: center; color: #fff; flex: 0 0 auto; }
  & .brand .logo svg { width: 22px; height: 22px; }
  & .brand .bt { font-family: var(--display); font-size: 20px; font-weight: 600; letter-spacing: -.01em; color: var(--fg); white-space: nowrap; }
  & .nav-links { margin-left: auto; display: flex; align-items: center; gap: 4px; }
  & .nav-links a:not(.btn) { padding: 9px 14px; border-radius: 10px; font-size: 14px; font-weight: 600; color: var(--muted); text-decoration: none; }
  & .nav-links a:not(.btn):hover { background: var(--surface-2); color: var(--fg); }
  & .icon-btn { width: 40px; height: 40px; border-radius: 11px; border: 1px solid var(--border-strong); background: var(--surface); display: grid; place-items: center; color: var(--fg); }
  & .icon-btn svg { width: 18px; height: 18px; }
  & .nav-links .btn { height: 40px; padding: 0 15px; }

  & .btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid var(--border-strong); background: var(--surface); color: var(--fg); font-weight: 700; font-size: 14px; padding: 11px 17px; border-radius: 12px; text-decoration: none; white-space: nowrap; transition: .15s ease; }
  & .btn:hover { border-color: var(--primary); color: var(--primary-deep); }
  & .btn svg { width: 16px; height: 16px; }
  & .btn.solid { background: var(--primary); color: var(--primary-ink); border-color: var(--primary); }
  & .btn.solid:hover { background: var(--primary-deep); color: var(--primary-ink); }
  & .btn.lg { padding: 14px 22px; font-size: 15px; border-radius: 14px; }
  & .btn.block { width: 100%; }

  /* hero */
  & .hero { padding: 64px 0 40px; }
  & .hero-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: 48px; align-items: center; }
  & .eyebrow { display: inline-flex; align-items: center; gap: 8px; font-size: 12.5px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--primary-deep); background: var(--primary-soft); padding: 6px 13px; border-radius: 999px; }
  & .eyebrow .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--good); }
  & h1 { font-family: var(--display); font-weight: 600; font-size: clamp(38px, 5.4vw, 62px); line-height: 1.03; letter-spacing: -.02em; margin: 20px 0 0; text-wrap: balance; }
  & h1 .mk { color: var(--primary); font-style: italic; }
  & .hero p.lead { font-size: 18px; color: var(--muted); margin: 20px 0 0; max-width: 46ch; }
  & .hero-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
  & .hero-badges { display: flex; flex-wrap: wrap; gap: 20px; margin-top: 30px; }
  & .hero-badges .hb { display: flex; align-items: center; gap: 9px; font-size: 13.5px; font-weight: 600; color: var(--muted); }
  & .hero-badges .hb svg { width: 18px; height: 18px; color: var(--good); flex: 0 0 auto; }
  & .hero-art { position: relative; }
  & .hero-art .ph { aspect-ratio: 4/5; box-shadow: var(--shadow-lift); }
  & .hero-float { position: absolute; left: -22px; bottom: 26px; background: var(--surface); border: 1px solid var(--border); border-radius: 16px; box-shadow: var(--shadow-lift); padding: 13px 15px; display: flex; align-items: center; gap: 11px; max-width: 250px; }
  & .hero-float .hi { width: 40px; height: 40px; border-radius: 11px; background: var(--good-soft); color: var(--good-ink); display: grid; place-items: center; flex: 0 0 auto; }
  & .hero-float .hi svg { width: 20px; height: 20px; }
  & .hero-float .ht { font-size: 13px; font-weight: 800; line-height: 1.15; color: var(--fg); }
  & .hero-float .hs { font-size: 11.5px; color: var(--muted); }

  & section { padding: 56px 0; }
  & .sec-head { max-width: 62ch; margin: 0 auto 40px; text-align: center; }
  & .sec-head .eyebrow { margin-bottom: 14px; }
  & .sec-head h2 { font-family: var(--display); font-weight: 600; font-size: clamp(28px, 3.6vw, 40px); line-height: 1.1; letter-spacing: -.02em; margin: 0; text-wrap: balance; }
  & .sec-head p { font-size: 16.5px; color: var(--muted); margin: 14px 0 0; }

  /* pillars */
  & .pillars { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
  & .pillar { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 28px; box-shadow: var(--shadow-card); }
  & .pillar .pi { width: 52px; height: 52px; border-radius: 15px; display: grid; place-items: center; margin-bottom: 18px; }
  & .pillar .pi svg { width: 26px; height: 26px; }
  & .pi.ind { background: var(--primary-soft); color: var(--primary-deep); }
  & .pi.com { background: var(--warn-soft); color: #a9670c; }
  & .pi.saf { background: var(--good-soft); color: var(--good-ink); }
  & .pillar h3 { font-size: 20px; margin: 0 0 8px; letter-spacing: -.01em; }
  & .pillar p { font-size: 14.5px; color: var(--muted); margin: 0; }

  /* amenities */
  & .amen { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
  & .amc { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 20px; display: flex; gap: 14px; align-items: flex-start; }
  & .amc .ai { width: 42px; height: 42px; border-radius: 12px; background: var(--surface-2); color: var(--primary-deep); display: grid; place-items: center; flex: 0 0 auto; }
  & .amc .ai svg { width: 21px; height: 21px; }
  & .amc h4 { margin: 2px 0 4px; font-size: 15.5px; }
  & .amc p { margin: 0; font-size: 13.5px; color: var(--muted); }

  /* safety split */
  & .split { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; }
  & .split .ph { aspect-ratio: 5/4; box-shadow: var(--shadow-card); }
  & .safelist { list-style: none; padding: 0; margin: 22px 0 0; display: flex; flex-direction: column; gap: 16px; }
  & .safelist li { display: flex; gap: 13px; align-items: flex-start; }
  & .safelist .si { width: 38px; height: 38px; border-radius: 11px; background: var(--good-soft); color: var(--good-ink); display: grid; place-items: center; flex: 0 0 auto; }
  & .safelist .si svg { width: 19px; height: 19px; }
  & .safelist .st { font-size: 15.5px; font-weight: 700; }
  & .safelist .sd { font-size: 14px; color: var(--muted); margin-top: 2px; }

  /* gallery */
  & .gallery { display: grid; grid-template-columns: repeat(4, 1fr); grid-auto-rows: 150px; gap: 14px; }
  & .gallery .ph { width: 100%; height: 100%; }
  & .gallery .ph.big { grid-column: span 2; grid-row: span 2; }

  /* rooms / pricing */
  & .rooms { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
  & .room { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-card); display: flex; flex-direction: column; }
  & .room.feat { border-color: var(--primary); box-shadow: var(--shadow-lift); }
  & .room .ph { border-radius: 0; aspect-ratio: 16/10; }
  & .room .rb { padding: 22px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
  & .room .rt { font-size: 18px; font-weight: 800; }
  & .room .rp { font-family: var(--display); font-size: 28px; font-weight: 600; letter-spacing: -.01em; }
  & .room .rp span { font-family: var(--font); font-size: 13px; color: var(--muted); font-weight: 600; }
  & .room .rd { font-size: 12.5px; color: var(--muted); margin-top: -2px; }
  & .room ul { list-style: none; padding: 0; margin: 8px 0 18px; display: flex; flex-direction: column; gap: 9px; }
  & .room ul li { font-size: 13.5px; color: var(--muted); display: flex; gap: 9px; align-items: center; }
  & .room ul li svg { width: 16px; height: 16px; color: var(--good); flex: 0 0 auto; }
  & .room .btn { margin-top: auto; }
  & .feat-tag { align-self: flex-start; font-size: 11px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; color: var(--primary-deep); background: var(--primary-soft); padding: 3px 10px; border-radius: 999px; }

  /* cta / enquiry */
  & .cta { background: linear-gradient(135deg, var(--primary), var(--violet)); border-radius: 28px; padding: 48px; color: #fff; display: grid; grid-template-columns: 1fr 1fr; gap: 44px; align-items: center; box-shadow: var(--shadow-lift); }
  & .cta h2 { font-family: var(--display); font-weight: 600; font-size: clamp(26px, 3vw, 36px); line-height: 1.1; margin: 0; color: #fff; }
  & .cta p { font-size: 16px; opacity: .92; margin: 14px 0 0; }
  & .cta .contacts { margin-top: 22px; display: flex; flex-direction: column; gap: 11px; font-size: 14.5px; font-weight: 600; }
  & .cta .contacts a { display: inline-flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; opacity: .95; }
  & .cta .contacts svg { width: 17px; height: 17px; }
  & .form { background: var(--surface); border-radius: 20px; padding: 26px; box-shadow: var(--shadow-lift); }
  & .form h3 { margin: 0 0 4px; font-size: 18px; color: var(--fg); }
  & .form p.fs { margin: 0 0 18px; font-size: 13px; color: var(--muted); }
  & .field { display: flex; flex-direction: column; gap: 7px; margin-bottom: 14px; }
  & .field label { font-size: 12.5px; font-weight: 700; color: var(--fg); }
  & .field input, & .field textarea { font-family: inherit; font-size: 15px; color: var(--fg); background: var(--surface); border: 1px solid var(--border-strong); border-radius: 12px; padding: 12px 13px; width: 100%; }
  & .field input:focus, & .field textarea:focus { outline: 2px solid var(--primary); outline-offset: 1px; border-color: var(--primary); }
  & .form .btn.solid { width: 100%; }
  & .form .err { color: var(--rose); font-size: 12px; margin: 4px 0 0; }
  & .flash-ok { background: var(--good-soft); color: var(--good-ink); border-radius: 12px; padding: 11px 13px; font-size: 13.5px; font-weight: 600; margin-bottom: 14px; }

  /* footer */
  & footer.lfoot { border-top: 1px solid var(--border); padding: 40px 0 30px; }
  & .foot-grid { display: flex; flex-wrap: wrap; gap: 24px; align-items: center; }
  & .foot-grid .fnote { font-size: 13px; color: var(--muted); }
  & .foot-links { margin-left: auto; display: flex; gap: 18px; flex-wrap: wrap; }
  & .foot-links a { font-size: 13.5px; color: var(--muted); text-decoration: none; font-weight: 600; }
  & .foot-links a:hover { color: var(--primary-deep); }
  & .byline { font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--faint); margin-top: 6px; }
}

/* ---- dark theme: explicit toggle ---- */
:root[data-theme="dark"] .landing {
  --bg: #0b0a16; --surface: #16142a; --surface-2: #1d1a38; --ground: #1a1836aa;
  --fg: #f1effb; --muted: #a7a2c6; --faint: #6f6a92; --border: #272346; --border-strong: #342f5a;
  --primary: #8b83ff; --primary-ink: #0a0916; --primary-soft: #241f47; --primary-deep: #b3adff;
  --violet: #a78bfa; --good: #34d399; --good-soft: #123024; --good-ink: #7ff0c6;
  --warn: #fbbf24; --warn-soft: #33270a; --sky: #38bdf8; --rose: #fb7185;
  --shadow-card: 0 1px 2px rgba(0,0,0,.4), 0 14px 34px -20px rgba(0,0,0,.7);
  --shadow-lift: 0 26px 64px -26px rgba(0,0,0,.8);
}

/* ---- dark theme: system default (no explicit choice) ---- */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .landing {
    --bg: #0b0a16; --surface: #16142a; --surface-2: #1d1a38; --ground: #1a1836aa;
    --fg: #f1effb; --muted: #a7a2c6; --faint: #6f6a92; --border: #272346; --border-strong: #342f5a;
    --primary: #8b83ff; --primary-ink: #0a0916; --primary-soft: #241f47; --primary-deep: #b3adff;
    --violet: #a78bfa; --good: #34d399; --good-soft: #123024; --good-ink: #7ff0c6;
    --warn: #fbbf24; --warn-soft: #33270a; --sky: #38bdf8; --rose: #fb7185;
    --shadow-card: 0 1px 2px rgba(0,0,0,.4), 0 14px 34px -20px rgba(0,0,0,.7);
    --shadow-lift: 0 26px 64px -26px rgba(0,0,0,.8);
  }
}

/* ---- responsive ---- */
@media (max-width: 900px) {
  .landing .hero-grid, .landing .split, .landing .cta { grid-template-columns: 1fr; gap: 30px; }
  .landing .hero-art { order: -1; }
  .landing .pillars, .landing .rooms { grid-template-columns: 1fr; }
  .landing .amen { grid-template-columns: 1fr 1fr; }
  .landing .gallery { grid-template-columns: 1fr 1fr; grid-auto-rows: 130px; }
  .landing .nav-links a:not(.btn) { display: none; }
  .landing .cta { padding: 32px; }
}
@media (max-width: 560px) {
  .landing .amen { grid-template-columns: 1fr; }
  .landing .hero-float { left: 8px; right: 8px; max-width: none; }
  .landing .wrap { padding: 0 18px; }
  .landing section { padding: 44px 0; }
  /* Long brand names (e.g. "Phylla's PG for Girls") wrap instead of pushing the
     sign-in button off-screen; the nav grows to fit the wrapped name. */
  .landing .nav-in { height: auto; min-height: 60px; padding: 9px 0; gap: 10px; }
  .landing .brand .bt { white-space: normal; font-size: 16px; line-height: 1.15; }
  .landing .nav-links { gap: 8px; }
}
