/* Demirel TPU — stil dosyası.
   Palet: Denizli traverteni (zemin), ıslak taş grisi (metin), kaynak suyu mavi-yeşili (vurgu).
   Renk ve yazı tipleri :root içinde. */

:root {
    --bg: #f2f1ed;
    --bg-alt: #e6e4de;
    --ink: #22272b;
    --ink-soft: #5f666c;
    --line: #d3d1ca;
    --accent: #2f7f85;
    --accent-light: #9fd0d2; /* koyu zemin üstünde vurgu (hero'daki T, P, U) */
    --white: #ffffff;
    --error: #b3261e;

    --font-display: "Space Grotesk", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    --font-body: "Manrope", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

    --container: 1200px;
    --gutter: 24px;
    --header-h: 76px;
    --radius: 4px;
    --hero-size: clamp(3rem, 8.5vw, 6.4rem); /* hero satır boyutu */
    --cap: calc(var(--hero-size) * .84); /* hero'daki DEMİREL'in büyük harf yüksekliği */
    --cap-tpu: calc(var(--hero-size) * .6); /* T / P / U baş harflerinin yüksekliği; DEMİREL'den küçük */
    --ease: cubic-bezier(.22, .61, .36, 1);
}

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

html {
    scroll-behavior: smooth;
    scroll-padding-top: var(--header-h);
}

body {
    margin: 0;
    font-family: var(--font-body);
    font-size: 1rem;
    line-height: 1.65;
    color: var(--ink);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
}

body.menu-open {
    overflow: hidden;
}

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

figure {
    margin: 0;
}

a {
    color: inherit;
    text-decoration: none;
}

ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

dl,
dd {
    margin: 0;
}

button {
    font: inherit;
    color: inherit;
    background: none;
    border: 0;
    cursor: pointer;
}

:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 3px;
}

.hero :focus-visible,
.menu-open .site-header :focus-visible {
    outline-color: var(--accent-light);
}

/* Ekran okuyucuya var, gözle yok */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    white-space: nowrap;
    border: 0;
}

h1,
h2,
h3 {
    font-family: var(--font-display);
    font-weight: 500;
    line-height: 1.08;
    letter-spacing: -.01em;
    margin: 0 0 .5em;
}

h1 {
    font-size: clamp(3.2rem, 9vw, 6.5rem);
    font-weight: 700;
}

h2 {
    font-size: clamp(2.1rem, 4.2vw, 3.1rem);
}

h3 {
    font-size: 1.5rem;
}

p {
    margin: 0 0 1em;
}

.container {
    width: min(var(--container), 100% - var(--gutter) * 2);
    margin-inline: auto;
}

.section {
    padding: clamp(80px, 11vw, 140px) 0;
}

.section-head {
    max-width: 640px;
    margin-bottom: clamp(40px, 5vw, 64px);
}

.section-head h2 {
    margin-bottom: .3em;
}

.lead {
    font-size: 1.1rem;
    line-height: 1.6;
    color: var(--ink-soft);
    max-width: 56ch;
    margin: 0;
}

/* ---------- Butonlar ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 28px;
    font-size: .95rem;
    font-weight: 600;
    border: 1px solid transparent;
    border-radius: var(--radius);
    transition: background-color .25s var(--ease), color .25s var(--ease), border-color .25s var(--ease);
}

.btn:disabled {
    opacity: .6;
    cursor: default;
}

.btn-primary {
    background: var(--ink);
    color: var(--white);
}

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

.btn-light {
    background: var(--white);
    color: var(--ink);
}

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

.btn-ghost {
    border-color: rgba(255, 255, 255, .55);
    color: var(--white);
}

.btn-ghost:hover {
    background: var(--white);
    color: var(--ink);
}

/* ---------- Üst menü ---------- */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    height: var(--header-h);
    display: flex;
    align-items: center;
    color: var(--white); /* hero koyu; kaydırınca koyulaşır */
    transition: background-color .3s var(--ease), color .3s var(--ease), box-shadow .3s var(--ease);
}

.site-header.scrolled {
    background: rgba(242, 241, 237, .92);
    color: var(--ink);
    box-shadow: 0 1px 0 var(--line);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* Logo hero'dayken gizli; eşik geçilince hero'daki DEMİREL'in yerinden buraya uçar (script.js, 6).
   .is-on sınıfını JS verir; menü açıkken her durumda görünür. */
.brand {
    --logo-h: 46px;
    display: block;
    visibility: hidden;
    opacity: 0;
    transition: opacity .25s var(--ease), visibility 0s .25s;
}

.brand.is-on,
.menu-open .brand {
    visibility: visible;
    opacity: 1;
    transition: opacity .25s var(--ease), visibility 0s;
}

.brand-logo {
    display: block;
    height: var(--logo-h);
    width: calc(var(--logo-h) * 2.847); /* 1000 / 351.2 */
    transform-origin: 0 0;
    transition: color .35s var(--ease);
}

.brand-logo .lk-tpu {
    transition: opacity .3s var(--ease) .35s; /* TPU ve çizgi, DEMİREL yerine oturunca belirir */
}

.brand-logo.from-hero .lk-tpu {
    opacity: 0;
    transition-delay: 0s;
}

.site-nav {
    display: flex;
    align-items: center;
    gap: 36px;
    font-size: .95rem;
    font-weight: 500;
}

.site-nav a {
    position: relative;
    padding: 6px 0;
}

.site-nav a::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    width: 0;
    height: 1px;
    background: currentColor;
    transition: width .3s var(--ease);
}

.site-nav a:hover::after {
    width: 100%;
}

.site-nav .lang-switch {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: .8rem;
    font-weight: 700;
    letter-spacing: .1em;
}

.site-nav .lang-switch a {
    padding: 0;
    opacity: .5;
    transition: opacity .25s var(--ease);
}

.site-nav .lang-switch a:hover {
    opacity: 1;
}

.site-nav .lang-switch a::after {
    display: none;
}

.site-nav .lang-switch .sep {
    opacity: .35;
    font-weight: 400;
}

/* Hamburger (yalnızca mobil) */
.nav-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 44px;
    height: 44px;
    margin-right: -10px;
    padding: 0 10px;
}

.nav-toggle span {
    display: block;
    width: 100%;
    height: 2px;
    background: currentColor;
    transition: transform .3s var(--ease), opacity .3s var(--ease);
}

.nav-toggle[aria-expanded="true"] span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] span:nth-child(2) {
    opacity: 0;
}

.nav-toggle[aria-expanded="true"] span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* ---------- Hero ---------- */
.hero {
    position: relative;
    min-height: 100vh;
    min-height: 100svh;
    display: flex;
    align-items: center;
    color: var(--white);
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    inset: 0;
    background: var(--ink) url("../images/hero.jpg") center / cover no-repeat;
}

/* Fotoğraf üstünde yazı okunsun: solda ve altta daha koyu */
.hero-bg::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(20, 24, 27, .55) 0%, rgba(20, 24, 27, .2) 60%, rgba(20, 24, 27, .15) 100%),
        linear-gradient(180deg, rgba(20, 24, 27, .4) 0%, rgba(20, 24, 27, .6) 100%);
}

.hero-content {
    position: relative;
    padding: calc(var(--header-h) + 40px) 0 80px;
}

/* DEMİREL ve T / P / U logo çizimi; T / P / U daha küçük, kelimelerin kalanı büyük harfle ve daha da küçük,
   açılışta baş harfin yanından soldan sağa, sırayla belirir. */
.hero-title {
    margin: 0 0 calc(var(--hero-size) * .28);
    animation: heroIn .8s var(--ease) both;
}

.hero-mark {
    display: block;
    height: calc(var(--cap) * 1.2223); /* İ noktası dahil */
    width: calc(var(--cap) * 5.643);
}

.hero-mark.is-taken {
    visibility: hidden; /* header logosu onu "alıp götürdüğünde" */
}

.hero-words {
    font-family: var(--font-display);
    margin: 0 0 .9em;
}

.hero-words .word {
    display: flex;
    align-items: baseline;
    line-height: 1;
}

.hero-words em {
    font-style: normal;
    font-size: calc(var(--cap-tpu) / .72); /* satır yüksekliği harfin boyuna göre, metin gibi */
    line-height: 1;
    color: var(--accent-light);
    animation: heroIn .8s var(--ease) both;
}

.hero-words em svg {
    display: inline-block;
    height: var(--cap-tpu);
    vertical-align: baseline;
    overflow: visible;
}

.hero-words .g-t {
    width: calc(var(--cap-tpu) * .6916);
}

.hero-words .g-p {
    width: calc(var(--cap-tpu) * .6098);
}

.hero-words .g-u {
    width: calc(var(--cap-tpu) * .7421);
}

.hero-words .rest {
    display: inline-block;
    font-size: calc(var(--hero-size) * .5);
    font-weight: 300;
    letter-spacing: .06em;
    margin-left: .12em;
    opacity: 0;
    clip-path: inset(-.3em calc(100% + .1em) -.45em -.1em); /* negatif kenarlar: y, g kuyrukları kesilmesin */
    transform: translateX(-.35em);
    animation: wordIn .9s var(--ease) forwards;
}

.hero-words .word:nth-child(1) em { animation-delay: .1s; }
.hero-words .word:nth-child(2) em { animation-delay: .2s; }
.hero-words .word:nth-child(3) em { animation-delay: .3s; }
.hero-words .word:nth-child(1) .rest { animation-delay: .9s; }
.hero-words .word:nth-child(2) .rest { animation-delay: 1.1s; }
.hero-words .word:nth-child(3) .rest { animation-delay: 1.3s; }

.hero-sub {
    max-width: 34ch;
    font-size: clamp(1.05rem, 1.5vw, 1.25rem);
    line-height: 1.55;
    color: rgba(255, 255, 255, .85);
    margin-bottom: 2em;
    animation: heroIn .8s var(--ease) 1.5s both;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    animation: heroIn .8s var(--ease) 1.65s both;
}

@keyframes heroIn {
    from { opacity: 0; transform: translateY(14px); }
    to { opacity: 1; transform: none; }
}

@keyframes wordIn {
    to { opacity: 1; clip-path: inset(-.3em -.2em -.45em -.1em); transform: none; }
}

/* ---------- Hakkında ---------- */
.about-grid {
    display: grid;
    grid-template-columns: 1fr 1.15fr;
    gap: clamp(32px, 7vw, 104px);
    align-items: center;
}

.about-media img {
    width: 100%;
    aspect-ratio: 4 / 5;
    object-fit: cover;
}

.about-text h2 {
    margin-bottom: .15em;
}

.about-text p {
    max-width: 52ch;
}

.about-role {
    color: var(--ink-soft);
    margin-bottom: 1.6em;
}

.about-links {
    margin: 8px 0 36px;
}

.timeline {
    display: grid;
    grid-template-columns: max-content 1fr;
    gap: 12px 22px;
    align-items: baseline;
    padding-top: 28px;
    border-top: 1px solid var(--line);
}

.timeline dt {
    font-family: var(--font-display);
    font-size: 1.35rem;
    font-weight: 600;
    line-height: 1;
}

.timeline dd {
    font-size: .95rem;
    line-height: 1.5;
    color: var(--ink-soft);
}

/* ---------- Hizmetler ---------- */
.services {
    background: var(--bg-alt);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: clamp(36px, 5vw, 64px) clamp(28px, 4vw, 56px);
}

.service-card h3 {
    font-size: 1.35rem;
    margin-bottom: .35em;
}

.service-card p {
    font-size: .95rem;
    color: var(--ink-soft);
    margin: 0;
    max-width: 36ch;
}

/* ---------- Projeler: tuğla dizilimi, fotoğraflar kendi oranında ---------- */
.projects-grid {
    columns: 2;
    column-gap: 32px;
}

.project-card {
    display: block;
    break-inside: avoid;
    margin: 0 0 44px;
}

.project-media {
    background: var(--bg-alt);
}

.project-media img {
    width: 100%;
    height: auto;
}

.project-info {
    padding-top: 14px;
}

.project-info h3 {
    font-size: 1.2rem;
    margin: 0 0 .1em;
    transition: color .2s var(--ease);
}

.project-card:hover h3 {
    color: var(--accent);
}

.project-info p {
    font-size: .9rem;
    color: var(--ink-soft);
    margin: 0;
}

/* ---------- İletişim ---------- */
.contact {
    background: var(--bg-alt);
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    grid-template-areas:
        "info form"
        "map  form";
    gap: 40px clamp(40px, 7vw, 104px);
    align-items: start;
}

.contact-info {
    grid-area: info;
}

.contact-form {
    grid-area: form;
}

.contact-grid .map {
    grid-area: map;
}

.contact-item {
    margin-bottom: 28px;
}

.contact-label {
    display: block;
    font-size: .85rem;
    color: var(--ink-soft);
    margin-bottom: 4px;
}

.contact-item p {
    margin: 0;
    font-size: 1.1rem;
    line-height: 1.5;
}

.contact-item p a,
.contact-item .text-link {
    border-bottom: 1px solid transparent;
    transition: border-color .2s;
}

.contact-item p a:hover,
.contact-item .text-link:hover {
    border-color: currentColor;
}

.contact-item .text-link {
    display: inline-block;
    margin-top: 8px;
    font-size: .9rem;
    font-weight: 600;
    color: var(--accent);
}

/* Sosyal medya butonları; marka rengi her linkin style="--brand" değerinden gelir */
.social {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.social-link {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 11px 18px 11px 14px;
    font-size: .9rem;
    font-weight: 600;
    color: var(--ink);
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: 999px;
    transition: background-color .25s var(--ease), color .25s var(--ease), border-color .25s var(--ease);
}

.social-link svg {
    width: 20px;
    height: 20px;
    flex: none;
    fill: var(--brand);
    transition: fill .25s var(--ease);
}

.social-link:hover {
    background: var(--brand);
    border-color: var(--brand);
    color: var(--white);
}

.social-link:hover svg {
    fill: var(--white);
}

/* Form */
.contact-form {
    background: var(--white);
    border: 1px solid var(--line);
    padding: clamp(24px, 3.5vw, 40px);
}

.form-row {
    margin-bottom: 18px;
}

.form-row label {
    display: block;
    font-size: .9rem;
    font-weight: 600;
    margin-bottom: 6px;
}

.form-row input,
.form-row textarea,
.form-row select {
    width: 100%;
    padding: 12px 14px;
    font: inherit;
    color: var(--ink);
    background: var(--bg);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    transition: border-color .2s, box-shadow .2s;
}

.form-row input:focus,
.form-row textarea:focus,
.form-row select:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(47, 127, 133, .15);
}

.form-row textarea {
    resize: vertical;
    min-height: 140px;
}

.form-row ::placeholder {
    color: #9aa0a5;
    opacity: 1;
}

.phone-row {
    display: grid;
    grid-template-columns: minmax(0, 13rem) minmax(0, 1fr);
    gap: 10px;
}

.form-row select {
    appearance: none;
    -webkit-appearance: none;
    padding-right: 36px;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'><path d='M1 1l5 5 5-5' fill='none' stroke='%2322272b' stroke-width='1.6'/></svg>");
    background-repeat: no-repeat;
    background-position: right 14px center;
    cursor: pointer;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.field-error {
    margin: 6px 0 0;
    font-size: .85rem;
    line-height: 1.4;
    color: var(--error);
}

.field-error:empty {
    display: none;
}

.form-row .is-invalid {
    border-color: var(--error);
}

.form-row .is-invalid:focus {
    border-color: var(--error);
    box-shadow: 0 0 0 3px rgba(179, 38, 30, .12);
}

/* Spam tuzağı alanı */
.hp {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    opacity: 0;
}

.form-status {
    margin: 14px 0 0;
    font-size: .9rem;
    min-height: 1.5em;
}

.form-status.ok {
    color: var(--accent);
}

.form-status.err {
    color: var(--error);
}

.map iframe {
    display: block;
    width: 100%;
    height: 340px;
    border: 0;
    filter: grayscale(1) contrast(1.02) brightness(1.04); /* siyah-beyaz harita; renkli istersen sil */
}

/* ---------- Footer ---------- */
.site-footer {
    padding: 32px 0;
    border-top: 1px solid var(--line);
    font-size: .9rem;
    color: var(--ink-soft);
}

.footer-inner {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 12px 24px;
}

.footer-inner p {
    margin: 0;
}

.footer-links {
    display: flex;
    gap: 24px;
}

.footer-links a:hover {
    color: var(--ink);
}

/* ---------- Lenis (akıcı kaydırma) ---------- */
html.lenis,
html.lenis body {
    height: auto;
}

.lenis.lenis-smooth {
    scroll-behavior: auto !important;
}

.lenis.lenis-smooth [data-lenis-prevent] {
    overscroll-behavior: contain;
}

.lenis.lenis-stopped {
    overflow: clip;
}

/* ---------- Lightbox: altta küçük resim şeridi (script.js, 7) ---------- */
.glightbox-container {
    --lb-strip: 132px;
}

.glightbox-closing .lb-strip {
    opacity: 0; /* kapanış animasyonunu beklemeden kaybolsun */
}

/* Şerit varken görsel alanı şerit kadar kısalır */
.glightbox-container.has-strip .gcontainer {
    height: calc(100% - var(--lb-strip)) !important;
}

.glightbox-container.has-strip .gslide-image img,
.glightbox-mobile .glightbox-container.has-strip .gslide-image img {
    max-height: calc(100vh - var(--lb-strip)) !important;
    max-height: calc(100dvh - var(--lb-strip)) !important;
}

.lb-strip {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: var(--lb-strip);
    padding: 8px 16px 14px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    gap: 8px;
    background: rgba(0, 0, 0, .55);
    z-index: 99999;
}

.lb-strip-title {
    margin: 0;
    color: rgba(255, 255, 255, .8);
    font-size: .9rem;
    text-align: center;
}

.lb-thumbs {
    display: flex;
    justify-content: safe center;
    gap: 8px;
    overflow-x: auto;
    padding: 2px;
    scrollbar-width: none;
}

.lb-thumbs::-webkit-scrollbar {
    display: none;
}

.lb-thumb {
    flex: 0 0 auto;
    width: 96px;
    height: 68px;
    padding: 0;
    border: 2px solid transparent;
    border-radius: 3px;
    overflow: hidden;
    background: #000;
    opacity: .5;
    transition: opacity .2s var(--ease), border-color .2s var(--ease);
}

.lb-thumb img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.lb-thumb:hover,
.lb-thumb:focus-visible {
    opacity: .85;
}

.lb-thumb.is-active {
    opacity: 1;
    border-color: #fff;
}

.lb-thumb:focus-visible {
    outline: 2px solid var(--accent-light);
    outline-offset: 1px;
}

/* ---------- Duyarlı ---------- */
@media (max-width: 960px) {
    .about-grid,
    .contact-grid {
        grid-template-columns: 1fr;
    }

    .contact-grid {
        grid-template-areas: "info" "form" "map";
    }

    .about-media {
        max-width: 480px;
    }
}

@media (max-width: 860px) {
    .nav-toggle {
        display: flex;
    }

    .site-nav .lang-switch {
        font-size: .95rem;
    }

    .site-nav {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        height: calc(100vh - var(--header-h));
        height: calc(100dvh - var(--header-h));
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 28px;
        font-family: var(--font-display);
        font-size: 1.5rem;
        background: var(--ink);
        color: var(--white);
        opacity: 0;
        visibility: hidden;
        transform: translateY(-8px);
        transition: opacity .3s var(--ease), transform .3s var(--ease), visibility 0s .3s;
    }

    .site-nav.open {
        opacity: 1;
        visibility: visible;
        transform: none;
        transition: opacity .3s var(--ease), transform .3s var(--ease), visibility 0s;
    }

    .menu-open .site-header {
        background: var(--ink);
        color: var(--white);
        box-shadow: none;
        -webkit-backdrop-filter: none;
        backdrop-filter: none;
    }
}

@media (max-width: 600px) {
    :root {
        --header-h: 64px;
    }

    .brand {
        --logo-h: 36px;
    }

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

    .projects-grid {
        columns: 1;
    }

    .hero-actions .btn {
        flex: 1 1 100%;
    }

    .map iframe {
        height: 320px;
    }

    .lead,
    .contact-item p {
        font-size: 1rem;
    }

    .contact-label {
        font-size: .8rem;
    }

    .phone-row {
        grid-template-columns: minmax(0, 7.5rem) minmax(0, 1fr); /* seçenekler JS ile "TR +90" gibi kısalır */
    }

    .glightbox-container {
        --lb-strip: 112px;
    }

    .lb-thumb {
        width: 76px;
        height: 54px;
    }
}

/* "Hareketi azalt" tercihi: hero açılışı animasyonsuz gelir */
@media (prefers-reduced-motion: reduce) {
    .hero-title,
    .hero-sub,
    .hero-actions,
    .hero-words em {
        animation: none;
    }

    .hero-words .rest {
        animation: none;
        opacity: 1;
        clip-path: none;
        transform: none;
    }
}
