/* ==========================================================================
   Lauterbach & Associates, LLC — site styles
   Values derived from the live WebEasy site (800px page, #e1d2be background,
   Trebuchet MS fonts, sizes and colours). Load fonts.css before this file.
   ========================================================================== */

:root {
  /* Colours (all taken from the live site's stylesheets) */
  --color-page: #e1d2be; /* .page / body background */
  --color-text: #474747; /* main body text (home page) */
  --color-strong: #000000; /* page titles, section headings, links */
  --color-site-title: #676767; /* .header */
  --color-nav: #000000; /* .navigation */
  --color-link: #000000; /* a:link */
  --color-link-visited: #676767; /* a:visited */
  --color-link-hover: #b87761; /* a:hover / a:active */
  --color-input-border: #676767; /* .form_input border */
  --color-error: #cc0000; /* live highlight red (.cc02/.cc04) */

  /* Type sizes: fluid, scaling up to the live desktop sizes */
  --fs-site-title: clamp(1.25rem, 0.95rem + 1.6vw, 1.75rem); /* 28px */
  --fs-page-title: clamp(1.0625rem, 1rem + 0.4vw, 1.1875rem); /* 19px */
  --fs-tagline: var(--fs-page-title); /* 19px */
  --fs-section: clamp(0.9375rem, 0.9rem + 0.2vw, 1rem); /* 16px */
  --fs-body: clamp(0.9375rem, 0.9rem + 0.2vw, 1rem); /* 16px */
  --fs-nav: 0.75rem; /* 12px */

  /* Spacing scale (fluid) */
  --space-3xs: clamp(0.25rem, 0.23rem + 0.1vw, 0.3125rem);
  --space-2xs: clamp(0.375rem, 0.35rem + 0.15vw, 0.5rem);
  --space-xs: clamp(0.5rem, 0.45rem + 0.25vw, 0.75rem);
  --space-s: clamp(0.75rem, 0.7rem + 0.25vw, 1rem);
  --space-m: clamp(1rem, 0.9rem + 0.5vw, 1.5rem);
  --space-l: clamp(1.5rem, 1.3rem + 1vw, 2rem);
  --space-xl: clamp(2rem, 1.6rem + 2vw, 3rem);

  /* Layout */
  --page-width: 800px; /* live div#page */
  --gutter: clamp(1rem, 0.4rem + 5.45vw, 3.125rem); /* 50px content inset */
  --col-gap: clamp(1.25rem, 0.9rem + 1.5vw, 1.875rem); /* ~30px column gap */
  --label-width: 6.5625rem; /* 105px form labels */
}

/* ---------- Base ---------- */

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

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

body {
  margin: 0;
  background-color: var(--color-page);
  color: var(--color-text);
  font-size: var(--fs-body);
  overflow-wrap: break-word;
}

h1,
h2,
h3,
h4,
h5,
h6,
p,
ul,
ol,
address,
fieldset,
legend,
figure {
  margin: 0;
  padding: 0;
}

p {
  margin-block-end: var(--space-s);
}
p:last-child {
  margin-block-end: 0;
}

address {
  font-style: normal;
}

a {
  color: var(--color-link);
  text-decoration: none;
}
a:visited {
  color: var(--color-link-visited);
}
a:hover,
a:active {
  color: var(--color-link-hover);
  text-decoration: underline;
}

/* Phone numbers look like the surrounding text */
a[href^="tel:"],
a[href^="tel:"]:visited {
  color: inherit;
}
a[href^="tel:"]:hover {
  color: inherit;
  text-decoration: underline;
}

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

.visually-hidden {
  position: absolute !important;
  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-s);
  top: -100px;
  z-index: 10;
  padding: var(--space-2xs) var(--space-s);
  background: var(--color-page);
  color: var(--color-strong);
  font-weight: var(--fw-bold);
  border: 2px solid var(--color-strong);
}
.skip-link:focus {
  top: var(--space-s);
}

/* ---------- Page frame ---------- */

.site {
  max-width: var(--page-width);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.site-header {
  padding-block-start: var(--space-l); /* title at ~39px on desktop */
}

.site-title {
  color: var(--color-site-title);
  font-family: var(--font-display);
  font-size: var(--fs-site-title);
  font-weight: var(--fw-bold);
  line-height: var(--lh-heading);
  text-wrap: balance;
}
.site-title a,
.site-title a:visited {
  color: inherit;
}
.site-title a:hover {
  color: inherit;
  text-decoration: none;
}

/* Navigation: right-aligned row under the title, as on the live site */
.site-nav {
  margin-block-start: var(--space-m);
}

.site-nav ul {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: var(--space-3xs) var(--space-xs);
}

.site-nav a {
  display: inline-block;
  padding: var(--space-3xs) var(--space-2xs);
  color: var(--color-nav);
  font-size: var(--fs-nav);
  font-weight: var(--fw-bold);
  line-height: var(--lh-heading);
}
.site-nav a:visited {
  color: var(--color-nav);
}
.site-nav a:hover {
  color: var(--color-text);
  text-decoration: underline;
}
.site-nav a[aria-current="page"] {
  text-decoration: none;
  cursor: default;
}

main {
  padding-block: var(--space-m) var(--space-xl);
}
main:focus {
  outline: none;
}

/* ---------- Content ---------- */

.content {
  text-align: justify;
  hyphens: auto;
  -webkit-hyphens: auto;
}
.content h1,
.content h2,
.content .tagline {
  hyphens: manual;
  -webkit-hyphens: manual;
}

.page-title {
  color: var(--color-strong);
  font-size: var(--fs-page-title);
  font-weight: var(--fw-regular); /* live .page_tag: 19px normal */
  margin-block-end: var(--space-s);
}

.tagline {
  color: var(--color-strong);
  font-family: var(--font-display);
  font-size: var(--fs-tagline);
  font-weight: var(--fw-regular); /* live home text: 19px normal */
  line-height: var(--lh-heading);
  text-align: left;
  text-wrap: balance;
  margin-block-end: var(--space-m);
}

.section-heading {
  color: var(--color-strong);
  font-size: var(--fs-section);
  font-weight: var(--fw-bold);
  text-align: left;
  margin-block-end: var(--space-2xs);
}
.section-heading a:visited {
  color: var(--color-link);
}
.section-heading a:hover {
  color: var(--color-link-hover);
}

.section {
  margin-block-end: var(--space-l);
}
.section:last-child {
  margin-block-end: 0;
}

.list {
  list-style: circle;
  padding-inline-start: var(--space-m);
}
.list li {
  margin-block-end: var(--space-2xs);
}
.list li:last-child {
  margin-block-end: 0;
}

/* Two columns (Links page); stack on narrow screens */
.columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-l) var(--col-gap);
  align-items: start;
}
@media (max-width: 40em) {
  .columns {
    grid-template-columns: 1fr;
  }
}

/* ---------- Contact page ---------- */

.contact {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 15rem);
  grid-template-areas:
    "intro  addr"
    "form   addr";
  gap: var(--space-m) var(--col-gap);
  align-items: start;
}
.contact-intro {
  grid-area: intro;
  text-align: left;
}
.contact-address {
  grid-area: addr;
}
.contact-form {
  grid-area: form;
  max-width: 26.5rem;
} /* 422px live form */

.contact-email {
  margin-block-start: var(--space-2xs);
}

@media (max-width: 40em) {
  .contact {
    grid-template-columns: 1fr;
    grid-template-areas: "intro" "addr" "form";
  }
}

/* Form */
.form-set {
  border: 0;
  min-width: 0;
}

.form-legend {
  color: var(--color-strong);
  font-weight: var(--fw-bold);
  margin-block-end: var(--space-s);
}

.form-row {
  display: grid;
  grid-template-columns: var(--label-width) minmax(0, 1fr);
  column-gap: var(--space-2xs);
  align-items: start;
  margin-block-end: var(--space-xs);
}
.form-row label {
  text-align: right;
  line-height: var(--lh-heading);
  padding-block-start: calc(
    var(--space-3xs) + 1px
  ); /* line up with the input text */
}
.form-row .field {
  min-width: 0;
}

.form-input {
  width: 100%;
  padding: var(--space-3xs);
  border: 1px solid var(--color-input-border);
  border-radius: 0;
  background: #ffffff;
  color: var(--color-text);
  font: inherit;
  line-height: var(--lh-heading);
}
textarea.form-input {
  min-height: 4.6875rem;
  resize: vertical;
  line-height: var(--lh-body);
}
select.form-input {
  padding-inline-end: 0;
}
.form-input::placeholder {
  color: var(--color-nav);
  opacity: 1;
}
.form-input[aria-invalid="true"] {
  border-color: var(--color-error);
}

.required-mark {
  color: var(--color-error);
}

.field-error {
  display: block;
  margin-block-start: var(--space-3xs);
  color: var(--color-error);
  font-size: var(--fs-body);
  line-height: var(--lh-heading);
}
.field-error:empty {
  display: none;
}

.form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-s);
  padding-inline-start: calc(var(--label-width) + var(--space-2xs));
  margin-block-start: var(--space-s);
}

.form-button {
  min-width: 7.5625rem; /* 121px live buttons */
  padding: var(--space-3xs) var(--space-s);
  border: 1px solid var(--color-input-border);
  border-radius: 0;
  background: #ffffff;
  color: var(--color-site-title);
  font: inherit;
  cursor: pointer;
}
.form-button:hover {
  color: var(--color-link-hover);
  border-color: var(--color-link-hover);
}

.form-status {
  margin-block-start: var(--space-s);
  padding-inline-start: calc(var(--label-width) + var(--space-2xs));
  text-align: left;
}
.form-status:empty {
  display: none;
}

/* Honeypot: hidden from people and assistive tech, visible to naive bots */
.hp-field {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

@media (max-width: 30em) {
  .form-row {
    grid-template-columns: 1fr;
    row-gap: var(--space-3xs);
  }
  .form-row label {
    text-align: left;
    padding-block-start: 0;
  }
  .form-actions,
  .form-status {
    padding-inline-start: 0;
  }
}

/* ---------- Narrow screens: left-align instead of justify ---------- */

@media (max-width: 30em) {
  .content,
  .content p,
  .content li {
    text-align: left;
  }
}

/* ---------- Reduced motion ---------- */

@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;
  }
}

/* ---------- Print ---------- */

@media print {
  .site-nav,
  .skip-link,
  .contact-form {
    display: none !important;
  }

  body {
    background: #ffffff;
    color: #000000;
  }
  .site {
    max-width: none;
    padding: 0;
  }
  .content {
    text-align: left;
  }
  a {
    color: #000000;
    text-decoration: none;
  }
  .content a[href^="http"]::after {
    content: " (" attr(href) ")";
    font-size: 0.85em;
  }
  .section-heading,
  .page-title {
    break-after: avoid;
  }
  p,
  li {
    orphans: 3;
    widows: 3;
  }
}
