/* Layout — navbar, footer, hero, cta-band, page-hero, stepper, contact */

/* ===== Navbar ===== */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
  height: var(--nav-h);
  transition: height .2s ease, background .3s ease, border-color .3s ease;
}
.navbar.is-scrolled { height: 60px; }
[data-theme="dark"] .navbar {
  background: rgba(11,27,43,.92);
  border-bottom-color: #1E3248;
}

.navbar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.navbar__logo {
  display: flex;
  align-items: center;
  color: var(--ink-900);
  flex-shrink: 0;
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.5px;
  text-decoration: none;
  transition: color .3s;
}
.navbar__logo .dot {
  color: var(--accent-500);
}
[data-theme="dark"] .navbar__logo {
  color: #F0F4F8;
}

.navbar__toggle {
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: var(--s-2);
  z-index: 101;
}
.navbar__toggle-bar {
  width: 24px;
  height: 2px;
  background: var(--ink-900);
  transition: transform .2s ease, opacity .2s ease;
}
.navbar__toggle[aria-expanded="true"] .navbar__toggle-bar:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.navbar__toggle[aria-expanded="true"] .navbar__toggle-bar:nth-child(2) { opacity: 0; }
.navbar__toggle[aria-expanded="true"] .navbar__toggle-bar:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.navbar__menu {
  display: none;
  position: fixed;
  inset: 0;
  background: var(--paper);
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--s-4);
  z-index: 100;
  overflow-y: auto;
  padding: var(--s-5) var(--s-4);
}
.navbar__menu.is-open { display: flex; }
/* Drawer links: bigger tap targets on touch-sized screens */
@media (max-width: 1023px) {
  .navbar__menu .navbar__link {
    font-size: var(--fs-1);
    padding: var(--s-3);
  }
}

.navbar__link {
  font-weight: 500;
  color: var(--ink-700);
  transition: color .15s;
  padding: var(--s-2);
}
.navbar__link:hover,
.navbar__link.is-active { color: var(--brand-600); }

/* Navbar actions (theme + lang) */
.navbar__actions {
  display: flex;
  align-items: center;
  gap: var(--s-2);
  list-style: none;
}

/* Theme toggle */
.theme-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: transparent;
  color: var(--ink-700);
  cursor: pointer;
  transition: background .2s, color .2s, border-color .2s;
  flex-shrink: 0;
}
.theme-toggle:hover {
  background: var(--mist);
  color: var(--brand-600);
  border-color: var(--brand-600);
}
.theme-toggle__icon--sun { display: none; }
.theme-toggle__icon--moon { display: block; }
[data-theme="dark"] .theme-toggle__icon--sun { display: block; }
[data-theme="dark"] .theme-toggle__icon--moon { display: none; }
[data-theme="dark"] .theme-toggle {
  border-color: #2A4060;
  color: #C8D4E0;
}
[data-theme="dark"] .theme-toggle:hover {
  background: #132B4A;
  color: #5A9CF6;
  border-color: #5A9CF6;
}

/* Language pill toggle */
.lang-toggle {
  display: flex;
  align-items: center;
  background: var(--ink-900);
  border-radius: 20px;
  padding: 3px;
  height: 40px;
  overflow: hidden;
  text-decoration: none;
  flex-shrink: 0;
  transition: background .3s;
}
[data-theme="dark"] .lang-toggle {
  background: #132B4A;
  border: 1px solid #1E3248;
}
.lang-toggle__option {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 42px;
  height: 34px;
  border-radius: 18px;
  font-size: 14px;
  font-weight: 600;
  color: #fff;
  transition: background .2s, color .2s;
  padding: 0 var(--s-2);
}
.lang-toggle__option.is-active {
  background: var(--brand-600);
  color: #fff;
}
.lang-toggle__option:not(.is-active) {
  color: rgba(255,255,255,.7);
}
.lang-toggle__option:not(.is-active):hover {
  color: #fff;
  background: rgba(255,255,255,.1);
}

@media (min-width: 1024px) {
  .navbar__toggle { display: none; }
  .navbar__menu {
    display: flex;
    position: static;
    background: none;
    flex-direction: row;
    gap: var(--s-1);
  }
}

/* ===== Hero ===== */
.hero {
  background: var(--paper);
  color: var(--ink-900);
  padding-block: var(--s-7) var(--s-6);
  overflow: hidden;
}
@media (max-width: 767px) {
  .hero { padding-block: var(--s-6) var(--s-5); }
}
.hero__inner {
  display: grid;
  gap: var(--s-5);
  align-items: center;
}
@media (min-width: 1024px) {
  .hero__inner { grid-template-columns: 1fr 1fr; }
}
.hero__eyebrow {
  font-size: var(--fs-0);
  font-weight: 600;
  color: var(--accent-600);
  text-transform: uppercase;
  letter-spacing: .1em;
  margin-bottom: var(--s-3);
}
.hero__title {
  font-size: var(--fs-4);
  margin-bottom: var(--s-3);
  color: var(--ink-900);
}
.hero__lead {
  font-size: var(--fs-1);
  color: var(--ink-500);
  margin-bottom: var(--s-5);
  max-width: 520px;
}
.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-3);
}
@media (max-width: 479px) {
  .hero__actions { flex-direction: column; }
  .hero__actions .btn { width: 100%; }
}

/* Hero code card */
.hero__code-card {
  background: var(--paper);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-1);
  border-radius: var(--r-md);
  overflow: hidden;
  font-family: 'Cascadia Code', 'Fira Code', monospace;
}
.hero__code-header {
  display: flex;
  gap: 6px;
  padding: var(--s-3);
  border-bottom: 1px solid var(--line);
}
.hero__code-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}
.hero__code {
  padding: var(--s-4);
  font-size: .875rem;
  line-height: 1.7;
  color: var(--ink-300);
  background: #0B1220; /* dark editor area behind the code (light mode; dark mode keeps card color via tokens.css) */
  overflow-x: auto;
  direction: ltr;
  text-align: left;
}
@media (max-width: 479px) {
  .hero__code {
    padding: var(--s-3);
    font-size: .8125rem;
  }
}
/* Syntax highlighting — bright terminal palette (the code area is always dark) */
.code-keyword { color: #c792ea; }
.code-class { color: #ffcb6b; }
.code-fn { color: #82aaff; }
.code-var { color: #f07178; }

/* ===== Trust bar ===== */
.trust-bar {
  padding-block: var(--s-5);
  border-bottom: 1px solid var(--line);
}
.trust-bar__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--s-4);
  text-align: center;
}
@media (min-width: 768px) {
  .trust-bar__grid { grid-template-columns: repeat(4, 1fr); }
}
.stat__number {
  display: block;
  font-size: var(--fs-3);
  font-weight: 700;
  color: var(--accent-500);
}
.stat__label {
  font-size: var(--fs-0);
  color: var(--ink-500);
}
.stat__number--accent { color: var(--accent-500); }

/* ===== Page hero ===== */
.page-hero {
  background: var(--mist);
  padding-block: var(--s-6) var(--s-5);
}
@media (max-width: 767px) {
  .page-hero { padding-block: var(--s-5) var(--s-4); }
}
.page-hero h1 {
  font-size: var(--fs-3);
  margin-bottom: var(--s-2);
}
.page-hero__lead {
  color: var(--ink-500);
  font-size: var(--fs-1);
  max-width: 600px;
}

/* Breadcrumbs */
.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-2);
  font-size: var(--fs-0);
  color: var(--ink-500);
  margin-bottom: var(--s-3);
}
.breadcrumbs a:hover { color: var(--brand-600); }

/* ===== Process teaser ===== */
.process-teaser {
  display: grid;
  gap: var(--s-4);
}
@media (min-width: 640px) {
  .process-teaser { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1024px) {
  .process-teaser { grid-template-columns: repeat(4, 1fr); }
}
.process-teaser__step {
  position: relative;
  padding: var(--s-4);
  border-radius: var(--r-md);
  border: 1px solid var(--line);
}
.process-teaser__number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--brand-100);
  color: var(--brand-600);
  font-weight: 700;
  font-size: var(--fs-0);
  margin-bottom: var(--s-3);
}
.process-teaser__title {
  font-size: var(--fs-1);
  margin-bottom: var(--s-2);
}
.process-teaser__text {
  font-size: var(--fs-0);
  color: var(--ink-500);
}

/* ===== About teaser ===== */
.about-teaser {
  display: grid;
  gap: var(--s-5);
  align-items: center;
}
@media (min-width: 768px) {
  .about-teaser { grid-template-columns: auto 1fr; }
}
.about-teaser__avatar {
  width: 160px;
  height: 160px;
  border-radius: 50%;
  background: var(--mist);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ink-300);
}
/* Founder photo — fills the circular frame; the SVG placeholder keeps the
   flex centring when no image is present. */
.about-teaser__avatar img,
.about-hero__avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  display: block;
}
.about-teaser__role {
  color: var(--ink-500);
  margin-bottom: var(--s-3);
}
.about-teaser__links {
  display: flex;
  align-items: center;
  gap: var(--s-3);
  margin-top: var(--s-3);
}

/* About page */
.about-hero {
  display: grid;
  gap: var(--s-5);
  align-items: center;
}
@media (min-width: 768px) {
  .about-hero { grid-template-columns: auto 1fr; }
}
.about-hero__avatar {
  width: 200px;
  height: 200px;
  border-radius: 50%;
  background: var(--mist);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ink-300);
}
.about-hero__role {
  color: var(--ink-500);
  margin-bottom: var(--s-3);
}
/* Stacked layouts on small screens: centre the circular avatars */
@media (max-width: 767px) {
  .about-teaser__avatar,
  .about-hero__avatar { margin-inline: auto; }
}

/* ===== Stepper (Process page) ===== */
.stepper { max-width: 800px; }
.stepper__step {
  display: grid;
  grid-template-columns: 48px 1fr;
  gap: var(--s-4);
}
.stepper__marker {
  display: flex;
  flex-direction: column;
  align-items: center;
}
.stepper__number {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--brand-600);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: var(--fs-1);
  flex-shrink: 0;
}
.stepper__line {
  width: 2px;
  flex: 1;
  background: var(--line);
  margin-block: var(--s-2);
}
.stepper__content {
  padding-bottom: var(--s-5);
}
.stepper__title {
  font-size: var(--fs-2);
  margin-bottom: var(--s-2);
}
.stepper__text {
  color: var(--ink-500);
  margin-bottom: var(--s-3);
}
.stepper__deliverable {
  background: var(--mist);
  padding: var(--s-3);
  border-radius: var(--r-sm);
  font-size: var(--fs-0);
  color: var(--ink-700);
}

/* ===== CTA Band ===== */
.cta-band {
  background: var(--paper);
  color: var(--ink-900);
  padding-block: var(--s-6);
}
@media (max-width: 767px) {
  .cta-band { padding-block: var(--s-5); }
}
.cta-band__inner {
  display: flex;
  flex-direction: column;
  gap: var(--s-4);
  align-items: center;
  text-align: center;
}
.cta-band__title {
  font-size: var(--fs-3);
  color: var(--ink-900);
  margin-bottom: var(--s-2);
}
.cta-band__lead {
  color: var(--ink-500);
}

/* ===== Contact ===== */
.contact-grid {
  display: grid;
  gap: var(--s-5);
}
@media (min-width: 1024px) {
  .contact-grid { grid-template-columns: 2fr 1fr; }
}
.contact-info__card {
  background: var(--mist);
  border-radius: var(--r-md);
  padding: var(--s-4);
  margin-bottom: var(--s-3);
}
.contact-info__item {
  display: flex;
  gap: var(--s-3);
  align-items: flex-start;
  margin-bottom: var(--s-4);
}
.contact-info__item:last-child { margin-bottom: 0; }
.contact-info__item svg { flex-shrink: 0; margin-top: 2px; color: var(--brand-600); }
.contact-info__label {
  display: block;
  font-size: var(--fs-0);
  color: var(--ink-500);
  margin-bottom: 2px;
}
.contact-info__item a { color: var(--brand-600); font-weight: 500; }
.contact-info__item a:hover { text-decoration: underline; }

/* ===== Content grid (service/project detail) ===== */
.content-grid {
  display: grid;
  gap: var(--s-5);
}
@media (min-width: 1024px) {
  .content-grid { grid-template-columns: 2fr 1fr; }
}
.content-main h2 {
  font-size: var(--fs-2);
  margin-block: var(--s-5) var(--s-3);
}
.content-main h2:first-child { margin-top: 0; }
.sidebar-card {
  background: var(--mist);
  border-radius: var(--r-md);
  padding: var(--s-4);
  margin-bottom: var(--s-3);
}
.sidebar-card h3 { margin-bottom: var(--s-2); }
.sidebar-card p { color: var(--ink-500); margin-bottom: var(--s-3); font-size: var(--fs-0); }
.sidebar-card__label {
  font-size: var(--fs-0);
  color: var(--ink-500);
  margin-bottom: var(--s-2);
}

/* ===== Project meta ===== */
.project-meta {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--s-3);
  margin-bottom: var(--s-5);
}
@media (min-width: 768px) {
  .project-meta { grid-template-columns: repeat(4, 1fr); }
}
.project-meta__label {
  display: block;
  font-size: var(--fs-0);
  color: var(--ink-500);
  margin-bottom: 2px;
}
.project-meta__value {
  font-weight: 600;
}
.project-cover {
  border-radius: var(--r-md);
  overflow: hidden;
  margin-bottom: var(--s-5);
}
.project-cover img { width: 100%; }

/* Results grid */
.results-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: var(--s-4);
  margin-block: var(--s-4);
  text-align: center;
}

/* Gallery */
.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: var(--s-3);
}
.gallery img {
  border-radius: var(--r-sm);
  width: 100%;
}

/* Post cover */
.post-cover {
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: 20px;
  margin-bottom: var(--s-5);
}
.post-cover img {
  width: 100%;
  border-radius: var(--r-md);
}

/* Post meta */
.post-meta {
  color: var(--ink-500);
  font-size: var(--fs-0);
  margin-top: var(--s-2);
}

/* ===== Footer ===== */
.footer {
  background: var(--paper);
  color: var(--ink-500);
  padding-block: var(--s-6) var(--s-4);
}
@media (max-width: 767px) {
  .footer { padding-block: var(--s-5) var(--s-4); }
}
.footer__grid {
  display: grid;
  gap: var(--s-5);
  margin-bottom: var(--s-5);
}
@media (min-width: 640px) {
  .footer__grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1024px) {
  .footer__grid { grid-template-columns: 2fr 1fr 1fr 1fr; }
}
.footer__logo {
  font-size: var(--fs-2);
  font-weight: 700;
  color: var(--ink-900);
  display: inline-block;
  margin-bottom: var(--s-2);
}
.footer__blurb {
  font-size: var(--fs-0);
  margin-bottom: var(--s-3);
  max-width: 300px;
}
.footer__socials {
  display: flex;
  gap: var(--s-3);
}
.footer__socials a {
  color: var(--ink-500);
  transition: color .15s;
}
.footer__socials a:hover { color: var(--brand-600); }
.footer__heading {
  font-size: var(--fs-0);
  font-weight: 600;
  color: var(--ink-900);
  text-transform: uppercase;
  letter-spacing: .06em;
  margin-bottom: var(--s-3);
}
.footer__links li { margin-bottom: var(--s-2); }
.footer__links a {
  font-size: var(--fs-0);
  color: var(--ink-700);
  transition: color .15s;
}
.footer__links a:hover { color: var(--brand-600); }
.footer__lang {
  margin-top: var(--s-3);
  font-size: var(--fs-0);
}
.footer__lang a { color: var(--ink-700); }
.footer__lang a.is-active { color: var(--ink-900); font-weight: 600; }
.footer__bottom {
  border-top: 1px solid var(--line);
  padding-top: var(--s-4);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: var(--s-2);
  font-size: var(--fs-0);
  color: var(--ink-500);
}
.footer__tagline { color: var(--ink-500); }

/* ===== Error page ===== */
.error-page {
  text-align: center;
  padding-block: var(--s-7);
  min-height: 60vh;
  display: flex;
  align-items: center;
}
.error-page .container { width: 100%; }
.error-page__code {
  display: block;
  font-size: clamp(4rem, 10vw, 8rem);
  font-weight: 700;
  color: var(--ink-900);
  opacity: .15;
  line-height: 1;
}
.error-page h1 {
  font-size: var(--fs-3);
  margin-bottom: var(--s-3);
}
.error-page p {
  color: var(--ink-500);
  margin-bottom: var(--s-5);
}

/* ===== Prose ===== */
.prose { line-height: 1.8; }
.prose h2 { font-size: var(--fs-2); margin-block: var(--s-5) var(--s-3); }
.prose h3 { font-size: var(--fs-1); margin-block: var(--s-4) var(--s-2); }
.prose p { margin-bottom: var(--s-3); }
.prose ul { margin-block: var(--s-3); padding-inline-start: var(--s-4); }
.prose ul li { list-style: disc; margin-bottom: var(--s-2); }
.prose a { color: var(--brand-600); text-decoration: underline; }
.prose--center { text-align: center; max-width: 640px; margin-inline: auto; }
.prose__note { color: var(--ink-500); font-size: var(--fs-0); margin-top: var(--s-5); }

/* ===== Filter chips ===== */
.filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-2);
  margin-bottom: var(--s-5);
}
.chip {
  display: inline-flex;
  align-items: center;
  gap: var(--s-1);
  padding: var(--s-2) var(--s-3);
  border-radius: 100px;
  border: 1px solid var(--line);
  font-size: var(--fs-0);
  font-weight: 500;
  color: var(--ink-700);
  transition: all .15s;
  min-height: 44px;
}
.chip:hover { border-color: var(--brand-500); color: var(--brand-600); }
.chip--active {
  background: var(--ink-900);
  color: white;
  border-color: var(--ink-900);
}
.chip__count {
  background: var(--mist);
  border-radius: 100px;
  padding: 0 6px;
  font-size: .75rem;
}
.chip--active .chip__count { background: rgba(255,255,255,.2); }
