/* Allsis - base stylesheet
   Intentionally plain right now. Colors, type, and imagery come later
   (see consulting-website-build notes: design is a later phase). This
   just needs to be mobile-first, responsive, and accessible from day one.
*/

/* Self-hosted (not Google Fonts) so visitors' browsers never contact
   Google - see conversation history for why. This is Inter's full
   variable-font file - one file, but it covers the whole 100-900 weight
   axis (Thin through Black), not just the 400/500/600/700 the site
   currently uses. Confirmed by re-requesting Google's CSS with an
   explicit 100..900 range: it names this exact same file. Declaring the
   full range here means any future design work can use a lighter or
   heavier weight with zero extra download - the capability is already
   in the codebase, just unused until something asks for it. */
@font-face {
  font-family: "Inter";
  src: url("/assets/fonts/inter-variable.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --color-text: #1a1a1a;
  --color-bg: #ffffff;
  --color-accent: #2b4c7e;
  --color-border: #d7d7d7;
  --max-width: 68rem;
  --space: 1rem;
}

* {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  /* Inter is self-hosted (see @font-face above); falls back to the
     system stack if that file is somehow slow or fails to load. */
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto,
    sans-serif;
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.5;
}

img {
  max-width: 100%;
  height: auto;
}

/* ---------------------------------------------------------------------
   Typography scale. One h1 per page (the headline); h2 for repeating
   section titles; the paragraph directly under an h1 reads as a lead/
   subhead, styled via the adjacent-sibling selector below so no markup
   or content changes were needed to apply it. Sizes use clamp() so they
   scale down smoothly on narrow screens instead of needing a breakpoint.
   --------------------------------------------------------------------- */
h1 {
  font-size: clamp(1.9rem, 1.3rem + 2.5vw, 2.75rem);
  font-weight: 700;
  line-height: 1.15;
  margin: 0 0 0.5rem;
}

h2 {
  font-size: clamp(1.35rem, 1.1rem + 1vw, 1.7rem);
  font-weight: 600;
  line-height: 1.3;
  margin: 2rem 0 0.75rem;
}

/* The one-line description right under a page's headline. */
h1 + p {
  font-size: 1.15rem;
  line-height: 1.5;
  color: #444;
  margin-top: 0;
}

p {
  line-height: 1.55;
}

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

/* Visually-hidden until focused, for keyboard users to skip the nav */
.skip-link {
  position: absolute;
  left: -999px;
  top: auto;
  background: var(--color-bg);
  padding: 0.5rem 1rem;
  z-index: 100;
}
.skip-link:focus {
  left: 0.5rem;
  top: 0.5rem;
}

.site-header__inner,
main,
.site-footer {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: var(--space);
}

.site-header {
  border-bottom: 1px solid var(--color-border);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--space);
}

.site-header__brand {
  font-weight: bold;
  font-size: 1.25rem;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
}

.site-header__logo {
  height: 5rem;
  width: auto;
}

.site-header__phone {
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}

.site-nav__toggle {
  display: none;
}

.site-nav__dropdown-group {
  display: inline-flex;
  align-items: center;
}

.site-nav__dropdown-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  font: inherit;
  font-size: 0.75em;
  color: inherit;
  cursor: pointer;
  /* Touch-friendly target size even though the visible caret is small. */
  min-width: 2rem;
  min-height: 2rem;
  padding: 0.25rem;
}

.site-nav__dropdown-list {
  list-style: none;
  margin: 0;
  padding: 0 0 0 1rem;
  display: none;
}

.site-nav__dropdown-list.is-open {
  display: block;
}

.site-nav__dropdown-list a {
  text-decoration: none;
  display: inline-block;
  padding: 0.4rem 0.25rem;
}

.site-nav__list {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin: 0;
  padding: 0;
}

.site-nav__list a {
  text-decoration: none;
  /* touch-friendly target size */
  display: inline-block;
  padding: 0.5rem 0.25rem;
}

@media (max-width: 40rem) {
  .site-nav__toggle {
    display: inline-block;
    padding: 0.5rem 1rem;
  }
  .site-nav__list {
    flex-direction: column;
    display: none;
  }
  .site-nav__list.is-open {
    display: flex;
  }
}

@media (min-width: 40rem) {
  .site-nav__item--dropdown {
    position: relative;
  }

  .site-nav__dropdown-list.is-open {
    display: block;
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: 0.375rem;
    padding: 0.5rem 0;
    margin-top: 0.25rem;
    min-width: 16rem;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    z-index: 20;
  }

  .site-nav__dropdown-list a {
    display: block;
    padding: 0.5rem 1rem;
    white-space: normal;
  }
}

.not-published-banner {
  background: #fff3cd;
  color: #664d03;
  text-align: center;
  padding: 0.75rem;
  font-weight: bold;
}

.button {
  display: inline-block;
  background: var(--color-accent);
  color: #fff;
  text-decoration: none;
  padding: 0.75rem 1.5rem;
  border-radius: 0.25rem;
  border: none;
  font: inherit;
  font-weight: bold;
  cursor: pointer;
}

.tier-cards {
  display: grid;
  gap: var(--space);
  grid-template-columns: 1fr;
  margin: 2rem 0;
}

@media (min-width: 45rem) {
  .tier-cards {
    grid-template-columns: repeat(3, 1fr);
  }
}

.tier-card {
  border: 1px solid var(--color-border);
  border-radius: 0.5rem;
  padding: 1.5rem;
}

.tier-card__price {
  font-size: 1.5rem;
  font-weight: bold;
}

/* Mobile-first: a lighter list (bold name, description, thin divider) up
   to the tablet breakpoint below, where it becomes the bordered-card grid
   used on Services and Testimonials alike (auto-fill flexes 3 -> 2 -> 1
   columns as the viewport narrows; an uneven last row is fine). */
.service-cards {
  margin: 2rem 0;
}

.service-card {
  border-bottom: 1px solid var(--color-border);
  padding: 1rem 0;
}

.service-card:first-child {
  padding-top: 0;
}

.service-card:last-child {
  border-bottom: none;
}

.service-card h2 {
  margin: 0 0 0.25rem;
  font-size: 1rem;
  font-weight: bold;
}

.service-card p {
  margin: 0;
}

@media (min-width: 40rem) {
  /* Flex, not grid: grid leaves a short last row left-aligned with a gap
     on the right (auto-fill keeps that row's unused tracks in place).
     Flex-wrap treats each wrapped line as its own flex line, so
     justify-content: center centers a short last row instead. max-width
     stops cards from stretching to fill that extra space themselves. */
  .service-cards {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: var(--space);
  }

  .service-card {
    flex: 1 1 280px;
    max-width: 340px;
    border: 1px solid var(--color-border);
    border-radius: 0.5rem;
    padding: 1.5rem;
  }

  .service-card:first-child {
    padding-top: 1.5rem;
  }

  .service-card:last-child {
    border-bottom: 1px solid var(--color-border);
  }

  .service-card h2 {
    font-size: 1.15rem;
    font-weight: 600;
  }
}

.cta-block {
  margin: 2rem 0;
}

.testimonial-cards {
  display: grid;
  gap: var(--space);
  grid-template-columns: 1fr;
  margin: 2rem 0;
}

@media (min-width: 40rem) {
  .testimonial-cards {
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  }
}

.testimonial-card {
  border: 1px solid var(--color-border);
  border-radius: 0.5rem;
  padding: 1.5rem;
}

.testimonial-card__quote {
  margin: 0 0 1rem 0;
}

/* Video testimonial placeholder card: no real embed yet, just the visual
   slot (thumbnail + play icon) styled consistently with text cards. */
.testimonial-card--video {
  padding: 0;
  overflow: hidden;
}

.testimonial-card__video-thumb {
  aspect-ratio: 16 / 9;
  background: #e5e5e5;
  display: flex;
  align-items: center;
  justify-content: center;
}

.testimonial-card__play-icon {
  width: 3.5rem;
  height: 3.5rem;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.6);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
}

.testimonial-card--video .testimonial-card__attribution {
  padding: 1rem 1.5rem 1.5rem;
}

.testimonial-card__attribution {
  margin: 0;
  font-weight: bold;
  color: #555;
}

.site-footer {
  border-top: 1px solid var(--color-border);
  font-size: 0.9rem;
  color: #555;
}

.site-footer__legal-link {
  color: inherit;
  text-decoration: underline;
}

/* About page intro: text and photo side by side on wider screens,
   stacked (text first) on mobile. */
.about-intro {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  align-items: center;
  margin-bottom: 1.5rem;
}

@media (min-width: 40rem) {
  .about-intro {
    /* Photo column at 30% instead of 40% - 25% smaller. */
    grid-template-columns: 7fr 3fr;
    gap: 2rem;
  }
}

.about-intro__photo img {
  display: block;
  width: 100%;
  border-radius: 0.5rem;
}

.about-intro__photo-placeholder {
  aspect-ratio: 4 / 5;
  background: #e5e5e5;
  border-radius: 0.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  padding: 1rem;
  color: #777;
  font-size: 0.9rem;
  text-align: center;
}

.about-intro__photo-illustration {
  width: 55%;
  max-width: 6.75rem; /* 25% smaller than the original 9rem */
}

.about-intro__photo-caption {
  margin: 0;
}

/* Respect users who've asked for reduced motion */
@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    transition: none !important;
  }
}

/* Dark-mode hook: [data-dark="true"] on <html> (set by base.njk from
   .eleventy.js's isDarkVariant) also switches the logo file in
   partials/header.njk. Placeholder illustrations assume a light card, so
   they stay on a lighter surface than a dark page background. */
[data-dark="true"] {
  color-scheme: dark;
}
[data-dark="true"] .about-intro__photo-placeholder,
[data-dark="true"] .testimonial-card__video-thumb {
  background: #2a2e33;
  color: #1a1a1a;
}
