/* ==========================================================================
   Electric Websites 2027 – shared stylesheet
   ========================================================================== */

:root {
    /* Palette */
    --ink:        #0B1324;   /* dark sections, headings */
    --ink-2:      #15213A;   /* raised surfaces on dark */
    --paper:      #FFFFFF;
    --mist:       #F3F5FA;   /* alternate light sections */
    --line:       #E2E6EF;
    --text:       #1E2638;
    --muted:      #5B6579;
    --on-dark:    #E8ECF6;
    --on-dark-2:  #A3ADC2;
    --volt:       #3555FF;   /* primary: electric blue */
    --volt-dark:  #2340D9;
    --volt-soft:  #E8ECFF;
    --spark:      #FFCF3F;   /* highlight: spark yellow */

    --font-head: 'Plus Jakarta Sans', system-ui, sans-serif;
    --font-body: 'Inter', system-ui, sans-serif;

    --radius:    14px;
    --radius-sm: 8px;
    --shadow:    0 10px 30px rgba(11, 19, 36, .08);
    --shadow-lg: 0 24px 60px rgba(11, 19, 36, .18);
    --wrap:      1180px;
    --header-h:  72px;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 12px); }

body {
    margin: 0;
    font-family: var(--font-body);
    font-size: 17px;
    line-height: 1.65;
    color: var(--text);
    background: var(--paper);
    -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
/* All links ease into their hover state (colour, background, border, underline) */
a { color: var(--volt); transition: color .3s ease, background-color .3s ease, border-color .3s ease, text-decoration-color .3s ease, opacity .3s ease; }

h1, h2, h3, h4 {
    font-family: var(--font-head);
    color: var(--ink);
    line-height: 1.15;
    margin: 0 0 .5em;
    /*letter-spacing: -.02em;*/
}
h1 { font-size: clamp(2.2rem, 4.4vw, 3.4rem); font-weight: 800; letter-spacing:1px; }
h2 { font-size: clamp(1.8rem, 3.4vw, 2.6rem); font-weight: 800; }
h3 { font-size: 1.25rem; font-weight: 700; }
p  { margin: 0 0 1em; }

/* No single words left alone on the last line: balance headings, tidy paragraph endings.
   (Browsers without "pretty" get a non-breaking space added by a script in includes/site.php.) */
h1, h2, h3, h4, .eyebrow, .stat strong { text-wrap: balance; }
p, li, blockquote, figcaption, summary, .work-card > span { text-wrap: pretty; }
/* Short two-line captions read best with both lines evened out */
.stat span { text-wrap: balance; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }

.skip-link { position: absolute; left: -9999px; top: 8px; background: var(--spark); color: var(--ink); padding: 8px 14px; border-radius: 6px; z-index: 100; }
.skip-link:focus { left: 8px; }

.eyebrow {
    display: inline-block;
    font-family: var(--font-head);
    font-size: .8rem;
    font-weight: 700;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--volt);
    margin-bottom: 14px;
}
.dark .eyebrow { color: var(--spark); }

.lead { font-size: 1.15rem; color: var(--muted); max-width: 640px; }
.dark .lead { color: var(--on-dark-2); }

.highlight { color: var(--volt); }
.dark .highlight { color: var(--spark); }

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex; align-items: center; gap: 8px;
    font-family: var(--font-head); font-weight: 700; font-size: 1rem;
    padding: 14px 26px; border-radius: 999px;
    border: 2px solid transparent;
    text-decoration: none; cursor: pointer;
    transition: background .3s ease, color .3s ease, border-color .3s ease, transform .3s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--volt); color: #fff; }
.btn-primary:hover { background: var(--volt-dark); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--ink); }
.dark .btn-ghost { color: #fff; border-color: rgba(255,255,255,.3); }
.dark .btn-ghost:hover { border-color: #fff; }
.btn-spark { background: var(--spark); color: var(--ink); }
.btn-spark:hover { background: #ffd95f; }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }

.arrow-link { font-family: var(--font-head); font-weight: 700; text-decoration: none; display: inline-flex; align-items: center; gap: 6px; }
.arrow-link svg { transition: transform .3s ease; }
.arrow-link:hover svg { transform: translateX(4px); }

/* ---------- Header ---------- */
.site-header {
    position: sticky; top: 0; z-index: 50;
    height: var(--header-h);
    background: rgba(11, 19, 36, .92);
    backdrop-filter: saturate(160%) blur(10px);
    -webkit-backdrop-filter: saturate(160%) blur(10px);
    border-bottom: 1px solid rgba(255,255,255,.06);
}
.site-header .wrap { height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 24px; }

.logo { display: flex; align-items: center; gap: 10px; text-decoration: none; color: #fff; }
.logo img { width: auto; height: 36px; }
.logo span { font-family: var(--font-head); font-weight: 800; font-size: 1.2rem; letter-spacing: -.01em; line-height: 1; }
.logo span b { color: var(--spark); font-weight: 800; }

.main-nav { display: flex; align-items: center; gap: 28px; }
.main-nav a { color: var(--on-dark); text-decoration: none; font-weight: 500; font-size: .95rem; }
.main-nav a:hover, .main-nav a[aria-current="page"] { color: var(--spark); }
.main-nav .btn { padding: 10px 20px; font-size: .9rem; color: #fff; }
.main-nav .btn:hover { color: #fff; }

.menu-toggle { display: none; background: none; border: 0; color: #fff; padding: 8px; cursor: pointer; }

@media (max-width: 900px) {
    .menu-toggle { display: block; }
    .main-nav {
        position: fixed; top: var(--header-h); right: 0; bottom: 0;
        width: min(320px, 100%);
        flex-direction: column; align-items: stretch; gap: 0;
        background: var(--ink); padding: 16px 24px 32px;
        transform: translateX(100%); transition: transform .25s ease;
        box-shadow: var(--shadow-lg);
    }
    .main-nav.open { transform: translateX(0); }
    .main-nav a { padding: 14px 0; border-bottom: 1px solid rgba(255,255,255,.08); font-size: 1.05rem; }
    .main-nav .btn { margin-top: 20px; justify-content: center; border-bottom: 0; }
}

/* ---------- Sections ---------- */
.section { padding: 96px 0; }
.section-tight { padding: 64px 0; }
.mist { background: var(--mist); }
.dark { background: var(--ink); color: var(--on-dark); }
.dark h1, .dark h2, .dark h3 { color: #fff; }
.section-head { max-width: 720px; margin-bottom: 48px; }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }
.section-head.center .lead { margin-left: auto; margin-right: auto; }

/* ---------- Page heading (inner pages) ---------- */
.page-hero { position: relative; overflow: hidden; padding: 72px 0 64px; }
.page-hero::before {
    content: ""; position: absolute; inset: 0; pointer-events: none;
    background: radial-gradient(520px 320px at 88% 0%, rgba(53, 85, 255, .35), transparent 70%);
}
.page-hero .wrap { position: relative; }
.page-hero h1 { color: #fff; max-width: 760px; }
.page-hero .lead { margin-bottom: 0; }
@media (max-width: 620px) { .page-hero { padding: 52px 0 44px; } }

/* ---------- Legal / long-read pages (Terms & Conditions) ---------- */
.legal { display: grid; grid-template-columns: 260px 1fr; gap: 64px; align-items: start; }
.legal-toc { position: sticky; top: calc(var(--header-h) + 24px); }
.legal-toc h2 { font-size: .8rem; letter-spacing: .12em; text-transform: uppercase; color: var(--volt); margin-bottom: 14px; }
.legal-toc ol { list-style: none; counter-reset: toc; padding: 0; margin: 0; border-left: 2px solid var(--line); }
.legal-toc li { counter-increment: toc; }
.legal-toc a { display: flex; gap: 10px; padding: 5px 0 5px 16px; margin-left: -2px; border-left: 2px solid transparent; color: var(--muted); text-decoration: none; font-size: .92rem; line-height: 1.4; }
.legal-toc a::before { content: counter(toc) "."; flex: none; min-width: 1.6em; color: var(--volt); font-weight: 600; }
.legal-toc a:hover, .legal-toc a.active { color: var(--ink); border-left-color: var(--volt); }
.legal-body { max-width: 720px; }
.clause { padding: 0 0 28px; margin-bottom: 28px; border-bottom: 1px solid var(--line); scroll-margin-top: calc(var(--header-h) + 24px); }
.clause:last-of-type { border-bottom: 0; }
.clause h2 { display: flex; align-items: center; gap: 14px; font-size: 1.3rem; margin-bottom: 12px; }
.clause-num {
    flex: none; width: 34px; height: 34px; border-radius: 50%;
    display: grid; place-items: center;
    background: var(--volt-soft); color: var(--volt); font-size: .9rem; font-weight: 800;
}
.clause p { color: var(--text); }
.clause p:last-child { margin-bottom: 0; }
.legal-questions { margin-top: 8px; padding: 20px 24px; background: var(--mist); border-radius: var(--radius); color: var(--muted); }
@media (max-width: 900px) {
    .legal { grid-template-columns: 1fr; gap: 32px; }
    .legal-toc { position: static; }
    .legal-toc ol { columns: 2; column-gap: 24px; }
}
@media (max-width: 520px) { .legal-toc ol { columns: 1; } }

/* Placeholder for a portfolio site that has no screenshot yet */
.browser-placeholder { aspect-ratio: 10 / 7; display: grid; place-items: center; background: var(--mist); color: var(--muted); font-family: var(--font-head); font-weight: 700; padding: 20px; text-align: center; }

/* ---------- Hero ---------- */
.hero { position: relative; overflow: hidden; padding: 96px 0 110px; }
.hero::before {
    content: ""; position: absolute; inset: 0;
    background:
        radial-gradient(600px 400px at 85% 20%, rgba(53, 85, 255, .35), transparent 70%),
        radial-gradient(500px 300px at 10% 90%, rgba(255, 207, 63, .10), transparent 70%);
    pointer-events: none;
}
.hero .wrap { position: relative; display: grid; grid-template-columns: 1.05fr 1fr; gap: 56px; align-items: center; }
.hero h1 { color: #fff; }
.hero-points { list-style: none; padding: 0; margin: 28px 0 0; display: flex; flex-wrap: wrap; gap: 10px 22px; color: var(--on-dark-2); font-size: .95rem; }
.hero-points li { display: flex; align-items: center; gap: 8px; }
.hero-points svg { color: var(--spark); flex: none; }

/* Three equal screenshots in an overlapping cascade (no rotation, so they stay sharp) */
.hero-shots { position: relative; width: 100%; max-width: 540px; margin-left: auto; aspect-ratio: 10 / 8.4; }
.browser {
    background: #fff; border-radius: 10px; overflow: hidden;
    box-shadow: var(--shadow-lg);
    border: 1px solid rgba(255,255,255,.1);
}
.browser-bar { height: 26px; background: #E9EDF5; display: flex; align-items: center; gap: 6px; padding: 0 10px; }
.browser-bar i { width: 9px; height: 9px; border-radius: 50%; background: #C5CCDA; }
.browser img { width: 100%; aspect-ratio: 10 / 7; object-fit: cover; object-position: top; }
.hero-shots .browser { position: absolute; width: 64%; }
.hero-shots .browser:nth-child(1) { top: 0;   left: 0;   z-index: 1; }
.hero-shots .browser:nth-child(2) { top: 50%; left: 18%; z-index: 2; transform: translateY(-50%); }
.hero-shots .browser:nth-child(3) { bottom: 0; left: 36%; z-index: 3; }

@media (max-width: 900px) {
    .hero { padding: 64px 0 72px; }
    .hero .wrap { grid-template-columns: 1fr; }
    .hero-shots { margin: 0 auto; }
}

/* ---------- Stats / statement strip ---------- */
.statement { display: grid; grid-template-columns: 1.2fr 1fr; gap: 56px; align-items: center; }
.stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.stat { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.stat strong { display: block; font-family: var(--font-head); font-size: 1.6rem; font-weight: 800; color: var(--ink); line-height: 1.2; }
.stat span { display: block; color: var(--muted); font-size: .92rem; }
@media (max-width: 900px) { .statement { grid-template-columns: 1fr; gap: 32px; } }

/* ---------- Service cards ---------- */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.card {
    position: relative;
    background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
    padding: 30px; transition: transform .4s ease, border-color .4s ease;
}
/* The hover shadow lives on its own layer and fades in/out smoothly */
.card::after {
    content: ""; position: absolute; inset: -1px; border-radius: inherit; pointer-events: none;
    box-shadow: 0 18px 40px rgba(11, 19, 36, .14);
    opacity: 0; transition: opacity .4s ease;
}
.card:hover { transform: translateY(-4px); border-color: transparent; }
.card:hover::after { opacity: 1; }
.card p { color: var(--muted); margin-bottom: 0; }
.icon {
    width: 52px; height: 52px; border-radius: 12px;
    display: grid; place-items: center;
    background: var(--volt-soft); color: var(--volt);
    margin-bottom: 20px;
}
@media (max-width: 960px) { .cards { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px) { .cards { grid-template-columns: 1fr; } }

/* ---------- Steps ---------- */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; counter-reset: step; }
.step { background: var(--ink-2); border-radius: var(--radius); padding: 32px; border: 1px solid rgba(255,255,255,.06); }
.step-num {
    font-family: var(--font-head); font-weight: 800; font-size: .85rem;
    color: var(--ink); background: var(--spark);
    width: 36px; height: 36px; border-radius: 50%;
    display: grid; place-items: center; margin-bottom: 20px;
}
.step p { color: var(--on-dark-2); margin-bottom: 0; }
@media (max-width: 860px) { .steps { grid-template-columns: 1fr; } }

/* ---------- CTA band ---------- */
.cta-band {
    background: linear-gradient(120deg, var(--volt) 0%, #5B3CFF 100%);
    border-radius: 24px; padding: 56px;
    display: flex; align-items: center; justify-content: space-between; gap: 32px; flex-wrap: wrap;
    color: #fff;
}
.cta-band h2 { color: #fff; margin-bottom: 8px; }
.cta-band p { margin: 0; color: rgba(255,255,255,.85); max-width: 560px; }
@media (max-width: 620px) { .cta-band { padding: 36px 28px; } }

/* ---------- Portfolio grid ---------- */
.work-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.work-card { text-decoration: none; color: inherit; display: block; }
.work-card .browser { border-color: var(--line); box-shadow: var(--shadow); transition: transform .25s, box-shadow .25s; }
.work-card:hover .browser { transform: translateY(-6px); box-shadow: var(--shadow-lg); }
.work-card h3 { margin: 16px 0 2px; font-size: 1.08rem; }
.work-card span { color: var(--muted); font-size: .9rem; }
.work-card > span { display: block; }
@media (max-width: 900px) { .work-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .work-grid { grid-template-columns: 1fr; } }

/* ---------- Testimonials ---------- */
.quotes { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 24px; }
.quote { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 30px; margin: 0; display: flex; flex-direction: column; }
.quote svg { color: var(--volt); margin-bottom: 16px; }
.quote blockquote { margin: 0 0 20px; font-size: 1.02rem; flex: 1; }
.quote figcaption strong { display: block; font-family: var(--font-head); color: var(--ink); }
.quote figcaption > span { color: var(--muted); font-size: .9rem; }
.quote figcaption a { color: var(--volt); font-weight: 500; text-decoration: underline; text-decoration-color: transparent; text-underline-offset: 3px; }
.quote figcaption a:hover { text-decoration-color: currentColor; }
.quote figcaption a::after { content: " \2197"; font-size: 1.25em; line-height: 1; vertical-align: -0.05em; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- FAQ ---------- */
.faq-layout { display: grid; grid-template-columns: 1fr 1.6fr; gap: 56px; align-items: start; }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
    list-style: none; cursor: pointer;
    font-family: var(--font-head); font-weight: 700; font-size: 1.08rem; color: var(--ink);
    padding: 22px 40px 22px 0; position: relative;
    transition: color .3s ease;
}
.faq summary:hover { color: var(--volt); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
    content: ""; position: absolute; right: 6px; top: 50%;
    width: 12px; height: 12px; margin-top: -9px;
    border-right: 2.5px solid var(--volt); border-bottom: 2.5px solid var(--volt);
    transform: rotate(45deg); transition: transform .4s ease, margin-top .4s ease;
}
/* Arrow points up when open (and turns back straight away when closing starts) */
.faq details[open]:not(.is-closing) summary::after { transform: rotate(225deg); margin-top: -3px; }
.faq details p { color: var(--muted); padding-right: 40px; margin: 0; padding-bottom: 22px; }
/* Answers slide open/closed via a script in includes/site.php */
.faq details.is-animating { overflow: hidden; }
@media (max-width: 860px) { .faq-layout { grid-template-columns: 1fr; gap: 24px; } }

/* ---------- Contact ---------- */
.contact-layout { display: grid; grid-template-columns: 1fr 1.2fr; gap: 56px; align-items: start; }
.contact-list { list-style: none; padding: 0; margin: 28px 0 0; }
.contact-list li { display: flex; gap: 14px; align-items: flex-start; margin-bottom: 18px; }
.contact-list .icon { width: 44px; height: 44px; margin: 0; background: rgba(255,255,255,.08); color: var(--spark); flex: none; }
.contact-list strong { display: block; color: #fff; font-family: var(--font-head); }
.contact-list a { color: var(--on-dark); }
.form-card { background: var(--paper); border-radius: 20px; padding: 36px; color: var(--text); box-shadow: var(--shadow-lg); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field { margin-bottom: 16px; }
.field label { display: block; font-weight: 600; font-size: .9rem; margin-bottom: 6px; color: var(--ink); }
.field input, .field textarea {
    width: 100%; font: inherit; font-size: 1rem; color: var(--text);
    padding: 12px 14px; border: 1.5px solid var(--line); border-radius: var(--radius-sm); background: var(--paper);
    transition: border-color .2s, box-shadow .2s;
}
.field input:focus, .field textarea:focus { outline: none; border-color: var(--volt); box-shadow: 0 0 0 4px var(--volt-soft); }
.field textarea { resize: vertical; min-height: 130px; }
.form-note { font-size: .82rem; color: var(--muted); margin: 14px 0 0; }
/* Hide Google's floating reCAPTCHA badge (it sits under the chat button).
   Allowed because the form shows the reCAPTCHA notice with Google's links instead. */
.grecaptcha-badge { visibility: hidden; }
.form-card .btn { width: 100%; justify-content: center; }
.hp { position: absolute; left: -9999px; }
@media (max-width: 900px) { .contact-layout { grid-template-columns: 1fr; } }
@media (max-width: 520px) { .form-row { grid-template-columns: 1fr; gap: 0; } .form-card { padding: 26px 20px; } }

/* ---------- Footer ---------- */
.site-footer { background: #070D1A; color: var(--on-dark-2); padding: 72px 0 32px; font-size: .95rem; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr; gap: 40px; }
.site-footer h4 { color: #fff; font-size: 1rem; margin-bottom: 16px; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: 10px; }
.site-footer a { color: var(--on-dark-2); text-decoration: none; }
.site-footer a:hover { color: var(--spark); }
.site-footer .logo { margin-bottom: 16px; }
.footer-base { border-top: 1px solid rgba(255,255,255,.08); margin-top: 48px; padding-top: 24px; display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; font-size: .85rem; }
.footer-links { display: flex; align-items: center; gap: 24px; flex-wrap: wrap; }
.site-footer a.terms-link { text-decoration: underline; text-decoration-color: currentColor; text-underline-offset: 3px; }
.site-footer a.terms-link:hover { text-decoration-color: transparent; }
.site-footer a.to-top { display: inline-flex; align-items: center; gap: 6px; padding: 6px 14px; border: 1px solid rgba(255,255,255,.18); border-radius: 999px; color: var(--on-dark); font-weight: 600; }
.site-footer a.to-top:hover { border-color: var(--spark); color: var(--spark); }
/* Keep the Top link clear of the floating chat button (which sits 20-80px from the right edge).
   Below ~1360px wide the footer's right edge reaches that zone, so reserve space on the right. */
@media (max-width: 1360px) { .footer-base { padding-right: 76px; } }
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr; } }

/* ---------- Reveal-on-scroll ---------- */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .6s ease, transform .6s ease; }
.reveal.in { opacity: 1; transform: none; }
/* Cards use both the scroll fade-in and a hover effect: combine their transitions
   (otherwise .reveal's transition would replace the card's hover transition) */
.card.reveal { transition: opacity .6s ease, transform .5s ease, border-color .4s ease; }
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .reveal { opacity: 1; transform: none; transition: none; }
    .card.reveal { transition: border-color .4s ease; }
    a, .btn, .arrow-link svg { transition: none; }
    .btn:hover, .card:hover, .work-card:hover .browser { transform: none; }
}

@media (max-width: 620px) {
    body { font-size: 16px; }
    .section { padding: 72px 0; }
    .wrap { padding: 0 16px; }
}
