/* IBILD Solutions — site styles */
:root {
  --ink: #111214;
  --ink-2: #1b1d21;
  --ink-3: #26292e;
  --paper: #f6f4f0;
  --paper-2: #ebe7e0;
  --white: #ffffff;
  --text: #2a2c30;
  --muted: #6b6e75;
  --muted-dark: #a3a6ad;
  --line: #ddd8cf;
  --line-dark: #33363c;
  --red: #d6202c;
  --red-dark: #b0141f;
  --radius: 14px;
  --radius-sm: 8px;
  --shadow: 0 1px 2px rgba(0,0,0,.06), 0 8px 24px rgba(0,0,0,.08);
  --max: 1200px;
  --gutter: clamp(16px, 4vw, 40px);
  --font-head: "Space Grotesk", system-ui, sans-serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { transition: none !important; animation: none !important; } }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.65;
  color: var(--text);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--red); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--red-dark); }
h1, h2, h3, h4 { font-family: var(--font-head); color: var(--ink); line-height: 1.15; margin: 0 0 .5em; letter-spacing: -.01em; }
h1 { font-size: clamp(2.3rem, 6vw, 4.4rem); font-weight: 700; letter-spacing: -.025em; }
h2 { font-size: clamp(1.8rem, 4vw, 2.8rem); font-weight: 700; letter-spacing: -.02em; }
h3 { font-size: 1.25rem; font-weight: 600; }
p { margin: 0 0 1em; }
:focus-visible { outline: 3px solid var(--red); outline-offset: 3px; border-radius: 4px; }

.container { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
.section { padding: clamp(64px, 10vw, 120px) 0; }
.section--dark { background: var(--ink); color: #d4d6db; }
.section--dark h2, .section--dark h3 { color: var(--white); }
.section--white { background: var(--white); }
.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--font-head); font-size: .8rem; font-weight: 600;
  letter-spacing: .14em; text-transform: uppercase; color: var(--red); margin-bottom: 14px;
}
.eyebrow::before { content: ""; width: 24px; height: 2px; background: currentColor; }
.section-head { max-width: 720px; margin-bottom: clamp(36px, 6vw, 56px); }
.section-head p { font-size: 1.1rem; color: var(--muted); }
.section--dark .section-head p { color: var(--muted-dark); }
.skip-link { position: absolute; left: -9999px; top: 8px; z-index: 100; background: var(--white); padding: 8px 14px; border-radius: 6px; }
.skip-link:focus { left: 8px; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 12px 24px; border-radius: 999px;
  font-family: var(--font-head); font-weight: 600; font-size: 1rem;
  text-decoration: none; border: 2px solid transparent; cursor: pointer; white-space: nowrap;
  transition: background .2s, color .2s, border-color .2s, transform .2s;
}
.btn:hover { transform: translateY(-1px); }
.btn--primary { background: var(--red); color: var(--white); }
.btn--primary:hover { background: var(--red-dark); color: var(--white); }
.btn--ghost { border-color: rgba(255,255,255,.35); color: var(--white); }
.btn--ghost:hover { border-color: var(--white); color: var(--white); }
.btn svg { width: 18px; height: 18px; }

/* Header */
.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  border-bottom: 1px solid rgba(255,255,255,.06);
}
/* Blur lives on a pseudo-element so it doesn't become the containing block for the fixed mobile menu */
.site-header::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: rgba(17,18,20,.82); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
}
.site-header .container { display: flex; align-items: center; justify-content: space-between; height: 68px; }
.brand { display: flex; align-items: center; }
.brand img { height: 38px; width: auto; border-radius: 3px; }
.nav { display: flex; align-items: center; gap: 4px; }
.nav a {
  color: #d4d6db; text-decoration: none; font-weight: 500; font-size: .95rem;
  padding: 8px 14px; border-radius: 999px; transition: color .2s, background .2s;
}
.nav a:hover, .nav a[aria-current="page"] { color: var(--white); background: rgba(255,255,255,.08); }
.nav .btn { margin-left: 10px; min-height: 40px; padding: 8px 18px; color: var(--white); background: var(--red); }
.nav .btn:hover { background: var(--red-dark); }
.nav-toggle {
  display: none; width: 44px; height: 44px; border: 0; background: transparent; color: var(--white);
  border-radius: 10px; cursor: pointer; align-items: center; justify-content: center;
}
.nav-toggle span, .nav-toggle span::before, .nav-toggle span::after {
  display: block; width: 22px; height: 2px; background: currentColor; border-radius: 2px; position: relative; transition: transform .25s, background .25s;
}
.nav-toggle span::before, .nav-toggle span::after { content: ""; position: absolute; left: 0; }
.nav-toggle span::before { top: -7px; }
.nav-toggle span::after { top: 7px; }
.nav-open .nav-toggle span { background: transparent; }
.nav-open .nav-toggle span::before { transform: translateY(7px) rotate(45deg); }
.nav-open .nav-toggle span::after { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 900px) {
  .nav-toggle { display: inline-flex; }
  .nav {
    position: fixed; top: 68px; left: 0; right: 0; bottom: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    padding: 16px var(--gutter) 32px; background: var(--ink);
    transform: translateX(100%); visibility: hidden; transition: transform .3s ease, visibility .3s;
    overflow-y: auto;
  }
  .nav-open .nav { transform: none; visibility: visible; }
  .nav a { font-size: 1.2rem; padding: 16px 4px; border-radius: 0; border-bottom: 1px solid var(--line-dark); }
  .nav a:hover { background: transparent; }
  .nav .btn { margin: 24px 0 0; min-height: 52px; border-radius: 999px; border-bottom: 0; }
  body.nav-open { overflow: hidden; }
}

/* Hero */
.hero {
  position: relative; background: var(--ink); color: #d4d6db; overflow: hidden;
  padding: calc(68px + clamp(48px, 9vw, 110px)) 0 clamp(56px, 9vw, 110px);
}
.hero__grid { display: grid; grid-template-columns: 1.05fr 1fr; gap: clamp(32px, 5vw, 64px); align-items: center; }
.hero h1 { color: var(--white); }
.hero h1 em { font-style: normal; color: var(--red); }
.hero__lead { font-size: clamp(1.05rem, 1.6vw, 1.25rem); max-width: 560px; color: #b9bcc2; margin-bottom: 32px; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; }
.hero__mosaic { display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr; gap: 12px; aspect-ratio: 1 / 1; }
.hero__mosaic figure { margin: 0; border-radius: var(--radius); overflow: hidden; background: var(--ink-3); }
.hero__mosaic figure:first-child { grid-row: span 2; }
.hero__mosaic img { width: 100%; height: 100%; object-fit: cover; }
.hero__glow { position: absolute; width: 600px; height: 600px; right: -200px; top: -200px; background: radial-gradient(circle, rgba(214,32,44,.22), transparent 65%); pointer-events: none; }
.hero__facts { display: flex; flex-wrap: wrap; gap: 28px 40px; margin-top: 44px; padding-top: 28px; border-top: 1px solid var(--line-dark); }
.hero__facts div { font-size: .9rem; color: var(--muted-dark); line-height: 1.4; }
.hero__facts strong { display: block; font-family: var(--font-head); font-size: 1.6rem; color: var(--white); }
@media (max-width: 900px) {
  .hero__grid { grid-template-columns: 1fr; }
  .hero__mosaic { aspect-ratio: 4 / 3; }
}

/* Page hero (sub pages) */
.page-hero { background: var(--ink); color: #b9bcc2; padding: calc(68px + clamp(48px, 8vw, 96px)) 0 clamp(40px, 6vw, 72px); }
.page-hero h1 { color: var(--white); }
.page-hero p { max-width: 640px; font-size: 1.15rem; }

/* Cards / services */
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
@media (max-width: 900px) { .grid-3 { grid-template-columns: 1fr; } }
.card { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 32px; }
.card__icon { width: 52px; height: 52px; border-radius: 12px; display: grid; place-items: center; background: rgba(214,32,44,.1); color: var(--red); margin-bottom: 20px; }
.card__icon svg { width: 26px; height: 26px; }
.card p { color: var(--muted); margin: 0; }

/* Process */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; counter-reset: step; }
@media (max-width: 1000px) { .steps { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .steps { grid-template-columns: 1fr; } }
.step { background: var(--ink-2); border: 1px solid var(--line-dark); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; }
.step a { display: block; aspect-ratio: 16 / 10; overflow: hidden; background: var(--ink-3); }
.step img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.step a:hover img { transform: scale(1.04); }
.step__body { padding: 22px 22px 26px; }
.step__body::before { counter-increment: step; content: "0" counter(step); display: block; font-family: var(--font-head); font-weight: 700; color: var(--red); font-size: .9rem; letter-spacing: .1em; margin-bottom: 6px; }
.step p { color: var(--muted-dark); font-size: .95rem; margin: 0; }

/* Split feature */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 6vw, 80px); align-items: start; }
@media (max-width: 900px) { .split { grid-template-columns: 1fr; } }
.check-list { list-style: none; padding: 0; margin: 24px 0 0; display: grid; gap: 12px; }
.check-list li { display: flex; gap: 12px; align-items: flex-start; }
.check-list li::before { content: ""; flex: none; width: 22px; height: 22px; margin-top: 3px; border-radius: 50%; background: var(--red) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12l5 5L20 7'/%3E%3C/svg%3E") center / 14px no-repeat; }
.callout { background: var(--white); border-radius: var(--radius); padding: 28px 30px; border-left: 4px solid var(--red); box-shadow: var(--shadow); }
.callout + .callout { margin-top: 20px; }
.callout h3 { margin-bottom: .4em; }
.callout p { color: var(--muted); margin: 0; }

/* Project cards (home) */
.projects { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
@media (max-width: 1000px) { .projects { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .projects { grid-template-columns: 1fr; } }
.project-card { position: relative; display: block; border-radius: var(--radius); overflow: hidden; aspect-ratio: 4 / 3.4; background: var(--ink-3); color: var(--white); text-decoration: none; }
.project-card img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s ease; }
.project-card::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 40%, rgba(10,10,12,.88)); }
.project-card__text { position: absolute; left: 0; right: 0; bottom: 0; z-index: 1; padding: 22px 24px; }
.project-card__text span { font-size: .78rem; letter-spacing: .12em; text-transform: uppercase; color: #ff8a90; font-weight: 600; }
.project-card__text h3 { color: var(--white); margin: 4px 0 0; font-size: 1.3rem; }
.project-card:hover { color: var(--white); }
.project-card:hover img { transform: scale(1.05); }
.center-cta { text-align: center; margin-top: 44px; }

/* Software band */
.software { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.chip { padding: 10px 18px; border-radius: 999px; border: 1px solid var(--line-dark); color: var(--white); font-family: var(--font-head); font-weight: 500; background: var(--ink-2); }

/* FAQ */
.faq { max-width: 860px; }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 16px;
  padding: 22px 0; font-family: var(--font-head); font-weight: 600; font-size: 1.15rem; color: var(--ink);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; flex: none; width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: var(--paper-2); color: var(--ink); font-size: 1.3rem; font-weight: 400; transition: transform .25s, background .25s; }
.faq details[open] summary::after { transform: rotate(45deg); background: var(--red); color: var(--white); }
.faq details > div { padding: 0 48px 22px 0; color: var(--muted); }
@media (max-width: 600px) { .faq details > div { padding-right: 0; } }

/* Contact */
.contact-grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: clamp(32px, 6vw, 72px); align-items: start; }
@media (max-width: 900px) { .contact-grid { grid-template-columns: 1fr; } }
.contact-list { display: grid; gap: 14px; }
.contact-item { display: flex; gap: 16px; align-items: center; padding: 18px 20px; border-radius: var(--radius); background: var(--ink-2); border: 1px solid var(--line-dark); color: var(--white); text-decoration: none; transition: border-color .2s; }
a.contact-item:hover { border-color: var(--red); color: var(--white); }
.contact-item svg { flex: none; width: 24px; height: 24px; color: var(--red); }
.contact-item small { display: block; color: var(--muted-dark); font-size: .8rem; text-transform: uppercase; letter-spacing: .1em; }
.contact-item span { font-weight: 600; word-break: break-word; }

/* Footer */
.site-footer { background: #0b0c0d; color: var(--muted-dark); padding: 36px 0; font-size: .9rem; }
.site-footer .container { display: flex; flex-wrap: wrap; gap: 16px; justify-content: space-between; align-items: center; }
.site-footer a { color: #d4d6db; text-decoration: none; }
.site-footer a:hover { color: var(--white); }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 20px; }

/* Portfolio (Examples page) */
.case { padding: clamp(56px, 8vw, 96px) 0; border-bottom: 1px solid var(--line); }
.case:nth-of-type(even) { background: var(--white); }
.case__head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: end; gap: 12px 32px; margin-bottom: 32px; }
.case__head h2 { margin: 0; }
.case__head p { margin: 0; max-width: 520px; color: var(--muted); }
.gallery { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
@media (max-width: 1000px) { .gallery { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .gallery { grid-template-columns: 1fr; } }
.gallery figure { margin: 0; }
.gallery a { display: block; aspect-ratio: 1 / 1; border-radius: var(--radius-sm); overflow: hidden; background: var(--ink-3); position: relative; }
.gallery img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.gallery a:hover img { transform: scale(1.05); }
.gallery a::after { content: ""; position: absolute; right: 10px; bottom: 10px; width: 34px; height: 34px; border-radius: 50%; background: rgba(0,0,0,.55) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M15 3h6v6M9 21H3v-6M21 3l-7 7M3 21l7-7'/%3E%3C/svg%3E") center / 16px no-repeat; opacity: 0; transition: opacity .2s; }
.gallery a:hover::after, .gallery a:focus-visible::after { opacity: 1; }
@media (hover: none) { .gallery a::after { opacity: 1; } }
.gallery figcaption { padding-top: 14px; }
.gallery figcaption strong { display: block; font-family: var(--font-head); color: var(--ink); text-transform: capitalize; margin-bottom: 4px; }
.gallery figcaption p { font-size: .93rem; color: var(--muted); margin: 0; }
.jump { display: flex; gap: 8px; overflow-x: auto; padding: 4px 0 2px; margin-top: 28px; scrollbar-width: none; }
.jump::-webkit-scrollbar { display: none; }
.jump a { flex: none; padding: 8px 16px; border-radius: 999px; border: 1px solid var(--line-dark); color: #d4d6db; text-decoration: none; font-size: .9rem; white-space: nowrap; }
.jump a:hover { border-color: var(--red); color: var(--white); }

/* Lightbox */
.lightbox { position: fixed; inset: 0; z-index: 100; background: rgba(8,8,10,.94); display: none; flex-direction: column; align-items: center; justify-content: center; padding: 64px 16px 24px; }
.lightbox.is-open { display: flex; }
.lightbox img { max-width: min(1100px, 100%); max-height: calc(100vh - 180px); max-height: calc(100dvh - 180px); width: auto; border-radius: 6px; object-fit: contain; }
.lightbox__caption { color: #d4d6db; text-align: center; max-width: 720px; margin-top: 16px; font-size: .95rem; }
.lightbox__caption strong { color: var(--white); font-family: var(--font-head); display: block; text-transform: capitalize; }
.lightbox button { position: absolute; width: 48px; height: 48px; border-radius: 50%; border: 0; background: rgba(255,255,255,.1); color: var(--white); cursor: pointer; display: grid; place-items: center; }
.lightbox button:hover { background: rgba(255,255,255,.2); }
.lightbox button svg { width: 22px; height: 22px; }
.lightbox__close { top: 12px; right: 12px; }
.lightbox__prev { left: 12px; top: 50%; transform: translateY(-50%); }
.lightbox__next { right: 12px; top: 50%; transform: translateY(-50%); }
.lightbox__count { position: absolute; top: 24px; left: 20px; color: var(--muted-dark); font-size: .85rem; }
@media (max-width: 700px) {
  .lightbox__prev, .lightbox__next { top: auto; bottom: 16px; transform: none; }
  .lightbox { padding-bottom: 84px; }
}

/* Reveal on scroll */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s ease, transform .7s ease; }
.reveal.is-visible { opacity: 1; transform: none; }
.no-js .reveal { opacity: 1; transform: none; }

@media (max-width: 600px) {
  .hero__actions .btn { flex: 1 1 140px; padding-left: 16px; padding-right: 16px; }
  .hero__facts { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 36px; }
  .hero__facts strong { font-size: 1.25rem; }
  .eyebrow { letter-spacing: .1em; }
}
