/* =========================================================
   cagriterzi.dev
   Tasarim sistemi. Detay: PLAN.md §4
   KURAL: bu dosyadaki hicbir metinde em dash yok. CLAUDE.md
   ========================================================= */

/* ---------- Fonts (self-host, Fontshare ITF Free Font License) ---------- */
@font-face {
  font-family: 'Cabinet Grotesk';
  src: url('../fonts/cabinet-grotesk-500.woff2') format('woff2');
  font-weight: 500; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Cabinet Grotesk';
  src: url('../fonts/cabinet-grotesk-700.woff2') format('woff2');
  font-weight: 700; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Cabinet Grotesk';
  src: url('../fonts/cabinet-grotesk-800.woff2') format('woff2');
  font-weight: 800; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Switzer';
  src: url('../fonts/switzer-400.woff2') format('woff2');
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Switzer';
  src: url('../fonts/switzer-500.woff2') format('woff2');
  font-weight: 500; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Switzer';
  src: url('../fonts/switzer-600.woff2') format('woff2');
  font-weight: 600; font-style: normal; font-display: swap;
}

/* ---------- Tokens ---------- */
:root {
  /* Renk */
  --paper:      #FAFAF8;
  --recess:     #F0F0ED;
  --graphite:   #22252A;
  --mid:        #676D78;
  --hairline:   #E3E3DF;
  --slate:      #1B2430;
  --slate-deep: #10161E;
  --signal:     #7D9CC0;
  --paper-warm: #F2F0EB;
  --on-slate-dim: #93A6BC;

  /* Tip */
  --face-display: 'Cabinet Grotesk', ui-sans-serif, system-ui, sans-serif;
  --face-body:    'Switzer', ui-sans-serif, system-ui, sans-serif;

  --t-xs:   0.75rem;
  --t-sm:   0.875rem;
  --t-base: 1rem;
  --t-md:   1.1875rem;
  --t-lg:   1.5rem;
  --t-xl:   2rem;
  --t-2xl:  clamp(2.125rem, 1.4rem + 3.2vw, 3.5rem);
  --t-hero: clamp(2.5rem, 1.1rem + 6.2vw, 5.75rem);

  /* Olcek: 4px tabanli */
  --s-1: 0.25rem;  --s-2: 0.5rem;   --s-3: 0.75rem;  --s-4: 1rem;
  --s-6: 1.5rem;   --s-8: 2rem;     --s-12: 3rem;    --s-16: 4rem;
  --s-20: 5rem;    --s-24: 6rem;    --s-32: 8rem;

  /* Yaricap: hiyerarsiye gore farkli degerler, tek bir deger degil */
  --r-chip: 8px;
  --r-slab: clamp(22px, 2.6vw, 46px);

  --shell: 1160px;
  --gutter: clamp(1rem, 4vw, 3.5rem);
}

/* Superelips maskesi. iOS ikon karesinin matematigi, n=5.
   Gercek squircle sadece ikonlarda kullaniliyor; oradaki form en okunur
   ve en anlamli yer. Buyuk yuzeylerde border-radius kullaniliyor. */
.squircle {
  -webkit-mask-image: var(--squircle);
          mask-image: var(--squircle);
  -webkit-mask-size: 100% 100%;
          mask-size: 100% 100%;
  -webkit-mask-repeat: no-repeat;
          mask-repeat: no-repeat;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--graphite);
  font-family: var(--face-body);
  font-size: var(--t-base);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }

:focus-visible {
  outline: 2px solid var(--signal);
  outline-offset: 3px;
  border-radius: 3px;
}

.skip {
  position: absolute; left: var(--s-4); top: var(--s-4);
  transform: translateY(-200%);
  background: var(--graphite); color: var(--paper);
  padding: var(--s-2) var(--s-4); border-radius: var(--r-chip);
  font-size: var(--t-sm); text-decoration: none; z-index: 20;
}
.skip:focus { transform: translateY(0); }

.shell { max-width: var(--shell); margin-inline: auto; padding-inline: var(--gutter); }

/* =========================================================
   Hero: kagidin uzerine oturan dev bir app tile
   ========================================================= */
.masthead {
  background: var(--slate);
  color: var(--paper-warm);
  border-radius: var(--r-slab);
  margin: clamp(8px, 1.1vw, 18px);
  padding: clamp(1.25rem, 3vw, 2.5rem) 0 clamp(2.5rem, 5vw, 4.5rem);
  position: relative;
  overflow: hidden;
}
/* Tek gradyan var ve dekoratif degil: tile'in alt kenarinda
   derinlik yaratip rafi zemine oturtuyor. */
.masthead::after {
  content: '';
  position: absolute; inset: auto 0 0 0; height: 45%;
  background: linear-gradient(to bottom, transparent, var(--slate-deep));
  opacity: .55; pointer-events: none;
}
.masthead > * { position: relative; z-index: 1; }

.topbar { display: flex; align-items: center; justify-content: space-between; gap: var(--s-6); }
.wordmark {
  font-family: var(--face-display); font-weight: 700;
  font-size: var(--t-md); letter-spacing: -0.02em;
  color: var(--paper-warm); text-decoration: none;
}
.topnav { display: flex; gap: clamp(1rem, 2.4vw, 2.25rem); }
.topnav a {
  color: var(--on-slate-dim); text-decoration: none;
  font-size: var(--t-sm); font-weight: 500;
  padding-block: var(--s-1);
  border-bottom: 1px solid transparent;
  transition: color .18s ease, border-color .18s ease;
}
.topnav a:hover { color: var(--paper-warm); border-bottom-color: var(--signal); }

.hero { margin-top: clamp(3rem, 8vw, 7rem); }
.hero h1 {
  font-family: var(--face-display); font-weight: 800;
  font-size: var(--t-hero); line-height: 0.96; letter-spacing: -0.038em;
  margin: 0; max-width: 14ch; color: var(--paper-warm);
  text-wrap: balance;
}
.hero p {
  margin: var(--s-6) 0 0; max-width: 46ch;
  color: var(--on-slate-dim); font-size: var(--t-md); line-height: 1.55;
}

/* ---------- Raf ---------- */
.shelf { margin-top: clamp(2.5rem, 6vw, 5rem); }
.shelf-rail {
  display: flex; align-items: flex-end;
  gap: clamp(0.5rem, 1.5vw, 1.125rem);
  overflow-x: auto; padding-bottom: var(--s-2);
  scrollbar-width: none;
}
.shelf-rail::-webkit-scrollbar { display: none; }
.shelf-rail img {
  width: clamp(58px, 8.4vw, 104px); aspect-ratio: 1; flex: none;
  filter: drop-shadow(0 10px 26px rgb(4 8 14 / 0.5));
}
/* Tek orkestre edilmis an: yuklenirken ikonlar sirayla yerine oturuyor.
   Baska hicbir yerde scroll tetikli giris animasyonu yok. */
.shelf-rail img {
  opacity: 0; transform: translateY(14px);
  animation: settle .62s cubic-bezier(.22,.68,.31,1) forwards;
  animation-delay: calc(var(--i) * 70ms + 180ms);
}
@keyframes settle { to { opacity: 1; transform: none; } }

.shelf-scale {
  display: flex; align-items: center; gap: var(--s-4);
  margin-top: var(--s-6); color: var(--on-slate-dim); font-size: var(--t-xs);
}
.shelf-scale .line { flex: 1; height: 1px; background: rgb(147 166 188 / 0.28); }
.shelf-note {
  margin: var(--s-4) 0 0; color: var(--on-slate-dim);
  font-size: var(--t-sm); max-width: 52ch;
}

/* ---------- Buton ---------- */
.action {
  display: inline-block; margin-top: clamp(2rem, 4vw, 3rem);
  font-family: var(--face-body); font-weight: 600; font-size: var(--t-sm);
  color: var(--slate); background: var(--paper-warm);
  padding: var(--s-3) var(--s-6); border-radius: 100px;
  text-decoration: none;
  transition: background .18s ease, transform .18s ease;
}
.action:hover { background: #fff; transform: translateY(-1px); }
.action-quiet {
  background: transparent; color: var(--paper-warm);
  box-shadow: inset 0 0 0 1px rgb(147 166 188 / 0.4);
}
.action-quiet:hover { background: rgb(242 240 235 / 0.08); }

/* =========================================================
   Kagit govde
   ========================================================= */
.band { padding-block: clamp(4.5rem, 10vw, 9rem); }
.band + .band { border-top: 1px solid var(--hairline); }

.band h2 {
  font-family: var(--face-display); font-weight: 700;
  font-size: var(--t-2xl); line-height: 1.04; letter-spacing: -0.032em;
  margin: 0; max-width: 20ch; text-wrap: balance;
}
.lede {
  margin: var(--s-6) 0 0; max-width: 62ch;
  font-size: var(--t-md); line-height: 1.62; color: var(--mid);
}

/* ---------- Zincir: Build > Ship > Launch > Grow ----------
   Ozdes kartlar degil. Icerik gercekten sirali oldugu icin
   baglayici cizgi bilgi tasiyor, sus degil. */
.chain { margin-top: clamp(2.5rem, 5vw, 4rem); }
.stop {
  display: grid;
  grid-template-columns: minmax(0, 8.5rem) minmax(0, 1fr);
  gap: clamp(1rem, 4vw, 3.5rem);
  padding-block: var(--s-8);
  border-top: 1px solid var(--hairline);
  position: relative;
}
.stop:last-child { border-bottom: 1px solid var(--hairline); }
.stop-name {
  font-family: var(--face-display); font-weight: 700;
  font-size: var(--t-lg); letter-spacing: -0.028em; margin: 0;
  align-self: start;
}
.stop-body { margin: 0; color: var(--mid); max-width: 56ch; line-height: 1.6; }
/* Sirali olusu, adin solundaki kisa dikey cizgiyle kodlaniyor. */
.stop-name::before {
  content: ''; display: block; width: 26px; height: 2px;
  background: var(--graphite); margin-bottom: var(--s-3);
}
.stop:nth-child(2) .stop-name::before { width: 52px; }
.stop:nth-child(3) .stop-name::before { width: 78px; }
.stop:nth-child(4) .stop-name::before { width: 104px; }

/* ---------- Sevkiyat defteri ---------- */
.log { margin-top: clamp(2.5rem, 5vw, 4rem); }
.log-row {
  display: grid;
  grid-template-columns: 5.5rem 2.75rem minmax(0, 1fr) auto;
  align-items: center; gap: clamp(0.75rem, 2.5vw, 1.75rem);
  padding-block: var(--s-4);
  border-top: 1px solid var(--hairline);
  text-decoration: none; color: inherit;
  transition: background .16s ease;
}
.log-row:last-child { border-bottom: 1px solid var(--hairline); }
.log-row:hover { background: var(--recess); }
.log-when { font-size: var(--t-sm); color: var(--mid); font-variant-numeric: tabular-nums; }
.log-row img { width: 2.75rem; aspect-ratio: 1; }
.log-what { min-width: 0; }
.log-name { font-weight: 500; letter-spacing: -0.01em; }
.log-kind { font-size: var(--t-sm); color: var(--mid); }
.log-where { font-size: var(--t-sm); color: var(--mid); white-space: nowrap; }

/* ---------- Kapanis ---------- */
.closer { background: var(--recess); }
.closer .lede { color: var(--mid); }
.action-dark {
  color: var(--paper); background: var(--graphite);
}
.action-dark:hover { background: var(--slate); }

.site-foot {
  border-top: 1px solid var(--hairline);
  padding-block: var(--s-8);
  display: flex; flex-wrap: wrap; gap: var(--s-4) var(--s-8);
  align-items: baseline; justify-content: space-between;
  font-size: var(--t-sm); color: var(--mid);
}
.site-foot a { text-decoration: none; }
.site-foot a:hover { color: var(--graphite); text-decoration: underline; }
.foot-links { display: flex; gap: var(--s-6); flex-wrap: wrap; }

/* =========================================================
   Duyarlilik
   ========================================================= */
@media (max-width: 720px) {
  .topnav { gap: var(--s-4); }
  .stop { grid-template-columns: 1fr; gap: var(--s-3); }
  .stop-name::before,
  .stop:nth-child(2) .stop-name::before,
  .stop:nth-child(3) .stop-name::before,
  .stop:nth-child(4) .stop-name::before { width: 26px; }
  .log-row { grid-template-columns: 2.5rem minmax(0, 1fr); row-gap: var(--s-1); }
  .log-when { grid-column: 2; order: 2; }
  .log-where { grid-column: 2; order: 3; }
  .log-row img { grid-row: span 3; align-self: start; }
}
@media (max-width: 560px) {
  /* Dar ekranda yalnizca About gizleniyor. Contact birincil donusum
     yolu oldugu icin her boyutta gorunur kaliyor. */
  .topnav a[href="#about"] { display: none; }
  .topnav { gap: var(--s-3); }
  .topnav a { font-size: var(--t-xs); }
}

@media (prefers-reduced-motion: reduce) {
  .shelf-rail img { opacity: 1; transform: none; animation: none; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* Superelips maske kaynagi. tools/squircle-path.txt ile uretildi (n=5). */
:root { --squircle: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%20100%20100%22%3E%3Cpath%20d%3D%22M100.00%2050.00%20L99.95%2067.39%20L99.80%2072.92%20L99.54%2076.91%20L99.18%2080.12%20L98.71%2082.83%20L98.14%2085.19%20L97.46%2087.26%20L96.66%2089.10%20L95.74%2090.74%20L94.70%2092.21%20L93.53%2093.53%20L92.21%2094.70%20L90.74%2095.74%20L89.10%2096.66%20L87.26%2097.46%20L85.19%2098.14%20L82.83%2098.71%20L80.12%2099.18%20L76.91%2099.54%20L72.92%2099.80%20L67.39%2099.95%20L50.00%20100.00%20L32.61%2099.95%20L27.08%2099.80%20L23.09%2099.54%20L19.88%2099.18%20L17.17%2098.71%20L14.81%2098.14%20L12.74%2097.46%20L10.90%2096.66%20L9.26%2095.74%20L7.79%2094.70%20L6.47%2093.53%20L5.30%2092.21%20L4.26%2090.74%20L3.34%2089.10%20L2.54%2087.26%20L1.86%2085.19%20L1.29%2082.83%20L0.82%2080.12%20L0.46%2076.91%20L0.20%2072.92%20L0.05%2067.39%20L0.00%2050.00%20L0.05%2032.61%20L0.20%2027.08%20L0.46%2023.09%20L0.82%2019.88%20L1.29%2017.17%20L1.86%2014.81%20L2.54%2012.74%20L3.34%2010.90%20L4.26%209.26%20L5.30%207.79%20L6.47%206.47%20L7.79%205.30%20L9.26%204.26%20L10.90%203.34%20L12.74%202.54%20L14.81%201.86%20L17.17%201.29%20L19.88%200.82%20L23.09%200.46%20L27.08%200.20%20L32.61%200.05%20L50.00%200.00%20L67.39%200.05%20L72.92%200.20%20L76.91%200.46%20L80.12%200.82%20L82.83%201.29%20L85.19%201.86%20L87.26%202.54%20L89.10%203.34%20L90.74%204.26%20L92.21%205.30%20L93.53%206.47%20L94.70%207.79%20L95.74%209.26%20L96.66%2010.90%20L97.46%2012.74%20L98.14%2014.81%20L98.71%2017.17%20L99.18%2019.88%20L99.54%2023.09%20L99.80%2027.08%20L99.95%2032.61%20Z%22%20fill%3D%22%23000%22%2F%3E%3C%2Fsvg%3E"); }
