/* ==========================================================================
   The Blue Beach Motel — static site stylesheet
   Rebuilt from the WordPress (Astra + Elementor) design by ONNA Web Design.
   ========================================================================== */

/* ---------- Fonts (self-hosted woff2, latin subset) ---------- */
@font-face {
  font-family: 'DM Serif Display';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/fonts/dm-serif-display-latin.woff2') format('woff2');
}
@font-face {
  font-family: 'Open Sans';
  font-style: normal;
  font-weight: 300 800;
  font-display: swap;
  src: url('/fonts/open-sans-latin.woff2') format('woff2');
}

/* ---------- Design tokens (from the original Astra global colors) ---------- */
:root {
  --blue: #2f62e6;          /* original #4175FC, darkened so white text / links meet WCAG AA */
  --blue-dark: #084af3;     /* global color 1 */
  --navy: #294387;          /* main header bar */
  --navy-dark: #21376f;     /* top bar */
  --heading: #101218;       /* global color 2 */
  --text: #494b51;          /* global color 3 */
  --page-bg: #f3f5f5;       /* global color 4 */
  --white: #ffffff;
  --container: 1240px;      /* 1200px content + 2 × 20px gutters */
  --gutter: 20px;
  --font-body: 'Open Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-head: 'DM Serif Display', Georgia, 'Times New Roman', serif;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.5;
  color: var(--text);
  background: var(--page-bg);
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--blue); text-underline-offset: 2px; }
a:hover, a:focus { color: var(--blue-dark); }
p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }

h1, h2, h3, h4, h5 {
  font-family: var(--font-head);
  font-weight: 400;
  color: var(--heading);
  margin: 0 0 20px;
  line-height: 1.3;
}
h1, .size-h1 { font-size: 4.375rem; line-height: 1.4; }   /* 70px */
h2, .size-h2 { font-size: 2.625rem; }                     /* 42px */
h3, .size-h3 { font-size: 1.75rem; }                      /* 28px */
h4, .size-h4 { font-size: 1.5rem; line-height: 1.2; }     /* 24px */
h5, .size-h5 { font-size: 1.25rem; line-height: 1.2; }    /* 20px */

:focus-visible { outline: 3px solid #1a73e8; outline-offset: 2px; }
.site-header :focus-visible, .page-hero :focus-visible, .home-hero :focus-visible, .site-footer :focus-visible { outline-color: #fff; }

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: 10px; top: -60px; z-index: 1000;
  background: var(--white); color: var(--heading);
  padding: 10px 16px; font-weight: 700; text-decoration: none; border-radius: 3px;
}
.skip-link:focus { top: 10px; }

.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 var(--gutter); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.75rem;
  line-height: 1;
  text-transform: uppercase;
  letter-spacing: 2px;
  text-decoration: none;
  text-align: center;
  color: var(--white);
  background: var(--blue);
  border: 1px solid var(--blue);
  padding: 18px 34px;
  transition: background-color .2s, border-color .2s;
}
.btn:hover, .btn:focus { color: var(--white); background: var(--blue-dark); border-color: var(--blue-dark); }
.btn-light { background: var(--white); border-color: var(--white); color: #131316; }
.btn-light:hover, .btn-light:focus { background: #e9ecf2; border-color: #e9ecf2; color: #131316; }
.btn-wrap { margin-top: 20px; }

/* ==========================================================================
   Header
   ========================================================================== */
.site-header { position: relative; z-index: 100; color: var(--white); }
.topbar { background: var(--navy-dark); border-bottom: 1px solid rgba(255,255,255,.2); font-size: 0.9375rem; }
.topbar .container { display: flex; justify-content: space-between; align-items: center; min-height: 50px; gap: 20px; }
.topbar p { margin: 0; }
.topbar a { color: var(--white); text-decoration: none; }
.topbar a:hover, .topbar a:focus { text-decoration: underline; color: var(--white); }
.topbar-contact { display: flex; gap: 20px; }

.mainbar { background: var(--navy); }
.mainbar .container { display: flex; align-items: center; justify-content: space-between; min-height: 90px; gap: 20px; }
.site-logo { display: block; flex-shrink: 0; }
.site-logo img { width: 220px; height: auto; }

/* Home page: header sits transparently over the hero photo */
.home .site-header { position: absolute; top: 0; left: 0; right: 0; }
.home .topbar, .home .mainbar { background: transparent; }

.primary-nav { display: flex; align-items: center; gap: 18px; }
.menu { list-style: none; margin: 0; padding: 0; display: flex; align-items: center; }
.menu a {
  display: block; padding: 0 16px; line-height: 5.625rem;
  font-size: 0.9375rem; text-transform: uppercase;
  color: var(--white); text-decoration: none;
}
.menu a:hover, .menu a:focus, .menu a[aria-current="page"] { color: var(--page-bg); text-decoration: underline; text-underline-offset: 6px; }
.header-book { font-size: 0.9375rem; padding: 16px 32px; background: var(--blue-dark); border-color: var(--white); }
.header-book:hover, .header-book:focus { background: var(--blue); border-color: var(--white); }

.nav-toggle {
  display: none; background: #101218; border: 0; width: 44px; height: 44px; padding: 12px; cursor: pointer; border-radius: 2px;
}
.nav-toggle span, .nav-toggle span::before, .nav-toggle span::after {
  display: block; width: 20px; height: 2px; background: #fff; position: relative; transition: transform .2s, background-color .2s;
}
.nav-toggle span::before, .nav-toggle span::after { content: ''; position: absolute; left: 0; }
.nav-toggle span::before { top: -6px; }
.nav-toggle span::after { top: 6px; }
.nav-toggle[aria-expanded="true"] span { background: transparent; }
.nav-toggle[aria-expanded="true"] span::before { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span::after { transform: translateY(-6px) rotate(-45deg); }

@media (max-width: 921px) {
  .topbar { display: none; }
  .mainbar .container { min-height: 80px; flex-wrap: wrap; }
  .site-logo img { width: 180px; }
  .nav-toggle { display: block; }
  .primary-nav {
    display: none; flex-direction: column; align-items: stretch; gap: 0;
    background: var(--page-bg);
    margin: 0 calc(var(--gutter) * -1);
    width: calc(100% + var(--gutter) * 2);
    /* A tall expanded menu scrolls inside itself (important in landscape) */
    max-height: calc(100vh - 80px);
    max-height: calc(100dvh - 80px);
    overflow-y: auto;
  }
  .primary-nav.is-open { display: flex; }
  .menu { flex-direction: column; align-items: stretch; }
  .menu a { line-height: 1.4; padding: 14px 25px; color: var(--text); border-bottom: 1px solid #dfe3e3; }
  .menu a:hover, .menu a:focus, .menu a[aria-current="page"] { color: var(--blue); background: var(--white); }
  .header-book { margin: 16px 25px 20px; }
}
@media (max-width: 544px) {
  .mainbar .container { min-height: 64px; }
  .site-logo img { width: 140px; }
}

/* ==========================================================================
   Heroes — photo is an absolutely-positioned layer behind the text, so the
   band grows with its content instead of clipping a long, wrapped title.
   ========================================================================== */
.hero-media { position: absolute; inset: 0; z-index: -1; overflow: hidden; }
.hero-media img { width: 100%; height: 100%; object-fit: cover; }
.hero-media::after { content: ''; position: absolute; inset: 0; }

.home-hero {
  position: relative; isolation: isolate;
  min-height: calc(60vh + 141px);
  padding: 120px 0;              /* clears the transparent header; text centers on the photo */
  display: flex; align-items: center;
  color: var(--white);
}
.home-hero .hero-media img { object-position: top center; }
.home-hero .hero-media::after { background: rgba(6, 23, 65, 0.5); }
.home-hero .container { padding-top: 40px; padding-bottom: 0; }
.home-hero-text { max-width: 60%; padding-right: 90px; }
.home-hero h1 { color: var(--white); margin-bottom: 10px; }
.home-hero p { font-size: 1.0625rem; }

.page-hero {
  position: relative; isolation: isolate;
  min-height: 324px;
  display: flex; align-items: center; justify-content: center;
  text-align: center;
}
.page-hero .hero-media::after { background: rgba(16, 18, 24, 0.5); }
.page-hero h1 { color: var(--white); margin: 30px 0; }

@media (max-width: 1024px) {
  h1, .size-h1 { font-size: 3.75rem; }   /* 60px */
  h2, .size-h2 { font-size: 2.125rem; }  /* 34px */
  h4, .size-h4 { font-size: 1.375rem; }
  h5, .size-h5 { font-size: 1.125rem; }
  .home-hero { min-height: 0; }
  .home-hero .container { padding-bottom: 50px; }
  .home-hero-text { max-width: none; padding-right: 64px; }
}
@media (max-width: 921px) {
  .home-hero { padding: 80px 0 0; }
  .page-hero { min-height: 300px; }
}
@media (max-width: 767px) {
  body { font-size: 0.9375rem; }
  h1, .size-h1 { font-size: 2.375rem; }  /* 38px */
  h2, .size-h2 { font-size: 1.75rem; }   /* 28px */
  h3, .size-h3 { font-size: 1.5rem; }    /* 24px */
  .home-hero .container { padding-top: 30px; padding-bottom: 50px; }
  .home-hero-text { padding-right: 0; }
  .home-hero p { font-size: 0.9375rem; }
  .page-hero { min-height: 270px; }
  .btn { padding: 15px 23px; }
}
@media (max-width: 544px) {
  .home-hero { padding: 64px 0 0; }
}

/* ==========================================================================
   Sections & layout
   ========================================================================== */
.section { padding: 100px 0; }
.section--flush-top { padding-top: 0; }

.split { display: grid; grid-template-columns: 1fr 1fr; gap: 0; align-items: start; }
.split > * { min-width: 0; }
.split--75 { grid-template-columns: 3fr 1fr; align-items: end; gap: 20px; }
.split--75 > :last-child { justify-self: end; }

/* Home: renovation / "Now Open!" block */
.intro-left img { width: 95%; margin-bottom: 20px; }
.intro-left h2 { margin-top: 10px; }
.intro-right { padding-left: 30px; }
/* Homepage "Stay, Relax, Explore" heading: sized to stay on one line.
   The phrase is ~8.75× its font-size wide, so it scales with the column
   (half the container minus padding) and tops out at 62px. */
.intro-right h2 { font-size: min(3.875rem, calc(5.3vw - 6px)); line-height: 1.15; }
.intro-right p { padding-right: 48px; }
.intro-right img { width: 95%; margin-top: 30px; }

/* Home: Near By */
/* "Near By" band: a faint blue tint to set it apart from the section above */
.nearby { padding-top: 90px; background: #eaf0f8; }
.nearby .split { gap: 20px; align-items: start; margin-bottom: 40px; }
.nearby .split .col-text { padding-left: 10px; }
.nearby-note { padding-bottom: 0; }
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 50px; }
.card img { margin: 0 auto 30px; width: 100%; max-width: 370px; }
.card h3 { margin-bottom: 20px; }
.card-body { max-width: 370px; margin: 0 auto; }

/* Rooms gallery (uniform 3:2 grid) */
.room-gallery { list-style: none; margin: 60px 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.room-gallery a { display: block; }
.room-gallery img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; }
.room-gallery a:hover img, .room-gallery a:focus img { opacity: .88; }

/* Things to Do directory */
.directory { display: grid; grid-template-columns: 1fr 1fr; gap: 0 60px; margin-top: 60px; }
.directory section + section { margin-top: 40px; }
.directory h2 { font-size: 1.75rem; margin-bottom: 24px; }
.directory p { margin-bottom: 1.2em; }
.directory .place { font-weight: 600; }

@media (max-width: 1024px) {
  .section { padding: 80px 0; }
  .intro-right p { padding-right: 0; }
}
@media (max-width: 767px) {
  .section { padding: 64px 0; }
  .split, .split--75, .cards, .directory { grid-template-columns: 1fr; }
  .split--75 > :last-child { justify-self: start; }
  .intro-right { padding-left: 0; order: -1; }   /* heading block first on phones, as in the original */
  .intro-right h2 { font-size: min(2.375rem, calc((100vw - 40px) / 9.3)); }
  .intro-left img, .intro-right img { width: 100%; }
  .intro-left img { margin-top: 20px; }
  .card { padding-bottom: 45px; }
  .room-gallery { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .directory { gap: 0; margin-top: 40px; }
  .directory > div + div { margin-top: 40px; }
}

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer {
  color: var(--white);
  text-align: center;
  background-color: #1b1a1c;
  background-image: linear-gradient(rgba(0,0,0,.56), rgba(0,0,0,.56)), url('/images/narraganseet-beach-sunrise-1400.webp');
  background-size: cover;
  background-position: center;
}
@media (min-width: 1401px) {
  .site-footer { background-image: linear-gradient(rgba(0,0,0,.56), rgba(0,0,0,.56)), url('/images/narraganseet-beach-sunrise.webp'); }
}
@media (max-width: 767px) {
  .site-footer { background-image: linear-gradient(rgba(0,0,0,.56), rgba(0,0,0,.56)), url('/images/narraganseet-beach-sunrise-900.webp'); }
}
/* The footer photo is attached by main.js shortly before the footer scrolls
   into view (.bg-defer removed), so it never competes with the hero image. */
.site-footer.bg-defer { background-image: none !important; }

.footer-main { padding: 130px 0 100px; }
.footer-main h2 { color: var(--white); font-size: 2.625rem; max-width: 680px; margin: 0 auto 30px; line-height: 1.3; }
.footer-main .footer-phone { font-family: var(--font-head); font-size: 2.625rem; line-height: 1.3; margin: 10px 0 40px; }
.footer-main a { color: var(--white); text-decoration: none; }
.footer-main a:hover, .footer-main a:focus { text-decoration: underline; }
.footer-main .btn-light, .footer-main .btn-light:hover, .footer-main .btn-light:focus { color: #131316; text-decoration: none; }
.footer-cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.footer-cols h3 { color: var(--white); font-size: 1.75rem; margin-bottom: 10px; }
.footer-cols address { font-style: normal; font-weight: 400; line-height: 1.6; }
.footer-cols .reviews-link img { margin: 0 auto; width: 170px; }
.footer-bottom {
  background: rgba(15,17,23,.7);
  border-top: 1px solid var(--heading);
  min-height: 90px;
  padding: 20px var(--gutter);
  display: flex; align-items: center; justify-content: center;
  font-size: 0.875rem;
}
.footer-bottom p { margin: 0; }
.footer-bottom a { color: #8fa4ff; }
.footer-bottom a:hover, .footer-bottom a:focus { color: var(--white); }
@media (max-width: 1024px) {
  .footer-main h2, .footer-main .footer-phone { font-size: 2.125rem; }
}
@media (max-width: 767px) {
  .footer-main { padding: 60px 0 40px; }
  .footer-main h2, .footer-main .footer-phone { font-size: 1.75rem; }
  .footer-cols { grid-template-columns: 1fr; gap: 30px; }
  /* leave room under the copyright line for BBB's floating badge (bottom-left) */
  .footer-bottom { padding-bottom: 90px; }
}

/* ==========================================================================
   Lightbox (progressive enhancement for gallery links)
   ========================================================================== */
.lightbox { border: 0; padding: 0; margin: auto; max-width: 100vw; max-height: 100vh; width: 100vw; height: 100vh; background: transparent; }
.lightbox::backdrop { background: rgba(0,0,0,.92); }
.lightbox-inner { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; padding: 50px 60px; }
.lightbox img { max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; }
.lightbox button { position: absolute; background: rgba(0,0,0,.5); color: #fff; border: 0; width: 48px; height: 48px; font-size: 1.75rem; line-height: 1; cursor: pointer; border-radius: 50%; }
.lightbox button:hover, .lightbox button:focus-visible { background: rgba(0,0,0,.85); }
.lightbox .lb-close { top: 10px; right: 10px; }
.lightbox .lb-prev { left: 8px; top: 50%; transform: translateY(-50%); }
.lightbox .lb-next { right: 8px; top: 50%; transform: translateY(-50%); }
.lightbox .lb-count { position: absolute; bottom: 14px; left: 0; right: 0; text-align: center; color: #fff; font-size: .875rem; }
@media (max-width: 600px) { .lightbox-inner { padding: 60px 8px; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; scroll-behavior: auto !important; }
}

/* ---------- 404 ---------- */
.notfound { text-align: center; }
.notfound ul { list-style: none; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 10px 24px; margin-top: 20px; }
