/* Beauport Court: site styles.
   Every colour, space and font comes from the tokens below. See docs/design.md. */

:root {
  /* Colour */
  --color-ink: #1f2a33;        /* body text, 14.6:1 on white */
  --color-muted: #4a5560;      /* secondary text, 7.6:1 on white */
  --color-link: #0b5e7a;       /* links and buttons, 7.3:1 on white */
  --color-link-hover: #084a61; /* 9.7:1 on white */
  --color-accent: #ffb727;     /* decorative gold: dark backgrounds only, 9.4:1 on --color-night */
  --color-night: #13212b;      /* header and footer */
  --color-surface: #ffffff;
  --color-tint: #f4f7f8;       /* alternate section background */
  --color-rule: #d7dee2;

  /* Type */
  --font-ui: "Open Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --text-base: 1.0625rem;
  --text-small: 0.9375rem;
  --measure: 65ch;

  /* Space */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 1rem;
  --space-4: 1.5rem;
  --space-5: 2.5rem;
  --space-6: 4rem;

  --radius: 6px;
  --container: 64rem;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body {
  margin: 0;
  font-family: var(--font-ui);
  font-size: var(--text-base);
  line-height: 1.6;
  color: var(--color-ink);
  background: var(--color-surface);
}

h1, h2, h3 { line-height: 1.25; margin: 0 0 var(--space-3); }
h2 { font-size: 1.75rem; }
h3 { font-size: 1.125rem; }
p { margin: 0 0 var(--space-3); }

a { color: var(--color-link); text-decoration: underline; text-underline-offset: 0.15em; }
a:hover { color: var(--color-link-hover); }
a:focus-visible { outline: 3px solid var(--color-link); outline-offset: 2px; border-radius: 2px; }
.site-header a:focus-visible, .site-footer a:focus-visible { outline-color: var(--color-accent); }

.visually-hidden {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.skip-link {
  position: absolute; left: var(--space-3); top: -3rem;
  background: var(--color-surface); color: var(--color-link);
  padding: var(--space-2) var(--space-3); z-index: 10;
}
.skip-link:focus { top: var(--space-2); }

.container { max-width: var(--container); margin: 0 auto; padding: 0 var(--space-4); }
.prose > * { max-width: var(--measure); }

/* Header */
.site-header {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: var(--space-2) var(--space-4);
  padding: var(--space-3) var(--space-4);
  background: var(--color-night);
}
.site-header .brand {
  color: var(--color-accent); font-weight: 700; font-size: 1.125rem; text-decoration: none;
  display: inline-block; padding: var(--space-2) 0; min-height: 44px; line-height: 28px;
}
.site-header ul { display: flex; flex-wrap: wrap; gap: var(--space-1) var(--space-4); list-style: none; margin: 0; padding: 0; }
.site-header nav a {
  display: inline-block; padding: var(--space-2) 0; min-height: 44px; line-height: 28px;
  color: #ffffff; font-weight: 600; text-decoration: none;
}
.site-header nav a:hover { color: var(--color-accent); text-decoration: underline; }

/* Hero */
.hero {
  min-height: clamp(16rem, 55vh, 30rem);
  display: flex; align-items: flex-end;
  background-color: var(--color-night);
  background-image:
    linear-gradient(to top, rgba(19, 33, 43, 0.85), rgba(19, 33, 43, 0.15) 60%),
    url("../img/hero.jpg");
  background-image:
    linear-gradient(to top, rgba(19, 33, 43, 0.85), rgba(19, 33, 43, 0.15) 60%),
    image-set(url("../img/hero.webp") type("image/webp"), url("../img/hero.jpg") type("image/jpeg"));
  background-size: cover;
  background-position: center;
}
.hero-text { padding: var(--space-5) var(--space-4); max-width: var(--container); width: 100%; margin: 0 auto; color: #ffffff; }
.hero-text h1 { font-size: clamp(1.75rem, 5vw, 2.75rem); margin-bottom: var(--space-2); }
.hero-text p { font-size: 1.125rem; margin: 0; }

/* Sections */
.section { padding: var(--space-6) 0; }
.section-tint { background: var(--color-tint); }

/* Owner tasks */
.tasks {
  list-style: none; margin: 0; padding: 0;
  display: grid; gap: var(--space-4);
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 20rem), 1fr));
}
.task {
  background: var(--color-surface);
  border: 1px solid var(--color-rule);
  border-radius: var(--radius);
  padding: var(--space-4);
}
.task p:last-child { margin-bottom: 0; font-weight: 600; }
.task a, .contacts a { overflow-wrap: break-word; }
.task .addr { display: block; font-weight: 400; color: var(--color-muted); overflow-wrap: break-word; }

/* Contacts */
.contacts dt { font-weight: 600; margin-top: var(--space-3); }
.contacts dd { margin: 0; }

/* Footer */
.site-footer {
  padding: var(--space-5) var(--space-4);
  background: var(--color-night);
  color: #ffffff;
  font-size: var(--text-small);
  text-align: center;
}
.site-footer p { margin: 0 0 var(--space-2); }
.site-footer a { color: #ffffff; }
.site-footer a:hover { color: var(--color-accent); }
.footer-name { color: var(--color-accent); font-weight: 700; font-size: 1rem; }
.footer-meta { color: #c9d3d9; margin-top: var(--space-3) !important; }
