/* alt2 — Modern Teknoloji (Vercel/Linear/Stripe hissiyatı) */
:root {
  --bg: #0A0A0B;
  --surf: #17171A;
  --surf-2: #212126;
  --line: rgba(255,255,255,0.08);
  --text: #F5F5F7;
  --muted: #9CA0AB;
  --primary: #2563EB;
  --primary-2: #6D28D9;
  --accent: #00F5D4;
  --radius: 14px;
  --radius-lg: 20px;
  --tr: 0.35s cubic-bezier(.2,.8,.2,1);
  --sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --display: 'Space Grotesk', var(--sans);
  --mono: 'JetBrains Mono', ui-monospace, monospace;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--sans);
  background: var(--bg);
  color: var(--text);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
[lang="ar"] body { font-family: 'Noto Kufi Arabic', var(--sans); }
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; transition: color var(--tr); }
.container { max-width: 1280px; margin: 0 auto; padding: 0 28px; }
button { font: inherit; cursor: pointer; color: inherit; background: none; border: 0; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(10,10,11,0.7);
  backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; min-height: 72px; gap: 20px; }
.brand-logo { height: 36px; filter: brightness(0) invert(1); }
.primary-nav ul { display: flex; gap: 28px; list-style: none; align-items: center; }
.primary-nav a { font-size: 14px; color: var(--muted); padding: 6px 0; transition: color var(--tr); }
.primary-nav a:hover, .primary-nav a[aria-current] { color: var(--text); }
.header-tools { display: flex; gap: 14px; align-items: center; }
.lang-switch { display: inline-flex; gap: 2px; padding: 3px; background: var(--surf); border-radius: 999px; border: 1px solid var(--line); }
.lang-option { padding: 6px 12px; font-size: 12px; color: var(--muted); border-radius: 999px; transition: all var(--tr); }
.lang-option.active { background: var(--primary); color: #fff; }
.nav-toggle { display: none; width: 44px; height: 44px; flex-direction: column; gap: 4px; justify-content: center; align-items: center; }
.nav-toggle span { width: 22px; height: 2px; background: var(--text); }
@media (max-width: 980px) {
  .primary-nav { position: absolute; inset: 72px 0 auto 0; background: var(--bg); border-bottom: 1px solid var(--line); transform: translateY(-8px); opacity: 0; pointer-events: none; transition: all var(--tr); }
  .primary-nav.open { transform: none; opacity: 1; pointer-events: auto; }
  .primary-nav ul { flex-direction: column; gap: 0; padding: 20px 28px; }
  .primary-nav li { padding: 14px 0; border-bottom: 1px solid var(--line); }
  .nav-toggle { display: inline-flex; }
}

/* Hero */
.hero-modern {
  position: relative; padding: 130px 0 120px; overflow: hidden;
}
.hero-modern .gradient-mesh {
  position: absolute; inset: -20% -10% auto auto; width: 900px; height: 900px; z-index: 0;
  background:
    radial-gradient(circle at 30% 30%, rgba(37,99,235,0.35), transparent 50%),
    radial-gradient(circle at 70% 60%, rgba(109,40,217,0.35), transparent 50%),
    radial-gradient(circle at 50% 80%, rgba(0,245,212,0.2), transparent 50%);
  filter: blur(60px);
  animation: drift 30s ease-in-out infinite;
}
.hero-modern .grain {
  position: absolute; inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2'/%3E%3C/filter%3E%3Crect width='200' height='200' filter='url(%23n)' opacity='0.6'/%3E%3C/svg%3E");
  opacity: .06; pointer-events: none; z-index: 1;
}
@keyframes drift { 0%,100%{transform:translate(0,0);} 50%{transform:translate(-40px,30px);} }
.hero-inner { position: relative; z-index: 2; max-width: 860px; }
.eyebrow {
  display: inline-block; font-family: var(--mono); font-size: 12px;
  letter-spacing: .12em; color: var(--accent);
  padding: 6px 12px; background: rgba(0,245,212,0.08);
  border: 1px solid rgba(0,245,212,0.2); border-radius: 999px;
  margin-bottom: 24px;
}
.hero-title {
  font-family: var(--display); font-weight: 600;
  font-size: clamp(40px, 6vw, 80px); line-height: 1.02;
  letter-spacing: -0.03em; margin-bottom: 24px;
  background: linear-gradient(180deg, #fff 0%, #9CA0AB 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero-sub { font-size: 19px; color: var(--muted); max-width: 620px; }
.hero-ctas { margin-top: 40px; display: flex; gap: 12px; flex-wrap: wrap; }
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 14px 22px; font-size: 15px; font-weight: 500;
  border-radius: 10px; transition: all var(--tr);
}
.btn-primary {
  background: var(--text); color: var(--bg);
  box-shadow: 0 0 0 0 rgba(245,245,247,0.5);
}
.btn-primary:hover { box-shadow: 0 0 0 4px rgba(245,245,247,0.12); transform: translateY(-1px); }
.btn-ghost { background: var(--surf); color: var(--text); border: 1px solid var(--line); }
.btn-ghost:hover { background: var(--surf-2); }

/* Sections */
section { padding: 110px 0; }
.section-head { max-width: 860px; margin-bottom: 56px; }
.section-title {
  font-family: var(--display); font-size: clamp(32px, 4vw, 48px);
  line-height: 1.1; font-weight: 600; letter-spacing: -0.02em;
}
.alt-bg { background: var(--surf); }
.two-col { display: grid; grid-template-columns: 1fr 1.4fr; gap: 60px; }
.two-col .intro-body p { color: var(--muted); margin-bottom: 18px; }
@media (max-width: 820px) { .two-col { grid-template-columns: 1fr; gap: 28px; } }

/* Bento services */
.services-grid {
  display: grid; grid-template-columns: repeat(6, 1fr);
  gap: 18px; grid-auto-rows: 220px;
}
.bento-card {
  background: linear-gradient(180deg, rgba(255,255,255,0.03), rgba(255,255,255,0.01));
  border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: 24px; display: flex; flex-direction: column; justify-content: flex-end;
  position: relative; overflow: hidden; transition: all var(--tr);
}
.bento-card:hover { border-color: rgba(0,245,212,0.3); transform: translateY(-3px); }
.bento-card::before {
  content: ''; position: absolute; inset: -100%; z-index: -1;
  background: radial-gradient(circle at var(--mx,50%) var(--my,50%), rgba(37,99,235,0.15), transparent 70%);
  transition: opacity .4s;
}
.bento-num { font-family: var(--mono); font-size: 12px; color: var(--accent); letter-spacing: .15em; }
.bento-card h3 { font-family: var(--display); font-size: 20px; margin: 12px 0 8px; }
.bento-card p { font-size: 14px; color: var(--muted); line-height: 1.55; }
/* bento sizing */
.services-grid > :nth-child(1) { grid-column: span 3; grid-row: span 2; }
.services-grid > :nth-child(2) { grid-column: span 3; }
.services-grid > :nth-child(3) { grid-column: span 3; }
.services-grid > :nth-child(4) { grid-column: span 2; }
.services-grid > :nth-child(5) { grid-column: span 2; }
.services-grid > :nth-child(6) { grid-column: span 2; }
.services-grid > :nth-child(7) { grid-column: span 3; }
.services-grid > :nth-child(8) { grid-column: span 3; }
.services-grid > :nth-child(9) { grid-column: span 3; }
.services-grid > :nth-child(10) { grid-column: span 3; }
@media (max-width: 980px) {
  .services-grid { grid-template-columns: repeat(2, 1fr); grid-auto-rows: auto; }
  .services-grid > * { grid-column: span 1 !important; grid-row: auto !important; min-height: 180px; }
}
@media (max-width: 560px) {
  .services-grid { grid-template-columns: 1fr; }
}

/* Projects */
.projects-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 20px; }
.bento-project {
  background: linear-gradient(135deg, rgba(37,99,235,0.06), rgba(109,40,217,0.06));
  border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: 36px 28px; transition: all var(--tr);
}
.bento-project:hover { border-color: rgba(0,245,212,0.3); }
.bento-tag { font-family: var(--mono); font-size: 11px; color: var(--accent); letter-spacing: .15em; text-transform: uppercase; }
.bento-project h3 { font-family: var(--display); font-size: 28px; margin: 12px 0 12px; }
.bento-project p { color: var(--muted); font-size: 14px; }

/* CTA */
.cta-footer { text-align: center; padding: 120px 0; position: relative; }
.cta-footer::before {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(800px 300px at 50% 50%, rgba(37,99,235,0.15), transparent 60%);
  z-index: 0;
}
.cta-inner { position: relative; z-index: 1; }
.cta-footer h2 { font-family: var(--display); font-size: clamp(32px, 4vw, 56px); margin-bottom: 16px; }
.cta-footer p { color: var(--muted); max-width: 560px; margin: 0 auto 28px; }

/* Footer */
.site-footer { background: var(--surf); border-top: 1px solid var(--line); }
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: 40px; padding: 72px 0 40px; }
.footer-logo { height: 32px; filter: brightness(0) invert(1); opacity: .9; margin-bottom: 16px; }
.footer-col h4 { font-family: var(--mono); font-size: 12px; color: var(--accent); letter-spacing: .15em; text-transform: uppercase; margin-bottom: 16px; }
.footer-col ul { list-style: none; }
.footer-col li { margin: 8px 0; font-size: 14px; color: var(--muted); }
.footer-col a:hover { color: var(--text); }
.footer-col p { font-size: 14px; color: var(--muted); margin-bottom: 6px; }
.copyright { border-top: 1px solid var(--line); padding: 20px 0; color: var(--muted); font-size: 13px; text-align: center; }
@media (max-width: 820px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 480px) { .footer-grid { grid-template-columns: 1fr; } }

/* Page hero */
.page-hero { padding: 140px 0 80px; border-bottom: 1px solid var(--line); position: relative; overflow: hidden; }
.page-hero h1 { font-family: var(--display); font-size: clamp(42px, 6vw, 72px); letter-spacing: -0.03em; margin: 10px 0 12px; line-height: 1.05;
  background: linear-gradient(180deg, #fff 0%, #9CA0AB 100%); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.page-hero p { color: var(--muted); max-width: 640px; font-size: 18px; }

/* Refs */
.ref-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 14px; }
.ref-item {
  aspect-ratio: 5/3; display: grid; place-items: center;
  background: var(--surf); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 18px; transition: all var(--tr);
}
.ref-item img { max-height: 60px; filter: brightness(0) invert(1) opacity(0.7); transition: filter var(--tr); }
.ref-item:hover { border-color: rgba(0,245,212,0.4); }
.ref-item:hover img { filter: none; }

/* About */
.mv-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; margin-top: 40px; }
.mv-card { background: var(--surf); padding: 40px; border: 1px solid var(--line); border-radius: var(--radius-lg); }
.mv-card h3 { font-family: var(--display); font-size: 24px; color: var(--accent); margin-bottom: 16px; }
.mv-card p { color: var(--muted); font-size: 15px; }
@media (max-width: 820px) { .mv-grid { grid-template-columns: 1fr; } }

/* Projects page */
.project-detail { padding: 50px 0; border-bottom: 1px solid var(--line); }
.project-detail:last-child { border-bottom: 0; }
.project-detail .subt { font-family: var(--mono); font-size: 11px; color: var(--accent); letter-spacing: .15em; text-transform: uppercase; }
.project-detail h3 { font-family: var(--display); font-size: 40px; margin: 8px 0 18px; letter-spacing: -0.02em; }
.project-detail p { color: var(--muted); font-size: 16px; max-width: 800px; }

/* Contact */
.contact-wrap { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: start; }
@media (max-width: 820px) { .contact-wrap { grid-template-columns: 1fr; } }
.contact-info h3 { font-family: var(--mono); font-size: 12px; color: var(--accent); letter-spacing: .15em; text-transform: uppercase; margin-bottom: 8px; }
.contact-info p { color: var(--muted); margin-bottom: 12px; }
.contact-info a { color: var(--text); border-bottom: 1px solid var(--line); }

[data-contact-form] { background: var(--surf); padding: 32px; border-radius: var(--radius-lg); border: 1px solid var(--line); }
.form-field { margin-bottom: 18px; }
.form-field label { display: block; font-family: var(--mono); font-size: 11px; color: var(--accent); letter-spacing: .15em; text-transform: uppercase; margin-bottom: 8px; }
.form-field input, .form-field textarea {
  width: 100%; padding: 12px 14px; border: 1px solid var(--line);
  background: var(--bg); font: inherit; color: var(--text);
  border-radius: 10px; transition: border-color var(--tr);
}
.form-field input:focus, .form-field textarea:focus { outline: 0; border-color: var(--accent); }
.form-status { margin-top: 12px; font-size: 14px; min-height: 1.2em; }
.form-status.error { color: #F87171; }
.form-status.success { color: var(--accent); }
.form-status.sending { color: var(--muted); }

[data-reveal] { opacity: 0; transform: translateY(14px); transition: all .7s cubic-bezier(.2,.8,.2,1); }
[data-reveal].revealed { opacity: 1; transform: none; }


/* ============================================================
   TrinoGate — Dropdown + Detay + Polish ekleri (ortak, tüm alt)
   ============================================================ */

/* Dropdown — desktop'ta hover/focus, mobile'da click-toggle (JS) */
.has-dropdown { position: relative; }
.has-dropdown > a { position: relative; padding-right: 14px; }
[dir="rtl"] .has-dropdown > a { padding-right: 0; padding-left: 14px; }
/* Alt başına farklı underline ::after kuralları var; buradaki arrow
   reset ile hepsini ezer: static position, oto boyut, şeffaf zemin. */
.has-dropdown > a::after {
  content: '▾' !important;
  display: inline-block !important;
  position: static !important;
  inset: auto !important;
  width: auto !important; height: auto !important;
  margin: 0 0 0 6px !important;
  background: none !important;
  color: inherit !important;
  font-size: 0.7em;
  line-height: 1;
  opacity: 0.6;
  transform: none !important;
  transition: transform .25s ease, opacity .25s ease !important;
  vertical-align: middle;
}
[dir="rtl"] .has-dropdown > a::after { margin: 0 6px 0 0 !important; }
.has-dropdown:hover > a::after,
.has-dropdown:focus-within > a::after,
.has-dropdown.open > a::after { transform: rotate(180deg) !important; opacity: 1 !important; }

/* Eğer alt CSS'inde .primary-nav a::before underline kullanıyorsa (alt3),
   dropdown'da onu da gizle ki çakışmasın */
.has-dropdown > a::before { display: none !important; }

.primary-nav .dropdown,
.dropdown {
  list-style: none !important;
  margin: 0 !important;
  padding: 10px !important;
  position: absolute !important;
  top: calc(100% + 8px) !important;
  inset-inline-start: 0 !important;
  /* parent .primary-nav ul flex zorlamasını ez */
  display: block !important;
  flex-direction: column !important;
  flex-wrap: nowrap !important;
  align-items: stretch !important;
  gap: 0 !important;
  min-width: 340px !important;
  max-width: 380px !important;
  width: max-content !important;
  background: var(--bg, #fff);
  border: 1px solid var(--line, #E5E5E5);
  border-radius: 12px;
  box-shadow: 0 14px 40px rgba(0,0,0,0.15), 0 2px 8px rgba(0,0,0,0.05);
  opacity: 0; visibility: hidden; transform: translateY(-8px);
  transition: opacity .25s, transform .25s, visibility 0s .25s;
  z-index: 100;
}
.has-dropdown:hover .dropdown,
.has-dropdown:focus-within .dropdown,
.has-dropdown.open .dropdown {
  opacity: 1 !important; visibility: visible !important; transform: none !important;
  transition: opacity .25s, transform .25s, visibility 0s 0s;
}
.primary-nav .dropdown li,
.dropdown li { display: block !important; width: 100% !important; margin: 0 !important; padding: 0 !important; }
.has-dropdown:hover .dropdown,
.has-dropdown:focus-within .dropdown,
.has-dropdown.open .dropdown { opacity: 1; visibility: visible; transform: none; }

.dropdown li { border: 0; padding: 0; }
.dropdown a {
  display: block; padding: 12px 14px;
  font-size: 14px; line-height: 1.4;
  color: var(--text, var(--ink, #1A1A1A));
  border-radius: 8px;
  transition: background .2s ease, color .2s ease;
}
.dropdown a:hover,
.dropdown a:focus { background: rgba(127,127,127,0.08); color: inherit; }
.dropdown a strong {
  display: block; font-weight: 600;
  margin-bottom: 3px; font-size: 14px;
}
.dropdown a span {
  display: block; font-size: 12px;
  opacity: 0.65;
}

/* Mobile: dropdown'ı akordiyon olarak göster */
@media (max-width: 980px) {
  .has-dropdown .dropdown {
    position: static; min-width: auto; max-width: none;
    box-shadow: none; border: 0; border-radius: 0; padding: 0 0 0 16px;
    opacity: 1; visibility: visible; transform: none;
    display: none;
  }
  .has-dropdown.open .dropdown { display: block; }
  .has-dropdown > a::after { margin-inline-start: auto; }
}

/* RTL dropdown açılış yönü */
[dir="rtl"] .dropdown { inset-inline-start: auto; inset-inline-end: 0; }

/* ---- Scroll progress bar ---- */
.scroll-progress {
  position: fixed; top: 0; left: 0; right: 0; height: 3px;
  background: var(--accent, var(--neon, var(--electric, var(--primary, #F08A24))));
  transform: scaleX(0); transform-origin: left;
  z-index: 99; pointer-events: none;
  transition: transform .1s linear;
}
[dir="rtl"] .scroll-progress { transform-origin: right; }

/* ---- Detay sections (services.html + projects.html) ---- */
.details-host {
  display: flex; flex-direction: column; gap: 0;
}
.detail-section {
  padding: 48px 0;
  border-bottom: 1px solid var(--line, #E5E5E5);
  scroll-margin-top: 96px;
  transition: background .6s ease;
}
.detail-section:last-child { border-bottom: 0; }
.detail-section.highlight {
  background: color-mix(in oklab, var(--accent, #F08A24) 12%, transparent);
  border-radius: 12px; padding-left: 20px; padding-right: 20px;
}
.detail-head {
  display: flex; align-items: baseline; gap: 18px;
  margin-bottom: 22px; flex-wrap: wrap;
}
.detail-num {
  font-size: 14px; letter-spacing: .15em; opacity: 0.55;
  font-family: var(--mono, var(--sans));
  font-variant-numeric: tabular-nums;
}
.detail-tag {
  display: inline-block; padding: 4px 10px;
  font-size: 11px; letter-spacing: .15em; text-transform: uppercase;
  background: color-mix(in oklab, var(--accent, #F08A24) 15%, transparent);
  color: var(--accent, inherit);
  border-radius: 999px;
}
.detail-head h2 {
  font-size: clamp(26px, 3.5vw, 40px); line-height: 1.15;
  letter-spacing: -0.01em; font-weight: 600;
}
.detail-body { max-width: 860px; }
.detail-body .lead {
  font-size: 18px; line-height: 1.55; margin-bottom: 14px;
  color: var(--text, var(--ink, inherit));
  font-weight: 500;
}
.detail-body p { color: var(--muted, #666); margin-bottom: 18px; font-size: 16px; line-height: 1.65; }
.detail-bullets { margin-top: 18px; }
.detail-bullets h4 {
  font-size: 12px; letter-spacing: .15em; text-transform: uppercase;
  opacity: 0.7; margin-bottom: 12px; font-weight: 600;
}
.detail-bullets ul {
  list-style: none; padding: 0; margin: 0;
  display: grid; grid-template-columns: 1fr 1fr; gap: 10px 24px;
}
.detail-bullets li {
  position: relative; padding-inline-start: 22px;
  color: var(--text, var(--ink, inherit));
  font-size: 15px; line-height: 1.5;
}
.detail-bullets li::before {
  content: ''; position: absolute;
  inset-inline-start: 0; top: 8px;
  width: 10px; height: 2px;
  background: var(--accent, var(--neon, currentColor));
}
@media (max-width: 720px) {
  .detail-bullets ul { grid-template-columns: 1fr; }
}

/* Servis/proje card link stilleri (i18n.js a etiketiyle render eder) */
.services-grid a, .projects-grid a { text-decoration: none; color: inherit; }

.service-more {
  display: inline-block; margin-top: 10px;
  font-size: 12px; letter-spacing: .1em;
  opacity: 0.65; transition: opacity .2s, transform .2s;
}
a:hover .service-more { opacity: 1; transform: translateX(2px); }
[dir="rtl"] a:hover .service-more { transform: translateX(-2px); }
