/*
 * Javna stranica Trimlija — paleta "bor i mesing" iz mobilne aplikacije
 * (Trimli/app/theme/colors.ts) i Montserrat iz app/assets/fonts.
 *
 * Običan CSS bez Vite builda, isto kao privacy-policy: stranica radi čim
 * se kod povuče na server.
 */

@font-face { font-family: 'Montserrat'; font-weight: 400; font-display: swap; src: url('../fonts/montserrat-regular.woff2') format('woff2'); }
@font-face { font-family: 'Montserrat'; font-weight: 500; font-display: swap; src: url('../fonts/montserrat-medium.woff2') format('woff2'); }
@font-face { font-family: 'Montserrat'; font-weight: 600; font-display: swap; src: url('../fonts/montserrat-semibold.woff2') format('woff2'); }
@font-face { font-family: 'Montserrat'; font-weight: 700; font-display: swap; src: url('../fonts/montserrat-bold.woff2') format('woff2'); }
@font-face { font-family: 'Montserrat'; font-weight: 800; font-display: swap; src: url('../fonts/montserrat-extrabold.woff2') format('woff2'); }

:root {
    color-scheme: light;

    --ink: #15241E;
    --pine-900: #17291F;
    --pine-800: #1E3A2E;
    --pine-700: #17493A;
    --pine-500: #216B52;
    --pine-400: #6E9585;
    --pine-300: #A8C1B6;
    --brass: #C08A3E;
    --brass-tint: #F3E7D2;
    --stone: #7C7468;
    --sand-200: #DCD4C6;
    --sand-100: #EBE5D9;
    --paper: #F5F1E8;
    --surface: #FFFFFF;
    --success-bg: #DEEDE4;

    --radius: 16px;
    --radius-lg: 24px;
    --wrap: 1160px;
}

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

html { scroll-behavior: smooth; scroll-padding-top: 80px; }

body {
    margin: 0;
    font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: var(--ink);
    background: var(--surface);
    -webkit-font-smoothing: antialiased;
}

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

a { color: var(--pine-500); }

h1, h2, h3 { margin: 0; font-weight: 700; letter-spacing: -0.02em; line-height: 1.15; }
p { margin: 0; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }
.wrap-narrow { max-width: 760px; }

/* ---------- Dugmad ---------- */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 24px;
    border-radius: 12px;
    border: 1.5px solid transparent;
    font: inherit;
    font-weight: 600;
    font-size: 15px;
    letter-spacing: 0.01em;
    text-decoration: none;
    white-space: nowrap;
    cursor: pointer;
    transition: background-color .15s ease, border-color .15s ease, color .15s ease;
}
.btn-sm { padding: 10px 16px; font-size: 14px; border-radius: 10px; }

.btn-primary { background: var(--pine-500); color: #fff; }
.btn-primary:hover { background: var(--pine-700); }

.btn-outline { background: transparent; color: var(--ink); border-color: var(--sand-200); }
.btn-outline:hover { border-color: var(--ink); }

.btn:focus-visible, a:focus-visible, summary:focus-visible, .gallery:focus-visible {
    outline: 2px solid var(--brass);
    outline-offset: 3px;
}

/* ---------- Zaglavlje ---------- */

.site-header {
    position: sticky;
    top: 0;
    z-index: 10;
    background: rgba(245, 241, 232, 0.92);
    backdrop-filter: saturate(1.4) blur(10px);
    -webkit-backdrop-filter: saturate(1.4) blur(10px);
    border-bottom: 1px solid var(--sand-100);
}
.header-inner { display: flex; align-items: center; gap: 32px; height: 68px; }

.logo { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; }
.logo-icon { width: 36px; height: 36px; border-radius: 9px; }

.wordmark {
    font-weight: 800;
    font-size: 24px;
    letter-spacing: -0.03em;
    color: var(--ink);
}
.wordmark span { color: var(--brass); }

.header-nav { display: flex; gap: 28px; margin-left: auto; }
.header-nav a {
    color: var(--ink);
    text-decoration: none;
    font-weight: 500;
    font-size: 14.5px;
    opacity: 0.8;
}
.header-nav a:hover { opacity: 1; color: var(--pine-500); }

/* ---------- Zajedničko za sekcije ---------- */

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

.section { padding: 112px 0; }
.section-paper { background: var(--paper); }

.section-head { max-width: 680px; margin-bottom: 64px; }
.section-head h2 { font-size: clamp(30px, 4vw, 44px); }
.section-lead { margin-top: 18px; font-size: 18px; color: var(--stone); }

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

.hero {
    background: var(--paper);
    padding: 72px 0 0;
    overflow: hidden;
}
.hero-inner {
    display: grid;
    grid-template-columns: 1.05fr 1fr;
    gap: 48px;
    align-items: center;
}
.hero-copy { padding-bottom: 72px; }
.hero h1 {
    font-size: clamp(42px, 6.2vw, 72px);
    font-weight: 800;
    letter-spacing: -0.035em;
    line-height: 1.02;
}
.lead { margin-top: 24px; font-size: 19px; line-height: 1.6; color: var(--stone); max-width: 520px; }

.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 36px; }

.hero-facts {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 24px;
    margin: 32px 0 0;
    padding: 0;
    list-style: none;
    font-size: 14px;
    font-weight: 500;
    color: var(--stone);
}
.hero-facts li { display: flex; align-items: center; gap: 8px; }
.hero-facts li::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--pine-500);
}

.hero-visual {
    position: relative;
    height: 620px;
    align-self: end;
}
.hero-visual::before {
    content: '';
    position: absolute;
    inset: 80px -40% -10% 8%;
    background: var(--pine-800);
    border-radius: 48px 0 0 0;
}
.hero-visual .phone { position: absolute; width: 270px; }
.hero-visual .phone-back { left: 46%; top: 24px; transform: rotate(4deg); opacity: 0.96; }
.hero-visual .phone-front { left: 12%; top: 70px; }

.hero-chip {
    position: absolute;
    left: 0;
    top: 300px;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 18px 12px 12px;
    background: var(--surface);
    border-radius: 16px;
    font-size: 13px;
    color: var(--stone);
    box-shadow: 0 18px 40px -12px rgba(21, 36, 30, 0.35);
    white-space: nowrap;
}
.hero-chip img { width: 36px; height: 36px; border-radius: 9px; }
.hero-chip-title { font-size: 13.5px; font-weight: 700; color: var(--ink); }

/* ---------- Telefon ---------- */

.phone {
    margin: 0;
    padding: 7px;
    background: var(--ink);
    border-radius: 38px;
    box-shadow:
        0 1px 0 1px rgba(255, 255, 255, 0.06) inset,
        0 30px 60px -20px rgba(21, 36, 30, 0.45);
}
/* Screenshotovi su bez status bara, pa vrh ekrana dobije bijeli razmak da sadržaj ne udara u zaobljeni rub. */
.phone img { width: 100%; padding-top: 5%; border-radius: 31px; background: var(--surface); }
/* Ekran kojem fotografija ide do samog vrha. */
.phone-bleed img { padding-top: 0; }

/* ---------- Funkcije ---------- */

.feature {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 64px;
    align-items: center;
    padding: 56px 0;
}
.feature + .feature { border-top: 1px solid var(--sand-100); }
.feature > .phone { width: 280px; justify-self: center; }
.feature-flip .feature-copy { order: 2; }

.feature-tag {
    display: inline-block;
    padding: 5px 12px;
    border-radius: 999px;
    background: var(--success-bg);
    color: var(--pine-500);
    font-size: 12.5px;
    font-weight: 600;
    margin-bottom: 18px;
}
.feature h3 { font-size: clamp(24px, 2.8vw, 32px); }
.feature-copy > p:not(.feature-tag) { margin-top: 16px; font-size: 17px; color: var(--stone); max-width: 480px; }

.checks { margin: 24px 0 0; padding: 0; list-style: none; display: grid; gap: 12px; }
.checks li {
    position: relative;
    padding-left: 32px;
    font-size: 15.5px;
    font-weight: 500;
}
.checks li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 2px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--success-bg) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none' stroke='%23216B52' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 10.5l2.6 2.5L14 7.5'/%3E%3C/svg%3E") center / 20px no-repeat;
}

.phone-pair { display: flex; gap: 20px; justify-content: center; align-items: flex-start; }
.phone-pair .phone { width: 240px; }
.phone-pair .phone:last-child { margin-top: 48px; }

/* ---------- Zašto Trimli ---------- */

.section-dark { background: var(--pine-800); color: var(--paper); }
.section-dark .eyebrow { color: var(--brass); }
.section-dark h2 { color: #fff; }

.reasons {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1px;
    background: rgba(168, 193, 182, 0.18);
    border-radius: var(--radius-lg);
    overflow: hidden;
}
.reason { padding: 36px 32px 40px; background: var(--pine-800); }
.reason-num {
    display: block;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.08em;
    color: var(--brass);
    margin-bottom: 20px;
}
.reason h3 { font-size: 20px; color: #fff; }
.reason p { margin-top: 12px; font-size: 15.5px; color: var(--pine-300); }

/* ---------- Galerija klijentskih ekrana ---------- */

.gallery {
    display: flex;
    gap: 28px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    padding: 8px max(24px, calc((100vw - var(--wrap)) / 2 + 24px)) 32px;
    scroll-padding: 0 max(24px, calc((100vw - var(--wrap)) / 2 + 24px));
    scrollbar-width: thin;
    scrollbar-color: var(--sand-200) transparent;
}
.gallery-item { flex: 0 0 240px; margin: 0; scroll-snap-align: start; }
.gallery-item figcaption {
    margin-top: 18px;
    font-size: 14.5px;
    font-weight: 600;
    text-align: center;
    padding: 0 8px;
}

/* ---------- Koraci ---------- */

.steps {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin: 0;
    padding: 0;
    list-style: none;
    counter-reset: step;
}
.steps li {
    counter-increment: step;
    padding: 32px;
    background: var(--surface);
    border-radius: var(--radius-lg);
}
.steps li::before {
    content: counter(step);
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    margin-bottom: 24px;
    border-radius: 12px;
    background: var(--ink);
    color: #fff;
    font-weight: 700;
}
.steps h3 { font-size: 19px; }
.steps p { margin-top: 10px; color: var(--stone); }

/* ---------- Cijene ---------- */

.plans {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
    max-width: 760px;
}
.plan {
    padding: 36px 32px;
    border: 1.5px solid var(--sand-200);
    border-radius: var(--radius-lg);
}
.plan-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.plan h3 { font-size: 20px; }
.plan-price { margin-top: 20px; font-size: 17px; color: var(--stone); }
.plan-price strong {
    font-size: clamp(40px, 5vw, 52px);
    font-weight: 800;
    letter-spacing: -0.03em;
    color: var(--ink);
}
.plan-note { margin-top: 12px; font-size: 15.5px; color: var(--stone); }

.plan-featured { background: var(--pine-800); border-color: var(--pine-800); color: var(--paper); }
.plan-featured h3, .plan-featured .plan-price strong { color: #fff; }
.plan-featured .plan-price, .plan-featured .plan-note { color: var(--pine-300); }
.plan-badge {
    padding: 4px 12px;
    border-radius: 999px;
    background: var(--brass);
    color: #fff;
    font-size: 13px;
    font-weight: 700;
}

.plan-includes {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px 24px;
    margin: 32px 0 0;
    padding: 0;
    list-style: none;
    max-width: 760px;
    font-size: 15px;
    font-weight: 500;
}
.plan-includes li { display: flex; align-items: center; gap: 8px; }
.plan-includes li::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--brass);
}

/* ---------- Preuzimanje ---------- */

.download { background: var(--surface); }
.download-inner {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 64px;
    align-items: center;
    padding: 64px;
    background: var(--paper);
    border-radius: 32px;
}
.app-icon { width: 88px; height: 88px; border-radius: 22px; margin-bottom: 28px; }
.download h2 { font-size: clamp(28px, 3.6vw, 40px); max-width: 520px; }
.download-copy > p { margin-top: 16px; font-size: 17px; color: var(--stone); max-width: 520px; }
.download-copy > .download-help { font-size: 15px; }

.stores { display: flex; gap: 20px; }
.store {
    width: 220px;
    padding: 20px 20px 24px;
    background: var(--surface);
    border-radius: 20px;
    text-align: center;
}
.store-qr {
    aspect-ratio: 1;
    display: grid;
    place-items: center;
    border-radius: 12px;
    overflow: hidden;
}
.store-qr img { width: 100%; height: 100%; object-fit: contain; }
.store-qr.is-empty {
    border: 2px dashed var(--sand-200);
    background: var(--paper);
    color: var(--stone);
    font-size: 13px;
    font-weight: 600;
    line-height: 1.4;
}
.store-platform { margin-top: 14px; font-size: 13.5px; color: var(--stone); }
.store .store-button { margin-top: 10px; width: 100%; }

.store-button {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 9px 22px 10px;
    background: var(--ink);
    color: #fff;
    border-radius: 12px;
    text-decoration: none;
    line-height: 1.2;
    transition: background-color .15s ease;
}
.store-button:hover { background: var(--pine-500); }
.store-button-label { font-size: 11px; font-weight: 500; opacity: 0.75; }
.store-button-name { font-size: 17px; font-weight: 700; letter-spacing: -0.01em; }

.hero-stores { display: none; gap: 10px; margin-top: 32px; }
.hero-stores .store-button { flex: 1; }

/* ---------- Pitanja ---------- */

.faq { border-top: 1px solid var(--sand-100); }
.faq details { border-bottom: 1px solid var(--sand-100); }
.faq summary {
    position: relative;
    padding: 24px 48px 24px 0;
    font-size: 17.5px;
    font-weight: 600;
    list-style: none;
    cursor: pointer;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
    content: '';
    position: absolute;
    right: 4px;
    top: 50%;
    width: 12px;
    height: 12px;
    margin-top: -9px;
    border-right: 2px solid var(--pine-500);
    border-bottom: 2px solid var(--pine-500);
    transform: rotate(45deg);
    transition: transform .2s ease;
}
.faq details[open] summary::after { transform: rotate(-135deg); margin-top: -3px; }
.faq details p { padding: 0 48px 24px 0; color: var(--stone); font-size: 16px; }

/* ---------- Podnožje ---------- */

.site-footer { background: var(--ink); color: var(--pine-300); padding: 56px 0 32px; }
.site-footer .wordmark { color: #fff; }
.footer-inner { display: flex; justify-content: space-between; align-items: flex-start; gap: 32px; flex-wrap: wrap; }
.footer-tagline { margin-top: 8px; font-size: 14.5px; }
.footer-links { display: flex; flex-direction: column; gap: 8px; text-align: right; }
.footer-links a { color: var(--paper); text-decoration: none; font-size: 14.5px; }
.footer-links a:hover { color: var(--brass); }
.footer-link { padding: 0; border: 0; background: none; font: inherit; font-size: 14.5px; color: var(--paper); text-align: inherit; cursor: pointer; }
.footer-link:hover { color: var(--brass); }
.footer-bottom {
    margin-top: 40px;
    padding-top: 24px;
    border-top: 1px solid rgba(168, 193, 182, 0.15);
    font-size: 13px;
}

/* ---------- Kolačići ---------- */

.consent {
    position: fixed;
    left: 16px;
    bottom: 16px;
    z-index: 50;
    display: flex;
    align-items: center;
    gap: 16px;
    max-width: 560px;
    padding: 16px 20px;
    background: var(--surface);
    border: 1px solid var(--sand-200);
    border-radius: var(--radius);
    box-shadow: 0 12px 32px rgba(21, 36, 30, 0.14);
    font-size: 14px;
    line-height: 1.5;
}
.consent[hidden] { display: none; }
.consent-title { margin-bottom: 4px; font-weight: 700; }
.consent-actions { display: flex; gap: 8px; flex-shrink: 0; }

/* ---------- Manji ekrani ---------- */

@media (max-width: 1024px) {
    .header-nav { display: none; }
    .header-inner { justify-content: space-between; }

    .hero-inner { grid-template-columns: 1fr; }
    .hero-copy { padding-bottom: 0; }
    .hero-visual { height: 560px; max-width: 560px; width: 100%; margin: 0 auto; }

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

    .download-inner { grid-template-columns: 1fr; padding: 48px; }
}

@media (max-width: 760px) {
    .section { padding: 80px 0; }
    .section-head { margin-bottom: 40px; }

    .hero { padding-top: 48px; }
    .lead { font-size: 17px; }
    .hero-visual { height: 480px; }
    .hero-visual .phone { width: 220px; }
    .hero-visual .phone-front { left: 4%; top: 64px; }
    .hero-visual .phone-back { left: 40%; }
    .hero-chip { display: none; }

    .feature { grid-template-columns: 1fr; gap: 40px; padding: 48px 0; }
    .feature-flip .feature-copy { order: 0; }
    .feature > .phone { width: 250px; }
    .phone-pair .phone { width: calc(50% - 10px); max-width: 220px; }
    .phone-pair .phone:last-child { margin-top: 32px; }

    .reasons { grid-template-columns: 1fr; }
    .reason { padding: 28px 24px 32px; }

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

    .plans { grid-template-columns: 1fr; }
    .plan { padding: 28px 24px; }
    .plan-includes { grid-template-columns: 1fr; }

    .download-inner { padding: 32px 20px; border-radius: 24px; gap: 40px; }
    .stores { flex-direction: column; align-items: center; }
    .store { width: 100%; max-width: 320px; padding: 16px 16px 18px; }
    .store-qr { display: none; }
    .store-platform { margin-top: 0; }

    .hero-actions { display: none; }
    .hero-stores { display: flex; }

    .footer-links { text-align: left; }

    .consent { right: 16px; flex-direction: column; align-items: stretch; }
    .consent-actions .btn { flex: 1; }
}

@media (max-width: 400px) {
    .wrap { padding: 0 16px; }
    .hero-actions .btn { width: 100%; }
    .hero-visual .phone { width: 190px; }
    .hero-visual { height: 420px; }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    * { transition: none !important; }
}
