/* PatternAI — Pattern-recognition theme. Light, grid-heavy, mosaic, gold accents. */
@import url('https://fonts.googleapis.com/css2?family=DM+Serif+Display:ital@0;1&family=Source+Sans+3:wght@400;500;600;700&display=swap');

:root {
  --navy: #1E3A5F;
  --navy-deep: #16293f;
  --gold: #D97706;
  --gold-soft: #f7eddc;
  --white: #FFFFFF;
  --slate: #64748B;
  --teal: #14B8A6;
  --ink: #1f2a37;
  --paper: #f6f8fb;
  --line: #e2e8f0;
  --grid-line: rgba(30, 58, 95, 0.06);
  --maxw: 1200px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: 'Source Sans 3', system-ui, sans-serif;
  background: var(--white);
  color: var(--ink);
  line-height: 1.7;
  overflow-x: hidden;
}
h1, h2, h3, h4 { font-family: 'DM Serif Display', Georgia, serif; line-height: 1.1; color: var(--navy); font-weight: 400; }
h1 { font-size: clamp(2.3rem, 5.2vw, 4rem); letter-spacing: -0.01em; }
h2 { font-size: clamp(1.8rem, 3.6vw, 2.8rem); }
h3 { font-size: clamp(1.2rem, 2vw, 1.45rem); }
p { color: var(--slate); }
a { color: var(--navy); text-decoration: none; transition: color .25s ease; }
a:hover { color: var(--gold); }
img { max-width: 100%; display: block; }

.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 26px; }
section { padding: clamp(54px, 7.5vw, 104px) 0; position: relative; }
.eyebrow { text-transform: uppercase; letter-spacing: .26em; font-size: .72rem; color: var(--gold); font-weight: 700; }
.lead { font-size: clamp(1.02rem, 1.5vw, 1.18rem); color: var(--slate); max-width: 640px; }
.center { text-align: center; }
.center .lead { margin-left: auto; margin-right: auto; }

/* Pattern grid background helper */
.grid-bg {
  background-image:
    linear-gradient(var(--grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: 28px 28px;
}

/* Pattern divider */
.pattern-divider { height: 14px; width: 100%; background-image: repeating-linear-gradient(135deg, var(--gold) 0 10px, transparent 10px 20px); opacity: .5; }

/* Buttons — outline navy, hover fill gold + white */
.btn {
  display: inline-flex; align-items: center; gap: 9px;
  padding: 13px 26px; border-radius: 6px; font-weight: 700;
  font-family: 'Source Sans 3', sans-serif; cursor: pointer;
  font-size: .96rem; letter-spacing: .01em;
  border: 2px solid var(--navy); background: var(--white); color: var(--navy);
  transition: background .25s ease, color .25s ease, border-color .25s ease, transform .25s ease;
}
.btn:hover { background: var(--gold); border-color: var(--gold); color: var(--white); transform: translateY(-2px); }
.btn-primary { background: var(--navy); color: var(--white); }
.btn-primary:hover { background: var(--gold); border-color: var(--gold); color: var(--white); }
.btn-ghost { background: transparent; border-color: var(--navy); color: var(--navy); }
.btn-ghost:hover { background: var(--navy); border-color: var(--navy); color: var(--white); }
.btn-pill { border-radius: 999px; background: var(--gold); border-color: var(--gold); color: var(--white); padding: 15px 34px; }
.btn-pill:hover { background: var(--navy); border-color: var(--navy); color: var(--white); }

/* Header / nav — white bar, centred logo */
header.site {
  position: sticky; top: 0; z-index: 100;
  background: var(--white); border-bottom: 1px solid var(--line);
}
.nav { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; height: 78px; gap: 18px; }
.nav-left { display: flex; }
.logo { display: flex; align-items: center; gap: 10px; font-family: 'DM Serif Display', serif; font-weight: 400; font-size: 1.5rem; color: var(--navy); justify-self: center; }
.logo .mark {
  width: 32px; height: 32px; border-radius: 5px; background: var(--navy); position: relative; overflow: hidden;
  background-image: linear-gradient(rgba(255,255,255,.28) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.28) 1px, transparent 1px);
  background-size: 8px 8px;
}
.logo .mark::after { content: ""; position: absolute; right: 4px; bottom: 4px; width: 7px; height: 7px; background: var(--gold); border-radius: 2px; }
.logo b { color: var(--gold); font-weight: 400; }
.nav-links { display: flex; align-items: center; gap: 28px; list-style: none; }
.nav-links a { color: var(--navy); font-weight: 600; font-size: .95rem; }
.nav-links a:hover { color: var(--gold); }
.nav-cta { display: flex; align-items: center; gap: 14px; justify-content: flex-end; }
.burger { display: none; background: none; border: none; cursor: pointer; flex-direction: column; gap: 5px; padding: 8px; }
.burger span { width: 26px; height: 2px; background: var(--navy); transition: .3s; }

/* Hero — dashboard vibe */
.hero { padding: clamp(50px, 7vw, 92px) 0; background: var(--paper); position: relative; overflow: hidden; }
.hero::before {
  content: ""; position: absolute; inset: 0;
  background-image: linear-gradient(var(--grid-line) 1px, transparent 1px), linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: 32px 32px; z-index: 0;
}
.hero .wrap { position: relative; z-index: 1; }
.hero-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: 54px; align-items: center; }
.hero h1 { margin: 16px 0; }
.hero h1 .hl { color: var(--gold); }
.hero-actions { display: flex; gap: 14px; margin-top: 28px; flex-wrap: wrap; }
.hero-visual { position: relative; }
.hero-visual img { border-radius: 8px; border: 1px solid var(--line); box-shadow: 0 24px 60px rgba(30,58,95,.18); }
.hero-visual::after { content: ""; position: absolute; top: -16px; left: -16px; width: 70px; height: 70px; border-top: 4px solid var(--gold); border-left: 4px solid var(--gold); border-radius: 4px 0 0 0; }
.hero-chip { position: absolute; bottom: -16px; right: -14px; background: var(--white); border: 1px solid var(--line); border-left: 4px solid var(--teal); border-radius: 8px; padding: 13px 18px; display: flex; gap: 12px; align-items: center; box-shadow: 0 16px 40px rgba(30,58,95,.16); }
.hero-chip .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--teal); box-shadow: 0 0 0 4px rgba(20,184,166,.18); animation: pulse 1.8s infinite; }
.hero-chip small { color: var(--slate); display: block; font-size: .72rem; text-transform: uppercase; letter-spacing: .12em; }
.hero-chip strong { color: var(--navy); font-family: 'DM Serif Display', serif; font-size: 1.1rem; }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: .35; } }

/* section heads */
.sec-head { max-width: 680px; margin-bottom: 44px; }
.sec-head.center { margin-left: auto; margin-right: auto; }
.sec-head h2 { margin: 12px 0 12px; }

/* Cards grid */
.grid { display: grid; gap: 22px; }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }

/* Base card — white, gold corner accent, grid-line bg, 6px radius */
.p-card {
  background: var(--white); border: 1px solid var(--line); border-radius: 6px;
  padding: 26px; position: relative; overflow: hidden;
  background-image: linear-gradient(var(--grid-line) 1px, transparent 1px), linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: 22px 22px;
  transition: transform .35s ease, box-shadow .35s ease, border-color .35s ease;
}
.p-card::before { content: ""; position: absolute; top: 0; right: 0; border-width: 0 22px 22px 0; border-style: solid; border-color: transparent var(--gold) transparent transparent; }
.p-card:hover { transform: translateY(-5px); box-shadow: 0 20px 44px rgba(30,58,95,.12); border-color: var(--gold); }
.p-card .num { font-family: 'DM Serif Display', serif; color: var(--gold); font-size: 1.3rem; }
.p-card h3 { margin: 8px 0 8px; }
.p-card p { font-size: .95rem; }
.p-card .tag { display: inline-block; margin-top: 14px; font-size: .74rem; color: var(--navy); background: var(--gold-soft); padding: 4px 12px; border-radius: 999px; font-weight: 700; letter-spacing: .04em; }

/* Mosaic featured cards (home) */
.mosaic { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.mosaic-card { position: relative; border-radius: 6px; overflow: hidden; border: 1px solid var(--line); background: var(--navy); min-height: 280px; display: flex; }
.mosaic-card img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .42; transition: transform .5s ease, opacity .4s ease; }
.mosaic-card:hover img { transform: scale(1.07); opacity: .55; }
.mosaic-card .m-body { position: relative; z-index: 1; padding: 22px; margin-top: auto; color: var(--white); }
.mosaic-card .m-cat { font-size: .72rem; text-transform: uppercase; letter-spacing: .18em; color: var(--gold); font-weight: 700; }
.mosaic-card h3 { color: var(--white); margin-top: 6px; }
.mosaic-card::after { content: ""; position: absolute; top: 12px; right: 12px; width: 16px; height: 16px; border-top: 3px solid var(--gold); border-right: 3px solid var(--gold); }

/* Partner band */
.partner-band { background: var(--navy); }
.partner-band .eyebrow { color: var(--gold); }
.partner-band h2, .partner-band p { color: var(--white); }
.partner-logos { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 28px; }
.partner-logos span { border: 1px solid rgba(255,255,255,.22); color: #cdd9e6; padding: 12px 22px; border-radius: 6px; font-weight: 600; letter-spacing: .04em; }

/* Parallax pattern section */
.parallax { position: relative; min-height: 380px; display: grid; place-items: center; text-align: center; color: var(--white); background-image: linear-gradient(rgba(22,41,63,.78), rgba(22,41,63,.78)), url('/images/motif-mosaic.jpg'); background-size: cover; background-position: center; background-attachment: fixed; }
.parallax h2 { color: var(--white); max-width: 860px; }
.parallax p { color: rgba(255,255,255,.85); max-width: 620px; margin: 14px auto 0; }
.parallax .eyebrow { color: var(--gold); }

/* Split editorial / case study */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 50px; align-items: center; }
.split img { border-radius: 8px; border: 1px solid var(--line); box-shadow: 0 16px 44px rgba(30,58,95,.12); }
.case-box { background: var(--paper); border-left: 4px solid var(--gold); padding: 18px 22px; border-radius: 0 6px 6px 0; margin-top: 20px; }
.case-box b { color: var(--navy); font-family: 'DM Serif Display', serif; font-size: 1.5rem; display: block; }
.case-box span { color: var(--slate); font-size: .9rem; }

/* Line-icon features */
.feat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; }
.feat-item { padding: 24px; border: 1px solid var(--line); border-radius: 6px; background: var(--white); transition: border-color .3s ease, transform .3s ease; }
.feat-item:hover { border-color: var(--teal); transform: translateY(-4px); }
.feat-item .ic { width: 48px; height: 48px; border: 2px solid var(--navy); border-radius: 6px; display: grid; place-items: center; color: var(--navy); margin-bottom: 14px; }
.feat-item .ic svg { width: 24px; height: 24px; }
.feat-item h3 { font-size: 1.15rem; margin-bottom: 6px; }
.feat-item p { font-size: .92rem; }

/* CSS carousel testimonials */
.carousel { overflow-x: auto; scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch; padding-bottom: 12px; }
.carousel-track { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(300px, 1fr); gap: 22px; }
.tcard { background: var(--white); border: 1px solid var(--line); border-radius: 6px; padding: 28px; scroll-snap-align: start; position: relative; }
.tcard::before { content: "\201C"; font-family: 'DM Serif Display', serif; color: var(--gold); font-size: 3rem; line-height: .6; display: block; margin-bottom: 8px; }
.tcard p { color: var(--ink); }
.tcard .who { display: flex; align-items: center; gap: 12px; margin-top: 18px; }
.tcard .av { width: 44px; height: 44px; border-radius: 6px; background: var(--navy); display: grid; place-items: center; font-weight: 700; color: var(--white); }
.tcard .who small { color: var(--slate); display: block; }
.tcard .who b { color: var(--navy); }

@media (min-width: 981px) {
  .carousel-track { grid-auto-columns: 1fr; }
}

/* CTA band */
.cta-band { background: var(--navy); border-radius: 10px; padding: clamp(40px, 6vw, 72px); text-align: center; position: relative; overflow: hidden; }
.cta-band::before { content: ""; position: absolute; inset: 0; background-image: linear-gradient(rgba(255,255,255,.05) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.05) 1px, transparent 1px); background-size: 26px 26px; }
.cta-band > * { position: relative; z-index: 1; }
.cta-band h2 { color: var(--white); }
.cta-band p { color: rgba(255,255,255,.85); max-width: 560px; margin: 14px auto 26px; }

/* stats */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.stat { text-align: center; padding: 26px; border: 1px solid var(--line); border-radius: 6px; background: var(--white); position: relative; }
.stat::after { content: ""; position: absolute; top: 0; right: 0; border-width: 0 16px 16px 0; border-style: solid; border-color: transparent var(--gold) transparent transparent; }
.stat b { font-family: 'DM Serif Display', serif; font-size: clamp(1.9rem, 4vw, 2.7rem); color: var(--navy); display: block; }
.stat span { color: var(--slate); font-size: .88rem; }

/* page hero (inner) */
.page-hero { padding: clamp(48px, 6vw, 80px) 0 clamp(30px, 4vw, 48px); background: var(--paper); position: relative; overflow: hidden; }
.page-hero::before { content: ""; position: absolute; inset: 0; background-image: linear-gradient(var(--grid-line) 1px, transparent 1px), linear-gradient(90deg, var(--grid-line) 1px, transparent 1px); background-size: 30px 30px; }
.page-hero .wrap { position: relative; z-index: 1; }
.breadcrumb { color: var(--slate); font-size: .85rem; margin-bottom: 10px; }
.breadcrumb a { color: var(--slate); }
.breadcrumb a:hover { color: var(--gold); }

/* image catalog card */
.cat-card { background: var(--white); border: 1px solid var(--line); border-radius: 6px; overflow: hidden; display: flex; flex-direction: column; position: relative; transition: transform .35s ease, box-shadow .35s ease, border-color .35s ease; }
.cat-card::before { content: ""; position: absolute; top: 0; right: 0; z-index: 2; border-width: 0 24px 24px 0; border-style: solid; border-color: transparent var(--gold) transparent transparent; }
.cat-card:hover { transform: translateY(-5px); box-shadow: 0 22px 48px rgba(30,58,95,.14); border-color: var(--gold); }
.cat-card img { aspect-ratio: 3/2; object-fit: cover; width: 100%; transition: transform .5s ease; }
.cat-card:hover img { transform: scale(1.05); }
.cat-body { padding: 22px; display: flex; flex-direction: column; gap: 9px; flex: 1; }
.cat-cat { font-size: .72rem; text-transform: uppercase; letter-spacing: .16em; color: var(--gold); font-weight: 700; }
.cat-ref { font-family: 'Source Sans 3', monospace; font-size: .76rem; color: var(--slate); letter-spacing: .03em; }
.cat-meta { list-style: none; font-size: .86rem; color: var(--slate); display: grid; gap: 4px; }
.cat-meta li b { color: var(--navy); font-weight: 700; }
.cat-price { font-family: 'DM Serif Display', serif; font-size: 1.3rem; color: var(--navy); margin-top: auto; padding-top: 6px; }
.cat-price span { color: var(--gold); font-size: .82rem; font-family: 'Source Sans 3', sans-serif; text-transform: uppercase; letter-spacing: .1em; }

/* filters */
.filters { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 32px; }
.filter-btn { background: var(--white); border: 1px solid var(--navy); color: var(--navy); padding: 9px 18px; border-radius: 999px; cursor: pointer; font-family: inherit; font-size: .88rem; font-weight: 600; transition: .25s; }
.filter-btn:hover { background: var(--gold-soft); border-color: var(--gold); color: var(--navy); }
.filter-btn.active { background: var(--navy); color: var(--white); border-color: var(--navy); }

/* Forms */
.form-card { background: var(--white); border: 1px solid var(--line); border-radius: 8px; padding: clamp(24px, 4vw, 42px); box-shadow: 0 14px 40px rgba(30,58,95,.08); }
.field { margin-bottom: 20px; }
.field label { display: block; font-weight: 600; margin-bottom: 7px; color: var(--navy); font-size: .92rem; }
.field input, .field select, .field textarea {
  width: 100%; padding: 13px 15px; border-radius: 6px; border: 1px solid var(--line);
  background: var(--white); color: var(--ink); font-family: inherit; font-size: .96rem; transition: border-color .25s ease, box-shadow .25s ease;
}
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--teal); box-shadow: 0 0 0 3px rgba(20,184,166,.16); }
.field textarea { min-height: 130px; resize: vertical; }
.field .err { color: #c0392b; font-size: .82rem; margin-top: 6px; display: none; }
.field.invalid .err { display: block; }
.field.invalid input, .field.invalid select, .field.invalid textarea { border-color: #c0392b; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.success-msg { display: none; text-align: center; padding: 30px; }
.success-msg.show { display: block; animation: fadein .6s ease; }
.success-msg .ic { width: 64px; height: 64px; border-radius: 6px; background: var(--navy); display: grid; place-items: center; margin: 0 auto 18px; color: var(--gold); }
.success-msg .ic svg { width: 32px; height: 32px; }
@keyframes fadein { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

/* contact info cards */
.info-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.info-card { background: var(--white); border: 1px solid var(--line); border-left: 4px solid var(--gold); border-radius: 6px; padding: 22px; }
.info-card small { color: var(--slate); text-transform: uppercase; letter-spacing: .12em; font-size: .7rem; }
.info-card p { color: var(--navy); margin-top: 6px; font-weight: 600; }

/* about grid */
.about-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 50px; align-items: center; }
.cert-list { list-style: none; display: grid; gap: 12px; }
.cert-list li { padding: 14px 18px; background: var(--white); border: 1px solid var(--line); border-radius: 6px; display: flex; gap: 12px; align-items: center; color: var(--ink); }
.cert-list li::before { content: ""; flex: 0 0 12px; height: 12px; background: var(--gold); border-radius: 2px; }

/* legal / prose */
.prose { max-width: 840px; }
.prose h2 { margin: 36px 0 12px; font-size: clamp(1.4rem, 2.6vw, 1.9rem); }
.prose h3 { margin: 24px 0 10px; color: var(--gold); }
.prose p, .prose li { color: var(--slate); margin-bottom: 12px; }
.prose ul, .prose ol { padding-left: 22px; margin-bottom: 14px; }
.prose strong { color: var(--navy); }
.prose a { color: var(--teal); }
.prose a:hover { color: var(--gold); }

/* Footer */
footer.site { background: var(--navy-deep); padding: 58px 0 26px; color: #cdd9e6; }
.foot-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: 34px; }
.foot-grid h4 { color: var(--white); margin-bottom: 15px; font-size: 1.05rem; }
.foot-about .logo { color: var(--white); }
.foot-about .logo b { color: var(--gold); }
.foot-about p { color: #9fb2c6; font-size: .9rem; margin-top: 14px; }
.foot-links { list-style: none; display: grid; gap: 9px; }
.foot-links a { color: #9fb2c6; font-size: .9rem; }
.foot-links a:hover { color: var(--gold); }
.foot-contact p { color: #9fb2c6; font-size: .88rem; margin-bottom: 8px; }
.foot-contact b { color: var(--white); }
.foot-bottom { border-top: 1px solid rgba(255,255,255,.12); margin-top: 42px; padding-top: 22px; display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; color: #9fb2c6; font-size: .84rem; }

/* Cookie banner */
.cookie { position: fixed; bottom: 22px; left: 22px; right: 22px; max-width: 560px; margin: 0 auto; background: var(--white); border: 1px solid var(--line); border-top: 4px solid var(--gold); border-radius: 8px; padding: 20px 22px; z-index: 200; display: none; box-shadow: 0 20px 50px rgba(30,58,95,.22); }
.cookie.show { display: block; animation: fadein .5s ease; }
.cookie p { font-size: .88rem; color: var(--slate); }
.cookie .row { display: flex; gap: 12px; margin-top: 14px; align-items: center; }
.cookie .btn { padding: 10px 22px; font-size: .88rem; }
.cookie a { color: var(--teal); font-weight: 600; }
.cookie a:hover { color: var(--gold); }

/* scroll animations with JS fallback (default visible) */
.slide-up, .fade-in { opacity: 1; transform: none; transition: opacity .55s ease, transform .55s ease; }
html.js .slide-up { opacity: 0; transform: translateY(26px); }
html.js .fade-in { opacity: 0; }
html.js .slide-up.visible, html.js .fade-in.visible { opacity: 1; transform: translateY(0); }
/* staggered grid reveal */
html.js .grid .slide-up:nth-child(2) { transition-delay: .1s; }
html.js .grid .slide-up:nth-child(3) { transition-delay: .2s; }
html.js .grid .slide-up:nth-child(4) { transition-delay: .3s; }
html.js .mosaic .slide-up:nth-child(2) { transition-delay: .12s; }
html.js .mosaic .slide-up:nth-child(3) { transition-delay: .24s; }
html.js .mosaic .slide-up:nth-child(4) { transition-delay: .36s; }
html.js .feat-grid .slide-up:nth-child(2) { transition-delay: .1s; }
html.js .feat-grid .slide-up:nth-child(3) { transition-delay: .2s; }
html.js .feat-grid .slide-up:nth-child(4) { transition-delay: .3s; }

/* Responsive */
@media (max-width: 980px) {
  .hero-grid, .split, .about-grid { grid-template-columns: 1fr; }
  .grid-4, .mosaic, .feat-grid { grid-template-columns: repeat(2, 1fr); }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .foot-grid { grid-template-columns: 1fr 1fr; }
  .parallax { background-attachment: scroll; }
}
@media (max-width: 760px) {
  .nav { grid-template-columns: auto 1fr auto; }
  .logo { justify-self: start; }
  .nav-links { position: fixed; top: 78px; left: 0; right: 0; background: var(--white); flex-direction: column; padding: 24px; gap: 18px; border-bottom: 1px solid var(--line); transform: translateY(-150%); transition: transform .35s ease; box-shadow: 0 16px 30px rgba(30,58,95,.12); }
  .nav-links.open { transform: translateY(0); }
  .burger { display: flex; }
  .nav-cta .btn { display: none; }
  .grid-3, .grid-2, .info-grid, .form-row { grid-template-columns: 1fr; }
}
@media (max-width: 520px) {
  .grid-4, .mosaic, .feat-grid { grid-template-columns: 1fr; }
  .stats { grid-template-columns: 1fr 1fr; }
  .foot-grid { grid-template-columns: 1fr; }
}
