/* Caresol AI — site styles */
@font-face { font-family: "Public Sans"; src: url("fonts/public-sans-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Public Sans"; src: url("fonts/public-sans-latin-600-normal.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Public Sans"; src: url("fonts/public-sans-latin-700-normal.woff2") format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Public Sans"; src: url("fonts/public-sans-latin-800-normal.woff2") format("woff2"); font-weight: 800; font-display: swap; }

:root {
  --accent: #3D35C8;
  --accent-dark: #2A2392;
  --accent-soft: #ECEBFF;
  --ink: #14162B;
  --body: #444A5E;
  --muted: #5A6075;
  --line: #E4E6EE;
  --tint: #F5F6FA;
  --radius: 16px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; font-family: "Public Sans", system-ui, -apple-system, "Segoe UI", sans-serif; color: var(--ink); background: #fff; line-height: 1.5; }
img { max-width: 100%; display: block; }
a { color: var(--accent); }
a:hover { color: var(--accent-dark); }
a:focus-visible, .btn:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
h1, h2, h3 { margin: 0; line-height: 1.2; }
p { margin: 0; }

.container { max-width: 1200px; margin: 0 auto; padding: 0 32px; }
.section { padding: 96px 0; }
.tint { background: var(--tint); }
.eyebrow { font-size: 14px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); margin-bottom: 14px; }
.section-title { font-size: clamp(30px, 4vw, 38px); font-weight: 800; letter-spacing: -.015em; margin-bottom: 12px; }
.section-lead { font-size: 18px; color: var(--muted); max-width: 640px; line-height: 1.6; margin-bottom: 48px; }

.skip-link { position: absolute; left: -999px; top: 8px; background: #fff; padding: 10px 16px; z-index: 10; }
.skip-link:focus { left: 8px; }

/* Buttons */
.btn { display: inline-block; text-decoration: none; padding: 15px 25px; border-radius: 10px; font-weight: 600; font-size: 16px; border: 1px solid transparent; min-height: 44px; }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-dark); color: #fff; }
.btn-secondary { background: #fff; color: var(--ink); border-color: #C9CCD8; }
.btn-secondary:hover { border-color: var(--ink); color: var(--ink); }
.btn-light { background: #fff; color: var(--ink); font-weight: 700; }
.btn-light:hover { color: var(--accent); }
.btn-outline-light { color: #fff; border-color: #fff; }
.btn-outline-light:hover { background: rgba(255,255,255,.12); color: #fff; }
.btn-row { display: flex; flex-wrap: wrap; gap: 14px; }

/* Header */
.site-header { border-bottom: 1px solid var(--line); background: #fff; }
.header-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; padding-top: 18px; padding-bottom: 18px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); font-weight: 800; font-size: 20px; }
.brand img { height: 36px; width: auto; }
.brand-mark { width: 36px; height: 36px; border-radius: 10px; background: var(--accent); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 18px; }
.main-nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 28px; font-size: 15px; font-weight: 500; }
.main-nav a { color: var(--ink); text-decoration: none; }
.main-nav a:hover { color: var(--accent); }
.main-nav .btn { color: #fff; padding: 12px 20px; }

/* Hero */
.hero { padding: 88px 0 96px; }
.hero-inner { display: flex; flex-wrap: wrap; gap: 56px; align-items: center; }
.hero-copy { flex: 999 1 560px; min-width: 0; }
.hero h1 { font-size: clamp(36px, 5vw, 56px); line-height: 1.08; font-weight: 800; letter-spacing: -.02em; margin-bottom: 24px; }
.hero-sub { font-size: 20px; line-height: 1.6; color: var(--body); max-width: 640px; margin-bottom: 36px; }
.hero-card { flex: 1 1 340px; min-width: 0; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 32px; display: flex; flex-direction: column; gap: 20px; }
.hero-card-title { font-size: 14px; font-weight: 600; color: var(--muted); }
.check { display: flex; gap: 14px; align-items: flex-start; }
.check svg { flex-shrink: 0; }
.check strong { display: block; margin-bottom: 4px; }
.check span { font-size: 15px; color: var(--muted); }

/* Facts strip */
.facts { border-bottom: 1px solid var(--line); }
.facts ul { list-style: none; margin: 0; padding: 22px 0; display: flex; flex-wrap: wrap; gap: 12px 40px; justify-content: center; font-size: 15px; font-weight: 600; color: var(--body); }

/* Cards */
.grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 24px; }
.grid-4 { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 20px; }
.card { border: 1px solid var(--line); border-radius: var(--radius); padding: 32px; background: #fff; }
.card h3 { font-size: 22px; font-weight: 700; margin: 20px 0 10px; }
.card p { font-size: 16px; line-height: 1.6; color: var(--body); margin-bottom: 20px; }
.card-link { font-weight: 600; text-decoration: none; }
.tile { display: block; background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 28px; text-decoration: none; color: var(--ink); }
.tile:hover { border-color: var(--accent); color: var(--ink); }
.tile h3 { font-size: 19px; font-weight: 700; margin-bottom: 10px; }
.tile p { font-size: 15px; line-height: 1.6; color: var(--body); }

/* Accessibility banner */
.banner { background: var(--ink); color: #fff; border-radius: 20px; padding: 48px; display: flex; flex-wrap: wrap; gap: 32px; align-items: center; justify-content: space-between; }
.banner-copy { flex: 999 1 520px; min-width: 0; }
.banner .eyebrow { color: #B9B5FF; }
.banner h2 { font-size: clamp(26px, 3vw, 32px); font-weight: 800; margin-bottom: 14px; }
.banner p { font-size: 17px; line-height: 1.6; color: #D5D7E2; }

/* Case study */
.split { display: flex; flex-wrap: wrap; gap: 56px; align-items: center; }
.split > * { flex: 1 1 440px; min-width: 0; }
.split p.lead { font-size: 18px; line-height: 1.6; color: var(--body); margin: 16px 0 24px; }
.steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 14px; }
.steps li { display: flex; gap: 16px; align-items: center; border: 1px solid var(--line); border-radius: 14px; padding: 20px 24px; }
.step-num { width: 36px; height: 36px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); font-weight: 800; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.steps strong { display: block; margin-bottom: 2px; }
.steps span.desc { font-size: 15px; color: var(--muted); }

/* Why */
.why h3 { font-size: 20px; font-weight: 700; margin-bottom: 10px; }
.why p { font-size: 16px; line-height: 1.6; color: var(--body); }

/* Team */
.person { border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; }
.avatar { width: 72px; height: 72px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); font-weight: 800; font-size: 24px; display: flex; align-items: center; justify-content: center; margin-bottom: 18px; overflow: hidden; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.person h3 { font-size: 18px; font-weight: 700; margin-bottom: 4px; }
.person .role { font-size: 15px; font-weight: 600; color: var(--accent); margin-bottom: 10px; }
.person p { font-size: 15px; line-height: 1.5; color: var(--muted); }

/* CTA */
.cta { background: var(--accent); color: #fff; }
.cta-inner { padding: 88px 32px; display: flex; flex-wrap: wrap; gap: 32px; align-items: center; justify-content: space-between; }
.cta-copy { flex: 999 1 520px; min-width: 0; }
.cta h2 { font-size: clamp(30px, 4vw, 38px); font-weight: 800; margin-bottom: 14px; }
.cta p { font-size: 18px; line-height: 1.6; color: #E4E2FF; }

/* Footer */
.site-footer { background: var(--ink); color: #D5D7E2; }
.footer-top { padding-top: 64px; padding-bottom: 40px; display: flex; flex-wrap: wrap; gap: 48px; justify-content: space-between; }
.footer-col { flex: 1 1 180px; min-width: 0; display: flex; flex-direction: column; gap: 10px; font-size: 15px; }
.footer-col.wide { flex: 1 1 300px; }
.footer-col h2 { font-size: 15px; font-weight: 700; color: #fff; margin-bottom: 4px; }
.footer-brand { font-weight: 800; font-size: 20px; color: #fff; }
.site-footer a { color: #D5D7E2; text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.footer-bottom { border-top: 1px solid #2E3150; padding-top: 20px; padding-bottom: 32px; display: flex; flex-wrap: wrap; gap: 12px 28px; justify-content: space-between; font-size: 14px; color: #A9ADC0; }
.footer-bottom nav { display: flex; gap: 24px; }
.footer-bottom a { color: #A9ADC0; }

@media (max-width: 640px) {
  .container { padding: 0 20px; }
  .section { padding: 64px 0; }
  .hero { padding: 56px 0 64px; }
  .banner { padding: 32px 24px; }
  .cta-inner { padding: 64px 20px; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

/* Graphics update */
.hero-art { flex: 1 1 380px; min-width: 0; }
.hero-art img { width: 100%; height: auto; }
.hero-facts { margin-top: 24px; font-size: 15px; font-weight: 600; color: var(--muted); }
.includes { border-bottom: 1px solid var(--line); background: #fff; }
.includes .container { padding-top: 40px; padding-bottom: 40px; }
.includes-title { font-size: 14px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-bottom: 20px; }
.includes-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 24px; }
.includes-list li { display: flex; gap: 14px; align-items: flex-start; }
.includes-list svg { color: var(--accent); flex-shrink: 0; }
.includes-list strong { display: block; margin-bottom: 4px; }
.includes-list span { font-size: 15px; color: var(--muted); }
.tile-icon { color: var(--accent); margin-bottom: 16px; }
.banner-icon { color: #B9B5FF; flex-shrink: 0; }
.hero-copy { flex: 1 1 520px; }
.hero-art { flex: 1 1 420px; max-width: 560px; }
.hero h1 { font-size: clamp(36px, 4.4vw, 52px); }

/* ===== Motion & content update ===== */
.service-icon { width: 56px; height: 56px; border-radius: 14px; background: var(--accent-soft); color: var(--accent); display: flex; align-items: center; justify-content: center; }
.card.service { display: flex; flex-direction: column; transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease; }
.card.service:hover { transform: translateY(-4px); border-color: #C9C6F5; box-shadow: 0 12px 32px rgba(20, 22, 43, .08); }
.card.service .card-link { margin-top: auto; }
.chips { list-style: none; margin: 0 0 22px; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.chips li { font-size: 13px; font-weight: 600; color: var(--accent-dark); background: var(--accent-soft); padding: 6px 12px; border-radius: 999px; }
.tile { transition: transform .25s ease, border-color .25s ease; }
.tile:hover { transform: translateY(-3px); }

/* Document AI flow */
.flow { list-style: none; margin: 0 0 32px; padding: 0; display: flex; align-items: stretch; gap: 0; }
.flow-step { flex: 1 1 0; min-width: 0; background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 24px; display: flex; flex-direction: column; gap: 6px; }
.flow-step strong { font-size: 17px; }
.flow-step > span:last-child { font-size: 14px; color: var(--muted); }
.flow-icon { width: 48px; height: 48px; border-radius: 12px; background: var(--accent-soft); color: var(--accent); display: flex; align-items: center; justify-content: center; margin-bottom: 8px; }
.flow-final { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent) inset; }
.flow-line { flex: 0 0 40px; display: flex; align-items: center; }
.flow-line span { display: block; width: 100%; height: 3px; border-radius: 2px; background-image: linear-gradient(90deg, var(--accent) 50%, transparent 50%); background-size: 12px 3px; opacity: .6; animation: flowdash 1s linear infinite; }
@keyframes flowdash { to { background-position: 12px 0; } }
.js .flow .flow-step { opacity: 0; transform: translateY(12px); transition: opacity .5s ease, transform .5s ease; }
.js .flow.in-view .flow-step { opacity: 1; transform: none; }
.js .flow.in-view .flow-step:nth-child(3) { transition-delay: .25s; }
.js .flow.in-view .flow-step:nth-child(5) { transition-delay: .5s; }
.js .flow.in-view .flow-step:nth-child(7) { transition-delay: .75s; }
.flow.in-view .flow-final .flow-icon { animation: glow 2.4s 1.3s ease-in-out infinite; }
@keyframes glow { 0%, 100% { box-shadow: 0 0 0 0 rgba(61, 53, 200, .35); } 50% { box-shadow: 0 0 0 10px rgba(61, 53, 200, 0); } }

.chat-demo { margin: 0; max-width: 720px; background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 24px; display: flex; flex-direction: column; gap: 14px; }
.chat-label { font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.chat-q { align-self: flex-end; background: var(--ink); color: #fff; padding: 12px 16px; border-radius: 14px 14px 4px 14px; font-size: 15px; max-width: 85%; }
.chat-a { align-self: flex-start; background: var(--accent-soft); padding: 14px 16px; border-radius: 14px 14px 14px 4px; font-size: 15px; max-width: 90%; }
.chat-source { margin-top: 10px; display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; color: var(--accent-dark); background: #fff; padding: 5px 10px; border-radius: 8px; }
.js .chat-demo .chat-q, .js .chat-demo .chat-a { opacity: 0; transform: translateY(10px); transition: opacity .5s ease, transform .5s ease; }
.js .chat-demo.in-view .chat-q { opacity: 1; transform: none; transition-delay: .2s; }
.js .chat-demo.in-view .chat-a { opacity: 1; transform: none; transition-delay: 1.1s; }

/* iClinyn steps */
.steps .step-num svg { display: block; }
.js .steps li { opacity: 0; transform: translateX(16px); transition: opacity .5s ease, transform .5s ease; }
.js .steps.in-view li { opacity: 1; transform: none; }
.js .steps.in-view li:nth-child(2) { transition-delay: .2s; }
.js .steps.in-view li:nth-child(3) { transition-delay: .4s; }

/* Process with filling line */
.process { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 32px; position: relative; }
.process::before, .process::after { content: ""; position: absolute; top: 22px; left: 22px; right: calc((100% - 96px) / 4 - 23px); height: 3px; border-radius: 2px; }
.process::before { background: var(--line); }
.process::after { background: var(--accent); transform-origin: left; transform: scaleX(1); }
.js .process::after { transform: scaleX(0); transition: transform 1.6s ease; }
.js .process.in-view::after { transform: scaleX(1); }
.process li { position: relative; z-index: 1; }
.process-dot { width: 46px; height: 46px; border-radius: 50%; background: var(--accent); color: #fff; font-weight: 800; display: flex; align-items: center; justify-content: center; margin-bottom: 18px; box-shadow: 0 0 0 6px var(--tint); }
.process h3 { font-size: 19px; font-weight: 700; margin-bottom: 8px; }
.process p { font-size: 15px; line-height: 1.6; color: var(--body); }

/* Team */
.person { display: flex; flex-direction: column; }
.person .chips { margin: 16px 0 0; }
.avatar svg { display: block; }

/* Scroll reveal */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
.js .reveal.in-view { opacity: 1; transform: none; }
.grid-3 > .reveal:nth-child(2), .grid-4 > .reveal:nth-child(2) { transition-delay: .1s; }
.grid-3 > .reveal:nth-child(3), .grid-4 > .reveal:nth-child(3) { transition-delay: .2s; }
.grid-4 > .reveal:nth-child(4) { transition-delay: .3s; }

@media (max-width: 900px) {
  .flow { flex-direction: column; }
  .flow-line { flex: 0 0 28px; justify-content: center; }
  .flow-line span { width: 3px; height: 100%; background-image: linear-gradient(180deg, var(--accent) 50%, transparent 50%); background-size: 3px 12px; animation-name: flowdashv; }
  .process { grid-template-columns: 1fr; gap: 28px; }
  .process::before, .process::after { top: 22px; bottom: 22px; left: 22px; right: auto; width: 3px; height: auto; }
  .process::after { transform-origin: top; }
  .js .process::after { transform: scaleY(0); }
  .js .process.in-view::after { transform: scaleY(1); }
  .process li { padding-left: 70px; }
  .process-dot { position: absolute; left: 0; top: 0; }
}
@keyframes flowdashv { to { background-position: 0 12px; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js .reveal, .js .flow .flow-step, .js .chat-demo .chat-q, .js .chat-demo .chat-a, .js .steps li { opacity: 1 !important; transform: none !important; }
  .js .process::after { transform: none !important; }
}

/* Logo */
.brand img { height: 44px; width: auto; }
.footer-brand img { height: 44px; width: auto; margin-bottom: 4px; }
