/* ============================================================
   FIMAK — page-hero.css
   Ic sayfalarin ortak ust bolumu (gorsel + sayfa yolu + baslik).
   hakkimizda.php, kalite-ve-sertifikalar.php gibi sayfalar paylasir;
   sayfaya ozel dosyadan once yuklenir.

   Bolumler
   1. Sayfa hero'su (gorsel + baslik)
   2. Responsive (tum media query'ler burada)

   Olculer akiskan: clamp ile 375px -> 1920px arasi dogrusal buyur.
   Renkler style.css'teki :root degiskenlerinden okunur.
   ============================================================ */



/* ------------------------------------------------------------
   1. Sayfa hero'su
   Tam genislik gorsel + ustune inen gradyanlar; icerik alta yaslanir.
   Giris animasyonu: baslik kelimeleri maskeden yukari kayar.
   Parallax ve animasyonlar js/page-hero.js ile; JS yoksa her sey
   dogrudan gorunur.
   ------------------------------------------------------------ */
.page-hero {
    --pb: clamp(30px, 20.3px + 2.59vw, 70px);
    --crumb: clamp(14px, 13.5px + 0.13vw, 16px);
    --h1: clamp(35px, 9.3px + 6.86vw, 120px);
    --btn: clamp(50px, 41.3px + 2.33vw, 86px);
    --btn-bottom: clamp(30px, 20.3px + 2.59vw, 70px);
    --ease: cubic-bezier(0.22, 1, 0.36, 1);

    position: relative;
    z-index: 2;
    height: 68vh;
    min-height: 460px;
    max-height: 720px;
    overflow: hidden;
    padding-top: 100px;
    background-color: #000;
    color: var(--text-on-dark);

    /* style.css'teki govde degerlerini notrle */
    letter-spacing: normal;
    line-height: normal;
}

.page-hero__bg {
    position: absolute;
    inset: 0;
    overflow: clip;
}

/* Gorsel cerceveden tasacak kadar buyuk: scroll ile kayarken bosluk kalmaz */
.page-hero__bg img {
    position: absolute;
    top: -10%;
    left: 0;
    width: 100%;
    height: 120%;
    object-fit: cover;
    will-change: transform;
    /* Gorsel yuklenemezse arkada notr koyu zemin kalir */
    background: radial-gradient(120% 90% at 50% 35%, #3a3a3f 0%, #1d1d1f 45%, #0b0b0c 100%);
}

.page-hero__bg::before,
.page-hero__bg::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
}

/* Ustte ve altta koyulasan gradyanlar: yazi her gorselde okunur kalir */
.page-hero__bg::before {
    z-index: 10;
    /* background:
        linear-gradient(182deg, #000 -0.72%, rgba(0, 0, 0, 0) 32.08%),
        linear-gradient(169deg, rgba(0, 0, 0, 0) 28.36%, #000 91.81%); */
}

.page-hero__bg::after { background-color: rgb(0 0 0 / 0.2); }

.page-hero__inner {
    position: relative;
    z-index: 20;
    display: flex;
    align-items: flex-end;
    width: 100%;
    max-width: 1840px;
    height: 100%;
    margin-inline: auto;
    padding: 0 80px var(--pb);
}

.page-hero__copy {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 5px;
    width: 100%;
}

.page-hero__crumbs {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 5px;
    margin-bottom: clamp(8px, 4px + 1vw, 14px);
}

.page-hero__crumbs a,
.page-hero__crumbs span {
    font-size: var(--crumb);
    text-transform: uppercase;
    color: rgb(255 255 255 / 0.7);
    transition: color 0.5s ease;
}

.page-hero__crumbs a:hover { color: #fff; }

.page-hero__crumbs a:focus-visible {
    outline: 2px solid #fff;
    outline-offset: 3px;
}

.page-hero__line {
    width: 100%;
    height: 1px;
    margin: 12px 0;
    background-color: rgb(255 255 255 / 0.2);
    transform-origin: left;
}

.page-hero__title {
    max-width: 1200px;
    font-size: clamp(35px, 9.3px + 6.86vw, 99px);
    font-weight: 600;
    line-height: 1.05;
    /* em tabanli: her kirilim noktasinda olcuyle birlikte buyur, ayrica ayar gerekmez */
    letter-spacing: -0.035em;
    text-wrap: balance;
}

/* Kelime maskesi: her kelime kendi kutusunun altindan yukari kayar */
.page-hero__title .page-hero__mask {
    display: inline-block;
    overflow: clip;
    padding-bottom: 0.04em;
    vertical-align: top;
}

.page-hero__title .page-hero__word { display: inline-block; }

/* Asagi kaydir dugmesi */
.page-hero__scroll {
    position: absolute;
    right: 4%;
    bottom: var(--btn-bottom);
    z-index: 30;
    display: flex;
    align-items: center;
    justify-content: center;
    width: var(--btn);
    height: var(--btn);
    border: 1px solid rgb(255 255 255 / 0.35);
    border-radius: 50%;
    background: transparent;
    color: #fff;
    cursor: pointer;
    transition: background-color 0.5s ease, border-color 0.5s ease, color 0.5s ease;
}

.page-hero__scroll svg {
    width: clamp(14px, 11.6px + 0.65vw, 20px);
    height: auto;
}

.page-hero__scroll:hover {
    background-color: #fff;
    border-color: #fff;
    color: var(--text);
}

.page-hero .page-hero__scroll:focus-visible {
    outline: 2px solid #fff;
    outline-offset: 4px;
}


/* ---------- Giris animasyonu ---------- */
html.js .page-hero__crumbs {
    opacity: 0;
    transform: translateY(20px);
}

html.js .page-hero__line { transform: scaleX(0); }
html.js .page-hero__title .page-hero__word { transform: translateY(105%); }

html.js .page-hero__scroll {
    opacity: 0;
    transform: scale(0.8);
}

.page-hero.is-in .page-hero__crumbs {
    opacity: 1;
    transform: none;
    transition: opacity 0.8s var(--ease), transform 0.8s var(--ease);
}

.page-hero.is-in .page-hero__line {
    transform: scaleX(1);
    transition: transform 1.2s var(--ease) 0.1s;
}

.page-hero.is-in .page-hero__title .page-hero__word {
    transform: none;
    transition: transform 1s var(--ease);
}

.page-hero.is-in .page-hero__scroll {
    opacity: 1;
    transform: none;
    transition: opacity 0.8s var(--ease) 0.6s, transform 0.8s var(--ease) 0.6s,
        background-color 0.5s ease, border-color 0.5s ease, color 0.5s ease;
}


/* ------------------------------------------------------------
   2. Responsive
   ------------------------------------------------------------ */
@media (max-width: 1023px) {
    .page-hero { padding-top: 75px; }
    .page-hero__scroll { display: none; }
}

@media (max-width: 767px) {
    /* Dar ekranda yukseklik icerige gore; metin ortalanir */
    .page-hero {
        height: auto;
        min-height: 380px;
        max-height: none;
    }

    /* Dar ekranda gradyan yerine duz perde; parlak gorsellerde de okunur kalsin diye
       tasarimdaki 0.4 yerine biraz daha koyu */
    .page-hero__bg::before { background: rgb(0 0 0 / 0.5); }

    .page-hero__inner {
        justify-content: center;
        min-height: 380px;
        padding: 100px 40px 60px;
    }

    .page-hero__copy {
        align-items: center;
        text-align: center;
    }

    .page-hero__crumbs { justify-content: center; }

    .page-hero__line {
        margin: 10px 0;
        transform-origin: center;
    }
}

@media (max-width: 639px) {
    .page-hero__inner { padding: 60px 20px; }
}

@media (prefers-reduced-motion: reduce) {
    html.js .page-hero__crumbs,
    html.js .page-hero__line,
    html.js .page-hero__title .page-hero__word,
    html.js .page-hero__scroll {
        opacity: 1;
        transform: none;
        transition: none;
    }
}
