/* Treasure Valley North — marketing site layout.
   Everything here is layout/composition only; all colors, type, spacing,
   radius, shadow and motion values come from the design system tokens.
   Load order: design-system/styles.css (tokens) -> design-system/components.css
   (component classes) -> this file. */

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--surface-page);
  font-family: var(--font-sans);
  color: var(--text-body);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img { max-width: 100%; }

a { color: var(--text-link); transition: color var(--duration-base) var(--ease-out); }
a:hover { color: var(--text-link-hover); }

:focus-visible { outline: none; box-shadow: var(--shadow-focus); border-radius: var(--radius-xs); }

/* ---------- Layout primitives ---------- */
.container { max-width: var(--container-lg); margin-inline: auto; padding-inline: var(--gutter); }
.container--md { max-width: var(--container-md); }
.container--sm { max-width: var(--container-sm); }

.section { padding-block: var(--space-20); }
.section--page    { background: var(--surface-page); }
.section--raised  { background: var(--surface-raised); }
.section--card    { background: var(--surface-card); }
.section--pine    { background: var(--surface-inverse); }

.grid { display: grid; gap: var(--space-5); }
.grid--services { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.grid--work     { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: var(--space-8); }
.grid--stats    { grid-template-columns: repeat(3, 1fr); gap: var(--space-6); text-align: center; }
@media (max-width: 700px) { .grid--stats { grid-template-columns: 1fr; gap: var(--space-8); } }

.stack-lg { margin-top: var(--space-12); }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--sand-300) 95%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border-subtle);
}
.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  padding-block: var(--space-3);
}
.site-header__logo { height: 3rem; width: auto; display: block; }
@media (min-width: 640px) {
  .site-header__inner { padding-block: var(--space-4); }
  .site-header__logo { height: 4rem; }
}

/* ---------- Hero ---------- */
.hero { position: relative; overflow: hidden; }
.hero__bg { position: absolute; inset: 0; z-index: 0; }
.hero__bg img { width: 100%; height: 100%; object-fit: cover; display: block; }
.hero__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    color-mix(in srgb, var(--sand-300) 86%, transparent),
    color-mix(in srgb, var(--sand-300) 74%, transparent) 45%,
    color-mix(in srgb, var(--sand-100) 92%, transparent)
  );
}
.hero__content {
  position: relative;
  z-index: 1;
  text-align: center;
  padding-block: var(--space-24);
}
.hero__title {
  font-family: var(--font-display);
  font-weight: var(--weight-display);
  font-size: var(--text-4xl);
  line-height: var(--leading-tight);
  letter-spacing: var(--tracking-tight);
  color: var(--pine-800);
  margin: 0;
}
.hero__sub {
  font-size: var(--text-md);
  line-height: var(--leading-relaxed);
  color: var(--pine-700);
  max-width: 54ch;
  margin: var(--space-5) auto 0;
}
@media (min-width: 640px) { .hero__title { font-size: var(--text-5xl); } }

/* ---------- Section headings (DS .tvn-heading composition) ---------- */
.section__head { margin-bottom: var(--space-12); }

/* ---------- Services ---------- */
.service-card { display: flex; flex-direction: column; }

/* ---------- Portfolio ---------- */
.work-card { display: flex; flex-direction: column; }

/* ---------- Contact ---------- */
.contact-form { display: flex; flex-direction: column; gap: var(--space-5); }
.contact-form__status { font-size: var(--text-sm); text-align: center; color: var(--danger); margin: 0; }
.contact-form__status[hidden] { display: none; }
.contact-alt { text-align: center; margin-top: var(--space-8); font-size: var(--text-sm); color: var(--text-on-pine); }
.contact-alt a { color: var(--sand-50); font-weight: var(--weight-semibold); text-decoration: underline; }
.contact-alt a:hover { color: var(--white); }

/* ---------- Thank-you page ---------- */
.ty-page { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: var(--space-4); }
.ty-wrap { max-width: var(--container-sm); width: 100%; }
.ty-logo { height: 4rem; width: auto; display: block; margin: 0 auto var(--space-8); }
.ty-card { text-align: center; }
.ty-check { width: 5rem; height: 5rem; display: block; margin: 0 auto var(--space-8); color: var(--pine-700); }
.ty-title {
  font-family: var(--font-display);
  font-weight: var(--weight-display);
  font-size: var(--text-3xl);
  letter-spacing: var(--tracking-tight);
  line-height: var(--leading-snug);
  color: var(--text-strong);
  margin: 0 0 var(--space-4);
}
.ty-lead { font-size: var(--text-md); line-height: var(--leading-relaxed); color: var(--text-body); margin: 0 0 var(--space-6); }
.ty-body { font-size: var(--text-base); line-height: var(--leading-relaxed); color: var(--text-muted); margin: 0 0 var(--space-8); }
.ty-next {
  background: var(--sand-100);
  border: 1.5px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: var(--space-6);
  margin-bottom: var(--space-8);
}
.ty-next__title {
  font-family: var(--font-display);
  font-weight: var(--weight-bold);
  font-size: var(--text-base);
  letter-spacing: var(--tracking-tight);
  color: var(--text-strong);
  margin: 0 0 var(--space-3);
}
.ty-next__list {
  list-style: none;
  margin: 0 auto;
  padding: 0;
  max-width: 28rem;
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  font-size: var(--text-sm);
  color: var(--text-muted);
}
.ty-next__list li { display: flex; align-items: flex-start; gap: var(--space-2); }
.ty-next__list svg { flex: 0 0 auto; margin-top: 2px; color: var(--sunburst-600); }
.ty-contact { font-size: var(--text-sm); color: var(--text-muted); margin-bottom: var(--space-8); }
.ty-contact p { margin: 0 0 var(--space-1); }
.ty-contact a { color: var(--text-strong); font-weight: var(--weight-semibold); text-decoration: none; }
.ty-contact a:hover { text-decoration: underline; }
.ty-footer { text-align: center; margin-top: var(--space-8); font-size: var(--text-sm); color: var(--text-muted); }
.ty-footer p { margin: 0; }

/* Checkmark animation */
@keyframes draw-circle { 0% { stroke-dashoffset: 157; } 100% { stroke-dashoffset: 0; } }
@keyframes checkmark   { 0% { stroke-dashoffset: 100; } 100% { stroke-dashoffset: 0; } }
.checkmark-circle { animation: draw-circle 0.8s ease-in-out; }
@media (prefers-reduced-motion: reduce) {
  .checkmark-circle, .checkmark-check { animation: none !important; stroke-dashoffset: 0 !important; }
}

/* ---------- Footer ---------- */
.site-footer { background: var(--surface-inverse); color: var(--text-on-pine); padding-block: var(--space-12); }
.site-footer__grid { display: grid; gap: var(--space-8); margin-bottom: var(--space-8); }
@media (min-width: 768px) { .site-footer__grid { grid-template-columns: 1fr 1fr; } }
.site-footer__logo { height: 4rem; width: auto; display: block; margin-bottom: var(--space-4); }
.site-footer__tagline { font-size: var(--text-sm); color: color-mix(in srgb, var(--sand-300) 70%, transparent); margin: 0; max-width: 40ch; }
.site-footer__title {
  font-family: var(--font-display);
  font-weight: var(--weight-bold);
  font-size: var(--text-base);
  letter-spacing: var(--tracking-tight);
  color: var(--text-on-pine-strong);
  margin: 0 0 var(--space-4);
}
.site-footer__list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--space-2); font-size: var(--text-sm); }
.site-footer__list li { display: flex; align-items: center; gap: var(--space-2); }
.site-footer__list svg { flex: 0 0 auto; color: var(--sunburst-400); }
.site-footer__list a { color: var(--text-on-pine); text-decoration: none; }
.site-footer__list a:hover { color: var(--sand-50); }
.site-footer__bottom {
  border-top: 1px solid var(--border-on-pine);
  padding-top: var(--space-8);
  text-align: center;
  font-size: var(--text-sm);
  color: color-mix(in srgb, var(--sand-300) 70%, transparent);
}
.site-footer__bottom p { margin: 0; }
