/* ========================================
   TRU HEATING — "Hearthside Luxury"
   Warm, refined, craftsman aesthetic
   ======================================== */

:root {
    --coal: #0C0A09;
    --charcoal: #1C1917;
    --smoke: #292524;
    --stone: #44403C;
    --ash: #78716C;
    --warm-gray: #A8A29E;
    --cream: #FAFAF9;
    --parchment: #F5F0EB;
    --ember: #C2410C;
    --ember-glow: #EA580C;
    --amber: #D97706;
    --gold: #B45309;

    --font-display: 'Cormorant Garamond', Georgia, serif;
    --font-body: 'Outfit', system-ui, sans-serif;

    --max-width: 1240px;
    --header-height: 80px;
    --section-pad: clamp(5rem, 12vw, 9rem);

    --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
    --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
}

/* ========== RESET ========== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: var(--header-height); }
body {
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.7;
    color: var(--charcoal);
    background: var(--cream);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { text-decoration: none; color: inherit; }
ul { list-style: none; }
button { font-family: inherit; }

/* ========== GRAIN TEXTURE ========== */
.grain {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 9999;
    opacity: 0.03;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
    background-repeat: repeat;
    background-size: 256px;
}

/* ========== UTILITIES ========== */
.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 clamp(1.25rem, 4vw, 2.5rem);
}

.label {
    display: inline-block;
    font-family: var(--font-body);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--ember);
    margin-bottom: 1.5rem;
}
.label--light { color: var(--amber); }

.skip-link {
    position: absolute;
    top: -100%;
    left: 0;
    background: var(--ember);
    color: white;
    padding: 8px 16px;
    z-index: 10000;
    font-size: 0.875rem;
}
.skip-link:focus { top: 0; }

/* ========== SCROLL REVEAL ========== */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s var(--ease-out), transform 0.8s var(--ease-out);
}
.reveal[data-delay="1"] { transition-delay: 0.12s; }
.reveal[data-delay="2"] { transition-delay: 0.24s; }
.reveal[data-delay="3"] { transition-delay: 0.36s; }
.reveal--visible {
    opacity: 1;
    transform: translateY(0);
}

/* ========== BUTTONS ========== */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    padding: 1rem 2rem;
    font-family: var(--font-body);
    font-size: 0.875rem;
    font-weight: 500;
    letter-spacing: 0.04em;
    border-radius: 0;
    border: none;
    cursor: pointer;
    transition: all 0.4s var(--ease-out);
    position: relative;
    overflow: hidden;
}
.btn--primary {
    background: var(--ember);
    color: white;
}
.btn--primary::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--ember-glow);
    transform: translateX(-100%);
    transition: transform 0.4s var(--ease-out);
    z-index: 0;
}
.btn--primary:hover::before { transform: translateX(0); }
.btn--primary span,
.btn--primary svg { position: relative; z-index: 1; }
.btn--primary:hover { box-shadow: 0 8px 32px rgba(194, 65, 12, 0.35); }

.btn--ghost {
    background: transparent;
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
}
.btn--ghost:hover {
    border-color: white;
    background: rgba(255, 255, 255, 0.08);
}

.btn--full { width: 100%; justify-content: center; }

/* ========== HEADER ========== */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--header-height);
    z-index: 500;
    transition: background 0.4s, box-shadow 0.4s, backdrop-filter 0.4s;
}
.header--scrolled {
    background: rgba(12, 10, 9, 0.92);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 1px 0 rgba(255,255,255,0.05);
}
.header__inner {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 clamp(1.25rem, 4vw, 2.5rem);
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
}
.header__brand {
    display: flex;
    align-items: center;
    z-index: 700;
}
.header__logo {
    height: 50px;
    width: auto;
    max-width: 320px;
}
.header__nav-list {
    display: flex;
    gap: 2.5rem;
}
.header__nav-link {
    color: rgba(255, 255, 255, 0.65);
    font-size: 0.8rem;
    font-weight: 400;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    transition: color 0.3s;
    position: relative;
}
.header__nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--ember);
    transition: width 0.3s var(--ease-out);
}
.header__nav-link:hover,
.header__nav-link--active {
    color: white;
}
.header__nav-link:hover::after,
.header__nav-link--active::after {
    width: 100%;
}
.header__cta {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--ember);
    font-size: 0.8rem;
    font-weight: 500;
    letter-spacing: 0.05em;
    transition: color 0.3s;
}
.header__cta:hover { color: var(--ember-glow); }

.header__hamburger {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 6px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
    z-index: 700;
}
.header__hamburger span {
    display: block;
    width: 22px;
    height: 1.5px;
    background: white;
    transition: transform 0.3s, opacity 0.3s;
    transform-origin: center;
}
.header__hamburger[aria-expanded="true"] span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.header__hamburger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.header__hamburger[aria-expanded="true"] span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

@media (max-width: 768px) {
    .header__nav {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh;
        height: 100dvh;
        background: var(--coal);
        display: flex;
        align-items: center;
        justify-content: center;
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.4s;
    }
    .header__nav--open { opacity: 1; pointer-events: auto; }
    .header__nav-list { flex-direction: column; align-items: center; gap: 2rem; }
    .header__nav-link {
        font-size: 1.2rem;
        letter-spacing: 0.15em;
    }
    .header__cta { display: none; }
    .header__hamburger { display: flex; }
}

/* ========== HERO ========== */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    overflow: hidden;
}
.hero__bg {
    position: absolute;
    inset: 0;
    background: var(--coal) url('../images/hero.jpg') center/cover no-repeat;
}
.hero__gradient {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 80% 60% at 70% 60%, rgba(194, 65, 12, 0.15) 0%, transparent 70%),
        radial-gradient(ellipse 60% 50% at 20% 80%, rgba(217, 119, 6, 0.08) 0%, transparent 60%),
        linear-gradient(180deg, rgba(12, 10, 9, 0.3) 0%, rgba(12, 10, 9, 0.8) 100%);
}
.hero__embers {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(2px 2px at 20% 70%, rgba(234, 88, 12, 0.6), transparent),
        radial-gradient(2px 2px at 80% 30%, rgba(217, 119, 6, 0.4), transparent),
        radial-gradient(1px 1px at 50% 50%, rgba(234, 88, 12, 0.3), transparent),
        radial-gradient(1px 1px at 70% 80%, rgba(217, 119, 6, 0.5), transparent),
        radial-gradient(1.5px 1.5px at 30% 40%, rgba(234, 88, 12, 0.35), transparent);
    animation: ember-float 8s ease-in-out infinite alternate;
}
@keyframes ember-float {
    0% { opacity: 0.6; transform: translateY(0); }
    100% { opacity: 1; transform: translateY(-15px); }
}

.hero__content {
    position: relative;
    z-index: 2;
    padding: calc(var(--header-height) + 4rem) clamp(1.25rem, 4vw, 2.5rem) 4rem;
    max-width: 800px;
}
.hero__badge {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2.5rem;
}
.hero__badge-line {
    flex: 0 0 40px;
    height: 1px;
    background: var(--ember);
    opacity: 0.6;
}
.hero__badge-text {
    font-family: var(--font-body);
    font-size: 0.7rem;
    font-weight: 500;
    letter-spacing: 0.25em;
    text-transform: uppercase;
    color: var(--ember);
}
.hero__title {
    font-family: var(--font-display);
    font-weight: 400;
    color: white;
    line-height: 1.05;
    margin-bottom: 1.5rem;
}
.hero__title-line {
    display: block;
    font-size: clamp(3rem, 9vw, 5.5rem);
}
.hero__title-line--accent {
    font-style: italic;
    color: var(--ember-glow);
}
.hero__subtitle {
    font-size: clamp(0.95rem, 2vw, 1.1rem);
    color: var(--warm-gray);
    max-width: 480px;
    margin-bottom: 2.5rem;
    font-weight: 300;
    line-height: 1.8;
}
.hero__actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.hero__scroll {
    position: absolute;
    bottom: 2.5rem;
    right: clamp(1.25rem, 4vw, 2.5rem);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    z-index: 2;
}
.hero__scroll-text {
    writing-mode: vertical-rl;
    font-size: 0.65rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--ash);
}
.hero__scroll-line {
    width: 1px;
    height: 60px;
    background: linear-gradient(to bottom, var(--ash), transparent);
    animation: scroll-pulse 2s ease-in-out infinite;
}
@keyframes scroll-pulse {
    0%, 100% { opacity: 0.3; transform: scaleY(0.6); transform-origin: top; }
    50% { opacity: 1; transform: scaleY(1); }
}

/* ========== SERVICES ========== */
.services {
    padding: var(--section-pad) 0;
    background: var(--cream);
}
.services__header {
    margin-bottom: 4rem;
}
.services__title {
    font-family: var(--font-display);
    font-size: clamp(2.2rem, 5vw, 3.5rem);
    font-weight: 400;
    line-height: 1.15;
    color: var(--charcoal);
}
.services__title em {
    font-style: italic;
    color: var(--ember);
}
.services__grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1px;
    background: var(--parchment);
    border: 1px solid rgba(0,0,0,0.06);
}

.service-card {
    padding: clamp(2rem, 4vw, 3rem);
    background: white;
    position: relative;
    transition: background 0.4s, color 0.4s;
}
.service-card:hover {
    background: var(--charcoal);
    color: var(--cream);
}
.service-card:hover .service-card__number { color: var(--ember); }
.service-card:hover .service-card__icon { color: var(--ember); }
.service-card:hover .service-card__desc { color: var(--warm-gray); }
.service-card:hover .service-card__line { background: var(--ember); width: 60px; }

.service-card__number {
    font-family: var(--font-display);
    font-size: 0.85rem;
    color: var(--warm-gray);
    margin-bottom: 1.5rem;
    display: block;
    transition: color 0.4s;
}
.service-card__icon {
    color: var(--stone);
    margin-bottom: 1.5rem;
    transition: color 0.4s;
}
.service-card__title {
    font-family: var(--font-display);
    font-size: clamp(1.3rem, 2.5vw, 1.6rem);
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: 1rem;
}
.service-card__desc {
    font-size: 0.9rem;
    color: var(--stone);
    line-height: 1.7;
    transition: color 0.4s;
}
.service-card__line {
    width: 40px;
    height: 2px;
    background: var(--parchment);
    margin-top: 1.5rem;
    transition: all 0.4s var(--ease-out);
}

@media (max-width: 768px) {
    .services__grid { grid-template-columns: 1fr; }
}

/* ========== GALLERY ========== */
.gallery {
    padding: var(--section-pad) 0;
    background: var(--charcoal);
    position: relative;
}
.gallery::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--ember), transparent);
    opacity: 0.3;
}
.gallery__title {
    font-family: var(--font-display);
    font-size: clamp(2.2rem, 5vw, 3.5rem);
    font-weight: 400;
    color: white;
    margin-bottom: 2.5rem;
}
.gallery__title em { font-style: italic; color: var(--ember-glow); }

.gallery__filters {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 3rem;
    flex-wrap: wrap;
}
.gallery__filter {
    padding: 0.6rem 1.4rem;
    background: transparent;
    border: 1px solid var(--stone);
    color: var(--warm-gray);
    font-family: var(--font-body);
    font-size: 0.8rem;
    letter-spacing: 0.05em;
    cursor: pointer;
    transition: all 0.3s;
}
.gallery__filter:hover { border-color: var(--warm-gray); color: white; }
.gallery__filter--active {
    background: var(--ember);
    border-color: var(--ember);
    color: white;
}

.gallery__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 4px;
}
.gallery__item {
    position: relative;
    aspect-ratio: 4/3;
    overflow: hidden;
    cursor: pointer;
}
.gallery__item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s var(--ease-out);
}
.gallery__item:hover img { transform: scale(1.08); }
.gallery__item-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 50%, rgba(12, 10, 9, 0.8));
    display: flex;
    align-items: flex-end;
    padding: 1rem;
    opacity: 0;
    transition: opacity 0.3s;
}
.gallery__item:hover .gallery__item-overlay { opacity: 1; }
.gallery__item-label {
    color: white;
    font-size: 0.8rem;
    letter-spacing: 0.05em;
}
.gallery__item--hidden { display: none; }

.gallery__empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
    padding: 4rem 0;
    text-align: center;
    color: var(--ash);
    font-size: 0.95rem;
    font-weight: 300;
}
.gallery__empty--hidden { display: none; }

@media (max-width: 768px) { .gallery__grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px) { .gallery__grid { grid-template-columns: 1fr; } }

/* Lightbox */
.lightbox {
    position: fixed;
    inset: 0;
    background: rgba(12, 10, 9, 0.95);
    backdrop-filter: blur(20px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s;
}
.lightbox--open { opacity: 1; pointer-events: auto; }
.lightbox__img { max-width: 90vw; max-height: 85vh; border-radius: 2px; }
.lightbox__close {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    background: none;
    border: 1px solid rgba(255,255,255,0.2);
    color: white;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: border-color 0.3s, background 0.3s;
}
.lightbox__close:hover { border-color: white; background: rgba(255,255,255,0.1); }

/* ========== ABOUT ========== */
.about {
    padding: var(--section-pad) 0;
    background: var(--parchment);
}
.about__layout {
    display: grid;
    grid-template-columns: 5fr 7fr;
    gap: clamp(3rem, 6vw, 6rem);
    align-items: start;
    margin-bottom: 5rem;
}
.about__visual { position: relative; }
.about__image-frame { position: relative; }
.about__image-photo {
    width: 100%;
    aspect-ratio: 3/4;
    object-fit: cover;
    border: 1px solid rgba(0,0,0,0.06);
}
.about__image-accent {
    position: absolute;
    bottom: -12px;
    right: -12px;
    width: 60%;
    height: 60%;
    border: 1px solid var(--ember);
    opacity: 0.2;
    z-index: -1;
}

.about__title {
    font-family: var(--font-display);
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 400;
    line-height: 1.15;
    margin-bottom: 2rem;
}
.about__title em { font-style: italic; color: var(--ember); }
.about__text p {
    margin-bottom: 1.25rem;
    font-size: 0.95rem;
    color: var(--stone);
    line-height: 1.8;
}

.about__stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1px;
    background: rgba(0,0,0,0.06);
    border: 1px solid rgba(0,0,0,0.06);
}
.stat {
    background: white;
    padding: clamp(1.5rem, 3vw, 2.5rem);
    text-align: center;
}
.stat__value {
    display: block;
    font-family: var(--font-display);
    font-size: clamp(1.5rem, 3vw, 2rem);
    font-weight: 600;
    color: var(--charcoal);
    margin-bottom: 0.5rem;
}
.stat__divider {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--ember);
    margin: 0 auto 0.5rem;
}
.stat__label {
    font-size: 0.8rem;
    color: var(--ash);
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

@media (max-width: 768px) {
    .about__layout { grid-template-columns: 1fr; }
    .about__visual { order: -1; max-width: 400px; }
    .about__stats { grid-template-columns: 1fr; }
}

/* ========== CONTACT ========== */
.contact {
    padding: var(--section-pad) 0;
    background: var(--coal);
    color: white;
    position: relative;
}
.contact::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--ember), transparent);
    opacity: 0.3;
}
.contact__layout {
    display: grid;
    grid-template-columns: 5fr 6fr;
    gap: clamp(3rem, 6vw, 6rem);
}
.contact__title {
    font-family: var(--font-display);
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 400;
    line-height: 1.15;
    margin-bottom: 1.5rem;
}
.contact__title em { font-style: italic; color: var(--ember-glow); }
.contact__intro {
    color: var(--warm-gray);
    font-size: 0.95rem;
    font-weight: 300;
    margin-bottom: 2.5rem;
    line-height: 1.8;
}
.contact__details { display: flex; flex-direction: column; gap: 1rem; margin-bottom: 2rem; }
.contact__link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--warm-gray);
    font-size: 0.95rem;
    transition: color 0.3s;
}
.contact__link svg { color: var(--ember); flex-shrink: 0; }
.contact__link:hover { color: white; }

.contact__socials {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}
.contact__socials a {
    color: var(--ash);
    font-size: 0.8rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    transition: color 0.3s;
}
.contact__socials a:hover { color: var(--ember); }
.contact__socials-dot {
    width: 3px;
    height: 3px;
    border-radius: 50%;
    background: var(--stone);
}
.contact__area {
    font-family: var(--font-display);
    font-size: 1rem;
    color: var(--stone);
    font-style: italic;
}

/* Contact form */
.contact__form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}
.contact__field {
    position: relative;
}
.contact__field-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}
.contact__field input,
.contact__field select,
.contact__field textarea {
    width: 100%;
    padding: 1rem 0;
    background: transparent;
    border: none;
    border-bottom: 1px solid var(--stone);
    color: white;
    font-family: var(--font-body);
    font-size: 0.95rem;
    transition: border-color 0.3s;
    outline: none;
    border-radius: 0;
    -webkit-appearance: none;
}
.contact__field input:focus,
.contact__field select:focus,
.contact__field textarea:focus {
    border-bottom-color: var(--ember);
}
.contact__field label {
    position: absolute;
    left: 0;
    top: 1rem;
    color: var(--ash);
    font-size: 0.85rem;
    transition: all 0.3s var(--ease-out);
    pointer-events: none;
}
.contact__field input:focus + label,
.contact__field input:not(:placeholder-shown) + label,
.contact__field textarea:focus + label,
.contact__field textarea:not(:placeholder-shown) + label,
.contact__field select:focus + label,
.contact__field select:valid + label {
    top: -0.6rem;
    font-size: 0.7rem;
    color: var(--ember);
    letter-spacing: 0.1em;
    text-transform: uppercase;
}
.contact__field select option {
    background: var(--charcoal);
    color: white;
}
.contact__alt {
    font-size: 0.8rem;
    color: var(--stone);
    text-align: center;
}

@media (max-width: 768px) {
    .contact__layout { grid-template-columns: 1fr; }
    .contact__field-row { grid-template-columns: 1fr; }
}

/* ========== FOOTER ========== */
.footer {
    padding: 2.5rem 0;
    background: #060504;
    color: var(--ash);
}
.footer__top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 2rem;
    border-bottom: 1px solid rgba(255,255,255,0.06);
    margin-bottom: 1.5rem;
}
.footer__brand {
    display: flex;
    align-items: center;
}
.footer__logo {
    height: 32px;
    width: auto;
}
.footer__nav {
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
}
.footer__nav a {
    font-size: 0.8rem;
    letter-spacing: 0.05em;
    transition: color 0.3s;
}
.footer__nav a:hover { color: white; }

.footer__bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.75rem;
    opacity: 0.5;
}
.footer__hetas-img {
    height: 60px;
    width: auto;
    object-fit: contain;
    opacity: 0.85;
    transition: opacity 0.3s;
}
.footer__hetas-img:hover { opacity: 1; }

@media (max-width: 768px) {
    .footer__top { flex-direction: column; gap: 1.5rem; text-align: center; }
    .footer__nav { justify-content: center; }
    .footer__bottom { flex-direction: column; gap: 0.75rem; text-align: center; }
}
