/* Capyzeno marketing pages design system (v2)
   Used by: homepage, apps index, app product pages.
   Legal pages (privacy/terms/support) keep style.css only.
   Palette: warm paper + terracotta accent (brand: capybara mascot, warm-craft identity).
   Radius rule: cards 16px, buttons/badges full pill. One accent color, locked.
*/

:root {
    --paper: #FAF6EE;
    --paper-2: #F3EDE0;
    --card: #FFFFFF;
    --ink: #211A13;
    --ink-2: #5C5245;
    --ink-3: #8A7D6B;
    --line: #E8DFCE;
    --accent: #C2571B;
    --accent-ink: #93400F;
    --accent-soft: #F7E8DC;
    --shadow-warm: 0 24px 48px -24px rgba(96, 62, 18, 0.28);
    --shadow-card: 0 2px 6px rgba(96, 62, 18, 0.06), 0 16px 32px -20px rgba(96, 62, 18, 0.18);
    --radius-card: 16px;
    --font: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', 'Noto Sans SC', sans-serif;
}

body.site {
    background: var(--paper);
    color: var(--ink);
    font-family: var(--font);
    -webkit-font-smoothing: antialiased;
}

.site .container {
    max-width: 1120px;
}

/* ---------- Header ---------- */
.site .header {
    background: rgba(250, 246, 238, 0.82);
    -webkit-backdrop-filter: blur(14px);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--line);
    padding: 0;
    height: 64px;
    display: flex;
    align-items: center;
}

.site .header .container {
    width: 100%;
}

.site .logo {
    font-size: 20px;
    letter-spacing: -0.02em;
    color: var(--ink);
    display: flex;
    align-items: center;
    gap: 10px;
}

.site .logo img {
    width: 30px;
    height: 30px;
    border-radius: 8px;
    display: block;
}

.site .nav {
    align-items: center;
    gap: 28px;
}

.site .nav a {
    color: var(--ink-2);
    font-size: 15px;
}

.site .nav a:hover {
    color: var(--accent);
}

.site .lang-switch {
    background: transparent;
    color: var(--ink-2);
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 6px 16px;
    font-size: 13px;
}

.site .lang-switch:hover {
    background: var(--card);
    color: var(--accent);
    border-color: var(--accent);
}

/* Language Switcher Dropdown (marketing pages) */
.site .lang-dropdown .lang-switch {
    background: transparent;
    color: var(--ink-2);
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 6px 16px;
    font-size: 13px;
}

.site .lang-dropdown .lang-switch:hover {
    background: var(--card);
    color: var(--accent);
    border-color: var(--accent);
}

.site .lang-menu {
    background: var(--card);
    border-color: var(--line);
    box-shadow: var(--shadow-card);
}

.site .lang-menu li {
    color: var(--ink-2);
}

.site .lang-menu li:hover {
    background: var(--accent-soft);
    color: var(--accent);
}

/* RTL adjustments for marketing pages */
[dir="rtl"] .site .hero2-grid {
    direction: rtl;
}

[dir="rtl"] .site .footer-grid {
    direction: rtl;
}

/* ---------- Buttons & badges ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border-radius: 999px;
    padding: 13px 26px;
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    transition: transform 0.15s ease, box-shadow 0.2s ease, background 0.2s ease;
    white-space: nowrap;
}

.btn:active {
    transform: scale(0.97);
}

.btn-primary {
    background: var(--accent);
    color: #FFF7F0;
    box-shadow: 0 10px 24px -10px rgba(194, 87, 27, 0.55);
}

.btn-primary:hover {
    background: var(--accent-ink);
}

.btn-ghost {
    border: 1px solid var(--line);
    color: var(--ink);
    background: var(--card);
}

.btn-ghost:hover {
    border-color: var(--accent);
    color: var(--accent);
}

/* App Store badge (custom, Apple-guideline-styled) */
.store-badge {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: #1D140D;
    color: #FFF7F0;
    border-radius: 999px;
    padding: 10px 22px;
    text-decoration: none;
    line-height: 1.15;
    transition: transform 0.15s ease, background 0.2s ease;
    white-space: nowrap;
}

.store-badge:hover {
    background: #000000;
    transform: translateY(-1px);
}

.store-badge:active {
    transform: scale(0.97);
}

.store-badge svg {
    width: 22px;
    height: 22px;
    fill: #FFF7F0;
    flex: none;
}

.store-badge .sb-text {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.store-badge .sb-small {
    font-size: 10px;
    opacity: 0.75;
    letter-spacing: 0.02em;
}

.store-badge .sb-big {
    font-size: 16px;
    font-weight: 700;
    letter-spacing: -0.01em;
}

/* Coming-soon badge (same shape, quiet) */
.soon-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border: 1px dashed var(--ink-3);
    color: var(--ink-2);
    border-radius: 999px;
    padding: 10px 22px;
    font-size: 14px;
    font-weight: 600;
    white-space: nowrap;
}

/* Status pill (semantic state) */
.status-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 600;
    border-radius: 999px;
    padding: 4px 12px;
}

.status-pill.live {
    background: var(--accent-soft);
    color: var(--accent-ink);
}

.status-pill.soon {
    background: var(--paper-2);
    color: var(--ink-2);
}

/* ---------- Hero ---------- */
.hero2 {
    padding: 72px 0 88px;
}

.hero2-grid {
    display: grid;
    grid-template-columns: 1.05fr 0.95fr;
    gap: 56px;
    align-items: center;
}

.hero-eyebrow {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 20px;
}

.hero2 h1 {
    font-size: clamp(34px, 4.6vw, 56px);
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1.12;
    margin-bottom: 20px;
}

.hero2 .hero-sub {
    font-size: 17px;
    color: var(--ink-2);
    line-height: 1.75;
    max-width: 34em;
    margin-bottom: 32px;
}

.hero-ctas {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
}

/* Phone fan (hero visual, real screenshots) */
.phone-fan {
    position: relative;
    height: 520px;
}

.phone-fan img {
    position: absolute;
    width: 240px;
    border-radius: 28px;
    border: 1px solid var(--line);
    box-shadow: var(--shadow-warm);
    background: var(--card);
}

.phone-fan .pf-1 {
    left: 0;
    top: 56px;
    transform: rotate(-8deg);
}

.phone-fan .pf-2 {
    left: 50%;
    top: 0;
    transform: translateX(-50%);
    z-index: 2;
    width: 260px;
}

.phone-fan .pf-3 {
    right: 0;
    top: 56px;
    transform: rotate(8deg);
}

/* ---------- Sections ---------- */
.section {
    padding: 72px 0;
}

.section-head {
    margin-bottom: 40px;
    max-width: 640px;
}

.section-head h2 {
    font-size: clamp(26px, 3vw, 36px);
    font-weight: 800;
    letter-spacing: -0.02em;
    margin-bottom: 12px;
}

.section-head p {
    color: var(--ink-2);
    font-size: 16px;
    line-height: 1.7;
}

/* ---------- Flagship bento ---------- */
.flag-grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 20px;
}

.flag-cell {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius-card);
    padding: 32px;
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.25s ease;
}

.flag-cell:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-card);
}

.flag-cell.wide {
    grid-column: span 7;
}

.flag-cell.narrow {
    grid-column: span 5;
}

.flag-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 10px;
}

.flag-name {
    display: flex;
    align-items: center;
    gap: 14px;
}

.flag-name img {
    width: 52px;
    height: 52px;
    border-radius: 13px;
    flex: none;
}

.flag-name h3 {
    font-size: 20px;
    font-weight: 700;
    letter-spacing: -0.01em;
}

.flag-name .flag-cat {
    font-size: 13px;
    color: var(--ink-3);
    margin-top: 2px;
}

.flag-desc {
    color: var(--ink-2);
    font-size: 15px;
    line-height: 1.7;
    margin-bottom: 22px;
}

.flag-shots {
    display: flex;
    gap: 16px;
    margin-top: auto;
    align-items: flex-end;
}

.flag-shots img {
    width: 100%;
    min-width: 0;
    border-radius: 18px;
    border: 1px solid var(--line);
    box-shadow: var(--shadow-card);
    display: block;
}

.flag-cell.wide .flag-shots img {
    width: calc(50% - 8px);
}

.flag-cell.narrow .flag-shots img {
    width: 62%;
    margin: 0 auto;
}

/* ---------- All apps grid ---------- */
.grid12 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.app-card2 {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius-card);
    padding: 24px;
    text-decoration: none;
    color: inherit;
    display: flex;
    gap: 16px;
    align-items: flex-start;
    transition: transform 0.2s ease, box-shadow 0.25s ease, border-color 0.2s ease;
}

.app-card2:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-card);
    border-color: #D9CBAF;
}

.app-card2 img.ac-icon {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    flex: none;
}

.app-card2 .ac-icon-fallback {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    flex: none;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    background: var(--paper-2);
}

.app-card2 h3 {
    font-size: 17px;
    font-weight: 700;
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.app-card2 p {
    font-size: 13.5px;
    color: var(--ink-2);
    line-height: 1.6;
}

/* ---------- Privacy strip ---------- */
.privacy-strip {
    border-top: 1px solid var(--line);
}

.privacy-points {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
    margin-top: 40px;
}

.ppoint {
    border-top: 2px solid var(--accent);
    padding-top: 20px;
}

.ppoint svg {
    width: 26px;
    height: 26px;
    fill: var(--accent);
    margin-bottom: 14px;
    display: block;
}

.ppoint h3 {
    font-size: 17px;
    font-weight: 700;
    margin-bottom: 8px;
}

.ppoint p {
    font-size: 14px;
    color: var(--ink-2);
    line-height: 1.7;
}

/* ---------- App product page hero ---------- */
.app-hero {
    display: flex;
    align-items: center;
    gap: 24px;
    padding: 48px 0 8px;
}

.app-hero img.ah-icon {
    width: 96px;
    height: 96px;
    border-radius: 24px;
    box-shadow: var(--shadow-card);
    flex: none;
}

.app-hero .ah-icon-fallback {
    width: 96px;
    height: 96px;
    border-radius: 24px;
    background: var(--paper-2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 44px;
    flex: none;
}

.app-hero h2 {
    font-size: clamp(26px, 3vw, 34px);
    font-weight: 800;
    letter-spacing: -0.02em;
    margin-bottom: 6px;
}

.app-hero .ah-tag {
    color: var(--ink-2);
    font-size: 16px;
    margin-bottom: 14px;
}

.app-hero .ah-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

/* Screenshot gallery (horizontal scroll-snap) */
.shots {
    margin: 32px 0 8px;
}

.shots-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--ink-2);
    margin-bottom: 16px;
}

.shots-track {
    display: flex;
    gap: 18px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    padding: 8px 4px 20px;
    -webkit-overflow-scrolling: touch;
}

.shots-track::-webkit-scrollbar {
    height: 6px;
}

.shots-track::-webkit-scrollbar-thumb {
    background: var(--line);
    border-radius: 3px;
}

.shots-track img {
    height: 460px;
    width: auto;
    border-radius: 22px;
    border: 1px solid var(--line);
    box-shadow: var(--shadow-card);
    scroll-snap-align: start;
    flex: none;
    background: var(--card);
}

/* ---------- Reveal motion ---------- */
@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(22px);
        transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1), transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
    }

    .reveal.in {
        opacity: 1;
        transform: none;
    }

    .reveal-d1 { transition-delay: 0.08s; }
    .reveal-d2 { transition-delay: 0.16s; }
    .reveal-d3 { transition-delay: 0.24s; }
}

/* ---------- Footer ---------- */
.site .footer {
    background: var(--paper-2);
    border-top: 1px solid var(--line);
    padding: 48px 0 32px;
    text-align: left;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 36px;
}

.footer-grid h4 {
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--ink-3);
    margin-bottom: 14px;
}

.footer-grid ul {
    list-style: none;
    padding: 0;
}

.footer-grid li {
    margin-bottom: 8px;
}

.footer-grid a {
    color: var(--ink-2);
    font-size: 14px;
    text-decoration: none;
}

.footer-grid a:hover {
    color: var(--accent);
}

.footer-brand p {
    color: var(--ink-2);
    font-size: 14px;
    line-height: 1.7;
    max-width: 32em;
}

.footer-bottom {
    border-top: 1px solid var(--line);
    padding-top: 20px;
    display: flex;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

.footer-bottom p {
    font-size: 13px;
    color: var(--ink-3);
    margin: 0;
}

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
    .flag-cell.wide,
    .flag-cell.narrow {
        grid-column: span 12;
    }

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

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

    .phone-fan {
        height: 440px;
        max-width: 480px;
        margin: 0 auto;
    }
}

@media (max-width: 640px) {
    .hero2 {
        padding: 48px 0 64px;
    }

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

    .privacy-points {
        grid-template-columns: 1fr;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 28px;
    }

    .shots-track img {
        height: 380px;
    }

    .app-hero {
        flex-direction: column;
        align-items: flex-start;
    }

    .phone-fan img {
        width: 200px;
    }

    .phone-fan .pf-2 {
        width: 216px;
    }
}

/* RTL marketing page adjustments */
[dir="rtl"] .site .hero-ctas {
    flex-direction: row-reverse;
}

[dir="rtl"] .site .flag-grid {
    direction: rtl;
}

[dir="rtl"] .site .grid12 {
    direction: rtl;
}

[dir="rtl"] .site .privacy-points {
    direction: rtl;
}

[dir="rtl"] .site .footer-bottom {
    direction: rtl;
}
