/* CSS Reset (subset) */
*,
*::before,
*::after {
    box-sizing: border-box
}

html:focus-within {
    scroll-behavior: smooth
}

body {
    margin: 0;
    min-height: 100vh;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased
}

img {
    max-width: 100%;
    display: block
}

a {
    text-decoration: none
}

a:visited {
    color: inherit;
}

a.brand span {
    color: var(--clr-dark);
}

a.brand span small.thin {
    font-weight: 100;
    font-style: italic;
}

:root {
    --clr-primary: #00abbc;
    /* teal */
    --clr-secondary: #4ab770;
    /* steel blue */
    --clr-light: #F5F7F4;
    /* near white */
    --clr-dark: #1E1420;
    /* oxblood black */
    --clr-contrast: #CF4379;
    /* rose */
    --radius-xl: 24px;
    --radius-lg: 16px;
    --radius-md: 12px;
    --radius-sm: 8px;
    /* --shadow-1: 0 10px 30px rgba(0, 0, 0, .08); */
    --shadow-2: 0 24px 60px rgba(0, 0, 0, .12);
    --maxw: 1200px;
}

body {
    font-family: "Funnel Display", system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, Cantarell, Noto Sans, sans-serif;
    color: var(--clr-dark);
    background: linear-gradient(180deg, #fcfffd 0%, #f3f7f5 60%, #ecf3f1 100%)
}

.container {
    max-width: var(--maxw);
    margin-inline: auto;
    padding: clamp(16px, 2vw, 24px)
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: .6rem;
    padding: .9rem 1.2rem;
    border-radius: 999px;
    font-weight: 600;
    border: 2px solid transparent;
    transition: transform .2s ease, box-shadow .2s ease, background .2s ease
}

.btn:focus-visible {
    outline: 3px solid var(--clr-contrast);
    outline-offset: 2px
}

.btn.primary {
    background: var(--clr-primary);
    color: white;
    box-shadow: var(--shadow-1)
}

.btn.primary:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-2)
}

.btn.ghost {
    background: transparent;
    border-color: color-mix(in oklab, var(--clr-primary) 45%, black 0%);
    color: var(--clr-primary)
}

.btn.ghost:hover {
    background: transparent;
    background: var(--clr-primary);
    color: white;
}

.badge {
    display: inline-flex;
    gap: .5rem;
    align-items: center;
    background: color-mix(in oklab, var(--clr-primary) 18%, white 82%);
    color: var(--clr-dark);
    padding: .4rem .7rem;
    border-radius: 999px;
    font-size: .82rem;
    font-weight: 600
}

header.nav {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 255, 255, .7);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(0, 0, 0, .06)
}

.nav-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: .8rem 1rem;
    gap: 1rem
}

.brand {
    display: flex;
    align-items: center;
    gap: .7rem;
    font-weight: 800;
    letter-spacing: .2px
}

.brand .logo {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background-image: url("../assets/logo.png");
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    box-shadow: 0 6px 16px rgba(0, 0, 0, .18);
    box-shadow: inset 0 0 0 3px rgba(255, 255, 255, .9), var(--shadow-1)
}

small.tagline {
    display: inline;
}

.nav-links {
    display: flex;
    gap: 1.2rem;
    align-items: center
}

.nav-links a {
    color: var(--clr-dark);
    font-weight: 600;
    opacity: .85
}

.nav-links a:hover {
    opacity: 1
}

.ham {
    display: none;
    background: none;
    border: 0;
    color: var(--clr-dark);
}

.ham:active {
    opacity: 0.7;
}

/* HERO */
.hero {
    position: relative;
    overflow: hidden
}

.hero .container {
    display: grid;
    gap: clamp(20px, 4vw, 56px);
    grid-template-columns: 1.1fr .9fr;
    align-items: center;
    padding-top: clamp(24px, 8vh, 56px);
    padding-bottom: clamp(24px, 8vh, 56px)
}

.kicker {
    color: var(--clr-contrast);
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
    font-size: .82rem
}

h1 {
    font-size: clamp(2rem, 4vw, 3.2rem);
    line-height: 1.05;
    margin: .4rem 0 1rem
}

h1#hero-title {
    margin: 30px 0;
}

.lead {
    font-size: clamp(1rem, 1.2vw, 1.2rem);
    opacity: .9;
    line-height: 160%;
}

.lead a {
    color: var(--clr-primary);
    font-weight: 600;
    text-decoration: none;
}

.cta {
    display: flex;
    flex-wrap: wrap;
    gap: .8rem;
    margin-top: 1.2rem
}

.store-badges {
    display: flex;
    gap: 0;
    align-items: center;
    width: 100%;
    margin: 0 auto;
    flex-direction: column;
}

.store-badges img {
    height: 46px;
    display: block;
    margin: 10px 0 0 0;
    border-radius: 0;
    box-shadow: none
}

.hero-card {
    position: relative;
    background: transparent;
    border-radius: 0;
    box-shadow: none;
    padding: 0;

    animation: heroFloat 9s ease-in-out infinite;
    will-change: transform;
}

.hero-card.mobile-view {
    display: none;
}

/* SCORESHEET PREVIEW */
.scoresheet-panels {
    position: relative;
}

/* Base state: hidden */
.scoresheet-panel {
    opacity: 0;
    pointer-events: none;
    position: absolute;
    inset: 0;
    transition: opacity 1s ease;
}

/* Active slide */
.scoresheet-panel.active {
    opacity: 1;
    pointer-events: auto;
    position: relative;
}

.scoresheet-preview {
    position: relative;
    overflow: hidden;
}

/* Base (inactive) panel state */
.scoresheet-panel {
    opacity: 0;
    pointer-events: none;
    position: absolute;
    inset: 0;
    transition: opacity 1.2s ease-in-out;
}

/* Active panel */
.scoresheet-panel.active {
    opacity: 1;
    pointer-events: auto;
    position: relative;
}

/* slideshow image bounce */
@keyframes gentleFloat {
    0% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-6px);
    }

    100% {
        transform: translateY(0);
    }
}

.scoresheet-panel.active .paper-shadow img {
    animation: gentleFloat 10s ease-in-out infinite;
    will-change: transform;
}

.scoresheet-panel img {
    max-width: 80%;
    margin: 0 auto;
    display: block;
}

.paper-shadow {
    position: relative;
    display: inline-block;
}

.paper-shadow::after {
    content: "";
    position: absolute;
    left: 50%;
    bottom: -28px;
    width: 90%;
    height: 20px;
    transform: translateX(-50%);
    background: radial-gradient(ellipse at center,
            rgba(0, 0, 0, .35) 0%,
            rgba(0, 0, 0, .15) 40%,
            rgba(0, 0, 0, 0) 70%);
    filter: blur(10px);
    z-index: -1;
}

.paper-shadow img {
    position: relative;
    z-index: 1;
}

/* Reduce motion support */
@media (prefers-reduced-motion: reduce) {
    .scoresheet-panel.active .paper-shadow img {
        animation: none;
    }
}

/* Subtle vertical movement */
@keyframes heroFloat {
    0% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-12px);
    }

    100% {
        transform: translateY(0);
    }
}

/* Respect accessibility preferences */
@media (prefers-reduced-motion: reduce) {
    .hero-card {
        animation: none;
    }
}

.faq-app-store {
    margin-top: 0.75rem;
}

.faq-app-store a {
    display: inline-block;
}

.footer-app-store {
    margin-top: 1em;
}

.hero-img {
    display: block;
    width: 80%;
    height: auto;
    max-width: 720px;
    margin-inline: auto;
    filter: drop-shadow(0 7px 30px rgba(0, 0, 0, .25));
}

.hero-slideshow {
    position: relative;
    width: 80%;
    max-width: 720px;
    margin-inline: auto;
}

.hero-slide {
    position: absolute;
    inset: 0;
    width: 100%;
    height: auto;
    opacity: 0;
    transition: opacity 0.8s ease;
    filter: drop-shadow(0 7px 30px rgba(0, 0, 0, .25));
}

.hero-slide.ready {
    opacity: 1;
}

.hero-slide.active {
    opacity: 1;
    position: relative;
}

/* Added slideshow styles */
.slideshow {
    position: relative;
    width: 100%;
    height: 100%;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    border-radius: var(--radius-xl);
}

.slideshow .slide {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    opacity: 0;
    transition: opacity 1s ease-in-out;
}

.slideshow .slide.active {
    opacity: 1;
}

.phone {
    aspect-ratio: 9/19;
    border-radius: 28px;
    border: 10px solid #111;
    background: linear-gradient(180deg, #0b0f12, #101418);
    position: relative;
    overflow: hidden;
    box-shadow: 0 30px 80px rgba(0, 0, 0, .25)
}

.screen {
    position: absolute;
    inset: 0;
    padding: 10px
}

.screen img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 18px;
    filter: saturate(1.05)
}

.glow {
    pointer-events: none;
    position: absolute;
    left: 50%;
    top: 50%;
    width: 140vw;
    height: 140vh;
    transform: translate(-50%, -50%);
    background:
        radial-gradient(600px 300px at 20% 20%,
            color-mix(in oklab, var(--clr-primary) 60%, white 40%),
            transparent 55%),
        radial-gradient(500px 300px at 80% 60%,
            color-mix(in oklab, var(--clr-secondary) 70%, white 30%),
            transparent 55%);
    opacity: .35;
    z-index: -1;
}

/* STRIPES DECOR */
.stripe {
    pointer-events: none;
    position: absolute;
    inset: auto -10vw -40% -10vw;
    height: 60%;
}

/* HOW IT WORKS */
.how-it-works {
    text-align: center;
}

.how-grid {
    display: grid;
    gap: clamp(20px, 3vw, 32px);
    grid-template-columns: repeat(4, 1fr);
    margin-top: 40px;
}

.how-step {
    background: white;
    border-radius: 49px;
    padding: 1.2rem;
    border: 1px solid rgba(0, 0, 0, .06);
    box-shadow: var(--shadow-1);
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* iPhone mockup */
.how-phone {
    width: 100%;
    max-width: 220px;
    margin-bottom: 1rem;
}

.how-phone img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 18px;
}

/* Text */
.how-step h3 {
    margin: .6rem 0 .4rem;
    font-size: 1.1rem;
}

.how-step p {
    font-size: .95rem;
    line-height: 1.55;
    opacity: .85;
    margin: 0;
}

/* RESPONSIVE BREAKPOINTS */

/* 3 across */
@media (max-width: 1200px) {
    .how-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* 2 across */
@media (max-width: 900px) {
    .how-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* 1 per row */
@media (max-width: 560px) {
    .how-grid {
        grid-template-columns: 1fr;
    }

    .how-phone {
        max-width: 260px;
    }
}

/* HOW IT WORKS HERO */
/* TEXT-ONLY HERO (How It Works) */
.hero-text-only {
    position: relative;
    overflow: hidden;
}

.hero-text-only .container {
    max-width: 900px;
    padding-top: clamp(40px, 10vh, 80px);
    padding-bottom: clamp(40px, 10vh, 80px);
}

.hero-text-only .badge {
    margin-bottom: 18px;
}

.hero-text-only h1 {
    margin: 26px 0;
}

.hero-text-only .lead {
    max-width: 760px;
    margin: 0 auto;
}

.hero-text-only .ribbon {
    max-width: 720px;
    margin: 24px auto 0;
}

/* FEATURES */
section {
    scroll-margin-top: 90px
}

.section {
    padding: min(100px, 12vh) 0
}

.section h2 {
    font-size: clamp(1.6rem, 3.2vw, 2.4rem);
    margin: 0 0 .6rem
}

.muted {
    color: rgba(30, 20, 32, .75)
}

.grid {
    display: grid;
    gap: clamp(16px, 2vw, 24px)
}

.grid.cols-3 {
    grid-template-columns: repeat(3, 1fr)
}

.card {
    background: white;
    border-radius: var(--radius-lg);
    padding: 1.2rem;
    border: 1px solid rgba(0, 0, 0, .06);
    box-shadow: var(--shadow-1)
}

.icon {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    font-weight: 800;
    background: color-mix(in oklab, var(--clr-primary) 15%, white 85%);
    color: var(--clr-primary)
}

.card h3 {
    margin: .6rem 0 .4rem
}

/* HIGHLIGHTS BANNER */
.ribbon {
    margin: 18px 0 3px 0;
    background: linear-gradient(90deg, var(--clr-primary), var(--clr-secondary));
    color: white;
    border-radius: var(--radius-md);
    padding: .7rem 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .8rem;
    font-weight: 700;
    box-shadow: var(--shadow-2)
}

.ribbon span {
    text-align: center;
}

/* SHOWCASE */
.showcase {
    display: grid;
    grid-template-columns: 1.2fr .8fr;
    gap: 2rem;
    align-items: center
}

.mock {
    background: white;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-2);
    padding: 1rem
}

.mock img {
    width: 100%;
    height: auto;
    max-width: 100%;
    object-fit: contain;
    display: block;
}

.showcase li {
    line-height: 160%;
}

/* PRICING */
.pricing {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem
}

.price-card {
    background: white;
    border: 1px solid rgba(0, 0, 0, .06);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-1);
    padding: 1.2rem;
    display: flex;
    flex-direction: column
}

.price-card .price {
    font-size: 2rem;
    font-weight: 800;
    color: var(--clr-dark)
}

.price-card ul {
    margin: .6rem 0 1rem;
    padding-left: 1.1rem
}

.price-card li {
    margin: .4rem 0
}

.price-card.highlight {
    border-color: var(--clr-primary);
    box-shadow: 0 10px 40px rgba(51, 153, 153, .2)
}

/* =========================
   Support guides
   ========================= */

.support-guides {
    max-width: 760px;
    margin: 1rem auto 0;
    display: grid;
    gap: 1rem;
}

.support-guides.home {
    text-align: left;
}

.guide {
    background: white;
    border-radius: var(--radius-lg);
    border: 1px solid rgba(0, 0, 0, .06);
    box-shadow: var(--shadow-1);
    padding: .25rem 1rem;
}

.guide summary {
    list-style: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem .25rem;
    font-weight: 700;
    font-size: 1.05rem;
}

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

/* Chevron */
.guide .chevron {
    width: 18px;
    height: 18px;
    border-right: 4px solid var(--clr-primary);
    border-bottom: 4px solid var(--clr-primary);
    transform: rotate(45deg);
    transition: transform .25s ease-in-out;
    margin-left: 1rem;
    margin-top: -9px;
}

/* Rotate when open */
.guide[open] .chevron {
    transform: rotate(-135deg);
}

/* Steps */
.guide-steps {
    padding: 0 0 1rem 0;
    margin: 0;
    list-style-position: inside;
}

.guide-steps li {
    position: relative;
    /* 🔑 THIS is the missing piece */
    text-align: center;
    padding-bottom: 2rem;
    /* room for chevron */
}

.guide-steps li::marker {
    color: var(--clr-dark);
    font-weight: bold;
}

.guide-group-title {
    padding-top: 20px;
    margin-bottom: 0;
}

/* Centered chevron between steps */
.guide-steps li:not(:last-child)::after {
    content: "";
    position: absolute;
    left: 50%;
    bottom: 0.65em;
    width: 10px;
    height: 10px;
    border-right: 4px solid var(--clr-dark);
    border-bottom: 4px solid var(--clr-dark);
    transform: translateX(-50%) rotate(45deg);
    opacity: 0.7;
}

.guide-steps strong {
    color: var(--clr-primary);
}

.guide-steps p {
    text-align: left;
}

/* FAQ */
details {
    background: white;
    border: 1px solid rgba(0, 0, 0, .06);
    border-radius: var(--radius-lg);
    padding: .9rem 1rem;
    box-shadow: var(--shadow-1)
}

details+details {
    margin-top: .6rem
}

summary {
    cursor: pointer;
    font-weight: 700
}

/* FOOTER */
footer {
    border-top: 1px solid rgba(0, 0, 0, .08);
    background: linear-gradient(180deg, rgba(255, 255, 255, .6), rgba(255, 255, 255, .9));
    padding: 2rem 0
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 1.5rem
}

.small {
    font-size: .92rem
}

ul.footer-links {
    padding-inline-start: 0;
}

.footer-links li {
    list-style: none;
    margin: 0;
    padding: 0;
}

details .small {
    margin-top: 18px;
}

.footer-links a {
    color: var(--clr-primary);
    text-decoration: none;
    opacity: 0.85;
}

.footer-links a:hover {
    opacity: 1;
    text-decoration: underline;
}

.footer-links a:visited {
    color: var(--clr-primary);
}

/* Utilities */
.pill {
    border-radius: 999px;
    padding: .35rem .7rem;
    border: 1px dashed rgba(0, 0, 0, .15);
    background: var(--clr-light)
}

.accent {
    color: var(--clr-primary)
}

.accent-2 {
    color: var(--clr-secondary)
}

.contrast {
    color: var(--clr-contrast)
}

.center {
    text-align: center
}

.space {
    height: 18px
}

.space.big {
    height: 48px
}

/* mobile menu */
.mobile-menu {
    width: 100vw;
    border: none;
    padding: 0;
    background: transparent;
}

.mobile-menu {
    touch-action: manipulation;
}

.mobile-menu::backdrop {
    background: rgba(0, 0, 0, .55);
    backdrop-filter: blur(6px);
}

.mobile-menu-panel {
    position: relative;
    width: calc(100% - 24px);
    max-width: none;
    margin: auto;
    background: white;
    border-radius: 20px;
    padding: 4rem 2rem 1.5rem 2rem;
    box-shadow: var(--shadow-2);
    animation: menu-pop .45s cubic-bezier(.22, 1, .36, 1);
}

.mobile-menu-nav {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.mobile-menu-nav .btn {
    width: 100%;
    justify-content: center;
    font-size: 1.05rem;
    padding: 1rem;
    border-radius: 999px;
}

.mobile-menu-nav .mobile-app-store {
    display: inline-block;
    margin-top: 0.5rem;
}

.mobile-menu-nav .mobile-app-store img {
    display: block;
    margin-left: 0;
    margin-right: auto;
}

@keyframes menu-pop {
    from {
        opacity: 0;
        transform: translateY(20px) scale(.96);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.menu-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    background: rgba(0, 0, 0, .05);
    font-size: 1.25rem;
    line-height: 1;
    cursor: pointer;
    display: grid;
    place-items: center;
    outline: none;
    box-shadow: none;
}

/* Remove Safari/iOS tap highlight */
.menu-close {
    -webkit-tap-highlight-color: transparent;
}

/* Only show focus ring for keyboard users */
.menu-close:focus:not(:focus-visible) {
    outline: none;
    box-shadow: none;
}

/* =========================
   Mobile menu graceful close
   ========================= */

.mobile-menu {
    opacity: 0;
}

.mobile-menu[open] {
    opacity: 1;
}

.mobile-menu.is-closing .mobile-menu-panel {
    animation: menu-pop-out .25s ease forwards;
}

.mobile-menu.is-closing::backdrop {
    animation: backdrop-fade-out .25s ease forwards;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    align-items: center;
    gap: 3rem;
}

@keyframes menu-pop-out {
    from {
        opacity: 1;
        transform: translateY(0) scale(1);
    }

    to {
        opacity: 0;
        transform: translateY(16px) scale(.96);
    }
}

@keyframes backdrop-fade-out {
    from {
        opacity: 1;
    }

    to {
        opacity: 0;
    }
}

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

    /* Mobile hero layout:
       - Hide the desktop (right-column) hero card
       - Show the inline (between H1 and lead) hero card */
    .hero-card {
        display: none;
    }

    .hero-card.mobile-view {
        display: block;
        max-width: 380px;
        margin: 0 auto 1.25rem;
        animation: heroFloat 9s ease-in-out infinite;
        will-change: transform;
    }

    .hero-card.mobile-view .hero-slideshow {
        width: 100%;
        max-width: 420px;
        margin-inline: auto;
    }

    small.tagline {
        display: none;
    }

    .hero .container {
        grid-template-columns: 1fr;
        text-align: center;
    }

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

    .hero-img {
        max-width: 520px;
    }

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

    .grid.cols-3 {
        grid-template-columns: 1fr 1fr;
    }

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

@media (max-width: 640px) {
    h1 {
        font-size: clamp(1.8rem, 7vw, 2.3rem);
        line-height: 1.1;
    }

    .section {
        padding: min(100px, 8vh) 0;
    }

    .lead {
        font-size: 1rem;
    }

    .nav-links {
        display: none;
    }

    .ham {
        display: inline-flex;
    }

    .grid.cols-3 {
        grid-template-columns: 1fr;
    }

    .hero-img {
        max-width: 420px;
    }

    footer .footer-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }

    footer .footer-grid .brand {
        justify-content: center;
    }
}

/* Motion reduce */
@media (prefers-reduced-motion: reduce) {

    .btn,
    .hero-card {
        transition: none
    }

    html:focus-within {
        scroll-behavior: auto
    }
}