/*
Theme Name: Yadem Reklam
Theme URI: https://yademreklam.com
Author: Yadem Reklam
Description: Yadem Reklam için yapay zekâ video prodüksiyon ve reklam ajansı teması. Hizmetler, portföy, teklif formu ve WhatsApp butonu hazır gelir.
Version: 1.0.0
Requires at least: 6.5
Tested up to: 7.0
Requires PHP: 7.4
License: GPLv2 or later
Text Domain: yadem
*/

/* ---------- Genel ---------- */
html { scroll-behavior: smooth; }
body { -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; overflow-x: hidden; }
::selection { background: var(--wp--preset--color--accent); color: #fff; }
:where(a) { text-underline-offset: .18em; }
img, video, iframe { max-width: 100%; }
:focus-visible { outline: 2px solid var(--wp--preset--color--accent); outline-offset: 3px; }

.yd-eyebrow {
	display: inline-flex; align-items: center; gap: .6em;
	font-size: .78rem; font-weight: 600; letter-spacing: .16em; text-transform: uppercase;
	color: var(--wp--preset--color--muted);
}
.yd-eyebrow::before {
	content: ""; width: 8px; height: 8px; border-radius: 50%;
	background: var(--wp--preset--color--accent);
	box-shadow: 0 0 0 4px color-mix(in srgb, var(--wp--preset--color--accent) 22%, transparent);
}
.yd-accent { color: var(--wp--preset--color--accent); }
.yd-grad {
	background: linear-gradient(100deg, #fff 0%, #ffd2c2 35%, var(--wp--preset--color--accent) 70%, var(--wp--preset--color--violet) 100%);
	-webkit-background-clip: text; background-clip: text; color: transparent;
}

/* ---------- Üst menü ---------- */
.yd-header {
	position: sticky; top: 0; z-index: 50;
	border-bottom: 1px solid color-mix(in srgb, var(--wp--preset--color--line) 70%, transparent);
}
/* Bulanık zemin ayrı katmanda: backdrop-filter başlığın kendisinde olursa telefon menüsünün
   position:fixed kaplaması başlığın 72 px kutusuna hapsoluyordu (yalnız "Hizmetler" görünüyordu). */
.yd-header::before {
	content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
	background: color-mix(in srgb, var(--wp--preset--color--base) 78%, transparent);
	backdrop-filter: saturate(140%) blur(14px); -webkit-backdrop-filter: saturate(140%) blur(14px);
}
.admin-bar .yd-header { top: 32px; }
@media (max-width: 782px) { .admin-bar .yd-header { top: 46px; } }
.yd-logo a { text-decoration: none; color: inherit; }
.yd-logo .yd-dot { color: var(--wp--preset--color--accent); }
.yd-header .wp-block-navigation a { text-decoration: none; opacity: .82; transition: opacity .2s; }
.yd-header .wp-block-navigation a:hover { opacity: 1; }
.yd-header .wp-block-navigation__responsive-container.is-menu-open {
	background: var(--wp--preset--color--base) !important; color: var(--wp--preset--color--text) !important;
	padding: 24px; position: fixed; inset: 0; width: 100vw; height: 100vh; height: 100dvh; overflow-y: auto;
}
.yd-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-content { padding-top: 64px; }
.yd-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__container { gap: 1.4rem; }
.yd-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item__content { font-size: 1.5rem; font-weight: 600; opacity: 1; }
.yd-header .wp-block-navigation__responsive-container-close { top: 24px !important; right: 24px !important; }
.yd-header .wp-block-navigation__responsive-container-close svg, .yd-header .wp-block-navigation__responsive-container-open svg { width: 30px; height: 30px; }

/* ---------- Butonlar ---------- */
.wp-block-button__link { transition: transform .2s ease, box-shadow .2s ease, background .2s ease; }
.wp-block-button__link:hover { transform: translateY(-2px); }
.is-style-yd-ghost .wp-block-button__link {
	background: transparent !important; color: var(--wp--preset--color--text) !important;
	border: 1px solid var(--wp--preset--color--line) !important;
}
.is-style-yd-ghost .wp-block-button__link:hover { border-color: var(--wp--preset--color--text) !important; }

/* ---------- Kahraman alanı ---------- */
.yd-hero { position: relative; overflow: hidden; isolation: isolate; }
.yd-hero::before {
	content: ""; position: absolute; inset: -20% -10% auto -10%; height: 120%; z-index: -1;
	background:
		radial-gradient(40% 50% at 78% 30%, color-mix(in srgb, var(--wp--preset--color--accent) 38%, transparent), transparent 70%),
		radial-gradient(35% 45% at 18% 70%, color-mix(in srgb, var(--wp--preset--color--violet) 30%, transparent), transparent 70%);
	filter: blur(30px); animation: yd-drift 18s ease-in-out infinite alternate;
}
.yd-hero::after {
	content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none; opacity: .5;
	background-image: linear-gradient(var(--wp--preset--color--line) 1px, transparent 1px), linear-gradient(90deg, var(--wp--preset--color--line) 1px, transparent 1px);
	background-size: 64px 64px;
	mask-image: radial-gradient(70% 60% at 50% 40%, #000 20%, transparent 75%);
	-webkit-mask-image: radial-gradient(70% 60% at 50% 40%, #000 20%, transparent 75%);
}
@keyframes yd-drift { to { transform: translate3d(-4%, 6%, 0) scale(1.08); } }
.yd-hero h1 { text-wrap: balance; }
.yd-hero-video { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; opacity: .28; }

.yd-marquee { overflow: hidden; border-block: 1px solid var(--wp--preset--color--line); }
.yd-marquee__track { display: flex; width: max-content; gap: 3rem; padding-block: 1.1rem; animation: yd-marquee 38s linear infinite; }
.yd-marquee__track span { font-family: var(--wp--preset--font-family--display); font-size: clamp(1rem, 2vw, 1.35rem); white-space: nowrap; color: var(--wp--preset--color--muted); }
.yd-marquee__track span b { color: var(--wp--preset--color--accent); font-weight: 400; margin-right: 3rem; }
@keyframes yd-marquee { to { transform: translateX(-50%); } }

/* ---------- Kartlar ---------- */
.yd-card {
	position: relative; height: 100%;
	background: var(--wp--preset--color--surface);
	border: 1px solid var(--wp--preset--color--line);
	transition: border-color .25s, transform .25s, background .25s;
}
.yd-card:hover { border-color: color-mix(in srgb, var(--wp--preset--color--accent) 55%, var(--wp--preset--color--line)); transform: translateY(-4px); }
.yd-card .yd-num { font-family: var(--wp--preset--font-family--display); color: var(--wp--preset--color--accent); font-size: .85rem; }
.yd-card h3 { margin-top: .4rem; }
.yd-tags { display: flex; flex-wrap: wrap; gap: .4rem; }
.yd-tags span {
	font-size: .74rem; padding: .28rem .6rem; border-radius: 99px;
	border: 1px solid var(--wp--preset--color--line); color: var(--wp--preset--color--muted);
}

/* ---------- Portföy ---------- */
.yd-work { position: relative; overflow: hidden; border-radius: 14px; background: var(--wp--preset--color--surface-2); aspect-ratio: 9 / 16; }
.yd-work.is-wide { aspect-ratio: 16 / 9; }
.yd-work video, .yd-work img, .yd-work iframe { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; border: 0; }
.yd-work__ph {
	position: absolute; inset: 0; display: grid; place-items: center; text-align: center; padding: 1.2rem;
	background:
		radial-gradient(80% 60% at 30% 20%, color-mix(in srgb, var(--wp--preset--color--accent) 30%, transparent), transparent 70%),
		radial-gradient(70% 60% at 80% 90%, color-mix(in srgb, var(--wp--preset--color--violet) 35%, transparent), transparent 70%),
		var(--wp--preset--color--surface-2);
}
.yd-work__label {
	position: absolute; left: 12px; right: 12px; bottom: 12px; z-index: 2;
	display: flex; justify-content: space-between; align-items: end; gap: .5rem;
	font-size: .82rem; color: #fff; text-shadow: 0 1px 12px rgba(0,0,0,.6);
}
.yd-work__label strong { font-family: var(--wp--preset--font-family--display); font-weight: 500; font-size: .95rem; }
.yd-work::after { content: ""; position: absolute; inset: 50% 0 0; background: linear-gradient(transparent, rgba(0,0,0,.65)); pointer-events: none; }

/* ---------- Rakamlar ---------- */
.yd-stat { border-top: 1px solid var(--wp--preset--color--line); padding-top: 1rem; }
.yd-stat p:first-child { font-family: var(--wp--preset--font-family--display); font-size: clamp(2.2rem, 5vw, 3.4rem); line-height: 1; margin: 0; }

/* ---------- SSS ---------- */
.yd-faq details { border-bottom: 1px solid var(--wp--preset--color--line); padding-block: 1.1rem; }
.yd-faq summary { cursor: pointer; list-style: none; font-weight: 600; font-size: 1.08rem; display: flex; justify-content: space-between; gap: 1rem; }
.yd-faq summary::-webkit-details-marker { display: none; }
.yd-faq summary::after { content: "+"; color: var(--wp--preset--color--accent); font-size: 1.4rem; line-height: 1; transition: transform .2s; }
.yd-faq details[open] summary::after { transform: rotate(45deg); }
.yd-faq details p { color: var(--wp--preset--color--muted); margin: .7rem 0 0; }

/* ---------- Teklif formu ---------- */
.yd-form { display: grid; gap: 14px; grid-template-columns: 1fr 1fr; }
.yd-form .yd-full { grid-column: 1 / -1; }
.yd-form label { display: grid; gap: 6px; font-size: .85rem; color: var(--wp--preset--color--muted); }
.yd-form input, .yd-form select, .yd-form textarea {
	width: 100%; box-sizing: border-box; font: inherit; font-size: 1rem; color: var(--wp--preset--color--text);
	background: var(--wp--preset--color--base); border: 1px solid var(--wp--preset--color--line);
	border-radius: 10px; padding: .85rem 1rem; transition: border-color .2s;
}
.yd-form input:focus, .yd-form select:focus, .yd-form textarea:focus { outline: none; border-color: var(--wp--preset--color--accent); }
.yd-form textarea { min-height: 130px; resize: vertical; }
.yd-form .yd-check { display: flex; gap: .6rem; align-items: flex-start; font-size: .82rem; }
.yd-form .yd-check input { width: auto; margin-top: .2rem; accent-color: var(--wp--preset--color--accent); }
.yd-form button {
	justify-self: start; font: inherit; font-weight: 600; cursor: pointer; border: 0; border-radius: 99px;
	padding: 1rem 1.8rem; background: var(--wp--preset--color--accent); color: #fff; transition: transform .2s, filter .2s;
}
.yd-form button:hover { transform: translateY(-2px); filter: brightness(1.08); }
.yd-hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }
.yd-notice { grid-column: 1 / -1; border-radius: 10px; padding: .9rem 1rem; font-size: .95rem; }
.yd-notice.is-ok { background: color-mix(in srgb, #2ecc71 16%, transparent); border: 1px solid color-mix(in srgb, #2ecc71 50%, transparent); }
.yd-notice.is-err { background: color-mix(in srgb, #ff4d4d 14%, transparent); border: 1px solid color-mix(in srgb, #ff4d4d 50%, transparent); }
@media (max-width: 640px) { .yd-form { grid-template-columns: 1fr; } }

/* ---------- İletişim ---------- */
.yd-contact-list { list-style: none; padding: 0; margin: 0; display: grid; gap: .9rem; }
.yd-contact-list li { display: grid; gap: 2px; }
.yd-contact-list small { color: var(--wp--preset--color--muted); font-size: .78rem; letter-spacing: .08em; text-transform: uppercase; }
.yd-contact-list a { color: var(--wp--preset--color--text); text-decoration: none; font-size: 1.1rem; }
.yd-contact-list a:hover { color: var(--wp--preset--color--accent); }
.yd-social { display: flex; gap: .6rem; flex-wrap: wrap; }
.yd-social a {
	text-decoration: none; color: var(--wp--preset--color--text); font-size: .85rem;
	border: 1px solid var(--wp--preset--color--line); border-radius: 99px; padding: .45rem .9rem;
}
.yd-social a:hover { border-color: var(--wp--preset--color--accent); color: var(--wp--preset--color--accent); }
.yd-map iframe { width: 100%; height: 100%; min-height: 320px; border: 0; border-radius: 14px; filter: grayscale(1) invert(.92) contrast(.9); }

/* ---------- WhatsApp butonu ---------- */
.yd-wa {
	position: fixed; right: 18px; bottom: 18px; z-index: 60;
	display: inline-flex; align-items: center; gap: .55rem;
	background: #25D366; color: #08260f; text-decoration: none; font-weight: 700; font-size: .95rem;
	padding: .8rem 1.1rem .8rem .9rem; border-radius: 99px;
	box-shadow: 0 10px 30px rgba(37, 211, 102, .35); transition: transform .2s;
}
.yd-wa:hover { transform: translateY(-3px); }
.yd-wa svg { width: 24px; height: 24px; flex: none; }
@media (max-width: 520px) { .yd-wa span { display: none; } .yd-wa { padding: .85rem; } }

/* ---------- Yukarı çık düğmesi (WhatsApp düğmesinin üstünde) ---------- */
.yd-yukari {
	position: fixed; right: 18px; bottom: 84px; z-index: 59;
	width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; cursor: pointer;
	color: var(--wp--preset--color--text); background: color-mix(in srgb, var(--wp--preset--color--surface) 88%, transparent);
	border: 1px solid var(--wp--preset--color--line); box-shadow: 0 10px 28px rgba(0, 0, 0, .35);
	opacity: 0; visibility: hidden; transform: translateY(12px); transition: opacity .25s, transform .25s, visibility .25s, border-color .2s;
}
.yd-yukari.is-gorunur { opacity: 1; visibility: visible; transform: none; }
.yd-yukari:hover, .yd-yukari:focus-visible { border-color: var(--wp--preset--color--accent); color: var(--wp--preset--color--accent); }
.yd-yukari svg { width: 22px; height: 22px; }
@media (max-width: 520px) { .yd-yukari { bottom: 82px; width: 46px; height: 46px; } }
@media (prefers-reduced-motion: reduce) { .yd-yukari { transition: none; } }

/* ---------- Görünme animasyonu ---------- */
@media (prefers-reduced-motion: no-preference) {
	.yd-reveal { opacity: 0; transform: translateY(24px); transition: opacity .8s ease, transform .8s cubic-bezier(.2,.7,.2,1); }
	.yd-reveal.is-in { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
	.yd-hero::before, .yd-marquee__track { animation: none; }
}

/* ---------- Telefonda ana başlık: en uzun kelime ("dönüştürüyoruz.", ~9,9 em) satıra sığsın, ortadan bölünmesin ---------- */
@media (max-width: 600px) {
	h1.yd-hero-title { font-size: min(2.5rem, calc((100vw - 2rem) / 10.4)) !important; max-width: none; }
}
