/* ==========================================================================
   FBKAD — components: chrome, buttons, cards, decoration, motion primitives
   ========================================================================== */

/* --------------------------------------------------- scroll progress -- */

.progress {
  position: fixed;
  inset: 0 auto auto 0;
  width: 100%;
  height: 3px;
  z-index: 120;
  background: transparent;
  pointer-events: none;
}

.progress__bar {
  height: 100%;
  width: 100%;
  transform: scaleX(0);
  transform-origin: 0 50%;
  background: linear-gradient(90deg, var(--yellow-deep), var(--yellow) 55%, var(--green));
  box-shadow: 0 0 16px rgba(249, 226, 61, 0.5);
}

/* ------------------------------------------------------------ header -- */

.header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 110;
  padding-block: clamp(0.9rem, 1.6vw, 1.5rem);
  transition: background 0.45s var(--ease-out), backdrop-filter 0.45s var(--ease-out),
              border-color 0.45s var(--ease-out), padding 0.45s var(--ease-out);
  border-bottom: 1px solid transparent;
}

.header.is-stuck {
  background: rgba(5, 11, 26, 0.82);
  backdrop-filter: blur(18px) saturate(1.3);
  -webkit-backdrop-filter: blur(18px) saturate(1.3);
  border-bottom-color: var(--line);
  padding-block: 0.7rem;
}

.header.is-hidden { transform: translateY(-105%); }
.header { transition-property: background, backdrop-filter, border-color, padding, transform; }

.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.85rem;
  flex-shrink: 0;
}

.brand__mark {
  width: clamp(42px, 4.6vw, 56px);
  aspect-ratio: 1;
  transition: transform 0.6s var(--ease-out);
}

.brand:hover .brand__mark { transform: rotate(-8deg) scale(1.06); }

.brand__text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.brand__name {
  font-family: var(--font-display);
  font-size: 0.98rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--text-strong);
  white-space: nowrap;
}

.brand__sub {
  font-size: 0.6rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--yellow);
  font-weight: 600;
}

@media (max-width: 400px) { .brand__text { display: none; } }

.nav { display: flex; align-items: center; gap: clamp(1rem, 2.4vw, 2.4rem); }

.nav__link {
  position: relative;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-dim);
  padding-block: 0.4rem;
  transition: color 0.3s var(--ease-out);
}

.nav__link::after {
  content: "";
  position: absolute;
  left: 0; bottom: 0;
  width: 100%; height: 1.5px;
  background: var(--yellow);
  transform: scaleX(0);
  transform-origin: 100% 50%;
  transition: transform 0.45s var(--ease-out);
}

.nav__link:hover, .nav__link[aria-current="page"] { color: var(--text-strong); }

.nav__link:hover::after,
.nav__link[aria-current="page"]::after {
  transform: scaleX(1);
  transform-origin: 0 50%;
}

@media (max-width: 820px) { .nav--desktop { display: none; } }

/* Mobile menu */

.burger {
  display: none;
  width: 46px; height: 46px;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  position: relative;
  flex-shrink: 0;
  transition: border-color 0.3s var(--ease-out), background 0.3s var(--ease-out);
}

.burger:hover { border-color: var(--yellow); }

.burger span {
  position: absolute;
  left: 50%; top: 50%;
  width: 17px; height: 1.5px;
  background: var(--text-strong);
  transform: translate(-50%, -50%);
  transition: transform 0.4s var(--ease-out), opacity 0.25s;
}

.burger span:nth-child(1) { transform: translate(-50%, calc(-50% - 4px)); }
.burger span:nth-child(3) { transform: translate(-50%, calc(-50% + 4px)); }

.burger[aria-expanded="true"] span:nth-child(1) { transform: translate(-50%, -50%) rotate(45deg); }
.burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.burger[aria-expanded="true"] span:nth-child(3) { transform: translate(-50%, -50%) rotate(-45deg); }

@media (max-width: 820px) { .burger { display: block; } }

.menu {
  position: fixed;
  inset: 0;
  z-index: 105;
  background: var(--navy-950);
  display: grid;
  place-items: center;
  clip-path: circle(0% at calc(100% - 46px) 46px);
  transition: clip-path 0.75s var(--ease-out);
  pointer-events: none;
}

.menu.is-open { clip-path: circle(150% at calc(100% - 46px) 46px); pointer-events: auto; }

.menu__list { display: flex; flex-direction: column; gap: 0.4rem; text-align: center; }

.menu__list a {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(2rem, 9vw, 3.4rem);
  font-weight: 600;
  letter-spacing: -0.03em;
  color: var(--text-strong);
  padding-block: 0.15em;
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.5s var(--ease-out), transform 0.5s var(--ease-out), color 0.3s;
}

.menu.is-open .menu__list a { opacity: 1; transform: none; }
.menu.is-open .menu__list li:nth-child(1) a { transition-delay: 0.16s; }
.menu.is-open .menu__list li:nth-child(2) a { transition-delay: 0.23s; }
.menu.is-open .menu__list li:nth-child(3) a { transition-delay: 0.30s; }
.menu.is-open .menu__list li:nth-child(4) a { transition-delay: 0.37s; }

.menu__list a:hover { color: var(--yellow); }

/* ----------------------------------------------------------- buttons -- */

.btn {
  --btn-bg: var(--yellow);
  --btn-fg: var(--ink);
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.65em;
  padding: 0.95em 1.9em;
  border-radius: 100px;
  background: var(--btn-bg);
  color: var(--btn-fg);
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  overflow: hidden;
  isolation: isolate;
  transition: transform 0.4s var(--ease-out), box-shadow 0.4s var(--ease-out), color 0.35s;
  will-change: transform;
}

.btn::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: var(--navy-600);
  transform: translateY(101%);
  transition: transform 0.5s var(--ease-out);
}

.btn:hover {
  color: var(--text-strong);
  box-shadow: 0 14px 34px -14px rgba(249, 226, 61, 0.55);
}

.btn:hover::before { transform: translateY(0); }

.btn:active { transform: scale(0.97); }

.btn--ghost {
  --btn-bg: transparent;
  --btn-fg: var(--text-strong);
  border: 1px solid var(--line-strong);
}

.btn--ghost::before { background: var(--yellow); }
.btn--ghost:hover { color: var(--ink); box-shadow: none; }

.section--paper .btn--ghost { --btn-fg: var(--text-dark); }

/* Magnetic buttons: JS writes an inline transform on pointer move and clears
   it on leave, so the easing here is what makes it settle back smoothly. */
.btn--magnetic { transition: transform 0.45s var(--ease-out), box-shadow 0.4s var(--ease-out), color 0.35s; }

.btn__arrow { transition: transform 0.45s var(--ease-out); }
.btn:hover .btn__arrow { transform: translateX(4px); }

/* Text link with animated rule */
.tlink {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--yellow);
  padding-bottom: 0.25em;
  border-bottom: 1px solid rgba(249, 226, 61, 0.3);
  transition: border-color 0.35s, gap 0.35s var(--ease-out);
}

.tlink:hover { border-color: var(--yellow); gap: 0.9em; }

/* ------------------------------------------------------------- cards -- */

.card {
  position: relative;
  padding: clamp(1.6rem, 2.6vw, 2.4rem);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(160deg, rgba(36, 64, 122, 0.28), rgba(10, 20, 40, 0.15));
  overflow: hidden;
  isolation: isolate;
  transition: border-color 0.45s var(--ease-out), transform 0.5s var(--ease-out);
}

/* Cursor-tracked spotlight (coords set from JS) */
.card::before {
  content: "";
  position: absolute;
  inset: -1px;
  z-index: -1;
  background: radial-gradient(
    340px circle at var(--mx, 50%) var(--my, 0%),
    rgba(249, 226, 61, 0.16),
    transparent 62%
  );
  opacity: 0;
  transition: opacity 0.45s var(--ease-out);
}

.card:hover { border-color: var(--line-strong); transform: translateY(-4px); }
.card:hover::before { opacity: 1; }

.card__num {
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--yellow);
  letter-spacing: 0.1em;
  display: block;
  margin-bottom: 1.6rem;
}

.card__title { font-size: var(--fs-h3); margin-bottom: 0.6rem; }

.card p { color: var(--text-dim); font-size: 0.95rem; }

/* -------------------------------------------------- image placeholders --
   No photography yet. These read as an intentional graphic device rather
   than a missing asset: navy field, scarf-stripe motif, badge watermark.   */

.ph {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  background:
    radial-gradient(120% 90% at 25% 15%, rgba(51, 85, 154, 0.55), transparent 60%),
    linear-gradient(155deg, var(--navy-800), var(--navy-950));
  border: 1px solid var(--line);
  isolation: isolate;
}

.ph::before {
  content: "";
  position: absolute;
  inset: -30%;
  background: repeating-linear-gradient(
    -52deg,
    rgba(249, 226, 61, 0.085) 0 26px,
    transparent 26px 78px
  );
  z-index: 0;
}

.ph::after {
  content: "";
  position: absolute;
  inset: 0;
  background: url("../img/logo/fbkad-badge-300.png") center / 42% auto no-repeat;
  opacity: 0.09;
  z-index: 0;
  filter: grayscale(1) brightness(2);
}

.ph__label {
  position: absolute;
  left: 1.1rem;
  bottom: 1rem;
  z-index: 2;
  font-size: var(--fs-micro);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-faint);
  font-weight: 600;
}

.ph--1x1 { aspect-ratio: 1; }
.ph--4x3 { aspect-ratio: 4 / 3; }
.ph--3x4 { aspect-ratio: 3 / 4; }
.ph--16x9 { aspect-ratio: 16 / 9; }

/* Full-bleed band: an explicit height instead of a ratio, so a `max-height`
   can't shrink the width out from under the box. */
.ph--band { width: 100%; height: clamp(260px, 30vw, 440px); }

/* ------------------------------------------------------------- media --
   Real photography. Same box model as the .ph placeholder so the two can be
   swapped freely as client photos arrive.                                  */

.media {
  position: relative;
  display: block;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--navy-900);
  border: 1px solid var(--line);
  isolation: isolate;
  margin: 0;
}

.media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 1.1s var(--ease-out);
}

/* A whisper of navy over everything so the warmer frames (tea, notebook,
   Kadikoy) sit in the same world as the cool ones. */
.media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(36, 64, 122, 0.10), rgba(5, 11, 26, 0.30));
  pointer-events: none;
}

.media--1x1 { aspect-ratio: 1; }
.media--4x3 { aspect-ratio: 4 / 3; }
.media--16x9 { aspect-ratio: 16 / 9; }
.media--band { width: 100%; height: clamp(260px, 30vw, 440px); }

.media--plain { border: 0; border-radius: 0; }

a:hover > .media img,
.panel:hover .media img,
.gallery__item:hover .media img { transform: scale(1.04); }

/* --------------------------------------------------------- decoration -- */

/* Drifting colour orbs — pure CSS, no image weight */
.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.5;
  pointer-events: none;
  z-index: 0;
  will-change: transform;
}

.orb--yellow { background: radial-gradient(circle, rgba(249, 226, 61, 0.30), transparent 68%); }
.orb--navy   { background: radial-gradient(circle, rgba(74, 111, 189, 0.42), transparent 68%); }
.orb--green  { background: radial-gradient(circle, rgba(65, 183, 59, 0.18), transparent 68%); }

@keyframes drift {
  0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
  33%      { transform: translate3d(4vw, -3vh, 0) scale(1.12); }
  66%      { transform: translate3d(-3vw, 3vh, 0) scale(0.94); }
}

.orb--anim { animation: drift 22s var(--ease-in-out) infinite; }
.orb--anim.orb--slow { animation-duration: 34s; animation-direction: reverse; }

/* Film grain overlay */
.grain {
  position: fixed;
  inset: 0;
  z-index: 100;
  pointer-events: none;
  opacity: 0.035;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* Scarf stripe rule — the club scarf as a divider */
.scarf-rule {
  height: 5px;
  width: 100%;
  background: repeating-linear-gradient(
    90deg,
    var(--navy-600) 0 24px,
    var(--yellow) 24px 48px
  );
  border-radius: 100px;
}

/* Marquee band */
.marquee {
  position: relative;
  overflow: hidden;
  padding-block: clamp(0.9rem, 1.6vw, 1.4rem);
  background: var(--yellow);
  border-block: 1px solid rgba(7, 8, 8, 0.12);
}

.marquee__track {
  display: flex;
  width: max-content;
  animation: marquee 38s linear infinite;
}

.marquee:hover .marquee__track { animation-play-state: paused; }

.marquee__group {
  display: flex;
  align-items: center;
  gap: clamp(1.6rem, 3.5vw, 3.2rem);
  padding-right: clamp(1.6rem, 3.5vw, 3.2rem);
  flex-shrink: 0;
}

.marquee__item {
  font-family: var(--font-display);
  font-size: clamp(1.1rem, 2.4vw, 1.9rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--ink);
  white-space: nowrap;
}

.marquee__dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--navy-600);
  flex-shrink: 0;
}

@keyframes marquee {
  from { transform: translate3d(0, 0, 0); }
  to   { transform: translate3d(-50%, 0, 0); }
}

/* ------------------------------------------------------------ footer -- */

.footer {
  position: relative;
  background: var(--navy-950);
  border-top: 1px solid var(--line);
  padding-block: clamp(3.5rem, 6vw, 6rem) 2rem;
  overflow: hidden;
}

.footer__grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1.2fr;
  gap: clamp(2rem, 4vw, 3.5rem);
  padding-bottom: clamp(2.5rem, 5vw, 4rem);
}

@media (max-width: 900px) { .footer__grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 540px) { .footer__grid { grid-template-columns: 1fr; } }

.footer__title {
  font-size: var(--fs-micro);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--yellow);
  font-weight: 600;
  margin-bottom: 1.4rem;
}

.footer__links li { margin-bottom: 0.7rem; }

.footer__links a {
  font-size: 0.92rem;
  color: var(--text-dim);
  transition: color 0.3s, padding-left 0.35s var(--ease-out);
}

.footer__links a:hover { color: var(--yellow); padding-left: 6px; }

.footer__bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
  padding-top: 2rem;
  border-top: 1px solid var(--line);
  font-size: var(--fs-small);
  color: var(--text-dim);  /* real copy, needs AA — not the decorative faint token */
}

.socials { display: flex; gap: 0.6rem; }

.socials a {
  width: 40px; height: 40px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  color: var(--text-dim);
  transition: color 0.3s, border-color 0.3s, transform 0.4s var(--ease-out), background 0.3s;
}

.socials a:hover {
  color: var(--ink);
  background: var(--yellow);
  border-color: var(--yellow);
  transform: translateY(-3px);
}

/* --------------------------------------------- motion primitives (JS) -- */

[data-reveal] {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.9s var(--ease-out), transform 0.9s var(--ease-out);
  transition-delay: var(--delay, 0ms);
}

[data-reveal].is-in { opacity: 1; transform: none; }

[data-reveal="fade"] { transform: none; }
[data-reveal="left"] { transform: translateX(-40px); }
[data-reveal="right"] { transform: translateX(40px); }
[data-reveal="scale"] { transform: scale(0.94); }

[data-reveal="clip"] {
  opacity: 1;
  transform: none;
  clip-path: inset(0 0 100% 0);
  transition: clip-path 1.1s var(--ease-out);
  transition-delay: var(--delay, 0ms);
}

[data-reveal="clip"].is-in { clip-path: inset(0 0 0 0); }

/* Line-by-line masked heading reveal */
.reveal-lines { display: block; }

.reveal-lines .line {
  display: block;
  /* The mask is what makes the line slide up out of nothing, so this has to
     stay hidden. But 0.04em of room was clipping the cedilla on ş and the
     tail on y, which Turkish headings hit constantly ("Buluşmalarımız",
     "ulaşın", "aydınlatma", "Sayfa"). The negative margin gives the glyphs
     real space without changing the line spacing. */
  overflow: hidden;
  padding-bottom: 0.22em;
  margin-bottom: -0.18em;
}

.reveal-lines .line > span {
  display: block;
  transform: translateY(105%);
  transition: transform 1s var(--ease-out);
  transition-delay: calc(var(--i, 0) * 95ms);
}

.reveal-lines.is-in .line > span { transform: none; }

@media (prefers-reduced-motion: reduce) {
  [data-reveal] { opacity: 1 !important; transform: none !important; clip-path: none !important; }
  .reveal-lines .line > span { transform: none !important; }
  .marquee__track, .orb--anim { animation: none !important; }
}
