:root {
  --cream: #fbfaf6;
  --navy: #102a38;
  --navy-deep: #0b1d27;
  --line: #d5dde2;
  --ink-soft: #55697a;
  --white: #ffffff;
  --font-display: Georgia, "Times New Roman", serif;
  --font-body: system-ui, -apple-system, "Segoe UI", Helvetica, Arial, sans-serif;
  color-scheme: light;
}

* { box-sizing: border-box; }

body {
  background: var(--cream);
  color: var(--navy);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  margin: 0;
  padding: 0;
}

img { display: block; max-width: 100%; }

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

:focus-visible { outline: 2px solid var(--navy); outline-offset: 3px; }

.wrap {
  max-width: 1200px;
  margin: 0 auto;
  padding-left: max(clamp(16px, 4vw, 40px), env(safe-area-inset-left, 0px));
  padding-right: max(clamp(16px, 4vw, 40px), env(safe-area-inset-right, 0px));
}

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 400;
  line-height: 1.12;
  margin: 0;
  text-wrap: balance;
}

h2 { font-size: clamp(2rem, 4.5vw, 3rem); }

p { margin: 0; }

.btn {
  display: inline-block;
  font: 500 0.95rem/1 var(--font-body);
  min-height: 44px;
  padding: 16px 22px;
  border: 1px solid var(--navy);
  background: transparent;
  color: var(--navy);
  cursor: pointer;
  transition: all 0.3s ease;
  text-align: center;
  border-radius: 10px;
}

.btn:hover {
  background: var(--navy);
  color: var(--white);
}

.nav-links a.is-signed-in {
  color: #d9eadc;
  cursor: pointer;
  font-weight: 600;
}

.btn:disabled,
.btn.is-loading {
  cursor: wait;
  opacity: 0.68;
  pointer-events: none;
}

.btn.is-loading::after {
  content: "";
  display: inline-block;
  width: 0.85em;
  height: 0.85em;
  margin-left: 0.65em;
  vertical-align: -0.1em;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: button-spin 0.7s linear infinite;
}

@keyframes button-spin {
  to { transform: rotate(360deg); }
}

.btn-solid {
  background: var(--navy);
  color: var(--white);
}

.btn-solid:hover {
  background: var(--navy-deep);
}

.btn-light {
  background: var(--white);
  color: var(--navy);
  border-color: var(--white);
}

.btn-light:hover {
  background: var(--cream);
  color: var(--navy);
}

.logo {
  font-family: var(--font-display);
  font-size: 1.5rem;
  color: var(--white);
}

.hero {
  position: relative;
  background: var(--navy-deep);
  color: var(--white);
  overflow: hidden;
}

.hero-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: .55;
  transition: transform 0.5s ease;
}

.hero:hover .hero-img {
  transform: scale(1.05);
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(11,29,39,.52);
}

.hero .wrap {
  position: relative;
  z-index: 1;
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding-block: 18px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
  font-size: 0.95rem;
}

.nav-links [hidden] {
  display: none;
}

.nav-links .btn {
  padding: 12px 18px;
  font-size: 0.9rem;
}

.hero h1 {
  font-size: clamp(2.8rem, 7vw, 5rem);
  padding-block: clamp(48px, 8vw, 96px) clamp(64px, 9vw, 108px);
  text-align: center;
}

.book-wrap {
  position: relative;
  z-index: 2;
  margin-top: -52px;
}

.book {
  display: grid;
  grid-template-columns: 1fr 1fr 0.9fr auto;
  align-items: stretch;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 22px 28px;
}

.book:hover {
  transform: none;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 0 24px;
  border-left: 1px solid var(--line);
  min-width: 0;
  transition: background-color 0.3s ease;
}

.field:hover {
  background-color: rgba(213, 221, 226, 0.1);
}

.field:first-child {
  border-left: 0;
  padding-left: 0;
}

.field label {
  font-size: 0.85rem;
  color: var(--ink-soft);
}

.field input, .field select {
  font: 500 1rem var(--font-body);
  color: var(--navy);
  border: 0;
  background: transparent;
  padding: 0;
  width: 100%;
  min-width: 0;
  min-height: 28px;
}

.book .btn {
  align-self: center;
  margin-left: 24px;
}

.booking-status {
  grid-column: 1 / -1;
  color: var(--navy);
  font-size: 0.9rem;
  margin: 0;
}

.booking-status.error {
  color: #8a2f2f;
}

.booking-status:not(.error) {
  color: #2f6847;
  font-weight: 600;
}

.booking-confirmation {
  padding-block: 18px 24px;
}

.booking-confirmation-panel {
  max-width: 680px;
  margin: 0 auto;
  padding: 26px 30px;
  border: 1px solid #a9c7b1;
  border-radius: 14px;
  background: #edf6ef;
  color: var(--navy);
  text-align: center;
}

.confirmation-label {
  color: #2f6847;
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.booking-confirmation h2 {
  margin: 6px 0 10px;
}

.confirmation-details {
  font-weight: 600;
}

.confirmation-note {
  color: var(--ink-soft);
  margin: 8px 0 18px;
}

.availability-results {
  padding-block: 18px 22px;
}

.availability-results h2 {
  margin-bottom: 18px;
  text-align: center;
}

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

.availability-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--white);
}

.availability-card img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.availability-card-body {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 18px 20px 20px;
}

.availability-card-body h3 {
  font-size: 1.45rem;
}

.availability-card-body p {
  color: var(--ink-soft);
}

.availability-card-body .price {
  color: var(--navy);
  font-weight: 500;
}

.availability-count {
  color: var(--navy) !important;
  font-size: .82rem;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.availability-card .btn {
  align-self: flex-start;
  margin-top: 8px;
}

.account {
  padding-block: 16px 48px;
}

.account h2 {
  font-size: 1.7rem;
  margin-bottom: 18px;
  text-align: center;
}

.account-form {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  width: min(100%, 380px);
  margin: 0 auto;
}

.account-switcher {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-bottom: 20px;
}

.account-switcher[hidden],
.account-form[hidden] {
  display: none !important;
}

.account-tab {
  min-height: 40px;
  padding: 8px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: transparent;
  color: var(--navy);
  cursor: pointer;
}

.account-tab.active {
  background: var(--navy);
  border-color: var(--navy);
  color: var(--white);
}

.register-only {
  display: none;
}

.account-form[data-action="register"] .register-only {
  display: block;
}

.account-form[data-action="register"] input.register-only {
  display: block;
}

.account-form label {
  font-size: .85rem;
  color: var(--ink-soft);
}

.account-form input {
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  font: 1rem var(--font-body);
  margin-bottom: 8px;
}

.account-status {
  grid-column: 1 / -1;
  color: var(--navy);
}

.account-status.success,
.signed-in-status {
  color: #2f6847;
  font-weight: 600;
}

.signed-in-status {
  width: min(100%, 380px);
  margin: 0 auto 16px;
  padding: 10px 12px;
  border: 1px solid #a9c7b1;
  border-radius: 8px;
  background: #edf6ef;
  text-align: center;
}

.my-bookings {
  padding-block: 8px 32px;
}

.my-bookings h2 {
  margin-bottom: 16px;
  text-align: center;
}

.my-bookings-list {
  display: grid;
  gap: 10px;
  margin: 0 auto;
  width: min(100%, 680px);
}

.my-booking {
  border: 1px solid var(--line);
  padding: 14px 16px;
}

.my-booking h3 {
  font-size: 1.1rem;
  margin-bottom: 4px;
}

.my-booking p {
  color: var(--ink-soft);
  font-size: .9rem;
}

.account:has(.signed-in-status:not([hidden])) h2 {
  margin-bottom: 12px;
}

section.in-view {
  opacity: 1 !important;
  transform: translateY(0) !important;
}

.welcome {
  padding-block: clamp(36px, 5vw, 64px) clamp(20px, 3vw, 36px);
}

.welcome .wrap {
  display: flex;
  justify-content: center;
}

.welcome h2,
.rooms h2,
.rhythm h2,
.gallery h2,
.cta h2 { text-align: center; }

.rooms {
  padding-block: clamp(28px, 4vw, 52px) clamp(44px, 6vw, 72px);
}

.rooms h2 {
  margin-bottom: 24px;
}

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

.room {
  background: var(--white);
  border: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  min-width: 0;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  border-radius: 14px;
  overflow: hidden;
}

.room:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 30px -10px rgba(0,0,0,0.15);
}

.room img {
  width: 100%;
  aspect-ratio: 391 / 360;
  object-fit: cover;
  border-radius: 0;
}

.room-body {
  padding: 20px 22px 22px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}

.room-body h3 {
  font-size: 1.7rem;
}

.room-body p {
  color: var(--ink-soft);
}

.room-body .price {
  color: var(--navy);
  font-weight: 500;
  margin-top: 4px;
}

.room-body .btn {
  align-self: flex-start;
  margin-top: 16px;
  padding: 13px 18px;
}

.rhythm {
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: var(--navy);
  color: var(--white);
  overflow: hidden;
}

.rhythm-img {
  min-height: 360px;
  position: relative;
}

.rhythm-img img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.rhythm-copy {
  padding: clamp(32px, 5vw, 64px) max(clamp(16px, 4vw, 64px), env(safe-area-inset-right, 0px)) clamp(32px, 5vw, 64px) clamp(24px, 6vw, 84px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 22px;
  min-width: 0;
}

.rhythm-copy p {
  color: rgba(255,255,255,.8);
  font-size: 1.1rem;
  max-width: 40ch;
}

.gallery {
  padding-block: clamp(40px, 6vw, 72px);
}

.gal-grid {
  display: grid;
  grid-template-columns: 510fr 307fr 367fr;
  gap: 18px;
  align-items: end;
}

.gal-grid img {
  width: 100%;
  object-fit: cover;
  border-radius: 14px;
}

.g1 { aspect-ratio: 510 / 440; }
.g2 { aspect-ratio: 307 / 330; }
.g3 { aspect-ratio: 367 / 510; }

.gallery .btn {
  margin-top: 20px;
}

.cta {
  position: relative;
  background: var(--navy-deep);
  color: var(--white);
  text-align: center;
  overflow: hidden;
}

.cta-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cta::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(16,42,56,.82);
}

.cta .wrap {
  position: relative;
  z-index: 1;
  padding-block: clamp(48px, 7vw, 76px);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

.cta h2 {
  font-size: clamp(2.4rem, 6vw, 4rem);
}

.footer {
  background: var(--navy-deep);
  color: var(--white);
}

.footer .wrap {
  padding-block: 40px 28px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1fr;
  gap: 28px;
}

.footer h4 {
  font-size: 0.95rem;
  font-weight: 600;
  margin: 0 0 16px;
}

.footer ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-size: 0.95rem;
  color: rgba(255,255,255,.8);
}

.footer a:hover {
  text-decoration: underline;
}

.footer-credit {
  border-top: 1px solid rgba(255,255,255,.2);
  color: rgba(255,255,255,.72);
  font-size: .82rem;
  margin: 28px 0 0;
  padding-top: 18px;
  text-align: center;
}

.footer-credit a {
  color: var(--white);
}

@media (max-width: 900px) {
  .book { grid-template-columns: repeat(3, 1fr); gap: 18px 0; }
  .field:nth-child(3) { border-left: 1px solid var(--line); }
  .book .btn { grid-column: 1 / -1; margin-left: 0; text-align: center; }
  .welcome .wrap { grid-template-columns: 1fr; }
  .room-grid { grid-template-columns: 1fr; }
  .availability-grid { grid-template-columns: 1fr; }
  .rhythm { grid-template-columns: 1fr; }
  .rhythm-img { min-height: 260px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-grid > :first-child { grid-column: 1 / -1; }
}

@media (max-width: 620px) {
  .nav { flex-wrap: wrap; padding-block: 12px; }
  .nav-links { width: 100%; justify-content: space-between; gap: 8px; flex-wrap: wrap; display: none; flex-direction: column; align-items: stretch; padding-top: 8px; }
  .nav-links.open { display: flex; }
  .nav-links .btn { margin-left: 0; }
  .menu-btn { display: inline-flex !important; }
  .hero h1 { font-size: clamp(3rem, 14vw, 4.8rem); }
  .book-wrap {
    margin-top: 0;
    padding-block: 18px 8px;
  }
  .book {
    width: min(calc(100% - 36px), 360px);
    margin-inline: auto;
    grid-template-columns: 1fr;
    gap: 12px;
    background: transparent;
    border: 0;
    border-radius: 0;
    padding: 18px;
  }
  .field,
  .field:nth-child(3) { border-left: 0; border-top: 1px solid var(--line); padding: 12px 0 0; }
  .field:first-child { border-top: 0; padding-top: 0; }
  .field label { font-size: .78rem; }
  .field input, .field select { font-size: .92rem; min-height: 24px; }
  .book .btn { width: 100%; min-height: 42px; padding: 12px 16px; }
  .account { padding-block: 4px 32px; }
  .account h2 { font-size: 1.65rem; margin-bottom: 14px; }
  .account-switcher { margin-bottom: 16px; }
  .account-tab { min-height: 38px; padding: 7px 12px; font-size: .9rem; }
  .account-form { width: min(calc(100% - 36px), 360px); }
  .account-form input { min-height: 40px; padding: 8px 10px; }
  .account-form .btn { width: 100%; min-height: 42px; padding: 12px 16px; }
  .gal-grid { grid-template-columns: 1fr; gap: 12px; }
  .g1 { grid-column: auto; }
  .g1, .g2, .g3 { aspect-ratio: 4 / 3; }
  .footer-grid { grid-template-columns: 1fr; gap: 28px; }
  .footer-grid > :first-child { grid-column: auto; }
}

@media (hover: none) {
  .room:hover,
  .book:hover { transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}

.menu-btn {
  display: none;
  width: 42px;
  height: 42px;
  padding: 9px 8px;
  border: 1px solid rgba(255,255,255,.5);
  border-radius: 9px;
  background: transparent;
  color: var(--white);
  cursor: pointer;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
}

.menu-btn span {
  display: block;
  width: 24px;
  height: 2px;
  margin-inline: auto;
  background: currentColor;
  transition: transform .2s ease, opacity .2s ease;
}

.menu-btn.active span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.menu-btn.active span:nth-child(2) {
  opacity: 0;
}

.menu-btn.active span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

@media (max-width: 620px) {
  .menu-btn { display: inline-flex; }
}