/* ============================================================
   vynqera.me — visual system
   editorial dark · cinematic scale · one restrained accent
   (same language as baios.me, different signal colour)
   ============================================================ */

:root {
  /* warm near-black, not blue-black — this is what kills the "cheap" feel */
  --bg:        #0b0a09;
  --bg-1:      #100e0c;
  --bg-2:      #17140f;
  --line:      rgba(255,255,255,.075);
  --line-2:    rgba(255,255,255,.14);

  --fg:        #f2efe9;
  --fg-2:      #9c968c;
  --fg-3:      #5f5a52;

  /* single accent: moss green. no cyan, no neon purple. */
  --accent:    #9ec46a;
  --accent-2:  #c24327;

  --font-display: "Instrument Serif", Georgia, serif;
  --font-sans:    "Inter", "Segoe UI", system-ui, sans-serif;
  --font-mono:    "JetBrains Mono", "SFMono-Regular", Consolas, monospace;

  --pad: clamp(22px, 6vw, 120px);
  --maxw: 1440px;

  --ease: cubic-bezier(.16, 1, .3, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

::selection { background: var(--accent); color: #0b0a09; }
a { color: inherit; text-decoration: none; }
canvas { display: block; }

main, header, footer { position: relative; z-index: 2; }

/* ---------- film grain: the single texture, used everywhere ---------- */

.grain {
  position: fixed;
  inset: -50%;
  z-index: 3;
  pointer-events: none;
  opacity: .038;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='200' height='200' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grain 8s steps(10) infinite;
}
@keyframes grain {
  0%,100% { transform: translate(0,0); }
  10% { transform: translate(-4%,-4%); }
  30% { transform: translate(3%,-6%); }
  50% { transform: translate(-3%,5%); }
  70% { transform: translate(5%,3%); }
  90% { transform: translate(-2%,-3%); }
}

.wrap {
  max-width: var(--maxw);
  margin: 0 auto;
  padding-inline: var(--pad);
}

/* ---------- nav ---------- */

.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 50;
  transition: transform .5s var(--ease), background .5s, border-color .5s;
  border-bottom: 1px solid transparent;
}
.nav.solid {
  background: rgba(11,10,9,.72);
  backdrop-filter: blur(20px) saturate(160%);
  border-bottom-color: var(--line);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 76px;
}
.brand {
  font-size: 15px;
  font-weight: 500;
  letter-spacing: -.01em;
}
.brand em {
  font-style: normal;
  color: var(--fg-3);
}

.nav-links { display: flex; gap: 40px; align-items: center; }
.nav-links a {
  font-size: 13.5px;
  color: var(--fg-2);
  transition: color .3s;
}
.nav-links a:hover { color: var(--fg); }

.nav-cta {
  font-size: 13.5px;
  padding: 10px 22px;
  border: 1px solid var(--line-2);
  border-radius: 100px;
  transition: background .35s var(--ease), color .35s, border-color .35s;
}
.nav-cta:hover { background: var(--fg); color: var(--bg); border-color: var(--fg); }

/* language switch — grouped with the CTA on the right */
.nav-right { display: flex; align-items: center; gap: 16px; }
.lang {
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: .1em;
  color: var(--fg-2);
  border: 1px solid var(--line-2);
  border-radius: 100px;
  padding: 9px 15px;
  transition: color .3s, border-color .3s;
}
.lang:hover { color: var(--fg); border-color: var(--fg); }

.burger { display: none; }

/* ---------- hero ---------- */

.hero {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
  padding-top: 76px;
}
#net {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  opacity: .5;
}
/* .hero is a column flex container, so an auto-margin .wrap would
   shrink-wrap and centre itself instead of filling the grid — force it. */
.hero .wrap { position: relative; z-index: 2; width: 100%; }

.hero-tag {
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--fg-3);
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 46px;
}
.hero-tag .live {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 12px var(--accent);
  animation: breathe 2.6s ease-in-out infinite;
}
@keyframes breathe {
  0%,100% { opacity: 1; }
  50% { opacity: .3; }
}

h1.title {
  font-family: var(--font-sans);
  font-size: clamp(46px, 9.2vw, 148px);
  /* CJK glyphs fill the full em box — leading below ~1.05 collides,
     and tracking tighter than -.02em makes adjacent strokes touch */
  line-height: 1.06;
  letter-spacing: -.015em;
  font-weight: 500;
  max-width: 15ch;
}
h1.title .thin {
  color: var(--fg-2);
  font-weight: 300;
}
h1.title .mark {
  position: relative;
  display: inline-block;
}
h1.title .mark::after {
  content: "";
  position: absolute;
  left: 0; bottom: 0;
  width: 100%; height: .04em;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  animation: underline 1.1s var(--ease) .7s forwards;
}
@keyframes underline { to { transform: scaleX(1); } }

.hero-foot {
  margin-top: clamp(48px, 7vw, 92px);
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 48px;
  flex-wrap: wrap;
}
.hero-lede {
  max-width: 44ch;
  color: var(--fg-2);
  font-size: clamp(15px, 1.15vw, 17px);
  line-height: 1.72;
}
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }

.btn {
  font-size: 14px;
  padding: 15px 30px;
  border-radius: 100px;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  transition: transform .4s var(--ease), background .35s, color .35s, border-color .35s;
  white-space: nowrap;
}
.btn-solid { background: var(--fg); color: var(--bg); }
.btn-solid:hover { background: var(--accent); color: var(--bg); transform: translateY(-2px); }
.btn-ghost { border: 1px solid var(--line-2); color: var(--fg); }
.btn-ghost:hover { border-color: var(--fg); transform: translateY(-2px); }

/* ---------- marquee ticker ---------- */

.ticker {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  overflow: hidden;
  padding-block: 20px;
  white-space: nowrap;
  position: relative;
  z-index: 2;
}
.ticker-track {
  display: inline-flex;
  gap: 56px;
  animation: slide 34s linear infinite;
  font-size: 13px;
  color: var(--fg-3);
  letter-spacing: .02em;
}
.ticker-track span { display: inline-flex; align-items: center; gap: 14px; }
.ticker-track span::before {
  content: "";
  width: 4px; height: 4px;
  background: var(--accent);
  border-radius: 50%;
  opacity: .8;
}
@keyframes slide {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* ---------- section scaffolding ---------- */

section { padding-block: clamp(96px, 13vw, 200px); }

.sec-label {
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--fg-3);
  margin-bottom: 30px;
}
.sec-h {
  font-size: clamp(30px, 4.6vw, 62px);
  line-height: 1.16;
  letter-spacing: -.028em;
  font-weight: 400;
  max-width: 22ch;
  margin-bottom: 72px;
}
.sec-h .dim { color: var(--fg-3); }

/* ---------- services (editorial list, not cards) ---------- */

.svc-list { border-top: 1px solid var(--line); }
.svc {
  display: grid;
  grid-template-columns: 72px 1fr 1.1fr;
  gap: 40px;
  padding: 42px 0;
  border-bottom: 1px solid var(--line);
  position: relative;
  transition: padding-left .5s var(--ease);
}
.svc::before {
  content: "";
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 2px;
  background: var(--accent);
  transform: scaleY(0);
  transform-origin: top;
  transition: transform .5s var(--ease);
}
.svc:hover { padding-left: 30px; }
.svc:hover::before { transform: scaleY(1); }
.svc-num {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--fg-3);
  padding-top: 6px;
}
.svc h3 {
  font-size: clamp(21px, 2.3vw, 30px);
  font-weight: 400;
  letter-spacing: -.02em;
  line-height: 1.15;
}
.svc-body p { color: var(--fg-2); font-size: 15px; max-width: 46ch; }
.svc-body ul {
  margin-top: 20px;
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.svc-body li {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--fg-3);
  border: 1px solid var(--line);
  border-radius: 100px;
  padding: 4px 12px;
}

/* ---------- capabilities ---------- */

.cap-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}
.cap {
  background: var(--bg);
  padding: 40px 32px 44px;
  transition: background .45s var(--ease);
}
.cap:hover { background: var(--bg-1); }
.cap-k {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .12em;
  color: var(--fg-3);
  text-transform: uppercase;
}
.cap-v {
  margin-top: 26px;
  font-size: clamp(44px, 5.5vw, 72px);
  font-weight: 300;
  letter-spacing: -.04em;
  line-height: 1;
  color: var(--fg);
  display: flex;
  align-items: flex-start;
  gap: 4px;
}
.cap-v small {
  font-size: .3em;
  color: var(--fg-3);
  margin-top: .35em;
  letter-spacing: 0;
}
.cap-note {
  margin-top: 18px;
  color: var(--fg-2);
  font-size: 13.5px;
  line-height: 1.6;
}

/* ---------- work ---------- */

.work-list { display: grid; gap: 0; border-top: 1px solid var(--line); }
.work {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  border-bottom: 1px solid var(--line);
  align-items: stretch;
  min-height: 340px;
}
.work:nth-child(even) .work-body { order: 2; }
.work-body {
  padding: 46px 56px 46px 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.work:nth-child(even) .work-body { padding: 46px 0 46px 56px; }
.work-k {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .14em;
  color: var(--fg-3);
  text-transform: uppercase;
  margin-bottom: 24px;
}
.work h3 {
  font-size: clamp(24px, 3vw, 40px);
  font-weight: 400;
  letter-spacing: -.022em;
  line-height: 1.2;
  margin-bottom: 18px;
}
.work p { color: var(--fg-2); font-size: 15px; max-width: 48ch; }
.work-tags {
  margin-top: 26px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--fg-3);
}
.work-tags span { border-bottom: 1px solid var(--line-2); padding-bottom: 2px; }

.work-vis {
  position: relative;
  overflow: hidden;
  background: var(--bg-1);
  border-left: 1px solid var(--line);
  border-right: 1px solid var(--line);
}
.work:nth-child(odd) .work-vis { order: 2; }
.work-vis canvas { width: 100%; height: 100%; display: block; }

/* ---------- contact ---------- */

.contact { text-align: center; }
.contact .sec-label { display: block; }
.contact h2 {
  font-size: clamp(34px, 6.4vw, 96px);
  font-weight: 400;
  letter-spacing: -.032em;
  line-height: 1.16;
  max-width: 18ch;
  margin: 0 auto 32px;
}
.contact p {
  color: var(--fg-2);
  max-width: 50ch;
  margin: 0 auto 44px;
  font-size: 15.5px;
}
.contact-actions {
  display: flex;
  gap: 16px;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
}
.mailto {
  font-size: clamp(15px, 1.6vw, 19px);
  color: var(--fg-2);
  border-bottom: 1px solid var(--line-2);
  padding-bottom: 3px;
  transition: color .3s, border-color .3s;
}
.mailto:hover { color: var(--accent); border-color: var(--accent); }

/* ---------- footer ---------- */

footer {
  border-top: 1px solid var(--line);
  padding-block: 48px;
}
.foot {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  font-size: 13px;
  color: var(--fg-3);
}
.foot-links { display: flex; gap: 30px; flex-wrap: wrap; }
.foot a { transition: color .3s; }
.foot a:hover { color: var(--fg); }

/* ---------- reveal ---------- */

.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 1s var(--ease), transform 1s var(--ease);
}
.reveal.in { opacity: 1; transform: none; }

.line-wrap { overflow: hidden; }
.line-wrap > * { display: block; }

/* ---------- per-script typography ----------
   Latin display type wants tighter tracking and leading than CJK:
   CJK glyphs fill the full em box, so leading under ~1.05 collides,
   while Latin at 1.16 looks loose. */

html[lang="en"] h1.title {
  font-size: clamp(44px, 8.6vw, 138px);
  line-height: 1.0;
  letter-spacing: -.038em;
  max-width: 13ch;
}
html[lang="en"] .sec-h { line-height: 1.06; letter-spacing: -.03em; }
html[lang="en"] .contact h2 { line-height: 1.04; letter-spacing: -.038em; }
html[lang="en"] .work h3 { line-height: 1.12; letter-spacing: -.026em; }
html[lang="en"] .svc h3 { line-height: 1.16; letter-spacing: -.024em; }

/* ---------- mobile ---------- */

@media (max-width: 940px) {
  .nav-links {
    position: fixed;
    inset: 76px 0 auto 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    background: rgba(11,10,9,.98);
    backdrop-filter: blur(24px);
    border-bottom: 1px solid var(--line);
    padding: 8px var(--pad) 28px;
    transform: translateY(-130%);
    transition: transform .5s var(--ease);
  }
  .nav-links.open { transform: none; }
  .nav-links a { font-size: 20px; padding-block: 18px; border-bottom: 1px solid var(--line); width: 100%; }
  .nav-cta { display: none; }
  .nav-right { margin-left: auto; margin-right: 14px; }
  .burger {
    display: flex;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: 0;
    cursor: pointer;
    padding: 8px;
  }
  .burger i { display: block; width: 24px; height: 1.5px; background: var(--fg); transition: transform .35s var(--ease), opacity .35s; }
  .burger.x i:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
  .burger.x i:nth-child(2) { opacity: 0; }
  .burger.x i:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

  .hero { min-height: auto; padding-block: 130px 80px; }
  .hero-foot { flex-direction: column; align-items: flex-start; }

  .svc { grid-template-columns: 1fr; gap: 16px; padding: 32px 0; }
  .svc:hover { padding-left: 16px; }
  .work { grid-template-columns: 1fr; min-height: auto; }
  .work-body,
  .work:nth-child(even) .work-body { padding: 34px 0; order: 1; }
  .work-vis { order: 2 !important; height: 220px; border: 1px solid var(--line); }
}
