:root {
    color-scheme: light;
    --ink: #182024;
    --muted: #5e686e;
    --panel: #ffffff;
    --line: #d8dde0;
    --coal: #24292c;
    --steel: #eef2f4;
    --gold: #f1c84b;
    --gold-dark: #9b7414;
    --blue: #235e82;
    --white: #ffffff;
    --shadow: 0 20px 48px rgba(12, 17, 20, 0.16);
}

* {
    box-sizing: border-box;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-width: 320px;
    background: var(--steel);
    color: var(--ink);
    font-family: Arial, Helvetica, sans-serif;
    line-height: 1.5;
}

.home-page {
    min-height: 100svh;
    display: flex;
    flex-direction: column;
}

.home-page main {
    flex: 1 0 auto;
    display: flex;
    flex-direction: column;
}

.home-page .hero {
    align-items: start;
    flex: 1 0 auto;
}

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

a {
    color: inherit;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 20;
    background: var(--white);
    color: #4d5b62;
    border-bottom: 1px solid var(--line);
    box-shadow: 0 4px 18px rgba(15, 23, 28, 0.08);
}

.header-inner {
    width: calc(100% - 32px);
    max-width: 1120px;
    min-height: 68px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    padding: 12px 0;
}

.brand-link {
    color: var(--ink);
    text-decoration: none;
    font-size: 1.1rem;
    font-weight: 800;
    letter-spacing: 0;
    white-space: nowrap;
}

.nav-links {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    flex-wrap: wrap;
}

.nav-links a,
.button-link {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    padding: 10px 14px;
    text-decoration: none;
    font-weight: 700;
}

.nav-links a {
    color: #4d5b62;
}

.nav-links a:hover,
.nav-links a:focus-visible {
    background: rgba(24, 32, 36, 0.07);
    outline: none;
}

.call-button {
    background: var(--gold);
    color: #191714;
    box-shadow: inset 0 -2px 0 rgba(0, 0, 0, 0.18);
}

.home-call-action {
    display: inline-flex;
}

.hero {
    position: relative;
    overflow: hidden;
    background: var(--white);
    color: var(--ink);
    isolation: isolate;
}

.hero::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 0;
    background-image: url("about-electrician.png");
    background-position: center;
    background-size: cover;
    opacity: 0.25;
}

.page-hero {
    position: relative;
    overflow: hidden;
    color: var(--white);
    isolation: isolate;
}

.page-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -2;
    background-position: center;
    background-size: cover;
    transform: scale(1.02);
}

.page-hero::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background:
        linear-gradient(90deg, rgba(13, 19, 22, 0.88), rgba(13, 19, 22, 0.62)),
        linear-gradient(0deg, rgba(13, 19, 22, 0.76), rgba(13, 19, 22, 0.18));
}

.services-hero::before {
    background-image: url("Services.png");
}

.about-hero::before {
    background-image: url("TCS_Electric.png");
}

.hero {
    min-height: calc(100svh - 68px);
    display: grid;
    align-items: center;
    padding: 56px 0 48px;
}

.hero-inner,
.section-inner,
.page-hero-inner {
    width: calc(100% - 32px);
    max-width: 1120px;
    margin: 0 auto;
}

.hero-inner {
    position: relative;
    z-index: 1;
}

.hero-content {
    width: 100%;
    max-width: 720px;
}

.eyebrow {
    margin: 0 0 12px;
    color: var(--gold-dark);
    font-size: 0.88rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

h1,
h2,
h3,
p {
    overflow-wrap: anywhere;
}

h1 {
    margin: 0;
    font-size: clamp(2.5rem, 8vw, 5.7rem);
    line-height: 0.98;
    letter-spacing: 0;
}

#home-title {
    color: #7f5f10;
}

h2 {
    margin: 0 0 18px;
    font-size: clamp(1.7rem, 4.5vw, 2.7rem);
    line-height: 1.1;
    letter-spacing: 0;
}

h3 {
    margin: 0 0 12px;
    font-size: 1.25rem;
    line-height: 1.2;
    letter-spacing: 0;
}

.section-page-title {
    margin: 0 0 24px;
    color: var(--ink);
    font-size: clamp(2.1rem, 5vw, 3.2rem);
    line-height: 1.05;
}

.lead {
    margin: 18px 0 0;
    max-width: 58ch;
    color: var(--muted);
    font-size: clamp(1.05rem, 3vw, 1.35rem);
}

.phone-display {
    display: inline-flex;
    align-items: center;
    max-width: 100%;
    margin-top: 28px;
    color: var(--gold-dark);
    font-size: clamp(2rem, 9vw, 3.6rem);
    font-weight: 900;
    line-height: 1;
    text-decoration: none;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.license-line {
    margin: 14px 0 0;
    color: var(--gold-dark);
    font-size: clamp(1rem, 3vw, 1.25rem);
    font-weight: 800;
}

.action-row {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 34px;
}

@media (min-width: 641px) {
    .home-page .hero .lead {
        margin-inline: auto;
    }

    .home-page .hero .action-row .button-link {
        width: 138px;
        max-width: 100%;
    }
}

.primary-action,
.secondary-action {
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.primary-action {
    background: var(--gold);
    color: #191714;
}

.secondary-action {
    color: var(--white);
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(8px);
}

.hero .secondary-action {
    border-color: var(--line);
    background: var(--white);
    color: var(--blue);
}

.info-strip {
    background: var(--panel);
    border-bottom: 1px solid var(--line);
}

.info-grid {
    width: calc(100% - 32px);
    max-width: 1120px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr;
    gap: 1px;
    background: var(--line);
}

.info-item {
    min-height: 88px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
    background: var(--panel);
    padding: 18px;
}

.info-item strong {
    font-size: 1rem;
}

.info-item span {
    color: var(--muted);
    font-size: 0.95rem;
}

.section {
    padding: 54px 0;
}

.section.alt {
    background: var(--white);
}

.intro-copy {
    max-width: 720px;
    margin: 0 0 26px;
    color: var(--muted);
    font-size: 1.06rem;
}

.service-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
}

.service-card {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--panel);
    padding: 22px;
    box-shadow: 0 10px 24px rgba(15, 23, 28, 0.08);
}

.service-card h3 {
    color: var(--blue);
}

.service-card ul,
.about-list {
    margin: 0;
    padding-left: 22px;
}

.service-card li,
.about-list li {
    margin: 6px 0;
}

.page-hero {
    min-height: 340px;
    display: grid;
    align-items: end;
    padding: 82px 0 48px;
}

.page-hero-inner {
    max-width: 1120px;
}

.page-hero h1 {
    max-width: 760px;
    font-size: clamp(2.35rem, 7vw, 4.6rem);
}

.page-hero .lead {
    max-width: 680px;
    color: #f0f4f5;
}

.about-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 26px;
    align-items: center;
}

.about-photo {
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow);
    background: var(--coal);
}

.about-photo img {
    width: 100%;
    aspect-ratio: 16 / 10;
    object-fit: cover;
    object-position: center;
}

.about-copy {
    font-size: 1.05rem;
    color: var(--muted);
}

.about-copy p {
    margin-top: 0;
}

.contact-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    align-items: start;
}

.contact-copy .intro-copy {
    margin-bottom: 12px;
}

.contact-phone {
    margin-top: 0;
    font-size: clamp(1.8rem, 4.5vw, 2.6rem);
}

.contact-form {
    display: grid;
    gap: 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--panel);
    padding: 18px;
    box-shadow: 0 10px 24px rgba(15, 23, 28, 0.08);
}

.field-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
}

.field-group {
    display: grid;
    gap: 4px;
}

.field-group label {
    color: var(--ink);
    font-weight: 800;
}

.message-label {
    align-items: baseline;
    display: flex;
    flex-wrap: wrap;
    gap: 4px 6px;
}

.field-note {
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 600;
    line-height: 1.2;
}

.bypass-form {
    display: grid;
    gap: 4px;
}

.bypass-field {
    max-width: 300px;
}

.contact-copy .bypass-field {
    margin-top: 10px;
}

.bypass-form label {
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 800;
}

.bypass-control {
    display: flex;
    gap: 6px;
}

.bypass-input {
    flex: 1 1 auto;
    min-width: 0;
}

.bypass-input {
    padding: 6px 9px;
}

.bypass-button {
    border: 1px solid rgba(160, 112, 7, 0.32);
    border-radius: 8px;
    background: var(--gold);
    color: var(--ink);
    cursor: pointer;
    flex: 0 0 auto;
    font: inherit;
    font-size: 0.82rem;
    font-weight: 800;
    padding: 6px 11px;
}

.bypass-button:hover,
.bypass-button:focus {
    background: var(--gold-dark);
    color: var(--white);
}

.bypass-input.bypass-accepted {
    border-color: #1f8f4d;
    box-shadow: 0 0 0 3px rgba(31, 143, 77, 0.2);
}

.bypass-input.bypass-rejected {
    border-color: #c24132;
    box-shadow: 0 0 0 3px rgba(194, 65, 50, 0.18);
}

.field-group input,
.field-group textarea,
.bypass-input {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--white);
    color: var(--ink);
    font: inherit;
    padding: 9px 12px;
}

.field-group textarea {
    min-height: 92px;
    resize: vertical;
}

.field-group input:focus,
.field-group textarea:focus,
.bypass-input:focus {
    border-color: var(--gold-dark);
    box-shadow: 0 0 0 3px rgba(241, 200, 75, 0.26);
    outline: none;
}

.hidden-field {
    position: absolute;
    left: -100vw;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.form-status {
    margin: 0;
    border-radius: 8px;
    padding: 10px 12px;
    font-weight: 700;
}

.form-status.success {
    border: 1px solid rgba(35, 94, 130, 0.25);
    background: rgba(35, 94, 130, 0.08);
    color: var(--blue);
}

.form-status.error {
    border: 1px solid rgba(155, 116, 20, 0.32);
    background: rgba(241, 200, 75, 0.14);
    color: var(--ink);
}

.form-status ul {
    margin: 8px 0 0;
    padding-left: 22px;
}

.submit-button {
    width: fit-content;
    border: 0;
    cursor: pointer;
    font-family: inherit;
    font-size: inherit;
    font-weight: 700;
}

.site-footer {
    background: var(--coal);
    color: #dfe6e8;
    padding: 28px 0;
}

.home-page-footer {
    background: var(--white);
    color: #4d5b62;
    border-top: 1px solid var(--line);
    padding: 16px 0;
}

.home-page-footer .footer-inner {
    min-height: 34px;
}

.home-page-footer a {
    color: var(--gold-dark);
}

.footer-inner {
    width: calc(100% - 32px);
    max-width: 1120px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

.footer-inner a {
    color: var(--gold);
    font-weight: 800;
    text-decoration: none;
}

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

    .service-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .about-layout {
        grid-template-columns: 0.95fr 1.05fr;
    }

    .contact-layout {
        grid-template-columns: 0.9fr 1.1fr;
    }

    .field-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (min-width: 900px) {
    body:is(.home-page, .services-page, .about-page, .contact-page) {
        display: flex;
        flex-direction: column;
        width: min(94%, 76rem);
        min-height: 100svh;
        margin-inline: auto;
        box-shadow: 0 0 32px rgba(24, 32, 36, 0.1);
    }

    :is(.services-page, .about-page, .contact-page) main {
        display: grid;
        flex: 1 0 auto;
        background: var(--white);
    }

    :is(.services-page, .about-page, .contact-page) :is(.header-inner, .section-inner) {
        width: 92%;
    }

    .services-page .section,
    .about-page .section {
        display: grid;
        align-items: start;
        padding: 34px 0 24px;
    }

    .services-page .section-page-title {
        margin-bottom: 18px;
        font-size: clamp(2rem, 3.8vw, 3rem);
    }

    .services-page .service-card {
        padding: 18px 20px;
    }

    .services-page .action-row {
        margin-top: 22px;
    }

    .about-page .about-photo img {
        max-height: min(44svh, 340px);
    }

    .about-page .about-copy h2 {
        margin-bottom: 14px;
        font-size: clamp(2rem, 3.8vw, 3rem);
    }

    .about-page .about-list li {
        margin: 4px 0;
    }

    .about-page .action-row {
        margin-top: 22px;
    }

    .contact-page .section {
        display: grid;
        align-items: center;
        padding: 18px 0;
    }

    .contact-page .section-page-title {
        margin-bottom: 14px;
        font-size: clamp(2rem, 3.8vw, 3rem);
    }

    .contact-page .license-line {
        margin-top: 8px;
    }

    .home-page .hero {
        min-height: 100svh;
        place-items: center;
        padding: clamp(1.75rem, 5vh, 3.5rem) 0;
        text-align: center;
    }

    .home-page .hero-inner {
        left: 0 !important;
        top: 0 !important;
    }

    .home-page .hero-content {
        max-width: 60rem;
        margin-inline: auto;
    }

    .home-page .eyebrow {
        margin-bottom: 10px;
        font-size: 1.05rem;
    }

    .home-page .hero h1 {
        font-size: clamp(4.75rem, 8vw, 6rem);
        line-height: 1.03;
    }

    .home-page .hero .lead {
        max-width: 52ch;
        color: var(--coal);
        font-size: clamp(1.4rem, 2vw, 1.65rem);
    }

    .home-page .phone-display {
        justify-content: center;
        margin-top: 22px;
        font-size: clamp(3.5rem, 5.5vw, 4.5rem);
    }

    .home-page .license-line {
        margin-top: 10px;
        font-size: 1.4rem;
    }

    .home-page .hero .action-row {
        justify-content: center;
        margin-top: 24px;
    }

    .home-page .hero .action-row .button-link {
        width: clamp(10rem, 15vw, 12rem);
        min-height: 52px;
        font-size: 1.125rem;
    }

    .home-page .home-call-action {
        display: none;
    }

    .home-page .info-item {
        min-height: 58px;
        padding: 12px 16px;
    }

    .home-page .section {
        padding: 28px 0;
    }

    .section {
        padding: 68px 0;
    }
}

@media (641px <= width < 900px) {
    .home-page .hero {
        display: grid;
        height: 100vh;
        justify-items: center;
        min-height: 100vh;
        padding: 0;
        place-items: center;
        text-align: center;
    }

    .home-page .hero-inner {
        display: grid;
        left: 0 !important;
        margin: 0 auto;
        place-items: center;
        top: 0 !important;
    }

    .home-page .hero-content {
        margin: 0 auto;
        max-width: 720px;
    }

    .home-page .phone-display {
        justify-content: center;
    }

    .home-page .hero .action-row {
        justify-content: center;
    }
}

@media (min-width: 900px) and (hover: hover) and (pointer: fine) {
    .contact-page .header-inner {
        max-width: 1040px;
        min-height: 56px;
        padding: 8px 0;
    }

    .contact-page .nav-links {
        gap: 6px;
    }

    .contact-page .nav-links a,
    .contact-page .button-link {
        min-height: 38px;
        padding: 7px 11px;
    }

    .contact-page .section-inner {
        max-width: 1040px;
    }

    .contact-page .section {
        padding: 12px 0;
    }

    .contact-page .section-page-title {
        margin-bottom: 14px;
        font-size: clamp(1.75rem, 3vw, 2.5rem);
    }

    .contact-page .contact-layout {
        gap: 16px;
    }

    .contact-page .contact-copy .intro-copy {
        margin-bottom: 8px;
        font-size: 0.95rem;
    }

    .contact-page .contact-phone {
        font-size: clamp(1.6rem, 3.4vw, 2.25rem);
    }

    .contact-page .contact-form {
        gap: 10px;
        padding: 14px;
    }

    .contact-page .field-grid {
        gap: 10px;
    }

    .contact-page .field-group {
        gap: 3px;
    }

    .contact-page .field-group input,
    .contact-page .field-group textarea,
    .contact-page .bypass-input {
        padding: 7px 10px;
    }

    .contact-page .field-group textarea {
        min-height: 78px;
    }

    .contact-page .bypass-field {
        max-width: 280px;
    }
}

@media (max-width: 640px) {
    body {
        overflow-x: hidden;
    }

    .header-inner {
        width: calc(100% - 24px);
        max-width: 420px;
        justify-content: center;
        text-align: center;
    }

    .brand-link,
    .call-button {
        width: 100%;
    }

    .nav-links {
        width: 100%;
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
    }

    .nav-links a {
        background: rgba(24, 32, 36, 0.06);
        min-width: 0;
        padding-inline: 8px;
        font-size: 0.95rem;
    }

    .hero,
    .page-hero {
        text-align: center;
    }

    .hero {
        min-height: auto;
        padding: 48px 0 44px;
    }

    .hero-inner,
    .section-inner,
    .page-hero-inner,
    .info-grid,
    .footer-inner {
        width: calc(100% - 32px);
        max-width: 420px;
    }

    h1 {
        font-size: clamp(1.9rem, 9vw, 2.45rem);
    }

    .home-page .hero-content,
    .contact-copy,
    .contact-form {
        min-width: 0;
    }

    .home-page .eyebrow {
        font-size: 0.75rem;
    }

    .home-page .hero h1 {
        font-size: clamp(2rem, 10vw, 2.2rem);
    }

    .home-page .hero .lead {
        max-width: 28ch;
        margin-left: auto;
        margin-right: auto;
        font-size: 0.98rem;
    }

    .page-hero h1 {
        font-size: clamp(2rem, 9vw, 2.65rem);
    }

    .lead {
        font-size: 1.02rem;
    }

    .phone-display {
        display: flex;
        justify-content: center;
        font-size: clamp(1.95rem, 8vw, 2.25rem);
    }

    .contact-phone {
        font-size: clamp(1.95rem, 8vw, 2.25rem);
    }

    .contact-page .nav-links {
        grid-template-columns: 1fr;
        max-width: 260px;
        margin: 0 auto;
    }

    .contact-page .section-inner {
        width: calc(100% - 104px);
        max-width: 300px;
    }

    .contact-copy .intro-copy {
        max-width: 28ch;
    }

    .contact-form {
        padding: 18px;
    }

    .page-hero::after {
        background:
            linear-gradient(0deg, rgba(13, 19, 22, 0.88), rgba(13, 19, 22, 0.58)),
            rgba(13, 19, 22, 0.28);
    }

    .home-page-footer {
        padding: 12px 0;
    }

    .home-page-footer .footer-inner {
        justify-content: center;
        text-align: center;
        gap: 6px;
        font-size: 0.95rem;
    }

    .home-page-footer .footer-inner span,
    .home-page-footer .footer-inner a {
        width: 100%;
    }

    .action-row {
        justify-content: center;
    }

    .button-link {
        width: 100%;
        min-width: 0;
    }

    .contact-page .nav-links a {
        width: 100%;
    }

    .services-page .nav-links,
    .about-page .nav-links,
    .contact-page .nav-links {
        display: flex;
        justify-content: center;
        gap: 10px 16px;
        max-width: 100%;
    }

    .contact-page .nav-links {
        max-width: 280px;
    }

    .services-page .brand-link,
    .about-page .brand-link,
    .contact-page .brand-link {
        width: auto;
    }

    .services-page .nav-links a,
    .about-page .nav-links a,
    .contact-page .nav-links a,
    .services-page .button-link,
    .about-page .button-link,
    .contact-page .submit-button {
        width: auto;
        min-width: 0;
        min-height: auto;
        border: 0;
        border-radius: 0;
        background: transparent;
        box-shadow: none;
        color: var(--blue);
        padding: 2px 0;
        text-decoration: underline;
        text-underline-offset: 3px;
    }

    .services-page .call-button,
    .about-page .call-button,
    .contact-page .call-button {
        color: var(--gold-dark);
    }

    .services-page .action-row,
    .about-page .action-row {
        gap: 10px 16px;
    }

    .page-hero {
        min-height: 300px;
    }
}
