/* trgenci.com — no frameworks, no CDN, no fonts, no scripts, no requests.
   Every effect below is CSS or inline SVG. A site about metadata resistance
   should not phone home to look good. Read the source. */

:root {
  --bg:      #fdfcfa;
  --surface: #f4f2ed;
  --raise:   #ffffff;
  --fg:      #14161a;
  --muted:   #5b616b;
  --rule:    #e4e1da;
  --accent:  #9c5716;
  --accent2: #1d6b6b;
  --danger:  #b23b2c;
  --glow:    rgba(156, 87, 22, 0.16);
  --soft:    rgba(156, 87, 22, 0.07);
  --shadow:  0 1px 2px rgba(20,22,26,.05), 0 8px 26px -12px rgba(20,22,26,.16);
  --page:    52rem;
  --prose:   34rem;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
  --sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --serif: ui-serif, Georgia, "Iowan Old Style", "Times New Roman", serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg:      #0a0c0f;
    --surface: #12151a;
    --raise:   #171b21;
    --fg:      #e8eaee;
    --muted:   #8d949f;
    --rule:    #212730;
    --accent:  #f2a44c;
    --accent2: #4fd1c5;
    --danger:  #e8695a;
    --glow:    rgba(242, 164, 76, 0.20);
    --soft:    rgba(242, 164, 76, 0.08);
    --shadow:  0 1px 2px rgba(0,0,0,.4), 0 14px 40px -14px rgba(0,0,0,.7);
  }
}

*, *::before, *::after { box-sizing: border-box; }
html {
  font-size: 18px;              /* kok: tum rem degerleri buna bagli */
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 400 1.16rem/1.7 var(--serif);
  font-feature-settings: "kern", "liga";
  overflow-x: hidden;
}

.page  { max-width: var(--page);  margin: 0 auto; padding: 0 1.6rem; }
.prose { max-width: var(--prose); }

/* ══════════ entrance + scroll reveal ══════════ */

@keyframes rise {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: none; }
}
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }

.hero .mark   { animation: rise .7s 0s   both cubic-bezier(.2,.7,.3,1); }
.hero .kicker { animation: rise .7s .12s both cubic-bezier(.2,.7,.3,1); }
.hero h1      { animation: rise .8s .14s both cubic-bezier(.2,.7,.3,1); }
.hero .lede   { animation: rise .8s .26s both cubic-bezier(.2,.7,.3,1); }
.hero::before { animation: fade 1.6s .1s both; }

/* Scroll-driven, pure CSS. Browsers without it simply show the content. */
@supports (animation-timeline: view()) {
  .reveal {
    animation: rise linear both;
    animation-timeline: view();
    animation-range: entry 0% entry 52%;
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
  .hero .mark, .hero .kicker, .hero h1, .hero .lede, .reveal { opacity: 1; transform: none; }
}

/* ══════════ hero ══════════ */

.hero {
  position: relative;
  padding: 7rem 0 4.5rem;
  overflow: hidden;
  isolation: isolate;
}

/* aurora: two slow drifting radial washes. no images. */
.hero::before {
  content: "";
  position: absolute;
  inset: -30% -20% auto -20%;
  height: 150%;
  z-index: -2;
  background:
    radial-gradient(46% 40% at 18% 14%, var(--glow) 0%, transparent 62%),
    radial-gradient(40% 38% at 84% 8%,  color-mix(in srgb, var(--accent2) 22%, transparent) 0%, transparent 60%);
  filter: blur(14px);
  animation: drift 26s ease-in-out infinite alternate;
}

@keyframes drift {
  from { transform: translate3d(-2%, -1%, 0) scale(1); }
  to   { transform: translate3d(3%, 2%, 0) scale(1.09); }
}

/* engineering grid, masked out toward the edges */
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image:
    linear-gradient(var(--rule) 1px, transparent 1px),
    linear-gradient(90deg, var(--rule) 1px, transparent 1px);
  background-size: 46px 46px;
  -webkit-mask-image: radial-gradient(ellipse 76% 82% at 22% 0%, #000 0%, transparent 74%);
  mask-image: radial-gradient(ellipse 76% 82% at 22% 0%, #000 0%, transparent 74%);
  opacity: .5;
  pointer-events: none;
}

.mark {
  display: inline-block;
  line-height: 0;
  margin: 0 0 1.5rem;
  color: var(--accent);
  transition: color .25s ease, transform .25s cubic-bezier(.2,.7,.3,1);
}
.mark svg { width: 46px; height: 46px; display: block; }
.mark:hover { color: var(--accent2); transform: translateY(-2px); }

.kicker {
  margin: 0 0 1.5rem;
  font: 600 .8rem/1 var(--mono);
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--accent);
}

h1 {
  margin: 0;
  font-family: var(--sans);
  font-size: clamp(2.6rem, 8vw, 4.6rem);
  font-weight: 700;
  letter-spacing: -.038em;
  line-height: .96;
  background: linear-gradient(168deg, var(--fg) 30%, color-mix(in srgb, var(--fg) 58%, var(--accent)) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

h1 .alias {
  display: block;
  margin-top: .5rem;
  font-family: var(--mono);
  font-size: .26em;
  font-weight: 500;
  letter-spacing: .04em;
  -webkit-text-fill-color: var(--muted);
  color: var(--muted);
}

.lede {
  max-width: 31rem;
  margin: 2rem 0 0;
  font-size: 1.32rem;
  line-height: 1.5;
  color: var(--muted);
}

/* ══════════ sections ══════════ */

section { padding: 4.5rem 0; position: relative; }

section + section::before {
  content: "";
  position: absolute;
  top: 0; left: 50%;
  transform: translateX(-50%);
  width: min(52rem, calc(100% - 3.2rem));
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--rule) 12%, var(--rule) 88%, transparent);
}

h2 {
  margin: 0 0 1.8rem;
  font: 600 .84rem/1 var(--mono);
  letter-spacing: .15em;
  text-transform: uppercase;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: .9rem;
}

h2::before {
  content: "";
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px var(--soft);
  flex: none;
}

h2::after {
  content: "";
  flex: 1; height: 1px;
  background: linear-gradient(90deg, var(--rule), transparent);
}

h3 {
  margin: 2.3rem 0 .6rem;
  font-family: var(--sans);
  font-size: 1.16rem;
  font-weight: 650;
  letter-spacing: -.012em;
}

p { margin: 0 0 1.2rem; }

a {
  color: var(--fg);
  text-decoration-color: var(--accent);
  text-decoration-thickness: 1.5px;
  text-underline-offset: 3px;
  transition: color .2s ease;
}
a:hover { color: var(--accent); }

strong { font-weight: 650; }

code {
  font: .86em var(--mono);
  background: var(--soft);
  color: var(--accent);
  padding: .14em .4em;
  border-radius: 4px;
}

ul { padding-left: 1.15rem; }
li { margin-bottom: .5rem; }
li::marker { color: var(--accent); }

/* ══════════ stats ══════════ */

.stats {
  list-style: none; margin: 0; padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
  gap: .8rem;
}

.stats li {
  margin: 0;
  padding: 1.6rem 1.4rem;
  background: var(--raise);
  border: 1px solid var(--rule);
  border-radius: 10px;
  box-shadow: var(--shadow);
  transition: transform .25s cubic-bezier(.2,.7,.3,1), border-color .25s ease, box-shadow .25s ease;
}

.stats li:hover {
  transform: translateY(-3px);
  border-color: color-mix(in srgb, var(--accent) 45%, var(--rule));
  box-shadow: var(--shadow), 0 0 0 4px var(--soft);
}

.stats .n {
  display: block;
  font: 600 2.3rem/1 var(--mono);
  letter-spacing: -.035em;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}

.stats .u {
  display: block; margin-top: .35rem;
  font: 500 .78rem/1 var(--mono);
  letter-spacing: .1em; text-transform: uppercase;
  color: var(--muted);
}

.stats .d {
  display: block; margin-top: .9rem;
  font-size: 1.02rem; line-height: 1.55; color: var(--muted);
}

/* ══════════ figures ══════════ */

figure { margin: 0; }

figure svg { display: block; width: 100%; height: auto; color: var(--fg); }
.fig-tall { display: none; }

.figframe {
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: 12px;
  padding: 1.8rem 1.6rem 1.4rem;
  box-shadow: var(--shadow);
}

figcaption {
  margin-top: 1.2rem;
  max-width: var(--prose);
  font-size: 1.03rem; line-height: 1.62; color: var(--muted);
}

/* packets travelling the wire in the architecture figure */
.pkt { animation: pkt 3.4s cubic-bezier(.45,0,.55,1) infinite; }
.pkt-b { animation-delay: 1.7s; }
@keyframes pkt {
  0%   { transform: translateX(0);   opacity: 0; }
  12%  { opacity: 1; }
  88%  { opacity: 1; }
  100% { transform: translateX(118px); opacity: 0; }
}
.pkt-rev { animation-name: pkt-rev; }
.pkt-dn, .pkt-up { animation: pkt-dn 3.4s cubic-bezier(.45,0,.55,1) infinite; }
.pkt-up { animation-name: pkt-up; }
@keyframes pkt-dn {
  0%   { transform: translateY(0);    opacity: 0; }
  12%  { opacity: 1; }
  88%  { opacity: 1; }
  100% { transform: translateY(30px); opacity: 0; }
}
@keyframes pkt-up {
  0%   { transform: translateY(0);     opacity: 0; }
  12%  { opacity: 1; }
  88%  { opacity: 1; }
  100% { transform: translateY(-30px); opacity: 0; }
}
@keyframes pkt-rev {
  0%   { transform: translateX(0);    opacity: 0; }
  12%  { opacity: 1; }
  88%  { opacity: 1; }
  100% { transform: translateX(-112px); opacity: 0; }
}

/* traffic-shape figure: bursty bars breathe, uniform bars do not */
.burst { animation: burst 2.6s ease-in-out infinite; transform-origin: center bottom; }
@keyframes burst {
  0%, 100% { transform: scaleY(.28); }
  22%      { transform: scaleY(1); }
  44%      { transform: scaleY(.12); }
  66%      { transform: scaleY(.72); }
}
.b2 { animation-delay: -.5s; }  .b3 { animation-delay: -1.1s; }
.b4 { animation-delay: -1.7s; } .b5 { animation-delay: -2.2s; }
.b6 { animation-delay: -.8s; }  .b7 { animation-delay: -1.9s; }

.steady { animation: steady 3.4s linear infinite; }
@keyframes steady { 0%,100% { opacity: .55; } 50% { opacity: .9; } }
.s2 { animation-delay: -.42s; } .s3 { animation-delay: -.85s; }
.s4 { animation-delay: -1.28s; } .s5 { animation-delay: -1.7s; }
.s6 { animation-delay: -2.12s; } .s7 { animation-delay: -2.55s; }

/* ══════════ nav / footer ══════════ */

.next {
  display: inline-flex; align-items: center; gap: .5rem;
  margin-top: .6rem;
  font: 600 1rem/1 var(--mono);
  text-decoration: none;
  padding: .75rem 1.1rem;
  border: 1px solid var(--rule);
  border-radius: 8px;
  background: var(--raise);
  transition: transform .22s cubic-bezier(.2,.7,.3,1), border-color .22s, box-shadow .22s;
}
.next:hover {
  transform: translateY(-2px);
  border-color: color-mix(in srgb, var(--accent) 50%, var(--rule));
  box-shadow: 0 0 0 4px var(--soft);
}
.next::after { content: "\2192"; transition: transform .22s ease; }
.next:hover::after { transform: translateX(3px); }
.next.back::after { content: none; }
.next.back::before { content: "\2190"; transition: transform .22s ease; }
.next.back:hover::before { transform: translateX(-3px); }

footer {
  padding: 3.2rem 0 4.5rem;
  border-top: 1px solid var(--rule);
  color: var(--muted);
  font: .95rem/1.68 var(--sans);
}
footer p { margin: 0 0 .6rem; max-width: var(--prose); }
footer p:last-child { margin-bottom: 0; }

@media (max-width: 34rem) {
  html { font-size: 17px; }
  .mark svg { width: 40px; height: 40px; }
  .hero { padding: 4.5rem 0 3rem; }
  section { padding: 3.2rem 0; }
  .stats { grid-template-columns: 1fr; }
  .stats .n { font-size: 2rem; }
  .figframe { padding: 1.1rem .7rem 1rem; }
  .fig-wide { display: none; }
  .fig-tall { display: block; }
}
