/* DNF Painting — design tokens & components */

:root {
  /* Type scale */
  --text-xs: clamp(0.75rem, 0.7rem + 0.25vw, 0.875rem);
  --text-sm: clamp(0.875rem, 0.8rem + 0.35vw, 1rem);
  --text-base: clamp(1rem, 0.95rem + 0.25vw, 1.125rem);
  --text-lg: clamp(1.125rem, 1rem + 0.75vw, 1.5rem);
  --text-xl: clamp(1.5rem, 1.2rem + 1.25vw, 2.25rem);
  --text-2xl: clamp(2rem, 1.2rem + 2.5vw, 3.5rem);
  --text-3xl: clamp(2.5rem, 1rem + 4vw, 5rem);

  /* Spacing */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;
  --space-24: 6rem;

  /* Palette — warm painterly neutrals, colonial blue, terracotta accent */
  --color-bg: #faf8f2;
  --color-surface: #ffffff;
  --color-surface-2: #fdfcf9;
  --color-surface-offset: #f1ede2;
  --color-surface-offset-2: #e9e3d4;
  --color-divider: #e2ddcf;
  --color-border: #d8d2c2;
  --color-text: #21252c;
  --color-text-muted: #5b6270;
  --color-text-faint: #9aa0aa;
  --color-text-inverse: #faf8f2;

  --color-primary: #1c4e6e;
  --color-primary-hover: #143a52;
  --color-primary-highlight: #dde8ee;

  --color-accent: #c96f2d;
  --color-accent-hover: #a8561e;
  --color-accent-highlight: #f4e4d5;

  /* Radius / shadows / transitions */
  --radius-sm: 0.375rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;
  --radius-full: 9999px;
  --shadow-sm: 0 1px 2px oklch(0.25 0.02 75 / 0.06);
  --shadow-md: 0 4px 12px oklch(0.25 0.02 75 / 0.08);
  --shadow-lg: 0 12px 32px oklch(0.25 0.02 75 / 0.12);
  --transition-interactive: 180ms cubic-bezier(0.16, 1, 0.3, 1);

  /* Fonts */
  --font-display: 'Cabinet Grotesk', 'Avenir Next', 'Segoe UI', sans-serif;
  --font-body: 'General Sans', 'Segoe UI', 'Helvetica Neue', sans-serif;

  /* Content widths */
  --content-narrow: 640px;
  --content-default: 1080px;
  --content-wide: 1240px;
}

/* ---------- Layout helpers ---------- */

.container {
  max-width: var(--content-default);
  margin-inline: auto;
  padding-inline: var(--space-6);
}

.container--wide {
  max-width: var(--content-wide);
}

.section {
  padding-block: clamp(var(--space-12), 7vw, var(--space-24));
}

.section--tight {
  padding-block: clamp(var(--space-8), 5vw, var(--space-16));
}

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

.prose {
  max-width: 68ch;
}

/* ---------- Header ---------- */

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--color-primary);
  color: var(--color-text-inverse);
  padding: var(--space-3) var(--space-5);
  border-radius: 0 0 var(--radius-md) 0;
  z-index: 100;
}

.skip-link:focus {
  left: 0;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: oklch(from var(--color-bg) l c h / 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--color-divider);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  min-height: 68px;
}

.brand {
  display: flex;
  align-items: baseline;
  gap: var(--space-2);
  text-decoration: none;
  color: var(--color-text);
}

.brand__mark {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: var(--text-lg);
  letter-spacing: -0.01em;
  color: var(--color-primary);
}

.brand__mark span {
  color: var(--color-accent);
}

.brand__name {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-text-muted);
  letter-spacing: 0.04em;
}

.site-nav {
  display: none;
  align-items: center;
  gap: var(--space-6);
}

.site-nav a {
  text-decoration: none;
  color: var(--color-text-muted);
  font-size: var(--text-sm);
  font-weight: 500;
}

.site-nav a:hover {
  color: var(--color-primary);
}

.site-nav a[aria-current='page'] {
  color: var(--color-primary);
  font-weight: 700;
}

.header-cta {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
}

@media (min-width: 860px) {
  .site-nav {
    display: flex;
  }
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  min-height: 48px;
  padding: var(--space-3) var(--space-6);
  border-radius: var(--radius-md);
  font-size: var(--text-sm);
  font-weight: 700;
  text-decoration: none;
  line-height: 1.2;
}

.btn--primary {
  background: var(--color-primary);
  color: var(--color-text-inverse);
  box-shadow: var(--shadow-sm);
}

.btn--primary:hover {
  background: var(--color-primary-hover);
  box-shadow: var(--shadow-md);
}

.btn--accent {
  background: var(--color-accent);
  color: #fff;
}

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

.btn--ghost {
  border: 1px solid var(--color-border);
  color: var(--color-text);
  background: var(--color-surface);
}

.btn--ghost:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
}

.btn--light {
  background: var(--color-surface);
  color: var(--color-primary);
}

.btn--light:hover {
  box-shadow: var(--shadow-md);
}

.btn--sm {
  min-height: 40px;
  padding: var(--space-2) var(--space-4);
}

/* ---------- Hero ---------- */

.hero {
  padding-block: clamp(var(--space-10), 6vw, var(--space-20)) clamp(var(--space-12), 5vw, var(--space-16));
}

.hero__grid {
  display: grid;
  gap: var(--space-10);
  align-items: center;
}

@media (min-width: 960px) {
  .hero__grid {
    grid-template-columns: 1.05fr 1fr;
    gap: var(--space-12);
  }
}

.hero__kicker {
  font-size: var(--text-sm);
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-accent);
  margin-bottom: var(--space-4);
}

.hero h1 {
  font-family: var(--font-display);
  font-size: var(--text-3xl);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: var(--space-5);
}

.hero__sub {
  font-size: var(--text-lg);
  color: var(--color-text-muted);
  margin-bottom: var(--space-8);
  max-width: 34ch;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-4);
  margin-bottom: var(--space-8);
}

.hero__media {
  position: relative;
}

.hero__media img {
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  aspect-ratio: 16 / 11;
  object-fit: cover;
  width: 100%;
}

/* Paint swatch motif overlapping hero image */
.swatches {
  position: absolute;
  bottom: 0;
  left: var(--space-6);
  display: flex;
  gap: 0;
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  border: 4px solid var(--color-surface);
}

.swatches span {
  width: clamp(44px, 7vw, 84px);
  height: clamp(40px, 5vw, 60px);
}

.hero__note {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2) var(--space-5);
}

.hero__note strong {
  color: var(--color-text);
}

/* ---------- Trust strip ---------- */

.trust {
  border-block: 1px solid var(--color-divider);
  background: var(--color-surface);
}

.trust__inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-4) var(--space-10);
  padding-block: var(--space-5);
}

.trust__item {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-text-muted);
}

.trust__item svg {
  color: var(--color-accent);
  flex: none;
}

/* ---------- Section headings ---------- */

.section__kicker {
  font-size: var(--text-sm);
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-accent);
  margin-bottom: var(--space-3);
}

.section__title {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 800;
  letter-spacing: -0.01em;
  margin-bottom: var(--space-5);
}

.section__lead {
  font-size: var(--text-lg);
  color: var(--color-text-muted);
  margin-bottom: var(--space-10);
  max-width: 56ch;
}

/* ---------- Services (editorial rows, not card grid) ---------- */

.service-row {
  display: grid;
  gap: var(--space-5);
  padding-block: var(--space-8);
  border-bottom: 1px solid var(--color-divider);
}

.service-row:first-of-type {
  border-top: 1px solid var(--color-divider);
}

@media (min-width: 860px) {
  .service-row {
    grid-template-columns: 64px 1fr 260px;
    gap: var(--space-8);
    align-items: start;
  }
}

.service-row__index {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 800;
  color: var(--color-surface-offset-2);
  -webkit-text-stroke: 1px var(--color-border);
}

.service-row h3 {
  font-size: var(--text-lg);
  font-weight: 700;
  margin-bottom: var(--space-2);
}

.service-row p {
  color: var(--color-text-muted);
}

.service-row__aside {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-primary);
  padding-top: var(--space-1);
}

@media (max-width: 859px) {
  .service-row__aside {
    order: -1;
  }
}

/* ---------- Split feature (image + text) ---------- */

.feature {
  display: grid;
  gap: var(--space-8);
  align-items: center;
}

@media (min-width: 960px) {
  .feature {
    grid-template-columns: 1fr 1fr;
    gap: var(--space-16);
  }
  .feature--flip .feature__media {
    order: 2;
  }
}

.feature__media img {
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  aspect-ratio: 4 / 3;
  object-fit: cover;
  width: 100%;
}

.feature__content h2 {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 800;
  margin-bottom: var(--space-4);
}

.feature__content p {
  color: var(--color-text-muted);
  margin-bottom: var(--space-4);
}

.checklist {
  margin-top: var(--space-6);
  display: grid;
  gap: var(--space-3);
}

.checklist li {
  display: flex;
  gap: var(--space-3);
  align-items: flex-start;
  font-weight: 500;
}

.checklist svg {
  color: var(--color-primary);
  flex: none;
  margin-top: 3px;
}

/* ---------- Towns ---------- */

.towns-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(160px, 100%), 1fr));
  gap: var(--space-3);
  margin-top: var(--space-8);
}

.town-chip {
  display: block;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: var(--space-3) var(--space-4);
  text-align: center;
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-text);
  text-decoration: none;
}

.town-chip:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
}

.town-chip--all {
  background: var(--color-primary-highlight);
  border-color: transparent;
  color: var(--color-primary);
}

/* ---------- Reviews ---------- */

.reviews-grid {
  display: grid;
  gap: var(--space-6);
  margin-top: var(--space-8);
}

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

.review {
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.review__stars {
  color: #d19900;
  letter-spacing: 2px;
  font-size: var(--text-sm);
}

.review blockquote {
  font-size: var(--text-base);
  line-height: 1.6;
  flex: 1;
}

.review__meta {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
}

.review__meta strong {
  color: var(--color-text);
}

/* ---------- Offer banner ---------- */

.offer {
  background: var(--color-primary);
  color: var(--color-text-inverse);
}

.offer__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-6);
  padding-block: var(--space-10);
}

.offer__text h2 {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 800;
  margin-bottom: var(--space-2);
}

.offer__text p {
  color: oklch(from var(--color-text-inverse) l c h / 0.85);
  max-width: 52ch;
}

.offer__badge {
  font-size: var(--text-sm);
  font-weight: 700;
  background: var(--color-accent);
  color: #fff;
  border-radius: var(--radius-full);
  padding: var(--space-2) var(--space-4);
  display: inline-block;
  margin-bottom: var(--space-4);
}

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

.contact-grid {
  display: grid;
  gap: var(--space-10);
}

@media (min-width: 900px) {
  .contact-grid {
    grid-template-columns: 1fr 1fr;
    gap: var(--space-16);
  }
}

.contact-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  display: grid;
  gap: var(--space-4);
  align-content: start;
}

.contact-card h3 {
  font-size: var(--text-lg);
  font-weight: 700;
}

.contact-line {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  font-size: var(--text-base);
  font-weight: 600;
  text-decoration: none;
  color: var(--color-text);
}

.contact-line svg {
  color: var(--color-accent);
  flex: none;
}

.contact-line:hover {
  color: var(--color-primary);
}

.contact-note {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
}

/* ---------- Footer ---------- */

.site-footer {
  background: #17222e;
  color: #b9c2cc;
  margin-top: var(--space-16);
}

.site-footer__inner {
  display: grid;
  gap: var(--space-8);
  padding-block: var(--space-12);
}

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

.site-footer h3 {
  color: var(--color-text-inverse);
  font-size: var(--text-sm);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: var(--space-4);
}

.site-footer a {
  color: #b9c2cc;
  text-decoration: none;
  font-size: var(--text-sm);
}

.site-footer a:hover {
  color: #fff;
}

.footer-links {
  display: grid;
  gap: var(--space-2);
}

.footer-brand {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: var(--text-lg);
  color: var(--color-text-inverse);
}

.footer-brand span {
  color: var(--color-accent);
}

.footer-meta {
  margin-top: var(--space-6);
  font-size: var(--text-xs);
  color: #7d8894;
  max-width: 48ch;
}

.footer-bottom {
  border-top: 1px solid #2a3846;
  padding-block: var(--space-4);
  font-size: var(--text-xs);
  color: #7d8894;
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2) var(--space-6);
  justify-content: space-between;
}

/* ---------- Town page (interior) ---------- */

.page-hero {
  padding-block: clamp(var(--space-10), 5vw, var(--space-16));
}

.page-hero h1 {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: var(--space-4);
  max-width: 22ch;
}

.page-hero__lead {
  font-size: var(--text-lg);
  color: var(--color-text-muted);
  max-width: 58ch;
}

.town-sections {
  display: grid;
  gap: var(--space-8);
  margin-top: var(--space-8);
}

.town-sections h2 {
  font-size: var(--text-lg);
  font-weight: 700;
  margin-bottom: var(--space-3);
}

.town-sections p {
  color: var(--color-text-muted);
}

.town-sections ul {
  display: grid;
  gap: var(--space-2);
  margin-top: var(--space-3);
}

.town-sections ul li {
  color: var(--color-text-muted);
  display: flex;
  gap: var(--space-2);
}

.town-sections ul li::before {
  content: '—';
  color: var(--color-accent);
}

.other-towns {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2) var(--space-4);
  font-size: var(--text-sm);
}

.other-towns a {
  color: var(--color-primary);
  font-weight: 600;
  text-decoration: none;
}

.other-towns a:hover {
  text-decoration: underline;
}

/* ---------- Spanish page ---------- */

[lang='es'] .hero__kicker,
[lang='es'] .section__kicker {
  text-transform: none;
  letter-spacing: 0.02em;
}

/* ---------- Mobile CTA bar ---------- */

.mobile-cta {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 60;
  display: flex;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-3) calc(var(--space-2) + env(safe-area-inset-bottom));
  background: oklch(from var(--color-bg) l c h / 0.95);
  backdrop-filter: blur(12px);
  border-top: 1px solid var(--color-divider);
}

.mobile-cta .btn {
  flex: 1;
  white-space: nowrap;
}

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

/* Add bottom padding on mobile so content isn't hidden behind CTA bar */
@media (max-width: 859px) {
  body {
    padding-bottom: 72px;
  }
}

/* ---------- Recent work gallery ---------- */

.work-story__title {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 700;
  margin: var(--space-10) 0 var(--space-3);
}

.work-story__text {
  font-size: var(--text-base);
  color: var(--color-text-muted);
  margin-bottom: var(--space-5);
  max-width: 62ch;
}

.work-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-5);
}

.work-grid--wide {
  grid-template-columns: 1fr 1fr;
  margin-top: var(--space-5);
}

.work-photo {
  margin: 0;
}

.work-photo img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border-radius: var(--radius-md, 12px);
  background: var(--color-divider);
}

.work-grid--wide .work-photo img {
  aspect-ratio: 16 / 10;
}

.work-photo figcaption {
  margin-top: var(--space-3);
  font-size: var(--text-sm);
  color: var(--color-text-muted);
}

.work-photo figcaption span {
  display: inline-block;
  margin-right: var(--space-2);
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-accent, #c96f2d);
}

.work-grid--landscape img {
  aspect-ratio: 4 / 3;
}

.work-grid--portrait {
  grid-template-columns: 1fr 1fr;
  margin-top: var(--space-5);
}

.work-videos {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--space-5);
  margin-top: var(--space-8);
}

.work-video {
  margin: 0;
}

.work-video video {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: var(--radius-md, 12px);
  background: var(--color-divider);
}

.work-video figcaption {
  margin-top: var(--space-3);
  font-size: var(--text-sm);
  color: var(--color-text-muted);
}

@media (max-width: 719px) {
  .work-grid,
  .work-grid--wide,
  .work-grid--portrait,
  .work-videos {
    grid-template-columns: 1fr;
  }
}
