/* Infinity Concepts AI — marketing site
   Light, card-driven agency layout matching infinityconcepts.com.
   Brand: purple #654FA1 -> blue #007faf. White surfaces throughout; dark ground is
   reserved for the CTA and footer so it reads as punctuation, not atmosphere.
   Type is Myriad Pro (Adobe Fonts kit cok2jax) with Source Sans 3 as the fallback. */

:root {
  --purple: #654FA1;
  --purple-dark: #4e3c80;
  --blue: #007faf;
  --blue-dark: #026086;
  --brand-gradient: linear-gradient(120deg, #654FA1 0%, #007faf 100%);

  /* Sampled from the ".ai" in the logo. Purple/blue carries brand and structure;
     orange means "act" — primary CTAs only, so it never loses its punch.
     Note the dark label colour: white on this orange is only 2.8:1 and fails WCAG AA,
     while the dark ink on it is 6.5:1. */
  --orange: #f47721;
  --orange-dark: #e0640f;
  --on-orange: #221a10;

  --ink: #1d1830;
  --body: #5b5670;
  --muted: #837e96;
  --line: #e6e4ee;
  --surface: #ffffff;
  --surface-alt: #f8f7fc;
  --dark: #211a3d;
  --dark-deep: #17122b;

  --font: "myriad-pro", "Source Sans 3", "Segoe UI", system-ui, sans-serif;
  --radius: 16px;
  --r-pill: 8px;   /* buttons and pills — raise for rounder, 999px for capsule */
  --shadow-sm: 0 1px 2px rgba(29, 24, 48, .04), 0 6px 16px rgba(29, 24, 48, .05);
  --shadow-md: 0 10px 30px rgba(29, 24, 48, .09);
  --shadow-lg: 0 24px 60px rgba(29, 24, 48, .14);
  --max: 1200px;
  --header-h: 86px;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 16px); }

body {
  margin: 0;
  font-family: var(--font);
  color: var(--body);
  background: var(--surface);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-family: var(--font);
  color: var(--ink);
  line-height: 1.15;
  margin: 0 0 .6em;
  letter-spacing: -.02em;
  /* Even out line lengths instead of hard-coding <br> — no stranded last word,
     and it re-balances at every viewport width rather than only the one it was
     composed at. */
  text-wrap: balance;
}
h1 { font-size: clamp(2.3rem, 4.6vw, 3.6rem); font-weight: 700; }
h2 { font-size: clamp(1.8rem, 3.2vw, 2.6rem); font-weight: 700; }
h3 { font-size: 1.28rem; font-weight: 600; }
h4 { font-size: 1.05rem; font-weight: 600; }

/* `pretty` only guards the last line against orphans — cheaper than `balance` and
   correct for multi-line body copy, where balancing every line looks odd. */
p { margin: 0 0 1.1em; text-wrap: pretty; }
a { color: var(--purple); text-decoration: none; }
a:hover { color: var(--blue-dark); }
/* height:auto is required — without it the HTML height attribute stays in force while
   max-width scales the width down, stretching the image vertically. */
img { max-width: 100%; height: auto; display: block; }

.wrap { width: min(100% - 2.5rem, var(--max)); margin-inline: auto; }
.wrap-narrow { width: min(100% - 2.5rem, 820px); }

.sr-only, .skip {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip:focus {
  position: fixed; top: 12px; left: 12px; width: auto; height: auto; clip: auto;
  padding: .6rem 1rem; background: var(--dark); color: #fff; border-radius: 8px; z-index: 200;
}
:focus-visible { outline: 3px solid var(--purple); outline-offset: 3px; border-radius: 4px; }

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  font-family: var(--font); font-weight: 600; font-size: .95rem;
  padding: .75rem 1.5rem; border-radius: var(--r-pill); border: 2px solid transparent;
  cursor: pointer; white-space: nowrap;
  transition: transform .15s ease, box-shadow .2s ease, background-color .2s ease,
              color .2s ease, border-color .2s ease, background-position .3s ease;
}
.btn-lg { padding: .92rem 1.9rem; font-size: 1rem; }
.btn-primary { background: var(--orange); color: var(--on-orange); }
.btn-primary:hover {
  background: var(--orange-dark); color: var(--on-orange);
  transform: translateY(-2px); box-shadow: 0 10px 24px rgba(244, 119, 33, .34);
}
.btn-outline { background: transparent; color: var(--purple); border-color: var(--line); }
.btn-outline:hover { border-color: var(--purple); color: var(--purple); transform: translateY(-2px); }
.btn-light { background: #fff; color: var(--purple); }
.btn-light:hover { color: var(--purple); transform: translateY(-2px); box-shadow: var(--shadow-md); }

.arrow-link {
  font-weight: 600; font-size: .95rem; color: var(--purple);
  display: inline-flex; align-items: center; gap: .45rem; margin-top: auto;
}
.arrow-link span { transition: transform .18s ease; }
.arrow-link:hover span { transform: translateX(4px); }

/* ---------- Header ---------- */

.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255,255,255,.9); backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
  transition: box-shadow .25s ease, background-color .25s ease;
}
.site-header.scrolled { background: #fff; box-shadow: 0 4px 20px rgba(29, 24, 48, .07); }
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  height: var(--header-h); gap: 1.5rem;
}
.logo { display: inline-flex; align-items: center; }
.logo img { height: 34px; width: auto; }

.nav { display: flex; align-items: center; gap: 1.6rem; }
.nav-list { display: flex; align-items: center; gap: 1.5rem; list-style: none; margin: 0; padding: 0; }
.nav-link {
  display: inline-block; background: none; border: 0; padding: .35rem 0; cursor: pointer;
  font-family: var(--font); font-size: 1rem; font-weight: 600; color: var(--ink);
  position: relative;
}
.nav-link:hover, .nav-link:focus-visible { color: var(--purple); }
.nav-link::after {
  content: ""; position: absolute; left: 0; bottom: 0; height: 2px; width: 0;
  background: var(--brand-gradient); transition: width .2s ease;
}
.nav-link:hover::after { width: 100%; }

/* Solutions mega-menu: title + description per row, like the source site */
.has-menu { position: relative; }
.submenu {
  position: absolute; top: calc(100% + 18px); left: -1.25rem; width: 380px;
  background: #fff; border: 1px solid var(--line); border-radius: 14px;
  box-shadow: var(--shadow-lg); list-style: none; margin: 0; padding: .6rem;
  opacity: 0; visibility: hidden; transform: translateY(-8px);
  transition: opacity .18s ease, transform .18s ease, visibility .18s;
}
.has-menu:hover .submenu, .has-menu:focus-within .submenu, .submenu.open {
  opacity: 1; visibility: visible; transform: translateY(0);
}
.submenu::before { content: ""; position: absolute; top: -18px; left: 0; right: 0; height: 18px; }
.submenu a { display: block; padding: .7rem .9rem; border-radius: 10px; }
.submenu a strong { display: block; color: var(--ink); font-size: .97rem; font-weight: 600; }
.submenu a span { display: block; color: var(--muted); font-size: .87rem; line-height: 1.45; }
.submenu a:hover { background: var(--surface-alt); }
.submenu a:hover strong { color: var(--purple); }

.burger { display: none; flex-direction: column; gap: 5px; background: none; border: 0; padding: .5rem; cursor: pointer; }
.burger span { width: 24px; height: 2px; background: var(--purple); border-radius: 2px; transition: transform .2s, opacity .2s; }
.burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Sections ---------- */

.section { padding: clamp(4rem, 7.5vw, 6.5rem) 0; }
.section-alt { background: var(--surface-alt); }

.section-head { max-width: 760px; margin-bottom: 3rem; }
.section-head.center { margin-inline: auto; text-align: center; }
.section-head.split {
  max-width: none; display: flex; align-items: flex-end;
  justify-content: space-between; gap: 2rem; flex-wrap: wrap;
}
.section-head .sub { font-size: 1.08rem; margin: 0; }

.eyebrow {
  font-size: .78rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase;
  color: var(--purple); margin-bottom: .9rem;
}
.eyebrow.center { text-align: center; }

/* ---------- Hero ---------- */

/* Full-bleed photo hero with a scrim and centered type, matching the source site. */
.hero {
  position: relative; isolation: isolate;
  min-height: min(76vh, 700px);
  display: grid; place-items: center; text-align: center;
  padding: clamp(3.5rem, 8vw, 6rem) 0;
}
.hero-bg { position: absolute; inset: 0; z-index: -1; overflow: hidden; }
.hero-bg img { width: 100%; height: 100%; object-fit: cover; object-position: center; }
/* Brand-tinted scrim, darkest through the middle where the headline sits. The brand wash
   is kept light on purpose — push it further and the purple/cyan light threads in the
   photograph stop reading as distinct from the overlay. */
.hero-bg::after {
  content: ""; position: absolute; inset: 0;
  background:
    radial-gradient(120% 85% at 50% 50%, rgba(24,18,45,.78) 0%, rgba(24,18,45,.58) 70%, rgba(24,18,45,.5) 100%),
    linear-gradient(100deg, rgba(101,79,161,.3), rgba(0,127,175,.22));
}

.hero-inner { position: relative; max-width: 900px; }
.hero h1 {
  color: #fff; margin-bottom: .35em;
  font-size: clamp(2.4rem, 5.4vw, 4.2rem);
  text-shadow: 0 2px 24px rgba(0,0,0,.35);
}
.hero-sub {
  color: rgba(255,255,255,.94); font-size: clamp(1.1rem, 2vw, 1.45rem);
  line-height: 1.45; margin: 0 auto; max-width: 46ch;
  text-shadow: 0 1px 16px rgba(0,0,0,.3);
  text-wrap: balance; /* short centered block — even lines beat orphan-guarding */
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 1rem; margin-top: 2.25rem; justify-content: center; }

.grad {
  background: var(--brand-gradient); -webkit-background-clip: text; background-clip: text;
  color: transparent;
}

/* ---------- Intro band ---------- */

.intro { padding: clamp(3.5rem, 6vw, 5rem) 0; text-align: center; }
.lede { font-size: clamp(1.05rem, 1.7vw, 1.2rem); margin: 0 auto 1.75rem; max-width: 68ch; }
.intro-statement {
  margin: 0 auto; padding-top: 1.75rem; border-top: 1px solid var(--line);
  font-size: clamp(1.1rem, 2vw, 1.4rem); font-style: italic; line-height: 1.5;
  color: var(--ink); max-width: 72ch;
}

/* ---------- Why us ---------- */

.why-grid { display: grid; grid-template-columns: .95fr 1.05fr; gap: clamp(2rem, 5vw, 4.5rem); align-items: start; }
.why-intro h2 { margin-bottom: .5em; }
.why-intro .btn { margin-top: .75rem; }

.why-list { list-style: none; margin: 0; padding: 0; display: grid; gap: .1rem; }
.why-list li {
  position: relative; padding: .85rem 0 .85rem 2.25rem;
  border-bottom: 1px solid var(--line); color: var(--ink); font-weight: 500;
}
.why-list li:last-child { border-bottom: 0; }
/* Checkmark drawn in CSS — cheaper than six inline SVGs and recolors with the brand */
.why-list li::before {
  content: ""; position: absolute; left: .35rem; top: 1.35rem;
  width: 9px; height: 5px; border-left: 2.5px solid var(--purple);
  border-bottom: 2.5px solid var(--purple); transform: rotate(-45deg);
}

/* ---------- Grids & cards ---------- */

.grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 1.75rem; }

.solution {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; display: flex; flex-direction: column;
  box-shadow: var(--shadow-sm);
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.solution:hover { transform: translateY(-5px); box-shadow: var(--shadow-lg); border-color: #d8d4e6; }
.solution-media { background: var(--surface-alt); aspect-ratio: 4 / 3; max-height: 210px; overflow: hidden; }
.solution-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.solution:hover .solution-media img { transform: scale(1.04); }
.solution-body { padding: 1.75rem; display: flex; flex-direction: column; flex: 1; }
.solution-body p { color: var(--body); }
.solution-body p:last-of-type { margin-bottom: 1.4rem; }

/* ---------- Statement band ---------- */

.statement {
  background: var(--brand-gradient); color: #fff;
  padding: clamp(3.5rem, 6vw, 5rem) 0; text-align: center;
}
.statement .eyebrow { color: rgba(255,255,255,.85); }
.statement blockquote {
  margin: 0; font-size: clamp(1.2rem, 2.4vw, 1.65rem); line-height: 1.5;
  font-style: italic; color: #fff;
}

/* ---------- Stats ---------- */

.stat {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 2rem 1.75rem; box-shadow: var(--shadow-sm);
}
.stat-num {
  display: block; font-weight: 700; font-size: clamp(2.8rem, 5vw, 3.6rem); line-height: 1;
  letter-spacing: -.03em; margin-bottom: .5rem;
  background: var(--brand-gradient); -webkit-background-clip: text; background-clip: text;
  color: transparent;
}
.stat h3 { font-size: 1.1rem; margin-bottom: .4em; }
.stat p { margin: 0; font-size: .97rem; }

/* ---------- Process ---------- */

.steps {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1.75rem;
}
.steps li {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.75rem; position: relative;
}
.step-num {
  display: block; font-size: .9rem; font-weight: 700; letter-spacing: .12em;
  color: var(--purple); margin-bottom: .75rem;
}
.steps h3 { font-size: 1.15rem; }
.steps p { margin: 0; font-size: .97rem; }

/* ---------- Insights ---------- */

.insight {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.75rem; transition: transform .2s ease, box-shadow .2s ease;
}
.insight:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.insight-meta {
  font-size: .78rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
  color: var(--blue-dark); margin-bottom: .6rem;
}
.insight h3 { font-size: 1.15rem; line-height: 1.35; }
.insight h3 a { color: var(--ink); }
.insight h3 a:hover { color: var(--purple); }
.insight p:last-child { margin: 0; font-size: .97rem; }

/* ---------- FAQ ---------- */

.faq { border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  list-style: none; cursor: pointer; padding: 1.35rem 3rem 1.35rem 0; position: relative;
  font-weight: 600; font-size: 1.08rem; color: var(--ink); transition: color .18s ease;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary:hover { color: var(--purple); }
.faq summary::after {
  content: ""; position: absolute; right: .5rem; top: 50%; width: 11px; height: 11px;
  border-right: 2px solid var(--purple); border-bottom: 2px solid var(--purple);
  transform: translateY(-70%) rotate(45deg); transition: transform .22s ease;
}
.faq details[open] summary::after { transform: translateY(-25%) rotate(-135deg); }
.faq-body { padding: 0 2rem 1.5rem 0; }
.faq-body p:last-child { margin-bottom: 0; }

/* ---------- CTA ---------- */

.cta {
  background:
    radial-gradient(700px 400px at 85% 20%, rgba(101, 79, 161, .5), transparent 65%),
    var(--dark);
  color: rgba(255,255,255,.82); padding: clamp(3.5rem, 7vw, 5.5rem) 0;
}
.cta-inner { display: grid; grid-template-columns: 1.1fr .9fr; gap: 3rem; align-items: center; }
.cta h2 { color: #fff; margin-bottom: .4em; }
.cta p { margin: 0; color: rgba(255,255,255,.78); }
.cta-form { display: flex; flex-wrap: wrap; gap: .75rem; }
.cta-form input {
  flex: 1 1 240px; padding: .88rem 1.1rem; font-size: 1rem; font-family: inherit;
  border-radius: var(--r-pill); border: 2px solid rgba(255,255,255,.22);
  background: rgba(255,255,255,.08); color: #fff;
}
.cta-form input::placeholder { color: rgba(255,255,255,.5); }
.cta-form input:focus { outline: none; border-color: #fff; background: rgba(255,255,255,.14); }
.form-note { flex: 1 0 100%; margin: 0; font-size: .9rem; color: #9fd8ef; min-height: 1.2em; }

/* ---------- Footer ---------- */

.site-footer { background: var(--dark-deep); color: rgba(255,255,255,.6); padding: 4rem 0 1.5rem; font-size: .95rem; }
.footer-grid {
  display: grid; grid-template-columns: 1.6fr repeat(3, 1fr); gap: 2.5rem;
  padding-bottom: 3rem; border-bottom: 1px solid rgba(255,255,255,.1);
}
/* Knock the full-colour mark out to white — the grey wordmark is unreadable on the
   dark footer. Swap this for a supplied reversed logo when one exists. */
.footer-brand img { height: 36px; width: auto; filter: brightness(0) invert(1); }
.footer-brand p { margin: 1rem 0 0; max-width: 34ch; }
.footer-col h4 { font-size: .78rem; letter-spacing: .14em; text-transform: uppercase; color: #fff; margin-bottom: 1rem; }
.footer-col ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .6rem; }
.footer-col a { color: rgba(255,255,255,.6); }
.footer-col a:hover { color: #fff; }
.footer-bottom { padding-top: 1.5rem; }
.footer-bottom p { margin: 0; font-size: .88rem; color: rgba(255,255,255,.42); }

/* ---------- Responsive ---------- */

@media (max-width: 1000px) {
  .why-grid, .cta-inner { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 2rem; }
}

@media (max-width: 780px) {
  .burger { display: flex; }
  .nav {
    position: fixed; inset: var(--header-h) 0 auto; flex-direction: column; align-items: stretch;
    gap: 0; background: #fff; padding: 1rem 1.25rem 2rem; border-bottom: 1px solid var(--line);
    transform: translateY(-120%); transition: transform .25s ease; box-shadow: var(--shadow-lg);
    max-height: calc(100vh - var(--header-h)); overflow-y: auto;
  }
  .nav.open { transform: translateY(0); }
  .nav-list { flex-direction: column; align-items: stretch; gap: 0; }
  .nav-list > li { border-bottom: 1px solid var(--line); }
  .nav-link { display: block; width: 100%; text-align: left; padding: .95rem 0; }
  .nav-link::after { display: none; }
  .submenu {
    position: static; width: auto; opacity: 1; visibility: visible; transform: none;
    background: transparent; border: 0; box-shadow: none; padding: 0 0 .75rem .5rem; display: none;
  }
  .submenu.open { display: block; }
  .submenu a { padding: .5rem 0; }
  .submenu a:hover { background: transparent; }
  .nav-cta { margin-top: 1.25rem; align-self: flex-start; }
  .hero { min-height: 70vh; }
  .hero-actions .btn { flex: 1 1 auto; }
  .section-head.split { align-items: flex-start; }
  .footer-grid { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
