/* PiggyAccounting — site styles */

:root {
    --blue: #82ADF5;
    --blue-50: #EEF4FE;
    --blue-100: #DCE8FD;
    --blue-600: #5B8FEA;
    --blue-700: #3469D4;
    --pink: #F787AF;
    --coin: #FFDE46;

    --tint-blue: #DCE8FD;
    --tint-pink: #FDE1EB;
    --tint-mint: #D9F3F2;
    --tint-peach: #FFEFD2;
    --tint-lavender: #E6E2FF;
    --tint-lemon: #FCF6CC;

    --ink: #1E2B45;
    --text: #3D4960;
    --muted: #65708A;
    --line: #E6EBF5;
    --bg: #FFFFFF;
    --bg-soft: #F6F9FF;

    --radius-lg: 28px;
    --radius: 18px;
    --radius-sm: 12px;
    --shadow-sm: 0 2px 8px rgba(30, 43, 69, .06);
    --shadow: 0 12px 32px rgba(30, 43, 69, .10);
    --shadow-lg: 0 30px 60px rgba(52, 105, 212, .22);

    --container: 1160px;
    --nav-h: 68px;
    --font: "Nunito", "Noto Sans TC", system-ui, -apple-system, "PingFang TC", "Microsoft JhengHei", sans-serif;
}

html:lang(ja) { --font: "Nunito", "Noto Sans JP", system-ui, -apple-system, "Hiragino Sans", "Yu Gothic", sans-serif; }
html:lang(ko) { --font: "Nunito", "Noto Sans KR", system-ui, -apple-system, "Apple SD Gothic Neo", "Malgun Gothic", sans-serif; }

/* ---------- Base ---------- */

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

html {
    scroll-behavior: smooth;
    scroll-padding-top: calc(var(--nav-h) + 16px);
    -webkit-text-size-adjust: 100%;
}

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

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

a { color: var(--blue-700); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3, h4 {
    margin: 0 0 .5em;
    color: var(--ink);
    font-weight: 800;
    line-height: 1.25;
    letter-spacing: -.01em;
}

p { margin: 0 0 1em; }
button { font: inherit; color: inherit; }

:focus-visible {
    outline: 3px solid var(--blue-600);
    outline-offset: 3px;
    border-radius: 6px;
}

.container {
    width: 100%;
    max-width: var(--container);
    margin-inline: auto;
    padding-inline: 24px;
}

section { padding-block: 96px; }

.kicker {
    display: inline-block;
    margin-bottom: 16px;
    padding: 6px 14px;
    border-radius: 999px;
    background: var(--blue-50);
    color: var(--blue-700);
    font-size: .8rem;
    font-weight: 800;
    letter-spacing: .12em;
    text-transform: uppercase;
}

.section-head {
    max-width: 680px;
    margin: 0 auto 72px;
    text-align: center;
}

.section-title { font-size: clamp(1.9rem, 1.2rem + 2.4vw, 2.75rem); }
.lead { font-size: 1.15rem; color: var(--muted); margin: 0; }

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    border: 0;
    border-radius: 999px;
    font-weight: 800;
    white-space: nowrap;
    cursor: pointer;
    transition: transform .15s ease, box-shadow .15s ease, background-color .15s ease;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn--primary { background: var(--blue-700); color: #fff; box-shadow: 0 6px 16px rgba(52, 105, 212, .3); }
.btn--primary:hover { background: #2B5CC0; }
.btn--light { background: #fff; color: var(--ink); box-shadow: var(--shadow-sm); }
.btn--light:hover { box-shadow: var(--shadow); }

.badges { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.badges a { display: block; border-radius: 10px; transition: transform .15s ease; }
.badges a:hover { transform: translateY(-2px); }
.badges img { height: 52px; width: auto; }

/* ---------- Navigation ---------- */

.nav {
    position: fixed;
    inset: 0 0 auto;
    z-index: 50;
    height: var(--nav-h);
    background: rgba(255, 255, 255, .78);
    -webkit-backdrop-filter: saturate(180%) blur(14px);
    backdrop-filter: saturate(180%) blur(14px);
    border-bottom: 1px solid transparent;
    transition: border-color .2s ease, box-shadow .2s ease;
}
.nav.is-scrolled { border-bottom-color: var(--line); box-shadow: var(--shadow-sm); }

.nav__inner { display: flex; align-items: center; gap: 16px; height: 100%; }

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--ink);
    font-size: 1.1rem;
    font-weight: 800;
}
.brand:hover { text-decoration: none; }
.brand__logo {
    width: 40px;
    height: 40px;
    padding: 4px;
    border-radius: 12px;
    background: var(--blue);
}

.nav__menu { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.nav__links { display: flex; gap: 4px; margin: 0; padding: 0; list-style: none; }
.nav__links a {
    display: block;
    padding: 8px 14px;
    border-radius: 999px;
    color: var(--text);
    font-size: .95rem;
    font-weight: 700;
}
.nav__links a:hover { background: var(--blue-50); color: var(--blue-700); text-decoration: none; }

.nav__toggle { display: none; }

.lang { position: relative; }
.lang__btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px 8px 14px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: #fff;
    font-size: .95rem;
    font-weight: 700;
    cursor: pointer;
}
.lang__btn:hover { border-color: var(--blue); }
.lang__btn svg { width: 18px; height: 18px; }
.lang__btn .chev { width: 14px; height: 14px; color: var(--muted); }

.lang__menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 160px;
    margin: 0;
    padding: 6px;
    list-style: none;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow);
}
.lang__menu button {
    width: 100%;
    padding: 8px 12px;
    border: 0;
    border-radius: 8px;
    background: none;
    text-align: left;
    font-weight: 600;
    cursor: pointer;
}
.lang__menu button:hover { background: var(--blue-50); }
.lang__menu button[aria-current="true"] { color: var(--blue-700); font-weight: 800; }

@media (max-width: 860px) {
    .nav__toggle {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 44px;
        height: 44px;
        margin-left: auto;
        border: 0;
        border-radius: 12px;
        background: transparent;
        color: var(--ink);
        cursor: pointer;
    }
    .nav__toggle:hover { background: var(--blue-50); }

    .nav__menu {
        position: absolute;
        top: var(--nav-h);
        left: 0;
        right: 0;
        display: none;
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
        margin: 0;
        padding: 12px 24px 24px;
        background: #fff;
        border-bottom: 1px solid var(--line);
        box-shadow: var(--shadow);
    }
    .nav.is-open .nav__menu { display: flex; }
    .nav.is-open { background: #fff; }

    .nav__links { flex-direction: column; }
    .nav__links a { padding: 12px 8px; border-radius: 10px; }
    .lang__btn { width: 100%; justify-content: center; }
    .lang__menu { position: static; margin-top: 8px; box-shadow: none; }
    .nav__cta { width: 100%; padding-block: 12px; }
}

/* ---------- Hero ---------- */

.hero {
    position: relative;
    overflow: hidden;
    padding-top: calc(var(--nav-h) + 56px);
    padding-bottom: 96px;
    background:
        radial-gradient(900px 520px at 85% 30%, var(--blue-100), transparent 65%),
        linear-gradient(180deg, var(--blue-50), #fff 90%);
}

.hero__grid {
    display: grid;
    grid-template-columns: 1.05fr .95fr;
    align-items: center;
    gap: 48px;
}

.hero__eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 24px;
    padding: 6px 16px 6px 6px;
    border-radius: 999px;
    background: #fff;
    box-shadow: var(--shadow-sm);
    color: var(--ink);
    font-weight: 800;
}
.hero__eyebrow img {
    width: 34px;
    height: 34px;
    padding: 3px;
    border-radius: 50%;
    background: var(--blue);
}

.hero__title {
    margin-bottom: 20px;
    font-size: clamp(2.4rem, 1.3rem + 4vw, 4.2rem);
    font-weight: 900;
    line-height: 1.12;
}

.hero__tagline {
    max-width: 30em;
    margin-bottom: 32px;
    color: var(--muted);
    font-size: 1.2rem;
}

.hero__award {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-top: 28px;
    color: var(--muted);
    font-size: .95rem;
    font-weight: 700;
}
.hero__award img { width: 28px; height: auto; }
.hero__award:hover { color: var(--ink); text-decoration: none; }

.hero__stats {
    display: flex;
    flex-wrap: wrap;
    row-gap: 12px;
    margin: 32px 0 0;
    padding: 0;
    list-style: none;
}
.stat {
    display: flex;
    flex-direction: column;
    padding-inline: 22px;
    border-left: 1px solid #D5DEEE;
}
.stat:first-child { padding-left: 0; border-left: 0; }
.stat__value {
    display: flex;
    align-items: center;
    gap: 4px;
    color: var(--ink);
    font-size: 1.6rem;
    font-weight: 900;
    line-height: 1.2;
}
.stat__star { width: 22px; height: 22px; color: #FFB400; }
.stat__label { color: var(--muted); font-size: .85rem; font-weight: 700; }

.feature__tag {
    margin-bottom: 6px;
    color: var(--blue-700);
    font-size: .9rem;
    font-weight: 800;
    letter-spacing: .06em;
}

.hero__visual {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 600px;
}

.hero__blob {
    position: absolute;
    width: min(500px, 92%);
    aspect-ratio: 1;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 30%, #A9C6F9, var(--blue) 70%);
}

.hero__phones { position: relative; z-index: 2; display: flex; align-items: center; }
.hero__phones .phone--back { --w: 230px; margin-right: -80px; transform: rotate(-8deg) translateY(36px); }
.hero__phones .phone--front { --w: 270px; transform: rotate(4deg); z-index: 1; }

.hero__pig {
    position: absolute;
    left: 0;
    bottom: 2%;
    z-index: 3;
    width: 150px;
    filter: drop-shadow(0 12px 18px rgba(30, 43, 69, .18));
}

.coin {
    position: absolute;
    z-index: 3;
    display: grid;
    place-items: center;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: radial-gradient(circle at 35% 30%, #FFF6A0, var(--coin) 55%, #F2C200);
    box-shadow: inset 0 0 0 5px rgba(255, 240, 74, .9), 0 10px 20px rgba(232, 159, 0, .25);
    color: #D08A00;
    font-size: 1.5rem;
    font-weight: 900;
    animation: float 6s ease-in-out infinite;
}
.coin::after { content: "$"; }
.coin--1 { top: 8%; left: 12%; }
.coin--2 { top: 36%; right: 0; width: 44px; height: 44px; font-size: 1.15rem; animation-delay: -2s; }
.coin--3 { bottom: 12%; right: 12%; animation-delay: -4s; }

@keyframes float {
    0%, 100% { transform: translateY(0) rotate(-6deg); }
    50% { transform: translateY(-14px) rotate(6deg); }
}

/* ---------- Phone frame ---------- */

.phone {
    --w: 260px;
    position: relative;
    flex: none;
    width: var(--w);
    padding: 10px;
    border-radius: calc(var(--w) * .15);
    background: var(--ink);
    box-shadow: var(--shadow-lg), inset 0 0 0 2px #3A4868;
}
.phone img {
    width: 100%;
    height: auto;
    aspect-ratio: 640 / 1138;
    object-fit: cover;
    border-radius: calc(var(--w) * .115);
    background: #fff;
}

/* ---------- Features ---------- */

.tint-blue { --tint: var(--tint-blue); }
.tint-pink { --tint: var(--tint-pink); }
.tint-mint { --tint: var(--tint-mint); }
.tint-peach { --tint: var(--tint-peach); }
.tint-lavender { --tint: var(--tint-lavender); }
.tint-lemon { --tint: var(--tint-lemon); }

.feature {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    gap: 64px;
}
.feature + .feature { margin-top: 112px; }
.feature--reverse .feature__text { order: 2; }

.feature__icon {
    display: grid;
    place-items: center;
    width: 64px;
    height: 64px;
    margin-bottom: 20px;
    border-radius: 20px;
    background: var(--tint);
}
.feature__icon img { width: 38px; height: 38px; }

.feature__title { font-size: clamp(1.6rem, 1.2rem + 1.4vw, 2.2rem); }
.feature__desc { max-width: 28em; margin: 0; color: var(--muted); font-size: 1.1rem; }

.feature__media {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    padding-block: 48px;
}
.feature__media::before {
    content: "";
    position: absolute;
    inset: 0 6%;
    border-radius: 48px;
    background: var(--tint);
}
.feature__media .phone { --w: 250px; }
.feature__media--duo .phone { --w: 220px; }
.feature__media--duo .phone:first-child { margin-right: -48px; transform: rotate(-4deg) translateY(-20px); }
.feature__media--duo .phone:last-child { transform: rotate(4deg) translateY(24px); }

.cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin-top: 112px;
}

.card {
    padding: 32px;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: #fff;
    box-shadow: var(--shadow-sm);
    transition: transform .2s ease, box-shadow .2s ease;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.card .feature__icon { margin-bottom: 18px; }
.card h3 { font-size: 1.3rem; }
.card p { margin: 0; color: var(--muted); font-size: 1rem; }

/* ---------- Award & press ---------- */

.recognition { padding-block: 80px; background: var(--bg-soft); }

.award {
    display: flex;
    align-items: center;
    gap: 28px;
    max-width: 900px;
    margin: 0 auto 64px;
    padding: 28px 36px;
    border-radius: var(--radius-lg);
    background: linear-gradient(120deg, #FFF7DB, #FFE7AE);
}
.award > img { flex: none; width: 96px; height: auto; }
.award__body { flex: 1; }
.award__kicker {
    margin: 0;
    color: #9A6200;
    font-size: .8rem;
    font-weight: 800;
    letter-spacing: .1em;
    text-transform: uppercase;
}
.award__title { margin: .15em 0 .25em; font-size: 1.45rem; }
.award__body p:last-child { margin: 0; font-size: 1rem; }
.award .btn { flex: none; }

.press__title {
    margin-bottom: 24px;
    color: var(--muted);
    font-size: .9rem;
    letter-spacing: .12em;
    text-align: center;
    text-transform: uppercase;
}

.press {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    max-width: 900px;
    margin: 0 auto;
}

.press-card {
    display: flex;
    align-items: center;
    gap: 18px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #fff;
    color: inherit;
    transition: transform .2s ease, box-shadow .2s ease;
}
.press-card:hover { text-decoration: none; transform: translateY(-2px); box-shadow: var(--shadow); }
.press-card img {
    flex: none;
    width: 132px;
    height: auto;
    aspect-ratio: 500 / 260;
    object-fit: cover;
    border-radius: 10px;
}
.press-card__source {
    display: block;
    color: var(--blue-700);
    font-size: .75rem;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
}
.press-card__title {
    display: block;
    margin-top: 2px;
    color: var(--ink);
    font-size: .98rem;
    font-weight: 700;
    line-height: 1.45;
}

/* ---------- Download CTA ---------- */

.cta { padding-block: 96px; }

.cta__panel {
    position: relative;
    overflow: hidden;
    padding: 72px 24px;
    border-radius: 36px;
    background: linear-gradient(135deg, #6E9EF0, var(--blue-700));
    color: #fff;
    text-align: center;
}
.cta__panel::before,
.cta__panel::after {
    content: "";
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, .1);
}
.cta__panel::before { width: 360px; height: 360px; top: -160px; left: -120px; }
.cta__panel::after { width: 280px; height: 280px; bottom: -140px; right: -60px; }
.cta__panel > * { position: relative; z-index: 1; }

.cta__logo {
    width: 96px;
    height: 96px;
    margin: 0 auto 24px;
    border-radius: 24px;
    box-shadow: 0 0 0 4px rgba(255, 255, 255, .35), 0 14px 28px rgba(0, 0, 0, .18);
}
.cta__panel h2 { color: #fff; font-size: clamp(1.8rem, 1.2rem + 2vw, 2.6rem); }
.cta__panel p { margin-bottom: 32px; color: rgba(255, 255, 255, .92); font-size: 1.15rem; }
.cta__panel .badges { justify-content: center; }

/* ---------- Footer ---------- */

.footer {
    padding-block: 48px 32px;
    background: var(--ink);
    color: rgba(255, 255, 255, .7);
    font-size: .95rem;
}
.footer__top {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}
.footer .brand { color: #fff; }
.footer__links { display: flex; flex-wrap: wrap; gap: 8px 28px; margin: 0; padding: 0; list-style: none; }
.footer__links a { color: rgba(255, 255, 255, .8); }
.footer__links a:hover { color: #fff; }
.footer__bottom {
    margin-top: 28px;
    padding-top: 24px;
    border-top: 1px solid rgba(255, 255, 255, .1);
    font-size: .85rem;
}

/* ---------- Legal documents ---------- */

.doc-header {
    padding-top: calc(var(--nav-h) + 56px);
    padding-bottom: 40px;
    margin-bottom: 16px;
    background: linear-gradient(180deg, var(--blue-50), #fff);
}
.doc-header .container,
.doc-header + .container { max-width: 808px; }
.doc-header h1 { margin-bottom: 8px; font-size: clamp(2rem, 1.4rem + 2vw, 2.8rem); font-weight: 900; }
.doc-header .meta { margin: 0; color: var(--muted); }

.content-section { padding-bottom: 96px; }
.content-section h2 { margin-top: 48px; font-size: 1.6rem; }
.content-section h3 { margin: 40px 0 12px; font-size: 1.2rem; }
.content-section p { line-height: 1.85; }

[data-lang]:not(.active) { display: none; }

/* ---------- 404 ---------- */

.notfound {
    display: grid;
    place-items: center;
    min-height: 100vh;
    padding: 24px;
    background: linear-gradient(180deg, var(--blue-50), #fff);
    text-align: center;
}
.notfound__pig {
    width: 150px;
    height: 150px;
    margin: 0 auto 16px;
    padding: 12px;
    border-radius: 50%;
    background: var(--blue);
}
.notfound__code {
    margin: 0;
    color: var(--blue);
    font-size: clamp(4rem, 3rem + 5vw, 6.5rem);
    font-weight: 900;
    line-height: 1;
}
.notfound h1 { margin: 8px 0 8px; font-size: 1.8rem; }
.notfound p { max-width: 26em; margin: 0 auto 28px; color: var(--muted); }

/* ---------- Scroll reveal ---------- */

.js .reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity .7s ease, transform .7s ease;
}
.js .reveal.is-visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .js .reveal { opacity: 1; transform: none; transition: none; }
    .coin { animation: none; }
}

/* ---------- Responsive ---------- */

@media (max-width: 960px) {
    .hero__grid,
    .feature { grid-template-columns: 1fr; gap: 40px; }

    .hero__text,
    .feature__text { text-align: center; }
    .hero__tagline,
    .feature__desc { margin-inline: auto; }
    .hero .badges { justify-content: center; }
    .hero__stats { justify-content: center; }
    .stat { padding-inline: 16px; }
    .stat:first-child { padding-left: 16px; }
    .hero__visual { min-height: 0; padding-block: 24px; }

    .feature--reverse .feature__text { order: 0; }
    .feature__icon { margin-inline: auto; }

    .cards { grid-template-columns: 1fr 1fr; }
    .press { grid-template-columns: 1fr; }
}

@media (max-width: 600px) {
    body { font-size: 16px; }
    section,
    .cta { padding-block: 72px; }

    .hero { padding-top: calc(var(--nav-h) + 36px); padding-bottom: 56px; }
    .hero__phones .phone--front { --w: 200px; }
    .hero__phones .phone--back { --w: 165px; margin-right: -64px; }
    .hero__pig { width: 96px; }
    .coin { width: 42px; height: 42px; font-size: 1.1rem; }
    .coin--2 { width: 34px; height: 34px; font-size: .9rem; }

    .feature + .feature,
    .cards { margin-top: 80px; }
    .feature__media .phone { --w: 210px; }
    .feature__media--duo .phone { --w: 160px; }
    .feature__media--duo .phone:first-child { margin-right: -32px; }

    .cards { grid-template-columns: 1fr; }
    .card { padding: 24px; }

    .award { flex-direction: column; gap: 16px; padding: 28px 24px; text-align: center; }
    .press-card img { width: 104px; }
    .badges img { height: 46px; }
    .cta__panel { padding: 56px 20px; border-radius: 28px; }
}
