/* ============================================================
   STYLES.CSS — SITE FOUNDATION
   Mobile-first, semantic, ADA-compliant

   NOTE: Google Fonts are loaded via <link> tags in the HTML
   <head> — not imported here. See base HTML template for the
   correct <link> tags to copy into every project.

   TABLE OF CONTENTS
   1.  Project Variables      ← Edit these per project
   2.  System Variables       ← Do not edit
   3.  Reset & Base
   4.  Typography
   5.  Layout & Grid
   6.  Spacing Utilities
   7.  Color Utilities
   8.  Links & Interactive States
   9.  Buttons
   10. Forms (Formspree-ready)
   11. Images
   12. Navigation
   13. Footer
   14. Z-Index Stack
   15. Animation
   16. Accessibility
   17. Print
   ============================================================ */


/* ============================================================
   1. PROJECT VARIABLES
   These are the only values that change from project to project.
   ============================================================ */

:root {

  /* Accent — saturated blue for links and interactive elements.
     Deliberately more vivid than --color-heading so links are
     unmistakably links.                                       */
  --accent:               #1A6FAD;
  --accent-hover:         #135585;

  --font-heading:         'Syne', Georgia, serif;
  --font-body:            'DM Sans', Helvetica Neue, Arial, sans-serif;

  /* Backgrounds & Surfaces                                    */
  --color-page:           #FFFFFF;
  --color-surface:        #F7F5F2;
  --color-surface-mid:    #EDEBE8;

  /* Borders & Dividers                                        */
  --color-border:         #EDEBE8;
  --color-border-strong:  #C8C4BF;

  /* Text
     --color-heading is a warm amber-gold — used for headings only.
     Passes WCAG AA for large text (3:1) against the cream surface.
     --color-text is near-black for body copy.                 */
  --color-heading:        #CA8209;   /* amber-gold — headings only     */
  --color-text:           #1A1A1A;   /* near-black — body copy         */
  --color-text-secondary: #4A4A4A;   /* captions, metadata             */
  --color-text-muted:     #8A8A8A;   /* placeholders, disabled         */
}


/* ============================================================
   2. SYSTEM VARIABLES
   ============================================================ */

:root {

  /* --- Spacing Scale (base unit: 8px) ---                   */
  --space-half:   4px;
  --space-1:      8px;
  --space-2:     16px;
  --space-3:     24px;
  --space-4:     32px;
  --space-5:     48px;
  --space-6:     64px;
  --space-7:     96px;
  --space-8:    128px;

  /* --- Typography Scale ---
     Base values are mobile-first (< 600px).
     Scaled up at 600px (tablet) and 860px (desktop).         */
  --text-caption:      14px;
  --text-body:         16px;
  --text-lead:         18px;
  --text-h3:           22px;
  --text-h2:           28px;
  --text-h1-desktop:   56px;
  --text-display:      72px;

  /* --- Line Heights ---                                      */
  --leading-body:      1.6;
  --leading-heading:   1.1;
  --leading-caption:   1.4;

  /* --- Font Weights ---                                      */
  --weight-regular:    400;
  --weight-medium:     500;
  --weight-bold:       700;

  /* --- Column & Layout ---                                   */
  --column-width:      720px;
  --column-width-wide: 800px;
  --container-max:    1200px;
  --container-wide:   1440px;
  --gutter:            24px;
  --page-margin:       16px;
  --page-margin-tablet:32px;

  /* --- Breakpoints (reference)
     Mobile:  0–859px  |  Desktop: 860–1199px
     Wide:    1200–1439px  |  Full: 1440px+                */

  /* --- Border Radius ---                                     */
  --radius-sm:    3px;
  --radius:       6px;
  --radius-lg:   12px;

  /* --- Transitions ---                                       */
  --transition-fast:   150ms ease;
  --transition-base:   250ms ease;
  --transition-slow:   400ms ease;

  /* --- Functional Colors ---                                 */
  --color-error:       #C0392B;
  --color-success:     #27AE60;
  --color-warning:     #E67E22;
  --color-focus:       #0066CC;

  /* --- Shadows ---                                           */
  --shadow-sm:   0 1px 3px rgba(0,0,0,0.08);
  --shadow:      0 2px 8px rgba(0,0,0,0.10);
  --shadow-lg:   0 8px 24px rgba(0,0,0,0.12);
  --shadow-xl:   0 16px 48px rgba(0,0,0,0.14);
}


/* ============================================================
   3. RESET & BASE
   STICKY FOOTER: body flex-column + main flex-1.
   Required: <header> + <main> + <footer> structure.
   ============================================================ */

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

html {
  font-size: 100%;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  /* overflow-x NOT set here — it breaks position:sticky by creating
     a new scroll container. overflow-x:hidden on body is sufficient. */
}

body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  background-color: var(--color-page);
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: var(--text-body);
  font-weight: var(--weight-regular);
  line-height: var(--leading-body);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

main { flex: 1; }

img, video, iframe {
  display: block;
  max-width: 100%;
  height: auto;
}

table { border-collapse: collapse; width: 100%; }

hr {
  border: none;
  border-top: 1px solid var(--color-border);
  margin: var(--space-4) 0;
}

/* list-style NOT reset globally — bullets preserved for
   body content. Applied only to nav/UI lists explicitly.  */


/* ============================================================
   4. TYPOGRAPHY

   FONT LOADING — paste in every HTML <head>:
   <link rel="preconnect" href="https://fonts.googleapis.com">
   <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
   <link href="https://fonts.googleapis.com/css2?family=Syne:wght@400;500;600;700&family=DM+Sans:wght@400;500;700&display=swap" rel="stylesheet">

   HEADING COLOR: --color-heading is amber-gold (#CA8209).
   Passes WCAG AA for large text against the cream surface.
   Distinct from --accent (link blue) — no confusion between
   headings and interactive elements.

   HEADING WEIGHT: 600 (semi-bold Syne) — the font reads well
   at this weight at display sizes.

   LETTER SPACING: -0.02em — slightly tighter than default,
   appropriate for display type at larger sizes.
   ============================================================ */

h1, h2, h3 {
  font-family: var(--font-heading);
  font-weight: 600;                    /* semi-bold — Syne reads well at this weight */
  line-height: var(--leading-heading);  /* 1.1 — tight               */
  color: var(--color-heading);          /* amber-gold                */
  letter-spacing: -0.025em;             /* H1 default — tightest     */
  /* Offset anchor jumps by sticky header height + breathing room.
     Without this the heading disappears behind the header.  */
  scroll-margin-top: 88px;
}

/* H2 and H3 — slightly less negative than H1               */
h2, h3 {
  letter-spacing: -0.015em;
}

/* H3 needs slightly more offset — paragraph text above
   would otherwise show above the heading on anchor jump.    */
h3 {
  scroll-margin-top: 76px;
}

h1 {
  /* Fluid: 2rem (32px) at 320px → 56px at 860px+             */
  font-size: clamp(2rem, 7vw, var(--text-h1-desktop));
  margin-bottom: var(--space-3);
}

h2 {
  font-size: var(--text-h2);
  margin-bottom: var(--space-3);
  margin-top: var(--space-4);
}

h3 {
  font-size: var(--text-h3);
  margin-bottom: var(--space-2);
  margin-top: var(--space-4);
}

/* Remove redundant top margin when a heading opens a container.
   Section padding already provides the breathing room above.   */
.column > h1:first-child,
.column > h2:first-child,
.column > h3:first-child {
  margin-top: 0;
}

p {
  margin-bottom: var(--space-3);
  max-width: 68ch;
}

.text-lead {
  font-size: var(--text-lead);
  line-height: 1.5;
  color: var(--color-text-secondary);
  margin-bottom: var(--space-4);
  max-width: 66ch;
}

/* Caption — small text, secondary color. */
.text-caption {
  font-size: var(--text-caption);
  line-height: var(--leading-caption);
  color: var(--color-text-secondary);
}

.text-byline {
  font-size: var(--text-caption);
  color: var(--color-text-muted);
  font-weight: var(--weight-medium);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

blockquote {
  font-family: var(--font-heading);
  font-size: var(--text-h3);
  font-weight: var(--weight-regular);
  font-style: italic;
  line-height: 1.4;
  color: var(--color-text-secondary);
  border-left: 3px solid var(--accent);
  padding-left: var(--space-3);
  margin: var(--space-4) 0;
}

/* Desktop: indent blockquote from the left column edge      */
@media (min-width: 860px) {
  blockquote {
    margin-left: var(--space-4);
  }
}

/* Prose lists — selectors cover both ul.prose (class on the
   list element itself) and .prose ul (class on a parent).   */
ul.prose,
.prose ul {
  list-style: disc;
  padding-left: var(--space-4);
  margin-bottom: var(--space-3);
}

ol.prose,
.prose ol {
  list-style: decimal;
  padding-left: var(--space-4);
  margin-bottom: var(--space-3);
}

ul.prose li,
ol.prose li,
.prose li {
  margin-bottom: var(--space-1);
  max-width: 68ch;
}

strong { font-weight: var(--weight-bold); }
em     { font-style: italic; }
small  { font-size: var(--text-caption); }

/* --- Responsive type scale ---
   Tablet (600px+): step up from mobile base
   Desktop (860px+): full scale                               */
@media (min-width: 600px) {
  :root {
    --text-body: 17px;
    --text-lead: 20px;
    --text-h3:   23px;
    --text-h2:   30px;
  }
}

@media (min-width: 860px) {
  :root {
    --text-body: 18px;
    --text-lead: 22px;
    --text-h3:   24px;
    --text-h2:   32px;
  }
}


/* ============================================================
   5. LAYOUT & GRID
   ============================================================ */

.container {
  width: 100%;
  max-width: var(--container-max);
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--page-margin);
  padding-right: var(--page-margin);
}

@media (min-width: 860px) {
  .container {
    padding-left: var(--page-margin-tablet);
    padding-right: var(--page-margin-tablet);
  }
}

@media (min-width: 1440px) {
  .container { max-width: var(--container-wide); }
}

/* --- Center Column ---                                       */
.column {
  width: 100%;
  margin-left: auto;
  margin-right: auto;
}

@media (min-width: 1200px) {
  .column { max-width: var(--column-width); }
}

@media (min-width: 1440px) {
  .column { max-width: var(--column-width-wide); }
}

/* --- Column Break — symmetric bleed ---                      */
.column-break {
  width: 100%;
  margin-left: auto;
  margin-right: auto;
}

@media (min-width: 1200px) {
  .column-break { max-width: calc(var(--column-width) + 200px); }
}

/* --- Section ---                                            */
.section {
  padding-top: var(--space-3);
  padding-bottom: var(--space-3);
}

@media (min-width: 1200px) {
  .section {
    padding-top: var(--space-4);
    padding-bottom: var(--space-4);
  }
}

.section--surface { background-color: var(--color-surface); }

/* --- Two Column Grid ---                                     */
.grid-2 {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-4);
}

@media (min-width: 860px) {
  .grid-2 { grid-template-columns: repeat(2, 1fr); }
}

/* --- Three Column Grid ---                                   */
.grid-3 {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-4);
}

@media (min-width: 860px) {
  .grid-3 { grid-template-columns: repeat(3, 1fr); }
}

/* --- Contextual Link Cluster — Template component, not used on this site. */
.context-links {
  background-color: var(--color-surface);
  border-left: 3px solid var(--accent);
  padding: var(--space-2);
  margin: 0 0 var(--space-3) 0;
}

.context-links__label {
  font-size: var(--text-caption);
  font-weight: var(--weight-medium);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-text-muted);
  margin-bottom: var(--space-1);
}

.context-links__list {
  list-style: circle;           /* hollow bullet — less prominent */
  padding-left: var(--space-2);
  margin: 0;
  line-height: 1.3;
}

.context-links__list li {
  margin-bottom: var(--space-half);
}

.context-links__list a {
  font-size: var(--text-caption);
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 2px;
  text-decoration-thickness: 1px;
  padding: 2px 4px;
  margin-left: -4px;
  border-radius: var(--radius-sm);
  transition:
    color var(--transition-fast),
    background-color var(--transition-fast);
}

.context-links__list a:hover {
  color: #FFFFFF;
  background-color: var(--accent);
  text-decoration: none;
}

@media (min-width: 1200px) {
  .context-links {
    float: right;
    width: 200px;
    margin-left: var(--space-4);
    margin-right: calc((100vw - var(--column-width)) / -4);
    margin-bottom: var(--space-3);
    margin-top: var(--space-half);
  }
}

.section-body::after {
  content: '';
  display: table;
  clear: both;
}



/* ============================================================
   TABLE OF CONTENTS — Template component, not used on this site.
   Desktop: sticky left column alongside main content.
   Mobile: collapsible block above the H1.

   Usage:
   <div class="toc-layout">
     <aside class="toc" aria-label="Table of contents">...</aside>
     <div class="toc-content">...page content...</div>
   </div>
   ============================================================ */

/* Outer wrapper — single column mobile, two-column desktop   */
.toc-layout {
  display: flex;
  flex-direction: column;
  gap: 0;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--page-margin);
  align-items: flex-start;
}

@media (min-width: 860px) {
  .toc-layout {
    padding: 0 var(--page-margin-tablet);
  }
}

@media (min-width: 1200px) {
  .toc-layout {
    flex-direction: row;
    gap: var(--space-6);
  }
}

/* --- TOC content area ---
   On desktop: constrained to center column width.            */
.toc-content {
  min-width: 0;                 /* prevents grid blowout       */
}

@media (min-width: 1200px) {
  .toc-content {
    max-width: var(--column-width);
  }
}

/* --- TOC sidebar ---
   Mobile: full width, stacks above content.
   Desktop: fixed 220px, sticky.                             */
.toc {
  width: 100%;
  order: -1;                    /* always above content on mobile */
  font-size: var(--text-caption);
  font-family: var(--font-body);
  background-color: var(--color-surface);
  border-left: 3px solid var(--accent);
  padding: var(--space-1) var(--space-3);
  margin-bottom: var(--space-4);
}

@media (min-width: 1200px) {
  .toc {
    width: 220px;
    flex-shrink: 0;
    position: sticky;
    top: calc(64px + var(--space-4)); /* below sticky header      */
    max-height: calc(100vh - 96px);
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-width: none;
    align-self: flex-start;
    background: none;
    border-left: none;
    padding: 0;
    margin-bottom: 0;
  }

  .toc::-webkit-scrollbar { display: none; }
}

/* TOC label row — Contents left, Show/Hide right            */
.toc__label {
  font-size: 11px;
  font-weight: var(--weight-medium);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-text-secondary);
  margin-bottom: 0;
  display: flex;
  align-items: baseline;
  justify-content: flex-start;
  gap: var(--space-2);
}

/* Mobile toggle — looks like a text link, not a button      */
.toc__toggle {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 11px;
  font-weight: var(--weight-regular);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 2px;
  padding: 0;
  font-family: var(--font-body);
}

@media (min-width: 1200px) {
  .toc__toggle { display: none; }
}

/* TOC nav list — hidden on mobile until toggled             */
.toc__nav {
  list-style: none;
  padding: 0;
  margin: 0;
  display: none;
}

.toc__nav.is-open {
  display: block;
  padding-top: var(--space-1);
}

@media (min-width: 1200px) {
  .toc__nav {
    display: block;
    padding-top: var(--space-1);
  }
}

.toc__item { margin: 0; }

/* H2 entries                                                 */
.toc__link {
  display: block;
  padding: 5px var(--space-1) 5px 0;
  color: var(--accent);
  text-decoration: none;
  line-height: 1.35;
  border-radius: var(--radius-sm);
  transition:
    color var(--transition-fast),
    background-color var(--transition-fast);
}

.toc__link:hover { color: var(--accent-hover); }

.toc__link.is-active {
  color: var(--accent);
  background-color: var(--color-surface);
  font-weight: var(--weight-medium);
}

/* H3 entries — indented 16px, padding never changes         */
.toc__link--h3 {
  padding-left: var(--space-2);
  color: var(--accent);
}

.toc__link--h3:hover { color: var(--accent-hover); }

.toc__link--h3.is-active {
  color: var(--accent);
  background-color: var(--color-surface);
}

/* Back-to-top text link inside TOC nav                      */
.toc__top {
  display: block;
  margin-top: var(--space-2);
  padding-top: 0;
  font-size: 11px;
  color: var(--color-text-muted);
  text-decoration: none;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.toc__top:hover { color: var(--accent); }


/* --- Back to top floating button ---
   Appears after scrolling 400px. Present on every page.     */
.back-to-top {
  position: fixed;
  bottom: var(--space-4);
  right: var(--space-4);
  z-index: 50;
  width: 40px;
  height: 40px;
  background-color: var(--accent);
  color: #FFFFFF;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  opacity: 0;
  pointer-events: none;
  transition:
    opacity var(--transition-base),
    box-shadow var(--transition-fast);
  box-shadow: var(--shadow);
}

.back-to-top.is-visible {
  opacity: 1;
  pointer-events: auto;
}

.back-to-top:hover        { box-shadow: var(--shadow-lg); }

.back-to-top:focus-visible {
  outline: 2px solid var(--color-focus);
  outline-offset: 3px;
}



/* ============================================================
   6. SPACING UTILITIES
   ============================================================ */

.mt-1 { margin-top:    var(--space-1); }
.mt-2 { margin-top:    var(--space-2); }
.mt-3 { margin-top:    var(--space-3); }
.mt-4 { margin-top:    var(--space-4); }
.mt-5 { margin-top:    var(--space-5); }
.mt-6 { margin-top:    var(--space-6); }

.mb-1 { margin-bottom: var(--space-1); }
.mb-2 { margin-bottom: var(--space-2); }
.mb-3 { margin-bottom: var(--space-3); }
.mb-4 { margin-bottom: var(--space-4); }
.mb-5 { margin-bottom: var(--space-5); }
.mb-6 { margin-bottom: var(--space-6); }

.pt-1 { padding-top:    var(--space-1); }
.pt-2 { padding-top:    var(--space-2); }
.pt-3 { padding-top:    var(--space-3); }
.pt-4 { padding-top:    var(--space-4); }
.pt-5 { padding-top:    var(--space-5); }
.pt-6 { padding-top:    var(--space-6); }

.pb-1 { padding-bottom: var(--space-1); }
.pb-2 { padding-bottom: var(--space-2); }
.pb-3 { padding-bottom: var(--space-3); }
.pb-4 { padding-bottom: var(--space-4); }
.pb-5 { padding-bottom: var(--space-5); }
.pb-6 { padding-bottom: var(--space-6); }

/* Button group — centered row of buttons                      */
.btn-group {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  justify-content: center;
  margin-top: var(--space-3);
}


/* ============================================================
   7. COLOR UTILITIES
   ============================================================ */

.bg-page    { background-color: var(--color-page); }
.bg-surface { background-color: var(--color-surface); }
.bg-mid     { background-color: var(--color-surface-mid); }
.bg-accent  { background-color: var(--accent); color: #FFFFFF; }

.text-primary   { color: var(--color-text); }
.text-secondary { color: var(--color-text-secondary); }
.text-muted     { color: var(--color-text-muted); }
.text-accent    { color: var(--accent); }


/* ============================================================
   8. LINKS & INTERACTIVE STATES
   --accent is a saturated blue — unmistakably interactive.
   Distinct from --color-heading (desaturated blue-gray).
   ============================================================ */

a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
  transition:
    color var(--transition-fast),
    background-color var(--transition-fast);
}

a:hover { color: var(--accent-hover); }

a:visited {
  color: var(--accent);
}

/* Don't let visited state bleed into buttons —
   explicit color per variant prevents mailto: links
   from picking up the browser's default visited color */
.btn:visited               { opacity: 1; }
.btn--primary:visited      { color: #FFFFFF; }
.btn--secondary:visited    { color: var(--accent); }
.btn--ghost:visited        { color: var(--accent); }
.btn--text:visited         { color: var(--accent); }

a:focus-visible {
  outline: 2px solid var(--color-focus);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}

nav a { text-decoration: none; }


/* ============================================================
   9. BUTTONS
   Primary hover: inverts — white bg, accent text/border.
   ============================================================ */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-1);
  font-family: var(--font-body);
  font-size: var(--text-body);
  font-weight: var(--weight-medium);
  line-height: 1;
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius);
  border: 2px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition:
    background-color var(--transition-fast),
    border-color var(--transition-fast),
    color var(--transition-fast),
    box-shadow var(--transition-fast);
}

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

.btn--primary {
  background-color: var(--accent);
  border-color: var(--accent);
  color: #FFFFFF;
}

.btn--primary:hover {
  background-color: #FFFFFF;
  border-color: var(--accent);
  color: var(--accent);
  box-shadow: 0 4px 12px rgba(26, 111, 173, 0.25);
}

.btn--secondary {
  background-color: transparent;
  border-color: var(--accent);
  color: var(--accent);
}

.btn--secondary:hover {
  background-color: var(--accent);
  color: #FFFFFF;
}

/* Template component, not used on this site.                 */
.btn--ghost {
  background-color: transparent;
  border-color: var(--accent);
  color: var(--accent);
}

.btn--ghost:hover {
  background-color: var(--accent);
  color: #FFFFFF;
  border-color: var(--accent);
}

.btn--text {
  background-color: transparent;
  border-color: transparent;
  color: var(--accent);
  padding-left: 0;
  padding-right: 0;
}

.btn--text:hover {
  color: var(--accent-hover);
  text-decoration: underline;
}

.btn--sm {
  font-size: var(--text-caption);
  padding: var(--space-1) var(--space-2);
}


/* ============================================================
   10. FORMS (Formspree-ready)
   Required structure:
   <form class="form"
     action="https://formspree.io/f/YOUR_FORM_ID" method="POST">
     <input type="hidden" name="_subject" value="New message">
     ...fields...
   </form>
   ============================================================ */

.form { width: 100%; }

.form-group {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  margin-bottom: var(--space-3);
}

label {
  font-size: var(--text-caption);
  font-weight: var(--weight-medium);
  color: var(--color-text);
  letter-spacing: 0.03em;
}

label .required {
  color: var(--color-error);
  margin-left: 2px;
  font-style: normal;
}

input[type="text"],
input[type="email"],
input[type="tel"],
input[type="search"],
input[type="url"],
input[type="password"],
textarea,
select {
  width: 100%;
  font-family: var(--font-body);
  font-size: var(--text-body);
  color: var(--color-text);
  background-color: var(--color-page);
  border: 1px solid var(--color-border-strong);
  border-radius: var(--radius-sm);
  padding: var(--space-2);
  transition:
    border-color var(--transition-fast),
    box-shadow var(--transition-fast);
  appearance: none;
  -webkit-appearance: none;
}

input[type="email"],
input[type="tel"] {
  max-width: 320px;
}

input::placeholder,
textarea::placeholder {
  color: var(--color-text-muted);
}

input:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(26, 111, 173, 0.15);
}

textarea {
  min-height: 140px;
  resize: vertical;
  line-height: var(--leading-body);
}

.form-group--error input,
.form-group--error textarea,
.form-group--error select {
  border-color: var(--color-error);
}

.form-group--error input:focus,
.form-group--error textarea:focus,
.form-group--error select:focus {
  box-shadow: 0 0 0 3px rgba(192, 57, 43, 0.15);
}

.form-error-message {
  font-size: var(--text-caption);
  color: var(--color-error);
}

.form-success {
  background-color: #EBF7F0;
  border: 1px solid var(--color-success);
  border-radius: var(--radius);
  padding: var(--space-3);
  color: #1A5C35;
  font-size: var(--text-body);
  display: none;
}

.form-success.is-visible { display: block; }

input:disabled,
textarea:disabled,
select:disabled {
  background-color: var(--color-surface);
  color: var(--color-text-muted);
  cursor: not-allowed;
  opacity: 0.7;
}


/* ============================================================
   11. IMAGES
   Spectrum: Avatar → Float → Inline → Column-break →
             Full-bleed → Hero
   ============================================================ */

/* Avatar                                                     */
.img-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.img-avatar--lg {
  width: 64px;
  height: 64px;
}

/* Float image — Template component, not used on this site.
   35% width on desktop. Mobile: full width, no float.
   Use .clearfix on the containing element.                   */
.img-float-left,
.img-float-right {
  width: 100%;
  height: auto;
  border-radius: var(--radius);
  margin-bottom: var(--space-3);
  display: block;
}

@media (min-width: 860px) {
  .img-float-left {
    float: left;
    width: 35%;
    margin-right: var(--space-2);
    margin-bottom: var(--space-2);
    margin-top: var(--space-half);
  }

  .img-float-right {
    float: right;
    width: 35%;
    margin-left: var(--space-2);
    margin-bottom: var(--space-2);
    margin-top: var(--space-half);
  }
}

.clearfix::after {
  content: '';
  display: table;
  clear: both;
}

/* Inline — within the center column                         */
.img-inline {
  width: 100%;
  height: auto;
  border-radius: var(--radius);
  margin-bottom: 0;
}

/* Centered indented image — narrower than column, centered.
   Use inside <figure class="figure--centered">.
   Width ~75% of column on desktop. Full width on mobile.    */
.img-centered {
  width: 75%;
  height: auto;
  border-radius: var(--radius);
  margin-left: auto;
  margin-right: auto;
  display: block;
}

@media (max-width: 767px) {
  .img-centered { width: 100%; }
}

figure.figure--centered {
  text-align: center;
}

figure.figure--centered figcaption {
  text-align: center;
  margin-left: auto;
  margin-right: auto;
  max-width: 75%;
}

/* Column-breaking — symmetric bleed on desktop              */
.img-break {
  width: 100%;
  height: auto;
  border-radius: var(--radius);
  display: block;
}

/* Full bleed — edge to edge                                 */
.img-full {
  width: 100vw;
  margin-left: calc(50% - 50vw);
  height: auto;
  display: block;
}

/* Hero                                                      */
.img-hero {
  width: 100%;
  max-height: 80vh;
  object-fit: cover;
  display: block;
}


/* --- Hero Text Overlay — Template component, not used on this site.
   Full natural image height. Text block sits top-left,
   semi-transparent warm background.
   Usage:
   <section class="hero-text">
     <img src="images/your-image.jpg" alt="..." style="width:100%;display:block;">
     <div class="hero-text__block">
       <h1>Your headline</h1>
       <p class="text-lead">Intro text.</p>
     </div>
   </section>                                               */
.hero-text {
  position: relative;
  width: 100%;
  /* Full image height — no cropping, no min-height override */
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

/* Text block sits top-left, flush to image corner.
   Semi-transparent warm tone — feels like the photo's
   own shadow rather than an imposed color.                  */
.hero-text__block {
  position: absolute;
  top: var(--space-3);          /* 24px from top edge            */
  left: 0;                      /* flush to left edge            */
  max-width: 560px;
  background-color: rgba(255, 245, 224, 0.50); /* #FFF5E0 @ 50% */
  padding: var(--space-2) var(--space-5);       /* tighter top/bottom */
  text-align: left;
}

.hero-text__block h1 {
  color: var(--color-heading);
  font-size: clamp(2rem, 7vw, var(--text-h1-desktop));
  margin-bottom: var(--space-2);
}

.hero-text__block .text-lead {
  color: var(--color-text-secondary); /* dark on light block     */
  max-width: 44ch;
  margin-bottom: 0;
}

/* On mobile — block is full width, not absolute            */
@media (max-width: 767px) {
  .hero-text__block {
    position: relative;
    top: auto;
    left: auto;
    max-width: 100%;
    padding: var(--space-3) var(--page-margin);
  }
}

/* Figure & caption
   Figcaption uses italic DM Sans.
   4px top margin — tight to image edge.
   Flush left.                                               */
figure {
  margin: var(--space-3) 0;
}

figcaption {
  font-size: var(--text-caption);
  font-style: italic;
  color: var(--color-text-secondary);
  line-height: var(--leading-caption);
  margin-top: var(--space-half);
  padding-left: 0;
  text-align: left;
}

/* --- Slideshow ---
   FADE transition. All slides position:absolute, stacked.
   JS sets track height explicitly from active slide height.
   First slide has loading="eager"; rest use loading="lazy".
   Auto-advance uses Page Visibility API — pauses when tab
   is hidden, resumes when visible. mouseenter/mouseleave
   handles hover pause correctly.
   Fade duration: 700ms.                                     */
.slideshow {
  position: relative;
}

.slideshow__track {
  position: relative;
  width: 100%;
  overflow: hidden;
  /* Height set explicitly by JS. Dots positioned absolute
     inside this element so they overlap bottom of image.    */
}

.slideshow__slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  opacity: 0;
  transition: opacity 700ms ease;
  pointer-events: none;
  z-index: 1;
}

.slideshow__slide.is-active {
  opacity: 1;
  pointer-events: auto;
  z-index: 2;
}

.slideshow__slide img {
  width: 100%;
  height: auto;
  max-height: 70vh;
  object-fit: cover;
  display: block;
}

.slideshow__btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background-color: rgba(255,255,255,0.40); /* 40% transparent       */
  border: none;
  border-radius: 50%;
  width: 44px;
  height: 44px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  color: var(--color-text);
  transition: background-color var(--transition-fast);
  z-index: 10;
}

.slideshow__btn:hover { background-color: rgba(255,255,255,0.85); }
.slideshow__btn--prev { left: var(--space-2); }
.slideshow__btn--next { right: var(--space-2); }

/* Dots sit below the image — 8px gap between image bottom
   and top of dots. Not overlapping the image.              */
.slideshow__dots {
  display: flex;
  justify-content: center;
  gap: var(--space-1);
  padding: var(--space-1) 0;   /* 8px gap between image and dots */
  list-style: none;
  margin: 0;
  background: none;             /* no background behind dots      */
}

.slideshow__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--color-border-strong);
  cursor: pointer;
  border: none;
  padding: 0;
  transition: background-color var(--transition-fast);
}

.slideshow__dot.is-active {
  background-color: var(--accent);
}

/* --- Thumbnail Gallery — Template component, not used on this site.
   Flexbox with wrap + justify-content:center reliably centers
   the last row regardless of item count.                     */
.thumb-gallery {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-1);
  justify-content: center;
  margin: var(--space-3) 0;
}

@media (min-width: 860px) {
  .thumb-gallery {
    gap: var(--space-2);
  }
}

.thumb-gallery__item {
  width: 150px;
  height: 150px;
  overflow: hidden;
  border-radius: var(--radius-sm);
  cursor: pointer;
  background-color: var(--color-surface-mid);
  flex-shrink: 0;
}

@media (min-width: 860px) {
  .thumb-gallery__item {
    width: 190px;
    height: 190px;
  }
}

.thumb-gallery__item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-base);
}

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

/* Lightbox — Template component, not used on this site.      */
.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 300;
  background-color: rgba(0,0,0,0.92);
  align-items: center;
  justify-content: center;
}

.lightbox.is-open { display: flex; }

.lightbox__content {
  position: relative;
  z-index: 400;
  max-width: 90vw;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-2);
}

.lightbox__img {
  max-width: 100%;
  max-height: 80vh;
  object-fit: contain;
  border-radius: var(--radius);
  transition: opacity 250ms ease;
}

.lightbox__img.is-fading { opacity: 0; }

.lightbox__caption {
  color: rgba(255,255,255,0.7);
  font-size: var(--text-caption);
  font-style: italic;
  text-align: center;
}

.lightbox__counter {
  color: rgba(255,255,255,0.5);
  font-size: var(--text-caption);
}

.lightbox__close {
  position: fixed;
  top: var(--space-3);
  right: var(--space-3);
  z-index: 400;
  background: none;
  border: none;
  color: #FFFFFF;
  font-size: 32px;
  cursor: pointer;
  line-height: 1;
  opacity: 0.7;
  transition: opacity var(--transition-fast);
}

.lightbox__close:hover { opacity: 1; }

.lightbox__btn {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  z-index: 400;
  background-color: rgba(255,255,255,0.15);
  border: none;
  border-radius: 50%;
  width: 48px;
  height: 48px;
  color: #FFFFFF;
  font-size: 22px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color var(--transition-fast);
}

.lightbox__btn:hover { background-color: rgba(255,255,255,0.3); }
.lightbox__btn--prev { left: var(--space-3); }
.lightbox__btn--next { right: var(--space-3); }

/* Card — Template component, not used on this site.          */
.card {
  background-color: var(--color-page);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: box-shadow var(--transition-base);
}

.card:hover { box-shadow: var(--shadow-lg); }

.card__img {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
}

.card__body { padding: var(--space-2); }

.card__title {
  font-family: var(--font-heading);
  font-size: var(--text-h3);
  font-weight: var(--weight-regular);
  line-height: var(--leading-heading);
  letter-spacing: -0.025em;
  margin-bottom: var(--space-1);
  color: var(--color-heading);
}

.card__text {
  font-size: var(--text-caption);
  color: var(--color-text-secondary);
  line-height: var(--leading-body);
  margin-bottom: var(--space-2);
}

.card__link {
  font-size: var(--text-caption);
  font-weight: var(--weight-medium);
  display: inline-block;
  padding: 2px 4px;
  margin-left: -4px;
  border-radius: var(--radius-sm);
  transition:
    color var(--transition-fast),
    background-color var(--transition-fast);
}

.card__link:hover {
  background-color: var(--accent);
  color: #FFFFFF;
  text-decoration: none;
}


/* ============================================================
   12. NAVIGATION
   Default: logo 48px, padding 8px top/bottom.
   Scrolled (.is-scrolled): logo shrinks to 32px, padding 4px.
   Smooth transition on all header elements.
   ============================================================ */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background-color: var(--color-chrome, var(--color-surface));
  border-bottom: 1px solid var(--color-border);
  box-shadow: 0 1px 4px rgba(0,0,0,0.05);
  transition:
    box-shadow var(--transition-base),
    padding var(--transition-base);
}

.site-header.is-scrolled {
  box-shadow: 0 2px 10px rgba(0,0,0,0.08);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-1) var(--page-margin) 0;
  max-width: var(--container-max);
  margin: 0 auto;
  transition: padding var(--transition-base);
  will-change: padding;
}

/* Scrolled state — tighter padding                           */
.site-header.is-scrolled .site-header__inner {
  padding-top: var(--space-half);     /* 4px */
  padding-bottom: 0;
}

@media (min-width: 860px) {
  .site-header__inner {
    padding-left: var(--page-margin-tablet);
    padding-right: var(--page-margin-tablet);
  }

  .site-header.is-scrolled .site-header__inner {
    padding-top: var(--space-half);
    padding-bottom: 0;
  }
}

/* Logo — 80px default, shrinks to 56px on scroll            */
.site-logo {
  font-family: var(--font-heading);
  font-size: 20px;
  font-weight: var(--weight-regular);
  color: var(--color-heading);
  text-decoration: none;
  flex-shrink: 0;
  align-self: flex-end;
  line-height: 0; /* removes phantom space below inline img */
}

.site-logo:hover { color: var(--color-heading); }

.site-logo img {
  height: 80px;
  width: auto;
  display: block;
  transition: height var(--transition-base);
}

/* Logo shrinks on scroll                                     */
.site-header.is-scrolled .site-logo img {
  height: 56px;
}

/* Desktop navigation — font shrinks slightly on scroll      */
.site-nav {
  display: none;
}

@media (min-width: 860px) {
  .site-nav {
    display: flex;
    align-items: center;
    gap: var(--space-4);
    list-style: none;
    padding: 0;
    margin: 0;
  }

  .site-nav a {
    font-size: var(--text-caption);
    font-weight: var(--weight-medium);
    color: var(--color-text);
    text-decoration: none;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    padding: 4px 6px;
    border-radius: var(--radius-sm);
    border-bottom: 2px solid transparent;
    transition:
      color var(--transition-fast),
      background-color var(--transition-fast),
      border-color var(--transition-fast);
    /* font-size transitions removed — they cause stutter
       because the browser must reflow text on each frame.     */
  }

  /* Nav font stays consistent on scroll — font-size transitions
     cause reflow-based stutter; padding change is enough.      */

  .site-nav a:hover {
    color: var(--accent);
    background-color: var(--color-surface);
  }

  /* Current page — subtle underline indicator                  */
  .site-nav a.is-active,
  .site-nav a[aria-current="page"] {
    color: var(--color-text);
    border-bottom: 1px solid var(--color-border-strong);
  }

  /* Special Offer — outlined box, accent color                 */
  .site-nav a.nav-special {
    color: var(--accent);
    font-weight: var(--weight-bold);
    border: 1.5px solid var(--accent);
    border-radius: var(--radius-sm);
    padding: 3px 8px;
  }

  .site-nav a.nav-special:hover {
    background-color: var(--accent);
    color: #fff;
  }

  /* Special Offer when it IS the current page —
     filled box so both states are expressed                    */
  .site-nav a.nav-special.is-active,
  .site-nav a.nav-special[aria-current="page"] {
    background-color: var(--accent);
    color: #fff;
    border-color: var(--accent);
  }
}

/* Hamburger                                                  */
.hamburger {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 32px;
  height: 32px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  border-radius: var(--radius-sm);
}

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

.hamburger__line {
  display: block;
  width: 100%;
  height: 2px;
  background-color: var(--color-text);
  transition:
    transform var(--transition-base),
    opacity var(--transition-base);
  transform-origin: center;
}

.hamburger.is-open .hamburger__line:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.hamburger.is-open .hamburger__line:nth-child(2) { opacity: 0; }
.hamburger.is-open .hamburger__line:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

@media (min-width: 860px) {
  .hamburger { display: none; }
}

.mobile-nav {
  display: none;
  position: fixed;
  inset: 0;
  top: 64px;
  z-index: 200;
  background-color: var(--color-chrome, var(--color-page));
  padding: var(--space-4) var(--page-margin);
  overflow-y: auto;
  list-style: none;
}

.mobile-nav.is-open {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.mobile-nav a {
  font-family: var(--font-heading);
  font-size: var(--text-h3);
  color: var(--color-text);
  text-decoration: none;
  padding-bottom: var(--space-3);
  border-bottom: 1px solid var(--color-border);
  display: block;
}

.mobile-nav a:hover { color: var(--accent); }

.mobile-nav a.nav-special {
  color: var(--accent);
  font-weight: var(--weight-medium);
}

@media (min-width: 860px) {
  .mobile-nav { display: none !important; }
}


/* ============================================================
   13. FOOTER
   Simple centered design: name, tagline, email — then
   a rule with copyright left and legal links right.
   ============================================================ */

.site-footer {
  background-color: var(--color-chrome, var(--color-surface));
  border-top: 1px solid var(--color-border);
  box-shadow: 0 -3px 10px rgba(0,0,0,0.05);
  padding: var(--space-5) var(--page-margin) var(--space-4);
  margin-top: auto;
  text-align: center;
}

.site-footer__brand {
  font-family: var(--font-heading);
  font-size: var(--text-h3);
  font-weight: var(--weight-regular);
  color: var(--color-heading);
  letter-spacing: -0.015em;
  margin-bottom: var(--space-1);
  max-width: none;
}

.site-footer__tagline {
  font-size: var(--text-body);
  color: var(--color-text-secondary);
  margin: 0 auto var(--space-2);
  max-width: none;
}

.site-footer__email {
  font-size: var(--text-body);
  color: var(--accent);
  text-decoration: none;
  transition: color var(--transition-fast);
}

.site-footer__email:hover {
  color: var(--accent-hover);
}

.site-footer__legal {
  margin-top: var(--space-4);
  padding-top: var(--space-2);
  border-top: 1px solid var(--color-border);
  font-size: var(--text-caption);
  color: var(--color-text-muted);
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  justify-content: space-between;
  align-items: center;
  max-width: var(--container-max);
  margin-left: auto;
  margin-right: auto;
}

.site-footer__legal a {
  color: var(--color-text-muted);
  text-decoration: none;
  transition: color var(--transition-fast);
}

.site-footer__legal a:hover {
  color: var(--accent);
}


/* ============================================================
   14. Z-INDEX STACK
   Ground:                auto / 0
   Sticky header:          100
   Dropdown / mobile nav:  200
   Lightbox backdrop:      300
   Lightbox content:       400
   Notifications:          500
   Modals:                 600
   Never exceed 600.
   ============================================================ */


/* ============================================================
   15. ANIMATION
   ============================================================ */


@keyframes slideDown {
  from { opacity: 0; transform: translateY(-16px); }
  to   { opacity: 1; transform: translateY(0); }
}

.toast { animation: slideDown var(--transition-base) ease both; }

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


/* ============================================================
   16. ACCESSIBILITY
   ============================================================ */

.skip-link {
  position: absolute;
  top: -100%;
  left: var(--space-2);
  background-color: var(--accent);
  color: #FFFFFF;
  padding: var(--space-1) var(--space-2);
  border-radius: var(--radius-sm);
  font-weight: var(--weight-medium);
  text-decoration: none;
  z-index: 600;
  transition: top var(--transition-fast);
}

.skip-link:focus { top: var(--space-2); }

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

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

@media (forced-colors: active) {
  .btn { border: 2px solid ButtonText; }
  .hamburger__line { background-color: ButtonText; }
}


/* ============================================================
   17. PRINT
   ============================================================ */

@media print {

  *, *::before, *::after {
    background: transparent !important;
    color: #000000 !important;
    box-shadow: none !important;
  }

  body { font-size: 12pt; line-height: 1.5; display: block; }
  main { flex: none; }

  .site-header, .site-footer, .hamburger, .mobile-nav,
  .btn, .skip-link, .slideshow__btn, .lightbox {
    display: none !important;
  }

  h1, h2, h3         { page-break-after: avoid; }
  p, blockquote, li  { orphans: 3; widows: 3; }
  img                { max-width: 100% !important; page-break-inside: avoid; }

  a[href]::after {
    content: " (" attr(href) ")";
    font-size: 10pt;
    color: #555 !important;
  }

  a[href^="#"]::after,
  a[href^="javascript"]::after { content: ""; }

  .column        { max-width: 100%; }
  .context-links { float: none; width: 100%; }

  .img-float-left,
  .img-float-right {
    float: none;
    width: 100%;
    margin: 0 0 var(--space-3) 0;
  }
}


/* ============================================================
   END OF STYLES.CSS
   ============================================================ */
