:root {
  --maroon: #800020;
  --maroon-dark: #590016;
  --gold: #d4af37;
  --cream: #fffaf1;
  --white: #fff;
  --light: #f5f5f5;
  --ink: #333;
  --muted: #666;
  --line: #d9d5d1;
  --shadow: 0 12px 28px rgba(62,20,28,.1);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: Arial, sans-serif;
  line-height: 1.6;
}

a {
  text-decoration: none;
  color: inherit;
}

.container {
  width: min(1120px, calc(100% - 32px));
  margin: auto;
}

.section {
  padding: 72px 0;
}

.section-alt {
  background: var(--light);
}

.eyebrow {
  color: var(--maroon);
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: .13em;
  text-transform: uppercase;
  margin: 0 0 8px;
}

.section-title {
  font-size: clamp(1.7rem, 4vw, 2.35rem);
  line-height: 1.15;
  color: var(--maroon);
  margin: 0 0 12px;
}

.section-lead {
  margin: 0 auto 32px;
  max-width: 620px;
  color: var(--muted);
}

.center {
  text-align: center;
}

.skip-link {
  position: absolute;
  left: -999px;
}

.skip-link:focus {
  left: 16px;
  top: 16px;
  z-index: 99;
  background: #fff;
  padding: 8px;
}

.site-header {
  background: var(--maroon);
  color: #fff;
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 3px solid var(--gold);
}

.nav {
  min-height: 70px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.brand {
  font-weight: 700;
  letter-spacing: .04em;
  font-size: 1.05rem;
}

.brand span {
  color: var(--gold);
}

.nav-links {
  display: flex;
  list-style: none;
  padding: 0;
  margin: 0;
  gap: 4px;
}

.nav-links a {
  display: block;
  padding: 10px 12px;
  font-size: .94rem;
  border-radius: 3px;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--gold);
}

.hero {
  overflow: hidden;
  position: relative;
  background: linear-gradient(120deg, var(--maroon) 0%, var(--maroon-dark) 65%, #36000d 100%);
  color: #fff;
  padding: 90px 0 110px;
}

.hero:after {
  content: "";
  position: absolute;
  width: 440px;
  height: 440px;
  right: -120px;
  top: -150px;
  border: 44px solid rgba(212,175,55,.22);
  border-radius: 50%;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr .85fr;
  align-items: center;
  gap: 32px;
  position: relative;
  z-index: 1;
}

.hero h1 {
  font-size: clamp(2.5rem, 6vw, 4.35rem);
  line-height: 1.03;
  margin: 0 0 20px;
  max-width: 650px;
}

.hero p {
  font-size: 1.1rem;
  max-width: 570px;
  color: #f7e9ec;
  margin: 0 0 26px;
}

.hero-panel {
  background: rgba(255,255,255,.97);
  padding: 26px;
  border-radius: 8px;
  color: var(--ink);
  box-shadow: var(--shadow);
  border-top: 5px solid var(--gold);
}

.hero-panel h2 {
  font-size: 1.3rem;
  color: var(--maroon);
  line-height: 1.25;
  margin: 0 0 14px;
}

.quick-points {
  margin: 0;
  padding: 0;
  list-style: none;
}

.quick-points li {
  padding: 9px 0;
  border-top: 1px solid var(--line);
  font-size: .95rem;
}

.quick-points li:before {
  content: "✓";
  color: var(--maroon);
  font-weight: 700;
  margin-right: 10px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 10px 19px;
  border-radius: 4px;
  border: 2px solid var(--maroon);
  font-weight: 700;
  cursor: pointer;
  font: inherit;
  transition: .2s;
}

.btn-primary {
  background: var(--maroon);
  color: #fff;
}

.btn-primary:hover {
  background: var(--gold);
  color: var(--maroon);
  border-color: var(--gold);
}

.hero .btn-primary {
  background: var(--gold);
  color: var(--maroon);
  border-color: var(--gold);
}

.hero .btn-primary:hover {
  background: transparent;
  color: var(--gold);
}

.btn-secondary {
  background: #fff;
  color: var(--maroon);
}

.btn-secondary:hover {
  background: var(--gold);
  border-color: var(--gold);
}

.benefit-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.benefit {
  padding: 25px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 6px;
  box-shadow: 0 4px 12px rgba(0,0,0,.04);
}

.benefit-icon {
  width: 45px;
  height: 45px;
  display: grid;
  place-items: center;
  color: var(--maroon);
  background: #fbf0f2;
  border-radius: 50%;
  font-size: 1.25rem;
  margin-bottom: 14px;
}

.benefit h3 {
  margin: 0 0 5px;
  font-size: 1.2rem;
}

.benefit p {
  margin: 0;
  color: var(--muted);
  font-size: .95rem;
}

.dorm-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}

.dorm-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 7px;
  overflow: hidden;
  box-shadow: 0 4px 14px rgba(0,0,0,.06);
  display: flex;
  flex-direction: column;
  transition: transform .2s, box-shadow .2s;
}

.dorm-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}

.dorm-image {
  height: 168px;
  background: linear-gradient(135deg,#e9d2b6,#c88d67);
  position: relative;
  overflow: hidden;
}

.dorm-image-container {
  width: 100%;
  height: 180px;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-color: #f1f5f9;
}

.dorm-image:before {
  content: "";
  position: absolute;
  inset: 32% 12% 0;
  background: #fff7e9;
  clip-path: polygon(0 35%,50% 0,100% 35%,100% 100%,0 100%);
}

.dorm-image:after {
  content: "HAU";
  position: absolute;
  right: 14px;
  top: 12px;
  background: rgba(128,0,32,.88);
  color: #fff;
  padding: 4px 9px;
  font-size: .72rem;
  letter-spacing: .08em;
  font-weight: bold;
  border-radius: 2px;
}

.dorm-card:nth-child(3n+2) .dorm-image {
  background: linear-gradient(135deg,#cbd9d5,#7da69a);
}

.dorm-card:nth-child(3n) .dorm-image {
  background: linear-gradient(135deg,#d9c7d0,#a07a8d);
}

.dorm-body {
  padding: 18px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.dorm-body h3 {
  line-height: 1.25;
  margin: 0 0 8px;
  font-size: 1.18rem;
}

.price {
  font-size: 1.3rem;
  font-weight: 700;
  color: #9a7914;
  margin: 0 0 7px;
}

.distance {
  font-size: .86rem;
  color: var(--muted);
  margin: 0 0 15px;
}

.card-desc {
  color: var(--muted);
  font-size: .9rem;
  margin: 0 0 17px;
}

.dorm-body .btn {
  margin-top: auto;
  align-self: flex-start;
  font-size: .9rem;
  min-height: 40px;
}

.page-hero {
  background: var(--maroon);
  color: #fff;
  padding: 48px 0;
}

.page-hero h1 {
  margin: 0;
  font-size: clamp(2rem, 5vw, 3rem);
}

.page-hero p {
  margin: 6px 0 0;
  color: #f0dadd;
}

.filters {
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: 0 5px 18px rgba(0,0,0,.05);
  padding: 20px;
  border-radius: 6px;
  margin-top: -26px;
  position: relative;
}

.filter-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 14px;
  align-items: end;
}

.field {
  display: grid;
  gap: 5px;
}

.field label {
  font-weight: 700;
  font-size: .86rem;
  color: var(--maroon);
}

input,
select,
textarea {
  width: 100%;
  font: inherit;
  border: 1px solid #c9c4c1;
  border-radius: 4px;
  padding: 11px 12px;
  background: #fff;
  color: var(--ink);
}

input:focus,
select:focus,
textarea:focus {
  outline: 3px solid rgba(128,0,32,.14);
  border-color: var(--maroon);
}

.amenity-filters {
  grid-column: 1/-1;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 4px;
}

.check {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: .88rem;
  padding: 6px 9px;
  border: 1px solid var(--line);
  border-radius: 20px;
  cursor: pointer;
}

.check input {
  width: auto;
  accent-color: var(--maroon);
}

.result-count {
  margin: 26px 0 15px;
  color: var(--muted);
  font-size: .92rem;
}

.empty {
  grid-column: 1/-1;
  text-align: center;
  padding: 40px;
  background: #fff;
  border: 1px dashed var(--line);
  color: var(--muted);
}

.detail-visual {
  height: 390px;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  position: relative;
  overflow: hidden;
}

.detail-layout {
  display: grid;
  grid-template-columns: 1.5fr .8fr;
  gap: 28px;
  margin-top: 34px;
}

.detail-main,
.info-card {
  background: #fff;
  border: 1px solid var(--line);
  padding: 28px;
  border-radius: 6px;
}

.detail-main h1 {
  color: var(--maroon);
  line-height: 1.15;
  margin: 0 0 7px;
  font-size: clamp(1.75rem,4vw,2.6rem);
}

.detail-main h2 {
  font-size: 1.25rem;
  color: var(--maroon);
  margin: 28px 0 8px;
}

.amenity-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}

.tag {
  color: var(--maroon);
  border: 1px solid var(--maroon);
  border-radius: 20px;
  padding: 5px 11px;
  font-size: .86rem;
  font-weight: 700;
}

.info-card h2 {
  font-size: 1.2rem;
  color: var(--maroon);
  margin: 0 0 15px;
}

.info-item {
  padding: 12px 0;
  border-top: 1px solid var(--line);
}

.info-item:first-of-type {
  border-top: 0;
}

.info-label {
  display: block;
  color: var(--muted);
  font-size: .78rem;
  text-transform: uppercase;
  letter-spacing: .07em;
}

.info-value {
  font-weight: 700;
  font-size: .95rem;
}

.detail-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 25px;
}

.form-wrap {
  display: grid;
  grid-template-columns: 1.2fr .8fr;
  gap: 28px;
}

.form-card,
.contact-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 28px;
  box-shadow: 0 5px 16px rgba(0,0,0,.04);
}

.form-card h2,
.contact-card h2 {
  color: var(--maroon);
  margin: 0 0 18px;
  font-size: 1.35rem;
}

.form-card form {
  display: grid;
  gap: 16px;
}

textarea {
  min-height: 140px;
  resize: vertical;
}

.form-message {
  margin: 14px 0 0;
  color: var(--maroon);
  font-weight: bold;
  display: none;
}

.contact-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.contact-list li {
  border-top: 1px solid var(--line);
  padding: 16px 0;
}

.contact-list strong {
  display: block;
  color: var(--maroon);
  font-size: .8rem;
  text-transform: uppercase;
  letter-spacing: .08em;
}

.site-footer {
  background: var(--maroon);
  color: #fff;
  border-top: 3px solid var(--gold);
  padding: 34px 0 20px;
}

.footer-grid {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 25px;
}

.footer-brand {
  font-size: 1.12rem;
  font-weight: 700;
  margin: 0 0 5px;
}

.footer-note {
  margin: 0;
  color: #ead3d8;
  font-size: .88rem;
}

.footer-links {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.footer-links a {
  color: var(--gold);
  font-size: .9rem;
}

.copyright {
  border-top: 1px solid rgba(255,255,255,.2);
  margin-top: 24px;
  padding-top: 15px;
  color: #ead3d8;
  font-size: .8rem;
}

.made-by {
  color: var(--gold);
}

@media(max-width:800px) {
  .hero-grid,
  .detail-layout,
  .form-wrap {
    grid-template-columns: 1fr;
  }

  .hero-panel {
    max-width: 550px;
  }

  .benefit-grid {
    grid-template-columns: 1fr;
  }

  .dorm-grid {
    grid-template-columns: repeat(2,1fr);
  }

  .filter-grid {
    grid-template-columns: 1fr 1fr;
  }

  .field:first-child {
    grid-column: 1/-1;
  }

  .detail-visual {
    height: 310px;
  }
}

@media(max-width:540px) {
  .nav {
    min-height: 62px;
    align-items: flex-start;
    padding: 12px 0;
    gap: 8px;
  }

  .brand {
    font-size: .9rem;
    padding-top: 8px;
  }

  .nav-links {
    gap: 0;
  }

  .nav-links a {
    padding: 7px;
    font-size: .82rem;
  }

  .hero {
    padding: 65px 0 80px;
  }

  .section {
    padding: 55px 0;
  }

  .dorm-grid {
    grid-template-columns: 1fr;
  }

  .filter-grid {
    grid-template-columns: 1fr;
  }

  .field:first-child {
    grid-column: auto;
  }

  .filters {
    padding: 16px;
  }

  .detail-main,
  .info-card,
  .form-card,
  .contact-card {
    padding: 21px;
  }

  .footer-grid {
    display: block;
  }

  .footer-links {
    margin-top: 16px;
  }

  .detail-visual:after {
    white-space: normal;
    text-align: center;
    width: 90%;
  }
}

.brand {
  display: flex;
  align-items: center;
  gap: 9px;
}

.brand:before {
  content: "";
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  background: #fff url("../assets/images/hau-logo.png") center/contain no-repeat;
  border-radius: 50%;
  padding: 2px;
}

.brand span {
  color: var(--gold);
}
