/* ==========================================================================
   Tably — Complete Master Styles (style.css)
   Graphite Carbon Canvas + Emerald accents, Full Layout.
   ========================================================================== */

:root {
    --bg: #07090c;
    --bg-soft: #141820;
    --text: #f1f5f9;
    --text-soft: #94a3b8;
    --text-faint: #64748b;
    --border: rgba(255, 255, 255, 0.1);
    --border-bright: rgba(255, 255, 255, 0.28);

    /* Emerald accent (used by home.css too) */
    --emerald: #34d399;
    --emerald-bright: #6ee7b7;
    --violet-bright: #6ee7b7;
    --glow-emerald: rgba(52, 211, 153, 0.45);
    --on-emerald: #052e22;
    --tungsten: #34d399;

    --font-display: "Geologica", "Onest", -apple-system, sans-serif;
    --font-body: "Onest", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    --max-w: 1160px;
    --gutter: clamp(20px, 5vw, 64px);
    --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    background: var(--bg) !important;
    margin: 0 !important;
    padding: 0 !important;
    color-scheme: dark;
}

body {
    margin: 0 !important;
    padding: 0 !important;
    background: transparent !important;
    color: var(--text);
    font-family: var(--font-body);
    font-size: 17px;
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
    position: relative;
    overflow-x: hidden;
    min-height: 100vh;
}

body::before {
    content: "";
    display: table;
    clear: both;
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

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

a {
    color: inherit;
}

.wrap {
    max-width: var(--max-w);
    margin: 0 auto;
    padding-left: var(--gutter);
    padding-right: var(--gutter);
}

h1,
h2,
h3 {
    font-family: var(--font-display);
    font-weight: 600;
    line-height: 1.12;
    margin: 0;
    letter-spacing: -0.025em;
    color: #ffffff;
}

p {
    margin: 0;
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}

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

/* ---------- Carbon Canvas: на весь сайт, по всій висоті сторінки ---------- */

.bg-glow {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    pointer-events: none;
    overflow: hidden;
    background:
        radial-gradient(900px circle at 50% -5%, rgba(52, 211, 153, 0.10) 0%, transparent 60%),
        radial-gradient(1200px circle at 15% 8%, #131820 0%, transparent 65%),
        radial-gradient(1100px circle at 85% 30%, #10141b 0%, transparent 60%),
        linear-gradient(180deg, #0b0e13 0%, #050709 100%) !important;
    opacity: 1 !important;
}

/* Ліві плями: 45°, повторюються по всій висоті сторінки */
.bg-glow::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 60%;
    height: 100%;
    background: repeating-linear-gradient(
        45deg,
        rgba(255, 255, 255, 0.07) 0px,
        rgba(255, 255, 255, 0.07) 5px,
        transparent 5px,
        transparent 14px
    );
    -webkit-mask-image: radial-gradient(ellipse 70% 50% at 0% 50%, #000 30%, transparent 85%);
    mask-image: radial-gradient(ellipse 70% 50% at 0% 50%, #000 30%, transparent 85%);
    -webkit-mask-size: 100% 1400px;
    mask-size: 100% 1400px;
    -webkit-mask-repeat: repeat-y;
    mask-repeat: repeat-y;
    -webkit-mask-position: 0 0;
    mask-position: 0 0;
}

/* Праві плями: -45°, зсунуті на пів-періоду, щоб не перетинались з лівими */
.bg-glow::after {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    width: 55%;
    height: 100%;
    background: repeating-linear-gradient(
        -45deg,
        rgba(255, 255, 255, 0.065) 0px,
        rgba(255, 255, 255, 0.065) 5px,
        transparent 5px,
        transparent 14px
    );
    -webkit-mask-image: radial-gradient(ellipse 70% 50% at 100% 50%, #000 30%, transparent 85%);
    mask-image: radial-gradient(ellipse 70% 50% at 100% 50%, #000 30%, transparent 85%);
    -webkit-mask-size: 100% 1400px;
    mask-size: 100% 1400px;
    -webkit-mask-repeat: repeat-y;
    mask-repeat: repeat-y;
    -webkit-mask-position: 100% 700px;
    mask-position: 100% 700px;
}

/* ---------- Header (Translucent Glass) ---------- */

.site-header {
    position: sticky;
    top: 0 !important;
    margin-top: 0 !important;
    z-index: 30;
    background: rgba(12, 15, 20, 0.65) !important;
    backdrop-filter: blur(18px) !important;
    -webkit-backdrop-filter: blur(18px) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.09) !important;
}

.site-header .wrap {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 76px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    font-family: var(--font-display);
    font-size: 21px;
    font-weight: 700;
    color: #ffffff;
    letter-spacing: -0.02em;
}

.brand-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    object-fit: cover;
    box-shadow: 0 0 16px rgba(52, 211, 153, 0.35), 0 0 1px 1px rgba(52, 211, 153, 0.4);
    filter: none;
    display: block;
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 30px;
}

.main-nav a {
    text-decoration: none;
    color: var(--text-soft);
    font-size: 15px;
    transition: color 0.2s var(--ease);
}

.main-nav a:hover {
    color: #ffffff;
}

.nav-current {
    color: #ffffff !important;
    font-weight: 600;
    position: relative;
}

.nav-current::after {
    content: "";
    position: absolute;
    bottom: -6px;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--emerald);
    box-shadow: 0 0 10px var(--glow-emerald);
    border-radius: 2px;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* ---------- Buttons ---------- */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 11px 22px;
    border-radius: 12px;
    font-family: var(--font-body);
    font-size: 14.5px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease), border-color 0.2s var(--ease), background 0.2s var(--ease);
}

.btn:active {
    transform: translateY(1px);
}

.btn-primary {
    background: linear-gradient(135deg, #34d399 0%, #6ee7b7 100%) !important;
    color: var(--on-emerald) !important;
    font-weight: 700 !important;
    border: 1px solid rgba(110, 231, 183, 0.6) !important;
    box-shadow:
        0 8px 26px -6px rgba(52, 211, 153, 0.55),
        inset 0 1px 0 rgba(255, 255, 255, 0.45) !important;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #3fe0a6 0%, #86efc3 100%) !important;
    border-color: rgba(167, 243, 208, 0.9) !important;
    box-shadow:
        0 12px 32px -6px rgba(52, 211, 153, 0.75),
        inset 0 1px 0 rgba(255, 255, 255, 0.55) !important;
    transform: translateY(-1px);
}

.btn-ghost {
    background: rgba(22, 26, 34, 0.65) !important;
    border: 1px solid var(--border) !important;
    color: #cbd5e1 !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.btn-ghost:hover {
    background: rgba(30, 36, 48, 0.85) !important;
    border-color: var(--border-bright) !important;
    color: #ffffff !important;
}

.nav-toggle {
    display: none;
    background: none;
    border: none;
    padding: 8px;
    cursor: pointer;
}

.nav-toggle span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--text);
    margin: 5px 0;
    transition: transform 0.25s var(--ease), opacity 0.25s var(--ease);
}

/* ---------- Transparent Main & Section Wrappers ---------- */

main,
section {
    background: transparent !important;
    position: relative;
}

section {
    padding: clamp(60px, 9vw, 104px) 0;
}

/* ---------- Hero 2-Column Grid ---------- */

.hero {
    padding: clamp(64px, 9vw, 120px) 0 clamp(48px, 7vw, 84px);
}

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

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 14px 7px 10px;
    border-radius: 999px;
    background: rgba(16, 24, 24, 0.85);
    border: 1px solid rgba(52, 211, 153, 0.25);
    color: #e2e8f0;
    font-size: 13px;
    font-weight: 500;
    margin-bottom: 22px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.eyebrow .dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--emerald);
    box-shadow: 0 0 8px var(--emerald);
}

.hero h1 {
    font-size: clamp(38px, 5.2vw, 58px);
    max-width: 15.5ch;
    color: #ffffff;
}

.hero-sub {
    margin-top: 22px;
    max-width: 46ch;
    color: var(--text-soft);
    font-size: 18px;
}

.hero-actions {
    margin-top: 34px;
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
}

.hero-note {
    margin-top: 20px;
    color: var(--text-faint);
    font-size: 14px;
}

/* ---------- Phone / Receipt Mockup ---------- */

.phone-card {
    padding: 26px 24px 22px;
    position: relative;
    border-radius: 22px;
    overflow: hidden;
    background: linear-gradient(180deg, rgba(24, 30, 40, 0.75) 0%, rgba(13, 16, 22, 0.88) 100%) !important;
    border: 1px solid var(--border-bright) !important;
    box-shadow: 0 24px 50px -15px rgba(0, 0, 0, 0.95), inset 0 1px 0 rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    animation: phone-float 7s ease-in-out infinite;
}

@keyframes phone-float {
    50% {
        transform: translateY(-8px);
    }
}

.phone-card::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    height: 100px;
    pointer-events: none;
    background: linear-gradient(180deg, transparent, rgba(52, 211, 153, 0.14) 75%, rgba(110, 231, 183, 0.55));
    border-bottom: 2px solid var(--emerald);
    box-shadow: 0 4px 18px rgba(52, 211, 153, 0.35);
    transform: translateY(-100%);
    animation: scanner-loop 4.6s var(--ease) 1.2s infinite;
}

@keyframes scanner-loop {
    0% { transform: translateY(-100%); opacity: 0; }
    10% { opacity: 1; }
    60% { transform: translateY(420%); opacity: 1; }
    70%, 100% { transform: translateY(420%); opacity: 0; }
}

.scan-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border);
    padding-bottom: 16px;
    margin-bottom: 4px;
}

.scan-head-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 15px;
    font-weight: 600;
}

.scan-badge {
    width: 30px;
    height: 30px;
    border-radius: 9px;
    background: linear-gradient(135deg, #34d399, #6ee7b7);
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
}

.scan-badge svg {
    width: 16px;
    height: 16px;
    stroke: var(--on-emerald);
}

.scan-store {
    color: var(--text-faint);
    font-size: 12px;
}

.receipt-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px dashed var(--border);
    font-size: 14.5px;
}

.receipt-row:last-of-type {
    border-bottom: none;
}

.receipt-item {
    color: var(--text-soft);
}

.receipt-amount {
    font-variant-numeric: tabular-nums;
    font-weight: 600;
    color: var(--text);
    white-space: nowrap;
}

.split-avatars {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--border);
}

.avatar-stack {
    display: flex;
}

.avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 700;
    color: #ffffff;
    border: 2px solid var(--bg-soft);
    margin-left: -8px;
}

.avatar:first-child {
    margin-left: 0;
}

.split-note {
    font-size: 13px;
    color: var(--text-faint);
}

.split-note strong {
    color: var(--emerald);
    font-weight: 600;
}

/* ---------- Typography & Glass Surfaces ---------- */

.gradient-text {
    background: linear-gradient(135deg, #ffffff 0%, #6ee7b7 50%, #34d399 100%) !important;
    -webkit-background-clip: text !important;
    background-clip: text !important;
    color: transparent !important;
}

.section-head {
    max-width: 62ch;
    margin-bottom: clamp(36px, 6vw, 60px);
}

.section-kicker {
    display: inline-block;
    color: var(--emerald);
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-size: 11.5px;
    font-weight: 700;
    margin-bottom: 14px;
}

.section-head h2 {
    font-size: clamp(28px, 3.6vw, 40px);
}

.section-head p {
    margin-top: 16px;
    color: var(--text-soft);
    font-size: 17px;
}

.glass {
    background: linear-gradient(180deg, rgba(20, 25, 34, 0.72) 0%, rgba(11, 14, 19, 0.85) 100%) !important;
    border: 1px solid var(--border) !important;
    border-radius: 20px;
    box-shadow: 0 20px 40px -15px rgba(0, 0, 0, 0.9), inset 0 1px 0 rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

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

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

.feature-card {
    padding: 28px 26px;
    background: linear-gradient(180deg, rgba(18, 22, 29, 0.78) 0%, rgba(9, 11, 15, 0.9) 100%);
    border: 1px solid var(--border);
    border-radius: 20px;
    transition: transform 0.25s var(--ease), border-color 0.25s var(--ease), box-shadow 0.25s var(--ease);
}

.feature-card:hover {
    border-color: var(--border-bright);
    background: linear-gradient(180deg, rgba(26, 32, 42, 0.9) 0%, rgba(13, 16, 21, 0.97) 100%);
    transform: translateY(-4px);
    box-shadow: 0 20px 40px -15px rgba(0, 0, 0, 0.9);
}

.feature-icon {
    width: 42px;
    height: 42px;
    border-radius: 11px;
    background: linear-gradient(135deg, rgba(38, 46, 60, 0.6), rgba(18, 22, 28, 0.8));
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 18px;
}

.feature-icon svg {
    width: 21px;
    height: 21px;
    stroke: var(--emerald);
}

.feature-card h3 {
    font-size: 17px;
    font-weight: 600;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 9px;
}

.pill-soon {
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: 0.02em;
    color: var(--emerald-bright);
    background: rgba(52, 211, 153, 0.12);
    border: 1px solid rgba(52, 211, 153, 0.3);
    padding: 3px 8px;
    border-radius: 999px;
}

.feature-card p {
    color: var(--text-soft);
    font-size: 15px;
}

/* ---------- Spotlight & Prices ---------- */

.spotlight-inner {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
    align-items: center;
    border-radius: 20px;
    overflow: hidden;
}

.spotlight-copy {
    padding: clamp(30px, 4vw, 52px);
}

.spotlight-copy h2 {
    font-size: clamp(24px, 3vw, 32px);
    margin-bottom: 14px;
}

.spotlight-copy p {
    color: var(--text-soft);
    font-size: 16px;
    max-width: 44ch;
}

.price-compare {
    padding: clamp(24px, 3vw, 40px);
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.price-target-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 12px;
    border-bottom: 1px dashed var(--border);
    font-size: 13.5px;
    color: var(--text-soft);
}

.price-target-name {
    font-weight: 600;
    color: var(--text);
}

.price-saving-badge {
    background: rgba(52, 211, 153, 0.15);
    color: var(--emerald-bright);
    border: 1px solid rgba(52, 211, 153, 0.4);
    padding: 3px 9px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
}

.price-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border);
    font-size: 14.5px;
}

.price-row.is-best {
    border-color: rgba(52, 211, 153, 0.5);
    background: rgba(52, 211, 153, 0.08);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.6);
}

.price-shop {
    color: var(--text-soft);
}

.price-row.is-best .price-shop {
    color: var(--emerald-bright);
    font-weight: 600;
}

.price-value {
    font-variant-numeric: tabular-nums;
    font-weight: 600;
}

.price-row.is-best .price-value {
    color: var(--emerald-bright);
}

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

.download {
    padding: clamp(44px, 6vw, 76px);
    border-radius: 24px;
}

.download-inner {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: clamp(30px, 5vw, 60px);
    align-items: center;
}

.download h2 {
    font-size: clamp(26px, 3.4vw, 36px);
}

.download-inner>div:first-child p {
    color: var(--text-soft);
    margin-top: 14px;
    font-size: 16px;
    max-width: 46ch;
}

.store-buttons {
    display: flex;
    gap: 12px;
    margin-top: 26px;
    flex-wrap: wrap;
}

.store-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 18px;
    border-radius: 12px;
    text-decoration: none;
    color: var(--text);
    position: relative;
    background: rgba(22, 26, 34, 0.65);
    border: 1px solid var(--border);
}

.store-btn small {
    display: block;
    color: var(--text-faint);
    font-size: 11px;
}

.store-btn strong {
    display: block;
    font-size: 15px;
}

.store-btn.is-live:hover {
    border-color: rgba(52, 211, 153, 0.6);
}

.store-soon {
    position: absolute;
    top: -9px;
    right: -9px;
    background: var(--emerald);
    color: var(--on-emerald);
    font-size: 10px;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 999px;
    border: 1px solid var(--border);
}

.waitlist {
    padding: 26px;
    border-radius: 18px;
}

.waitlist p {
    color: var(--text-soft);
    font-size: 14px;
    margin-bottom: 14px;
}

.waitlist-form {
    display: flex;
    gap: 10px;
}

.waitlist-form input {
    flex: 1;
    min-width: 0;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 12px 14px;
    color: var(--text);
    font-family: var(--font-body);
    font-size: 15px;
}

.waitlist-form input:focus {
    border-color: rgba(52, 211, 153, 0.6);
    outline: none;
}

.waitlist-msg {
    margin-top: 12px;
    font-size: 14px;
    min-height: 1.4em;
    color: var(--emerald-bright);
}

/* ---------- Mobile Bottom Bar ---------- */

.mobile-bottom-bar {
    position: fixed;
    bottom: 18px;
    left: 18px;
    right: 18px;
    z-index: 50;
    display: none;
    transform: translateY(140%);
    transition: transform 0.35s var(--ease);
}

.mobile-bottom-bar.is-visible {
    transform: translateY(0);
}

.mobile-bottom-inner {
    padding: 12px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    background: rgba(14, 18, 24, 0.96);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--border-bright);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.95);
    border-radius: 16px;
}

.mobile-bottom-info {
    display: flex;
    flex-direction: column;
}

.mobile-bottom-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--text);
}

.mobile-bottom-meta {
    font-size: 11.5px;
    color: var(--text-soft);
}

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

.site-footer {
    padding: 40px 0 60px;
    border-top: 1px solid var(--border);
    margin-top: 40px;
}

.site-footer .wrap {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 14px;
    color: var(--text-faint);
    font-size: 14px;
}

.site-footer .brand {
    font-size: 16px;
}

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

@media (max-width: 980px) {
    .feature-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .spotlight-inner {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 880px) {
    .main-nav {
        position: fixed;
        inset: 76px 0 auto 0;
        background: rgba(9, 11, 14, 0.97);
        backdrop-filter: blur(16px);
        border-bottom: 1px solid var(--border);
        flex-direction: column;
        align-items: flex-start;
        padding: 20px var(--gutter) 26px;
        gap: 18px;
        transform: translateY(-8px);
        opacity: 0;
        pointer-events: none;
        transition: transform 0.25s var(--ease), opacity 0.25s var(--ease);
    }
    .main-nav.is-open {
        transform: translateY(0);
        opacity: 1;
        pointer-events: auto;
    }
    .nav-toggle {
        display: block;
    }
    .hero .wrap {
        grid-template-columns: 1fr;
    }
    .hero h1 {
        max-width: none;
    }
    .feature-grid {
        grid-template-columns: 1fr;
    }
    .download-inner {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .header-actions .btn-primary {
        display: none;
    }
    .mobile-bottom-bar {
        display: block;
    }
}

@media (max-width: 520px) {
    .waitlist-form {
        flex-direction: column;
    }
}