/* Hero correction: the typographic layer stays behind the portrait just as in the supplied reference. */
body {
  background: #070706 url("public/images/home/hero-obsidian-atmosphere-v1.png") center / cover fixed no-repeat;
}

.hero {
  width: 100%;
  max-width: none;
  margin: 0;
  min-height: calc(100vh - var(--header-h));
  background: transparent;
}

.hero::before {
  content: none;
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: .10;
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180' viewBox='0 0 180 180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.72' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.72'/%3E%3C/svg%3E"),
    radial-gradient(ellipse at 50% 38%, rgba(191, 149, 83, .16), transparent 57%);
  background-size: 180px 180px, 100% 100%;
  mix-blend-mode: soft-light;
}

/* Refined framing around the hero: quiet depth, not a flat black canvas. */
.hero::after {
  content: none;
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(0, 0, 0, .61) 0%, rgba(0, 0, 0, .13) 25%, transparent 52%, rgba(0, 0, 0, .12) 76%, rgba(0, 0, 0, .73) 100%),
    linear-gradient(180deg, rgba(0, 0, 0, .26), transparent 22%, transparent 74%, rgba(0, 0, 0, .68));
}

/* Header gets the precise, understated dark-gold treatment of the reference. */
.site-header {
  position: sticky;
  top: 0;
  right: 0;
  left: 0;
  isolation: isolate;
  background: transparent;
  border-bottom: 0;
  box-shadow: none;
  backdrop-filter: none;
}

.site-header::before {
  content: none;
  position: absolute;
  z-index: -1;
  inset: 0;
  pointer-events: none;
  opacity: .42;
  background:
    linear-gradient(90deg, transparent 0%, rgba(206, 153, 58, .06) 24%, transparent 47%, rgba(206, 153, 58, .045) 76%, transparent 100%),
    repeating-linear-gradient(90deg, transparent 0 119px, rgba(255, 229, 172, .016) 120px 121px);
}

.site-header::after {
  content: none;
  position: absolute;
  z-index: -1;
  left: 8%;
  right: 8%;
  bottom: -1px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(207, 151, 55, .34) 20%, rgba(255, 220, 149, .26) 50%, rgba(207, 151, 55, .34) 80%, transparent);
}

.brand span {
  color: #d9a13b;
  text-shadow: 0 0 18px rgba(191, 132, 38, .12);
}

.brand strong {
  color: #f0ede8;
  letter-spacing: .095em;
}

.brand::after {
  content: "";
  width: 1px;
  height: 27px;
  margin-left: 5px;
  background: linear-gradient(180deg, transparent, rgba(215, 164, 70, .58), transparent);
}

.brand img {
  display:block;
  width:128px;
  height:auto;
  filter:drop-shadow(0 0 14px rgba(255,255,255,.06));
  transition:opacity .25s ease,transform .25s ease;
}

.brand:hover img { opacity:.86;transform:translateY(-1px); }
.brand:focus-visible { outline:1px solid #d9a13b;outline-offset:7px; }

.main-nav {
  position: relative;
  min-height: 47px;
  padding: 0 13px;
  border: 1px solid rgba(218, 164, 65, .15);
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(5, 5, 5, .82), rgba(125, 84, 27, .14) 50%, rgba(5, 5, 5, .82));
  box-shadow: inset 0 1px 0 rgba(255, 237, 194, .045), 0 10px 26px rgba(0, 0, 0, .20);
}

.main-nav a {
  color: rgba(240, 238, 233, .82);
  font-size: 11.5px;
  letter-spacing: .005em;
  padding: 5px 0;
  transition: color .22s ease, text-shadow .22s ease;
}

.main-nav a:hover { color: #e1ad4d; }

.main-nav a.is-active {
  color: #e4ab40;
  text-shadow: 0 0 14px rgba(216, 156, 45, .16);
}

.main-nav a.is-active:after { width: 46px; background: linear-gradient(90deg, transparent, #d49b34 25%, #edbd62 50%, #d49b34 75%, transparent); }

.nav-services { position: relative; display: flex; align-items: center; height: 100%; }
.nav-services::after { content: ''; position: absolute; top: 100%; left: 0; right: 0; height: 14px; }
.nav-services__toggle { position: relative; display: inline-flex; align-items: center; gap: 6px; padding: 5px 0; border: 0; background: transparent; color: rgba(240, 238, 233, .82); font: inherit; font-size: 11.5px; font-weight: 600; letter-spacing: .005em; white-space: nowrap; cursor: pointer; transition: color .22s ease, text-shadow .22s ease; }
.nav-services__toggle span { color: #d49b34; font-size: 15px; line-height: 10px; transition: transform .22s ease; }
.nav-services:hover .nav-services__toggle,
.nav-services:focus-within .nav-services__toggle,
.nav-services.has-active .nav-services__toggle,
.nav-services.is-open .nav-services__toggle { color: #e1ad4d; text-shadow: 0 0 14px rgba(216, 156, 45, .16); }
.nav-services.is-open .nav-services__toggle span { transform: rotate(180deg); }
.nav-services__menu { position: absolute; top: calc(100% + 14px); left: 50%; z-index: 40; display: grid; min-width: 210px; padding: 9px; gap: 2px; border: 1px solid rgba(218, 164, 65, .35); border-radius: 12px; background: rgba(7, 6, 5, .98); box-shadow: 0 20px 50px rgba(0, 0, 0, .48); opacity: 0; pointer-events: none; transform: translate(-50%, -6px); transition: opacity .2s ease, transform .2s ease, visibility .2s ease; visibility: hidden; }
.nav-services:hover .nav-services__menu,
.nav-services:focus-within .nav-services__menu,
.nav-services.is-open .nav-services__menu { opacity: 1; pointer-events: auto; transform: translate(-50%, 0); visibility: visible; }
.nav-services.is-hover-suppressed:hover .nav-services__menu,
.nav-services.is-hover-suppressed:focus-within .nav-services__menu { opacity: 0; pointer-events: none; transform: translate(-50%, -6px); visibility: hidden; }
.main-nav .nav-services__menu a { display: block; width: 100%; padding: 9px 11px; font-size: 10px; line-height: 1.3; white-space: nowrap; }
.main-nav .nav-services__menu a.is-active::before,
.main-nav .nav-services__menu a.is-active::after { display: none; }

.menu-button {
  border-color: rgba(218, 163, 58, .9);
  background: radial-gradient(circle at 50% 42%, rgba(170, 119, 33, .10), rgba(0, 0, 0, .04) 64%);
  box-shadow: inset 0 0 0 1px rgba(255, 227, 162, .05), inset 0 0 14px rgba(192, 130, 28, .08), 0 0 18px rgba(191, 132, 38, .06);
  transition: transform .2s ease, background .2s ease;
}

.menu-button:hover { transform: rotate(4deg); background: rgba(195, 137, 37, .13); }

.menu-button i { transition: width .2s ease, border-color .2s ease; }
.menu-button:hover i { width: 22px; border-color: #e6b450; }

/* Cross-page passage: the home scene closes through the portrait and hands off to Hakkımda. */
html.home-to-about-leaving { overflow: hidden; }

html.home-to-about-leaving::before {
  content: "";
  position: fixed;
  z-index: 9998;
  inset: 0;
  pointer-events: none;
  background: #080806 url('public/images/home/hero-obsidian-atmosphere-v1.webp') center / cover no-repeat;
  clip-path: circle(0% at 52% 51%);
  opacity: .08;
  animation: home-to-about-cover .9s cubic-bezier(.65, 0, .35, 1) forwards;
}

html.home-to-about-leaving::after {
  content: "";
  position: fixed;
  z-index: 9999;
  left: 52%;
  top: 51%;
  width: 3px;
  height: 3px;
  pointer-events: none;
  border: 1px solid rgba(232, 183, 82, .9);
  border-radius: 50%;
  transform: translate(-50%, -50%) scale(1);
  animation: home-to-about-ring .9s cubic-bezier(.65, 0, .35, 1) forwards;
}

html.home-to-about-leaving .site-header { animation: home-header-depart .58s ease-in-out forwards; }
html.home-to-about-leaving .hero { animation: home-scene-depart .76s cubic-bezier(.36, .01, .18, 1) forwards; }

@keyframes home-to-about-cover { 0% { clip-path: circle(0% at 52% 51%); opacity:.08; } 48% { opacity:.58; } 100% { clip-path: circle(150% at 52% 51%); opacity:1; } }
@keyframes home-to-about-ring { to { transform: translate(-50%, -50%) scale(1050); opacity: 0; } }
@keyframes home-header-depart { to { opacity: 0; transform: translateY(-14px); } }
@keyframes home-scene-depart { to { opacity: .16; transform: scale(1.035); filter: blur(7px); } }

/* Reverse hand-off when the visitor returns to the homepage. */
html.about-to-home-arriving { overflow: hidden; }
html.about-to-home-arriving::before {
  content: "";
  position: fixed;
  z-index: 9998;
  inset: 0;
  pointer-events: none;
  background: #080806 url('public/images/home/hero-obsidian-atmosphere-v1.webp') center / cover no-repeat;
  clip-path: circle(150% at 52% 51%);
  opacity: 1;
  animation: about-to-home-reveal .9s cubic-bezier(.65, 0, .35, 1) forwards;
}
html.about-to-home-arriving::after {
  content: "";
  position: fixed;
  z-index: 9999;
  left: 52%;
  top: 51%;
  width: 2100px;
  height: 2100px;
  pointer-events: none;
  border: 1px solid rgba(232, 183, 82, .68);
  border-radius: 50%;
  transform: translate(-50%, -50%) scale(1);
  animation: about-to-home-ring .9s cubic-bezier(.65, 0, .35, 1) forwards;
}
html.about-to-home-arriving .site-header { animation: about-to-home-header .7s .12s ease-out both; }
html.about-to-home-arriving .hero { animation: about-to-home-scene .86s .06s cubic-bezier(.22, .8, .28, 1) both; }
@keyframes about-to-home-reveal { 0% { clip-path:circle(150% at 52% 51%); opacity:1; } 52% { opacity:.64; } 100% { clip-path:circle(0% at 52% 51%); opacity:0; } }
@keyframes about-to-home-ring { to { transform: translate(-50%, -50%) scale(.001); opacity: 0; } }
@keyframes about-to-home-header { from { opacity: 0; transform: translateY(-12px); } to { opacity: 1; transform: none; } }
@keyframes about-to-home-scene { from { opacity: .22; transform: scale(1.025); filter: blur(6px); } to { opacity: 1; transform: none; filter: none; } }

@media (min-width: 1181px) {
  .site-header { padding-left: clamp(34px, 2.4vw, 52px); padding-right: clamp(34px, 2.4vw, 52px); }
  .main-nav { gap: clamp(17px, 1.62vw, 30px); }
}

@media (max-width: 820px) {
  .brand::after { display: none; }
  .main-nav { border-radius: 0; box-shadow: none; padding: 22px var(--page-x); }
}

.hero-wordmark {
  z-index: 1;
  left: clamp(78px, 8.5vw, 165px);
  top: 10.5%;
  font-family: Anton, Impact, sans-serif;
  font-weight: 400;
  font-size: clamp(300px, 23.7vw, 470px);
  letter-spacing: -.035em;
  line-height: .77;
  text-shadow: 0 2px 18px rgba(0, 0, 0, .20);
}

.hero-wordmark span:first-child,
.hero-wordmark span:last-child {
  color: transparent;
  background-clip: text;
  -webkit-background-clip: text;
}

.hero-wordmark span:first-child {
  background-image:
    url("public/images/home/hero-wordmark-mineral.webp"),
    linear-gradient(112deg, #9b825e 0%, #b69a70 43%, #c4aa7d 64%, #a58a65 100%);
  background-size: 430px 430px, 100% 100%;
  background-blend-mode: multiply, normal;
}

.hero-wordmark span:last-child {
  background-image:
    url("public/images/home/hero-wordmark-mineral.webp"),
    linear-gradient(118deg, #b5b4ae 0%, #d8d7d0 48%, #c1c0ba 100%);
  background-size: 430px 430px, 100% 100%;
  background-blend-mode: multiply, normal;
}

.hero-portrait {
  z-index: 2;
  left: 50%;
  bottom: -5%;
  width: auto;
  max-width: none;
  height: 105%;
  object-fit: contain;
  object-position: center bottom;
  mix-blend-mode: normal;
  transform: translateX(-50%);
  transform-origin: 50% 100%;
  opacity: 1;
  filter: saturate(.98) contrast(1.02) brightness(.82);
}

.hero-signature {
  position: absolute;
  z-index: 3;
  left: 50%;
  bottom: 19%;
  color: #d9a438;
  font: 58px/1 Allura, cursive;
  letter-spacing: .01em;
  text-shadow: 0 2px 14px rgba(0, 0, 0, .78);
  transform: translateX(-38%) rotate(-5deg);
  pointer-events: none;
}

.hero-topline,
.hero-copy,
.socials,
.scroll-cue,
.hero-year { z-index: 3; }

@media (max-width: 820px) {
  .hero-wordmark { font-family: Anton, Impact, sans-serif; font-size: clamp(82px, 18vw, 150px); }
  .hero-portrait { left: 60%; bottom: 0; width: auto; max-width: none; height: 76%; transform: translateX(-50%) scaleX(1.05); }
  .hero-signature { left: 59%; bottom: 17%; font-size: 38px; }
}

/* Fixed-viewport mobile hero: sized against the available stage, not the
   desktop minimum height. */
@media (max-width: 820px) {
  .site-header {
    height: 68px;
    padding-right: max(18px, env(safe-area-inset-right));
    padding-left: max(18px, env(safe-area-inset-left));
  }

  .brand { gap: 10px; }
  .brand img { width:104px; }
  .brand span { font-size: 36px; }
  .brand strong { font-size: 11px; letter-spacing: .08em; }
  .menu-button { width: 42px; height: 42px; }
  .main-nav {
    position: fixed;
    top: 68px;
    right: 14px;
    left: auto;
    width: min(300px, calc(100vw - 28px));
    max-height: calc(100svh - 82px);
    margin: 0;
    padding: 14px;
    overflow-x: hidden;
    overflow-y: auto;
    align-items: stretch;
    gap: 2px;
    border: 1px solid rgba(218, 164, 65, .35);
    border-radius: 16px;
    background: rgba(7, 6, 5, .97);
    box-shadow: 0 20px 50px rgba(0, 0, 0, .48);
    backdrop-filter: blur(16px);
  }

  .main-nav a {
    width: 100%;
    padding: 9px 11px;
    font-size: 10px;
    line-height: 1.3;
    white-space: normal;
  }

  .nav-services { display: block; width: 100%; height: auto; }
  .nav-services::after { display: none; }
  .nav-services__toggle { width: 100%; justify-content: space-between; padding: 9px 11px; font-size: 10px; text-align: left; }
  .nav-services__menu { position: static; min-width: 0; padding: 0 0 0 12px; border: 0; border-radius: 0; background: transparent; box-shadow: none; opacity: 1; transform: none; visibility: visible; pointer-events: auto; display: none; }
  .nav-services.is-open .nav-services__menu { display: grid; }
  .main-nav .nav-services__menu a { padding: 8px 11px; }

  html.immersive-experience .hero {
    width: 100%;
    height: 100% !important;
    min-height: 0 !important;
    overflow: hidden;
  }

  html.immersive-experience .hero-wordmark {
    left: 14%;
    top: 10%;
    font-size: clamp(70px, 20vw, 108px);
    line-height: .75;
  }

  html.immersive-experience .hero-topline {
    top: 8%;
    left: 24px;
    font-size: 9px;
  }

  html.immersive-experience .hero-portrait {
    left: 58%;
    bottom: -1%;
    width: auto;
    max-width: none;
    height: 72%;
    transform: translateX(-50%);
  }

  html.immersive-experience .hero-signature {
    left: 72%;
    bottom: 17%;
    font-size: clamp(24px, 7vw, 32px);
    transform: translateX(-50%) rotate(-5deg);
  }

  html.immersive-experience .hero-copy {
    left: 24px;
    bottom: 12%;
    width: min(215px, 58vw);
    padding-left: 14px;
  }

  html.immersive-experience .hero-copy p {
    font-size: 12px;
    line-height: 1.55;
  }

  html.immersive-experience .hero-copy .text-link { font-size: 9px; }
  html.immersive-experience .socials { left: 24px; bottom: 2.5%; }
}

@media (max-width: 820px) and (max-height: 700px) {
  .site-header { height: 62px; }
  .brand span { font-size: 32px; }
  .main-nav { top: 62px; max-height: calc(100svh - 76px); }
  html.immersive-experience .hero-wordmark { top: 7%; font-size: clamp(62px, 17vw, 86px); }
  html.immersive-experience .hero-portrait { height: 75%; }
  html.immersive-experience .hero-topline { top: 5%; }
  html.immersive-experience .hero-copy { bottom: 11%; }
  html.immersive-experience .hero-signature { bottom: 16%; }
}

@media (min-width:821px) and (max-width:1100px) {
  .main-nav {
    position:fixed;
    top:88px;
    right:18px;
    left:auto;
    width:min(320px,calc(100vw - 36px));
    max-height:calc(100svh - 106px);
    display:none;
    flex-direction:column;
    align-items:stretch;
    gap:2px;
    margin:0;
    padding:14px;
    overflow-y:auto;
    border:1px solid rgba(218,164,65,.35);
    border-radius:16px;
    background:rgba(7,6,5,.97);
    box-shadow:0 20px 50px rgba(0,0,0,.48);
    backdrop-filter:blur(16px);
  }
  .main-nav.is-open { display:flex; }
  .main-nav a { width:100%;padding:9px 11px;font-size:10px;white-space:normal; }
  .menu-button { margin-left:auto; }
}
