/* ==========================================================
   Craft — premium minimal
   Fonts: Quicksand (display) + Figtree (body), self-hosted
   ========================================================== */
@font-face {
  font-family: "Quicksand";
  src: url("fonts/quicksand-latin-wght-normal.woff2") format("woff2-variations"),
       url("fonts/quicksand-latin-wght-normal.woff2") format("woff2");
  font-weight: 300 700; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Figtree";
  src: url("fonts/figtree-latin-wght-normal.woff2") format("woff2-variations"),
       url("fonts/figtree-latin-wght-normal.woff2") format("woff2");
  font-weight: 300 900; font-style: normal; font-display: swap;
}

:root {
  --bg: #FAF8F4;
  --surface: #FFFFFF;
  --ink: #1A1311;
  --ink-2: #5E524C;
  --ink-3: #9A8F89;
  --line: rgba(26, 19, 17, .1);
  --line-2: rgba(26, 19, 17, .18);

  --ember: #D9412B;
  --ember-soft: #EE7A5F;
  --ember-deep: #A32D1F;
  --gold: #C99A4B;
  --night: #16100E;

  --font-display: "Quicksand", "Figtree", system-ui, sans-serif;
  --font-body: "Figtree", system-ui, -apple-system, "Segoe UI", sans-serif;

  --max: 1240px;
  --ease: cubic-bezier(.22, .7, .2, 1);
  --header-h: 72px;

  --grain: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1  0 0 0 0 1  0 0 0 0 1  0 0 0 .55 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: var(--header-h); }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 16px;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4 { margin: 0; font-family: var(--font-display); font-weight: 600; letter-spacing: -.02em; }
p { margin: 0; }
.wrap { width: min(var(--max), calc(100% - 48px)); margin-inline: auto; }
::selection { background: var(--ember); color: #fff; }
:focus-visible { outline: 2px solid var(--ember); outline-offset: 3px; border-radius: 4px; }

/* ---------- Shared bits ---------- */
.kicker {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 12px; font-weight: 500; letter-spacing: .22em; text-transform: uppercase;
  color: var(--ink-2);
}
.kicker i { width: 6px; height: 6px; border-radius: 50%; background: var(--ember); display: inline-block; }
.kicker-light { color: rgba(250, 248, 244, .7); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  height: 52px; padding: 0 28px; border-radius: 999px;
  font-family: var(--font-body); font-size: 15px; font-weight: 500; letter-spacing: .01em;
  transition: background .3s var(--ease), color .3s var(--ease), transform .3s var(--ease), border-color .3s var(--ease);
  white-space: nowrap;
}
.btn-sm { height: 42px; padding: 0 20px; font-size: 14px; }
.btn-ink { background: var(--ink); color: var(--bg); }
.btn-ink:hover { background: var(--ember); transform: translateY(-1px); }
.btn-line { border: 1px solid var(--line-2); color: var(--ink); }
.btn-line:hover { border-color: var(--ink); }
.link-arrow { font-size: 15px; font-weight: 500; color: var(--ink); display: inline-flex; gap: 8px; align-items: center; }
.link-arrow span { transition: transform .3s var(--ease); }
.link-arrow:hover span { transform: translateX(4px); }
.link-arrow:hover { color: var(--ember); }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(250, 248, 244, .82);
  backdrop-filter: saturate(1.4) blur(14px);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s var(--ease), background .3s var(--ease);
}
.site-header.scrolled { border-bottom-color: var(--line); }
.header-row { height: var(--header-h); display: flex; align-items: center; gap: 32px; }
.brand img { height: 36px; width: auto; }
.nav { display: flex; gap: 34px; margin-left: auto; }
.nav a { font-size: 14px; font-weight: 500; color: var(--ink-2); position: relative; transition: color .2s var(--ease); }
.nav a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -6px; height: 1px; background: var(--ember);
  transform: scaleX(0); transform-origin: left; transition: transform .35s var(--ease);
}
.nav a:hover { color: var(--ink); }
.nav a:hover::after { transform: scaleX(1); }
.menu-toggle { display: none; }

/* ---------- Hero ---------- */
.hero { padding: 28px 0 40px; overflow-x: clip; }
.hero-head { text-align: center; }
.hero h1 {
  margin-top: 16px;
  font-size: clamp(34px, 4.6vw, 64px);
  line-height: 1.04; font-weight: 600; letter-spacing: -.035em;
}
.hero h1 em { font-style: normal; color: var(--ember); }

/* Stage: concave cylinder of tiles */
.stage {
  --tile-w: min(clamp(190px, 17.5vw, 262px), 30vh);
  position: relative;
  height: calc(var(--tile-w) * 1.25 * 1.18);
  margin: 26px 0 30px;
  perspective: 1200px;
  perspective-origin: 50% 50%;
  cursor: grab; touch-action: pan-y; user-select: none; -webkit-user-select: none;
  outline: none;
}
.stage.dragging { cursor: grabbing; }
.ring { position: absolute; inset: 0; transform-style: preserve-3d; }
.tile {
  position: absolute; left: 50%; top: 50%; margin: 0;
  width: var(--tile-w); aspect-ratio: 4 / 5;
  border-radius: 18px; overflow: hidden;
  color: var(--fg, rgba(250, 248, 244, .78));
  background: var(--bg-tile);
  box-shadow: 0 1px 0 rgba(255,255,255,.08) inset, 0 28px 40px -30px rgba(22, 16, 14, .4);
  will-change: transform, opacity;
  backface-visibility: hidden;
}
.tile::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image: var(--grain); background-size: 160px; opacity: .14; mix-blend-mode: overlay;
}
.tile-art { position: absolute; inset: 12% 14% 26%; display: grid; place-items: center; }
.tile-art svg { width: 100%; height: 100%; }
.tile-art img { width: 100%; height: 100%; object-fit: cover; }
.tile figcaption {
  position: absolute; left: 20px; right: 20px; bottom: 18px;
  padding-top: 14px; border-top: 1px solid currentColor;
  border-top-color: color-mix(in srgb, currentColor 30%, transparent);
  display: flex; align-items: baseline; gap: 10px;
  font-family: var(--font-display); font-weight: 600; font-size: clamp(15px, 1.25vw, 18px);
  letter-spacing: -.01em; color: var(--cap, #FAF8F4);
}
.tile figcaption span { font-family: var(--font-body); font-size: 11px; font-weight: 500; letter-spacing: .16em; opacity: .65; }

.t-web  { --bg-tile: radial-gradient(120% 80% at 20% 0%, #F08A6E 0%, transparent 55%), linear-gradient(165deg, #DA4A31, #8E2416); }
.t-app  { --bg-tile: radial-gradient(90% 60% at 80% 10%, rgba(217,65,43,.45), transparent 60%), linear-gradient(165deg, #2B1E1A, #120C0B); }
.t-net  { --bg-tile: radial-gradient(100% 70% at 50% 0%, #C9483A 0%, transparent 60%), linear-gradient(165deg, #A9301F, #3A1310); }
.t-erp  { --bg-tile: linear-gradient(165deg, #F3ECE0, #DCCDB6); --fg: rgba(26, 19, 17, .7); --cap: #1A1311; }
.t-int  { --bg-tile: radial-gradient(120% 80% at 80% 0%, #F7A487 0%, transparent 55%), linear-gradient(165deg, #EE7A5F, #C33A26); }
.t-cctv { --bg-tile: radial-gradient(90% 60% at 20% 0%, rgba(201,154,75,.35), transparent 60%), linear-gradient(165deg, #241A17, #3A1F19); }

.hero-foot {
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 32px;
}
.lead { font-size: 16px; color: var(--ink-2); max-width: 400px; line-height: 1.65; }
.slide-ctrl { display: flex; align-items: center; gap: 14px; }
.round {
  width: 42px; height: 42px; border-radius: 50%;
  border: 1px solid var(--line-2); background: transparent; color: var(--ink);
  display: grid; place-items: center; cursor: pointer;
  transition: background .25s var(--ease), color .25s var(--ease), border-color .25s var(--ease);
}
.round svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.round:hover { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.counter { display: flex; align-items: center; gap: 12px; min-width: 210px; justify-content: center; font-size: 14px; }
.counter #cNum { font-family: var(--font-display); font-weight: 600; color: var(--ember); }
.counter .sep { width: 28px; height: 1px; background: var(--line-2); }
.counter #cName { color: var(--ink); font-weight: 500; }
.hero-ctas { display: flex; align-items: center; justify-content: flex-end; gap: 26px; }

/* ---------- Sections ---------- */
.section { padding: clamp(80px, 10vw, 140px) 0; }
.sec-head {
  display: grid; grid-template-columns: 1.2fr 1fr; gap: 48px; align-items: end;
  margin-bottom: clamp(44px, 6vw, 72px);
}
.sec-head h2 { margin-top: 18px; font-size: clamp(32px, 4vw, 52px); line-height: 1.08; }
.sec-head > p { color: var(--ink-2); max-width: 440px; justify-self: end; }

/* Services list */
#services { background: var(--surface); }
.svc-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.svc {
  display: grid; grid-template-columns: 80px minmax(220px, 1fr) 1.3fr 48px; align-items: center; gap: 24px;
  padding: 30px 0; border-bottom: 1px solid var(--line);
  position: relative; cursor: default;
}
.svc::before {
  content: ""; position: absolute; left: 0; bottom: -1px; height: 1px; width: 100%;
  background: var(--ember); transform: scaleX(0); transform-origin: left; transition: transform .6s var(--ease);
}
.svc:hover::before { transform: scaleX(1); }
.svc-n { font-size: 13px; letter-spacing: .14em; color: var(--ink-3); }
.svc h3 { font-size: clamp(22px, 2.3vw, 30px); transition: transform .5s var(--ease), color .3s var(--ease); }
.svc p { color: var(--ink-2); max-width: 520px; }
.svc-go {
  width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line-2);
  display: grid; place-items: center; font-size: 16px; color: var(--ink);
  transition: background .3s var(--ease), color .3s var(--ease), border-color .3s var(--ease), transform .4s var(--ease);
}
.svc:hover h3 { transform: translateX(8px); color: var(--ember); }
.svc:hover .svc-go { background: var(--ember); border-color: var(--ember); color: #fff; transform: rotate(-45deg); }

/* Platforms marquee */
.platforms { border-block: 1px solid var(--line); padding: 26px 0; overflow: hidden; background: var(--bg); }
.marquee { mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); }
.marquee-track { display: flex; width: max-content; animation: marquee 40s linear infinite; }
.marquee-track span {
  font-family: var(--font-display); font-weight: 500; font-size: clamp(20px, 2.2vw, 28px);
  color: var(--ink-3); padding: 0 36px; position: relative; white-space: nowrap;
}
.marquee-track span::after { content: ""; position: absolute; right: -3px; top: 50%; width: 6px; height: 6px; border-radius: 50%; background: var(--ember); opacity: .6; transform: translateY(-50%); }
@keyframes marquee { to { transform: translateX(-50%); } }

/* Approach */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; border-top: 1px solid var(--line); }
.step { padding: 34px 32px 8px 0; position: relative; }
.step + .step { padding-left: 32px; border-left: 1px solid var(--line); }
.step-n {
  font-family: var(--font-display); font-weight: 500; font-size: 15px; color: var(--ember);
  display: inline-block; margin-bottom: 44px;
}
.step h3 { font-size: 24px; margin-bottom: 10px; }
.step p { color: var(--ink-2); font-size: 15px; }

/* Why (dark) */
.why { background: var(--night); color: var(--bg); position: relative; overflow: hidden; }
.why::before {
  content: ""; position: absolute; width: 720px; height: 720px; right: -260px; top: -320px; border-radius: 50%;
  background: radial-gradient(circle, rgba(217,65,43,.28), transparent 65%); pointer-events: none;
}
.why::after { content: ""; position: absolute; inset: 0; background-image: var(--grain); background-size: 160px; opacity: .05; pointer-events: none; }
.why-grid { display: grid; grid-template-columns: 1fr 1.15fr; gap: clamp(40px, 8vw, 120px); position: relative; z-index: 1; }
.why-intro h2 { margin-top: 18px; font-size: clamp(32px, 4vw, 52px); line-height: 1.08; }
.why-list { display: grid; gap: 0; }
.why-item { padding: 28px 0; border-bottom: 1px solid rgba(250, 248, 244, .12); }
.why-item:first-child { padding-top: 6px; }
.why-item h3 { font-size: 22px; margin-bottom: 8px; }
.why-item p { color: rgba(250, 248, 244, .62); }

/* Contact */
.contact { text-align: center; }
.contact-inner { max-width: 820px; }
.contact h2 { margin: 20px 0 18px; font-size: clamp(40px, 6vw, 80px); line-height: 1.02; letter-spacing: -.04em; }
.contact h2 em { font-style: normal; color: var(--ember); }
.contact-sub { color: var(--ink-2); font-size: 17px; margin-bottom: 34px; }
.contact-ctas { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* Footer */
.site-footer { background: var(--night); color: rgba(250, 248, 244, .6); padding: 72px 0 32px; font-size: 14px; }
.foot-top { display: grid; grid-template-columns: 1fr 1.3fr; gap: 48px; padding-bottom: 48px; border-bottom: 1px solid rgba(250, 248, 244, .1); }
.foot-brand img { height: 40px; width: auto; margin-bottom: 18px; }
.foot-cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; }
.foot-cols h4 { font-family: var(--font-body); font-size: 12px; font-weight: 600; letter-spacing: .18em; text-transform: uppercase; color: var(--bg); margin-bottom: 16px; }
.foot-cols ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.foot-cols a:hover { color: var(--bg); }
.foot-bottom { display: flex; justify-content: space-between; align-items: center; padding-top: 24px; }
.to-top:hover { color: var(--bg); }

/* Reveal */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .9s var(--ease), transform .9s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
.svc.reveal:nth-child(2), .step.reveal:nth-child(2), .why-item.reveal:nth-child(2) { transition-delay: .06s; }
.svc.reveal:nth-child(3), .step.reveal:nth-child(3), .why-item.reveal:nth-child(3) { transition-delay: .12s; }
.svc.reveal:nth-child(4), .step.reveal:nth-child(4) { transition-delay: .18s; }

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
  .hero-foot { grid-template-columns: 1fr auto; }
  .hero-foot .lead { grid-column: 1 / -1; max-width: 560px; text-align: center; justify-self: center; order: -1; }
  .slide-ctrl { justify-self: start; }
  .svc { grid-template-columns: 56px 1fr 44px; }
  .svc p { grid-column: 2 / 3; }
  .svc-go { grid-row: 1; grid-column: 3; }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .step:nth-child(3) { border-left: 0; padding-left: 0; }
  .step:nth-child(n+3) { border-top: 1px solid var(--line); }
}
@media (max-width: 820px) {
  .nav, .header-cta { display: none; }
  .menu-toggle {
    display: grid; place-content: center; gap: 6px; margin-left: auto;
    width: 44px; height: 44px; border: 1px solid var(--line-2); border-radius: 50%; background: transparent; cursor: pointer;
  }
  .menu-toggle span { width: 16px; height: 1.5px; background: var(--ink); transition: transform .3s var(--ease); }
  .site-header.open .menu-toggle span:first-child { transform: translateY(3.75px) rotate(45deg); }
  .site-header.open .menu-toggle span:last-child { transform: translateY(-3.75px) rotate(-45deg); }
  .site-header.open .nav {
    display: flex; flex-direction: column; gap: 0;
    position: absolute; top: var(--header-h); left: 0; right: 0;
    background: var(--bg); border-bottom: 1px solid var(--line); padding: 8px 24px 20px;
  }
  .site-header.open .nav a { padding: 14px 0; font-size: 18px; color: var(--ink); border-bottom: 1px solid var(--line); }
  .site-header.open .nav a::after { display: none; }

  .sec-head { grid-template-columns: 1fr; gap: 18px; }
  .sec-head > p { justify-self: start; }
  .why-grid { grid-template-columns: 1fr; }
  .foot-top { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  :root { --header-h: 64px; }
  .wrap { width: calc(100% - 32px); }
  .brand img { height: 30px; }
  .hero { padding-top: 24px; }
  .stage { --tile-w: 200px; margin: 18px 0 22px; }
  .hero-foot { grid-template-columns: 1fr; gap: 22px; justify-items: center; }
  .slide-ctrl { justify-self: center; }
  .counter { min-width: 0; }
  .hero-ctas { justify-content: center; flex-wrap: wrap; gap: 18px; }
  .svc { grid-template-columns: 1fr 44px; gap: 10px 16px; padding: 24px 0; }
  .svc-n { grid-column: 1; }
  .svc h3 { grid-column: 1; }
  .svc p { grid-column: 1 / -1; }
  .svc-go { grid-column: 2; grid-row: 1 / 3; }
  .steps { grid-template-columns: 1fr; }
  .step, .step + .step { padding: 26px 0 20px; border-left: 0; }
  .step + .step { border-top: 1px solid var(--line); }
  .step-n { margin-bottom: 18px; }
  .foot-cols { grid-template-columns: 1fr 1fr; }
  .foot-bottom { flex-direction: column; gap: 12px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; }
}
