/* ==========================================================================
   Sleek — sleek.global
   ========================================================================== */

:root {
  --ink: #0B0B0C;
  --bone: #F2EFE9;
  --cobalt: #2F5BFF;
  --neon: #C8FF2E;
  --grey: #8C8C90;
  --rule: rgb(242 239 233 / 0.16);

  --font-display: "Archivo", "Arial Narrow", sans-serif;
  --font-text: "Inter Tight", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, monospace;

  --pad: clamp(16px, 4vw, 48px);
  --gap: clamp(12px, 2vw, 24px);
  --section-y: clamp(96px, 14vw, 200px);
  --header-h: 72px;
  --fs-row: clamp(2rem, 1rem + 4.6vw, 6.5rem); /* service rows + client wall */

  /* Motion vocabulary — main.js reads these, so CSS and GSAP share one source. */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  --dur-hover: 0.5s;
  --dur-reveal: 1.1s;
  --dur-accordion: 0.7s;
}

/* ---------- Base ---------- */

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

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--ink);
  color: var(--bone);
  font: 400 clamp(1rem, 0.95rem + 0.25vw, 1.125rem)/1.6 var(--font-text);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, p, ul, ol, figure { margin: 0; padding: 0; }
ul, ol { list-style: none; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }

:focus-visible { outline: 2px solid var(--cobalt); outline-offset: 3px; }
[tabindex="-1"]:focus { outline: none; }
section, .service { scroll-margin-top: calc(var(--header-h) + 1px); } /* header + its hairline */

::selection { background: var(--cobalt); color: var(--bone); }

.skip-link {
  position: fixed; left: var(--pad); top: 8px; z-index: 100;
  padding: 0.5rem 1rem; background: var(--bone); color: var(--ink);
  transform: translateY(-200%);
}
.skip-link:focus { transform: none; }

/* Lenis recommended CSS (lenis@1.3.27/dist/lenis.css, the parts this page uses) */
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-stopped { overflow: clip; }

/* ---------- Primitives ---------- */

.grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: var(--gap);
}

.display {
  font-family: var(--font-display);
  font-stretch: 72%;
  font-weight: 800;
  text-transform: uppercase;
  line-height: 0.88;
  letter-spacing: -0.01em;
}

/* Turkish caps carry marks above (İ Ğ Ü Ö) and below (Ş Ç): open the display leading so lines don't collide */
.display:lang(tr), .manifesto:lang(tr) { line-height: 1.2; }
.service__name:lang(tr), .nav__link:lang(tr) { line-height: 1.15; }

.label {
  font: 500 0.75rem/1.4 var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--grey);
}

.section { padding: var(--section-y) var(--pad) 0; }
.section > .label { margin-bottom: clamp(32px, 5vw, 64px); }

/* Cobalt fill that wipes up from the bottom on hover, and out through the top on leave */
.wipe { position: relative; isolation: isolate; overflow: hidden; }
.wipe::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: var(--cobalt);
  transform: scaleY(0); transform-origin: 50% 0;
  transition: transform var(--dur-hover) var(--ease-out);
}
.wipe:hover::before, .wipe:focus-visible::before { transform: scaleY(1); transform-origin: 50% 100%; }

/* Pill CTA with circled arrow */
.pill {
  display: inline-flex; align-items: center; gap: 0.75em;
  padding: 0.35em 0.35em 0.35em 1.25em;
  border: 1px solid currentColor; border-radius: 999px;
  font: 500 0.9375rem/1 var(--font-text);
  white-space: nowrap;
  transition: border-color var(--dur-hover) var(--ease-out), color var(--dur-hover) var(--ease-out);
}
.pill:hover, .pill:focus-visible { border-color: var(--cobalt); color: var(--bone); }
.pill__arrow {
  display: grid; place-items: center; overflow: hidden;
  width: 2.25em; height: 2.25em; border-radius: 50%;
  background: var(--bone); color: var(--ink);
}
.pill:hover .pill__arrow > span, .pill:focus-visible .pill__arrow > span { animation: arrow-cycle 0.6s var(--ease-out); }
@keyframes arrow-cycle {
  45% { transform: translateX(160%); }
  46% { transform: translateX(-160%); }
}

/* Corner-bracket marks */
.brackets { position: relative; }
.brackets::before, .brackets::after {
  content: ""; position: absolute; width: 14px; height: 14px;
  border: 0 solid var(--grey);
}
.brackets::before { top: 0; left: 0; border-top-width: 1px; border-left-width: 1px; }
.brackets::after { bottom: 0; right: 0; border-bottom-width: 1px; border-right-width: 1px; }

/* Marquee (ticker + strip). Without motion libraries a CSS loop runs; with them, main.js drives it. */
.marquee { overflow: hidden; white-space: nowrap; }
.marquee__track { display: flex; width: max-content; animation: marquee var(--marquee-duration, 30s) linear infinite; }
.marquee__item { flex: none; }
@keyframes marquee { to { transform: translateX(-50%); } }
.motion .marquee__track { animation: none; will-change: transform; }

/* Masked lines created by the split helper in main.js */
.line { display: block; overflow: hidden; padding-block: 0.08em; margin-block: -0.08em; }
.line__inner { display: block; will-change: transform; }

/* Hidden-until-revealed — only once main.js is guaranteed to reveal them */
.motion [data-split] { visibility: hidden; }
.motion [data-fade] { opacity: 0; }

/* ---------- Ticker ---------- */

.ticker {
  --marquee-duration: 40s;
  border-bottom: 1px solid var(--rule);
  padding: 0.5rem 0;
  font: 500 0.6875rem/1 var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--grey);
}

/* ---------- Header ---------- */

.header {
  position: sticky; top: 0; z-index: 50;
  background: var(--ink);
  border-bottom: 1px solid transparent;
  transition: border-color var(--dur-hover) var(--ease-out);
}
.header__bar {
  display: flex; align-items: center; justify-content: space-between; gap: var(--gap);
  min-height: var(--header-h);
  padding: 12px var(--pad);
}
.header.is-compact { border-bottom-color: var(--rule); }

.wordmark {
  position: relative; z-index: 2;
  font: 900 clamp(1.25rem, 1rem + 1vw, 1.75rem)/1 var(--font-display);
  font-stretch: 125%;
  letter-spacing: -0.01em;
}
.wordmark > span { display: inline-block; transform-origin: 0 50%; transition: transform var(--dur-hover) var(--ease-out); }
.header.is-compact .wordmark > span { transform: scale(0.8); }

.nav { display: flex; align-items: center; gap: clamp(24px, 3vw, 48px); }
.nav__list { display: flex; gap: clamp(20px, 2.5vw, 40px); }
.nav__link { position: relative; font: 500 0.9375rem/1 var(--font-text); padding-bottom: 4px; }
/* Masked underline: wipes in from the left, out to the right */
.nav__link::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px;
  background: currentColor;
  transform: scaleX(0); transform-origin: 100% 50%;
  transition: transform var(--dur-hover) var(--ease-out);
}
.nav__link:hover::after, .nav__link:focus-visible::after { transform: scaleX(1); transform-origin: 0 50%; }

.menu-toggle { display: none; }

@media (max-width: 899px) {
  .menu-toggle {
    position: relative; z-index: 2;
    display: inline-flex; align-items: center; gap: 0.75rem;
    min-height: 44px; padding: 0 0 0 0.75rem;
    font: 500 0.75rem/1 var(--font-mono); text-transform: uppercase; letter-spacing: 0.08em;
  }
  .menu-toggle__icon { position: relative; width: 22px; height: 10px; }
  .menu-toggle__icon::before, .menu-toggle__icon::after {
    content: ""; position: absolute; left: 0; right: 0; height: 1.5px; background: currentColor;
    transition: transform var(--dur-hover) var(--ease-out);
  }
  .menu-toggle__icon::before { top: 0; }
  .menu-toggle__icon::after { bottom: 0; }
  .menu-toggle[aria-expanded="true"] .menu-toggle__icon::before { transform: translateY(4.25px) rotate(45deg); }
  .menu-toggle[aria-expanded="true"] .menu-toggle__icon::after { transform: translateY(-4.25px) rotate(-45deg); }

  .nav {
    position: fixed; inset: 0; z-index: 1;
    flex-direction: column; align-items: flex-start; justify-content: flex-end; gap: 40px;
    padding: 96px var(--pad) 48px;
    background: var(--ink);
    visibility: hidden; opacity: 0;
    transition: opacity var(--dur-hover) var(--ease-out), visibility 0s var(--dur-hover);
  }
  .nav.is-open { visibility: visible; opacity: 1; transition: opacity var(--dur-hover) var(--ease-out); }
  .nav__list { flex-direction: column; gap: 4px; width: 100%; }
  .nav .nav__link {
    display: block; padding: 8px 0;
    font-family: var(--font-display); font-stretch: 72%; font-weight: 800;
    font-size: clamp(3rem, 14vw, 6rem); line-height: 0.95; text-transform: uppercase;
    transition: color var(--dur-hover) var(--ease-out);
  }
  .nav .nav__link::after { display: none; }
  .nav .nav__link:hover, .nav .nav__link:focus-visible { color: var(--cobalt); }
}

html.menu-open { overflow: hidden; }

/* Language switch: TR / ENG */
.lang-switch {
  display: flex; align-items: center; gap: 0.4em;
  font: 500 0.75rem/1 var(--font-mono); text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--grey);
}
.lang-switch__btn {
  min-height: 44px; padding: 0 0.25em;
  color: var(--grey); letter-spacing: inherit; text-transform: inherit;
  transition: color var(--dur-hover) var(--ease-out);
}
.lang-switch__btn:hover, .lang-switch__btn[aria-pressed="true"] { color: var(--bone); }

/* Turkish: keep the English fallback from flashing until main.js swaps the copy (failsafe after 2s) */
.i18n-pending body { visibility: hidden; animation: i18n-failsafe 0s 2s forwards; }
@keyframes i18n-failsafe { to { visibility: visible; } }

/* ---------- Hero ---------- */

.hero { padding: clamp(48px, 8vw, 120px) var(--pad) clamp(64px, 8vw, 120px); }
/* --fit ≈ width of the longest intended line in ems (+2% slack), so the headline fills the measure */
.hero__title { --fit: 6.45; font-size: calc((100vw - 2 * var(--pad)) / var(--fit)); } /* "CONNECT WITH." */
.hero__title:lang(tr) { --fit: 6.82; } /* "İNSANLARIN BAĞ" */

.hero__foot { margin-top: clamp(40px, 6vw, 96px); row-gap: 32px; align-items: end; }
.hero__lead { grid-column: 1 / span 5; max-width: 30ch; font-size: clamp(1.125rem, 1rem + 0.6vw, 1.5rem); line-height: 1.35; }
.hero__chips { grid-column: 7 / -1; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; }
.chip {
  display: inline-block; padding: 0.55em 1em;
  border: 1px solid var(--rule); border-radius: 999px;
  font: 500 0.9375rem/1 "Outfit", var(--font-text); letter-spacing: -0.01em;
  transition: border-color var(--dur-hover) var(--ease-out);
}
.chip:hover, .chip:focus-visible { border-color: var(--cobalt); }

/* ---------- Stanza (signature #1) ---------- */

.stanza { padding: 9vh var(--pad) 16vh; border-top: 1px solid var(--rule); }
.stanza__label { margin-bottom: 7vh; }
.stanza__lines { font-size: clamp(2.5rem, 9.6vw, 11rem); }
.stanza__line { display: grid; padding-block: 0.35em; }
.stanza__line > * { grid-area: 1 / 1; }
.stanza__mark { background: var(--cobalt); box-decoration-break: clone; -webkit-box-decoration-break: clone; padding: 0 0.08em; }
/* Outline copy (added by main.js) sits under the fill; scroll scrubs the fill's opacity. */
.stanza__outline { color: transparent; -webkit-text-stroke: 1px var(--grey); }
.stanza__outline .stanza__mark { background: none; }
.motion .stanza__fill { opacity: 0; will-change: opacity; }

/* ---------- Who we are ---------- */

.manifesto {
  font: italic 800 clamp(1.75rem, 1rem + 3.6vw, 5rem)/1 var(--font-display);
  font-stretch: 90%;
  text-transform: uppercase;
  letter-spacing: -0.01em;
  max-width: 22ch;
}

.who__body { margin-top: clamp(56px, 8vw, 120px); row-gap: 56px; align-items: start; }
.who__copy { grid-column: 1 / span 7; display: grid; grid-template-columns: 1fr 1fr; gap: var(--gap); }
.who__copy p { max-width: 34ch; }
.who__copy p + p { color: var(--grey); }
.ring { grid-column: 8 / -1; padding: clamp(12px, 2vw, 28px); }

.ring svg { display: block; width: 100%; height: auto; overflow: visible; }
.ring__spin { transform-box: view-box; transform-origin: center; animation: spin 80s linear infinite; }
.motion .ring__spin { animation: none; will-change: transform; }
.ring__text { font: 600 13px var(--font-display); font-stretch: 75%; text-transform: uppercase; letter-spacing: 0.06em; fill: var(--grey); transition: fill var(--dur-hover) var(--ease-out); }
.ring__seg { fill: none; stroke: var(--rule); stroke-width: 1; transition: stroke var(--dur-hover) var(--ease-out), stroke-width var(--dur-hover) var(--ease-out); }
.ring__core { fill: none; stroke: var(--rule); }
.ring__brand { font: 900 64px var(--font-display); font-stretch: 125%; fill: var(--bone); }
.ring__text.is-active { fill: var(--bone); }
.ring__seg.is-active { stroke: var(--cobalt); stroke-width: 10; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Strip + statement ---------- */

.strip {
  --marquee-duration: 26s;
  margin-top: var(--section-y);
  background: var(--cobalt); color: var(--bone);
  padding: clamp(12px, 1.6vw, 24px) 0;
  font: 800 clamp(2rem, 6vw, 6rem)/1 var(--font-display);
  font-stretch: 72%;
  text-transform: uppercase;
}

.statement { padding: var(--section-y) var(--pad); text-align: center; display: grid; justify-items: center; gap: 28px; }
.statement__title, .references__title { font-size: clamp(2.25rem, 6vw, 6.5rem); max-width: 14ch; }
.statement__text { max-width: 44ch; color: var(--grey); font-size: clamp(1.0625rem, 1rem + 0.4vw, 1.375rem); line-height: 1.45; }

/* ---------- What we do (signature #2) ---------- */

.what { padding-inline: 0; padding-top: 0; }
.what > .label { padding: clamp(48px, 6vw, 80px) var(--pad) 0; border-top: 1px solid var(--rule); }

.services { border-bottom: 1px solid var(--rule); }
.service { border-top: 1px solid var(--rule); }
.service__head { font: inherit; }

.service__toggle {
  display: grid; width: 100%; text-align: left;
  grid-template-columns: 4.5rem minmax(0, 1fr) minmax(12rem, 18rem) 2.75rem;
  grid-template-areas: "num name tag icon";
  align-items: center; column-gap: var(--gap);
  padding: clamp(18px, 2vw, 28px) var(--pad);
}
.service__toggle:focus-visible { outline: 2px solid var(--bone); outline-offset: -6px; }

.service__num { grid-area: num; font: 500 0.8125rem/1 var(--font-mono); color: var(--grey); align-self: start; padding-top: 0.6em; }
.service__name { grid-area: name; font-size: var(--fs-row); line-height: 0.9; overflow-wrap: break-word; }
.service__tagline { grid-area: tag; font-size: clamp(0.9375rem, 0.9rem + 0.2vw, 1.0625rem); line-height: 1.35; color: var(--grey); }
.service__num, .service__tagline { transition: color var(--dur-hover) var(--ease-out); }
.service__toggle:hover .service__num, .service__toggle:hover .service__tagline,
.service__toggle:focus-visible .service__num, .service__toggle:focus-visible .service__tagline { color: var(--bone); }

.service__icon {
  grid-area: icon; justify-self: end; position: relative;
  width: 2.75rem; height: 2.75rem; border: 1px solid currentColor; border-radius: 50%;
  transition: background-color var(--dur-hover) var(--ease-out), border-color var(--dur-hover) var(--ease-out);
}
.service__icon::before, .service__icon::after {
  content: ""; position: absolute; left: 50%; top: 50%; width: 14px; height: 1.5px; margin: -0.75px 0 0 -7px;
  background: currentColor; transition: transform var(--dur-accordion) var(--ease-out);
}
.service__icon::after { transform: rotate(90deg); }
[aria-expanded="true"] > .service__icon { background: var(--cobalt); border-color: var(--cobalt); }
[aria-expanded="true"] > .service__icon::after { transform: rotate(0deg); }
.service__toggle:hover > .service__icon, .service__toggle:focus-visible > .service__icon { border-color: var(--bone); }

/* 0fr → 1fr height animation; content follows a beat after the height starts */
.service__panel {
  display: grid; grid-template-rows: 0fr; visibility: hidden;
  transition: grid-template-rows var(--dur-accordion) var(--ease-out), visibility 0s var(--dur-accordion);
}
.service.is-open .service__panel { grid-template-rows: 1fr; visibility: visible; transition: grid-template-rows var(--dur-accordion) var(--ease-out); }
.service__panel-inner { overflow: hidden; min-height: 0; }

.service__content {
  padding: clamp(8px, 1vw, 16px) var(--pad) clamp(40px, 5vw, 72px);
  padding-left: calc(var(--pad) + 4.5rem + var(--gap));
  display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(32px, 5vw, 96px);
  opacity: 0; transform: translateY(16px);
  transition: opacity 0.4s var(--ease-out), transform var(--dur-accordion) var(--ease-out);
}
.service.is-open .service__content {
  opacity: 1; transform: none;
  transition: opacity var(--dur-accordion) var(--ease-out) 0.15s, transform var(--dur-accordion) var(--ease-out) 0.15s;
}
.services.no-anim .service__panel, .services.no-anim .service__content { transition: none; }

.service__body { display: grid; gap: 1em; max-width: 56ch; }
.service__body p:first-child { font-size: 1.25em; line-height: 1.35; }
.service__kicker {
  margin-top: 1em; padding-left: 20px; border-left: 4px solid var(--cobalt);
  font: italic 700 clamp(1.25rem, 1rem + 1vw, 2rem)/1.1 var(--font-display);
  font-stretch: 90%; text-transform: uppercase;
}
.service__deliverables .label { margin-bottom: 16px; }
.deliverables { display: flex; flex-wrap: wrap; gap: 8px; }
.deliverables li {
  padding: 0.5em 0.8em; border: 1px solid var(--rule);
  font: 500 0.8125rem/1.2 var(--font-text);
}

@media (max-width: 899px) {
  .service__toggle {
    grid-template-columns: minmax(0, 1fr) 2.75rem;
    grid-template-areas: "num icon" "name name" "tag tag";
    row-gap: 12px;
  }
  .service__num { padding-top: 0; align-self: center; }
  .service__content { grid-template-columns: 1fr; padding-left: var(--pad); }
}

/* ---------- References ---------- */

.references { padding-bottom: var(--section-y); }
.clients {
  display: flex; flex-wrap: wrap; align-items: baseline;
  margin-top: clamp(40px, 6vw, 96px); padding-top: clamp(24px, 3vw, 40px);
  border-top: 1px solid var(--rule);
  font-size: var(--fs-row); line-height: 1; row-gap: 0.22em;
  color: var(--neon);
}
.client { transition: color var(--dur-hover) var(--ease-out); }
.client:hover { color: var(--bone); }
.client:not(:last-child)::after {
  content: "/"; content: "/" / ""; /* decorative: hidden from screen readers where supported */
  margin-inline: 0.22em; color: var(--cobalt);
}

/* ---------- Contact (inverted) ---------- */

.contact { background: var(--bone); color: var(--ink); padding: var(--section-y) var(--pad); }
.contact .label { color: var(--ink); margin-bottom: clamp(32px, 5vw, 64px); }
.contact__title { --fit: 5.6; font-size: calc((100vw - 2 * var(--pad)) / var(--fit)); } /* "YOUR WORLD." */
.contact__title:lang(tr) { --fit: 8.2; } /* "DÜNYANIZI BİRLİKTE" — two lines like the English */
@media (max-width: 899px) {
  .contact__title:lang(tr) { --fit: 4.41; } /* "DÜNYANIZI": one word per line reads bigger on phones */
}
.contact__foot { margin-top: clamp(40px, 6vw, 80px); row-gap: 32px; align-items: end; }
.contact__lead { grid-column: 1 / span 5; max-width: 34ch; font-size: clamp(1.125rem, 1rem + 0.5vw, 1.375rem); line-height: 1.4; }
.pill--big { grid-column: 7 / -1; justify-self: end; font-size: clamp(1rem, 0.7rem + 1.4vw, 2rem); padding-left: 1.4em; }
.contact .pill__arrow { background: var(--ink); color: var(--bone); transition: background-color var(--dur-hover) var(--ease-out), color var(--dur-hover) var(--ease-out); }
.contact .pill:hover .pill__arrow, .contact .pill:focus-visible .pill__arrow { background: var(--bone); color: var(--ink); }

/* ---------- Footer ---------- */

.footer { overflow: hidden; padding: clamp(48px, 6vw, 80px) var(--pad) 0; }
.footer__top { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 24px; }
.footer__nav { display: flex; flex-wrap: wrap; gap: 12px 32px; }
.footer__copy { font: 400 0.8125rem/1.4 var(--font-mono); color: var(--grey); }
.footer__mark {
  /* Spans the full viewport (escapes the footer padding); 22vw ≈ 94% of the width for this word */
  margin: clamp(32px, 5vw, 64px) calc(-1 * var(--pad)) -0.24em;
  font: 900 22vw/1 var(--font-display); font-stretch: 125%;
  letter-spacing: -0.02em; text-align: center;
  user-select: none;
}

/* ---------- Responsive ---------- */

@media (max-width: 899px) {
  .hero__lead, .hero__chips, .who__copy, .ring, .contact__lead, .pill--big { grid-column: 1 / -1; }
  .chips { justify-content: flex-start; }
  .pill--big { justify-self: start; }
  .ring { max-width: 440px; width: 100%; justify-self: center; }
}
@media (max-width: 599px) {
  .who__copy { grid-template-columns: 1fr; }
}

/* ---------- Reduced motion: no movement, simple fades only ---------- */

@media (prefers-reduced-motion: no-preference) {
  html:not(.lenis) { scroll-behavior: smooth; }
}

@media (prefers-reduced-motion: reduce) {
  .marquee__track, .ring__spin { animation: none; }
  .pill:hover .pill__arrow > span, .pill:focus-visible .pill__arrow > span { animation: none; }
  .wipe::before, .wipe:hover::before, .wipe:focus-visible::before { transform: none; opacity: 0; transition: opacity var(--dur-hover) var(--ease-out); }
  .wipe:hover::before, .wipe:focus-visible::before { opacity: 1; }
  .nav__link::after { transform: none; opacity: 0; transition: opacity var(--dur-hover) var(--ease-out); }
  .nav__link:hover::after, .nav__link:focus-visible::after { transform: none; opacity: 1; }
  .header.is-compact .wordmark > span { transform: none; }
  .service__panel, .service.is-open .service__panel { transition: none; }
  .service__content, .service.is-open .service__content { transform: none; }
}
