/*
Theme Name: KleanDrapes
Theme URI: https://pure-drape-flow.base44.app
Author: KleanDrapes
Description: Premium restoration service for high-end window treatments, focusing on textile conservation and interior atmosphere.
Version: 2.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: kleandrapes
*/

/* ============================================================
   VARIABLES
   ============================================================ */
:root {
    --bg:        #F7F4EF;
    --bg-alt:    #F0EDE7;
    --bg-dark:   #131109;
    --text:      #1A1612;
    --muted:     #7C746C;
    --label-c:   #9C9088;
    --accent:    #A87848;
    --border:    #E0DAD2;
    --white:     #FFFFFF;

    --serif: 'Playfair Display', 'Times New Roman', Georgia, serif;
    --sans:  'Inter', system-ui, -apple-system, sans-serif;

    --nav-h:  70px;
    --max-w:  1240px;
    --ease:   cubic-bezier(0.25, 0.1, 0.25, 1);
}

/* ============================================================
   RESET
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
    font-family: var(--sans);
    background: var(--bg);
    color: var(--text);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
button { cursor: pointer; border: none; background: none; font-family: inherit; color: inherit; }
input, select, textarea { font-family: inherit; }

/* ============================================================
   LAYOUT
   ============================================================ */
.container {
    max-width: var(--max-w);
    margin-inline: auto;
    padding-inline: clamp(24px, 5vw, 80px);
}

/* ============================================================
   TYPOGRAPHY HELPERS
   ============================================================ */
.eyebrow {
    display: block;
    font-family: var(--sans);
    font-size: 0.65rem;
    font-weight: 400;
    letter-spacing: 0.24em;
    text-transform: uppercase;
    color: var(--label-c);
    margin-bottom: 16px;
}

.heading {
    font-family: var(--serif);
    font-weight: 400;
    line-height: 1.1;
    color: var(--text);
}
.heading-lg { font-size: clamp(2.4rem, 4vw, 3.4rem); }
.heading-xl { font-size: clamp(3.5rem, 6.5vw, 5.4rem); line-height: 1.03; }

.italic-gold {
    font-family: var(--serif);
    font-style: italic;
    color: var(--accent);
}

/* ============================================================
   NAVIGATION
   ============================================================ */
.site-header {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 500;
    height: var(--nav-h);
    background: rgba(247, 244, 239, 0.96);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid transparent;
    transition: border-color 0.35s var(--ease);
}
.site-header.scrolled {
    border-bottom-color: var(--border);
}

.nav-inner {
    height: var(--nav-h);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.site-logo {
    font-family: var(--serif);
    font-size: 1.2rem;
    letter-spacing: 0.01em;
    color: var(--text);
    font-weight: 400;
}
.site-logo strong {
    font-weight: 700;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 36px;
}
.nav-links a {
    font-family: var(--sans);
    font-size: 0.68rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--muted);
    transition: color 0.25s;
}
.nav-links a:hover {
    color: var(--text);
}

.nav-book {
    margin-left: 24px;
    padding: 9px 20px;
    border: 1px solid var(--text);
    font-family: var(--sans);
    font-size: 0.65rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--text);
    transition: background 0.25s, color 0.25s;
    display: inline-block;
}
.nav-book:hover {
    background: var(--text);
    color: var(--white);
}

/* Hamburger */
.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    padding: 6px;
}
.nav-toggle span {
    display: block;
    width: 22px;
    height: 1.5px;
    background: var(--text);
    transition: transform 0.3s, opacity 0.3s;
}

/* Mobile nav */
.nav-mobile {
    display: none;
    position: fixed;
    inset: 0;
    background: var(--bg);
    z-index: 600;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 36px;
}
.nav-mobile.open { display: flex; }
.nav-mobile a {
    font-family: var(--serif);
    font-size: 2.2rem;
    color: var(--text);
    transition: color 0.25s;
}
.nav-mobile a:hover { color: var(--accent); }
.nav-mobile-close {
    position: absolute;
    top: 22px; right: 28px;
    font-size: 2rem;
    color: var(--muted);
    cursor: pointer;
    line-height: 1;
}

/* ============================================================
   HERO
   ============================================================ */
.hero {
    height: 100vh;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    overflow: hidden;
}

/* Background: use a CSS variable so WordPress can inject an image URL */
.hero-bg {
    position: absolute;
    inset: 0;
    background-color: #EAE5DC;
    background-size: cover;
    background-position: center 30%;
}

/* Very subtle warm overlay to soften the image */
.hero-bg::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(240, 235, 226, 0.22);
}

/* CSS-only textile pattern for when no photo is set */
.hero-bg.no-image::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        repeating-linear-gradient(
            0deg,
            transparent,
            transparent 38px,
            rgba(180,168,148,0.07) 38px,
            rgba(180,168,148,0.07) 40px
        ),
        repeating-linear-gradient(
            90deg,
            transparent,
            transparent 38px,
            rgba(180,168,148,0.07) 38px,
            rgba(180,168,148,0.07) 40px
        );
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 580px;
    padding: 0 24px;
}

.hero-eyebrow {
    font-family: var(--sans);
    font-size: 0.65rem;
    letter-spacing: 0.26em;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 20px;
    opacity: 0.85;
}

.hero-h1 {
    font-family: var(--serif);
    font-size: clamp(3.8rem, 7vw, 5.8rem);
    font-weight: 400;
    line-height: 1.02;
    color: var(--text);
}

.hero-h1 .italic-gold {
    display: block;
    font-size: clamp(3.6rem, 6.5vw, 5.5rem);
}

.hero-sub {
    font-family: var(--sans);
    font-size: 0.92rem;
    color: var(--muted);
    line-height: 1.65;
    margin: 22px auto 34px;
    max-width: 360px;
}

.hero-cta {
    display: inline-block;
    padding: 13px 30px;
    border: 1px solid rgba(26,22,18,0.55);
    font-family: var(--sans);
    font-size: 0.66rem;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--text);
    transition: background 0.3s, color 0.3s, border-color 0.3s;
}
.hero-cta:hover {
    background: var(--text);
    color: var(--white);
    border-color: var(--text);
}

/* Scroll indicator */
.hero-scroll {
    position: absolute;
    bottom: 36px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    font-family: var(--sans);
    font-size: 0.6rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--muted);
    opacity: 0.55;
}
.hero-scroll-line {
    width: 1px;
    height: 42px;
    background: var(--muted);
    transform-origin: top;
    animation: scrollDrop 2s ease-in-out infinite;
}
@keyframes scrollDrop {
    0%   { transform: scaleY(0); opacity: 0; }
    40%  { transform: scaleY(1); opacity: 1; }
    80%  { transform: scaleY(1); opacity: 0; }
    100% { transform: scaleY(0); opacity: 0; }
}

/* ============================================================
   FABRIC PORTFOLIO
   ============================================================ */
.fabrics {
    padding-top: 88px;
    background: var(--bg);
}

.fabrics-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 40px;
}

.fabrics-nav {
    display: flex;
    gap: 6px;
}
.fabrics-btn {
    width: 36px;
    height: 36px;
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    color: var(--text);
    transition: background 0.25s, border-color 0.25s, color 0.25s;
    cursor: pointer;
}
.fabrics-btn:hover {
    background: var(--text);
    border-color: var(--text);
    color: var(--white);
}

/* Full-bleed card track */
.fabrics-track-outer {
    overflow: hidden;
}

.fabrics-track {
    display: flex;
    gap: 3px;
    transition: transform 0.55s cubic-bezier(0.25, 0.1, 0.25, 1);
}

.fabric-card {
    flex: 0 0 calc(25% - 2.25px);
    height: 390px;
    position: relative;
    overflow: hidden;
    cursor: pointer;
}

/* Background fill — CSS gradient default */
.fabric-card-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    transition: transform 0.65s var(--ease);
}
.fabric-card:hover .fabric-card-bg {
    transform: scale(1.05);
}

/* Individual fabric colours */
.fabric-silk    .fabric-card-bg { background-color: #D4CBBD;
    background-image: linear-gradient(145deg,#E0D9CF 0%,#C4BAB0 60%,#B8AFA5 100%); }
.fabric-linen   .fabric-card-bg { background-color: #B89A68;
    background-image: linear-gradient(145deg,#C8A870 0%,#A88A48 60%,#9A7C38 100%); }
.fabric-velvet  .fabric-card-bg { background-color: #6A3828;
    background-image: linear-gradient(145deg,#7A4030 0%,#5A2A18 60%,#4A2010 100%); }
.fabric-blackout .fabric-card-bg { background-color: #1E1A16;
    background-image: linear-gradient(145deg,#2C2820 0%,#1A1610 60%,#100C08 100%); }

.fabric-card-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.5) 0%, rgba(0,0,0,0) 55%);
}

.fabric-card-label {
    position: absolute;
    bottom: 22px;
    left: 22px;
    font-family: var(--serif);
    font-size: 1.05rem;
    font-weight: 400;
    color: rgba(255,255,255,0.92);
    letter-spacing: 0.01em;
}

/* ============================================================
   PROCESS — THE KLEAN PROTOCOL
   ============================================================ */
.process {
    padding-block: 100px;
    background: var(--bg-alt);
}

.process-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    align-items: center;
}

/* Left: image */
.process-img-wrap {
    height: 490px;
    overflow: hidden;
    position: relative;
}

.process-img-fill {
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-color: #D8CFBF;
    background-image: linear-gradient(
        160deg,
        #E2D8C8 0%,
        #D0C4A8 40%,
        #C4B490 70%,
        #B8A878 100%
    );
    transition: transform 0.7s var(--ease);
}
.process-img-wrap:hover .process-img-fill {
    transform: scale(1.02);
}

/* Right: content */
.process-steps {
    margin-top: 44px;
    display: flex;
    flex-direction: column;
    gap: 36px;
}

.process-step {
    display: grid;
    grid-template-columns: 52px 1fr;
    gap: 16px;
    align-items: start;
}

.step-num {
    font-family: var(--serif);
    font-size: 1.7rem;
    font-weight: 400;
    color: var(--border);
    line-height: 1;
    padding-top: 2px;
    user-select: none;
}

.step-body h3 {
    font-family: var(--serif);
    font-size: 1rem;
    font-weight: 400;
    color: var(--text);
    margin-bottom: 8px;
    letter-spacing: 0.01em;
}

.step-body p {
    font-family: var(--sans);
    font-size: 0.86rem;
    color: var(--muted);
    line-height: 1.68;
}

/* ============================================================
   CONTACT / DARK SECTION
   ============================================================ */
.contact-dark {
    background: var(--bg-dark);
    padding-top: 100px;
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    align-items: start;
    padding-bottom: 80px;
}

/* Left info */
.contact-info .eyebrow {
    color: var(--accent);
    opacity: 0.85;
}

.contact-heading {
    font-family: var(--serif);
    font-size: clamp(2.4rem, 4vw, 3.4rem);
    font-weight: 400;
    line-height: 1.08;
    color: var(--white);
}
.contact-heading .italic-gold {
    display: block;
}

.contact-desc {
    font-family: var(--sans);
    font-size: 0.88rem;
    color: rgba(255,255,255,0.4);
    line-height: 1.72;
    margin: 22px 0 34px;
    max-width: 360px;
}

.contact-links {
    display: flex;
    align-items: center;
    gap: 6px;
}

.contact-phone {
    font-family: var(--sans);
    font-size: 0.82rem;
    color: rgba(255,255,255,0.65);
    display: flex;
    align-items: center;
    gap: 8px;
}
.contact-phone svg {
    width: 13px; height: 13px;
    opacity: 0.5;
    flex-shrink: 0;
}

.contact-divider {
    width: 1px;
    height: 14px;
    background: rgba(255,255,255,0.15);
    margin-inline: 10px;
}

.contact-wa {
    font-family: var(--sans);
    font-size: 0.82rem;
    color: rgba(255,255,255,0.4);
    border-bottom: 1px solid rgba(255,255,255,0.18);
    padding-bottom: 2px;
    transition: color 0.25s, border-color 0.25s;
}
.contact-wa:hover {
    color: rgba(255,255,255,0.7);
    border-color: rgba(255,255,255,0.4);
}

/* Right: form */
.contact-form {
    padding-top: 8px;
}

.form-field {
    margin-bottom: 30px;
}

.form-field label {
    display: block;
    font-family: var(--sans);
    font-size: 0.6rem;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--label-c);
    margin-bottom: 10px;
}

.form-field input,
.form-field select {
    width: 100%;
    background: none;
    border: none;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    padding: 10px 0 12px;
    font-family: var(--sans);
    font-size: 0.9rem;
    color: rgba(255,255,255,0.65);
    outline: none;
    transition: border-color 0.3s;
    border-radius: 0;
    appearance: none;
    -webkit-appearance: none;
}
.form-field input::placeholder {
    color: rgba(255,255,255,0.2);
}
.form-field input:focus,
.form-field select:focus {
    border-bottom-color: rgba(255,255,255,0.35);
}
.form-field select {
    color: rgba(255,255,255,0.2);
    cursor: pointer;
}
.form-field select option {
    background: #201C14;
    color: rgba(255,255,255,0.8);
}
.form-field select.has-value {
    color: rgba(255,255,255,0.65);
}

.form-submit-btn {
    width: 100%;
    padding: 15px 20px;
    border: 1px solid rgba(255,255,255,0.25);
    font-family: var(--sans);
    font-size: 0.68rem;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.7);
    background: none;
    cursor: pointer;
    transition: background 0.3s, border-color 0.3s, color 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    margin-top: 6px;
}
.form-submit-btn:hover {
    background: rgba(255,255,255,0.06);
    border-color: rgba(255,255,255,0.45);
    color: var(--white);
}
.form-submit-btn svg {
    width: 13px; height: 13px;
    opacity: 0.6;
    transition: transform 0.25s, opacity 0.25s;
}
.form-submit-btn:hover svg {
    transform: translateX(4px);
    opacity: 1;
}

/* Form response message */
#kd-response {
    display: none;
    margin-top: 16px;
    font-size: 0.82rem;
    padding: 12px 0;
    border-top: 1px solid rgba(255,255,255,0.08);
}
#kd-response.success { color: rgba(255,255,255,0.55); }
#kd-response.error   { color: #C87060; }

/* ============================================================
   FOOTER BAR (inside dark section)
   ============================================================ */
.footer-bar {
    border-top: 1px solid rgba(255,255,255,0.06);
    padding-block: 26px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-brand {}
.footer-logo {
    font-family: var(--serif);
    font-size: 1.05rem;
    color: rgba(255,255,255,0.45);
    font-weight: 400;
    letter-spacing: 0.01em;
}
.footer-logo strong { font-weight: 700; }
.footer-by {
    font-family: var(--sans);
    font-size: 0.6rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.18);
    margin-top: 4px;
}

.footer-copy {
    font-family: var(--sans);
    font-size: 0.7rem;
    color: rgba(255,255,255,0.18);
    letter-spacing: 0.02em;
}

/* ============================================================
   INNER PAGE HERO (for page.php / single.php etc.)
   ============================================================ */
.page-banner {
    padding-top: calc(var(--nav-h) + 60px);
    padding-bottom: 60px;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
}
.page-banner .eyebrow { margin-bottom: 10px; }

.page-body {
    max-width: 780px;
    margin-inline: auto;
    padding: 72px clamp(24px, 5vw, 60px);
}
.page-body h2 { font-family: var(--serif); font-size: 1.8rem; font-weight: 400; margin-block: 40px 14px; }
.page-body h3 { font-family: var(--serif); font-size: 1.3rem; font-weight: 400; margin-block: 28px 10px; }
.page-body p  { font-size: 0.95rem; color: var(--muted); line-height: 1.75; margin-bottom: 18px; }
.page-body ul { padding-left: 20px; list-style: disc; margin-bottom: 18px; }
.page-body ul li { color: var(--muted); font-size: 0.95rem; margin-bottom: 6px; }
.page-body a  { color: var(--accent); border-bottom: 1px solid rgba(168,120,72,0.3); transition: border-color 0.25s; }
.page-body a:hover { border-bottom-color: var(--accent); }

/* ============================================================
   BLOG
   ============================================================ */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
    padding-block: 72px;
}
.blog-card {}
.blog-card-img {
    height: 220px;
    overflow: hidden;
    margin-bottom: 22px;
    background: var(--bg-alt);
}
.blog-card-img img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s var(--ease); }
.blog-card:hover .blog-card-img img { transform: scale(1.04); }
.blog-card .eyebrow { margin-bottom: 8px; }
.blog-card h2 { font-family: var(--serif); font-size: 1.3rem; font-weight: 400; color: var(--text); margin-bottom: 10px; }
.blog-card p  { font-size: 0.86rem; color: var(--muted); line-height: 1.65; }

/* ============================================================
   UTILITY — REVEAL ANIMATION
   ============================================================ */
.reveal {
    opacity: 0;
    transform: translateY(22px);
    transition: opacity 0.65s var(--ease), transform 0.65s var(--ease);
}
.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1024px) {
    .process-grid  { grid-template-columns: 1fr; gap: 48px; }
    .process-img-wrap { height: 320px; }
    .contact-grid  { grid-template-columns: 1fr; gap: 56px; }
    .fabric-card   { flex: 0 0 calc(50% - 1.5px); height: 340px; }
}

@media (max-width: 768px) {
    :root { --nav-h: 60px; }
    .nav-links, .nav-book { display: none; }
    .nav-toggle { display: flex; }

    .hero-h1 { font-size: 3rem; }
    .hero-h1 .italic-gold { font-size: 2.8rem; }

    .fabrics { padding-top: 64px; }
    .fabrics-header { flex-direction: column; align-items: flex-start; gap: 20px; }

    .fabric-card   { flex: 0 0 72vw; height: 300px; }

    .process { padding-block: 72px; }

    .contact-dark  { padding-top: 72px; }
    .contact-grid  { padding-bottom: 60px; }

    .footer-bar { flex-direction: column; gap: 14px; text-align: center; }

    .blog-grid { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
    .fabric-card { flex: 0 0 88vw; }
}

/* ============================================================
   PRINT
   ============================================================ */
@media print {
    .site-header, .hero-scroll, .nav-toggle { display: none; }
}
