/* The site is edited directly. There is no generated CSS or framework dependency. */
@font-face {
  font-family: "Bodoni Moda";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/bodoni-moda-regular.ttf") format("truetype");
}

:root {
  color-scheme: light;
  --ink: #000;
  --paper: #fff;
  --serif: "Bodoni Moda", "Bodoni MT", Didot, "Times New Roman", serif;
  --sans: Arial, Helvetica, sans-serif;
  --frame: 0.875rem;
  --gutter: 1.875rem;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  line-height: 1.5;
}

a { color: inherit; text-underline-offset: 0.15em; }
button { font: inherit; cursor: pointer; }
[hidden] { display: none !important; }

:focus-visible {
  outline: 3px solid #1769aa;
  outline-offset: 5px;
}

.container {
  width: 100%;
  max-width: 75rem;
  margin-inline: auto;
  padding-inline: 0.9375rem;
}

.page-header { margin-block: 2rem; }
.eyebrow {
  margin: 0;
  font-size: 1.2rem;
  line-height: 1.2;
  text-transform: uppercase;
}

h1 {
  margin: 1rem 0 0;
  font-family: var(--serif);
  font-size: 4rem;
  font-weight: 400;
  line-height: 1.1;
  text-transform: uppercase;
  overflow-wrap: break-word;
}

.webcam { aspect-ratio: 16 / 9; background: #111; }
.webcam iframe { display: block; width: 100%; height: 100%; border: 0; }
.webcam-fallback { margin: 0.5rem 0 2rem; font-size: 0.8rem; }

/* Property listing above the weather resources.
   Inverted hover: the background fades while the text colour flips at the
   midpoint (75 ms), so text never fades into a same-grey background. */
.home-listing {
  display: block;
  container-type: inline-size;
  border: var(--frame) solid var(--ink);
  padding: clamp(0.625rem, 2vw, 1.25rem);
  text-align: center;
  text-decoration: none;
  background-color: var(--paper);
  transition: background-color 150ms linear, color 0s linear 75ms;
}

.home-listing p {
  margin: 0 0 1rem;
  font: 400 clamp(1.25rem, 3.2cqw, 2.25rem) / 1.2 var(--serif);
  text-align: center;
  text-wrap: balance;
}

.home-listing:hover { background: var(--ink); color: var(--paper); }

.home-listing-photos {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.625rem;
}

.home-listing-photos img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  position: relative;
  transition: transform 200ms ease;
}

/* Slight zoom per photo; 1.1 stays inside the box padding. */
@media (hover: hover) {
  .home-listing-photos img:hover { transform: scale(1.1); z-index: 1; }
}

@media (max-width: 39.99rem) {
  .home-listing-photos { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.weather-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 1.25rem var(--gutter);
  margin-block: 2rem 5rem;
}

.weather-tile {
  container-type: inline-size;
  display: grid;
  place-items: center;
  min-height: 8rem;
  border: var(--frame) solid var(--ink);
  padding: 0.5rem;
  font: 400 3.4rem / 1.1 var(--serif);
  text-align: center;
  text-transform: uppercase;
  text-decoration: none;
  background-color: var(--paper);
  transition: background-color 150ms linear, color 0s linear 75ms;
}

.weather-tile > span { font-size: clamp(1.25rem, 18cqw, 3.4rem); }
.weather-tile[href="#weather-discussion"] > span { font-size: clamp(1.25rem, 15cqw, 3.4rem); }
.weather-tile:hover { background: var(--ink); color: var(--paper); }
.weather-tile small { display: block; font: 400 1rem / 1.1 var(--sans); text-align: left; }
.span-4 { grid-column: span 4; }
.span-6 { grid-column: span 6; }
.span-12 { grid-column: span 12; }

/* Without JS, open dialogs are ordinary linked sections below the navigation. */
.resource-dialog {
  position: static;
  width: 100%;
  max-width: 44rem;
  margin: 0 auto 2rem;
  border: var(--frame) solid var(--ink);
  padding: 3rem 3rem 1.5rem;
  background: var(--paper);
  color: var(--ink);
  overflow-wrap: anywhere;
}

.resource-dialog:modal {
  position: fixed;
  inset: 0;
  width: min(37.5rem, calc(100% - 2rem));
  max-height: calc(100dvh - 2rem);
  margin: auto;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.resource-dialog::backdrop { background: rgb(0 0 0 / 45%); }
html:has(.resource-dialog:modal) { overflow: hidden; }
.resource-dialog h2 { margin: 0; font-size: 2.5rem; font-weight: 400; line-height: 1.2; }
.resource-item { margin-top: 1.875rem; }
.resource-item h3 { margin: 0; font-size: 1.125rem; line-height: 1.3; }
.resource-item p { margin: 0; line-height: 1.3; }
.resource-item a { font-weight: 600; }
.dialog-feedback { margin: 4rem 0 0; font-size: 0.8rem; }
.dialog-feedback a { font-weight: 600; }
.dialog-close {
  position: absolute;
  top: 0.35rem;
  right: 0.5rem;
  display: grid;
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
  border: 0;
  background: var(--paper);
  color: var(--ink);
  font-size: 2.5rem;
  line-height: 1;
}

.return-link { padding-block: 2rem 4rem; font: 400 clamp(2rem, 6vw, 5rem) / 1.2 var(--serif); text-align: center; text-transform: uppercase; }
.site-footer { padding-block: 2.5rem 1rem; background: var(--ink); color: var(--paper); }
.footer-content { padding-inline: 2rem; }
.site-footer h2 { max-width: 34rem; margin: 0; font: 400 2.15rem / 1.4 var(--serif); text-transform: uppercase; }
.site-footer p { max-width: 31rem; margin-block: 0 1rem; }
.social-links { display: flex; gap: 2rem; margin-block: 2rem; }
.credit { display: block; width: fit-content; margin-inline: auto; font-size: 0.75rem; letter-spacing: 0.1em; }

.skip-link { position: absolute; top: 0.5rem; left: 0.5rem; z-index: 2; padding: 0.75rem 1rem; background: var(--paper); transform: translateY(-200%); }
.skip-link:focus { transform: none; }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }

@media (max-width: 63.99rem) and (min-width: 40rem) {
  .weather-tile { font-size: 2.6rem; }
}

@media (max-width: 39.99rem) {
  .container { padding-inline: 0.625rem; }
  .weather-grid { grid-template-columns: minmax(0, 1fr); }
  .weather-tile { grid-column: 1 / -1; font-size: 3.4rem; }
  h1 { font-size: clamp(2.5rem, 18vw, 4rem); }
  .footer-content { padding-inline: 1.25rem; }
  .site-footer { padding-top: 1rem; }
  .resource-dialog, .resource-dialog:modal { padding: 3rem 1.25rem 1.5rem; border-width: 0.625rem; }
  .resource-dialog h2 { font-size: 2rem; }
}

@media (prefers-reduced-motion: reduce) {
  .home-listing, .home-listing-photos img, .weather-tile { transition: none; }
}

@media print {
  .webcam, .webcam-fallback, .weather-grid, .dialog-close, .skip-link { display: none !important; }
  .resource-dialog:not([open]) { display: block; }
  .resource-dialog, .resource-dialog:modal { position: static; width: 100%; max-height: none; overflow: visible; border-width: 1px; padding: 1rem; }
  .site-footer { background: white; color: black; }
}
