/* =======================================================
   WaterTotter mini-site
   Mirrors the app: deep indigo-navy, a glass of water with
   a living wave, outlined blue pills, glassy controls.
   The page "sinks" from steel blue into deep water.
   ======================================================= */

:root {
    --maxw: 1160px;
    --gutter: clamp(16px, 5vw, 36px);
    --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Inter", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

    --surface-top: #2c4a8e;
    --deep: #050a45;
    --abyss: #03063a;
    --water: #5db6f8;
    --water-2: #3b8de6;
    --water-light: #9bd6ff;
    --pill: #3d8cff;

    --text: #ffffff;
    --text-2: rgba(226, 236, 255, 0.76);
    --text-3: rgba(200, 216, 255, 0.52);
    --glass: rgba(255, 255, 255, 0.07);
    --glass-2: rgba(255, 255, 255, 0.12);
    --line: rgba(160, 192, 255, 0.18);

    --device-frame: #0d1131;
    --focus-ring: var(--water-light);
    --lightbox-backdrop: rgba(3, 6, 40, 0.9);
    color-scheme: dark;
}

body {
    position: relative;
    font-family: var(--font);
    font-size: 16px;
    line-height: 1.55;
    color: var(--text);
    background: linear-gradient(180deg, var(--surface-top) 0, #1b2d77 620px, #0c1555 1400px, var(--deep) 2400px, var(--abyss) 100%);
    background-color: var(--abyss);
}

svg {
    width: 1em;
    height: 1em;
    flex-shrink: 0;
}

main,
.footer {
    position: relative;
    z-index: 1;
}

/* Rising bubbles behind the hero */
.bubbles {
    position: absolute;
    inset: 0 0 auto;
    z-index: 0;
    height: 1200px;
    overflow: hidden;
    pointer-events: none;
}

.bubbles span {
    position: absolute;
    bottom: -40px;
    left: var(--x);
    width: var(--s);
    height: var(--s);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    background: radial-gradient(circle at 32% 30%, rgba(255, 255, 255, 0.45), rgba(255, 255, 255, 0.04) 62%);
    opacity: 0;
    animation: rise var(--dur) linear var(--delay) infinite;
}

@keyframes rise {
    0% {
        transform: translate(0, 0);
        opacity: 0;
    }
    10% {
        opacity: 0.8;
    }
    100% {
        transform: translate(var(--drift), -1240px);
        opacity: 0;
    }
}

.eyebrow {
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--water-light);
}

/* ---------- Top bar ---------- */
.topbar {
    position: sticky;
    top: 0;
    z-index: 50;
    border-bottom: 1px solid var(--line);
    background: rgba(22, 34, 96, 0.55);
    -webkit-backdrop-filter: saturate(160%) blur(18px);
    backdrop-filter: saturate(160%) blur(18px);
}

.topbar-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    min-height: 64px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 1.05rem;
    font-weight: 750;
    color: var(--text);
    text-decoration: none;
}

.brand-mark {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    box-shadow: 0 6px 18px -6px rgba(93, 182, 248, 0.9);
}

.topnav {
    display: flex;
    gap: 28px;
}

.topnav a {
    position: relative;
    font-size: 0.92rem;
    font-weight: 600;
    color: var(--text-2);
    text-decoration: none;
    transition: color 0.2s;
}

.topnav a:hover,
.topnav a.is-active {
    color: #fff;
}

.topnav a.is-active::after {
    content: "";
    position: absolute;
    bottom: -8px;
    left: 50%;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--water);
    transform: translateX(-50%);
}

.pill-link {
    padding: 8px 15px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--glass);
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--text);
    text-decoration: none;
    white-space: nowrap;
}

.pill-link:hover {
    background: var(--glass-2);
}

/* ---------- Hero ---------- */
.hero {
    position: relative;
    padding-block: clamp(40px, 6vw, 80px) clamp(96px, 10vw, 140px);
}

.hero-grid {
    display: grid;
    grid-template-columns: 1.05fr 0.95fr;
    align-items: center;
    gap: clamp(40px, 6vw, 72px);
}

.rating {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 6px 14px 6px 10px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--glass);
    font-size: 0.9rem;
    color: var(--text-2);
    text-decoration: none;
}

.rating b {
    color: #fff;
}

.stars {
    display: flex;
    gap: 2px;
    color: #ffd36a;
    font-size: 14px;
}

.hero h1 {
    margin: 22px 0 18px;
    font-size: clamp(2.6rem, 6.4vw, 4.8rem);
    font-weight: 800;
    line-height: 1.05;
    letter-spacing: -0.035em;
}

.water-word {
    background: linear-gradient(180deg, #d4efff 10%, var(--water) 90%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    text-decoration: underline wavy rgba(93, 182, 248, 0.6);
    text-decoration-thickness: 3px;
    text-underline-offset: 12px;
    text-decoration-skip-ink: none;
}

.lead {
    max-width: 32em;
    font-size: clamp(1.05rem, 1.6vw, 1.18rem);
    line-height: 1.6;
    color: var(--text-2);
}

.hero-cta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 30px;
}

.btn-store {
    display: inline-flex;
    align-items: center;
    gap: 11px;
    padding: 11px 24px 11px 18px;
    border-radius: 18px;
    background: linear-gradient(135deg, #52adff, #2f78e0);
    color: #fff;
    text-decoration: none;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.35),
        0 16px 34px -14px rgba(61, 140, 255, 0.95);
    transition: transform 0.25s;
}

.btn-store:hover {
    transform: translateY(-2px);
}

.btn-store svg {
    font-size: 26px;
}

.btn-store span {
    font-size: 1.18rem;
    font-weight: 700;
    line-height: 1.1;
}

.btn-store small {
    display: block;
    font-size: 0.7rem;
    font-weight: 500;
    opacity: 0.85;
}

.btn-glass {
    display: inline-flex;
    align-items: center;
    padding: 14px 22px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: var(--glass);
    font-weight: 650;
    color: #fff;
    text-decoration: none;
    transition: background-color 0.2s;
}

.btn-glass:hover {
    background: var(--glass-2);
}

.hero-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 22px;
    margin-top: 30px;
    list-style: none;
    font-size: 0.92rem;
    color: var(--text-2);
}

.hero-meta li {
    display: flex;
    align-items: center;
    gap: 8px;
}

.hero-meta svg {
    font-size: 17px;
    color: var(--water);
}

.hero-device {
    position: relative;
    display: grid;
    justify-items: center;
}

.hero-device::before {
    content: "";
    position: absolute;
    inset: 12% 0 18%;
    z-index: -1;
    border-radius: 50%;
    background: radial-gradient(closest-side, rgba(93, 182, 248, 0.38), transparent);
    filter: blur(24px);
}

.hero-shot {
    width: min(340px, 100%);
    height: auto;
    border-radius: 30px;
    box-shadow:
        0 0 0 1px rgba(255, 255, 255, 0.1),
        0 50px 90px -40px rgba(0, 0, 20, 0.9);
}

.wave-divider {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: clamp(40px, 6vw, 80px);
    fill: rgba(93, 182, 248, 0.07);
}

/* ---------- Promise strip ---------- */
.promise {
    padding-top: clamp(8px, 2vw, 24px);
}

.promise-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}

.promise-item {
    padding: 22px 24px;
    border: 1px solid var(--line);
    border-radius: 22px;
    background: var(--glass);
}

.promise-item strong {
    display: block;
    font-size: clamp(2.2rem, 4vw, 2.8rem);
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -0.03em;
}

.promise-item small {
    margin-left: 2px;
    font-size: 0.55em;
    color: #ffd36a;
    vertical-align: top;
}

.promise-item span {
    font-size: 0.92rem;
    color: var(--text-2);
}

/* ---------- Sections ---------- */
.section {
    padding-block: clamp(56px, 8vw, 104px);
    scroll-margin-top: 40px;
}

.section-head {
    margin-bottom: clamp(26px, 4vw, 42px);
}

.section-head h2,
.tips h2 {
    margin-top: 12px;
    font-size: clamp(2rem, 4.6vw, 3.3rem);
    font-weight: 800;
    line-height: 1.08;
    letter-spacing: -0.03em;
}

.narrow {
    max-width: 800px;
}

/* ---------- Features ---------- */
.feature-pair {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.card {
    display: flex;
    flex-direction: column;
    gap: 24px;
    padding: clamp(24px, 3vw, 34px);
    border: 1px solid var(--line);
    border-radius: 30px;
    background: linear-gradient(160deg, rgba(255, 255, 255, 0.09), rgba(255, 255, 255, 0.025));
}

.card-copy {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.card-icon {
    display: grid;
    width: 46px;
    height: 46px;
    place-items: center;
    border-radius: 15px;
    background: rgba(93, 182, 248, 0.16);
    color: var(--water-light);
    font-size: 22px;
}

.card h3,
.mini h3 {
    font-size: 1.4rem;
    font-weight: 750;
    line-height: 1.2;
    letter-spacing: -0.015em;
}

.card p,
.mini p {
    color: var(--text-2);
}

/* A crop of an App Store screenshot; --y picks the visible part */
.card-shot {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 11;
    margin-top: auto;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 22px;
    transition: transform 0.35s cubic-bezier(0.2, 0.7, 0.2, 1);
}

.card-shot:hover {
    transform: translateY(-4px);
}

.card-shot img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: 50% var(--y, 50%);
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-top: 20px;
}

.mini {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 24px;
    border: 1px solid var(--line);
    border-radius: 24px;
    background: var(--glass);
    transition:
        transform 0.3s,
        border-color 0.3s;
}

.mini:hover {
    border-color: rgba(93, 182, 248, 0.45);
    transform: translateY(-4px);
}

.mini h3 {
    font-size: 1.12rem;
}

.mini p {
    font-size: 0.95rem;
}

/* ---------- Screens ---------- */
.section-head-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 24px;
}

.shots-nav button {
    border: 1px solid var(--line);
    background: var(--glass);
    color: #fff;
}

.shots-nav button:not(:disabled):hover {
    background: var(--glass-2);
}

.shots {
    --shot-w: 252px;
    --shot-radius: 30px;
}

.shot-btn > img {
    box-shadow: 0 30px 50px -28px rgba(0, 0, 20, 0.9);
}

/* ---------- Tip jar ---------- */
.tips {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    gap: clamp(28px, 5vw, 56px);
    padding: clamp(26px, 4vw, 48px);
    border: 1px solid var(--line);
    border-radius: 34px;
    background:
        radial-gradient(30rem 20rem at 100% 0, rgba(93, 182, 248, 0.2), transparent 70%),
        linear-gradient(140deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.02));
}

.tips-copy p:last-child {
    margin-top: 16px;
    color: var(--text-2);
}

.tip-jar {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    list-style: none;
}

.tip-jar li {
    display: grid;
    justify-items: center;
    gap: 8px;
    padding: 22px 14px;
    border: 1px solid var(--line);
    border-radius: 22px;
    background: rgba(3, 6, 58, 0.5);
    text-align: center;
    transition:
        transform 0.3s,
        border-color 0.3s;
}

.tip-jar li:hover {
    border-color: rgba(93, 182, 248, 0.5);
    transform: translateY(-4px) rotate(-1deg);
}

.tip-emoji {
    font-size: 2.1rem;
    line-height: 1.1;
}

.tip-jar b {
    font-weight: 650;
}

/* ---------- What's new ---------- */
.changelog {
    position: relative;
    padding-left: 36px;
    list-style: none;
}

.changelog::before {
    content: "";
    position: absolute;
    top: 14px;
    bottom: 14px;
    left: 11px;
    width: 2px;
    background: linear-gradient(var(--water), rgba(93, 182, 248, 0.1));
}

.changelog li {
    position: relative;
    display: grid;
    grid-template-columns: 70px 1fr;
    gap: 14px;
    padding: 10px 0 20px;
}

.changelog li::before {
    content: "";
    position: absolute;
    top: 14px;
    left: -32px;
    width: 16px;
    height: 16px;
    border: 2px solid var(--water);
    border-radius: 50%;
    background: var(--deep);
}

.changelog li:first-child::before {
    background: var(--water);
    box-shadow: 0 0 14px rgba(93, 182, 248, 0.9);
}

.ver {
    padding-top: 2px;
    font-size: 0.82rem;
    font-weight: 800;
    letter-spacing: 0.03em;
    color: var(--water-light);
}

.changelog b {
    display: block;
    font-size: 1.05rem;
    font-weight: 650;
}

.changelog div span {
    font-size: 0.88rem;
    color: var(--text-3);
}

/* ---------- Support ---------- */
.support-grid {
    display: grid;
    grid-template-columns: 1.45fr 0.9fr;
    align-items: start;
    gap: 24px;
}

.faq details {
    margin-bottom: 10px;
    border: 1px solid var(--line);
    border-radius: 20px;
    background: var(--glass);
}

.faq summary {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    padding: 18px 20px;
    font-weight: 650;
    list-style: none;
    cursor: pointer;
}

.faq summary::-webkit-details-marker {
    display: none;
}

.faq summary::after {
    content: "";
    width: 26px;
    height: 26px;
    flex-shrink: 0;
    border-radius: 50%;
    background:
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 7v10M7 12h10' fill='none' stroke='%239bd6ff' stroke-width='2.4' stroke-linecap='round'/%3E%3C/svg%3E") center / 70% no-repeat,
        rgba(93, 182, 248, 0.16);
    transition: transform 0.3s;
}

.faq details[open] summary::after {
    transform: rotate(45deg);
}

.faq p {
    padding: 0 20px 18px;
    color: var(--text-2);
}

.faq a {
    font-weight: 600;
    color: var(--water-light);
}

.contact {
    position: sticky;
    top: 88px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 28px;
    border-radius: 28px;
    background: linear-gradient(160deg, #4aa6ff, #2f6fd6 55%, #233f9c);
    box-shadow: 0 30px 60px -30px rgba(61, 140, 255, 0.8);
}

.contact-icon {
    display: grid;
    width: 50px;
    height: 50px;
    place-items: center;
    border-radius: 15px;
    background: rgba(255, 255, 255, 0.2);
    font-size: 24px;
}

.contact h3 {
    font-size: 1.4rem;
    font-weight: 800;
}

.contact p {
    opacity: 0.9;
}

.btn-primary {
    margin-top: 6px;
    padding: 14px 20px;
    border-radius: 14px;
    background: #fff;
    font-weight: 700;
    text-align: center;
    color: #1d4fb8;
    text-decoration: none;
    transition: transform 0.2s;
}

.btn-primary:hover {
    transform: translateY(-2px);
}

.contact .contact-mail {
    font-size: 0.86rem;
    text-align: center;
    opacity: 0.8;
    user-select: all;
    word-break: break-all;
}

/* ---------- Footer ---------- */
.footer {
    padding-block: 32px 44px;
    border-top: 1px solid var(--line);
}

.footer-inner {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 18px 28px;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 22px;
}

.footer-links a {
    font-size: 0.92rem;
    color: var(--text-2);
    text-decoration: none;
}

.footer-links a:hover {
    color: #fff;
}

.copyright {
    font-size: 0.88rem;
    color: var(--text-3);
}

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
    .hero-grid,
    .feature-pair,
    .tips,
    .support-grid {
        grid-template-columns: 1fr;
    }

    .hero-copy {
        text-align: center;
    }

    .lead {
        margin-inline: auto;
    }

    .hero-cta,
    .hero-meta {
        justify-content: center;
    }

    .feature-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .promise-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .contact {
        position: static;
    }
}

@media (max-width: 760px) {
    .topnav {
        display: none;
    }

    .section-head-row .shots-nav {
        display: none;
    }

    .shots {
        --shot-w: 214px;
    }
}

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

    .promise-item {
        padding: 18px;
    }

    .hero-shot {
        width: min(300px, 100%);
    }

    .footer-inner {
        flex-direction: column;
        text-align: center;
    }

    .footer-links {
        justify-content: center;
    }
}
