/* Tailwind'in karşılamadığı parçalar: ızgara zemin, "o" noktası, SSS işareti,
   menzil çubukları. Renkler Colors.swift ile aynı. */
:root {
  --accent: #A8BC8F;
  --accent-muted: #5E7049;
  --led: #6BE04A;
}

[hidden] { display: none !important; }
html { scroll-behavior: smooth; }

/* Üst bar: sayfayla birlikte akar, içerik üzerinde sabit kalmaz. */
/* Sayfayla birlikte kaymaz: üstte yapışık kalır, böylece gezinme her an
   erişilebilir olur. Yapışık olduğu için aynı zamanda mobil menü panelinin
   konumlandığı referans kutudur. */
.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  border-bottom: 1px solid rgba(255, 255, 255, .09);
  background: #101010;
}

/* Yapışık başlığın altında kalmasınlar diye bölüm hedefleri başlık kadar
   aşağıdan hizalanır. */
#top,
#how,
#tracking,
#watch,
#features,
#faq,
#download { scroll-margin-top: 84px; }

/* Tek satır: marka solda, gezinme ortada, dil ve eylem butonu sağda.
   Gezinme sekiz sayfada birebir aynıdır; alt sayfalarda bölüm bağlantıları
   index.html#... hedefine gider, böylece hiçbir bağlantı hiçbir sayfada
   kaybolmaz. */
.site-header-inner {
  display: flex;
  align-items: center;
  gap: clamp(1rem, 2.5vw, 2.25rem);
  max-width: 80rem;
  min-height: 68px;
}

.site-menu {
  display: flex;
  flex: 1 1 auto;
  min-width: 0;
}

/* Masaüstünde panel, gezinme ile dili yan yana taşıyan bir satırdır: gezinme
   ortalanır, dil sağa yaslanır. Dar ekranda aynı kutu barın altına düşen
   açılır panele dönüşür.
   display:contents kullanılamaz: Safari <details> içeriğini ::details-content
   adlı bir blok kutuya sarar, çocuklar oraya düşer ve alt alta dizilirdi. */
.site-menu-panel {
  display: flex;
  flex: 1 1 auto;
  flex-wrap: nowrap;
  align-items: center;
  min-width: 0;
}

.site-menu-panel > .site-nav { margin-inline: auto; }

.site-brand,
.site-actions,
.site-nav {
  display: flex;
  align-items: center;
}

.site-brand {
  gap: .65rem;
  flex: 0 0 auto;
  white-space: nowrap;   /* "Ward: Drone Detector" alt satıra kaymasın */
}

.site-nav {
  gap: clamp(.75rem, 1.2vw, 1.25rem);
  min-height: 48px;
  color: #9aa08e;
  font-size: .875rem;
}

.site-nav a { white-space: nowrap; }

.site-nav a[aria-current="page"] { color: #e4e7da; }

/* Mobil aç/kapa düğmesi; masaüstünde gizli. */
.site-menu > summary {
  display: none;
  list-style: none;
}

.site-menu > summary::-webkit-details-marker { display: none; }

/* Kapalı <details> içeriğini motorlar iki farklı yolla gizler: kimi
   ::details-content üzerinde content-visibility ile, kimi doğrudan
   çocukları display:none yaparak. Masaüstünde ikisini de geçersiz kılıyoruz,
   böylece menü JavaScript olmadan her tarayıcıda açık durur. */
@media (min-width: 1280px) {
  .site-menu > .site-menu-panel { display: flex; width: 100%; }
  .site-menu-panel > .site-nav,
  .site-menu-panel > .site-actions { display: flex; }
  .site-menu::details-content {
    content-visibility: visible;
    block-size: auto;
    flex: 1 1 auto;
    min-width: 0;
  }
}

/* Hukuki sayfalarda henüz doldurulmamış alanlar. Yayına almadan önce
   gözden kaçmasın diye kasıtlı olarak dikkat çekici. */
.legal-placeholder {
  display: inline-block;
  border: 1px dashed rgba(255, 152, 0, .55);
  border-radius: .25rem;
  background: rgba(255, 152, 0, .12);
  padding: 0 .35rem;
  color: #FFB74D;
  font-size: .9em;
  font-weight: 600;
  letter-spacing: .01em;
}

/* Ana sayfada bölüm bağlantılarından sonra gelen yasal sayfa grubu. */
.site-nav-legal {
  display: flex;
  align-items: center;
  gap: clamp(.65rem, 1vw, 1rem);
  padding-left: clamp(.75rem, 1.2vw, 1.25rem);
  border-left: 1px solid rgba(255, 255, 255, .12);
}

.site-nav a,
.locale-link {
  transition: color .2s ease;
}

.site-nav a:hover,
.locale-link:not(.locale-current):hover { color: #e4e7da; }

.site-actions {
  flex: 0 0 auto;
  gap: .75rem;
}

.locale-switch {
  display: inline-flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: .125rem;
  padding: .1875rem;
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 999px;
  background: #0b0b0b;
  white-space: nowrap;
}

.locale-link {
  display: inline-flex;
  min-width: 2.25rem;
  min-height: 1.75rem;
  align-items: center;
  justify-content: center;
  gap: .3rem;
  border-radius: 999px;
  padding: 0 .35rem;
  color: #9aa08e;
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .08em;
}

.locale-flag {
  display: block;
  width: 1.5rem;
  height: 1rem;
  border-radius: .125rem;
  object-fit: cover;
  line-height: 1;
}

.locale-current {
  background: #a8bc8f;
  color: #101010;
}

.locale-link:focus-visible {
  outline: 2px solid #c6d9ae;
  outline-offset: 2px;
}

.hero-section {
  border-bottom: 1px solid rgba(255, 255, 255, .04);
  background:
    radial-gradient(circle at 76% 43%, rgba(94, 112, 73, .11), transparent 30%),
    #101010;
}

.hero-layout { isolation: isolate; }

.hero-copy {
  position: relative;
  z-index: 3;
}

.hero-title {
  max-width: 11ch;
  text-wrap: balance;
}

.hero-title-accent {
  display: block;
  margin-top: .08em;
  color: #c6d9ae;
}

.hero-description {
  max-width: 31rem;
  text-wrap: pretty;
}

.store-badge {
  min-width: 150px;
  min-height: 66px;
  justify-content: flex-start;
  background: linear-gradient(180deg, #090a09, #030403);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .06), 0 10px 24px -18px rgba(0, 0, 0, .9);
}

.store-badge:hover {
  transform: translateY(-2px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .08), 0 16px 30px -18px rgba(0, 0, 0, .95);
}

.hero-store-note { color: #777d76; }

.hero-kicker,
.section-kicker {
  color: #a8bc8f;
  font-family: "Space Grotesk", ui-sans-serif, system-ui, sans-serif;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .16em;
}

.hero-kicker { margin-bottom: 1.25rem; }

/* Telefon ve saat yan yana durur: saat telefonun sağında, üstünde değil. */
.hero-devices {
  position: relative;
  display: flex;
  align-items: center;
  gap: clamp(.6rem, 1.6vw, 1.25rem);
  min-height: clamp(240px, 30vw, 380px);
  isolation: isolate;
}

.hero-devices::before {
  content: "";
  position: absolute;
  z-index: 0;
  inset: 1% -8%;
  border-radius: 50%;
  background:
    radial-gradient(circle at 54% 50%, rgba(168, 188, 143, .14), transparent 24%),
    repeating-radial-gradient(circle at 54% 50%, rgba(168, 188, 143, .16) 0 1px, transparent 1px 46px);
  opacity: .5;
  -webkit-mask-image: radial-gradient(circle, #000 0 46%, transparent 72%);
  mask-image: radial-gradient(circle, #000 0 46%, transparent 72%);
  pointer-events: none;
}

.hero-phone-shell {
  position: relative;
  z-index: 1;
  flex: 1 1 auto;
  min-width: 0;
  margin-inline: 0;
  transform: none;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .25),
    inset 0 -1px 0 rgba(255, 255, 255, .08),
    0 0 0 1px #0b0c0b,
    0 34px 72px -30px rgba(0, 0, 0, .95),
    0 0 48px rgba(168, 188, 143, .07);
}

.hero-phone-image {
  display: block;
  width: 100%;
  height: auto;
  border-radius: clamp(1.22rem, 3vw, 2rem);
}

.hero-watch-card {
  position: relative;
  z-index: 20;
  flex: 0 0 auto;
  width: clamp(132px, 25%, 208px);
  filter:
    drop-shadow(0 18px 24px rgba(0, 0, 0, .72))
    drop-shadow(0 0 12px rgba(168, 188, 143, .16));
}


.watch-stage {
  container-type: inline-size;
  background:
    radial-gradient(circle at 50% 38%, rgba(94, 112, 73, .18), transparent 48%),
    #0b0d0c;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .06);
}

.watch-stage-large { box-shadow: inset 0 1px 0 rgba(255, 255, 255, .07), 0 28px 60px -32px rgba(0, 0, 0, .9); }

.hero-watch-stage {
  overflow: visible;
  background: transparent;
  box-shadow: none;
}

.watch-benefit {
  display: grid;
  grid-template-columns: 2.2rem 1fr;
  gap: .75rem;
  align-items: start;
  padding: 1rem;
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: .8rem;
  background: rgba(255, 255, 255, .025);
  font-size: .9rem;
  line-height: 1.5;
}

.watch-benefit > span { color: #a8bc8f; font-family: "Space Grotesk", sans-serif; font-size: .72rem; font-weight: 700; }
.watch-benefit strong { color: #e4e7da; font-weight: 600; }

@media (max-width: 1279px) {
  .site-header-inner { min-height: 60px; }

  /* .site-nav'ın temel display:flex kuralı, tarayıcının kapalı <details>
     içeriğini gizleyen kuralını ezer; mobilde kapalıyken açıkça gizliyoruz. */
  .site-menu:not([open]) > .site-menu-panel { display: none; }

  /* Menü düğmesi sağa yaslanır; açılan panel tek satırlık barı bozmasın diye
     barın altına, tam genişlikte düşer ve dil anahtarını da içinde taşır. */
  .site-menu { flex: 0 0 auto; margin-left: auto; }

  .site-menu > .site-menu-panel {
    position: absolute;
    top: 100%;
    right: 0;
    left: 0;
    display: block;
    padding: .25rem 1rem 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, .09);
    background: #101010;
  }

  .site-menu-panel > .site-actions {
    margin-top: .5rem;
    padding-top: .75rem;
    border-top: 1px solid rgba(255, 255, 255, .12);
  }


  .site-menu > summary {
    display: flex;
    align-items: center;
    gap: .55rem;
    min-height: 48px;
    color: #9aa08e;
    cursor: pointer;
    font-size: .75rem;
    font-weight: 700;
    letter-spacing: .1em;
    text-transform: uppercase;
  }

  .site-menu > summary::before {
    content: "";
    width: 18px;
    height: 2px;
    box-shadow: 0 5px 0 #9aa08e, 0 -5px 0 #9aa08e;
    background: #9aa08e;
  }

  .site-menu[open] > summary::before {
    box-shadow: none;
    transform: rotate(45deg);
  }

  .site-menu[open] > summary::after {
    content: "";
    position: absolute;
    width: 18px;
    height: 2px;
    background: #9aa08e;
    transform: rotate(-45deg);
  }

  .site-nav {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    min-height: 0;
    padding-bottom: .75rem;
  }

  .site-nav a { padding: .6rem 0; }

  .site-nav-legal {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    margin-top: .5rem;
    padding-top: .25rem;
    padding-left: 0;
    border-top: 1px solid rgba(255, 255, 255, .12);
    border-left: 0;
  }
}

@media (max-width: 820px) {
  /* Marka dar ekranda küçülebilsin, yoksa dil ve menü düğmesini dışarı iter. */
  .site-brand { font-size: 1.0625rem; }
  .site-brand img { width: 28px; height: 28px; }
}

@media (max-width: 520px) {
  .hero-layout {
    gap: 1.5rem;
    padding-top: 2.5rem;
    padding-bottom: 2.5rem;
  }
  .hero-devices { min-height: clamp(150px, 46vw, 200px); align-items: center; }
  .hero-devices::before { inset: -8% -12%; background-size: auto; opacity: .38; }
  .hero-phone-shell { margin-top: 1.25rem; }
  .hero-watch-card { width: 30%; margin-top: 1.25rem; }
}

@media (max-width: 400px) {
  .site-header-inner { gap: .6rem; }
  .site-brand { font-size: .9375rem; gap: .5rem; }
  .site-brand img { width: 24px; height: 24px; }
  .site-menu > summary { font-size: .7rem; letter-spacing: .06em; }
}

@media (max-width: 360px) {
  .hero-layout { gap: 1rem; padding: 2rem .875rem; }
  .hero-layout h1 { font-size: clamp(2.15rem, 11vw, 2.5rem); }
  .store-actions { flex-wrap: nowrap; gap: .5rem; margin-top: 1.75rem; }
  .store-badge { min-width: 0; flex: 1; gap: .5rem; padding: .6rem .65rem; }
  .store-badge svg { width: 1.35rem; height: 1.35rem; flex: 0 0 auto; }
  .store-badge .font-display { font-size: 1rem; }
  .store-badge span span:first-child { font-size: .58rem; }
  .hero-phone-shell { width: 97%; margin-top: 1.5rem; }
  .hero-watch-card { right: -2%; width: 30%; }
}

/* Three.js ekranlarını ortak bir yatay telefon gövdesinde toplar. */
.phone-frame {
  position: relative;
  z-index: 10;
  padding: clamp(7px, 1.1vw, 11px);
  border: 1px solid #4a4d4a;
  border-radius: clamp(1.7rem, 4vw, 2.65rem);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, .2), transparent 22%),
    linear-gradient(180deg, #343735 0%, #171918 54%, #292b2a 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .26),
    inset 0 -1px 0 rgba(255, 255, 255, .08),
    0 0 0 1px #0b0c0b,
    0 28px 65px -28px rgba(0, 0, 0, .85);
}

.phone-frame::before {
  content: "";
  position: absolute;
  z-index: 40;
  top: clamp(10px, 1.35vw, 14px);
  left: 50%;
  width: clamp(46px, 9%, 74px);
  height: clamp(7px, 1.15vw, 11px);
  border: 1px solid rgba(255, 255, 255, .06);
  border-radius: 999px;
  background: #080909;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .7), 0 1px 4px rgba(0, 0, 0, .45);
  transform: translateX(-50%);
  pointer-events: none;
}

.phone-frame::after {
  content: "";
  position: absolute;
  top: 28%;
  right: -4px;
  width: 3px;
  height: 18%;
  border-radius: 0 3px 3px 0;
  background: linear-gradient(180deg, #4a4d4a, #171918);
  box-shadow: 1px 0 0 #090a09;
}

.phone-screen {
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, .1);
  border-radius: clamp(1.22rem, 3vw, 2rem);
  background: #101010;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .8);
}

/* Hero arkasındaki silik ızgara */
.grid-bg {
  background-image:
    linear-gradient(to right, rgba(255, 255, 255, .04) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, .04) 1px, transparent 1px);
  background-size: 64px 64px;
  -webkit-mask-image: radial-gradient(ellipse 75% 70% at 35% 40%, #000 35%, transparent 80%);
          mask-image: radial-gradient(ellipse 75% 70% at 35% 40%, #000 35%, transparent 80%);
}

/* Başlıktaki "o" harfinin içine LED noktası */
.o-dot { position: relative; display: inline-block; }
.o-dot::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 60%;
  width: .19em;
  height: .19em;
  border-radius: 50%;
  background: var(--led);
  box-shadow: 0 0 .3em rgba(107, 224, 74, .55);
  transform: translate(-50%, -50%);
}

/* SSS: varsayılan üçgen işaretini gizle */
summary { list-style: none; }
summary::-webkit-details-marker { display: none; }

/* Menzil çubukları — uç bilerek keskin değil: menzil yaklaşık */
.range-fill {
  position: absolute;
  inset: 0 auto 0 0;
  width: calc(var(--reach) / 80 * 100%);
  background: linear-gradient(90deg, var(--accent-muted) 0%, var(--accent) 78%, rgba(168, 188, 143, 0) 100%);
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

/* 340px'in altında iki mağaza rozeti yan yana sığmıyor: "Google Play" etiketi
   ikinci satıra kırılıp rozetlerin yüksekliğini eşitsiz bırakıyordu. */
@media (max-width: 340px) {
  .store-actions { flex-wrap: wrap; }
  .store-badge { flex: 1 1 100%; }
}
