/* ============================================================
   Deiicode — presentational site
   Palette: bright white / cyan, anchored by deep teal-navy ink
   ============================================================ */

:root {
  --white: #ffffff;
  --tint: #f2fbfd;          /* faint cyan-tinted ground */
  --tint-2: #e6f6fa;
  --ink: #0a2540;           /* deep teal-navy text */
  --ink-soft: #3e5c6e;      /* secondary text */
  --muted: #6b8494;         /* captions */
  --cyan: #06b6d4;
  --cyan-bright: #22d3ee;
  --cyan-deep: #0891b2;
  --line: #d3ebf1;          /* hairline borders */
  --line-strong: #b6dfe8;

  --shadow-sm: 0 1px 2px rgba(10, 37, 64, .04), 0 4px 16px rgba(6, 182, 212, .06);
  --shadow-md: 0 10px 30px rgba(10, 37, 64, .08), 0 2px 8px rgba(6, 182, 212, .08);
  --shadow-glow: 0 24px 60px rgba(6, 182, 212, .22);

  --ff-display: "Space Grotesk", system-ui, sans-serif;
  --ff-body: "Inter", system-ui, sans-serif;
  --ff-mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", monospace;

  --r: 16px;
  --r-sm: 10px;
  --wrap: 1140px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--ff-body);
  color: var(--ink);
  background: var(--white);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: 24px; }

a { color: inherit; text-decoration: none; }

.skip-link {
  position: absolute; left: -999px; top: 8px; z-index: 100;
  background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 8px;
}
.skip-link:focus { left: 8px; }

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

/* ---------- Shared type ---------- */
.eyebrow {
  font-family: var(--ff-mono);
  font-size: .82rem;
  letter-spacing: .04em;
  color: var(--cyan-deep);
  margin-bottom: 14px;
}

.section__title {
  font-family: var(--ff-display);
  font-weight: 700;
  font-size: clamp(1.7rem, 3.6vw, 2.7rem);
  line-height: 1.1;
  letter-spacing: -.02em;
  margin-bottom: 36px;
  max-width: 20ch;
}

.grad {
  background: linear-gradient(100deg, var(--cyan-deep), var(--cyan-bright));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ---------- Nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, .82);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.nav__inner { display: flex; align-items: center; gap: 22px; height: 68px; }

.logo {
  font-family: var(--ff-mono);
  font-weight: 500;
  font-size: 1.05rem;
  letter-spacing: -.01em;
  display: inline-flex; align-items: baseline;
}
.logo__bracket { color: var(--cyan); font-weight: 600; }
.logo__name { color: var(--ink); }
.logo--sm { font-size: .95rem; }

.nav__links { display: flex; align-items: center; gap: 30px; margin-left: auto; }
.nav__links a {
  font-size: .95rem; font-weight: 500; color: var(--ink-soft);
  transition: color .18s ease;
}
.nav__links a:hover { color: var(--cyan-deep); }
.nav__cta {
  background: var(--ink); color: #fff !important;
  padding: 9px 18px; border-radius: 999px;
  transition: transform .18s ease, box-shadow .18s ease;
}
.nav__cta:hover { transform: translateY(-1px); box-shadow: var(--shadow-md); }

/* Language switcher */
.lang { display: inline-flex; align-items: center; gap: 4px; padding: 4px; background: var(--tint); border: 1px solid var(--line); border-radius: 999px; }
.lang__btn {
  display: inline-flex; align-items: center; gap: 7px;
  font-family: var(--ff-mono); font-size: .78rem; font-weight: 500; color: var(--muted);
  background: transparent; border: 0; cursor: pointer;
  padding: 6px 11px; border-radius: 999px;
  transition: background .18s ease, color .18s ease;
}
.lang__btn:hover { color: var(--ink); }
.lang__btn.is-active { background: #fff; color: var(--ink); box-shadow: var(--shadow-sm); }
.lang .flag {
  width: 20px; height: 14px; border-radius: 3px; display: block;
  box-shadow: 0 0 0 1px rgba(10, 37, 64, .12); flex: none;
}

/* Hamburger toggle (hidden on desktop) */
.nav__toggle {
  display: none; align-items: center; justify-content: center;
  width: 42px; height: 42px; padding: 0; border: 1px solid var(--line);
  background: var(--tint); border-radius: 12px; cursor: pointer;
  flex-direction: column; gap: 5px;
}
.nav__toggle-bar {
  display: block; width: 20px; height: 2px; border-radius: 2px;
  background: var(--ink); transition: transform .22s ease, opacity .22s ease;
}
.nav--open .nav__toggle-bar:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav--open .nav__toggle-bar:nth-child(2) { opacity: 0; }
.nav--open .nav__toggle-bar:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--ff-body); font-weight: 600; font-size: .98rem;
  padding: 14px 26px; border-radius: 999px;
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
  cursor: pointer;
}
.btn--primary {
  color: #fff;
  background: linear-gradient(100deg, var(--cyan-deep), var(--cyan));
  box-shadow: var(--shadow-md);
}
.btn--primary:hover { transform: translateY(-2px); box-shadow: var(--shadow-glow); }
.btn--ghost {
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line-strong);
}
.btn--ghost:hover { border-color: var(--cyan); color: var(--cyan-deep); transform: translateY(-2px); }

/* ---------- Hero ---------- */
.hero { position: relative; overflow: hidden; padding: clamp(56px, 9vw, 104px) 0 clamp(48px, 7vw, 88px); }
.hero__blueprint {
  position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background-image:
    linear-gradient(rgba(6, 182, 212, .06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(6, 182, 212, .06) 1px, transparent 1px);
  background-size: 40px 40px;
  -webkit-mask-image: radial-gradient(120% 90% at 70% 0%, #000 0%, transparent 72%);
  mask-image: radial-gradient(120% 90% at 70% 0%, #000 0%, transparent 72%);
}
.hero__grid {
  position: relative; z-index: 1;
  display: grid; grid-template-columns: 1.05fr .95fr; gap: 56px; align-items: center;
}
.hero__title {
  font-family: var(--ff-display); font-weight: 700;
  font-size: clamp(2.4rem, 6vw, 4.3rem);
  line-height: 1.02; letter-spacing: -.03em; margin-bottom: 22px;
}
.hero__lead { font-size: 1.12rem; color: var(--ink-soft); max-width: 46ch; margin-bottom: 30px; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 44px; }

.hero__stats {
  list-style: none; display: flex; gap: 36px; flex-wrap: wrap;
  padding-top: 28px; border-top: 1px solid var(--line);
}
.hero__stats li { display: flex; flex-direction: column; }
.hero__stats strong {
  font-family: var(--ff-display); font-weight: 700; font-size: 1.9rem;
  color: var(--ink); line-height: 1;
}
.hero__stats span { font-size: .85rem; color: var(--muted); margin-top: 6px; }

/* Signature code card */
.hero__code { position: relative; z-index: 1; }
.code-card {
  background: linear-gradient(180deg, #08344a, #072536);
  border-radius: var(--r); overflow: hidden;
  box-shadow: var(--shadow-glow);
  border: 1px solid rgba(34, 211, 238, .25);
  transform: perspective(1200px) rotateY(-6deg) rotateX(2deg);
}
.code-card__bar {
  display: flex; align-items: center; gap: 8px;
  padding: 14px 16px; background: rgba(255, 255, 255, .04);
  border-bottom: 1px solid rgba(34, 211, 238, .18);
}
.code-card__bar .dot { width: 11px; height: 11px; border-radius: 50%; background: rgba(255,255,255,.22); }
.code-card__bar .dot:first-child { background: #ff5f57; }
.code-card__bar .dot:nth-child(2) { background: #febc2e; }
.code-card__bar .dot:nth-child(3) { background: #28c840; }
.code-card__file { margin-left: 10px; font-family: var(--ff-mono); font-size: .8rem; color: #7fb9c9; }
.code-card__body {
  margin: 0; padding: 22px 22px 26px;
  font-family: var(--ff-mono); font-size: .92rem; line-height: 1.75;
  color: #cfeef5; white-space: pre-wrap; min-height: 260px;
}
.tok-key { color: #7dd3fc; }
.tok-str { color: #6ee7b7; }
.tok-num { color: #fca5a5; }
.tok-com { color: #5a7f8d; font-style: italic; }
.cursor { display: inline-block; color: var(--cyan-bright); font-weight: 700; }
.cursor.blink { animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }

/* ---------- Sections ---------- */
.section { padding: clamp(64px, 9vw, 108px) 0; }
.section--tint { background: var(--tint); border-block: 1px solid var(--line); }

/* Reveal on scroll */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .6s ease, transform .6s ease; }
.reveal.in { opacity: 1; transform: none; }

/* ---------- Cards grid ---------- */
.cards { display: grid; gap: 22px; }
.cards--3 { grid-template-columns: repeat(3, 1fr); }
.cards--2 { grid-template-columns: repeat(2, 1fr); }

.card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--r);
  padding: 30px 28px; box-shadow: var(--shadow-sm);
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: var(--line-strong); }
.card__idx {
  font-family: var(--ff-mono); font-size: .82rem; color: var(--cyan);
  display: inline-block; margin-bottom: 16px;
  padding: 3px 9px; border: 1px solid var(--line-strong); border-radius: 6px;
}
.card h3 { font-family: var(--ff-display); font-weight: 600; font-size: 1.2rem; margin-bottom: 10px; }
.card p { color: var(--ink-soft); font-size: .98rem; }

/* ---------- Team ---------- */
.team { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.member {
  position: relative; overflow: hidden;
  background: #fff; border: 1px solid var(--line); border-radius: var(--r);
  padding: 34px 32px; box-shadow: var(--shadow-sm);
  transition: transform .2s ease, box-shadow .2s ease;
}
.member::before {
  content: ""; position: absolute; inset: 0 auto 0 0; width: 5px;
  background: linear-gradient(180deg, var(--cyan-bright), var(--cyan-deep));
}
.member:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.member__role {
  display: inline-block; font-family: var(--ff-mono); font-size: .78rem;
  color: var(--cyan-deep); background: var(--tint-2);
  padding: 5px 12px; border-radius: 999px; margin-bottom: 18px;
}
.member__name { font-family: var(--ff-display); font-weight: 700; font-size: 1.55rem; letter-spacing: -.01em; }
.member__title { color: var(--cyan-deep); font-weight: 600; font-size: .98rem; margin: 4px 0 14px; }
.member__bio { color: var(--ink-soft); margin-bottom: 20px; }

.tags { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; }
.tags li {
  font-family: var(--ff-mono); font-size: .78rem; color: var(--ink-soft);
  background: var(--tint); border: 1px solid var(--line);
  padding: 5px 11px; border-radius: 7px;
}

/* ---------- Services ---------- */
.services { list-style: none; display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.service { background: #fff; padding: 30px 28px; transition: background .2s ease; }
.service:hover { background: var(--tint); }
.service h3 { font-family: var(--ff-display); font-weight: 600; font-size: 1.15rem; margin-bottom: 8px; }
.service h3::before { content: "→ "; color: var(--cyan); }
.service p { color: var(--ink-soft); font-size: .96rem; }

/* ---------- Projects ---------- */
.project {
  display: block; background: #fff; border: 1px solid var(--line);
  border-radius: var(--r); padding: 30px 28px; box-shadow: var(--shadow-sm);
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.project:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: var(--cyan); }
.project__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.project__url { font-family: var(--ff-mono); font-weight: 500; font-size: 1.1rem; color: var(--ink); }
.project__go { color: var(--cyan); font-size: 1.2rem; transition: transform .2s ease; }
.project:hover .project__go { transform: translate(3px, -3px); }
.project__desc { color: var(--ink-soft); margin-bottom: 18px; }

/* ---------- Contact ---------- */
.contact__inner { display: grid; grid-template-columns: 1.1fr .9fr; gap: 48px; align-items: center; }
.contact__lead { color: var(--ink-soft); font-size: 1.08rem; max-width: 40ch; }
.contact__card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--r);
  padding: 12px 26px 26px; box-shadow: var(--shadow-md);
}
.contact__row {
  display: flex; flex-direction: column; gap: 3px;
  padding: 18px 0; border-bottom: 1px solid var(--line);
}
.contact__row:last-of-type { border-bottom: none; }
.contact__label { font-family: var(--ff-mono); font-size: .78rem; color: var(--muted); }
.contact__val { font-size: 1.06rem; font-weight: 500; color: var(--ink); }
a.contact__row:hover .contact__val { color: var(--cyan-deep); }
.contact__btn { width: 100%; margin-top: 22px; }

/* ---------- Footer ---------- */
.footer { padding: 34px 0; border-top: 1px solid var(--line); background: var(--white); }
.footer__inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.footer__inner p { color: var(--muted); font-size: .88rem; }

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .wrap { padding-inline: 20px; }
  .hero__grid { gap: 40px; }
}

@media (max-width: 900px) {
  .hero__grid { grid-template-columns: 1fr; gap: 40px; }
  .hero__code { order: -1; max-width: 440px; margin-inline: auto; width: 100%; }
  .code-card { transform: none; }
  .cards--3 { grid-template-columns: 1fr; }
  .team { grid-template-columns: 1fr; }
  .services { grid-template-columns: 1fr 1fr; }
  .contact__inner { grid-template-columns: 1fr; gap: 32px; }
  .hero__code { display: none; }
}

/* Mobile navigation (hamburger) */
@media (max-width: 860px) {
  .nav__toggle { display: inline-flex; order: 3; }
  .lang { order: 2; margin-left: auto; }
  .nav__inner { gap: 12px; }

  .nav__links {
    position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    margin-left: 0; padding: 8px 20px 18px;
    background: #fff; border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow-md);
    max-height: 0; overflow: hidden; opacity: 0; visibility: hidden;
    transition: max-height .32s ease, opacity .25s ease, padding .32s ease, visibility .32s;
  }
  .nav--open .nav__links { max-height: 440px; opacity: 1; visibility: visible; }
  .nav__links a {
    font-size: 1.05rem; padding: 15px 4px;
    border-bottom: 1px solid var(--line);
  }
  .nav__links a.nav__cta {
    border-bottom: none; margin-top: 14px; padding: 15px;
    text-align: center; border-radius: 12px;
  }
}

@media (max-width: 620px) {
  .cards--2 { grid-template-columns: 1fr; }
  .services { grid-template-columns: 1fr; }
  .hero__actions { gap: 10px; }
  .hero__actions .btn { flex: 1 1 auto; }
  .hero__stats { gap: 22px 28px; }
  .section__title { margin-bottom: 28px; }
  .card, .member, .service, .project { padding: 24px 22px; }
  .contact__card { padding: 8px 20px 22px; }
}

@media (max-width: 400px) {
  .wrap { padding-inline: 16px; }
  .hero__title { font-size: clamp(2rem, 9vw, 2.4rem); }
  .hero__stats { gap: 18px 24px; }
  .hero__stats strong { font-size: 1.6rem; }
  .lang__btn { padding: 6px 9px; gap: 5px; }
  .code-card__body { font-size: .82rem; padding: 18px 16px 22px; min-height: 220px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .cursor.blink { animation: none; }
  * { transition: none !important; }
}
