/* Idleside, St Francis Bay
   Palette comes from the house: limewashed white, Indian Ocean blue, the red gingham on the armchairs, sage walls.
   Type: Libre Caslon Display for headings, Karla for everything else. */

:root {
  --white: #ffffff;
  --mist: #eef3f5;
  --ocean: #14506b;
  --deep: #0e2f40;
  --gingham: #b3323c;
  --sage: #7f9a74;
  --line: #d3dee3;
  --muted: #527080;
  --display: "Libre Caslon Display", "Libre Caslon Text", Georgia, "Times New Roman", serif;
  --body: Karla, "Helvetica Neue", Arial, sans-serif;
  --wrap: 1180px;
}
/* The site keeps its own light look whatever the viewer's theme. */
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --white: #ffffff; --mist: #eef3f5; } }
:root[data-theme="dark"] { --white: #ffffff; --mist: #eef3f5; }

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--white); color: var(--deep); font: 400 1.0625rem/1.65 var(--body); }
img { display: block; max-width: 100%; height: auto; }
h1, h2, h3, p, ul, dl, dd, figure { margin: 0; }
ul { padding: 0; list-style: none; }
a { color: var(--ocean); text-underline-offset: 3px; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--gingham); outline-offset: 3px; border-radius: 2px; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--white); padding: 8px 14px; z-index: 50; }
.skip:focus { left: 8px; }

h1, h2 { font-family: var(--display); font-weight: 400; letter-spacing: -0.01em; text-wrap: balance; }
h1 { font-size: clamp(2.5rem, 5.6vw, 4.6rem); line-height: 1.02; }
h2 { font-size: clamp(2rem, 3.6vw, 3rem); line-height: 1.08; margin-bottom: 1.25rem; }
h3 { font: 700 1.0625rem/1.3 var(--body); margin-bottom: .35rem; }

.wrap { max-width: var(--wrap); margin-inline: auto; padding-inline: clamp(20px, 4vw, 40px); }
.wrap.narrow { max-width: 780px; }
.band { padding-block: clamp(64px, 9vw, 120px); }
.band-tint { background: var(--mist); }
.lede { font-size: 1.2rem; max-width: 62ch; margin-bottom: 2.5rem; color: var(--deep); }
.prose p { max-width: 60ch; }
.prose p + p { margin-top: 1.1em; }
.aside { margin-top: 2rem; color: var(--muted); }
.text-link { font-weight: 700; }

/* the one decorative device: gingham, as on the armchairs and blinds */
.gingham {
  height: 22px;
  background-color: var(--white);
  background-image:
    linear-gradient(90deg, rgba(179, 50, 60, .55) 50%, transparent 50%),
    linear-gradient(rgba(179, 50, 60, .55) 50%, transparent 50%);
  background-size: 22px 22px;
}
.gingham-thin { height: 12px; background-size: 12px 12px; }

/* buttons */
.btn { display: inline-block; padding: .8em 1.4em; border-radius: 3px; font-weight: 700; text-decoration: none; border: 2px solid var(--ocean); cursor: pointer; line-height: 1.2; }
.btn-solid { background: var(--ocean); color: var(--white); }
.btn-solid:hover { background: var(--deep); border-color: var(--deep); }
.btn-large { font-size: 1.125rem; padding: .95em 1.7em; }
.btn-block { display: block; width: 100%; text-align: center; font-size: 1.0625rem; }
.btn[disabled] { opacity: .6; cursor: progress; }

/* header */
.site-header { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 28px; padding: 12px clamp(20px, 4vw, 40px); background: rgba(255, 255, 255, .96); border-bottom: 1px solid var(--line); }
.wordmark { font-family: var(--display); font-size: 1.5rem; line-height: 1.1; color: var(--deep); text-decoration: none; margin-right: auto; }
.wordmark span { display: block; font: 500 .8125rem/1.3 var(--body); color: var(--muted); }
.site-header nav { display: flex; gap: 24px; }
.site-header nav a { color: var(--deep); text-decoration: none; font-weight: 500; }
.site-header nav a:hover { text-decoration: underline; }
.header-cta { padding: .6em 1.1em; }

/* hero */
.hero { position: relative; min-height: min(86vh, 860px); display: flex; align-items: flex-end; background: var(--deep); overflow: hidden; }
.hero > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 60% 40%; }
.hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(14, 47, 64, 0) 22%, rgba(14, 47, 64, .55) 55%, rgba(14, 47, 64, .9) 100%); }
.hero-text h1, .hero-text p { text-shadow: 0 1px 18px rgba(14, 47, 64, .45); }
.hero-text { position: relative; z-index: 1; width: 100%; max-width: var(--wrap); margin-inline: auto; padding: 0 clamp(20px, 4vw, 40px) clamp(40px, 6vw, 72px); color: var(--white); }
.hero-text h1 { max-width: 15ch; }
.hero-text p { max-width: 52ch; font-size: 1.2rem; margin-top: 1.25rem; }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 24px; margin-top: 2rem; }
.hero .btn-solid { background: var(--white); color: var(--deep); border-color: var(--white); }
.hero .btn-solid:hover { background: var(--mist); }
.hero-rate { font-size: 1.0625rem; }
@media (prefers-reduced-motion: no-preference) {
  .hero > img { animation: settle 1.6s cubic-bezier(.2, .7, .2, 1) both; }
  .hero-text > * { animation: rise .9s cubic-bezier(.2, .7, .2, 1) both; }
  .hero-text > p { animation-delay: .12s; }
  .hero-text > .hero-actions { animation-delay: .24s; }
  @keyframes settle { from { transform: scale(1.06); } to { transform: none; } }
  @keyframes rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
}

/* facts */
.facts { border-bottom: 1px solid var(--line); }
.facts dl { max-width: var(--wrap); margin-inline: auto; padding: 28px clamp(20px, 4vw, 40px); display: grid; grid-template-columns: repeat(6, 1fr); gap: 20px; }
.facts dt { font-size: .875rem; color: var(--muted); }
.facts dd { font-family: var(--display); font-size: 1.45rem; line-height: 1.2; }

/* photos as buttons (open the viewer) */
.shot { display: block; width: 100%; padding: 0; border: 0; background: var(--mist); cursor: zoom-in; overflow: hidden; border-radius: 2px; }
.shot img { width: 100%; height: 100%; object-fit: cover; }

.split { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(32px, 6vw, 88px); align-items: center; }
.split-reverse { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); }
.shot-wide { aspect-ratio: 16 / 10; }

.collage { display: grid; grid-template-columns: 3fr 2fr; grid-template-rows: auto auto; gap: 12px; }
.collage .shot-a { grid-column: 1 / -1; aspect-ratio: 16 / 10; }
.collage .shot-b { aspect-ratio: 4 / 3; }
.collage .shot-c { aspect-ratio: 1 / 1.1; }

.trio { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(16px, 2.5vw, 32px); margin-top: 2.5rem; }
.trio .shot { aspect-ratio: 4 / 5; }
.trio figcaption { margin-top: 14px; max-width: 40ch; }

.rooms { display: grid; grid-template-columns: repeat(6, 1fr); gap: 40px clamp(16px, 2.5vw, 32px); }
.rooms li { grid-column: span 2; }
.rooms li:nth-child(-n+2) { grid-column: span 3; }
.rooms .shot { aspect-ratio: 3 / 2; margin-bottom: 14px; }
.rooms p { max-width: 46ch; }

.gallery { display: grid; grid-template-columns: repeat(4, 1fr); grid-auto-rows: 210px; grid-auto-flow: dense; gap: 10px; }
.gallery .shot.big { grid-column: span 2; grid-row: span 2; }
.gallery .shot.wide { grid-column: span 2; }

.amenities { display: grid; grid-template-columns: repeat(4, 1fr); gap: 32px; border-top: 1px solid var(--line); padding-top: 32px; }
.amenities li { padding: 7px 0; border-bottom: 1px solid var(--line); }
.amenities h3 { color: var(--ocean); margin-bottom: .6rem; }

.todo { display: grid; grid-template-columns: repeat(3, 1fr); gap: 36px 40px; border-top: 1px solid var(--line); padding-top: 32px; }
.todo h3 { color: var(--ocean); margin-bottom: .5rem; }

/* reviews */
.reviews { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); gap: clamp(32px, 6vw, 88px); align-items: center; }
.reviews .lede { margin-bottom: 1.25rem; }
.scores { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.scores div { padding: 18px 20px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.scores dt { font-size: .875rem; color: var(--muted); }
.scores dd { font-family: var(--display); font-size: 2.1rem; line-height: 1.1; color: var(--ocean); }

/* booking */
.band-book { background: var(--deep); color: var(--white); }
.band-book .lede { color: #d5e4ea; }
.notice { background: #fbe9c8; color: #4a3204; padding: 12px 16px; border-radius: 3px; margin-bottom: 24px; max-width: 80ch; }
.booking { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(24px, 4vw, 56px); align-items: start; }
.cal { background: var(--white); color: var(--deep); border-radius: 4px; padding: 24px; position: relative; }
.cal-nav { position: absolute; top: 20px; left: 24px; right: 24px; display: flex; justify-content: space-between; pointer-events: none; }
.cal-nav button { pointer-events: auto; width: 40px; height: 40px; border: 1px solid var(--line); border-radius: 50%; background: var(--white); cursor: pointer; font-size: 1.5rem; line-height: 1; padding: 0 0 4px; }
.cal-nav button:hover:not(:disabled) { background: var(--mist); }
.cal-nav button:disabled { opacity: .3; cursor: default; }
.cal-months { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; min-height: 330px; }
.loading { grid-column: 1 / -1; align-self: center; text-align: center; color: var(--muted); }
.month h3 { text-align: center; font: 400 1.35rem/40px var(--display); margin-bottom: 12px; }
.grid { display: grid; grid-template-columns: repeat(7, 1fr); row-gap: 3px; }
.dow { text-align: center; font-size: .8rem; color: var(--muted); padding-bottom: 6px; }
.day { aspect-ratio: 1; border: 0; background: none; border-radius: 50%; cursor: pointer; font-size: .975rem; font-weight: 500; position: relative; padding: 0; }
.day:hover:not(:disabled) { background: var(--mist); }
.day:disabled { cursor: default; color: #a9b9c1; }
.day.taken { text-decoration: line-through; text-decoration-color: var(--gingham); color: #97a9b2; background: repeating-linear-gradient(135deg, transparent 0 5px, #e8eef1 5px 6px); border-radius: 0; }
.day.in-range { background: #d9e8ee; border-radius: 0; color: var(--deep); }
.day.edge, .day.edge:hover:not(:disabled) { background: var(--ocean); color: var(--white); border-radius: 50%; text-decoration: none; }
.day.edge.start.has-end { border-radius: 50% 0 0 50%; }
.day.edge.end { border-radius: 0 50% 50% 0; }
.day.today::after { content: ""; position: absolute; left: 50%; bottom: 5px; width: 4px; height: 4px; margin-left: -2px; border-radius: 50%; background: var(--gingham); }
.legend { display: flex; gap: 20px; margin-top: 20px; font-size: .9rem; color: var(--muted); flex-wrap: wrap; }
.legend li { display: flex; align-items: center; gap: 8px; }
.k { width: 16px; height: 16px; display: inline-block; border: 1px solid var(--line); }
.k-taken { background: repeating-linear-gradient(135deg, transparent 0 4px, #cfdbe1 4px 5px); }
.k-sel { background: var(--ocean); border-color: var(--ocean); border-radius: 50%; }
.cal-msg { min-height: 1.6em; margin-top: 12px; font-weight: 500; color: var(--gingham); }

.request, .sent { background: var(--white); color: var(--deep); border-radius: 4px; overflow: hidden; }
.request-body { padding: 24px; }
.dates { display: grid; grid-template-columns: 1fr 1fr; border: 1px solid var(--line); border-radius: 3px; margin-bottom: 18px; }
.dates div { padding: 10px 14px; }
.dates div + div { border-left: 1px solid var(--line); }
.dates span { display: block; font-size: .8125rem; color: var(--muted); }
.dates strong { font-weight: 700; }
.quote { width: 100%; border-collapse: collapse; margin-bottom: 18px; font-variant-numeric: tabular-nums; }
.quote td { padding: 6px 0; vertical-align: top; }
.quote td:last-child { text-align: right; white-space: nowrap; }
.quote tr.total td { border-top: 1px solid var(--line); font-weight: 700; padding-top: 10px; }
.quote tr.note td { color: var(--muted); font-size: .9rem; padding-top: 2px; }
.quote tr.saving td { color: #2f6b3a; }
.request label { display: block; font-size: .9375rem; font-weight: 500; margin-bottom: 14px; }
.request .pair { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.request input, .request select, .request textarea { display: block; width: 100%; margin-top: 4px; padding: 11px 12px; font: inherit; color: var(--deep); background: var(--white); border: 1px solid #8fa5b0; border-radius: 3px; }
.request textarea { resize: vertical; }
.opt { color: var(--muted); font-weight: 400; }
.hp { position: absolute !important; left: -9999px; }
.form-error { background: #f9e3e5; color: #7a1c25; padding: 10px 12px; border-radius: 3px; margin-bottom: 14px; }
.small { font-size: .875rem; color: var(--muted); margin-top: 12px; }
.sent h3 { font: 400 1.8rem/1.2 var(--display); margin-bottom: .6rem; }
.sent p + p { margin-top: .8em; }

/* policies + faq */
.policies { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(24px, 4vw, 56px); }
.policies p + p, .policies p + h3 { margin-top: 1em; }
.cancel { width: 100%; border-collapse: collapse; }
.cancel th, .cancel td { text-align: left; padding: 9px 0; border-bottom: 1px solid var(--line); font-weight: 400; vertical-align: top; }
.cancel td { font-weight: 700; padding-left: 16px; }
details { border-bottom: 1px solid #c4d2d9; }
summary { cursor: pointer; padding: 18px 32px 18px 0; font-weight: 700; font-size: 1.125rem; list-style: none; position: relative; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; position: absolute; right: 4px; top: 14px; font-size: 1.5rem; font-weight: 400; color: var(--ocean); }
details[open] summary::after { content: "\2212"; }
details p { padding: 0 0 20px; max-width: 64ch; }

/* footer */
.site-footer { background: var(--deep); color: #d5e4ea; padding-block: 56px 96px; }
.site-footer a { color: var(--white); }
.site-footer .wordmark { color: var(--white); margin-bottom: 12px; }
.site-footer .wordmark span { color: #a9c2cd; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 40px; }
.footer-grid p + p { margin-top: .6em; }

/* privacy and terms pages */
.legal h1 { font-size: clamp(2.2rem, 4.4vw, 3.4rem); margin-bottom: .5rem; }
.legal h2 { font: 700 1.2rem/1.3 var(--body); letter-spacing: 0; margin: 2.2em 0 .5em; }
.legal p + p, .legal ul + p, .legal p + ul { margin-top: 1em; }
.legal ul { list-style: disc; padding-left: 1.3em; }
.legal li + li { margin-top: .5em; }
.legal-date { color: var(--muted); margin-bottom: 2rem; }
.legal-back { margin-bottom: 1.5rem; font-weight: 500; }
.mobile-cta { display: none; }

/* photo viewer */
.lightbox { border: 0; padding: 0; background: rgba(8, 24, 33, .96); width: 100vw; height: 100vh; max-width: none; max-height: none; color: var(--white); }
.lightbox[open] { display: grid; grid-template-columns: 72px 1fr 72px; align-items: center; }
.lightbox::backdrop { background: rgba(8, 24, 33, .96); }
.lightbox figure { grid-column: 2; display: grid; justify-items: center; gap: 14px; }
.lightbox img { max-height: 84vh; max-width: 100%; width: auto; object-fit: contain; }
.lightbox figcaption { text-align: center; color: #d5e4ea; max-width: 70ch; }
.lb-arrow, .lb-close { background: none; border: 0; color: var(--white); cursor: pointer; font-size: 3rem; line-height: 1; padding: 12px; }
.lb-prev { grid-column: 1; grid-row: 1; } .lb-next { grid-column: 3; grid-row: 1; }
.lb-close { position: absolute; top: 10px; right: 16px; font-size: 2.5rem; z-index: 2; }

/* smaller screens */
@media (max-width: 1000px) {
  .site-header nav { display: none; }
  .facts dl { grid-template-columns: repeat(3, 1fr); }
  .split, .split-reverse, .booking, .reviews { grid-template-columns: 1fr; }
  .amenities { grid-template-columns: repeat(2, 1fr); }
  .todo { grid-template-columns: repeat(2, 1fr); }
  .policies { grid-template-columns: 1fr; }
  .gallery { grid-template-columns: repeat(3, 1fr); grid-auto-rows: 180px; }
}
@media (max-width: 680px) {
  body { font-size: 1rem; }
  .header-cta { display: none; }
  .hero { min-height: 78vh; }
  .facts dl { grid-template-columns: repeat(2, 1fr); }
  .trio { grid-template-columns: 1fr; }
  .trio .shot { aspect-ratio: 3 / 2; }
  .rooms { grid-template-columns: 1fr; }
  .rooms li, .rooms li:nth-child(-n+2) { grid-column: auto; }
  .gallery { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 140px; }
  .cal { padding: 16px; }
  .cal-nav { top: 12px; left: 16px; right: 16px; }
  .cal-months { grid-template-columns: 1fr; min-height: 0; }
  .cal-months .month + .month { display: none; }
  .amenities { grid-template-columns: 1fr; gap: 24px; }
  .todo { grid-template-columns: 1fr; gap: 24px; }
  .footer-grid { grid-template-columns: 1fr; gap: 24px; }
  .lightbox[open] { grid-template-columns: 44px 1fr 44px; }
  .lb-arrow { font-size: 2.2rem; padding: 6px; }
  .mobile-cta { display: block; position: fixed; left: 12px; right: 12px; bottom: 12px; z-index: 30; text-align: center; box-shadow: 0 6px 24px rgba(14, 47, 64, .35); }
  .mobile-cta.hide { display: none; }
}
