/* =========================================================
   BLUEBIRD INFOTECH — Design System
   Monochrome · Syne + Manrope · Light/Dark
   ========================================================= */

/* ---------- Tokens ---------- */
:root {
  /* Light theme (default) */
  --paper: #FAFAF8;
  --paper-pure: #FFFFFF;
  --ink: #0A0A0A;
  --ink-soft: #1A1A1A;
  --muted: #6B6B6B;
  --line: rgba(10, 10, 10, 0.12);
  --line-strong: rgba(10, 10, 10, 0.85);
  --card: #FFFFFF;
  --card-2: #F2F2EF;
  --invert-bg: #0A0A0A;
  --invert-fg: #FAFAF8;
  --shadow: 0 24px 60px -28px rgba(10, 10, 10, 0.30);
  --grain-opacity: 0.035;

  /* Type */
  --display: "Syne", system-ui, sans-serif;
  --body: "Manrope", system-ui, sans-serif;

  /* Scale */
  --step--1: clamp(0.78rem, 0.74rem + 0.2vw, 0.86rem);
  --step-0: clamp(0.95rem, 0.9rem + 0.25vw, 1.05rem);
  --step-1: clamp(1.2rem, 1.05rem + 0.7vw, 1.5rem);
  --step-2: clamp(1.55rem, 1.25rem + 1.5vw, 2.3rem);
  --step-3: clamp(2.1rem, 1.5rem + 3vw, 3.6rem);
  --step-4: clamp(2.6rem, 1.6rem + 5vw, 5.2rem);
  --step-5: clamp(3rem, 1.6rem + 7vw, 7rem);

  /* Space */
  --gut: clamp(1.25rem, 4vw, 3.75rem);
  --sec: clamp(4.5rem, 9vw, 9rem);
  --radius: 4px;

  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

[data-theme="dark"] {
  --paper: #0A0A0A;
  --paper-pure: #0E0E0E;
  --ink: #FAFAF8;
  --ink-soft: #E8E8E5;
  --muted: #9A9A97;
  --line: rgba(250, 250, 248, 0.14);
  --line-strong: rgba(250, 250, 248, 0.9);
  --card: #131313;
  --card-2: #161616;
  --invert-bg: #FAFAF8;
  --invert-fg: #0A0A0A;
  --shadow: 0 24px 60px -28px rgba(0, 0, 0, 0.9);
  --grain-opacity: 0.05;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: none; cursor: pointer; }

body {
  font-family: var(--body);
  font-size: var(--step-0);
  line-height: 1.6;
  color: var(--ink);
  background: var(--paper);
  font-feature-settings: "ss01", "cv01";
  -webkit-font-smoothing: antialiased;
  transition: background 0.5s var(--ease), color 0.5s var(--ease);
  overflow-x: hidden;
}

/* grain overlay */
body::after {
  content: "";
  position: fixed; inset: 0;
  pointer-events: none; z-index: 9000;
  opacity: var(--grain-opacity);
  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='0.9' numOctaves='3'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---------- Layout ---------- */
.wrap { width: min(1320px, 100% - (var(--gut) * 2)); margin-inline: auto; }
.section { padding-block: var(--sec); }
.eyebrow {
  font-family: var(--body);
  font-size: var(--step--1);
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
  display: inline-flex; align-items: center; gap: 0.7em;
}
.eyebrow::before {
  content: ""; width: 28px; height: 1px; background: var(--line-strong);
  display: inline-block;
}

h1, h2, h3, h4 { font-family: var(--display); font-weight: 700; line-height: 1.02; letter-spacing: -0.02em; }
.display { font-size: var(--step-4); font-weight: 800; }
.h-xl { font-size: var(--step-5); font-weight: 800; line-height: 0.92; }
.h-1 { font-size: var(--step-3); }
.h-2 { font-size: var(--step-2); }
.lead { font-size: var(--step-1); color: var(--ink-soft); max-width: 40ch; line-height: 1.45; }
.muted { color: var(--muted); }

/* ---------- Buttons ---------- */
.btn {
  position: relative; display: inline-flex; align-items: center; gap: 0.6em;
  padding: 0.95em 1.6em; border-radius: 100px;
  font-family: var(--body); font-weight: 600; font-size: var(--step-0);
  border: 1px solid var(--line-strong);
  transition: transform 0.4s var(--ease), background 0.35s var(--ease), color 0.35s var(--ease);
  will-change: transform; overflow: hidden;
}
.btn .arr { transition: transform 0.4s var(--ease); }
.btn:hover .arr { transform: translateX(4px); }
.btn--solid { background: var(--invert-bg); color: var(--invert-fg); border-color: var(--invert-bg); }
.btn--solid:hover { background: transparent; color: var(--ink); border-color: var(--line-strong); }
.btn--ghost:hover { background: var(--invert-bg); color: var(--invert-fg); }

/* ---------- Header ---------- */
.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 1000;
  padding-block: 1.1rem;
  transition: padding 0.4s var(--ease), background 0.4s var(--ease), border-color 0.4s var(--ease);
  border-bottom: 1px solid transparent;
}
.site-header.scrolled {
  padding-block: 0.7rem;
  background: color-mix(in srgb, var(--paper) 78%, transparent);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.nav { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; }
.brand { display: flex; align-items: center; gap: 0.6rem; font-family: var(--display); font-weight: 800; font-size: 1.25rem; letter-spacing: -0.03em; }
.brand .dot { width: 11px; height: 11px; border-radius: 50%; background: var(--ink); display: inline-block; }
.brand small { font-family: var(--body); font-weight: 600; font-size: 0.6rem; letter-spacing: 0.18em; color: var(--muted); display: block; line-height: 1; }
.nav-links { display: flex; align-items: center; gap: 0.3rem; }
.nav-links a {
  position: relative; padding: 0.5rem 0.85rem; font-weight: 500; font-size: var(--step-0);
  border-radius: 100px; transition: color 0.3s var(--ease);
}
.nav-links a::after {
  content: ""; position: absolute; left: 0.85rem; right: 0.85rem; bottom: 0.35rem; height: 1px;
  background: var(--ink); transform: scaleX(0); transform-origin: left; transition: transform 0.4s var(--ease);
}
.nav-links a:hover::after, .nav-links a[aria-current="page"]::after { transform: scaleX(1); }
.nav-right { display: flex; align-items: center; gap: 0.7rem; }

/* theme toggle */
.theme-toggle {
  width: 42px; height: 42px; border-radius: 50%; border: 1px solid var(--line);
  display: grid; place-items: center; transition: transform 0.5s var(--ease), border-color 0.3s;
}
.theme-toggle:hover { transform: rotate(40deg); border-color: var(--line-strong); }
.theme-toggle svg { width: 18px; height: 18px; }
.theme-toggle .moon { display: none; }
[data-theme="dark"] .theme-toggle .sun { display: none; }
[data-theme="dark"] .theme-toggle .moon { display: block; }

/* mobile nav */
.burger { display: none; width: 42px; height: 42px; border: 1px solid var(--line); border-radius: 50%; }
.burger span { display: block; width: 16px; height: 1.5px; background: var(--ink); margin: 3px auto; transition: 0.35s var(--ease); }
.mobile-menu {
  position: fixed; inset: 0; z-index: 999; background: var(--paper);
  display: flex; flex-direction: column; justify-content: center; padding: var(--gut);
  transform: translateY(-100%); transition: transform 0.6s var(--ease); visibility: hidden;
}
.mobile-menu.open { transform: translateY(0); visibility: visible; }
.mobile-menu a { font-family: var(--display); font-weight: 700; font-size: clamp(2rem, 9vw, 3.5rem); padding-block: 0.3rem; opacity: 0; transform: translateY(20px); }
.mobile-menu.open a { animation: slideUp 0.6s var(--ease) forwards; }
.mobile-menu.open a:nth-child(1) { animation-delay: 0.1s; }
.mobile-menu.open a:nth-child(2) { animation-delay: 0.16s; }
.mobile-menu.open a:nth-child(3) { animation-delay: 0.22s; }
.mobile-menu.open a:nth-child(4) { animation-delay: 0.28s; }
.mobile-menu.open a:nth-child(5) { animation-delay: 0.34s; }
.mobile-menu .m-meta { margin-top: 2.5rem; font-family: var(--body); }
@keyframes slideUp { to { opacity: 1; transform: translateY(0); } }

/* ---------- Hero ---------- */
.hero { padding-top: clamp(8rem, 16vh, 12rem); padding-bottom: var(--sec); position: relative; }
.hero .est { margin-bottom: 1.5rem; }
.hero-title { margin-bottom: 1.8rem; }
.hero-title .line { display: block; overflow: hidden; }
.hero-title .line > span { display: block; transform: translateY(110%); }
.hero-foot { display: flex; flex-wrap: wrap; gap: 1.5rem 2.5rem; align-items: center; margin-top: 2.5rem; }
.hero-foot .cta-row { display: flex; gap: 0.8rem; flex-wrap: wrap; }

/* ---------- Marquee ---------- */
.marquee { border-block: 1px solid var(--line); padding-block: 1.2rem; overflow: hidden; white-space: nowrap; }
.marquee-track { display: inline-flex; gap: 3rem; animation: scrollX 28s linear infinite; will-change: transform; }
.marquee:hover .marquee-track { animation-play-state: paused; }
.marquee-track span { font-family: var(--display); font-weight: 700; font-size: var(--step-2); display: inline-flex; align-items: center; gap: 3rem; color: var(--ink); }
.marquee-track span::after { content: "✦"; font-size: 0.6em; color: var(--muted); }
@keyframes scrollX { to { transform: translateX(-50%); } }

/* ---------- Reveal ---------- */
.reveal { opacity: 0; transform: translateY(32px); transition: opacity 0.9s var(--ease), transform 0.9s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
.reveal[data-d="1"] { transition-delay: 0.08s; }
.reveal[data-d="2"] { transition-delay: 0.16s; }
.reveal[data-d="3"] { transition-delay: 0.24s; }
.reveal[data-d="4"] { transition-delay: 0.32s; }

/* ---------- Section head ---------- */
.sec-head { display: grid; grid-template-columns: 1fr; gap: 1rem; margin-bottom: clamp(2.5rem, 5vw, 4rem); }
.sec-head.split { grid-template-columns: 1.1fr 1fr; align-items: end; }
.sec-head p.lead { max-width: 46ch; }

/* ---------- Services index ---------- */
.svc-list { border-top: 1px solid var(--line); }
.svc-item {
  display: grid; grid-template-columns: auto 1fr auto; gap: clamp(1rem, 4vw, 3rem);
  align-items: center; padding-block: clamp(1.6rem, 3vw, 2.6rem);
  border-bottom: 1px solid var(--line); position: relative; transition: padding-left 0.5s var(--ease);
}
.svc-item .num { font-family: var(--display); font-weight: 700; font-size: var(--step-0); color: var(--muted); }
.svc-item .svc-name { font-family: var(--display); font-weight: 700; font-size: var(--step-2); letter-spacing: -0.02em; transition: transform 0.5s var(--ease); }
.svc-item .svc-desc { color: var(--muted); max-width: 38ch; font-size: var(--step-0); }
.svc-item .svc-go { width: 46px; height: 46px; border-radius: 50%; border: 1px solid var(--line); display: grid; place-items: center; transition: 0.45s var(--ease); }
.svc-item:hover { padding-left: 1.4rem; }
.svc-item:hover .svc-name { transform: translateX(4px); }
.svc-item:hover .svc-go { background: var(--invert-bg); color: var(--invert-fg); border-color: var(--invert-bg); transform: rotate(-45deg); }
@media (max-width: 760px) {
  .svc-item { grid-template-columns: auto 1fr; }
  .svc-item .svc-desc { grid-column: 1 / -1; }
  .svc-item .svc-go { display: none; }
}

/* ---------- Stats ---------- */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.stat { background: var(--paper); padding: clamp(1.8rem, 4vw, 3rem); }
.stat .n { font-family: var(--display); font-weight: 800; font-size: var(--step-3); line-height: 1; letter-spacing: -0.03em; }
.stat .l { color: var(--muted); font-size: var(--step--1); letter-spacing: 0.1em; text-transform: uppercase; margin-top: 0.6rem; }
@media (max-width: 760px) { .stats { grid-template-columns: repeat(2, 1fr); } }

/* ---------- Process ---------- */
.process { display: grid; grid-template-columns: repeat(5, 1fr); gap: 1.5rem; }
.proc-step { padding-top: 1.4rem; border-top: 2px solid var(--line-strong); }
.proc-step .pn { font-family: var(--display); font-weight: 700; font-size: var(--step--1); color: var(--muted); letter-spacing: 0.1em; }
.proc-step h3 { font-size: var(--step-1); margin: 0.5rem 0 0.6rem; }
.proc-step p { color: var(--muted); font-size: var(--step--1); }
@media (max-width: 900px) { .process { grid-template-columns: repeat(2, 1fr); gap: 2rem; } }
@media (max-width: 480px) { .process { grid-template-columns: 1fr; } }

/* ---------- Work cards ---------- */
.work-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: clamp(1.5rem, 4vw, 3rem); }
.work-card { position: relative; }
.work-card .frame { position: relative; aspect-ratio: 4/3; overflow: hidden; border-radius: var(--radius); background: var(--card-2); }
.work-card img { width: 100%; height: 100%; object-fit: cover; transition: transform 1s var(--ease), filter 0.6s var(--ease); filter: grayscale(1) contrast(1.02); }
.work-card:hover img { transform: scale(1.06); filter: grayscale(0); }
.work-card .tag { position: absolute; top: 1rem; left: 1rem; background: var(--invert-bg); color: var(--invert-fg); font-size: var(--step--1); padding: 0.3em 0.9em; border-radius: 100px; font-weight: 600; }
.work-card .meta { display: flex; justify-content: space-between; align-items: baseline; margin-top: 1.1rem; gap: 1rem; }
.work-card h3 { font-size: var(--step-1); }
.work-card .cat { color: var(--muted); font-size: var(--step--1); white-space: nowrap; }
@media (max-width: 720px) { .work-grid { grid-template-columns: 1fr; } }

/* ---------- Testimonials ---------- */
.quotes { display: grid; grid-template-columns: repeat(2, 1fr); gap: clamp(1.5rem, 4vw, 2.5rem); }
.quote { padding: clamp(1.8rem, 4vw, 2.8rem); border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); display: flex; flex-direction: column; gap: 1.5rem; }
.quote .mark { font-family: var(--display); font-size: 3rem; line-height: 0.5; color: var(--muted); }
.quote p { font-size: var(--step-1); line-height: 1.4; }
.quote .who { display: flex; align-items: center; gap: 0.9rem; margin-top: auto; }
.quote .who .av { width: 44px; height: 44px; border-radius: 50%; background: var(--invert-bg); color: var(--invert-fg); display: grid; place-items: center; font-family: var(--display); font-weight: 700; }
.quote .who b { display: block; }
.quote .who span { color: var(--muted); font-size: var(--step--1); }
@media (max-width: 720px) { .quotes { grid-template-columns: 1fr; } }

/* ---------- CTA band ---------- */
.cta-band { background: var(--invert-bg); color: var(--invert-fg); border-radius: clamp(8px, 2vw, 18px); padding: clamp(2.5rem, 7vw, 6rem); text-align: center; position: relative; overflow: hidden; }
.cta-band h2 { font-size: var(--step-4); margin-bottom: 1.5rem; }
.cta-band .btn { border-color: var(--invert-fg); }
.cta-band .btn--solid { background: var(--invert-fg); color: var(--invert-bg); }
.cta-band .btn--solid:hover { background: transparent; color: var(--invert-fg); }
.cta-band .orb { position: absolute; width: 60vmin; height: 60vmin; border-radius: 50%; border: 1px solid rgba(255,255,255,0.08); top: 50%; left: 50%; transform: translate(-50%,-50%); }
[data-theme="dark"] .cta-band .orb { border-color: rgba(0,0,0,0.08); }
.cta-band .orb:nth-child(2) { width: 40vmin; height: 40vmin; }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--line); padding-block: clamp(3rem, 6vw, 5rem) 2rem; }
.foot-top { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 2.5rem; }
.foot-brand .display { font-size: var(--step-3); line-height: 0.95; }
.foot-col h4 { font-family: var(--body); font-size: var(--step--1); letter-spacing: 0.15em; text-transform: uppercase; color: var(--muted); margin-bottom: 1.2rem; font-weight: 700; }
.foot-col a, .foot-col p { display: block; padding-block: 0.32rem; color: var(--ink-soft); transition: color 0.3s, transform 0.3s var(--ease); }
.foot-col a:hover { transform: translateX(5px); }
.foot-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem; margin-top: clamp(2.5rem, 6vw, 4rem); padding-top: 1.5rem; border-top: 1px solid var(--line); color: var(--muted); font-size: var(--step--1); }
@media (max-width: 800px) { .foot-top { grid-template-columns: 1fr 1fr; } .foot-brand { grid-column: 1 / -1; } }

/* ---------- Contact ---------- */
.contact-grid { display: grid; grid-template-columns: 1fr 1.1fr; gap: clamp(2rem, 5vw, 4rem); }
.contact-info .info-row { padding-block: 1.4rem; border-bottom: 1px solid var(--line); }
.contact-info .info-row:first-child { border-top: 1px solid var(--line); }
.contact-info .il { font-size: var(--step--1); letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); margin-bottom: 0.4rem; }
.contact-info .iv { font-family: var(--display); font-weight: 600; font-size: var(--step-1); }
.form { display: grid; gap: 1.2rem; }
.field { display: grid; gap: 0.5rem; }
.field label { font-size: var(--step--1); letter-spacing: 0.06em; color: var(--muted); font-weight: 600; }
.field input, .field textarea, .field select {
  font: inherit; color: var(--ink); background: var(--card); padding: 0.95em 1.1em;
  border: 1px solid var(--line); border-radius: var(--radius); transition: border-color 0.3s, background 0.3s;
  width: 100%;
}
.field input:focus, .field textarea:focus, .field select:focus { outline: none; border-color: var(--line-strong); }
.field textarea { resize: vertical; min-height: 130px; }
.field.row2 { grid-template-columns: 1fr 1fr; gap: 1.2rem; display: grid; }
@media (max-width: 600px) { .field.row2 { grid-template-columns: 1fr; } .contact-grid { grid-template-columns: 1fr; } }

/* toast */
.toast { position: fixed; bottom: 2rem; left: 50%; transform: translate(-50%, 200%); opacity: 0; visibility: hidden; z-index: 9999; background: var(--invert-bg); color: var(--invert-fg); padding: 1em 1.6em; border-radius: 100px; font-weight: 600; box-shadow: var(--shadow); transition: transform 0.6s var(--ease), opacity 0.4s ease, visibility 0.6s; display: flex; align-items: center; gap: 0.6rem; }
.toast.show { transform: translate(-50%, 0); opacity: 1; visibility: visible; }

/* ---------- Page hero (inner pages) ---------- */
.page-hero { padding-top: clamp(8rem, 16vh, 11rem); padding-bottom: clamp(2.5rem, 6vw, 4.5rem); border-bottom: 1px solid var(--line); }
.page-hero .crumb { color: var(--muted); font-size: var(--step--1); letter-spacing: 0.1em; text-transform: uppercase; margin-bottom: 1.2rem; }
.page-hero h1 { font-size: var(--step-4); }
.page-hero .lead { margin-top: 1.5rem; max-width: 52ch; }

/* service detail block */
.svc-detail { display: grid; grid-template-columns: auto 1fr; gap: clamp(1.5rem, 5vw, 4rem); padding-block: clamp(2.5rem, 6vw, 4.5rem); border-bottom: 1px solid var(--line); align-items: start; }
.svc-detail .sd-num { font-family: var(--display); font-weight: 800; font-size: var(--step-3); color: var(--muted); line-height: 1; }
.svc-detail h2 { font-size: var(--step-2); margin-bottom: 1rem; }
.svc-detail p { color: var(--ink-soft); max-width: 60ch; margin-bottom: 1.5rem; }
.svc-detail .feats { display: flex; flex-wrap: wrap; gap: 0.6rem; }
.svc-detail .feats span { border: 1px solid var(--line); padding: 0.4em 1em; border-radius: 100px; font-size: var(--step--1); color: var(--muted); }
@media (max-width: 640px) { .svc-detail { grid-template-columns: 1fr; gap: 1rem; } .svc-detail .sd-num { font-size: var(--step-2); } }

/* about story */
.story { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 6vw, 5rem); align-items: center; }
.story .story-img { aspect-ratio: 3/4; border-radius: var(--radius); overflow: hidden; background: var(--card-2); }
.story .story-img img { width: 100%; height: 100%; object-fit: cover; filter: grayscale(1); }
.story p { color: var(--ink-soft); margin-bottom: 1.2rem; }
@media (max-width: 760px) { .story { grid-template-columns: 1fr; } .story .story-img { aspect-ratio: 16/10; } }

.values { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.value { background: var(--paper); padding: clamp(1.6rem, 4vw, 2.6rem); }
.value .vn { font-family: var(--display); font-weight: 700; font-size: var(--step--1); color: var(--muted); }
.value h3 { font-size: var(--step-1); margin: 0.8rem 0; }
.value p { color: var(--muted); font-size: var(--step-0); }
@media (max-width: 760px) { .values { grid-template-columns: 1fr; } }

/* utility */
.center { text-align: center; }
.mt-s { margin-top: 1rem; } .mt-m { margin-top: 2rem; } .mt-l { margin-top: 3.5rem; }
.split-2 { display: grid; grid-template-columns: 1.1fr 1fr; gap: clamp(2rem,5vw,4rem); align-items: end; }
@media (max-width: 760px) { .split-2, .sec-head.split { grid-template-columns: 1fr; } }

/* responsive nav */
@media (max-width: 880px) {
  .nav-links { display: none; }
  .nav-right .btn { display: none; }
  .burger { display: block; }
}

/* custom cursor (desktop only) */
.cursor { position: fixed; top: 0; left: 0; width: 8px; height: 8px; border-radius: 50%; background: var(--ink); pointer-events: none; z-index: 9500; transform: translate(-50%, -50%); transition: width 0.3s, height 0.3s, background 0.3s; mix-blend-mode: difference; }
.cursor.big { width: 54px; height: 54px; background: var(--ink); }
@media (hover: none), (pointer: coarse) { .cursor { display: none; } }
