/*
 * Salt City Siding: site styles. Mobile-first.
 * Breakpoints: 768px (48em), 1024px (64em), 1280px (80em).
 * Changelog:
 *   2026-10-16  Created (Little Apple Tree Service template).
 *   2026-10-18  Self-hosted fonts.
 *   2026-10-20  Salt City Siding: slate-blue and salt-white palette, wheat-gold CTA,
 *               Barlow Condensed, salt-crystal logo, lap-siding hero.
 *   2026-10-21  Adam's direction: restrained light interface so the siding photos
 *               carry the color. About 60% white, 25% navy (header, footer, closing
 *               band, headings), 10% gray, 5% orange (CTA only); sky blue only for
 *               links, the logo and small accents. Manrope headings, Inter body.
 */

/* Fonts: Google Fonts files (latin subset) hosted here, so pages don't wait on
   a third-party stylesheet. Both are variable fonts. */
@font-face {
  font-family: "Manrope";
  font-style: normal;
  font-weight: 600 800;
  font-display: swap;
  src: url("../fonts/manrope.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url("../fonts/inter.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  /* Colors (Adam's direction, 2026-10-21). The interface stays quiet so the
     siding photos supply the color: white pages, navy structure, gray support,
     an orange CTA used nowhere else (SOP: CTA stays distinct), and sky blue
     kept to links, the logo and small accents. The text-on-dark /
     text-on-light names follow the shared standard. */
  --color-bg: #FFFFFF;            /* white, main background (~60%) */
  --color-navy: #1B3550;          /* navy: header, footer, closing band, headings (~25%) */
  --color-card: #F1F4F7;          /* light gray cards and bands (~10%) */
  --color-text-on-dark: #FFFFFF;  /* text on navy */
  --color-article-bg: #FFFFFF;
  --color-text-on-light: #14212E; /* ink, ALL text on light backgrounds */
  --color-heading: #1B3550;
  --color-cta: #EC7A2D;           /* orange, CTA buttons ONLY (~5%) */
  --color-cta-hover: #D8661A;
  --color-cta-text: #14212E;
  --color-sky: #5FA8E0;           /* sky blue: logo and small accents */
  --color-link: #1F6AA8;          /* the same sky blue, deepened so links read on white */
  --glow-cream: 0 0.25rem 0.75rem rgba(20, 33, 46, 0.08);

  --color-bg-alt: #F1F4F7;        /* alternate section band */
  --color-text-muted: #4A5868;    /* slate gray secondary text (AA on white and gray) */
  --color-line: #D5DCE3;
  --color-field-border: #7D8A97;  /* 3:1 against white */
  --color-error: #B42318;

  /* Logo crystal faces */
  --color-salt-top: #FFFFFF;
  --color-salt-left: #B9CCDC;
  --color-salt-right: #5FA8E0;

  /* Type */
  --font-logo: 'Manrope', system-ui, sans-serif;
  --font-heading: 'Manrope', system-ui, sans-serif;
  --font-body: 'Inter', system-ui, sans-serif;
  --font-size-body: 1.0625rem;    /* 17px: Inter runs large */
  --font-size-small: 1rem;        /* floor: never below 16px */
  --font-size-h1: clamp(2.375rem, 1.8rem + 2.6vw, 3.5rem);
  --font-size-h2: clamp(1.75rem, 1.45rem + 1.2vw, 2.375rem);
  --font-size-h3: 1.25rem;
  --line-height-body: 1.65;
  --line-height-heading: 1.15;

  /* Spacing */
  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 1.5rem;
  --space-lg: 2.5rem;
  --space-xl: 4rem;

  --radius: 8px;
  --container-max: 75rem;
  --gutter: clamp(1rem, 4vw, 2rem);
  --focus: var(--color-link);
}

/* ---- Base ------------------------------------------------------------ */

html {
  background: var(--color-bg);
}

body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  background: var(--color-bg);
  color: var(--color-text-on-light);
  font-family: var(--font-body);
  font-size: var(--font-size-body);
  line-height: var(--line-height-body);
}

main {
  flex: 1;
}

h1,
h2,
h3 {
  font-family: var(--font-heading);
  font-weight: 800;
  line-height: var(--line-height-heading);
  letter-spacing: -0.015em;
  color: var(--color-heading);
}

h1 { font-size: var(--font-size-h1); }
h2 { font-size: var(--font-size-h2); }
h3 { font-size: var(--font-size-h3); }

a {
  color: var(--color-link);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}

a:hover {
  text-decoration-thickness: 2px;
}

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}

.container {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  top: var(--space-xs);
  left: var(--space-xs);
  z-index: 100;
  padding: var(--space-xs) var(--space-sm);
  background: var(--color-navy);
  color: var(--color-text-on-dark);
  font-weight: 600;
  border-radius: var(--radius);
  transform: translateY(-200%);
}

.skip-link:focus {
  transform: none;
}

/* ---- Logo ------------------------------------------------------------
   A salt crystal (a cube, which is how rock salt grows) beside the name. */

.logo {
  display: inline-flex;
  align-items: center;
  gap: 0.45em;
  font-family: var(--font-logo);
  font-size: 1.375rem;
  line-height: 1;
  color: var(--color-text-on-dark);
  text-decoration: none;
  white-space: nowrap;
}

.logo-mark {
  flex: none;
  width: 1.55em;
  height: 1.7em;
}

.logo-mark-top { fill: var(--color-salt-top); }
.logo-mark-left { fill: var(--color-salt-left); }
.logo-mark-right { fill: var(--color-salt-right); }

.logo-text {
  display: flex;
  flex-direction: column;
}

.logo-line--top {
  font-weight: 800;
  font-size: 1.1em;
  letter-spacing: -0.01em;
}

.logo-line--bottom {
  font-weight: 700;
  font-size: 0.66em;
  letter-spacing: 0.3em;
  color: #B9CCDC;
}

@media (min-width: 48em) {
  .site-header .logo {
    font-size: 1.5rem;
  }
}

/* ---- Buttons --------------------------------------------------------- */

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.875rem;
  padding: 0.55em 1.25em;
  background: var(--color-cta);
  color: var(--color-cta-text);
  border: 2px solid var(--color-cta);
  border-radius: var(--radius);
  /* 19px extra-bold: large text */
  font-family: var(--font-heading);
  font-size: 1.1875rem;
  font-weight: 800;
  letter-spacing: 0;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}

.button:hover {
  background: var(--color-cta-hover);
  border-color: var(--color-cta-hover);
}

.button:focus-visible {
  outline-color: var(--focus);
}

.button[disabled] {
  cursor: progress;
  opacity: 0.8;
}

.button--large {
  min-height: 3.25rem;
  padding: 0.7em 1.5em;
}

/* Call buttons: navy outline, so orange stays the quote CTA. */
.button--outline {
  background: transparent;
  color: var(--color-navy);
  border-color: var(--color-navy);
}

.button--outline:hover {
  background: var(--color-navy);
  color: var(--color-text-on-dark);
  border-color: var(--color-navy);
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
}

/* ---- Header and nav -------------------------------------------------- */

.site-header {
  --color-link: #FFFFFF;
  --focus: #FFFFFF;
  position: relative;
  z-index: 20;
  background: var(--color-navy);
  color: var(--color-text-on-dark);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  min-height: 4.75rem;
  padding-block: var(--space-xs);
}

.header-inner .logo {
  margin-right: auto;
}

.header-call {
  display: none;
  font-weight: 600;
  white-space: nowrap;
}

.nav-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  margin-right: -0.5rem;
  color: var(--color-text-on-dark);
  border-radius: var(--radius);
}

.nav-toggle .icon-close,
.nav-toggle[aria-expanded="true"] .icon-open {
  display: none;
}

.nav-toggle[aria-expanded="true"] .icon-close {
  display: block;
}

html:not(.js) .nav-toggle {
  display: none;
}

.site-nav {
  display: none;
}

.site-nav.is-open {
  display: block;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--color-navy);
  border-top: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: 0 1rem 2rem rgba(20, 33, 46, 0.25);
}

html:not(.js) .site-nav {
  display: block;
}

.nav-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
  padding: var(--space-sm) var(--gutter) var(--space-md);
}

.nav-list a:not(.button) {
  display: block;
  padding: var(--space-xs) 0;
  font-weight: 600;
  text-decoration: none;
}

.nav-list a:not(.button):hover,
.nav-list a[aria-current="page"]:not(.button) {
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 0.35em;
}

.nav-list .button {
  margin-top: var(--space-xs);
  width: 100%;
}

@media (min-width: 48em) {
  .header-call {
    display: inline;
  }

  .nav-toggle {
    display: none;
  }

  .site-nav,
  .site-nav.is-open {
    display: block;
    position: static;
    border: 0;
    box-shadow: none;
  }

  .nav-list {
    flex-direction: row;
    align-items: center;
    gap: var(--space-md);
    padding: 0;
  }

  .nav-list .button {
    margin-top: 0;
    width: auto;
  }

  .header-call + .nav-toggle + .site-nav {
    margin-left: var(--space-sm);
  }
}

/* ---- Sections -------------------------------------------------------- */

.section {
  padding-block: var(--space-xl);
}

.section--alt {
  background: var(--color-bg-alt);
}

.section--alt .card,
.section--alt .town-list li {
  background: var(--color-bg);
}

.section-tight {
  padding-bottom: var(--space-xl);
}

.section-intro,
.lede {
  max-width: 40em;
  margin-top: var(--space-xs);
  color: var(--color-text-muted);
}

.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-xs) var(--space-md);
}

.section-head a {
  font-weight: 600;
}

.page-header {
  padding-top: clamp(2.5rem, 6vw, 4rem);
  padding-bottom: var(--space-lg);
}

/* ---- Hero ------------------------------------------------------------ */

/* Restraint by design: a white hero where the siding photo is the color and
   the personality. A thin sky-blue line closes the section. */
.hero {
  padding-block: var(--space-lg) var(--space-xl);
  background: var(--color-bg);
  border-bottom: 4px solid var(--color-sky);
}

.hero h1 {
  text-wrap: balance;
}

.hero-inner {
  display: grid;
  gap: var(--space-lg);
  align-items: center;
}

.hero h1 {
  max-width: 14ch;
}

.hero-sub {
  max-width: 30em;
  margin-top: var(--space-sm);
  font-size: 1.1875rem;
  color: var(--color-text-muted);
}

.hero .button-row {
  margin-top: var(--space-md);
}

.hero-image {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: var(--radius);
}

@media (min-width: 64em) {
  .hero {
    padding-block: var(--space-xl);
  }

  .hero-inner {
    grid-template-columns: 5fr 7fr;
    gap: var(--space-xl);
  }
}

/* ---- Cards ----------------------------------------------------------- */

.card-grid {
  list-style: none;
  display: grid;
  gap: var(--space-md);
  margin-top: var(--space-lg);
}

.card {
  background: var(--color-card);
  color: var(--color-text-on-light);
  border-radius: var(--radius);
}

.card-grid--services .card {
  padding: var(--space-md);
}

.card-grid--services .card p {
  margin-top: var(--space-xs);
}

@media (min-width: 48em) {
  .card-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 64em) {
  .card-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* Article cards: whole card clickable through the title link. */
.article-card {
  position: relative;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.article-card-image {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: var(--radius) var(--radius) 0 0;
}

.article-card-body {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
  flex: 1;
  padding: var(--space-md);
}

.article-card-title {
  font-size: 1.3125rem;
}

.article-card-title a {
  color: var(--color-heading);
  text-decoration: none;
}

.article-card-title a::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: var(--radius);
}

.article-card:hover .article-card-title a {
  text-decoration: underline;
}

.article-card-title a:focus-visible {
  outline: none;
}

.article-card:has(a:focus-visible) {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}

/* ---- Why us ------------------------------------------------------------ */

.why-list {
  list-style: none;
  display: grid;
  gap: var(--space-md) var(--space-lg);
  margin-top: var(--space-lg);
}

.why-list li {
  padding-left: var(--space-sm);
  border-left: 3px solid var(--color-sky);
}

.why-list strong {
  display: block;
  font-family: var(--font-heading);
  font-size: 1.1875rem;
  font-weight: 800;
  color: var(--color-heading);
  margin-bottom: 0.25rem;
}

@media (min-width: 48em) {
  .why-list {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ---- Service area ------------------------------------------------------ */

.area > p:first-of-type {
  margin-top: var(--space-xs);
}

.town-list {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-xs);
  margin-top: var(--space-md);
}

.town-list li {
  padding: 0.35rem 0.9rem;
  background: var(--color-card);
  border-radius: 999px;
  font-weight: 600;
}

.area-note {
  margin-top: var(--space-md);
  color: var(--color-text-muted);
}

/* ---- Closing band ------------------------------------------------------ */

.quote-band {
  --color-heading: #FFFFFF;
  --focus: #FFFFFF;
  padding-block: var(--space-xl);
  background: var(--color-navy);
  color: var(--color-text-on-dark);
}

.quote-band-inner {
  display: grid;
  gap: var(--space-md);
  align-items: center;
}

.quote-band p {
  margin-top: var(--space-xs);
  color: #D3DDE7;
}

@media (min-width: 64em) {
  .quote-band-inner {
    grid-template-columns: 1fr auto;
  }
}

/* ---- Footer ------------------------------------------------------------ */

.site-footer {
  --color-link: #FFFFFF;
  --color-text-muted: #C5D2DE;
  --focus: #FFFFFF;
  padding-block: var(--space-lg);
  background: #142A40;
  color: var(--color-text-on-dark);
}

.footer-inner {
  display: grid;
  gap: var(--space-md);
}

.logo--small {
  font-size: 1.25rem;
}

.footer-area,
.footer-phone {
  margin-top: var(--space-xs);
  max-width: 30em;
  color: var(--color-text-muted);
  font-size: var(--font-size-small);
}

.footer-links {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-xs) var(--space-md);
}

.footer-links a {
  display: inline-block;
  padding-block: 0.25rem;
}

.copyright {
  color: var(--color-text-muted);
  font-size: var(--font-size-small);
}

@media (min-width: 64em) {
  .footer-inner {
    grid-template-columns: 1fr auto;
    align-items: start;
  }

  .copyright {
    grid-column: 1 / -1;
  }
}

/* ---- Mobile call bar (only rendered when a phone number is set) ------- */

.call-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 30;
  padding: 0.625rem var(--gutter);
  background: var(--color-bg);
  border-top: 1px solid var(--color-line);
  box-shadow: 0 -0.25rem 1rem rgba(20, 33, 46, 0.08);
}

.call-bar .button {
  width: 100%;
}

.has-call-bar {
  padding-bottom: 4.5rem;
}

@media (min-width: 48em) {
  .call-bar {
    display: none;
  }

  .has-call-bar {
    padding-bottom: 0;
  }
}

/* ---- Article pages (light theme) --------------------------------------- */

.theme-light main {
  --focus: var(--color-text-on-light);
  background: var(--color-article-bg);
  color: var(--color-text-on-light);
}

.article {
  max-width: 50rem;
  padding-block: var(--space-lg) var(--space-xl);
}

.breadcrumb a {
  color: inherit;
}

.breadcrumb ol {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 0.5rem;
  font-size: var(--font-size-small);
}

.breadcrumb li + li::before {
  content: "›";
  margin-right: 0.5rem;
}

.article-header {
  margin-top: var(--space-md);
}

.article-header h1 {
  font-size: clamp(2rem, 1.5rem + 2vw, 2.75rem);
}

.article-hero {
  margin-top: var(--space-md);
}

.article-hero img,
.prose figure img {
  width: 100%;
  border-radius: var(--radius);
}

.prose {
  max-width: 42rem;
  margin-top: var(--space-lg);
  line-height: 1.7;
}

.prose > * + * {
  margin-top: var(--space-sm);
}

.prose h2 {
  margin-top: var(--space-lg);
  font-size: 1.75rem;
}

.prose h3 {
  margin-top: var(--space-md);
}

.prose ul,
.prose ol {
  padding-left: 1.4em;
}

.prose li + li {
  margin-top: 0.4rem;
}

.prose figure {
  margin-block: var(--space-md);
}

.prose--dark h2:first-child {
  margin-top: 0;
}

.updated {
  color: var(--color-text-muted);
  font-size: var(--font-size-small);
}

.article-cta {
  --focus: #FFFFFF;
  --color-link: #FFFFFF;
  max-width: 42rem;
  margin-top: var(--space-lg);
  padding: var(--space-md);
  background: var(--color-navy);
  color: var(--color-text-on-dark);
  border-radius: var(--radius);
}

.article-cta h2 {
  font-size: 1.5rem;
  color: var(--color-text-on-dark);
}

.article-cta p {
  margin-block: var(--space-xs) var(--space-sm);
}

.more-tips {
  max-width: 42rem;
  margin-top: var(--space-lg);
}

.more-tips h2 {
  font-size: 1.5rem;
}

.more-tips ul {
  list-style: none;
  margin-top: var(--space-xs);
}

.more-tips li + li {
  margin-top: var(--space-xs);
}

.more-tips a {
  font-weight: 600;
}

/* ---- 404 ---------------------------------------------------------------- */

.not-found-links {
  list-style: none;
  margin-top: var(--space-md);
  padding-bottom: var(--space-xl);
}

.not-found-links li + li {
  margin-top: var(--space-xs);
}

.not-found-links a {
  font-weight: 600;
}

/* ---- Contact form ------------------------------------------------------ */

.contact-layout {
  display: grid;
  gap: var(--space-lg);
  padding-bottom: var(--space-xl);
}

@media (min-width: 64em) {
  .contact-layout {
    grid-template-columns: minmax(0, 38rem) minmax(0, 1fr);
    gap: var(--space-xl);
    align-items: start;
  }
}

.field {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
  margin-bottom: var(--space-md);
}

.field label {
  font-weight: 600;
}

.optional,
.hint {
  color: var(--color-text-muted);
  font-weight: 400;
}

.hint {
  font-size: var(--font-size-small);
}

.field input,
.field select,
.field textarea {
  width: 100%;
  min-height: 3rem;
  padding: 0.625rem 0.875rem;
  background: var(--color-bg);
  color: var(--color-text-on-light);
  border: 1px solid var(--color-field-border);
  border-radius: var(--radius);
  font-size: var(--font-size-body);
}

.field select {
  appearance: none;
  padding-right: 2.5rem;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24'%3E%3Cpath d='M6 9l6 6 6-6' fill='none' stroke='%2314212E' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.875rem center;
}

.field--zip input {
  max-width: 10rem;
}

.field input:focus-visible,
.field select:focus-visible,
.field textarea:focus-visible {
  outline-offset: 1px;
  border-color: var(--color-link);
}

.field [aria-invalid="true"] {
  border-color: var(--color-error);
  border-width: 2px;
}

.field-error,
.form-status {
  color: var(--color-error);
  font-size: var(--font-size-small);
}

.field-error::before {
  content: "Error: ";
  font-weight: 600;
}

.field-error:empty,
.form-status:empty,
.field-note:empty {
  display: none;
}

.field-note {
  color: var(--color-text-muted);
  font-size: var(--font-size-small);
}

.form-notice {
  margin-bottom: var(--space-md);
  padding: var(--space-sm) var(--space-md);
  background: var(--color-card);
  border-left: 4px solid var(--color-field-border);
  border-radius: var(--radius);
}

.form-actions {
  margin-top: var(--space-md);
}

.form-status {
  margin-top: var(--space-sm);
}

.hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.form-success,
.contact-aside {
  padding: var(--space-md);
  background: var(--color-card);
  border-radius: var(--radius);
  box-shadow: var(--glow-cream);
}

.form-success p {
  margin-top: var(--space-xs);
}

.form-success:focus {
  outline: none;
}

.form-success:focus-visible {
  outline: 3px solid var(--focus);
}

.contact-aside h2 {
  font-size: 1.5rem;
}

.contact-aside ol {
  margin-top: var(--space-sm);
  padding-left: 1.3em;
}

.contact-aside li + li {
  margin-top: var(--space-xs);
}

.aside-note {
  margin-top: var(--space-sm);
  color: var(--color-text-muted);
  font-size: var(--font-size-small);
}

