@layer reset, base, components, responsive;

@layer reset {
  *, *::before, *::after { box-sizing: border-box; }
  html { scroll-behavior: smooth; }
  body { margin: 0; }
  img, svg { display: block; max-width: 100%; }
  button, input, select, textarea { font: inherit; }
  a { color: inherit; }
}

@layer base {
  :root {
    --ink: #172d31;
    --ink-soft: #284247;
    --paper: #f3eddf;
    --paper-light: #fbf8f0;
    --rust: #c45332;
    --rust-dark: #9f3d24;
    --yellow: #e7bd50;
    --sage: #9caf98;
    --line: rgba(23, 45, 49, .2);
    --display: "Archivo Black", sans-serif;
    --body: "DM Sans", sans-serif;
  }
  body { background: var(--paper); color: var(--ink); font-family: var(--body); font-size: 16px; line-height: 1.6; overflow-x: hidden; }
  h1, h2, h3, p { margin-top: 0; }
  h1, h2, h3 { line-height: .98; }
  h1, h2 { font-family: var(--display); letter-spacing: -.055em; text-transform: uppercase; }
  h1 { font-size: clamp(3.65rem, 7.4vw, 8.3rem); }
  h2 { font-size: clamp(2.7rem, 5.6vw, 6.2rem); }
  h3 { font-size: 1.65rem; }
  ::selection { background: var(--yellow); color: var(--ink); }
  :focus-visible { outline: 3px solid var(--yellow); outline-offset: 4px; }
  .skip-link { position: fixed; z-index: 100; left: 1rem; top: 1rem; transform: translateY(-180%); background: var(--yellow); color: var(--ink); padding: .65rem 1rem; font-weight: 700; text-decoration: none; transition: transform .2s; }
  .skip-link:focus { transform: translateY(0); }
  .sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
}

@layer components {
  .site-header { height: 86px; padding: 0 clamp(1.25rem, 4vw, 4.5rem); display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; border-bottom: 1px solid var(--line); background: rgba(243, 237, 223, .92); backdrop-filter: blur(16px); position: fixed; inset: 0 0 auto; z-index: 20; transition: height .25s, box-shadow .25s; }
  .site-header.scrolled { height: 70px; box-shadow: 0 10px 35px rgba(23,45,49,.08); }
  .brand { display: inline-flex; align-items: center; gap: .68rem; justify-self: start; text-decoration: none; line-height: 1; }
  .brand-mark { display: grid; place-items: center; width: 45px; height: 45px; color: var(--paper); background: var(--ink); transform: rotate(-3deg); }
  .brand-mark svg { width: 31px; fill: currentColor; }
  .brand-mark .brand-spark { fill: var(--yellow); }
  .brand strong { display: block; font: 1.3rem/1 var(--display); letter-spacing: -.06em; }
  .brand small { display: block; margin-top: .23rem; font-size: .61rem; font-weight: 700; letter-spacing: .21em; }
  .desktop-nav { display: flex; gap: 2.4rem; }
  .desktop-nav a, .site-footer nav a { font-size: .78rem; font-weight: 700; letter-spacing: .07em; text-decoration: none; text-transform: uppercase; position: relative; }
  .desktop-nav a::after, .site-footer nav a::after { content: ""; position: absolute; inset: auto 0 -.35rem; height: 2px; background: var(--rust); transform: scaleX(0); transform-origin: right; transition: transform .25s; }
  .desktop-nav a:hover::after, .site-footer nav a:hover::after { transform: scaleX(1); transform-origin: left; }
  .header-cta { justify-self: end; }
  .button { min-height: 56px; display: inline-flex; align-items: center; justify-content: center; gap: 1.2rem; background: var(--rust); color: white; border: 0; padding: .85rem 1.45rem; font-size: .79rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; text-decoration: none; box-shadow: 6px 6px 0 var(--ink); cursor: pointer; transition: transform .2s, box-shadow .2s, background .2s; }
  .button:hover { background: var(--rust-dark); transform: translate(3px, 3px); box-shadow: 3px 3px 0 var(--ink); }
  .button-small { min-height: 42px; box-shadow: 4px 4px 0 var(--ink); }
  .menu-toggle, .mobile-menu { display: none; }
  .hero { min-height: 780px; padding-top: 86px; display: grid; grid-template-columns: 53% 47%; border-bottom: 1px solid var(--line); }
  .hero-copy { display: flex; flex-direction: column; justify-content: center; padding: clamp(4rem, 7vw, 8rem) clamp(1.4rem, 4.5vw, 5.4rem); }
  .eyebrow { display: flex; align-items: center; gap: .7rem; margin-bottom: 1.5rem; font-size: .72rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; }
  .eyebrow span { width: 26px; height: 3px; background: var(--rust); }
  .hero h1 { max-width: 920px; margin-bottom: 1.7rem; }
  .hero h1 em { color: var(--rust); font-style: normal; }
  .hero-lede { max-width: 700px; margin-bottom: 2rem; color: var(--ink-soft); font-size: clamp(1rem, 1.35vw, 1.27rem); }
  .hero-actions { display: flex; align-items: center; gap: 2rem; }
  .text-link { font-size: .76rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; text-underline-offset: .32rem; }
  .trust-list { display: flex; gap: 1.5rem; margin: 3.5rem 0 0; padding: 1.3rem 0 0; border-top: 1px solid var(--line); list-style: none; }
  .trust-list li { display: flex; align-items: center; gap: .45rem; font-size: .75rem; font-weight: 700; }
  .trust-list svg { width: 18px; fill: none; stroke: var(--rust); stroke-width: 3; }
  .hero-visual { min-height: 720px; position: relative; isolation: isolate; overflow: hidden; background: var(--sage); border-left: 1px solid var(--ink); }
  .blueprint-grid { position: absolute; inset: 0; z-index: -2; opacity: .25; background-image: linear-gradient(var(--ink) 1px, transparent 1px), linear-gradient(90deg, var(--ink) 1px, transparent 1px); background-size: 40px 40px; }
  .blueprint-grid::after { content: ""; position: absolute; inset: 24px; border: 1px solid var(--ink); }
  .house-illustration { position: absolute; width: 93%; left: 3%; bottom: 3.5%; }
  .house-illustration * { vector-effect: non-scaling-stroke; }
  .house-illustration .sun { fill: var(--yellow); stroke: var(--ink); stroke-width: 3; }
  .house-illustration .roof { fill: var(--rust); stroke: var(--ink); stroke-width: 4; stroke-linejoin: round; }
  .house-illustration .house { fill: var(--paper); stroke: var(--ink); stroke-width: 4; }
  .house-illustration .door { fill: var(--ink); stroke: var(--ink); stroke-width: 3; }
  .house-illustration .window { fill: #a9c8c4; stroke: var(--ink); stroke-width: 3; }
  .house-illustration .window-line, .house-illustration .ground, .house-illustration .plant, .house-illustration .tool { fill: none; stroke: var(--ink); stroke-width: 4; stroke-linecap: round; stroke-linejoin: round; }
  .visual-note { position: absolute; margin: 0; font: .72rem/1.25 var(--body); font-weight: 800; letter-spacing: .12em; }
  .note-one { top: 8%; left: 7%; transform: rotate(-4deg); }
  .note-two { top: 19%; right: 7%; text-align: right; transform: rotate(3deg); }
  .project-tag { position: absolute; display: flex; align-items: center; gap: .65rem; left: 7%; right: 7%; bottom: 4%; padding: .75rem 1rem; color: var(--paper); background: var(--ink); font-size: .62rem; letter-spacing: .1em; }
  .project-tag span { color: var(--yellow); }
  .ticker { overflow: hidden; background: var(--yellow); border-bottom: 1px solid var(--ink); padding: .8rem 0; }
  .ticker-track { width: max-content; display: flex; align-items: center; gap: 1.6rem; animation: ticker 28s linear infinite; }
  .ticker span { font: 1rem var(--display); letter-spacing: -.025em; }
  .ticker i { color: var(--rust); font-style: normal; font-size: .75rem; }
  @keyframes ticker { to { transform: translateX(-50%); } }
  .section { padding: clamp(5.5rem, 10vw, 10rem) clamp(1.4rem, 5vw, 6rem); }
  .section-heading { display: grid; grid-template-columns: 1.35fr 1fr; gap: 1.5rem 5rem; align-items: end; margin-bottom: 5rem; }
  .section-heading .eyebrow { grid-column: 1 / -1; margin-bottom: 0; }
  .section-heading h2 { margin: 0; }
  .section-heading > p:last-child { max-width: 510px; color: var(--ink-soft); font-size: 1.08rem; }
  .service-grid { display: grid; grid-template-columns: 1.15fr .85fr .85fr; gap: 1rem; }
  .service-card { min-height: 360px; padding: 2rem; border: 1px solid var(--ink); position: relative; display: flex; flex-direction: column; transition: transform .25s, box-shadow .25s; }
  .service-card:hover { transform: translateY(-7px) rotate(-.35deg); box-shadow: 8px 9px 0 rgba(23,45,49,.15); }
  .service-card-large { grid-row: span 2; min-height: 735px; background: var(--paper-light); }
  .service-card-accent { background: var(--yellow); }
  .service-card-dark { background: var(--ink); color: var(--paper); }
  .service-card-wide { grid-column: 2 / -1; min-height: 310px; display: grid; grid-template-columns: 1fr auto; align-items: end; gap: 2rem; background: var(--rust); color: white; }
  .service-number { margin-left: auto; font: .75rem var(--body); font-weight: 800; }
  .service-icon { width: 92px; margin: auto 0 2.5rem; }
  .service-icon svg { fill: none; stroke: currentColor; stroke-width: 3; stroke-linecap: square; stroke-linejoin: bevel; }
  .service-card h3 { max-width: 390px; margin-bottom: 1rem; font-family: var(--display); text-transform: uppercase; letter-spacing: -.04em; }
  .service-card p { max-width: 550px; margin-bottom: 0; }
  .service-card ul { display: grid; gap: .4rem; margin: 1.5rem 0 0; padding: 1.2rem 0 0; border-top: 1px solid var(--line); list-style: none; font-size: .8rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; }
  .service-card ul li::before { content: "+"; color: var(--rust); margin-right: .7rem; }
  .circle-link { width: 72px; aspect-ratio: 1; display: grid; place-items: center; flex: 0 0 auto; border: 1px solid white; border-radius: 50%; color: white; text-decoration: none; font-size: 1.8rem; transition: background .2s, color .2s, transform .2s; }
  .circle-link:hover { background: white; color: var(--rust); transform: rotate(45deg); }
  .process-section { display: grid; grid-template-columns: .9fr 1.1fr; background: var(--ink); color: var(--paper); padding: clamp(5.5rem, 9vw, 9rem) clamp(1.4rem, 5vw, 6rem); }
  .process-intro { padding-right: clamp(2rem, 7vw, 8rem); }
  .process-intro h2 { margin-bottom: 2rem; font-size: clamp(2.8rem, 5vw, 5.8rem); }
  .process-intro > p:last-child { max-width: 540px; color: rgba(243,237,223,.7); }
  .eyebrow-light span { background: var(--yellow); }
  .process-list { margin: 0; padding: 0; list-style: none; border-top: 1px solid rgba(243,237,223,.2); }
  .process-list li { display: grid; grid-template-columns: 80px 1fr; gap: 1rem; padding: 2.3rem 0; border-bottom: 1px solid rgba(243,237,223,.2); }
  .process-list li > span { color: var(--yellow); font-size: .72rem; font-weight: 800; }
  .process-list h3 { margin: 0 0 .7rem; font-family: var(--display); text-transform: uppercase; letter-spacing: -.035em; }
  .process-list p { margin: 0; color: rgba(243,237,223,.68); }
  .area-section { display: grid; grid-template-columns: 1fr 1fr; align-items: center; gap: clamp(3rem, 8vw, 9rem); }
  .area-map { min-height: 520px; position: relative; display: grid; place-items: center; background-color: var(--paper-light); background-image: radial-gradient(var(--line) 1px, transparent 1px); background-size: 15px 15px; border: 1px solid var(--ink); }
  .area-map svg { width: 87%; overflow: visible; }
  .area-map path:first-child { fill: var(--sage); stroke: var(--ink); stroke-width: 3; }
  .area-map circle { fill: none; stroke: var(--rust); stroke-width: 3; }
  .area-map circle:first-of-type { fill: var(--rust); }
  .area-map path:last-child { fill: none; stroke: var(--ink); stroke-width: 1.5; stroke-dasharray: 4 6; }
  .map-label { position: absolute; background: var(--ink); color: var(--paper); padding: .35rem .6rem; font-size: .57rem; font-weight: 800; letter-spacing: .1em; }
  .label-dallas { top: 43%; right: 14%; }.label-fort-worth { top: 57%; left: 9%; }.label-denton { top: 10%; left: 43%; }.label-arlington { bottom: 11%; left: 53%; }
  .area-copy h2 { margin-bottom: 1.7rem; }
  .area-copy > p:not(.eyebrow) { max-width: 580px; font-size: 1.08rem; color: var(--ink-soft); }
  .area-cities { display: flex; flex-wrap: wrap; gap: .55rem; margin-top: 2rem; }
  .area-cities span { border: 1px solid var(--ink); padding: .45rem .75rem; font-size: .67rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
  .quote-section { display: grid; grid-template-columns: .85fr 1.15fr; gap: clamp(3rem, 8vw, 9rem); padding: clamp(5.5rem, 9vw, 9rem) clamp(1.4rem, 5vw, 6rem); background: var(--rust); color: white; }
  .quote-copy { align-self: start; position: sticky; top: 110px; }
  .quote-copy h2 { margin-bottom: 1.7rem; }
  .quote-copy > p:not(.eyebrow) { max-width: 520px; color: rgba(255,255,255,.82); font-size: 1.08rem; }
  .quote-aside { display: flex; align-items: center; gap: 1.1rem; max-width: 420px; margin-top: 3rem; padding-top: 1.5rem; border-top: 1px solid rgba(255,255,255,.35); font-size: .82rem; }
  .quote-aside svg { width: 44px; flex: 0 0 auto; fill: none; stroke: var(--yellow); stroke-width: 2; }
  .quote-aside strong { display: block; text-transform: uppercase; letter-spacing: .08em; }
  .quote-form { background: var(--paper-light); color: var(--ink); padding: clamp(1.5rem, 4vw, 3.5rem); box-shadow: 12px 12px 0 var(--ink); }
  .field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
  .quote-form label { display: grid; gap: .42rem; margin-bottom: 1rem; font-size: .68rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
  .quote-form input, .quote-form select, .quote-form textarea { width: 100%; border: 1px solid var(--ink); border-radius: 0; background: transparent; color: var(--ink); padding: .9rem 1rem; outline: none; transition: background .2s, box-shadow .2s; }
  .quote-form input:focus, .quote-form select:focus, .quote-form textarea:focus { background: white; box-shadow: 4px 4px 0 var(--yellow); }
  .quote-form textarea { resize: vertical; min-height: 130px; }
  .hidden-field { display: none; }
  .quote-form .consent { display: flex; align-items: flex-start; gap: .65rem; text-transform: none; letter-spacing: 0; font-size: .77rem; font-weight: 600; }
  .consent input { width: 17px; height: 17px; padding: 0; accent-color: var(--rust); flex: 0 0 auto; }
  .form-button { width: 100%; margin-top: .7rem; }
  .form-note { margin: 1rem 0 0; text-align: center; color: var(--ink-soft); font-size: .7rem; }
  .site-footer { padding: 4.5rem clamp(1.4rem, 5vw, 6rem) 1.5rem; background: var(--paper); }
  .brand-footer { margin-bottom: 1.6rem; }
  .site-footer > p { max-width: 430px; color: var(--ink-soft); }
  .site-footer > nav { display: flex; justify-content: flex-end; gap: 2rem; margin-top: -3rem; }
  .footer-bottom { display: flex; justify-content: space-between; margin-top: 4rem; padding-top: 1.3rem; border-top: 1px solid var(--line); font-size: .7rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
  .footer-bottom a { text-underline-offset: .25rem; }
  .reveal { opacity: 0; transform: translateY(28px); transition: opacity .7s ease, transform .7s ease; }
  .reveal.visible { opacity: 1; transform: translateY(0); }
  .thanks-page { min-height: 100vh; display: grid; place-items: center; padding: 2rem; background-color: var(--sage); background-image: linear-gradient(rgba(23,45,49,.13) 1px, transparent 1px), linear-gradient(90deg, rgba(23,45,49,.13) 1px, transparent 1px); background-size: 42px 42px; }
  .thanks-card { max-width: 760px; padding: clamp(2rem, 7vw, 5rem); border: 1px solid var(--ink); background: var(--paper-light); box-shadow: 12px 12px 0 var(--ink); text-align: center; }
  .thanks-card .brand { justify-content: center; margin-bottom: 3rem; }
  .thanks-card h1 { margin-bottom: 1.4rem; font-size: clamp(3rem, 8vw, 6rem); }
  .thanks-card p { max-width: 540px; margin: 0 auto 2rem; font-size: 1.08rem; color: var(--ink-soft); }
}

@layer responsive {
  @media (max-width: 1020px) {
    .desktop-nav, .header-cta { display: none; }
    .site-header { grid-template-columns: 1fr auto; }
    .menu-toggle { display: grid; gap: 5px; width: 45px; height: 45px; place-content: center; border: 1px solid var(--ink); background: transparent; }
    .menu-toggle span:not(.sr-only) { width: 20px; height: 2px; background: var(--ink); transition: transform .2s, opacity .2s; }
    .menu-toggle[aria-expanded="true"] span:first-child { transform: translateY(7px) rotate(45deg); }
    .menu-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
    .menu-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
    .mobile-menu { display: flex; position: absolute; inset: 100% 0 auto; flex-direction: column; padding: 1rem 1.4rem 1.4rem; background: var(--paper); border-bottom: 1px solid var(--ink); transform: translateY(-130%); opacity: 0; pointer-events: none; transition: transform .3s, opacity .3s; z-index: -1; }
    .mobile-menu.open { transform: translateY(0); opacity: 1; pointer-events: auto; }
    .mobile-menu a { padding: .85rem 0; border-bottom: 1px solid var(--line); font-family: var(--display); text-decoration: none; text-transform: uppercase; }
    .hero { grid-template-columns: 1fr; }
    .hero-visual { min-height: 680px; border: 1px solid var(--ink); border-width: 1px 0; }
    .section-heading { grid-template-columns: 1fr; }
    .service-grid { grid-template-columns: 1fr 1fr; }
    .service-card-large { min-height: 600px; }
    .service-card-wide { grid-column: 1 / -1; }
    .process-section, .area-section, .quote-section { grid-template-columns: 1fr; }
    .process-intro { padding: 0 0 3rem; }
    .area-map { order: 2; }
    .quote-copy { position: static; }
  }
  @media (max-width: 680px) {
    h1 { font-size: clamp(3.25rem, 16vw, 5rem); }
    h2 { font-size: clamp(2.7rem, 13vw, 4.2rem); }
    .site-header { height: 72px; padding-inline: 1rem; }
    .brand-mark { width: 39px; height: 39px; }
    .brand strong { font-size: 1.1rem; }
    .hero { padding-top: 72px; }
    .hero-copy { padding: 4.5rem 1.2rem 3.5rem; }
    .hero-actions { align-items: stretch; flex-direction: column; gap: 1.5rem; }
    .text-link { text-align: center; }
    .trust-list { flex-direction: column; gap: .7rem; }
    .hero-visual { min-height: 500px; }
    .visual-note { font-size: .56rem; }
    .project-tag { gap: .35rem; font-size: .48rem; padding-inline: .6rem; }
    .section { padding-inline: 1.2rem; }
    .section-heading { margin-bottom: 3rem; }
    .service-grid { grid-template-columns: 1fr; }
    .service-card, .service-card-large { min-height: 400px; }
    .service-card-wide { grid-column: auto; min-height: 360px; }
    .process-section, .quote-section { padding-inline: 1.2rem; }
    .process-list li { grid-template-columns: 45px 1fr; }
    .area-map { min-height: 390px; }
    .field-row { grid-template-columns: 1fr; gap: 0; }
    .quote-form { box-shadow: 7px 7px 0 var(--ink); }
    .site-footer > nav { justify-content: flex-start; flex-wrap: wrap; gap: 1.2rem 1.7rem; margin-top: 2rem; }
    .footer-bottom { align-items: flex-start; flex-direction: column; gap: .7rem; }
  }
  @media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
    .reveal { opacity: 1; transform: none; }
  }
}
