/* Public landing page (templates/public/landing.html). Self-contained:
   the app's own app.css is for the logged-in screens. */

:root {
    --ink: #0f172a;
    --ink-2: #334155;
    --muted: #64748b;
    --line: #e3e8f0;
    --surface: #ffffff;
    --tint: #f5f8fd;
    --night: #0b1322;
    --night-2: #111c31;
    --primary: #2563eb;
    --primary-hover: #1d4ed8;
    --primary-soft: #eaf1ff;
    --sky: #38bdf8;
    --green: #059669;
    --green-soft: #e5f6ef;
    --amber: #d97706;
    --amber-soft: #fef4d9;
    --cyan: #0891b2;
    --cyan-soft: #e0f4f9;
    --radius: 14px;
    --radius-lg: 22px;
    --shadow: 0 1px 2px rgba(15, 23, 42, .05), 0 8px 28px rgba(15, 23, 42, .08);
    --shadow-lg: 0 20px 60px rgba(2, 6, 23, .35);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 76px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
    margin: 0;
    font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: var(--ink-2);
    background: var(--surface);
    -webkit-font-smoothing: antialiased;
}
h1, h2, h3 { color: var(--ink); line-height: 1.15; letter-spacing: -.025em; margin: 0 0 .6rem; }
p { margin: 0 0 1rem; }
a { color: var(--primary); text-decoration: none; }
img { max-width: 100%; }

.wrap { width: 100%; max-width: 1160px; margin: 0 auto; padding: 0 24px; }
.muted { color: var(--muted); }

.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 12px; z-index: 100; background: #fff; padding: .5rem .9rem; border-radius: 8px; }

/* Buttons */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
    font: inherit; font-weight: 600; border-radius: 999px; border: 1px solid transparent;
    padding: .6rem 1.15rem; cursor: pointer; white-space: nowrap;
    transition: background .15s, color .15s, border-color .15s, transform .15s, box-shadow .15s;
}
.btn:hover { transform: translateY(-1px); }
.btn:focus-visible, .nav-links a:focus-visible, .contact-item:focus-visible { outline: 3px solid rgba(56, 189, 248, .6); outline-offset: 2px; }
.btn-lg { padding: .85rem 1.5rem; font-size: 1.02rem; }
.btn-sm { padding: .45rem .95rem; font-size: .92rem; }
.btn-primary { background: var(--primary); color: #fff; box-shadow: 0 8px 24px rgba(37, 99, 235, .35); }
.btn-primary:hover { background: var(--primary-hover); }
.btn-light { background: #fff; color: var(--ink); }
.btn-light:hover { background: #eef4ff; }
.btn-ghost { color: #fff; border-color: rgba(255, 255, 255, .28); }
.btn-ghost:hover { background: rgba(255, 255, 255, .08); border-color: rgba(255, 255, 255, .5); }

/* Navigation */
.nav {
    position: sticky; top: 0; z-index: 50;
    background: rgba(11, 19, 34, .72);
    backdrop-filter: saturate(160%) blur(12px);
    -webkit-backdrop-filter: saturate(160%) blur(12px);
    border-bottom: 1px solid rgba(255, 255, 255, .06);
    transition: background .2s;
}
.nav.scrolled { background: rgba(11, 19, 34, .94); }
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 68px; }
.brand { display: inline-flex; align-items: center; gap: .65rem; color: #fff; font-weight: 750; font-size: 1.1rem; letter-spacing: -.015em; }
.brand-mark {
    display: grid; place-items: center; width: 36px; height: 36px; border-radius: 10px;
    background: linear-gradient(135deg, #3b82f6, #0ea5e9); color: #fff; font-size: 1.05rem;
    box-shadow: 0 6px 16px rgba(59, 130, 246, .4);
}
.nav-links { display: flex; align-items: center; gap: 1.6rem; }
.nav-links a:not(.btn) { color: rgba(255, 255, 255, .78); font-weight: 500; font-size: .95rem; }
.nav-links a:not(.btn):hover { color: #fff; }
.nav-toggle { display: none; background: none; border: 0; color: #fff; font-size: 1.7rem; cursor: pointer; padding: .2rem; }

/* Hero */
.hero {
    position: relative; overflow: hidden; color: #fff;
    background:
        radial-gradient(70% 70% at 0% 0%, rgba(59, 130, 246, .45), transparent 60%),
        radial-gradient(60% 60% at 100% 100%, rgba(14, 165, 233, .25), transparent 60%),
        var(--night);
    margin-top: -68px; padding: calc(68px + 5.5rem) 0 6rem;
}
.hero::after {
    content: ''; position: absolute; inset: 0; pointer-events: none;
    background-image:
        linear-gradient(rgba(255, 255, 255, .04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, .04) 1px, transparent 1px);
    background-size: 44px 44px;
    mask-image: radial-gradient(ellipse at 30% 30%, #000 30%, transparent 75%);
    -webkit-mask-image: radial-gradient(ellipse at 30% 30%, #000 30%, transparent 75%);
}
.hero-grid { position: relative; z-index: 1; display: grid; grid-template-columns: 1.1fr .9fr; gap: 3.5rem; align-items: center; }
.eyebrow {
    display: inline-flex; align-items: center; gap: .45rem; padding: .35rem .85rem; border-radius: 999px;
    background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .14);
    font-size: .85rem; font-weight: 600; color: #cfe3ff; margin-bottom: 1.4rem;
}
.hero h1 { color: #fff; font-size: clamp(2.3rem, 5vw, 3.75rem); font-weight: 800; letter-spacing: -.035em; margin-bottom: 1.2rem; }
.accent { background: linear-gradient(90deg, #93c5fd, #38bdf8); -webkit-background-clip: text; background-clip: text; color: transparent; }
.lead { font-size: 1.15rem; color: rgba(255, 255, 255, .78); max-width: 36rem; margin-bottom: 2rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .8rem; margin-bottom: 2rem; }
.hero-points { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: .6rem 1.4rem; font-size: .93rem; color: rgba(255, 255, 255, .78); }
.hero-points i { color: #34d399; margin-right: .35rem; }

/* Hero illustration */
.hero-visual { position: relative; min-height: 450px; }
.card-float {
    position: absolute; background: #fff; color: var(--ink-2); border-radius: var(--radius);
    box-shadow: var(--shadow-lg); padding: 1rem 1.1rem;
    animation: float 7s ease-in-out infinite;
}
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
@media (prefers-reduced-motion: reduce) { .card-float { animation: none; } }
.report { top: 0; right: 0; width: min(340px, 100%); padding: 1.3rem 1.35rem; }
.card-head { display: flex; align-items: center; gap: .55rem; font-size: .92rem; margin-bottom: .8rem; }
.card-head .muted { margin-left: auto; font-size: .82rem; }
.dot { width: 9px; height: 9px; border-radius: 50%; }
.dot-green { background: #10b981; box-shadow: 0 0 0 4px rgba(16, 185, 129, .15); }
.report-subject { font-size: 1.35rem; font-weight: 750; color: var(--ink); letter-spacing: -.02em; margin-bottom: .9rem; }
.bars { display: grid; gap: .65rem; margin-bottom: .9rem; }
.bars div { display: grid; grid-template-columns: 96px 1fr; align-items: center; gap: .6rem; font-size: .82rem; color: var(--muted); }
.bars i { display: block; height: 8px; border-radius: 99px; background: #eef2f8; position: relative; overflow: hidden; }
.bars i::after { content: ''; position: absolute; inset: 0; width: var(--w); border-radius: inherit; background: linear-gradient(90deg, #3b82f6, #38bdf8); }
.report-note { font-size: .88rem; margin: 0; padding: .7rem .8rem; background: var(--tint); border-radius: 10px; }
.reminder, .invoice { display: flex; align-items: center; gap: .8rem; font-size: .9rem; }
.reminder div, .invoice div { display: grid; line-height: 1.35; }
.reminder strong, .invoice strong { color: var(--ink); }
.reminder span, .invoice span { color: var(--muted); font-size: .83rem; }
.reminder { left: 0; top: 300px; animation-delay: -2.5s; }
.reminder > .bi { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 10px; background: var(--amber-soft); color: var(--amber); }
.invoice { right: 24px; top: 372px; animation-delay: -4.5s; }
.invoice > .bi:first-child { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 10px; background: var(--primary-soft); color: var(--primary); }
.ok { color: #10b981; font-size: 1.25rem; }

/* Sections */
.section { padding: 6rem 0; }
.section-tint { background: var(--tint); }
.section-head { max-width: 640px; margin: 0 auto 3.2rem; text-align: center; }
.section-head h2, .portal h2, .cta h2 { font-size: clamp(1.8rem, 3.4vw, 2.5rem); font-weight: 800; }
.section-head p { color: var(--muted); font-size: 1.08rem; }
.kicker { display: inline-block; font-size: .8rem; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; color: var(--primary); margin-bottom: .7rem; }
.kicker-light { color: #7dd3fc; }

.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 1.25rem; }
.feature {
    padding: 1.6rem; border: 1px solid var(--line); border-radius: var(--radius-lg); background: #fff;
    transition: transform .2s, box-shadow .2s, border-color .2s;
}
.feature:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: transparent; }
.feature h3 { font-size: 1.12rem; margin-top: 1rem; }
.feature p { margin: 0; font-size: .96rem; color: var(--muted); }
.icon { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 12px; font-size: 1.3rem; flex: none; }
.i-blue { background: var(--primary-soft); color: var(--primary); }
.i-green { background: var(--green-soft); color: var(--green); }
.i-amber { background: var(--amber-soft); color: var(--amber); }
.i-cyan { background: var(--cyan-soft); color: var(--cyan); }

.levels { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1.25rem; }
.level { background: #fff; border-radius: var(--radius-lg); padding: 1.6rem; box-shadow: var(--shadow); }
.level h3 { font-size: 1.1rem; display: flex; align-items: center; gap: .55rem; }
.level h3::before { content: ''; width: 10px; height: 10px; border-radius: 3px; background: linear-gradient(135deg, #3b82f6, #38bdf8); }
.level ul { list-style: none; padding: 0; margin: .9rem 0 0; display: flex; flex-wrap: wrap; gap: .5rem; }
.level li { font-size: .9rem; font-weight: 500; color: var(--ink-2); background: var(--tint); border: 1px solid var(--line); padding: .3rem .75rem; border-radius: 999px; }

.steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(var(--cols, 3), 1fr); gap: 1.25rem; position: relative; }
.steps li { position: relative; padding: 1.8rem 1.6rem; border-radius: var(--radius-lg); border: 1px solid var(--line); background: #fff; }
.step-no {
    display: grid; place-items: center; width: 42px; height: 42px; border-radius: 50%; margin-bottom: 1rem;
    background: var(--ink); color: #fff; font-weight: 750;
}
.steps h3 { font-size: 1.15rem; }
.steps p { margin: 0; color: var(--muted); }

/* Parent portal */
.section-dark {
    color: rgba(255, 255, 255, .8);
    background:
        radial-gradient(60% 80% at 100% 0%, rgba(59, 130, 246, .3), transparent 60%),
        var(--night);
}
.section-dark h2 { color: #fff; }
.portal { display: grid; grid-template-columns: 1.15fr .85fr; gap: 4rem; align-items: center; }
.portal-lead { font-size: 1.1rem; margin-bottom: 1.8rem; }
.portal-list { list-style: none; padding: 0; margin: 0 0 2.2rem; display: grid; gap: 1.1rem; }
.portal-list li { display: flex; gap: 1rem; align-items: flex-start; }
.portal-list > li > .bi {
    display: grid; place-items: center; width: 42px; height: 42px; flex: none; border-radius: 12px;
    background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .12); color: #7dd3fc; font-size: 1.15rem;
}
.portal-list strong { display: block; color: #fff; }
.portal-list span { font-size: .95rem; }

.phone {
    justify-self: center; width: 290px; padding: 12px; border-radius: 40px;
    background: linear-gradient(160deg, #1e293b, #0f172a); box-shadow: var(--shadow-lg), inset 0 0 0 1px rgba(255, 255, 255, .08);
}
.phone-screen { border-radius: 30px; background: #f5f8fd; padding: 1.1rem .95rem 1.4rem; display: grid; gap: .75rem; min-height: 470px; align-content: start; }
.phone-top { display: flex; align-items: center; gap: .45rem; font-weight: 700; color: var(--ink); font-size: .92rem; padding: .3rem .25rem .6rem; }
.phone-top .bi { color: var(--primary); }
.phone-card { background: #fff; border-radius: 16px; padding: .95rem 1rem; display: grid; gap: .15rem; box-shadow: 0 1px 2px rgba(15, 23, 42, .06); font-size: .86rem; color: var(--ink-2); }
.phone-card .muted { font-size: .76rem; text-transform: uppercase; letter-spacing: .06em; font-weight: 600; }
.phone-card strong { color: var(--ink); font-size: 1rem; }
.phone-card.row { display: flex; align-items: center; justify-content: space-between; }
.phone-card.row div { display: grid; }
.stars { color: #f59e0b; letter-spacing: 2px; }

/* Contact */
.cta {
    display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; align-items: center;
    padding: 3.2rem; border-radius: 28px;
    background: linear-gradient(135deg, #eef4ff, #f0fbff); border: 1px solid #dbe7fb;
}
.cta p { color: var(--muted); font-size: 1.05rem; margin: 0; }
.contact-list { display: grid; gap: .8rem; }
.contact-item {
    display: flex; align-items: center; gap: 1rem; padding: 1rem 1.1rem; border-radius: var(--radius);
    background: #fff; color: var(--ink-2); box-shadow: var(--shadow); transition: transform .15s;
}
.contact-item:hover { transform: translateX(4px); }
.contact-item div { display: grid; line-height: 1.35; min-width: 0; }
.contact-item .muted { font-size: .82rem; }
.contact-item strong { color: var(--ink); overflow-wrap: anywhere; }

/* Contact with the enquiry form */
.cta-form { grid-template-columns: .9fr 1.1fr; align-items: start; }
.cta-form .contact-list { margin-top: 1.6rem; }
.enquiry { background: #fff; border-radius: var(--radius-lg); padding: 1.8rem; box-shadow: var(--shadow); }
.enquiry form { display: grid; gap: .9rem; }
.field { display: grid; gap: .35rem; font-size: .88rem; font-weight: 600; color: var(--ink); }
.field input, .field select, .field textarea {
    font: inherit; font-weight: 400; font-size: .97rem; color: var(--ink);
    padding: .7rem .85rem; border: 1px solid #d6deea; border-radius: 10px; background: #fff; width: 100%;
    transition: border-color .15s, box-shadow .15s;
}
.field textarea { resize: vertical; min-height: 92px; }
.field input:focus, .field select:focus, .field textarea:focus {
    outline: none; border-color: var(--primary); box-shadow: 0 0 0 4px rgba(37, 99, 235, .14);
}
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: .9rem; }
.field-note { font-size: .84rem; color: var(--muted); margin: -.2rem 0 .2rem; }
.enquiry .btn { justify-self: start; }
.enquiry .btn[disabled] { opacity: .6; cursor: not-allowed; transform: none; }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.enquiry-errors { background: #fdecec; border: 1px solid #f7c8c8; color: #991b1b; border-radius: 10px; padding: .7rem .9rem; font-size: .92rem; }
.enquiry-errors p { margin: 0; }
.enquiry-errors p + p { margin-top: .25rem; }
.enquiry-done { display: grid; justify-items: center; text-align: center; gap: .6rem; padding: 2rem 1rem; }
.enquiry-done .bi { font-size: 2.6rem; color: var(--green); }
.enquiry-done p { color: var(--ink); font-size: 1.08rem; font-weight: 500; margin: 0; }

/* Announcement banner and preview strip */
.banner { background: linear-gradient(90deg, #1d4ed8, #0284c7); color: #fff; font-size: .93rem; }
.banner-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: .4rem .8rem; padding-top: .6rem; padding-bottom: .6rem; text-align: center; }
.banner a { color: #fff; font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }
.preview-bar { position: sticky; top: 0; z-index: 60; background: #f59e0b; color: #1f1300; text-align: center; font-weight: 600; font-size: .92rem; padding: .55rem 1rem; }

/* Footer */
.footer { background: var(--night); color: rgba(255, 255, 255, .6); padding: 2.6rem 0; }
.footer-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1.2rem; }
.footer nav { display: flex; flex-wrap: wrap; gap: 1.4rem; }
.footer nav a { color: rgba(255, 255, 255, .72); font-size: .93rem; }
.footer nav a:hover { color: #fff; }
.footer .muted { color: rgba(255, 255, 255, .45); margin: 0; font-size: .88rem; width: 100%; }

/* Scroll-in (only when JavaScript runs; see the inline script) */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
.js .reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .js .reveal { opacity: 1; transform: none; transition: none; } }

/* Tablet */
@media (max-width: 1024px) {
    .features { grid-template-columns: repeat(2, 1fr); }
    .hero-grid { grid-template-columns: 1fr; gap: 3rem; }
    .hero-visual { max-width: 460px; width: 100%; margin: 0 auto; }
    .portal { grid-template-columns: 1fr; gap: 3rem; }
    .cta-form { grid-template-columns: 1fr; }
    .steps { grid-template-columns: repeat(min(var(--cols, 3), 2), 1fr); }
}

/* Phone */
@media (max-width: 760px) {
    .wrap { padding: 0 16px; }
    .nav-toggle { display: block; }
    .nav-links {
        position: absolute; top: 68px; left: 0; right: 0; flex-direction: column; align-items: stretch; gap: 0;
        background: var(--night); border-bottom: 1px solid rgba(255, 255, 255, .08); padding: .5rem 16px 1rem;
        display: none;
    }
    .nav-links.open { display: flex; }
    .nav-links a:not(.btn) { padding: .8rem 0; border-bottom: 1px solid rgba(255, 255, 255, .06); }
    .nav-links .btn { margin-top: .8rem; }
    .hero { padding: calc(68px + 3.2rem) 0 4rem; }
    .lead { font-size: 1.05rem; }
    .hero-actions .btn { width: 100%; }
    .hero-visual { min-height: 440px; }
    .report { width: 100%; }
    .reminder { top: 300px; }
    .invoice { right: 0; top: 372px; }
    .section { padding: 4.2rem 0; }
    .features, .steps { grid-template-columns: 1fr; }
    .field-row { grid-template-columns: 1fr; }
    .enquiry { padding: 1.3rem; }
    .enquiry .btn { justify-self: stretch; }
    .cta { grid-template-columns: 1fr; padding: 2rem 1.3rem; gap: 1.8rem; }
    .phone { width: 100%; max-width: 290px; }
}
