/*
Theme Name:  Maksut
Theme URI:   https://maksut.net
Author:      Maksut
Author URI:  https://maksut.net
Description: Custom WordPress theme for maksut.net — Digital Systems Builder. Built from scratch, no page builders, PHP 8.1+, PSR-ready architecture.
Version:     1.0.0
Requires at least: 6.3
Tested up to: 6.7
Requires PHP: 8.1
License:     Private
Text Domain: maksut
Tags:        custom-menu, custom-logo, translation-ready, block-styles, custom-colors, editor-style
*/

/* ── DESIGN TOKENS ─────────────────────────────────────────────── */
:root {
  --cream:     #F4EFE6;
  --cream-2:   #EDE6D5;
  --ink:       #181410;
  --ink-mid:   #3A3028;
  --ink-muted: #625850;
  --orange:    #E84E0A;
  /* Small text / UI labels on cream (WCAG AA vs --cream) */
  --orange-on-cream: #9A3808;
  --orange-hot:#FF5C10;
  --white:     #FDFAF4;
  /* Footer on --ink: WCAG AA for small caps / mono labels */
  --foot-line: #C5BCB2;
  --foot-meta: #D4CCC2;

  --ff-d: 'Bebas Neue', 'Arial Narrow', Arial, sans-serif;
  --ff-s: 'Fraunces', 'Georgia', 'Times New Roman', serif;
  --ff-m: 'Instrument Mono', 'Roboto Mono', 'Courier New', monospace;

  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --nav-h: 64px;
  --max: 1424px;
}

/* ── RESET ──────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

/* ── REDUCED MOTION (WCAG 2.3.3) ─────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  html { scroll-behavior: auto; }
  body { cursor: auto; }
  #cur-d, #cur-r { display: none; }
}

body {
  background: var(--cream);
  color: var(--ink);
  font-family: var(--ff-s);
  font-size: 17px;
  line-height: 1.7;
  overflow-x: hidden;
}
/* Custom cursor only for fine pointer (mouse); touch/screen readers keep default (a11y) */
@media (pointer: fine) {
  body { cursor: none; }
}

a { color: inherit; text-decoration: none; }
a, button, [role="button"] { cursor: pointer; }
button { border: none; background: none; font: inherit; }
img { display: block; max-width: 100%; height: auto; }
ul { list-style: none; }

/* ── FOCUS VISIBLE (keyboard a11y) ───────────────────────────────── */
:focus { outline: none; }
:focus-visible {
  outline: 2px solid var(--orange);
  outline-offset: 2px;
}

/* ── SKIP LINK (accessibility) ───────────────────────────────────── */
.skip-link.screen-reader-text {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100000;
  padding: 12px 20px;
  background: var(--ink);
  color: var(--cream);
  font-family: var(--ff-m);
  font-size: 12px;
  letter-spacing: .1em;
  text-decoration: none;
  clip: rect(1px, 1px, 1px, 1px);
  overflow: hidden;
  height: 1px;
  width: 1px;
}
.skip-link.screen-reader-text:focus {
  left: 0;
  clip: auto;
  height: auto;
  width: auto;
  overflow: visible;
}

/* ── CUSTOM CURSOR ──────────────────────────────────────────────── */
#cur-d {
  position: fixed; z-index: 9999;
  width: 8px; height: 8px;
  background: var(--orange); border-radius: 50%;
  pointer-events: none;
  transform: translate(-50%, -50%);
  transition: transform .08s var(--ease), background .15s;
  top: 0; left: 0;
}
#cur-r {
  position: fixed; z-index: 9998;
  width: 36px; height: 36px;
  border: 1.5px solid var(--orange); border-radius: 50%;
  pointer-events: none;
  transform: translate(-50%, -50%);
  transition: width .3s var(--ease), height .3s var(--ease), opacity .2s;
  opacity: .55;
  top: 0; left: 0;
}
body.ch #cur-d { transform: translate(-50%, -50%) scale(2.4); background: var(--orange-hot); }
body.ch #cur-r { width: 52px; height: 52px; opacity: .28; }
/* Over text: show native text cursor, hide custom cursor (UX: easier text selection) */
body.cursor-over-text { cursor: text; }
body.cursor-over-text #cur-d,
body.cursor-over-text #cur-r { display: none; }
@media (pointer: coarse) {
  body { cursor: auto; }
  #cur-d, #cur-r { display: none; }
}

/* ── NAVIGATION ─────────────────────────────────────────────────── */
.site-header {
  position: fixed; top: 0; inset-inline: 0; z-index: 100;
  height: var(--nav-h);
  display: flex; align-items: center; justify-content: center;
  padding: 0;
  transition: background .3s, border-color .3s;
}
.header-inner {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 56px;
  display: flex; align-items: center; justify-content: space-between;
}
.site-header.scrolled {
  background: rgba(244,239,230,.96);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(26,20,16,.08);
}
.site-logo {
  font-family: var(--ff-d); font-size: 20px;
  letter-spacing: .06em; color: var(--ink);
}
.site-logo span { color: var(--orange); }
.site-branding { display: inline-flex; align-items: center; min-width: 0; }
.site-branding .custom-logo-link { display: inline-flex; align-items: center; line-height: 1; max-width: 240px; width: 100%; }
.site-branding .custom-logo { width: 100%; max-width: 240px; max-height: 52px; height: auto; }
.site-nav { display: flex; align-items: center; gap: 40px; }
.site-nav .main-menu {
  display: flex;
  align-items: center;
  gap: 32px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.site-nav .main-menu > li {
  position: relative;
  list-style: none;
}
.main-menu a {
  font-family: var(--ff-m); font-size: 11px;
  letter-spacing: .14em; text-transform: uppercase;
  color: var(--ink-mid);
  position: relative;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 4px 2px;
}
.main-menu a::after {
  content: ''; position: absolute;
  bottom: 0; left: 0; width: 0; height: 1px;
  background: var(--orange);
  transition: width .3s var(--ease);
}
.main-menu a:hover::after,
.main-menu .current-menu-item > a::after { width: 100%; }
.main-menu .current-menu-item > a { color: var(--ink); }

/* Desktop dropdowns (WordPress sub-menu) */
.site-nav .main-menu .sub-menu {
  position: absolute;
  top: calc(100% + 14px);
  left: 0;
  min-width: 220px;
  background: rgba(244,239,230,.98);
  border: 1px solid rgba(26,20,16,.1);
  box-shadow: 0 10px 28px rgba(0,0,0,.12);
  padding: 10px 14px;
  list-style: none;
  margin: 0;
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: opacity .2s var(--ease), transform .2s var(--ease), visibility .2s;
  z-index: 150;
}
.site-nav .main-menu .sub-menu li { list-style: none; }
.site-nav .main-menu .sub-menu a {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 8px 0;
  white-space: nowrap;
}
.site-nav .main-menu .menu-item-has-children:hover > .sub-menu,
.site-nav .main-menu .menu-item-has-children:focus-within > .sub-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.nav-cta {
  font-family: var(--ff-m); font-size: 11px;
  letter-spacing: .1em; text-transform: uppercase;
  color: var(--white); background: var(--ink);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 10px 22px; border-radius: 2px;
  transition: background .2s;
}
.nav-cta:hover { background: var(--orange); }

/* hamburger */
.nav-burger {
  display: none; flex-direction: column; justify-content: center; gap: 5px;
  box-sizing: content-box;
  min-width: 44px;
  min-height: 44px;
  padding: 0; margin-right: -8px;
  cursor: pointer; background: none; border: none;
}
.nav-burger span {
  display: block; width: 22px; height: 1.5px;
  background: var(--ink);
  transition: transform .3s var(--ease), opacity .2s;
  transform-origin: center;
}
.nav-burger.open span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.nav-burger.open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.nav-burger.open span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

/* mobile drawer */
.nav-drawer {
  position: fixed; top: var(--nav-h); left: 0; right: 0; z-index: 99;
  background: rgba(244,239,230,.98);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(26,20,16,.1);
  padding: 0 24px; max-height: 0; overflow: hidden;
  transition: max-height .4s var(--ease), padding .3s;
}
.nav-drawer.open { max-height: 400px; padding: 24px; }
.nav-drawer ul { list-style: none; }
.nav-drawer li { border-bottom: 1px solid rgba(26,20,16,.07); }
.nav-drawer a {
  display: flex;
  align-items: center;
  min-height: 48px;
  padding: 12px 0;
  font-family: var(--ff-m); font-size: 12px;
  letter-spacing: .14em; text-transform: uppercase;
  color: var(--ink-mid); transition: color .2s;
}
.nav-drawer a:hover { color: var(--orange); }
.nav-drawer .drawer-cta {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  margin-top: 20px;
  font-family: var(--ff-m); font-size: 11px;
  letter-spacing: .1em; text-transform: uppercase;
  color: var(--white); background: var(--ink);
  padding: 14px 24px; border-radius: 2px;
  text-align: center; transition: background .2s;
}
.nav-drawer .drawer-cta:hover { background: var(--orange); }

/* ── BREADCRUMB ─────────────────────────────────────────────────── */
.breadcrumb {
  background: var(--cream-2);
  border-bottom: 1px solid rgba(26,20,16,.08);
  padding: 14px 56px;
  margin-top: var(--nav-h);
}
.breadcrumb-inner {
  max-width: var(--max); margin: 0 auto;
  display: flex; align-items: center; gap: 10px;
}
.breadcrumb a, .breadcrumb span {
  font-family: var(--ff-m); font-size: 10px;
  letter-spacing: .14em; text-transform: uppercase;
  color: var(--ink-muted);
}
.breadcrumb a:hover { color: var(--orange); }
.breadcrumb .sep { opacity: .35; }
.breadcrumb .current { color: var(--ink); }

/* ── BUTTONS ────────────────────────────────────────────────────── */
.btn-primary {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--ff-m); font-size: 11px;
  letter-spacing: .1em; text-transform: uppercase;
  color: var(--white); background: var(--ink);
  padding: 14px 28px; border-radius: 2px;
  position: relative; overflow: hidden;
  transition: color .3s;
  border: none; cursor: pointer;
}
.btn-primary::before {
  content: ''; position: absolute; inset: 0;
  background: var(--orange);
  transform: scaleX(0); transform-origin: left;
  transition: transform .4s var(--ease);
}
.btn-primary:hover::before { transform: scaleX(1); }
.btn-primary span, .btn-primary svg { position: relative; z-index: 1; }

.btn-ghost {
  font-family: var(--ff-m); font-size: 11px;
  letter-spacing: .1em; text-transform: uppercase;
  color: var(--ink-mid); padding: 14px 0;
  border-bottom: 1px solid transparent;
  transition: border-color .2s, color .2s;
}
.btn-ghost:hover { border-color: var(--orange); color: var(--ink); }

/* ── SCROLL REVEAL ──────────────────────────────────────────────── */
.rv {
  opacity: 0; transform: translateY(24px);
  transition: opacity .8s var(--ease), transform .8s var(--ease);
}
.rv.on { opacity: 1; transform: none; }
.rv.d1 { transition-delay: .1s; }
.rv.d2 { transition-delay: .2s; }
.rv.d3 { transition-delay: .3s; }
.rv.d4 { transition-delay: .4s; }
.rv.d5 { transition-delay: .5s; }

/* ── ENTRY ANIMATIONS ───────────────────────────────────────────── */
@keyframes fu { to { opacity: 1; transform: translateY(0); } }

/* ── FOOTER ─────────────────────────────────────────────────────── */
.site-footer { background: var(--ink); padding: 64px 56px 36px; }
.foot-inner { max-width: var(--max); margin: 0 auto; }
.foot-top {
  display: grid;
  grid-template-columns: minmax(0, 280px) minmax(0, 1fr);
  gap: 40px 56px;
  align-items: start;
  padding-bottom: 48px;
  border-bottom: 1px solid rgba(244,239,230,.07);
  margin-bottom: 28px;
}
.foot-brand { font-family: var(--ff-d); font-size: 44px; letter-spacing: .03em; color: var(--cream); line-height: 1; }
.foot-brand span { color: var(--orange); }
.foot-tagline { font-family: var(--ff-m); font-size: 10px; letter-spacing: .16em; text-transform: uppercase; color: var(--foot-line); margin-top: 6px; }
.foot-cols {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 32px 40px;
  align-items: start;
  min-width: 0;
}
.foot-col { min-width: 0; }
.foot-col .foot-col-title { font-family: var(--ff-m); font-size: 10px; letter-spacing: .2em; text-transform: uppercase; color: rgba(244,239,230,.62); margin-bottom: 16px; }
.foot-col ul { list-style: none; }
.foot-col li + li { margin-top: 10px; }
.foot-col a {
  font-family: var(--ff-s); font-size: 14px; font-weight: 300;
  color: rgba(244,239,230,.68);
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  transition: color .2s;
}
.foot-col a:hover { color: var(--cream); }
.foot-bottom { display: flex; align-items: center; justify-content: space-between; }
.foot-copy { font-family: var(--ff-m); font-size: 10px; letter-spacing: .1em; color: var(--foot-meta); }
.foot-social { display: flex; flex-wrap: wrap; gap: 8px 20px; align-items: center; }
.foot-social a {
  font-family: var(--ff-m); font-size: 10px; letter-spacing: .12em; text-transform: uppercase;
  color: rgba(244,239,230,.55);
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  padding: 6px 2px;
  transition: color .2s;
}
.foot-social a:hover { color: rgba(244,239,230,.88); }
.foot-lang { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; }
.foot-lang a {
  font-family: var(--ff-m); font-size: 10px; letter-spacing: .16em; text-transform: uppercase;
  color: rgba(244,239,230,.55);
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  padding: 6px 4px;
  transition: color .2s;
}
.foot-lang a:hover, .foot-lang a.active { color: #FFB38A; }

/* ── WORDPRESS ALIGNMENT CLASSES ───────────────────────────────── */
.alignwide  { max-width: var(--max); margin-inline: auto; }
.alignfull  { width: 100%; max-width: none; }
.aligncenter { text-align: center; }

/* ── RESPONSIVE ─────────────────────────────────────────────────── */
@media (max-width: 1024px) {
  .foot-top { grid-template-columns: 1fr; gap: 36px; }
}
@media (max-width: 640px) {
  .header-inner { padding: 0 20px; }
  .site-branding .custom-logo-link { max-width: 180px; }
  .site-branding .custom-logo { max-width: 180px; max-height: 42px; }
  .main-menu, .nav-cta { display: none; }
  .nav-burger { display: flex; }
  .breadcrumb { padding: 14px 20px; }
  .breadcrumb-inner { flex-wrap: wrap; row-gap: 6px; min-width: 0; }
  .breadcrumb .current { word-break: break-word; }
  .site-footer { padding: 48px 20px 28px; }
  .foot-cols { grid-template-columns: 1fr; gap: 28px; }
  .foot-bottom {
    flex-direction: column;
    align-items: flex-start;
    gap: 20px;
  }
  .foot-social, .foot-lang { flex-wrap: wrap; row-gap: 10px; }
  /* Çok menü öğesi: drawer içi kaydırılabilir */
  .nav-drawer.open {
    max-height: min(75vh, 520px);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }
}
.foot-tagline-sub { margin-top: 4px; }
