/* ==========================================================================
   HC MARIN WORKS — v2 eklentileri (style.css'in ÜZERİNE yüklenir)
   1) Kaydırma / performans düzeltmeleri   2) İllüstrasyon çerçeveleri
   3) Hizmet story bar + story görüntüleyici  4) Lacivert tema önizlemesi
   Temel tasarım (style.css) değiştirilmedi; tüm yeni kurallar bu dosyada.
   ========================================================================== */

/* ---------------------------------------------------------------- 1. stability & performance */
/* Reveal: daha erken, daha kısa, daha az kayma (boş alan / "geri atma" hissi olmasın) */
.js [data-reveal] {
  transform: translateY(12px);
  transition: opacity .5s var(--ease), transform .5s var(--ease);
  transition-delay: var(--d, 0ms);
}
.js [data-reveal].is-in { opacity: 1; transform: none; }

/* Sistem haritası alt yazısı: metin değişince sayfa zıplamasın (alan sabit) */
.yacht-caption { display: grid; grid-template-columns: auto 1fr; align-items: start; }
.yacht-caption [data-yacht-caption] { min-height: 3em; line-height: 1.5; }

/* Ekran dışındaki sürekli animasyonlar durur */
.is-offscreen, .is-offscreen *, .is-offscreen::before, .is-offscreen::after,
.is-offscreen *::before, .is-offscreen *::after { animation-play-state: paused !important; }

/* Telefonlarda ağır efektleri hafiflet (blur + sürekli boyama yapan animasyonlar) */
@media (max-width: 899px), (hover: none) {
  .hero-bg::before { animation: none; }
  .hero .metal-text { animation: none; }
  .site-header.is-scrolled { background: #07090b; -webkit-backdrop-filter: none; backdrop-filter: none; }
  .action-bar { background: #07090b; -webkit-backdrop-filter: none; backdrop-filter: none; }
  .svc-nav { background: #fff; -webkit-backdrop-filter: none; backdrop-filter: none; }
  .sys.is-active .s-flow { filter: none; }
}
/* Kısa ekranlarda yapışkan (sticky) sütunlar içerik kesmesin */
@media (min-width: 900px) and (max-height: 800px) { .svc-head { position: static; } }
@media (min-width: 1024px) and (max-height: 820px) { .why-intro { position: static; } }
.svc-nav ul { overscroll-behavior-x: contain; }

/* ---------------------------------------------------------------- 2. illustration frames */
.ill {
  position: relative;
  display: block;
  aspect-ratio: 3 / 2;
  overflow: hidden;
  background: #eef1f3;
}
.ill img { display: block; width: 100%; height: 100%; object-fit: cover; }

/* ana sayfa hizmet kartı */
.service-card.has-media { padding-top: 0; overflow: hidden; }
.service-card.has-media::before { z-index: 3; }
.sc-media {
  margin: 0 -28px;
  border-bottom: 1px solid var(--line);
}
.sc-media img { transition: transform .6s var(--ease); }
.service-card.has-media:hover .sc-media img { transform: scale(1.03); }
.service-card.has-media .sc-top {
  position: relative;
  z-index: 2;
  align-items: flex-end;
  margin-top: -27px;
  margin-bottom: 20px;
}
.service-card.has-media .sc-icon { box-shadow: 0 0 0 4px var(--paper); }

/* hizmetler sayfası: teknik çizim antetli çerçeve */
.svc-figure {
  margin: 0 0 30px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}
.svc-figure .ill { border-bottom: 1px solid var(--line); }
.svc-figure figcaption,
.ill-cap {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 11px 14px;
  font-family: var(--mono);
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--text-3);
}
.svc-figure figcaption b,
.ill-cap b { font-weight: 500; color: var(--text); }
.svc-figure figcaption .ico,
.ill-cap .ico { width: 18px; height: 18px; margin-left: auto; color: var(--accent-ink); }

/* genel illüstrasyon kartı (neden / ürün / hakkımızda / 404) */
.ill-card {
  margin: 0;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.ill-card .ill { border-bottom: 1px solid var(--line); }
.why-intro .ill-card { margin: 4px 0 28px; }
.product-copy .ill-card { margin-top: 32px; }
.about-copy .ill-card { margin-top: 32px; }
.nf .ill-card { max-width: 460px; margin-top: 44px; border-color: rgba(255, 255, 255, .12); }
.nf .ill-card .ill { border-bottom: 0; }

/* ---------------------------------------------------------------- 3. service story bar */
.hc-stories {
  position: relative;
  padding: 22px 0 20px;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
}
.hc-stories-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--text-3);
}
.hc-stories-head span:last-child { color: var(--text-3); opacity: .8; }
.hc-stories-track {
  display: flex;
  gap: 10px;
  margin: 0 calc(var(--gutter) * -1);
  padding: 2px var(--gutter) 6px;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x proximity;
  scroll-padding-inline: var(--gutter);
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.hc-stories-track::-webkit-scrollbar { display: none; }
.hc-stories-track > li { flex: none; scroll-snap-align: start; }
.hc-stories-track > li:first-child { margin-left: auto; }
.hc-stories-track > li:last-child { margin-right: auto; }
.hc-story {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  width: 72px;
  color: var(--text);
  text-align: center;
  -webkit-tap-highlight-color: transparent;
}
.hc-story-ring {
  display: block;
  width: 68px;
  height: 68px;
  padding: 3px;
  border: 2px solid var(--ink-900);
  border-radius: 50%;
  background: var(--paper);
  transition: border-color .25s, transform .25s var(--ease);
}
.hc-story-ring img,
.hc-story-ring picture {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  background: #eef1f3;
}
.hc-story:hover .hc-story-ring { transform: translateY(-2px); }
.hc-story:active .hc-story-ring { transform: scale(.96); }
.hc-story.is-seen .hc-story-ring { border-color: var(--line-2); }
.hc-story-label {
  max-width: 76px;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.25;
  color: var(--text-2);
}
.hc-story-cta .hc-story-ring {
  display: grid;
  place-items: center;
  background: var(--ink-900);
  color: #fff;
}
.hc-story-cta .hc-story-ring .ico { width: 26px; height: 26px; }
.hc-story:focus-visible { outline: none; }
.hc-story:focus-visible .hc-story-ring { outline: 2px solid var(--accent); outline-offset: 2px; }
@media (min-width: 900px) {
  .hc-stories { padding: 26px 0 24px; }
  .hc-stories-head { justify-content: center; }
  .hc-stories-head span:last-child { display: none; }
  .hc-stories-track { gap: 18px; }
  .hc-story { width: 92px; }
  .hc-story-ring { width: 84px; height: 84px; }
}

/* ---------------------------------------------------------------- 3b. story viewer */
.hc-sv {
  width: 100%;
  max-width: 100%;
  height: 100%;
  max-height: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--text);
  overflow: hidden;
}
.hc-sv::backdrop { background: rgba(7, 9, 11, .86); }
.hc-sv[open] { display: grid; place-items: center; animation: hc-sv-in .22s var(--ease); }
@keyframes hc-sv-in { from { opacity: 0; } to { opacity: 1; } }
.hc-sv-frame {
  position: relative;
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100%;
  background: var(--paper);
  overflow: hidden;
  touch-action: pan-y;
  -webkit-user-select: none;
  user-select: none;
}
.hc-sv-progress {
  display: flex;
  gap: 4px;
  padding: calc(10px + env(safe-area-inset-top)) 14px 0;
}
.hc-sv-progress i {
  flex: 1;
  height: 3px;
  border-radius: 3px;
  background: var(--line);
  overflow: hidden;
}
.hc-sv-progress i::after {
  content: "";
  display: block;
  height: 100%;
  background: var(--ink-900);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .3s var(--ease);
}
.hc-sv-progress i.is-done::after,
.hc-sv-progress i.is-on::after { transform: none; }
.hc-sv-top {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 10px 10px 16px;
}
.hc-sv-brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: .02em;
}
.hc-sv-brand svg { width: 22px; height: 24px; fill: var(--ink-900); }
.hc-sv-count { margin-left: auto; font-family: var(--mono); font-size: 11px; color: var(--text-3); }
.hc-sv-close {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--text);
  cursor: pointer;
}
.hc-sv-close:hover { background: var(--paper-2); }
.hc-sv-close .ico { width: 22px; height: 22px; transform: rotate(45deg); }
.hc-sv-media {
  position: relative;
  flex: none;
  margin: 0 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}
.hc-sv-media .ill { background: #eef1f3; }
.hc-sv-tap {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: 1fr 2fr;
}
.hc-sv-tap button { border: 0; background: transparent; cursor: pointer; }
.hc-sv-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  min-height: 0;
  padding: 20px 18px calc(18px + env(safe-area-inset-bottom));
  overflow-y: auto;
}
.hc-sv-kicker { margin-bottom: 8px; font-family: var(--mono); font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--accent-ink); }
.hc-sv-title { margin-bottom: 12px; font-size: clamp(1.45rem, 1.2rem + 1.2vw, 1.75rem); line-height: 1.15; letter-spacing: -.02em; }
.hc-sv-text { font-size: 15.5px; line-height: 1.6; color: var(--text-2); }
.hc-sv-tags { margin-top: 18px; }
.hc-sv-actions { display: grid; gap: 10px; margin-top: auto; padding-top: 22px; }
.hc-sv-actions .btn { width: 100%; justify-content: center; }
.hc-sv-arrow {
  position: absolute;
  top: 50%;
  z-index: 2;
  display: none;
  place-items: center;
  width: 46px;
  height: 46px;
  margin-top: -23px;
  border: 1px solid rgba(255, 255, 255, .25);
  border-radius: 50%;
  background: rgba(7, 9, 11, .55);
  color: #fff;
  cursor: pointer;
}
.hc-sv-arrow .ico { width: 20px; height: 20px; }
.hc-sv-arrow[data-sv-prev] .ico { transform: rotate(180deg); }
.hc-sv-arrow:disabled { opacity: .3; cursor: default; }
@media (min-width: 600px) and (min-height: 640px) {
  .hc-sv { width: 100vw; height: 100vh; }
  .hc-sv-frame {
    width: min(440px, calc(100vw - 160px));
    height: auto;
    max-height: min(820px, calc(100vh - 48px));
    border-radius: 16px;
    box-shadow: 0 40px 80px -30px rgba(0, 0, 0, .6);
  }
  .hc-sv-progress { padding-top: 12px; }
  .hc-sv-body { flex: 0 1 auto; padding-bottom: 20px; }
  .hc-sv-actions { margin-top: 0; }
  .hc-sv-arrow { display: grid; }
  .hc-sv-arrow[data-sv-prev] { left: max(16px, calc(50% - 220px - 70px)); }
  .hc-sv-arrow[data-sv-next] { right: max(16px, calc(50% - 220px - 70px)); }
}
/* kısa ekranlar: görsel 16:9, tipografi sıkı (telefon ≤700/780 px, masaüstü ≤880/800 px yükseklik) */
@media (max-width: 599px) and (max-height: 700px), (min-width: 600px) and (min-height: 640px) and (max-height: 880px) {
  .hc-sv-media .ill { aspect-ratio: 16 / 9; }
}
@media (max-width: 599px) and (max-height: 780px), (min-width: 600px) and (max-height: 800px) {
  .hc-sv-top { padding: 8px 8px 8px 16px; }
  .hc-sv-close { width: 38px; height: 38px; }
  .hc-sv-body { padding-top: 14px; padding-bottom: calc(14px + env(safe-area-inset-bottom)); }
  .hc-sv-kicker { margin-bottom: 6px; }
  .hc-sv-title { margin-bottom: 8px; font-size: 1.3rem; }
  .hc-sv-text { font-size: 14.5px; line-height: 1.5; }
  .hc-sv-tags { margin-top: 12px; }
  .hc-sv-actions { gap: 8px; padding-top: 14px; }
  .hc-sv-actions .btn-lg { min-height: 50px; padding-top: 12px; padding-bottom: 12px; }
}
/* yatay telefon: görsel solda, metin + butonlar sağda */
@media (min-width: 600px) and (max-height: 639px) {
  .hc-sv-frame { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); grid-template-rows: auto auto minmax(0, 1fr); }
  .hc-sv-progress, .hc-sv-top { grid-column: 1 / -1; }
  .hc-sv-media { grid-column: 1; grid-row: 3; align-self: start; margin: 0 0 14px 14px; }
  .hc-sv-body { grid-column: 2; grid-row: 3; padding-top: 0; }
}
/* uzun telefonlarda görsel boş alanı doldurur (3:2 ile kare arası), butonlar altta kalır */
@media (max-width: 599px) and (min-height: 701px) {
  .hc-sv-media {
    flex: 1000 1 calc((100vw - 28px) * 2 / 3);
    min-height: calc((100vw - 28px) * 2 / 3);
    max-height: calc(100vw - 28px);
  }
  .hc-sv-media .ill { position: absolute; inset: 0; aspect-ratio: auto; }
  .hc-sv-body { flex: 1 1 auto; }
}
html.hc-sv-lock, html.hc-sv-lock body { overflow: hidden; }

/* tema önizleme anahtarı (yalnızca ?tema= ile açıldığında görünür) */
.hc-theme-switch {
  position: fixed;
  left: 12px;
  bottom: calc(92px + env(safe-area-inset-bottom));
  z-index: 90;
  display: flex;
  gap: 2px;
  padding: 3px;
  background: rgba(255, 255, 255, .96);
  border: 1px solid var(--line-2);
  border-radius: 999px;
  box-shadow: 0 10px 24px -12px rgba(0, 0, 0, .35);
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.hc-theme-switch button {
  padding: 7px 11px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--text-3);
  cursor: pointer;
}
.hc-theme-switch button[aria-pressed="true"] { background: var(--ink-900); color: #fff; }
@media (min-width: 1080px) { .hc-theme-switch { bottom: 20px; left: 20px; } }

@media (prefers-reduced-motion: reduce) {
  .hc-sv[open] { animation: none; }
  .sc-media img, .hc-story-ring { transition: none; }
}
@media print {
  .hc-stories, .hc-sv, .hc-theme-switch { display: none !important; }
}

/* ---------------------------------------------------------------- 4. navy theme preview  (?tema=lacivert) */
html[data-theme="navy"] {
  --ink-950: #071524;
  --ink-900: #0b1f33;
  --ink-850: #0e243a;
  --ink-800: #112a43;
  --ink-700: #17334f;
  --ink-600: #1f3f5f;
  --ink-500: #2b4a68;
  --steel-400: #687e90;
  --steel-300: #92a6b6;
  --steel-200: #bccbd6;
  --steel-100: #dde6ec;
  --paper-2: #f1f4f6;
  --paper-3: #e8edf0;
  --line: #dde4e9;
  --line-2: #c7d2da;
  --text: #0b1f33;
  --text-2: #2a3f53;
  --text-3: #556a7b;
  --line-dark: rgba(188, 203, 214, .12);
  --accent: #7db5d6;
  --accent-soft: rgba(125, 181, 214, .16);
  --accent-ink: #244a68;
}
html[data-theme="navy"] .hero-bg {
  background:
    radial-gradient(900px 520px at 78% 18%, rgba(125, 181, 214, .16), transparent 60%),
    radial-gradient(700px 480px at 8% 92%, rgba(192, 200, 208, .08), transparent 60%),
    linear-gradient(180deg, #0f2740 0%, #0b1f33 100%);
}
html[data-theme="navy"] .site-header.is-scrolled { background: rgba(11, 31, 51, .95); }
html[data-theme="navy"] .mobile-nav { background: rgba(11, 31, 51, .98); }
html[data-theme="navy"] .action-bar { background: rgba(11, 31, 51, .95); }
html[data-theme="navy"] .hotspot-dot { background: rgba(11, 31, 51, .9); border-color: rgba(125, 181, 214, .75); box-shadow: 0 0 0 4px rgba(125, 181, 214, .12); }
html[data-theme="navy"] .sys.is-active .s-part { fill: rgba(125, 181, 214, .14); }
html[data-theme="navy"] .sys.is-active .s-flow { filter: drop-shadow(0 0 3px rgba(125, 181, 214, .8)); }
html[data-theme="navy"] .product-card::before {
  background: radial-gradient(500px 300px at 100% 0%, rgba(125, 181, 214, .2), transparent 60%), url("../img/bathymetry.svg") center / cover;
}
html[data-theme="navy"] .product-card::after { background: linear-gradient(180deg, rgba(11, 31, 51, .5), rgba(11, 31, 51, .9)); }
html[data-theme="navy"] .hc-sv::backdrop { background: rgba(11, 31, 51, .88); }
html[data-theme="navy"] #y-glass stop:nth-child(2) { stop-color: #12304b; }
html[data-theme="navy"] #y-glass stop:nth-child(3) { stop-color: #3a5873; }
html[data-theme="navy"] #y-water stop { stop-color: #7db5d6; }
@media (max-width: 899px), (hover: none) {
  html[data-theme="navy"] .site-header.is-scrolled { background: #0b1f33; }
  html[data-theme="navy"] .action-bar { background: #0b1f33; }
  html[data-theme="navy"] .sys.is-active .s-flow { filter: none; }
}
.service-card.has-media::before { inset: 0 0 auto; }
