/* ===================================================================
   The Aloha Handyman — mobile-first, native-feeling, light + dark
   =================================================================== */

:root {
    /* brand palette (from logo) */
    --forest-green: #456238;
    --grass-green: #527d3c;
    --light-lime: #bad872;
    --dark-brown: #1a1613;
    --dark-brown-2: #674132;
    --light-brown: #ca9c70;
    --light-sand: #e9d29e;
    --almost-white: #fdfffc;
    --slate-gray: #7c828b;

    /* action colors */
    --call-green: #34c759;
    --imessage-blue: #007aff;
    --ocean-blue: #2a9dd6;
    --estimate-brown: #674132;

    /* themeable surfaces — light */
    --bg-top: #eef5f6;
    --bg-bottom: #faf5ec;
    --text: #1a1613;
    --text-soft: #4a4038;
    --heading: #456238;
    --tagline: #456238;
    --card-bg: #ffffff;
    --card-border: rgba(26, 22, 19, 0.07);
    --card-shadow: 0 4px 16px rgba(26, 22, 19, 0.08);
    --glass-bg: rgba(255, 255, 255, 0.72);
    --badge-bg: rgba(82, 125, 60, 0.10);
    --badge-text: #456238;
    --divider: rgba(26, 22, 19, 0.08);
    --foot: #674132;
    --foot-dim: #7c828b;
    --foot-icon: #527d3c;
    --shadow: 0 4px 16px rgba(26, 22, 19, 0.12);
    --shadow-press: 0 2px 6px rgba(26, 22, 19, 0.16);
    --logo-shadow: drop-shadow(0 10px 20px rgba(26, 22, 19, 0.18));
}

@media (prefers-color-scheme: dark) {
    :root {
        --bg-top: #10211f;
        --bg-bottom: #161109;
        --text: #ece4d3;
        --text-soft: #c7bca6;
        --heading: #bad872;
        --tagline: #bad872;
        --card-bg: rgba(255, 255, 255, 0.045);
        --card-border: rgba(255, 255, 255, 0.09);
        --card-shadow: 0 4px 18px rgba(0, 0, 0, 0.40);
        --glass-bg: rgba(18, 16, 11, 0.62);
        --badge-bg: rgba(186, 216, 114, 0.12);
        --badge-text: #bad872;
        --divider: rgba(255, 255, 255, 0.10);
        --foot: #d8c9a6;
        --foot-dim: #8a8f97;
        --foot-icon: #bad872;
        --shadow: 0 4px 18px rgba(0, 0, 0, 0.45);
        --shadow-press: 0 2px 8px rgba(0, 0, 0, 0.50);
        --logo-shadow: drop-shadow(0 12px 24px rgba(0, 0, 0, 0.50));
    }
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    -webkit-tap-highlight-color: transparent;
}

html { -webkit-text-size-adjust: 100%; }

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    color: var(--text);
    min-height: 100vh;
    min-height: 100dvh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    background: linear-gradient(180deg, var(--bg-top) 0%, var(--bg-bottom) 100%);
    background-attachment: fixed;
}

/* ---------- Layout shell ---------- */
.app-container {
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding:
        calc(env(safe-area-inset-top) + 40px)
        22px
        calc(env(safe-area-inset-bottom) + 32px);
}

.page-home .app-container { justify-content: center; gap: 34px; }
.page-services .app-container {
    justify-content: flex-start;
    gap: 26px;
    padding-bottom: calc(env(safe-area-inset-bottom) + 96px);
}

/* ---------- Header / logo ---------- */
header {
    text-align: center;
    animation: fade 0.6s ease-out both;
}

.logo {
    width: 224px;
    height: 224px;
    object-fit: contain;
    filter: var(--logo-shadow);
}

.page-services .logo { width: 116px; height: 116px; }

.tagline {
    margin-top: 10px;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--tagline);
}

.trust-line {
    margin-top: 6px;
    font-size: 12.5px;
    font-weight: 500;
    letter-spacing: 0.02em;
    color: var(--foot-dim);
}

/* ---------- Native back button (services) ---------- */
.back-fab {
    position: fixed;
    top: calc(env(safe-area-inset-top) + 12px);
    left: 14px;
    z-index: 30;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 9px 15px 9px 12px;
    border-radius: 999px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    color: var(--heading);
    background: var(--glass-bg);
    border: 1px solid var(--card-border);
    box-shadow: var(--shadow);
    -webkit-backdrop-filter: blur(16px) saturate(1.4);
    backdrop-filter: blur(16px) saturate(1.4);
    transition: transform 0.15s ease, filter 0.15s ease;
}

.back-fab i { font-size: 13px; }
.back-fab:active { transform: scale(0.96); }
@media (hover: hover) { .back-fab:hover { filter: brightness(1.04); } }

/* ---------- Persistent action bar (services) ---------- */
.quickbar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 30;
    display: flex;
    gap: 9px;
    padding: 11px 14px calc(env(safe-area-inset-bottom) + 11px);
    background: var(--glass-bg);
    border-top: 1px solid var(--card-border);
    -webkit-backdrop-filter: blur(18px) saturate(1.4);
    backdrop-filter: blur(18px) saturate(1.4);
}

.quickbar .btn {
    flex: 1;
    padding: 14px 10px;
    font-size: 15px;
    border-radius: 14px;
    box-shadow: 0 2px 8px rgba(26, 22, 19, 0.16);
}

/* ---------- Buttons ---------- */
main { width: 100%; max-width: 350px; }
.page-services main { max-width: 640px; }

.cta-buttons {
    display: flex;
    flex-direction: column;
    gap: 12px;
    animation: fade 0.6s ease-out 0.08s both;
}

.btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 17px 18px;
    border-radius: 16px;
    font-size: 17px;
    font-weight: 600;
    text-decoration: none;
    color: var(--almost-white);
    background: var(--btn, var(--grass-green));
    box-shadow: var(--shadow);
    transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease;
}

.btn i { font-size: 16px; }
.btn:active { transform: scale(0.98); box-shadow: var(--shadow-press); }
@media (hover: hover) { .btn:hover { filter: brightness(1.05); } }

.call-btn     { --btn: var(--call-green); }
.text-btn     { --btn: var(--imessage-blue); }
.services-btn { --btn: var(--grass-green); }
.gallery-btn  { --btn: var(--ocean-blue); }
.estimate-btn { --btn: var(--estimate-brown); }
.book-btn     { --btn: var(--dark-brown); }

/* ---------- Services page ---------- */
.page-title {
    text-align: center;
    font-size: 24px;
    font-weight: 700;
    letter-spacing: -0.01em;
    color: var(--heading);
    animation: fade 0.6s ease-out both;
}

.badges {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    max-width: 420px;
    animation: fade 0.6s ease-out 0.05s both;
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 13px;
    border-radius: 999px;
    font-size: 12.5px;
    font-weight: 600;
    color: var(--badge-text);
    background: var(--badge-bg);
}

.badge i { font-size: 12px; }

.services-grid {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr;
    gap: 14px;
    animation: fade 0.6s ease-out 0.1s both;
}

@media (min-width: 600px) {
    .services-grid { grid-template-columns: 1fr 1fr; }
}

.service-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 18px;
    padding: 20px;
    box-shadow: var(--card-shadow);
}

.service-card h3 {
    display: flex;
    align-items: center;
    gap: 11px;
    font-size: 16px;
    font-weight: 700;
    color: var(--heading);
    margin-bottom: 14px;
}

.service-card h3 .ico {
    flex: none;
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border-radius: 10px;
    background: var(--badge-bg);
    color: var(--foot-icon);
    font-size: 15px;
}

.service-card ul { list-style: none; }

.service-card li {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 7px 0;
    font-size: 15px;
    color: var(--text-soft);
    border-top: 1px solid var(--divider);
}

.service-card li:first-child { border-top: none; }

.service-card li::before {
    content: "";
    flex: none;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--light-brown);
}

.notes {
    text-align: center;
    animation: fade 0.6s ease-out both;
}

.notes .big {
    font-size: 16px;
    font-weight: 700;
    color: var(--heading);
}

.notes .fine {
    margin-top: 8px;
    font-size: 12px;
    color: var(--foot-dim);
}

.section-label {
    width: 100%;
    text-align: center;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--foot-dim);
}

/* ---------- Footer ---------- */
footer {
    text-align: center;
    font-size: 13px;
    line-height: 1.8;
    color: var(--foot);
    animation: fade 0.6s ease-out 0.16s both;
}

.contact-info a {
    color: var(--foot);
    text-decoration: none;
    transition: opacity 0.2s ease;
}

@media (hover: hover) { .contact-info a:hover { opacity: 0.6; } }
.contact-info i { color: var(--foot-icon); margin-right: 6px; }

.copyright {
    margin-top: 6px;
    font-size: 12px;
    color: var(--foot-dim);
}

/* ---------- Pride ---------- */
.pride {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 7px;
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid var(--divider);
}

.pride-flags {
    display: flex;
    gap: 6px;
}

.flag {
    width: 36px;
    height: 23px;
    border-radius: 5px;
    box-shadow: 0 1px 3px rgba(26, 22, 19, 0.22);
}

.flag-trans {
    background: linear-gradient(180deg,
        #5bcefa 0 20%, #f5a9b8 0 40%, #ffffff 0 60%, #f5a9b8 0 80%, #5bcefa 0 100%);
}

.flag-rainbow {
    background: linear-gradient(180deg,
        #e40303 0 16.66%, #ff8c00 0 33.33%, #ffed00 0 50%,
        #008026 0 66.66%, #004dff 0 83.33%, #750787 0 100%);
}

.pride-text {
    font-size: 12px;
    font-weight: 500;
    line-height: 1.5;
    color: var(--foot-dim);
}

/* ---------- Logo pride easter egg ---------- */
.page-home .logo { cursor: pointer; }

#pride-fx {
    position: fixed;
    inset: 0;
    z-index: 60;
    pointer-events: none;
    overflow: hidden;
}

.fx-ring {
    position: absolute;
    transform: translate(-50%, -50%);
    border-style: solid;
    border-radius: 50%;
    width: 0;
    height: 0;
}

.fx-dot {
    position: absolute;
    border-radius: 50%;
    box-shadow: 0 0 8px rgba(0, 0, 0, 0.10);
}

/* ---------- Motion ---------- */
@keyframes fade {
    from { opacity: 0; transform: translateY(10px); }
    to   { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
    header, .cta-buttons, footer, .page-title, .badges,
    .services-grid, .notes { animation: none; }
}
