/* ============================================================
   CodeRoof — stylesheet
   ============================================================ */

:root {
  /* Brand */
  --blue: #468FF4;
  --blue-bright: #409EFD;
  --blue-dark: #2F6FD6;
  --blue-ink: #123A73;

  --navy: #0A1730;
  --navy-2: #0E2140;
  --ink: #101828;
  --muted: #5B6B84;
  --line: #E4EAF3;
  --bg: #ffffff;
  --bg-soft: #F4F8FF;
  --bg-soft-2: #EDF3FE;

  --radius: 18px;
  --radius-sm: 12px;
  --radius-lg: 28px;
  --shadow-sm: 0 1px 2px rgba(16, 24, 40, .06), 0 1px 3px rgba(16, 24, 40, .04);
  --shadow: 0 12px 32px rgba(18, 58, 115, .10);
  --shadow-lg: 0 30px 70px rgba(18, 58, 115, .16);
  --grad: linear-gradient(135deg, var(--blue) 0%, var(--blue-bright) 100%);

  --font-head: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --maxw: 1180px;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; background: var(--bg);
       /* always reserve the scrollbar, so page content never widens mid-load */
       overflow-y: scroll; }
body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: transparent;
  line-height: 1.6;
  font-size: 16px;
  /* clip (not hidden) so horizontal overflow is still cut off without
     turning <body> into a scroll container — position: sticky (the site
     header and the pinned process stage) needs the viewport as its scroller */
  overflow-x: hidden;
  overflow-x: clip;
}

/* ---------- Binary background ---------- */
.binary-bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  display: block;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; }
h1, h2, h3, h4 { font-family: var(--font-head); color: var(--ink); line-height: 1.15; margin: 0; letter-spacing: -.02em; }
p { margin: 0; }

.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }

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

:focus-visible { outline: 3px solid rgba(70, 143, 244, .5); outline-offset: 2px; border-radius: 6px; }

/* ---------- Buttons ---------- */
.btn {
  --btn-bg: var(--grad);
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 13px 22px; border-radius: 999px; border: 1px solid transparent;
  font-weight: 600; font-size: .95rem; font-family: var(--font-head);
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease, color .18s ease;
  white-space: nowrap;
}
.btn-primary {
  background: var(--grad); color: #fff;
  box-shadow: 0 10px 24px rgba(70, 143, 244, .34);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 16px 34px rgba(70, 143, 244, .42); }
.btn-ghost { background: #fff; color: var(--ink); border-color: var(--line); box-shadow: var(--shadow-sm); }
.btn-ghost:hover { border-color: var(--blue); color: var(--blue-dark); transform: translateY(-2px); }
.btn-sm { padding: 10px 18px; font-size: .9rem; }
.btn-block { width: 100%; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255, 255, 255, .82);
  backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .25s ease, box-shadow .25s ease, background .25s ease;
}
.site-header.scrolled { border-color: var(--line); box-shadow: 0 6px 20px rgba(18, 58, 115, .06); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 20px; height: 74px; }

.brand { display: inline-flex; align-items: center; gap: 12px; }
.brand-word { height: 20px; width: auto; }
.brand:hover .brand-word { opacity: .85; }

.nav { display: flex; align-items: center; gap: 4px; }
.nav a {
  position: relative; padding: 9px 14px; border-radius: 10px;
  font-weight: 500; font-size: .94rem; color: var(--muted);
  transition: color .18s ease, background .18s ease;
}
.nav a:hover { color: var(--ink); background: var(--bg-soft); }
.nav a.active { color: var(--blue-dark); }
.nav a.active::after {
  content: ""; position: absolute; left: 50%; bottom: 2px; transform: translateX(-50%);
  width: 16px; height: 3px; border-radius: 3px; background: var(--grad);
}

.header-actions { display: flex; align-items: center; gap: 12px; }

.nav-toggle {
  display: none; width: 44px; height: 44px; border: 1px solid var(--line);
  background: #fff; border-radius: 12px; padding: 0;
  flex-direction: column; gap: 5px; align-items: center; justify-content: center;
}
.nav-toggle span { width: 20px; height: 2px; background: var(--ink); border-radius: 2px; transition: transform .25s ease, opacity .25s ease; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero { position: relative; padding: 70px 0 40px; overflow: hidden; }

.hero-inner {
  position: relative; z-index: 1;
  display: grid; grid-template-columns: 1fr; align-items: center; gap: 56px;
  padding-top: 24px; padding-bottom: 40px;
}
.hero-copy { max-width: 720px; margin: 0 auto; text-align: center; }

/* Hero background image (Logo.png): faint watermark + cursor-following reveal */
.hero-bg,
.hero-spot {
  position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background-image: url("Logo.png");
  background-repeat: no-repeat;
  background-position: center 46%;
  background-size: min(780px, 74%) auto;
}
.hero-bg { opacity: .12; animation: heroBgFade 1.8s ease both; }
.hero-spot {
  --mx: 50%; --my: 50%;
  opacity: 0;
  transition: opacity .45s ease;
  -webkit-mask-image: radial-gradient(circle 340px at var(--mx) var(--my), #000 0%, rgba(0,0,0,.55) 55%, transparent 78%);
  mask-image: radial-gradient(circle 340px at var(--mx) var(--my), #000 0%, rgba(0,0,0,.55) 55%, transparent 78%);
}
.hero-spot.is-active { opacity: .85; }
@keyframes heroBgFade { from { opacity: 0; } to { opacity: .12; } }

.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-head); font-weight: 600; font-size: .84rem; letter-spacing: .01em;
  color: var(--blue-dark); background: var(--bg-soft-2);
  border: 1px solid #D8E6FF; padding: 7px 14px; border-radius: 999px;
}
.eyebrow .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--grad); box-shadow: 0 0 0 4px rgba(70,143,244,.15); }

.hero h1 { font-size: clamp(2.3rem, 5vw, 3.7rem); font-weight: 800; margin: 22px 0 18px; color: var(--blue); }
.grad { color: inherit; background: none; -webkit-text-fill-color: currentColor; }

/* ---------- Shiny headline — shine-text.js ----------
   shine-text.js measures the heading colour, then paints a moving band of
   light straight through the glyphs with background-clip: text. The solid
   base colour sits underneath the gradient, so the text stays readable at
   every point of the sweep and nested markup keeps its normal layout. */
.shine-text { --shine-pos: -30%; }

.shine-text.is-shine {
  background-color: var(--shine-base, currentColor);
  background-image: var(--shine-layers, none);
  background-repeat: no-repeat;
  background-size: 200% 100%;
  background-position: var(--shine-pos) 50%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
}

/* Children (<span class="grad"> etc.) keep their boxes and are lit as one run. */
.shine-text.is-shine * {
  color: transparent !important;
  -webkit-text-fill-color: transparent !important;
  background-image: none !important;
}

.shine-text.is-shine::selection,
.shine-text.is-shine *::selection {
  color: #fff;
  -webkit-text-fill-color: #fff;
  background: var(--blue-dark);
}

@media (prefers-reduced-motion: reduce) {
  .shine-text.is-shine {
    background: none !important;
    color: var(--shine-base, inherit) !important;
    -webkit-text-fill-color: var(--shine-base, currentColor) !important;
  }
  .shine-text.is-shine * {
    background: none !important;
    color: inherit !important;
    -webkit-text-fill-color: var(--shine-base, currentColor) !important;
  }
}

.lead { font-size: 1.12rem; color: var(--muted); max-width: 680px; margin-left: auto; margin-right: auto; }

.hero-cta { display: flex; gap: 14px; margin: 30px 0 26px; flex-wrap: wrap; justify-content: center; }
.hero-points { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px 22px; justify-content: center; }
.hero-points li { position: relative; padding-left: 26px; color: var(--muted); font-size: .94rem; }
.hero-points li::before {
  content: ""; position: absolute; left: 0; top: 50%; transform: translateY(-50%);
  width: 16px; height: 16px; border-radius: 50%;
  background: var(--grad);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='m5 13 4 4L19 7' fill='none' stroke='%23000' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/12px no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='m5 13 4 4L19 7' fill='none' stroke='%23000' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/12px no-repeat;
}

/* ---------- Sections ---------- */
.section { padding: 92px 0; }
.section-alt { background: rgba(244, 248, 255, .72); }
.section-head { max-width: 660px; margin: 0 auto 52px; text-align: center; }
.section-head h2 { font-size: clamp(1.8rem, 3.4vw, 2.6rem); font-weight: 800; margin: 18px 0 14px; }
.section-head p { color: var(--muted); font-size: 1.06rem; }
section[id] { scroll-margin-top: 90px; }

/* ---------- Cards (services) ---------- */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 30px 26px; box-shadow: var(--shadow-sm);
}
.card:hover { --lift: -6px; --scale: 1.02; box-shadow: var(--shadow-lg); border-color: #CFE0FF; }
.card-ico {
  display: grid; place-items: center; width: 52px; height: 52px; border-radius: 14px;
  background: var(--bg-soft-2); color: var(--blue-dark); margin-bottom: 18px;
  border: 1px solid #DCE8FF;
  transition: transform .35s cubic-bezier(.2,.7,.2,1), background .3s ease, color .3s ease, border-color .3s ease;
}
.card:hover .card-ico { background: var(--grad); color: #fff; border-color: transparent; transform: translateY(-2px) scale(1.08) rotate(-4deg); }
.card h3 { font-size: 1.18rem; margin-bottom: 10px; }
.card p { color: var(--muted); font-size: .96rem; }
.tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.tags span {
  font-size: .78rem; font-weight: 600; font-family: var(--font-head);
  color: var(--blue-dark); background: var(--bg-soft); border: 1px solid #DCE8FF;
  padding: 4px 10px; border-radius: 999px;
}

/* ---------- Work ---------- */
.work-grid { display: flex; flex-wrap: wrap; justify-content: center; gap: 24px; }
.work-card {
  display: block; color: inherit;
  flex: 1 1 320px; max-width: 380px;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; box-shadow: var(--shadow-sm);
}
.work-card:hover { --lift: -6px; --scale: 1.015; box-shadow: var(--shadow-lg); }
.work-thumb { height: 168px; display: grid; place-items: center; position: relative; overflow: hidden; }
.work-thumb img { width: 66%; max-width: 210px; opacity: .95; transition: transform .5s cubic-bezier(.2,.7,.2,1), opacity .3s ease; filter: drop-shadow(0 12px 22px rgba(0,0,0,.20)); }
.work-card:hover .work-thumb img { transform: scale(1.08) rotate(-2deg); opacity: 1; }

/* Project screenshot: fills the whole thumbnail, above the fallback logo. */
.work-thumb .work-shot {
  position: absolute; inset: 0; width: 100%; height: 100%;
  max-width: none; object-fit: cover; object-position: top center;
  opacity: 1; filter: none; transform: none;
}
.work-card:hover .work-thumb .work-shot { transform: scale(1.05); opacity: 1; }
.grad-1 { background: linear-gradient(135deg, #468FF4, #6FB4FF); }
.grad-2 { background: linear-gradient(135deg, #123A73, #409EFD); }
.grad-3 { background: linear-gradient(135deg, #2F6FD6, #7FD3FF); }
.work-body { padding: 22px 24px 26px; }
.work-tag {
  display: inline-block; font-size: .76rem; font-weight: 700; font-family: var(--font-head);
  text-transform: uppercase; letter-spacing: .06em; color: var(--blue-dark);
  background: var(--bg-soft-2); padding: 4px 10px; border-radius: 999px; margin-bottom: 12px;
}
.work-body h3 { font-size: 1.2rem; margin-bottom: 8px; }
.work-body p { color: var(--muted); font-size: .95rem; }

/* ---------- Work cards reveal (pop out, expanding from the center) ---------- */
.work-card { transform-origin: center center; }
.work-grid.reveal .work-card { opacity: 0; }
.work-grid.reveal.pop-in .work-card { animation: workPop .62s cubic-bezier(.18, .86, .3, 1.02) both; }
@keyframes workPop {
  0%   { opacity: 0; scale: .5; }
  65%  { opacity: 1; scale: 1.035; }
  100% { opacity: 1; scale: 1; }
}

/* ---------- Process ---------- */
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(5, 1fr); gap: 18px; counter-reset: step; }
.step {
  position: relative; background: #fff; border: 1px solid var(--line);
  border-radius: var(--radius); padding: 26px 22px; box-shadow: var(--shadow-sm);
}
.step:hover { --lift: -5px; --scale: 1.02; box-shadow: var(--shadow); border-color: #CFE0FF; }
.step-num { font-family: var(--font-head); font-weight: 800; font-size: 1.5rem; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.step h3 { font-size: 1.08rem; margin: 12px 0 8px; }
.step p { color: var(--muted); font-size: .9rem; }

/* ---------- About ---------- */
.about-inner { display: grid; grid-template-columns: 1.1fr .9fr; gap: 56px; align-items: center; }
.about-copy h2 { font-size: clamp(1.8rem, 3.4vw, 2.5rem); font-weight: 800; margin: 18px 0 16px; }
.about-copy > p { color: var(--muted); font-size: 1.05rem; margin-bottom: 22px; }
.check-list { list-style: none; margin: 0 0 28px; padding: 0; display: grid; gap: 12px; }
.check-list li { position: relative; padding-left: 34px; font-weight: 500; }
.check-list li::before {
  content: ""; position: absolute; left: 0; top: 2px; width: 22px; height: 22px; border-radius: 50%;
  background: var(--grad);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='m5 13 4 4L19 7' fill='none' stroke='%23000' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/14px no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='m5 13 4 4L19 7' fill='none' stroke='%23000' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/14px no-repeat;
  box-shadow: 0 0 0 4px rgba(70,143,244,.10);
}
.about-visual { display: grid; gap: 18px; }
.about-card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: 40px; box-shadow: var(--shadow); text-align: center;
  background-image: radial-gradient(120% 120% at 20% 0%, rgba(64,158,253,.10), transparent 55%);
}
.about-card img { margin: 0 auto 18px; }
.about-quote { font-family: var(--font-head); font-weight: 600; font-size: 1.15rem; color: var(--blue-ink); }
.about-badges { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }
.about-badges span {
  background: #fff; border: 1px solid var(--line); border-radius: 999px;
  padding: 8px 18px; font-weight: 600; font-family: var(--font-head); font-size: .88rem;
  color: var(--ink); box-shadow: var(--shadow-sm);
}

/* ---------- Testimonials ---------- */
.quotes { display: flex; flex-wrap: wrap; justify-content: center; gap: 22px; }
.quote { margin: 0; flex: 1 1 320px; max-width: 380px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 28px 26px; box-shadow: var(--shadow-sm); }
.quote:hover { --lift: -5px; --scale: 1.015; box-shadow: var(--shadow); border-color: #CFE0FF; }
.stars { color: #F5A623; letter-spacing: 2px; margin-bottom: 14px; }
.quote blockquote { margin: 0 0 20px; font-size: 1rem; color: var(--ink); }
.quote figcaption { display: flex; align-items: center; gap: 12px; }
.avatar {
  display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%;
  background: var(--grad); color: #fff; font-weight: 700; font-family: var(--font-head); font-size: .9rem;
}
.quote figcaption span strong { display: block; font-family: var(--font-head); font-size: .95rem; }
.quote figcaption span em { font-style: normal; color: var(--muted); font-size: .85rem; }

/* ---------- Contact ---------- */
.contact-inner { display: grid; grid-template-columns: .9fr 1.1fr; gap: 56px; align-items: start; }
.contact-copy h2 { font-size: clamp(1.8rem, 3.4vw, 2.5rem); font-weight: 800; margin: 18px 0 14px; }
.contact-copy > p { color: var(--muted); font-size: 1.05rem; }
.contact-list { list-style: none; margin: 28px 0 0; padding: 0; display: grid; gap: 16px; }
.contact-list li { display: flex; align-items: center; gap: 14px; font-weight: 500; }
.contact-ico { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 12px; background: #fff; border: 1px solid var(--line); color: var(--blue-dark); box-shadow: var(--shadow-sm); }
.contact-list a:hover { color: var(--blue-dark); }
.contact-ico.wa { color: #25D366; }
.contact-list a.wa-link { font-weight: 600; }
.contact-list a.wa-link:hover { color: #128C7E; }

.contact-form {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: 34px; box-shadow: var(--shadow);
}
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.field { margin-bottom: 18px; display: flex; flex-direction: column; }
.field label { font-weight: 600; font-size: .88rem; font-family: var(--font-head); margin-bottom: 8px; }
.field .opt { color: var(--muted); font-weight: 400; }
.field input, .field select, .field textarea {
  width: 100%; font: inherit; color: var(--ink);
  background: var(--bg-soft); border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: 13px 15px; transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
}
.field textarea { resize: vertical; min-height: 120px; }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; background: #fff; border-color: var(--blue);
  box-shadow: 0 0 0 4px rgba(70,143,244,.14);
}
.field.invalid input, .field.invalid textarea { border-color: #E5484D; background: #FFF5F5; }

/* Project type: selectable chips instead of a dropdown */
.chip-field { border: 0; padding: 0; margin: 0 0 18px; min-width: 0; }
.chip-field legend {
  padding: 0; margin-bottom: 8px;
  font-weight: 600; font-size: .88rem; font-family: var(--font-head);
}
.chips { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.chip { position: relative; display: flex; min-width: 0; }
.chip input { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; pointer-events: none; }
.chip > span {
  position: relative; flex: 1 1 auto; display: flex; align-items: center; justify-content: center; text-align: center;
  min-height: 46px; padding: 10px 22px; border: 1px solid var(--line); border-radius: var(--radius-sm);
  background: var(--bg-soft); color: var(--ink); font-size: .88rem; font-weight: 500; line-height: 1.25;
  cursor: pointer; user-select: none;
  transition: background .18s ease, border-color .18s ease, color .18s ease, box-shadow .18s ease, transform .18s ease;
}
.chip > span::after {
  content: "✓"; position: absolute; top: 5px; right: 8px;
  font-size: 11px; font-weight: 700; line-height: 1; color: #fff;
  opacity: 0; transform: translateY(2px); transition: opacity .18s ease, transform .18s ease;
}
.chip:hover > span { background: #fff; border-color: #B9D3FA; transform: translateY(-1px); }
.chip input:checked + span {
  background: var(--blue); border-color: var(--blue); color: #fff;
  box-shadow: 0 6px 16px rgba(70,143,244,.26);
}
.chip input:checked + span::after { opacity: 1; transform: none; }
.chip input:focus-visible + span {
  outline: none; border-color: var(--blue); box-shadow: 0 0 0 4px rgba(70,143,244,.18);
}
.chip input:checked:focus-visible + span {
  box-shadow: 0 6px 16px rgba(70,143,244,.26), 0 0 0 4px rgba(70,143,244,.18);
}
.error { color: #E5484D; font-size: .78rem; margin-top: 6px; min-height: 1em; }
.form-note { margin-top: 14px; font-size: .9rem; min-height: 1.2em; }
.form-note.ok { color: #16a34a; font-weight: 600; }
.form-note.bad { color: #E5484D; font-weight: 600; }

/* ---------- Footer ---------- */
.site-footer { background: var(--navy); color: #C7D3E8; padding: 64px 0 26px; }
.footer-inner { display: grid; grid-template-columns: 1.35fr 1.55fr minmax(300px, 1.1fr); gap: 40px; }
.footer-brand img { height: 28px; width: auto; margin-bottom: 18px; }
.footer-brand p { color: #93A4C2; max-width: 34ch; font-size: .95rem; }
.footer-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.footer-nav h4, .footer-social h4 { color: #fff; font-size: .92rem; margin-bottom: 14px; letter-spacing: .02em; }
.footer-nav a { display: block; color: #A9B8D4; padding: 5px 0; font-size: .93rem; transition: color .18s ease; }
.footer-nav a:hover { color: #fff; }
.socials { display: flex; flex-wrap: wrap; gap: 10px; }
.socials a {
  display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px;
  background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.10); color: #CBD8EE;
  transition: background .18s ease, color .18s ease, transform .18s ease;
}
.socials a:hover { background: var(--blue); color: #fff; transform: translateY(-2px); }
.socials a.wa:hover { background: #25D366; color: #fff; }
.socials a.ig:hover { background: linear-gradient(45deg, #F58529, #DD2A7B 55%, #8134AF); color: #fff; }
.socials a.tt:hover { background: #010101; color: #25F4EE; }
.footer-bottom {
  display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  border-top: 1px solid rgba(255,255,255,.10); margin-top: 44px; padding-top: 22px;
  color: #8395B6; font-size: .86rem;
}
.footer-links { display: flex; gap: 20px; }
.footer-links a:hover { color: #fff; }

/* ---------- Back to top ---------- */
.to-top {
  position: fixed; right: 22px; bottom: 22px; z-index: 90;
  width: 46px; height: 46px; border: none; border-radius: 50%;
  background: var(--grad); color: #fff; display: grid; place-items: center;
  box-shadow: 0 12px 26px rgba(70,143,244,.42);
  opacity: 0; visibility: hidden; transform: translateY(12px);
  transition: opacity .25s ease, transform .25s ease, visibility .25s ease;
}
.to-top.show { opacity: 1; visibility: visible; transform: translateY(0); }
.to-top:hover { transform: translateY(-3px); }

/* ---------- Interactive cards (cursor tilt + glow) ---------- */
.card, .work-card, .step, .quote {
  position: relative;
  transform: perspective(1000px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)) translateY(var(--lift, 0px)) scale(var(--scale, 1));
  transform-style: preserve-3d;
  transition: transform .3s cubic-bezier(.2, .7, .2, 1), box-shadow .35s ease, border-color .35s ease;
  will-change: transform;
}
.card::before, .work-card::before, .step::before, .quote::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit; z-index: 0; pointer-events: none;
  background: radial-gradient(240px circle at var(--mx, 50%) var(--my, 50%), rgba(70, 143, 244, .18), rgba(64, 158, 253, .06) 45%, transparent 68%);
  opacity: 0; transition: opacity .3s ease;
}
.card:hover::before, .work-card:hover::before, .step:hover::before, .quote:hover::before { opacity: 1; }
.card > *, .work-card > *, .step > *, .quote > * { position: relative; z-index: 1; }

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .hero-inner { grid-template-columns: 1fr; gap: 40px; }
  .lead { max-width: none; }
  .cards, .work-grid, .quotes { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: 1fr; max-width: 640px; margin: 0 auto; }
  .about-inner, .contact-inner { grid-template-columns: 1fr; gap: 40px; }
  .footer-inner { grid-template-columns: 1fr 1fr; }
  .footer-social { grid-column: 1 / -1; }
}

/* ---------- Tablets / large phones ---------- */
@media (max-width: 760px) {
  .container { padding: 0 20px; }
  .nav-toggle { display: flex; }
  .brand-word { height: 17px; }
  .nav {
    position: fixed; inset: 74px 0 auto 0; z-index: 99;
    flex-direction: column; align-items: stretch; gap: 2px;
    background: #fff; border-bottom: 1px solid var(--line);
    padding: 14px 20px 20px; box-shadow: var(--shadow);
    transform: translateY(-12px); opacity: 0; visibility: hidden;
    transition: opacity .22s ease, transform .22s ease, visibility .22s ease;
  }
  .nav.open { transform: none; opacity: 1; visibility: visible; }
  .nav a { padding: 14px 12px; font-size: 1rem; }
  .nav a.active::after { left: 12px; transform: none; }
  .header-actions .btn-sm { display: none; }

  .hero { padding-top: 36px; }
  .hero-bg, .hero-spot { background-size: min(430px, 86%) auto; }
  .hero-inner { padding-top: 8px; padding-bottom: 24px; gap: 32px; }
  .hero h1 { margin: 18px 0 14px; }
  .hero-cta { gap: 12px; margin: 24px 0 22px; }

  .cards, .work-grid, .quotes, .steps { grid-template-columns: 1fr; }
  .section { padding: 64px 0; }
  .section-head { margin-bottom: 36px; }
  .footer-inner { grid-template-columns: 1fr; gap: 32px; }
  .field-row { grid-template-columns: 1fr; gap: 0; }
  .contact-form { padding: 24px; }
}

/* ---------- Small phones ---------- */
@media (max-width: 480px) {
  .container { padding: 0 16px; }
  .section { padding: 52px 0; }
  .section-head { margin-bottom: 30px; }
  .section-head h2 { font-size: 1.6rem; }
  .section-head p { font-size: 1rem; }

  .hero { padding-top: 28px; }
  .hero h1 { font-size: 2rem; }
  .lead { font-size: 1rem; }
  .hero-cta { gap: 10px; }
  .hero-cta .btn { flex: 1 1 100%; }
  .hero-points { gap: 8px 18px; }
  .hero-points li { font-size: .9rem; }

  .card { padding: 24px 20px; }
  .step { padding: 22px 18px; }
  .quote { padding: 24px 20px; }
  .about-card { padding: 28px 22px; }
  .about-card img { max-width: 200px; }
  .contact-form { padding: 20px 16px; }
  .chips { gap: 8px; }
  .chip > span { min-height: 44px; padding: 9px 20px; font-size: .84rem; }

  .footer-bottom { flex-direction: column; align-items: flex-start; gap: 12px; }
  .footer-links { gap: 16px; }
  .to-top { right: 14px; bottom: 14px; width: 42px; height: 42px; }

  .btn { white-space: normal; }
}

/* project-type chips: two roomier columns on narrow screens */
@media (max-width: 620px) {
  .chips { grid-template-columns: repeat(2, 1fr); }
}

/* very narrow phones (iPhone SE 1st gen): keep the six social tiles on one row */
@media (max-width: 340px) {
  .socials { gap: 8px; }
  .socials a { width: 36px; height: 36px; border-radius: 10px; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; scroll-behavior: auto !important; }
  .card, .work-card, .step, .quote { transform: none !important; transition: none !important; }
  .work-grid.reveal .work-card { opacity: 1 !important; }
  .reveal-m { opacity: 1 !important; translate: none !important; scale: 1 !important; transition: none !important; }
}

/* ---------- Ring carousel ("Teams that trust CodeRoof") ---------- */
.ring-carousel {
  position: relative;
  margin-top: 6px;
  --ring-card-w: 220px;
  --ring-card-h: 220px;
  --ring-perspective: 1100px;
  --ring-radius: 12px;
  --ring-fade: #ffffff;
  user-select: none;
  -webkit-user-select: none;
  touch-action: pan-y;
  outline: none;
}
.ring-carousel:focus-visible { outline: 3px solid rgba(70,143,244,.5); outline-offset: 6px; border-radius: 14px; }

.ring-viewport { position: relative; width: 100%; overflow: visible; }

.ring-stage {
  position: relative;
  width: 100%;
  perspective: var(--ring-perspective);
  perspective-origin: 50% 44%;
  transform-style: preserve-3d;
  cursor: grab;
}
.ring-stage.grabbing { cursor: grabbing; }

.ring-track {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 0;
  height: 0;
  transform-style: preserve-3d;
}

.ring-card {
  position: absolute;
  left: 0;
  top: 0;
  width: var(--ring-card-w);
  height: var(--ring-card-h);
  margin-left: calc(var(--ring-card-w) / -2);
  margin-top: calc(var(--ring-card-h) / -2);
  border-radius: var(--ring-radius);
  overflow: hidden;
  background: var(--ring-fade);
  box-shadow: 0 18px 40px rgba(18, 58, 115, .22);
  will-change: transform, opacity;
  backface-visibility: visible;
  transform-origin: 50% 50%;
  transform-style: preserve-3d;
}
.ring-card img { display: block; width: 100%; height: 100%; object-fit: cover; -webkit-user-drag: none; }
.ring-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: #000;
  opacity: var(--ring-shade, 0);
  pointer-events: none;
}

.ring-caption { text-align: center; margin-top: 26px; min-height: 58px; }
.ring-cap-title { display: block; font-family: var(--font-head); font-weight: 700; color: var(--ink); font-size: 1.05rem; }
.ring-cap-sub { display: block; font-style: normal; color: var(--muted); font-size: .92rem; margin-top: 2px; }
.ring-cap-pos {
  display: inline-block; margin-top: 8px; font-size: .76rem; letter-spacing: .08em;
  color: var(--blue-dark); background: var(--bg-soft-2); border: 1px solid #D8E6FF;
  padding: 3px 10px; border-radius: 999px;
}

@media (max-width: 760px) {
  .ring-caption { margin-top: 18px; }
  .ring-card { box-shadow: 0 12px 26px rgba(18, 58, 115, .2); }
}

@media (prefers-reduced-motion: reduce) {
  .ring-card { will-change: auto; }
  .ring-stage { cursor: default; }
}

/* ============================================================
   Mobile-only card treatment (≤ 760px)
   ------------------------------------------------------------
   - cards sit at ~80% width (≈20% smaller)
   - service + process cards zoom in when scrolled into view
   - work cards alternate: 1st from the left, 2nd from the right…
   Desktop is untouched (everything lives inside the media query).
   ============================================================ */
@media (max-width: 760px) {
  /* ~20% narrower cards */
  .card, .step { width: 80%; margin-left: auto; margin-right: auto; }
  .work-card { flex: 0 0 80%; max-width: 80%; }

  /* Hidden start state, only when script.js adds .reveal-m */
  .reveal-m {
    --rl-x: 0%;
    --rl-s: .96;
    opacity: 0;
    translate: var(--rl-x) 0;
    scale: var(--rl-s);
    transition:
      opacity .5s ease,
      translate .62s cubic-bezier(.22, .8, .28, 1),
      scale .62s cubic-bezier(.22, .8, .28, 1);
    will-change: opacity, translate, scale;
  }

  /* Service cards zoom in; process steps zoom in AND glide in from the right */
  .card.reveal-m, .step.reveal-m { --rl-s: .86; }
  .step.reveal-m { --rl-x: 26%; }

  /* Work cards: alternating slide-in from left / right.
     These glide in noticeably slower than the service/process cards. */
  .work-card.reveal-m {
    --rl-x: -24%;
    transition:
      opacity 2.8s ease,
      translate 3.8s cubic-bezier(.18, .86, .24, 1),
      scale 3.8s cubic-bezier(.18, .86, .24, 1);
  }
  .work-card.reveal-m:nth-child(even) { --rl-x: 24%; }

  /* Revealed state */
  .reveal-m.is-in { opacity: 1; translate: 0 0; scale: 1; }
}

/* ------------------------------------------------------------
   "How we work" -> pinned horizontal cards (phones only)
   steps-pin.js turns the list into a full-width track and gives
   this wrapper the scroll distance the track needs. The stage
   sticks under the header, so vertical scrolling pauses while the
   cards travel right to left; after the last card has been fully
   visible for a short tail, the wrapper ends and the page unpins.
   The .is-pinned class is only added when the script can run on a
   tall-enough phone, so tablet, desktop, short landscape screens
   and reduced-motion users keep the plain grid/list.
   ------------------------------------------------------------ */
@media (max-width: 760px) {
  .steps-pin.is-pinned {
    /* fallback height; steps-pin.js sets the exact px value */
    height: calc(100vh + 308vh);
    height: calc(100svh + 308svh);
    margin-bottom: 8px;
  }

  .steps-pin.is-pinned .steps-stage {
    position: sticky;
    top: 74px;                             /* below the sticky site header */
    height: calc(100vh - 74px);
    height: calc(100svh - 74px);
    display: flex;
    flex-direction: column;
    justify-content: center;
    overflow: hidden;                      /* clips the waiting cards */
    padding: 10px 0 6px;
  }

  .steps-pin.is-pinned .section-head { margin-bottom: 26px; }

  .steps-pin.is-pinned .steps {
    display: flex;
    flex-wrap: nowrap;
    gap: 18px;
    width: 100%;
    max-width: none;
    margin: 0;
    will-change: transform;
  }

  .steps-pin.is-pinned .step {
    flex: 0 0 100%;                        /* one card per screen width */
    width: 100%;
    max-width: none;
    margin: 0;
  }

  /* The horizontal track replaces the per-card reveal on phones. */
  .steps-pin.is-pinned .step.reveal-m {
    opacity: 1;
    translate: none;
    scale: 1;
    transition: none;
  }

  .steps-pin.is-pinned .steps-rail {
    display: block;
    width: 120px;
    height: 3px;
    margin: 24px auto 0;
    border-radius: 999px;
    background: rgba(18, 58, 115, .12);
    overflow: hidden;
  }

  .steps-pin.is-pinned .steps-rail span {
    display: block;
    width: 100%;
    height: 100%;
    border-radius: inherit;
    background: var(--grad);
    transform: scaleX(0);
    transform-origin: left center;
  }
}

.steps-rail { display: none; }

/* ============================================================
   Typing headings — typing-text.js
   The sentence is laid out once (all characters occupy their final
   spot) and each character is then revealed, so nothing reflows and
   the following paragraph never jumps.
   ============================================================ */
.tw { position: relative; }

.tw-live {
  position: relative;
  display: block;
}

.tw-word {
  display: inline-block;
  white-space: nowrap;
}

.tw-ch {
  display: inline-block;
  opacity: 0;
  will-change: opacity, transform, filter;
}

.tw-ch.tw-in { animation: twRise .34s cubic-bezier(.22, 1, .36, 1) both; }
.tw-effect-fade .tw-ch.tw-in { animation: twFade .3s ease-out both; }
.tw-effect-blur .tw-ch.tw-in { animation: twBlur .42s ease-out both; }
.tw-effect-none .tw-ch.tw-in { animation: none; opacity: 1; }

@keyframes twRise {
  from { opacity: 0; transform: translateY(.3em); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes twFade {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes twBlur {
  from { opacity: 0; filter: blur(7px); }
  to   { opacity: 1; filter: blur(0); }
}

/* Caret ------------------------------------------------------ */
.tw-cursor {
  position: absolute;
  left: 0;
  top: 0;
  width: .09em;
  border-radius: 1px;
  background: var(--blue);
  opacity: 0;
  pointer-events: none;
  transition: transform .1s linear, opacity .3s ease;
  will-change: transform;
}

.tw-armed .tw-cursor { opacity: 1; }
.tw-cursor.tw-solid { animation: none; opacity: 1; }
.tw-cursor.tw-blink { animation: twBlink 1.05s ease-in-out infinite; }
.tw-cursor.tw-gone { opacity: 0; animation: none; }
.tw-hide-cursor .tw-cursor { opacity: 0 !important; }

.tw-cursor-character {
  width: auto;
  background: none;
  color: var(--blue);
  line-height: 1;
}

.tw-cursor-block {
  width: .55em;
  background: rgba(70, 143, 244, .3);
  border-radius: 2px;
}

.tw-cursor-underscore {
  width: .6em;
  border-radius: 2px;
}

.tw-cursor-none { display: none; }

@keyframes twBlink {
  0%, 42%   { opacity: 1; }
  55%, 92%  { opacity: .12; }
  100%      { opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  .tw-ch {
    opacity: 1 !important;
    animation: none !important;
    filter: none !important;
    transform: none !important;
  }
  .tw-cursor { display: none; }
}

/* ============================================================
   Page reload / loading screen — preloader.js
   Shown from the first paint, then fades out when the page is
   ready. Hidden automatically when JavaScript is disabled.
   ============================================================ */

.loader {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 26px;
  padding: 32px;
  background:
    radial-gradient(52% 42% at 50% 46%, rgba(70, 143, 244, .16) 0%, rgba(70, 143, 244, 0) 72%),
    linear-gradient(180deg, #ffffff 0%, #F6FAFF 50%, #EAF1FE 100%);
  opacity: 1;
  visibility: visible;
  touch-action: none;
  overscroll-behavior: contain;
  transition: opacity .65s ease, visibility .65s ease;
}

.loader-logo {
  width: min(54vw, 240px);
  height: auto;
  filter: drop-shadow(0 16px 34px rgba(18, 58, 115, .16));
  animation: loaderFloat 2.4s ease-in-out infinite;
}

.loader-bar {
  position: relative;
  width: 156px;
  height: 4px;
  border-radius: 999px;
  background: rgba(18, 58, 115, .10);
  overflow: hidden;
}

.loader-bar span {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 42%;
  border-radius: inherit;
  background: var(--grad);
  animation: loaderRun 1.25s cubic-bezier(.55, .06, .37, 1) infinite;
}

.loader-text {
  margin: -6px 0 0;
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .16em;
  color: var(--blue-ink);
  white-space: nowrap;
}

/* ---------- Rotating / animated text — rotate-text.js ---------- */
.rt { display: inline-block; max-width: 100%; }
.rt-visual { display: inline-block; white-space: nowrap; }
.rt-word { display: inline-block; white-space: nowrap; }
.rt-piece { display: inline-block; vertical-align: bottom; }
.rt-mask { overflow: hidden; }
.rt-char { display: inline-block; will-change: transform, opacity, filter; }
.rt-effect-flip { perspective: 700px; }
.rt-effect-flip .rt-char { backface-visibility: hidden; }

.rt-block {
  display: inline-block;
  padding: .22em .62em .26em;
  border-radius: 999px;
  background: #4a9df7;
  color: #fff;
  line-height: 1.25;
  transition: background-color .3s ease, color .3s ease;
}

.loader.is-done {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

@keyframes loaderFloat {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-7px); }
}

@keyframes loaderRun {
  0%   { transform: translateX(-105%); }
  100% { transform: translateX(355%); }
}

@media (prefers-reduced-motion: reduce) {
  .loader-logo { animation: none; }
  .loader-bar span { animation: none; width: 100%; }
}
