/* College Quarters — mobile-first styles */

:root {
  --green: #0f5a46;
  --green-dark: #0a4234;
  --green-soft: #e6f1ec;
  --ink: #1b2420;
  --muted: #5b6863;
  --line: #dde4e0;
  --bg: #ffffff;
  --bg-alt: #f5f7f5;
  --amber: #8a5a00;
  --amber-soft: #fdf1d8;
  --red: #b42318;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(16, 24, 20, .06), 0 6px 20px rgba(16, 24, 20, .07);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 72px; }
html.no-scroll { overflow: hidden; }
body { margin: 0; font-family: var(--font); font-size: 17px; line-height: 1.55; color: var(--ink); background: var(--bg); }
img { max-width: 100%; display: block; }
a { color: var(--green); }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .5em; letter-spacing: -.01em; }
h1 { font-size: clamp(2rem, 7vw, 3.2rem); }
h2 { font-size: clamp(1.6rem, 5vw, 2.1rem); }
h3 { font-size: 1.25rem; }
p { margin: 0 0 1em; }

.wrap { width: 100%; max-width: 1100px; margin: 0 auto; padding: 0 18px; }
.narrow { max-width: 620px; }
.muted { color: var(--muted); }
.small { font-size: .9rem; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
/* Wording can contain line breaks; show them. */
[data-w], .form-msg, .notice p, .gallery-empty span, .modal-head h3, .btn { white-space: pre-line; }
.skip { position: absolute; left: -999px; top: 8px; background: #fff; padding: 8px 12px; z-index: 100; }
.skip:focus { left: 8px; }
:focus-visible { outline: 3px solid #2f8f6f; outline-offset: 2px; }

/* Header */
.site-header { position: sticky; top: 0; z-index: 20; background: rgba(255,255,255,.94); backdrop-filter: saturate(1.4) blur(8px); border-bottom: 1px solid var(--line); }
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 60px; gap: 12px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); font-weight: 700; font-size: 1.08rem; white-space: nowrap; }
.brand-mark { width: 30px; height: 30px; color: var(--green); flex: none; }
.nav { display: flex; gap: 4px; }
.nav a { text-decoration: none; color: var(--ink); font-size: .95rem; padding: 8px 8px; border-radius: 8px; }
.nav a:hover { background: var(--green-soft); }

/* Hero */
.hero { background: linear-gradient(160deg, var(--green) 0%, var(--green-dark) 100%); color: #fff; padding: 56px 0 60px; }
.hero .eyebrow { text-transform: uppercase; letter-spacing: .08em; font-size: .8rem; font-weight: 600; opacity: .85; margin-bottom: .8em; }
.hero h1 { max-width: 16ch; }
.hero .lead { font-size: 1.12rem; max-width: 38em; opacity: .95; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
.hero .btn-ghost { color: #fff; border-color: rgba(255,255,255,.6); }
.hero .btn-ghost:hover { background: rgba(255,255,255,.12); }
.hero .btn-primary { background: #fff; color: var(--green-dark); }
.hero .btn-primary:hover { background: var(--green-soft); }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 20px; border-radius: 10px; border: 2px solid transparent; font: inherit; font-weight: 600; text-decoration: none; cursor: pointer; transition: background .15s; }
.btn-primary { background: var(--green); color: #fff; }
.btn-primary:hover { background: var(--green-dark); }
.btn-primary:disabled { opacity: .65; cursor: progress; }
.btn-ghost { background: transparent; color: var(--green); border-color: var(--green); }
.btn-block { width: 100%; }

/* Sections */
.section { padding: 52px 0; }
.section-alt { background: var(--bg-alt); }
.section-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 16px; margin-bottom: 18px; }
.section-head h2 { margin: 0; }

.card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.notice { background: var(--amber-soft); border: 1px solid #f1d9a6; border-radius: var(--radius); padding: 18px; }
.notice p:last-child { margin-bottom: 0; }
.notice .btn { margin-top: 4px; }

/* Rooms */
.rooms { display: grid; gap: 22px; grid-template-columns: 1fr; }
.status { display: grid; gap: 22px; }
.status[hidden] { display: none; }
.skeleton-card { height: 360px; border-radius: var(--radius); background: linear-gradient(90deg, #eef1ef 25%, #f6f8f7 50%, #eef1ef 75%); background-size: 200% 100%; animation: shimmer 1.3s infinite linear; }
@keyframes shimmer { to { background-position: -200% 0; } }
@media (prefers-reduced-motion: reduce) { .skeleton-card { animation: none; } html { scroll-behavior: auto; } }

.room { overflow: hidden; display: flex; flex-direction: column; scroll-margin-top: 76px; }
.room-body { padding: 18px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.room-top { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.room-top h3 { margin: 0; }
.price { margin: 0; font-weight: 700; font-size: 1.15rem; color: var(--green-dark); }
.desc { white-space: pre-line; color: #33403b; margin: 0; flex: 1; }
.room .btn { margin-top: 6px; }
.badge { align-self: flex-start; display: inline-flex; align-items: center; gap: 6px; padding: 4px 11px; border-radius: 999px; font-size: .88rem; font-weight: 600; }
.badge::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.badge-now { background: var(--green-soft); color: #136b4f; }
.badge-later { background: var(--amber-soft); color: var(--amber); }

/* Gallery */
.gallery { position: relative; background: #e9eeeb; aspect-ratio: 4 / 3; }
.gallery-empty { display: flex; align-items: center; justify-content: center; color: var(--muted); font-size: .95rem; }
.gallery-track { display: flex; height: 100%; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; overscroll-behavior-x: contain; }
.gallery-track::-webkit-scrollbar { display: none; }
.slide { flex: 0 0 100%; height: 100%; padding: 0; border: 0; background: none; scroll-snap-align: start; cursor: zoom-in; }
.slide img { width: 100%; height: 100%; object-fit: cover; }
.gallery-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 40px; height: 40px; border-radius: 50%; border: 0; background: rgba(255,255,255,.9); color: var(--ink); font-size: 1.6rem; line-height: 1; cursor: pointer; display: none; box-shadow: var(--shadow); }
.gallery-nav.prev { left: 10px; }
.gallery-nav.next { right: 10px; }
.gallery-count { position: absolute; right: 10px; bottom: 10px; background: rgba(0,0,0,.6); color: #fff; font-size: .8rem; padding: 2px 9px; border-radius: 999px; pointer-events: none; }
@media (hover: hover) { .gallery-nav { display: block; } }

/* Steps */
.steps { margin: 0; padding-left: 1.3em; display: grid; gap: 12px; max-width: 46em; }

/* Contact */
.two-col { display: grid; gap: 28px; }
.contact-list { list-style: none; padding: 0; margin: 0 0 1em; display: grid; gap: 10px; }
.contact-list .label { display: block; font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.contact-list a { font-weight: 600; word-break: break-word; }

/* Forms */
.form { padding: 20px; display: grid; gap: 14px; }
.form h3 { margin: 0; }
.field { display: grid; gap: 5px; }
.field label { font-weight: 600; font-size: .95rem; }
.opt { font-weight: 400; color: var(--muted); }
input, select, textarea { font: inherit; font-size: 16px; color: var(--ink); width: 100%; padding: 12px 13px; border: 1px solid #c4cec9; border-radius: 10px; background: #fff; }
textarea { resize: vertical; min-height: 110px; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--green); box-shadow: 0 0 0 3px rgba(15, 90, 70, .18); }
[aria-invalid="true"] { border-color: var(--red); }
.hp { position: absolute !important; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.form-msg { margin: 0; font-weight: 600; min-height: 0; }
.form-msg:empty { display: none; }
.form-msg.is-ok { color: #136b4f; background: var(--green-soft); padding: 12px 14px; border-radius: 10px; }
.form-msg.is-error { color: var(--red); background: #fdecea; padding: 12px 14px; border-radius: 10px; }

/* Dialogs */
dialog { border: 0; padding: 0; color: var(--ink); }
dialog::backdrop { background: rgba(10, 20, 16, .62); }
.modal { width: min(560px, calc(100% - 20px)); max-height: calc(100% - 20px); border-radius: var(--radius); overflow: auto; }
.modal .form { padding: 20px; }
.modal-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.modal-head h3 { margin: 0; }
.icon-btn { width: 44px; height: 44px; border-radius: 50%; border: 0; background: var(--bg-alt); color: var(--ink); font-size: 1.7rem; line-height: 1; cursor: pointer; flex: none; }
.icon-btn:hover { background: var(--line); }

.lightbox { width: 100%; height: 100%; max-width: 100%; max-height: 100%; background: #050a08; color: #fff; }
.lightbox[open] { display: flex; align-items: center; justify-content: center; }
.lightbox img { max-width: 100%; max-height: 100%; object-fit: contain; }
.lightbox .icon-btn { position: absolute; background: rgba(255,255,255,.14); color: #fff; }
.lightbox .icon-btn:hover { background: rgba(255,255,255,.28); }
.lightbox .icon-btn[hidden] { display: none; }
.lb-close { top: 12px; right: 12px; }
.lb-prev { left: 10px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 10px; top: 50%; transform: translateY(-50%); }
.lb-count { position: absolute; bottom: 14px; left: 0; right: 0; text-align: center; margin: 0; font-size: .9rem; opacity: .8; }

/* Footer */
.site-footer { padding: 34px 0 calc(34px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); }
.site-footer p { margin: 0 0 .4em; }

/* Larger screens */
@media (max-width: 460px) {
  .wrap { padding: 0 16px; }
  .header-inner { gap: 6px; }
  .brand { gap: 7px; font-size: 1rem; }
  .brand-mark { width: 26px; height: 26px; }
  .nav { gap: 0; }
  .nav a { padding: 8px 6px; font-size: .88rem; }
}
@media (max-width: 380px) {
  .brand { font-size: .92rem; gap: 6px; }
  .brand-mark { width: 24px; height: 24px; }
  .nav a { padding: 8px 4px; font-size: .82rem; }
}
@media (max-width: 345px) {
  .brand span { display: none; }
}
@media (min-width: 700px) {
  .rooms, .status { grid-template-columns: repeat(2, 1fr); }
  .hero { padding: 84px 0 90px; }
  .section { padding: 72px 0; }
}
@media (min-width: 900px) {
  .two-col { grid-template-columns: 1fr 1.1fr; gap: 48px; align-items: start; }
}
@media (min-width: 1000px) {
  .rooms { grid-template-columns: repeat(3, 1fr); }
  .status { grid-template-columns: repeat(3, 1fr); }
}
