/* =========================================================
   علی سینا فراهانی — Luxury Personal Site v2
   Obsidian · Champagne Gold · Emerald  |  RTL · Cinematic
   ========================================================= */

:root {
  /* Surfaces */
  --bg: #080b0a;
  --bg-2: #0b110e;
  --surface: #111813;
  --surface-2: #18211b;
  --line: rgba(233, 226, 205, 0.09);
  --line-strong: rgba(233, 226, 205, 0.16);

  /* Brand */
  --emerald: #2f9e6f;
  --emerald-bright: #3fbd87;
  --emerald-deep: #0c3526;
  --emerald-glow: rgba(47, 158, 111, 0.25);

  --gold: #c9a24b;
  --gold-bright: #e6cf8e;
  --gold-deep: #93702a;
  --gold-grad: linear-gradient(120deg, #e6cf8e 0%, #c9a24b 45%, #9c7a32 100%);

  /* Text */
  --text: #f3efe4;
  --text-soft: #cfd4cb;
  --muted: #98a299;
  --muted-2: #6a746c;

  /* Type */
  --font-fa: "IRANYekanX", system-ui, sans-serif;
  --font-en: "Cormorant Garamond", "IRANYekanX", Georgia, serif;

  /* Layout */
  --maxw: 1280px;
  --gutter: clamp(1.25rem, 4vw, 4rem);
  --radius: 24px;
  --radius-sm: 16px;

  /* Motion */
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-soft: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-inout: cubic-bezier(0.65, 0.05, 0.36, 1);
}

/* ---------- Reset ---------- */
*,
*::before,
*::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  overflow-x: hidden;
}

body {
  font-family: var(--font-fa);
  background: var(--bg);
  color: var(--text);
  line-height: 1.85;
  font-weight: 400;
  overflow-x: clip;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body.no-scroll { overflow: hidden; }

a { color: inherit; text-decoration: none; }
ul { list-style: none; }
img { display: block; max-width: 100%; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }

::selection { background: var(--gold); color: #1a1407; }

/* Ambient page glow + grain */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(60vw 60vw at 85% -10%, rgba(47, 158, 111, 0.10), transparent 60%),
    radial-gradient(50vw 50vw at -10% 110%, rgba(201, 162, 75, 0.08), transparent 55%);
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  opacity: 0.04;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---------- Layout ---------- */
.container {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--gutter);
  position: relative;
  z-index: 3;
}

.section {
  position: relative;
  padding-block: clamp(5rem, 11vw, 9.5rem);
  z-index: 3;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--gold-bright);
}

.eyebrow::before {
  content: "";
  width: 30px;
  height: 1px;
  background: linear-gradient(90deg, var(--gold), transparent);
}

.eyebrow--center { justify-content: center; }

.title {
  font-size: clamp(2rem, 5.2vw, 3.8rem);
  font-weight: 800;
  line-height: 1.28;
  letter-spacing: -0.01em;
  margin-top: 1.1rem;
}

.title .gold {
  background: var(--gold-grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.lead {
  max-width: 56ch;
  margin-top: 1.4rem;
  color: var(--muted);
  font-size: clamp(1rem, 1.5vw, 1.13rem);
}

/* =========================================================
   Reveal / scroll animation utilities (JS toggles .in)
   ========================================================= */
[data-reveal] {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 1s var(--ease), transform 1s var(--ease);
  will-change: transform, opacity;
}
[data-reveal].in { opacity: 1; transform: none; }

[data-reveal="left"] { transform: translateX(50px); }
[data-reveal="right"] { transform: translateX(-50px); }
[data-reveal="scale"] { transform: scale(0.92); }
[data-reveal="left"].in,
[data-reveal="right"].in,
[data-reveal="scale"].in { transform: none; }

[data-delay="1"] { transition-delay: 0.08s; }
[data-delay="2"] { transition-delay: 0.16s; }
[data-delay="3"] { transition-delay: 0.24s; }
[data-delay="4"] { transition-delay: 0.32s; }
[data-delay="5"] { transition-delay: 0.4s; }
[data-delay="6"] { transition-delay: 0.48s; }

/* Word-by-word reveal */
.split .word {
  display: inline-block;
  opacity: 0.12;
  transition: opacity 0.5s var(--ease);
}

/* Clip-reveal images */
.clip-img {
  clip-path: inset(0 0 100% 0);
  transition: clip-path 1.2s var(--ease-soft);
}
.clip-img.in { clip-path: inset(0 0 0 0); }

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; }
  [data-reveal], .clip-img { opacity: 1 !important; transform: none !important; clip-path: none !important; transition: none !important; }
  .split .word { opacity: 1 !important; }
  .ptag, .ibadge, .ibadge .ic, .preloader__bar::after, .wcard__live i { animation: none !important; }
  .wcard:hover { transform: none !important; }
  .wcard:hover .wcard__shot img { transform: none !important; }
  .ibadge .ic:nth-child(1) { opacity: 1 !important; }
}

/* =========================================================
   Buttons
   ========================================================= */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  font-weight: 600;
  font-size: 0.98rem;
  padding: 0.9rem 1.8rem;
  border-radius: 100px;
  position: relative;
  overflow: hidden;
  transition: transform 0.5s var(--ease), box-shadow 0.5s var(--ease),
    color 0.4s ease, background 0.4s ease, border-color 0.4s ease;
  isolation: isolate;
}

.btn svg { transition: transform 0.5s var(--ease); }

.btn--gold {
  background: var(--gold-grad);
  color: #1c1606;
  box-shadow: 0 16px 36px -18px rgba(201, 162, 75, 0.7);
}
.btn--gold:hover { transform: translateY(-3px); box-shadow: 0 26px 50px -20px rgba(201, 162, 75, 0.85); }
.btn--gold:hover svg { transform: translateX(-5px); }

.btn--ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--line-strong);
}
.btn--ghost:hover { border-color: var(--gold); color: var(--gold-bright); transform: translateY(-3px); }

.btn--solid {
  background: var(--surface-2);
  color: var(--text);
  border: 1px solid var(--line);
}
.btn--solid:hover { background: var(--emerald-deep); border-color: var(--emerald); transform: translateY(-3px); }

/* =========================================================
   Scroll progress bar + custom cursor
   ========================================================= */
.progress {
  position: fixed;
  inset-block-start: 0;
  inset-inline: 0;
  height: 3px;
  z-index: 200;
  background: var(--gold-grad);
  transform: scaleX(0);
  transform-origin: right;
  will-change: transform;
}

.cursor,
.cursor-dot {
  position: fixed;
  top: 0;
  left: 0;
  border-radius: 50%;
  pointer-events: none;
  z-index: 999;
  mix-blend-mode: difference;
  translate: -50% -50%;
}
.cursor {
  width: 38px;
  height: 38px;
  border: 1px solid rgba(243, 239, 228, 0.6);
  transition: width 0.3s var(--ease), height 0.3s var(--ease),
    background 0.3s ease, border-color 0.3s ease;
}
.cursor-dot {
  width: 6px;
  height: 6px;
  background: var(--gold-bright);
}
.cursor.grow { width: 70px; height: 70px; background: rgba(243, 239, 228, 0.1); border-color: transparent; }

@media (hover: none), (pointer: coarse) {
  .cursor, .cursor-dot { display: none; }
}

/* =========================================================
   Preloader
   ========================================================= */
.preloader {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  background: var(--bg);
  transition: opacity 0.8s var(--ease), visibility 0.8s;
}
.preloader.done { opacity: 0; visibility: hidden; }

.preloader__inner { text-align: center; overflow: hidden; }

.preloader__name {
  font-size: clamp(1.8rem, 6vw, 3rem);
  font-weight: 800;
  display: flex;
  gap: 0.06em;
  justify-content: center;
}
.preloader__name span {
  display: inline-block;
  transform: translateY(110%);
  animation: pl-rise 0.7s var(--ease) forwards;
}
.preloader__bar {
  margin: 1.4rem auto 0;
  width: 160px;
  height: 2px;
  background: var(--line);
  overflow: hidden;
  border-radius: 2px;
}
.preloader__bar::after {
  content: "";
  display: block;
  height: 100%;
  background: var(--gold-grad);
  transform: translateX(-100%);
  animation: pl-load 1.3s var(--ease) forwards;
}
@keyframes pl-rise { to { transform: none; } }
@keyframes pl-load { to { transform: translateX(0); } }

/* =========================================================
   Navbar
   ========================================================= */
.nav {
  position: fixed;
  inset-block-start: 0;
  inset-inline: 0;
  z-index: 150;
  transition: transform 0.55s var(--ease), background 0.4s ease,
    backdrop-filter 0.4s ease, padding 0.4s ease, box-shadow 0.4s ease;
}
.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding-block: 1.5rem;
}
.nav.scrolled {
  background: rgba(8, 11, 10, 0.7);
  backdrop-filter: saturate(160%) blur(20px);
  -webkit-backdrop-filter: saturate(160%) blur(20px);
  box-shadow: 0 1px 0 var(--line);
}
.nav.scrolled .nav__inner { padding-block: 0.9rem; }
.nav.hide { transform: translateY(-115%); }

.brand {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  font-weight: 800;
  font-size: 1.1rem;
  color: var(--text);
}
.brand__mark {
  width: auto;
  height: 30px;
  object-fit: contain;
  filter: drop-shadow(0 4px 10px rgba(0,0,0,0.4));
}

.nav__menu { display: flex; align-items: center; gap: 2.1rem; }
.nav__link {
  position: relative;
  font-size: 0.97rem;
  font-weight: 500;
  color: var(--text-soft);
  padding-block: 0.2rem;
  transition: color 0.3s ease;
}
.nav__link::after {
  content: "";
  position: absolute;
  inset-inline: 0;
  bottom: -3px;
  height: 1.5px;
  background: var(--gold);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.4s var(--ease);
}
.nav__link:hover, .nav__link.active { color: var(--gold-bright); }
.nav__link:hover::after, .nav__link.active::after { transform: scaleX(1); }

.nav__toggle {
  display: none;
  width: 46px; height: 46px;
  border-radius: 12px;
  border: 1px solid var(--line-strong);
  position: relative;
}
.nav__toggle span {
  position: absolute; inset-inline: 12px; height: 2px;
  background: var(--text); transition: transform 0.35s var(--ease), opacity 0.25s ease;
}
.nav__toggle span:nth-child(1) { top: 17px; }
.nav__toggle span:nth-child(2) { top: 23px; }
.nav__toggle span:nth-child(3) { top: 29px; }
.nav__toggle.open span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.nav__toggle.open span:nth-child(2) { opacity: 0; }
.nav__toggle.open span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* =========================================================
   Hero
   ========================================================= */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: center;
  padding-top: 7rem;
  overflow: clip;
}

.hero__halo {
  position: absolute;
  inset-inline-start: 50%;
  inset-block-start: 42%;
  width: min(80vw, 720px);
  aspect-ratio: 1;
  translate: -50% -50%;
  background: radial-gradient(circle, var(--emerald-glow), transparent 62%);
  filter: blur(10px);
  z-index: 0;
}

.hero__grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  align-items: center;
  gap: clamp(2rem, 5vw, 4.5rem);
  width: 100%;
}

.hero__eyebrow { margin-bottom: 1.7rem; }

.hero__name {
  font-size: clamp(3rem, 11vw, 8rem);
  font-weight: 900;
  line-height: 0.98;
  letter-spacing: -0.03em;
}
.hero__name .l2 {
  background: var(--gold-grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero__roles {
  margin-top: 1.8rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem 0.9rem;
  align-items: center;
}
.hero__role-chip {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-soft);
  padding: 0.4rem 1rem;
  border: 1px solid var(--line);
  border-radius: 100px;
  background: rgba(255,255,255,0.02);
}
.hero__role-chip.is-accent { color: var(--gold-bright); border-color: rgba(201,162,75,0.35); }

.hero__desc {
  margin-top: 1.8rem;
  color: var(--muted);
  max-width: 46ch;
  font-size: 1.06rem;
}

.hero__actions { margin-top: 2.4rem; display: flex; flex-wrap: wrap; gap: 1rem; }

/* Hero portrait — refined, prestigious, calm */
.hero__visual {
  position: relative;
  justify-self: center;
  perspective: 1300px;
}
.portrait {
  position: relative;
  width: clamp(270px, 32vw, 400px);
  font-size: 0;
  line-height: 0;
  transform-style: preserve-3d;
  will-change: transform;
}

/* Soft static glow */
.portrait__glow {
  position: absolute;
  inset: -14% -10% -8%;
  z-index: 0;
  background: radial-gradient(closest-side, var(--emerald-glow), transparent 75%);
  filter: blur(28px);
  opacity: 0.7;
}

.portrait__frame {
  position: relative;
  z-index: 1;
  aspect-ratio: 0.82;
  border-radius: 12px;
  overflow: hidden;
  background: var(--emerald-deep);
  box-shadow: 0 50px 90px -38px rgba(0,0,0,0.8);
  outline: 1px solid var(--line);
}
.portrait__frame img {
  width: 100%; height: 100%; object-fit: cover; object-position: center 12%;
  transition: transform 1.4s var(--ease);
}
.portrait:hover .portrait__frame img { transform: scale(1.04); }
.portrait__frame::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 60%, rgba(8,11,10,0.45));
}

/* Inset matte frame line */
.portrait::before {
  content: "";
  position: absolute;
  inset: -14px;
  border: 1px solid rgba(201,162,75,0.25);
  border-radius: 16px;
  z-index: 1;
  pointer-events: none;
}

/* Corner brackets — pinned onto the matte frame line (inset:-14px) so all four align */
.portrait__corner {
  position: absolute;
  width: 26px; height: 26px;
  border: 1.5px solid rgba(201,162,75,0.7);
  z-index: 3;
  pointer-events: none;
}
.portrait__corner--tl { top: -14px; left: -14px; border-right: 0; border-bottom: 0; border-top-left-radius: 16px; }
.portrait__corner--tr { top: -14px; right: -14px; border-left: 0; border-bottom: 0; border-top-right-radius: 16px; }
.portrait__corner--bl { bottom: -14px; left: -14px; border-right: 0; border-top: 0; border-bottom-left-radius: 16px; }
.portrait__corner--br { bottom: -14px; right: -14px; border-left: 0; border-top: 0; border-bottom-right-radius: 16px; }

/* Floating text labels */
.ptag {
  position: absolute;
  z-index: 5;
  line-height: 1.3;
  background: rgba(15, 21, 17, 0.82);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  padding: 0.7rem 1.1rem;
  box-shadow: 0 22px 46px -26px rgba(0,0,0,0.85);
}
/* top label → right */
.ptag--tr {
  top: 8%;
  right: -6%;
  transform: translateZ(60px);
  animation: floaty 7s ease-in-out infinite;
}
/* bottom label → left */
.ptag--bl {
  bottom: 7%;
  left: -6%;
  transform: translateZ(60px);
  white-space: nowrap;
  animation: floaty 8s ease-in-out infinite reverse;
}
.ptag__big { font-size: 1.4rem; font-weight: 800; color: var(--gold-bright); line-height: 1; }
.ptag__sm { font-size: 0.78rem; color: var(--muted); margin-top: 0.25rem; }
.ptag__name { font-weight: 700; font-size: 1rem; }
.ptag__role {
  font-family: var(--font-en); font-size: 0.95rem;
  letter-spacing: 0.12em; color: var(--gold-bright); margin-top: 0.1rem;
}
@keyframes floaty {
  0%, 100% { transform: translateZ(60px) translateY(0); }
  50% { transform: translateZ(60px) translateY(-7px); }
}

/* Animated related tech icon badges */
.ibadge {
  position: absolute;
  z-index: 4;
  width: 54px; height: 54px;
  border-radius: 16px;
  background: rgba(15, 21, 17, 0.82);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(201,162,75,0.35);
  box-shadow: 0 20px 44px -24px rgba(0,0,0,0.85);
  color: var(--gold-bright);
}
.ibadge--tl { top: 15%; left: -7%; transform: translateZ(40px); animation: floaty2 6.5s ease-in-out infinite; }
.ibadge--br { bottom: 18%; right: -7%; transform: translateZ(40px); animation: floaty2 7.5s ease-in-out infinite reverse; }
@keyframes floaty2 {
  0%, 100% { transform: translateZ(40px) translateY(0); }
  50% { transform: translateZ(40px) translateY(-9px); }
}
.ibadge .ic {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  opacity: 0;
  animation: iconSwap 6s ease-in-out infinite;
}
.ibadge .ic svg { width: 26px; height: 26px; }
.ibadge .ic:nth-child(1) { animation-delay: 0s; }
.ibadge .ic:nth-child(2) { animation-delay: 2s; }
.ibadge .ic:nth-child(3) { animation-delay: 4s; }
@keyframes iconSwap {
  0%   { opacity: 0; transform: translateY(8px) scale(0.85) rotate(-6deg); }
  6%   { opacity: 1; transform: translateY(0) scale(1) rotate(0); }
  28%  { opacity: 1; transform: translateY(0) scale(1) rotate(0); }
  34%  { opacity: 0; transform: translateY(-8px) scale(0.85) rotate(6deg); }
  100% { opacity: 0; transform: translateY(-8px) scale(0.85); }
}

.hero__scroll {
  position: absolute;
  inset-block-end: 1.8rem;
  left: 50%;
  translate: -50% 0;
  display: flex; flex-direction: column; align-items: center; gap: 0.5rem;
  color: var(--muted-2); font-size: 0.74rem;
}
.hero__scroll .mouse {
  width: 22px; height: 36px; border: 1.5px solid var(--muted-2); border-radius: 14px; position: relative;
}
.hero__scroll .mouse::after {
  content: ""; position: absolute; left: 50%; top: 7px; width: 3px; height: 7px;
  background: var(--gold-bright); border-radius: 3px; translate: -50% 0;
  animation: wheel 1.6s var(--ease) infinite;
}
@keyframes wheel { 0% { opacity: 0; translate: -50% 0; } 40% { opacity: 1; } 100% { opacity: 0; translate: -50% 10px; } }

/* =========================================================
   Trust / credentials marquee
   ========================================================= */
.trust {
  border-block: 1px solid var(--line);
  padding-block: 2.2rem;
  background: linear-gradient(180deg, rgba(255,255,255,0.015), transparent);
}
.trust__label {
  text-align: center;
  font-size: 0.82rem;
  color: var(--muted-2);
  margin-bottom: 1.6rem;
  letter-spacing: 0.04em;
}
.trust__row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: clamp(1rem, 4vw, 3.5rem);
}
.trust__item {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  opacity: 0.85;
  transition: opacity 0.4s ease, transform 0.4s var(--ease);
}
.trust__item:hover { opacity: 1; transform: translateY(-4px); }
.trust__logo {
  width: 56px; height: 56px;
  display: grid; place-items: center;
  background: #ffffff;
  border-radius: 14px;
  padding: 8px;
  box-shadow: 0 14px 30px -18px rgba(0,0,0,0.8);
}
.trust__logo img { max-width: 100%; max-height: 100%; object-fit: contain; }
.trust__txt b { font-size: 0.95rem; font-weight: 700; display: block; }
.trust__txt span { font-size: 0.8rem; color: var(--muted); }

/* =========================================================
   About — sticky portrait + scroll narrative
   ========================================================= */
.about__grid {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: clamp(2rem, 6vw, 5rem);
  align-items: start;
}
.about__sticky { position: sticky; top: 12vh; }
.about__media {
  position: relative;
  isolation: isolate;
  border-radius: var(--radius);
  overflow: hidden;
  aspect-ratio: 0.82;
  box-shadow: 0 50px 90px -40px rgba(0,0,0,0.8);
}
.about__media img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 1.2s var(--ease);
  filter: grayscale(0.4) contrast(1.03) brightness(0.95);
}
.about__media::before {
  content: "";
  position: absolute; inset: 0; z-index: 1;
  background: var(--emerald-deep);
  mix-blend-mode: color;
  opacity: 0.3;
  pointer-events: none;
}
.about__media::after {
  content: "";
  position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(180deg, transparent 45%, rgba(8,11,10,0.75));
}
.about__media:hover img { transform: scale(1.05); }
.about__sign {
  position: absolute;
  inset-block-end: 1.4rem;
  inset-inline-start: 1.4rem;
  z-index: 2;
  background: rgba(243, 239, 228, 0.92);
  border-radius: 14px;
  padding: 0.7rem 0.9rem;
  box-shadow: 0 18px 40px -22px rgba(0, 0, 0, 0.8);
}
.about__sign img { width: clamp(110px, 15vw, 160px); display: block; }

.about__body .title { margin-top: 1.1rem; }
.about__story {
  margin-top: 1.6rem;
  font-size: clamp(1.15rem, 2.4vw, 1.6rem);
  font-weight: 500;
  line-height: 1.9;
  color: var(--text);
}
.about__more { margin-top: 1.4rem; color: var(--muted); font-size: 1.05rem; }
.about__more b { color: var(--text); font-weight: 700; }

.about__facts {
  margin-top: 2.4rem;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  overflow: hidden;
}
.about__fact { background: var(--bg); padding: 1.4rem 1.5rem; }
.about__fact .k { font-size: 0.82rem; color: var(--gold-bright); }
.about__fact .v { margin-top: 0.3rem; font-weight: 600; color: var(--text); }

/* =========================================================
   Stats
   ========================================================= */
.stats { border-block: 1px solid var(--line); }
.stats__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}
.stat {
  background: var(--bg);
  padding: clamp(2rem, 4vw, 3rem) 1.5rem;
  text-align: center;
  position: relative;
  transition: background 0.4s ease;
}
.stat:hover { background: var(--surface); }
.stat .num {
  font-size: clamp(2.6rem, 6vw, 4.2rem);
  font-weight: 900;
  line-height: 1;
  background: var(--gold-grad);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.stat .num .suffix { font-size: 0.5em; }
.stat .label { margin-top: 0.8rem; color: var(--muted); font-size: 0.98rem; }

/* =========================================================
   Services / Expertise — image cards
   ========================================================= */
.svc__head {
  display: flex; justify-content: space-between; align-items: flex-end;
  flex-wrap: wrap; gap: 1.5rem; margin-bottom: 3.5rem;
}
.svc__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.4rem; }
.svc {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  min-height: 440px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 2rem;
  border: 1px solid var(--line);
  isolation: isolate;
  transition: transform 0.6s var(--ease), border-color 0.4s ease;
}
.svc__bg {
  position: absolute; inset: 0; z-index: -2;
}
.svc__bg img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 1.1s var(--ease);
  filter: grayscale(0.85) contrast(1.05) brightness(0.82);
}
/* Emerald duotone tint keeps varied photos on-theme */
.svc__bg::after {
  content: ""; position: absolute; inset: 0;
  background: var(--emerald-deep);
  mix-blend-mode: color;
  opacity: 0.5;
}
.svc::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(180deg, rgba(8,11,10,0.15) 0%, rgba(8,11,10,0.55) 55%, rgba(8,11,10,0.94) 100%);
  transition: background 0.5s ease;
}
.svc:hover { transform: translateY(-10px); border-color: rgba(201,162,75,0.4); }
.svc:hover .svc__bg img { transform: scale(1.08); }
.svc__num {
  position: absolute; top: 1.6rem; inset-inline-end: 1.8rem;
  font-family: var(--font-en); font-size: 1.2rem; color: var(--gold-bright); letter-spacing: 0.1em;
}
.svc__icon {
  width: 54px; height: 54px; border-radius: 16px;
  background: rgba(201,162,75,0.14); border: 1px solid rgba(201,162,75,0.3);
  display: grid; place-items: center; color: var(--gold-bright); margin-bottom: 1.2rem;
}
.svc__icon svg { width: 26px; height: 26px; }
.svc h3 { font-size: 1.5rem; font-weight: 800; }
.svc p { margin-top: 0.7rem; color: var(--text-soft); font-size: 0.98rem; max-height: 0; opacity: 0; overflow: hidden; transition: max-height 0.5s var(--ease), opacity 0.5s ease, margin 0.5s ease; }
.svc:hover p { max-height: 120px; opacity: 1; }

/* Why-me value band */
.why {
  margin-top: 1.4rem;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}
.why__item {
  background: var(--bg);
  padding: 2rem 1.8rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  transition: background 0.4s ease;
}
.why__item:hover { background: var(--surface); }
.why__k { font-family: var(--font-en); font-size: 1.1rem; color: var(--gold-bright); letter-spacing: 0.08em; }
.why__item b { font-size: 1.2rem; font-weight: 700; }
.why__item span { color: var(--muted); font-size: 0.97rem; }
@media (max-width: 760px) { .why { grid-template-columns: 1fr; } }

/* =========================================================
   Statement band — cinematic full-bleed
   ========================================================= */
.band {
  position: relative;
  isolation: isolate;
  overflow: clip;
  padding-block: clamp(5rem, 12vw, 9rem);
  border-block: 1px solid var(--line);
}
.band__bg { position: absolute; inset: 0; z-index: -2; }
.band__bg img {
  width: 100%; height: 100%; object-fit: cover; object-position: center 35%;
  filter: grayscale(0.85) contrast(1.05) brightness(0.6);
}
.band__bg::after {
  content: ""; position: absolute; inset: 0;
  background: var(--emerald-deep);
  mix-blend-mode: color;
  opacity: 0.55;
}
.band::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(to left, rgba(8,11,10,0.92) 0%, rgba(8,11,10,0.6) 55%, rgba(8,11,10,0.3) 100%),
    linear-gradient(0deg, rgba(8,11,10,0.85), transparent 60%);
}
.band__inner { max-width: 760px; }
.band__quote {
  margin-top: 1.2rem;
  font-family: var(--font-display, inherit);
  font-size: clamp(1.8rem, 4.6vw, 3.4rem);
  font-weight: 800;
  line-height: 1.45;
  letter-spacing: -0.01em;
}
.band__sub {
  margin-top: 1.5rem;
  color: var(--muted);
  font-size: clamp(1rem, 2.2vw, 1.2rem);
  max-width: 52ch;
}

/* =========================================================
   Work — live website preview grid
   ========================================================= */
.work { position: relative; background: var(--bg-2); border-block: 1px solid var(--line); overflow: clip; }
.work::before {
  content: ""; position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background:
    radial-gradient(46vw 32vw at 50% 4%, rgba(47,158,111,0.12), transparent 62%),
    radial-gradient(40vw 30vw at 88% 96%, rgba(201,162,75,0.08), transparent 60%);
}
.work__head { position: relative; z-index: 1; text-align: center; max-width: 680px; margin-inline: auto; margin-bottom: clamp(2.5rem, 5vw, 4rem); }
.work__head .lead { margin-inline: auto; }
.work__grid { position: relative; z-index: 1; }

.work__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: clamp(1.1rem, 2.4vw, 1.8rem);
}
.wcard--lead { grid-column: 1 / -1; }

.wcard {
  display: flex; flex-direction: column;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: linear-gradient(165deg, var(--surface), var(--bg));
  overflow: hidden;
  transition: transform 0.5s var(--ease), border-color 0.4s ease, box-shadow 0.5s var(--ease);
  will-change: transform;
}
.wcard:hover {
  transform: translateY(-6px);
  border-color: rgba(201,162,75,0.45);
  box-shadow: 0 44px 80px -44px rgba(0,0,0,0.9);
}

/* Browser chrome bar */
.wcard__frame { position: relative; }
.wcard__bar {
  display: flex; align-items: center; gap: 0.7rem;
  padding: 0.62rem 0.9rem;
  background: rgba(8,11,10,0.9);
  border-bottom: 1px solid var(--line);
}
.wcard__dots { display: inline-flex; gap: 5px; flex: 0 0 auto; }
.wcard__dots i { width: 9px; height: 9px; border-radius: 50%; }
.wcard__dots i:nth-child(1){ background: rgba(232,108,96,0.7); }
.wcard__dots i:nth-child(2){ background: rgba(232,191,96,0.7); }
.wcard__dots i:nth-child(3){ background: rgba(96,200,140,0.7); }
.wcard__addr {
  flex: 1 1 auto; min-width: 0;
  display: inline-flex; align-items: center; gap: 0.45rem;
  font-family: var(--font-en); font-size: 0.94rem; letter-spacing: 0.01em;
  color: var(--text-soft);
  background: rgba(243,239,228,0.05);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.26rem 0.85rem;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  direction: ltr; justify-content: center;
}
.wcard__addr svg { width: 13px; height: 13px; color: var(--emerald-bright); flex: 0 0 auto; }
.wcard__live {
  flex: 0 0 auto;
  display: inline-flex; align-items: center; gap: 0.4rem;
  font-size: 0.74rem; font-weight: 700; color: var(--emerald-bright);
}
.wcard__live i {
  width: 7px; height: 7px; border-radius: 50%; background: var(--emerald-bright);
  animation: livePulse 2s ease-out infinite;
}
@keyframes livePulse {
  0%   { box-shadow: 0 0 0 0 rgba(63,189,135,0.55); }
  70%  { box-shadow: 0 0 0 7px rgba(63,189,135,0); }
  100% { box-shadow: 0 0 0 0 rgba(63,189,135,0); }
}

/* Screenshot — real colors of each live site */
.wcard__shot { position: relative; aspect-ratio: 1200 / 800; overflow: hidden; background: var(--surface-2); }
.wcard__shot img {
  width: 100%; height: 100%; object-fit: cover; object-position: top center;
  transition: transform 6s linear;
}
.wcard:hover .wcard__shot img { transform: scale(1.06); }
.wcard__shot::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(180deg, transparent 72%, rgba(8,11,10,0.4));
}
.wcard--lead .wcard__shot { aspect-ratio: 1200 / 600; }

/* Client badge (corner) */
.wcard__badge {
  position: absolute; top: 12px; right: 12px; z-index: 2;
  display: inline-flex; align-items: center; gap: 0.4rem;
  font-size: 0.76rem; font-weight: 700;
  padding: 0.34rem 0.72rem; border-radius: 999px;
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  border: 1px solid transparent;
  box-shadow: 0 10px 24px -14px rgba(0,0,0,0.8);
}
.wcard__badge svg { width: 13px; height: 13px; }
.wcard__badge--ir   { color: #8fe7bd; background: rgba(12,53,38,0.78); border-color: rgba(63,189,135,0.5); }
.wcard__badge--intl { color: var(--gold-bright); background: rgba(43,32,9,0.78); border-color: rgba(201,162,75,0.5); }
.wcard__badge--home { color: #14100a; background: var(--gold-grad); font-weight: 800; }

/* Visit arrow */
.wcard__visit {
  position: absolute; bottom: 12px; left: 12px; z-index: 2;
  width: 42px; height: 42px; border-radius: 50%;
  display: grid; place-items: center;
  background: rgba(8,11,10,0.72); color: var(--gold-bright);
  border: 1px solid var(--line-strong);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  opacity: 0; transform: translateY(8px) scale(0.9);
  transition: opacity 0.4s var(--ease), transform 0.4s var(--ease), background 0.3s ease, color 0.3s ease;
}
.wcard__visit svg { width: 18px; height: 18px; }
.wcard:hover .wcard__visit { opacity: 1; transform: translateY(0) scale(1); }
.wcard:hover .wcard__visit { background: var(--gold); color: #14100a; }

/* Body */
.wcard__body { padding: 1.15rem 1.3rem 1.35rem; }
.wcard__body h3 { font-size: clamp(1.1rem, 2vw, 1.35rem); font-weight: 800; }
.wcard__body p { margin-top: 0.35rem; color: var(--muted); font-size: 0.93rem; line-height: 1.7; }
.wcard--lead { border-color: rgba(47,158,111,0.32); background: linear-gradient(165deg, var(--emerald-deep), var(--bg)); }
.wcard--lead .wcard__body { padding: 1.4rem 1.6rem 1.6rem; }
.wcard--lead .wcard__body h3 { font-size: clamp(1.4rem, 3vw, 2rem); }
.wcard--lead .wcard__body p { font-size: 1rem; }

/* =========================================================
   Journey timeline
   ========================================================= */
.timeline { position: relative; margin-top: 3.5rem; max-width: 820px; margin-inline: auto; }
.timeline::before {
  content: ""; position: absolute; inset-inline-end: 11px; top: 6px; bottom: 6px;
  width: 2px; background: linear-gradient(180deg, var(--gold), transparent);
}
.tl {
  position: relative; padding-inline-end: 3rem; padding-bottom: 2.6rem;
}
.tl:last-child { padding-bottom: 0; }
.tl__dot {
  position: absolute; inset-inline-end: 4px; top: 6px;
  width: 18px; height: 18px; border-radius: 50%;
  background: var(--bg); border: 2px solid var(--gold);
}
.tl__dot::after {
  content: ""; position: absolute; inset: 3px; border-radius: 50%; background: var(--gold-bright);
  transform: scale(0); transition: transform 0.5s var(--ease);
}
.tl.in .tl__dot::after { transform: scale(1); }
.tl__year { font-family: var(--font-en); font-size: 1.3rem; color: var(--gold-bright); font-weight: 600; }
.tl__title { font-size: 1.25rem; font-weight: 700; margin-top: 0.2rem; }
.tl__text { margin-top: 0.5rem; color: var(--muted); }

/* =========================================================
   Credentials grid (real logos)
   ========================================================= */
.creds__grid { margin-top: 3.5rem; display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.4rem; }
.cred {
  text-align: center;
  padding: 2.4rem 1.5rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  transition: transform 0.5s var(--ease), border-color 0.4s ease, background 0.4s ease;
}
.cred:hover { transform: translateY(-8px); border-color: rgba(201,162,75,0.4); background: var(--surface-2); }
.cred__logo {
  width: 92px; height: 92px; margin: 0 auto 1.3rem;
  background: #fff; border-radius: 20px; padding: 14px;
  display: grid; place-items: center;
  box-shadow: 0 20px 40px -22px rgba(0,0,0,0.9);
}
.cred__logo img { max-width: 100%; max-height: 100%; object-fit: contain; }
.cred h3 { font-size: 1.05rem; font-weight: 700; }
.cred p { margin-top: 0.4rem; font-size: 0.88rem; color: var(--muted); }

/* =========================================================
   Contact
   ========================================================= */
.contact__card {
  position: relative;
  border: 1px solid var(--line);
  border-radius: clamp(24px, 4vw, 42px);
  background: linear-gradient(160deg, var(--surface), var(--bg));
  padding: clamp(2.2rem, 6vw, 5rem);
  overflow: hidden;
}
.contact__card::before {
  content: "";
  position: absolute; width: 460px; height: 460px;
  inset-inline-end: -140px; inset-block-start: -180px;
  background: radial-gradient(circle, rgba(201,162,75,0.16), transparent 60%);
}
.contact__grid {
  position: relative; display: grid; grid-template-columns: 1.05fr 0.95fr;
  gap: clamp(2rem, 5vw, 4rem); align-items: center;
}
.contact__title { font-size: clamp(1.9rem, 4.6vw, 3rem); font-weight: 800; line-height: 1.3; }
.contact__title .gold { background: var(--gold-grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.contact__lead { margin-top: 1.2rem; color: var(--muted); max-width: 44ch; }
.contact__list { margin-top: 2rem; display: grid; gap: 0.9rem; }
.contact__item {
  display: flex; align-items: center; gap: 1rem; font-size: 1.02rem;
  transition: color 0.3s ease, transform 0.3s var(--ease);
}
.contact__item:hover { color: var(--gold-bright); transform: translateX(-5px); }
.contact__item .ic {
  width: 46px; height: 46px; border-radius: 13px;
  background: rgba(201,162,75,0.12); border: 1px solid rgba(201,162,75,0.25);
  display: grid; place-items: center; color: var(--gold-bright); flex: 0 0 auto;
}
.contact__item .ic svg { width: 20px; height: 20px; }
.contact__item span { unicode-bidi: plaintext; }

.form {
  background: rgba(255,255,255,0.02);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: clamp(1.6rem, 3vw, 2.2rem);
}
.field { margin-bottom: 1.1rem; }
.field label { display: block; font-size: 0.85rem; margin-bottom: 0.5rem; color: var(--text-soft); }
.field input, .field textarea {
  width: 100%;
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  padding: 0.85rem 1rem;
  color: var(--text);
  font-family: inherit; font-size: 0.98rem;
  transition: border-color 0.3s ease, background 0.3s ease;
}
.field input::placeholder, .field textarea::placeholder { color: var(--muted-2); }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--gold); background: rgba(255,255,255,0.05); }
.field textarea { resize: vertical; min-height: 110px; }
.form .btn { width: 100%; margin-top: 0.3rem; }
.form__msg { margin-top: 1rem; font-size: 0.9rem; color: var(--gold-bright); display: none; }

/* =========================================================
   Footer
   ========================================================= */
.footer { border-top: 1px solid var(--line); padding-block: 3.5rem 2rem; }
.footer__top {
  display: flex; justify-content: space-between; align-items: center;
  gap: 2rem; flex-wrap: wrap; padding-bottom: 2.2rem; border-bottom: 1px solid var(--line);
}
.footer__brand { display: flex; align-items: center; gap: 0.8rem; font-weight: 800; font-size: 1.15rem; }
.footer__brand img { width: 40px; height: 40px; object-fit: contain; }
.footer__socials { display: flex; gap: 0.7rem; }
.footer__socials a {
  width: 46px; height: 46px; border-radius: 13px; border: 1px solid var(--line-strong);
  display: grid; place-items: center; color: var(--text-soft);
  transition: transform 0.4s var(--ease), background 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}
.footer__socials a:hover { transform: translateY(-4px); background: var(--gold-grad); color: #1c1606; border-color: transparent; }
.footer__socials svg { width: 19px; height: 19px; }
.footer__bottom {
  margin-top: 1.8rem; display: flex; justify-content: space-between; align-items: center;
  gap: 1rem; flex-wrap: wrap; font-size: 0.85rem; color: var(--muted);
}

/* Back to top */
.to-top {
  position: fixed; inset-block-end: 1.6rem; inset-inline-start: 1.6rem; z-index: 120;
  width: 50px; height: 50px; border-radius: 50%;
  background: var(--surface-2); border: 1px solid var(--line-strong); color: var(--text);
  display: grid; place-items: center;
  opacity: 0; visibility: hidden; transform: translateY(20px);
  transition: opacity 0.4s ease, transform 0.4s var(--ease), visibility 0.4s, background 0.3s ease;
}
.to-top.show { opacity: 1; visibility: visible; transform: none; }
.to-top:hover { background: var(--emerald-deep); border-color: var(--emerald); }

/* =========================================================
   Responsive
   ========================================================= */
@media (max-width: 1024px) {
  .hero__grid { grid-template-columns: 1fr 0.8fr; }
  .svc__grid { grid-template-columns: 1fr 1fr; }
  .creds__grid { grid-template-columns: 1fr 1fr; }
  .stats__grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 860px) {
  .nav__toggle { display: block; }
  .nav__menu {
    position: fixed; top: 0; right: 0;
    height: 100svh; width: min(82vw, 340px);
    flex-direction: column; align-items: flex-start; justify-content: center;
    gap: 1.6rem; background: var(--bg-2); padding: 3rem 2.4rem;
    border-inline-start: 1px solid var(--line);
    box-shadow: -30px 0 80px -40px rgba(0,0,0,0.9);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.4s var(--ease), visibility 0.4s;
  }
  .nav__menu.open { opacity: 1; visibility: visible; pointer-events: auto; }
  .nav__menu .nav__link { font-size: 1.35rem; }
  .nav__menu .btn { margin-top: 0.6rem; }

  .hero { padding-top: 6rem; min-height: auto; padding-bottom: 3rem; }
  .hero__grid { grid-template-columns: 1fr; gap: 2.5rem; justify-items: center; text-align: center; }
  .hero__content { order: 2; }
  .hero__visual { order: 1; margin-bottom: 0.5rem; perspective: none; }
  .portrait { width: clamp(240px, 70vw, 320px); }
  .hero__scroll { display: none; }
  .hero__roles, .hero__actions { justify-content: center; }
  .hero__desc { margin-inline: auto; }

  /* Mobile-safe floating labels & icons (inside the frame, no overflow) */
  .ptag { animation: none; transform: none; padding: 0.5rem 0.85rem; border-radius: 12px; }
  .ptag--tr { top: 10px; right: 10px; left: auto; bottom: auto; }
  .ptag--bl { bottom: 10px; left: 10px; right: auto; top: auto; }
  .ptag__big { font-size: 1.1rem; }
  .ptag__sm { font-size: 0.72rem; }
  .ptag__name { font-size: 0.9rem; }
  .ptag__role { font-size: 0.8rem; }
  .ibadge { width: 44px; height: 44px; transform: none; animation: none; }
  .ibadge .ic svg { width: 22px; height: 22px; }
  .ibadge--tl { top: 10px; left: 10px; right: auto; bottom: auto; }
  .ibadge--br { bottom: 10px; right: 10px; left: auto; top: auto; }

  .about__grid { grid-template-columns: 1fr; }
  .about__sticky { position: static; }
  .about__media { max-width: 460px; margin-inline: auto; }

  /* Work grid -> single column, all previews fully visible */
  .work__grid { grid-template-columns: 1fr; }
  .wcard__shot { aspect-ratio: 1200 / 780; }
  .wcard--lead .wcard__shot { aspect-ratio: 1200 / 720; }
  /* No hover on touch: keep the visit affordance visible */
  .wcard__visit { opacity: 1; transform: none; }

  .contact__grid { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
  .svc__grid { grid-template-columns: 1fr; }
  .creds__grid { grid-template-columns: 1fr; }
  .stats__grid { grid-template-columns: 1fr 1fr; }
  .svc { min-height: 360px; }
  .svc p { max-height: 120px; opacity: 1; }
  .footer__top, .footer__bottom { flex-direction: column; text-align: center; }
  .about__facts { grid-template-columns: 1fr; }
  .stats__grid { grid-template-columns: 1fr 1fr; }
  .ptag__sm { display: none; }
}
