/* =====================================================
   Projektilehtede v2 disain
   Kasutab css/main.css tokeneid (värvid, fondid, ruumid)
   ===================================================== */

/* ---------- Teade (nt Ondine) ---------- */
.pj-notice {
    background: #2B2416;
    color: rgba(255, 255, 255, 0.85);
    font-size: var(--text-body-sm);
    padding: 12px 0;
    position: relative;
    z-index: 60;
}
.pj-notice p { margin: 0; line-height: 1.6; }
.pj-notice a { color: var(--color-accent-gold); text-decoration: underline; }

/* ---------- Hero (tume) ---------- */
.pj-hero {
    background: var(--color-bg-dark);
    color: var(--color-text-inverse);
    padding: clamp(110px, 12vw, 160px) 0 clamp(150px, 16vw, 240px);
    position: relative;
}

.pj-hero__breadcrumb {
    font-size: var(--text-caption);
    color: rgba(255, 255, 255, 0.4);
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: clamp(24px, 4vw, 48px);
}
.pj-hero__breadcrumb a {
    color: rgba(255, 255, 255, 0.55);
    text-decoration: none;
    transition: color 0.2s;
}
.pj-hero__breadcrumb a:hover { color: var(--color-accent-gold); }

.pj-hero__grid {
    display: grid;
    grid-template-columns: 1.6fr 1fr;
    gap: clamp(32px, 5vw, 72px);
    align-items: start;
}

.pj-hero__label {
    display: inline-block;
    font-family: var(--font-heading);
    font-size: var(--text-overline);
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--color-accent-gold);
    margin-bottom: var(--space-sm);
}

.pj-hero__title {
    display: flex;
    align-items: center;
    gap: 18px;
    flex-wrap: wrap;
    font-family: var(--font-heading);
    font-size: clamp(36px, 4.5vw, 60px);
    font-weight: 800;
    line-height: 1.1;
    color: var(--color-text-inverse);
    margin: 0 0 var(--space-sm);
}
.pj-hero__title img {
    height: clamp(34px, 3.6vw, 46px);
    width: auto;
    border-radius: 9px;
    display: block;
    flex-shrink: 0;
}
/* heledad/valgel taustal logod tumedas heros */
.pj-hero__title img.on-light {
    background: rgba(255, 255, 255, 0.92);
    padding: 4px;
}

.pj-hero__intro {
    font-size: var(--text-body-lg);
    line-height: 1.65;
    color: rgba(255, 255, 255, 0.65);
    max-width: 560px;
    margin: 0 0 var(--space-lg);
}

.pj-hero__actions {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
    align-items: center;
}
.pj-hero__actions .btn--ghost {
    background: transparent;
    color: rgba(255, 255, 255, 0.75);
    border: 1px solid rgba(255, 255, 255, 0.2);
}
.pj-hero__actions .btn--ghost:hover {
    border-color: var(--color-accent-gold);
    color: var(--color-accent-gold);
}

/* Faktipaneel */
.pj-facts {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.09);
    border-radius: var(--radius-lg);
    padding: clamp(20px, 2.5vw, 30px);
    display: flex;
    flex-direction: column;
    gap: 0;
}
.pj-facts__row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 16px;
    padding: 11px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}
.pj-facts__row:last-child { border-bottom: none; }
.pj-facts__key {
    font-family: var(--font-heading);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.4);
    white-space: nowrap;
}
.pj-facts__val {
    font-size: var(--text-body-sm);
    font-weight: 600;
    color: rgba(255, 255, 255, 0.92);
    text-align: right;
}

/* ---------- Brauseriraam ---------- */
.browser-frame {
    background: var(--color-bg-white);
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 30px 80px rgba(17, 24, 39, 0.22), 0 4px 16px rgba(17, 24, 39, 0.08);
    border: 1px solid rgba(17, 24, 39, 0.08);
}
.browser-frame__bar {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 11px 16px;
    background: #F1F0EC;
    border-bottom: 1px solid rgba(17, 24, 39, 0.06);
}
.browser-frame__dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(17, 24, 39, 0.14);
}
.browser-frame__url {
    margin-left: 12px;
    font-family: var(--font-heading);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.02em;
    color: var(--color-text-muted);
    background: var(--color-bg-white);
    padding: 4px 14px;
    border-radius: 20px;
    line-height: 1;
}
.browser-frame img {
    display: block;
    width: 100%;
    height: auto;
}

/* Hero ekraanipilt (kattub tumeda heroga) */
.pj-shot-hero {
    margin-top: clamp(-190px, -13vw, -110px);
    position: relative;
    z-index: 5;
}

/* ---------- Sektsioonide üldstiil ---------- */
.pj-section { padding: var(--space-section) 0; }
.pj-section--tight { padding: clamp(40px, 5vw, 64px) 0 var(--space-section); }

.pj-head { margin-bottom: clamp(28px, 4vw, 48px); }
.pj-head__label {
    display: inline-block;
    font-family: var(--font-heading);
    font-size: var(--text-overline);
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--color-accent-gold);
    margin-bottom: 10px;
}
.pj-head__title {
    font-family: var(--font-heading);
    font-size: clamp(26px, 3vw, 40px);
    font-weight: 800;
    color: var(--color-text-primary);
    line-height: 1.15;
    margin: 0;
}

/* ---------- Lugu (kaardid) ---------- */
.pj-story__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: clamp(20px, 2.5vw, 32px);
}
.pj-story__card {
    background: var(--color-bg-white);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: clamp(24px, 3vw, 36px);
    box-shadow: var(--shadow-card);
}
.pj-story__num {
    display: inline-block;
    font-family: var(--font-heading);
    font-size: var(--text-overline);
    font-weight: 800;
    letter-spacing: 0.12em;
    color: var(--color-accent-gold);
    margin-bottom: 14px;
}
.pj-story__card h3 {
    font-family: var(--font-heading);
    font-size: 19px;
    font-weight: 700;
    color: var(--color-text-primary);
    margin: 0 0 12px;
}
.pj-story__card p {
    font-size: var(--text-body-sm);
    line-height: 1.75;
    color: var(--color-text-secondary);
    margin: 0 0 10px;
}
.pj-story__card p:last-child { margin-bottom: 0; }
.pj-story__card ul { list-style: none; margin: 0; padding: 0; }
.pj-story__card li {
    position: relative;
    padding: 8px 0 8px 26px;
    font-size: var(--text-body-sm);
    line-height: 1.6;
    color: var(--color-text-secondary);
    border-bottom: 1px solid var(--color-border);
}
.pj-story__card li:last-child { border-bottom: none; }
.pj-story__card li::before {
    content: "";
    position: absolute;
    left: 2px;
    top: 15px;
    width: 12px;
    height: 7px;
    border-left: 2px solid var(--color-accent-gold);
    border-bottom: 2px solid var(--color-accent-gold);
    transform: rotate(-45deg);
}

/* ---------- Funktsionaalsused ---------- */
.pj-features__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: clamp(24px, 3vw, 40px) clamp(24px, 3.5vw, 48px);
}
.pj-feature {
    border-top: 1px solid var(--color-border-hover);
    padding-top: 18px;
    position: relative;
}
.pj-feature::before {
    content: "";
    position: absolute;
    top: -1px;
    left: 0;
    width: 44px;
    height: 2px;
    background: var(--color-accent-gold);
}
.pj-feature h4 {
    font-family: var(--font-heading);
    font-size: 16px;
    font-weight: 700;
    color: var(--color-text-primary);
    margin: 0 0 8px;
}
.pj-feature p {
    font-size: var(--text-body-sm);
    line-height: 1.65;
    color: var(--color-text-secondary);
    margin: 0;
}

/* ---------- Galerii ---------- */
/* 12-veeruline: full=12, half=6, wide=7 (telefon 5 kõrval samas reas) */
.pj-gallery__grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: clamp(28px, 4vw, 48px);
    align-items: start;
}
.pj-gallery__item--full { grid-column: span 12; }
.pj-gallery__item--half { grid-column: span 6; }
.pj-gallery__item--wide { grid-column: span 7; align-self: center; }
.pj-gallery__item--phone {
    grid-column: span 5;
    justify-self: center;
    align-self: center;
}
.pj-gallery__caption {
    margin-top: 16px;
    text-align: center;
    font-family: var(--font-heading);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--color-text-muted);
}

/* Telefoniraam */
.phone-frame {
    width: min(280px, 76vw);
    border: 10px solid var(--color-bg-dark);
    border-radius: 40px;
    overflow: hidden;
    background: var(--color-bg-dark);
    box-shadow: 0 24px 60px rgba(17, 24, 39, 0.25);
    position: relative;
}
.phone-frame::after {
    content: "";
    position: absolute;
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
    width: 84px;
    height: 18px;
    background: var(--color-bg-dark);
    border-radius: 12px;
    z-index: 2;
}
.phone-frame img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 28px;
}

/* ---------- Statistikariba (tume) ---------- */
.pj-stats {
    background: var(--color-bg-dark);
    color: var(--color-text-inverse);
    padding: clamp(48px, 6vw, 80px) 0;
}
.pj-stats__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    gap: clamp(28px, 4vw, 48px);
}
.pj-stat { text-align: left; }
.pj-stat__num {
    font-family: var(--font-heading);
    font-size: clamp(38px, 4.5vw, 60px);
    font-weight: 800;
    line-height: 1;
    color: var(--color-accent-gold);
    margin-bottom: 10px;
}
.pj-stat__label {
    font-family: var(--font-heading);
    font-size: var(--text-body-sm);
    font-weight: 700;
    color: rgba(255, 255, 255, 0.92);
    margin-bottom: 4px;
}
.pj-stat__sub {
    font-size: var(--text-caption);
    color: rgba(255, 255, 255, 0.45);
    line-height: 1.5;
}

/* ---------- Tehnoloogia sildid ---------- */
.pj-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: clamp(32px, 4vw, 48px);
    padding-top: clamp(24px, 3vw, 36px);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}
.pj-tech__label {
    flex-basis: 100%;
    font-family: var(--font-heading);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.4);
    margin-bottom: 4px;
}
.pj-tech__tag {
    font-family: var(--font-heading);
    font-size: var(--text-caption);
    font-weight: 600;
    color: rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 20px;
    padding: 6px 16px;
    line-height: 1;
}

/* ---------- Tsitaat + CTA ---------- */
.pj-outro__grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: clamp(28px, 4vw, 48px);
    align-items: stretch;
}
.pj-outro__grid--solo { grid-template-columns: 1fr; }

.pj-quote {
    position: relative;
    padding: clamp(28px, 4vw, 44px) clamp(24px, 3.5vw, 40px) clamp(28px, 4vw, 44px) clamp(52px, 6vw, 76px);
    background: var(--color-bg-white);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
    display: flex;
    flex-direction: column;
    justify-content: center;
}
.pj-quote::before {
    content: "\201C";
    position: absolute;
    top: clamp(8px, 2vw, 20px);
    left: clamp(16px, 2.5vw, 28px);
    font-family: var(--font-heading);
    font-size: clamp(56px, 7vw, 84px);
    font-weight: 800;
    line-height: 1;
    color: var(--color-accent-gold);
    opacity: 0.85;
}
.pj-quote p {
    font-size: clamp(17px, 1.6vw, 20px);
    line-height: 1.7;
    color: var(--color-text-primary);
    margin: 0 0 16px;
}
.pj-quote cite {
    font-style: normal;
    font-family: var(--font-heading);
    font-size: var(--text-caption);
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--color-text-muted);
}

.pj-cta {
    background: var(--color-bg-dark);
    border-radius: var(--radius-lg);
    padding: clamp(28px, 4vw, 44px) clamp(24px, 3.5vw, 40px);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    gap: 8px;
}
.pj-cta h3 {
    font-family: var(--font-heading);
    font-size: clamp(20px, 2.2vw, 26px);
    font-weight: 800;
    color: var(--color-text-inverse);
    margin: 0;
}
.pj-cta p {
    font-size: var(--text-body-sm);
    line-height: 1.65;
    color: rgba(255, 255, 255, 0.6);
    margin: 0 0 14px;
}

/* ---------- Järgmine projekt ---------- */
.pj-next {
    display: block;
    text-decoration: none;
    border-top: 1px solid var(--color-border-hover);
    background: var(--color-bg);
    transition: background 0.25s ease;
}
.pj-next:hover { background: var(--color-bg-white); }
.pj-next__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: clamp(32px, 4.5vw, 56px) 0;
}
.pj-next__label {
    display: block;
    font-family: var(--font-heading);
    font-size: var(--text-overline);
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--color-text-muted);
    margin-bottom: 8px;
}
.pj-next__title {
    font-family: var(--font-heading);
    font-size: clamp(24px, 3vw, 40px);
    font-weight: 800;
    color: var(--color-text-primary);
    line-height: 1.1;
}
.pj-next__arrow {
    font-size: clamp(28px, 3vw, 40px);
    color: var(--color-accent-gold);
    transition: transform 0.25s var(--ease-out);
    flex-shrink: 0;
}
.pj-next:hover .pj-next__arrow { transform: translateX(10px); }

/* ---------- Ilmumisanimatsioon ---------- */
[data-reveal] {
    opacity: 0;
    transform: translateY(18px);
    transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-out);
}
[data-reveal].revealed {
    opacity: 1;
    transform: translateY(0);
}
@media (prefers-reduced-motion: reduce) {
    [data-reveal] { opacity: 1 !important; transform: none !important; transition: none !important; }
}

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
    .pj-hero__grid { grid-template-columns: 1fr; }
    .pj-facts { max-width: 520px; }
    .pj-features__grid { grid-template-columns: repeat(2, 1fr); }
    .pj-outro__grid { grid-template-columns: 1fr; }
}

@media (max-width: 700px) {
    .pj-gallery__grid { grid-template-columns: 1fr; }
    .pj-gallery__item--full,
    .pj-gallery__item--half,
    .pj-gallery__item--wide,
    .pj-gallery__item--phone { grid-column: auto; }
    .pj-gallery__item--phone { justify-self: center; }
    .pj-features__grid { grid-template-columns: 1fr; }
    .pj-stats__grid { grid-template-columns: repeat(2, 1fr); }
    .pj-shot-hero { margin-top: -90px; }
    .pj-hero { padding-bottom: 130px; }
    .pj-next__inner { padding: 36px 0; }
}

@media (max-width: 420px) {
    .pj-stats__grid { grid-template-columns: 1fr; }
    .browser-frame__url { display: none; }
}
