/* Legalway.io layout and motion layer, loaded after site.css */

@property --angle { syntax: "<angle>"; inherits: false; initial-value: 0deg; }

/* Header */
.site-header { transition: background-color .3s ease, box-shadow .3s ease; }
.site-header.is-scrolled { background: rgba(255, 255, 255, .97); box-shadow: 0 10px 30px rgba(30, 57, 118, .10); }
.header-inner { transition: min-height .3s ease; }
.site-header.is-scrolled .header-inner { min-height: 60px; }
.scroll-progress {
  position: absolute; left: 0; right: 0; bottom: -1px; height: 3px;
  background: linear-gradient(90deg, var(--accent), var(--brand-gold));
  transform: scaleX(0); transform-origin: left;
}

/* Back to top */
.to-top {
  position: fixed; right: 20px; bottom: 20px; z-index: 40;
  width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center;
  background: var(--accent); color: #fff; box-shadow: 0 10px 24px rgba(55, 107, 220, .35);
  opacity: 0; translate: 0 16px; pointer-events: none;
  transition: opacity .3s ease, translate .3s ease, background-color .2s ease;
}
.to-top.is-visible { opacity: 1; translate: 0 0; pointer-events: auto; }
.to-top:hover { color: #fff; background: var(--accent-hover); }

/* Hero backdrop */
.hero { position: relative; overflow: hidden; isolation: isolate; }
.hero::before, .hero::after {
  content: ""; position: absolute; z-index: -1; border-radius: 50%; pointer-events: none; filter: blur(50px);
}
.hero::before {
  width: 560px; height: 560px; right: -140px; top: -200px;
  background: radial-gradient(circle, rgba(55, 107, 220, .42), rgba(55, 107, 220, 0) 70%);
  animation: floatA 14s ease-in-out infinite;
}
.hero::after {
  width: 440px; height: 440px; left: -160px; bottom: -200px;
  background: radial-gradient(circle, rgba(229, 180, 49, .38), rgba(229, 180, 49, 0) 70%);
  animation: floatB 17s ease-in-out infinite;
}
.hero .container { position: relative; }
.hero .container::before {
  content: ""; position: absolute; inset: -120px -240px; z-index: -1; pointer-events: none;
  background: radial-gradient(rgba(30, 57, 118, .16) 1.2px, transparent 1.4px) 0 0 / 24px 24px;
  -webkit-mask-image: radial-gradient(ellipse at 72% 45%, #000 0%, transparent 62%);
          mask-image: radial-gradient(ellipse at 72% 45%, #000 0%, transparent 62%);
}

h1 .hl {
  background: linear-gradient(90deg, #376bdc 0%, #6a93ff 25%, #1e3976 55%, #376bdc 100%);
  background-size: 220% auto;
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: shine 7s linear infinite;
}

/* Hero entrance */
.hero-grid > div:first-child > *, .hero .section-head > * { animation: fadeUp .9s cubic-bezier(.2, .8, .2, 1) both; }
.hero-grid > div:first-child > :nth-child(2), .hero .section-head > :nth-child(2) { animation-delay: .1s; }
.hero-grid > div:first-child > :nth-child(3), .hero .section-head > :nth-child(3) { animation-delay: .2s; }
.hero-grid > div:first-child > :nth-child(4), .hero .section-head > :nth-child(4) { animation-delay: .3s; }
.hero-grid > div:first-child > :nth-child(5) { animation-delay: .4s; }
.hero .shot { position: relative; animation: heroShot 1.2s .25s cubic-bezier(.2, .8, .2, 1) both; }
.hero .shot-frame {
  transition: transform .5s cubic-bezier(.2, .8, .2, 1);
  box-shadow: 0 2px 6px rgba(30, 57, 118, .08), 0 40px 90px rgba(55, 107, 220, .28);
  border-color: #d6e0fb;
}

.float-card {
  position: absolute; z-index: 2; display: flex; align-items: center; gap: 10px;
  padding: 10px 14px; border-radius: 14px; font-size: .9rem; font-weight: 700; color: var(--ink);
  background: rgba(255, 255, 255, .94); border: 1px solid var(--line); box-shadow: var(--shadow-lg);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
}
.float-card .sk { width: 64px; height: 9px; border-radius: 9px; background: #d6def5; animation: none; }
.float-a { top: -20px; left: -28px; animation: floatIn .7s 1.1s both, bob 6s 1.8s ease-in-out infinite; }
.float-b { bottom: 54px; right: -24px; animation: floatIn .7s 1.35s both, bob 7s 2s ease-in-out infinite; }
.float-icon { width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; background: #e2f6ec; color: #11885a; }
.float-icon.is-gold { background: var(--gold-soft); color: #a07000; }
.float-icon.is-gold svg { animation: ring 3s 2s ease-in-out infinite; transform-origin: 50% 10%; }
@media (max-width: 700px) {
  .float-a { left: 8px; top: -16px; }
  .float-b { right: 8px; bottom: 40px; }
}

/* Section headings get a brand underline */
.section .section-head h2::after {
  content: ""; display: block; width: 64px; height: 4px; margin-top: 16px; border-radius: 4px;
  background: linear-gradient(90deg, var(--accent), var(--brand-gold));
}
.section .section-head.center h2::after { margin-left: auto; margin-right: auto; }

/* Scroll reveal */
.section .section-head, .section .card, .split > *, .steps li, .faq details, .table-wrap,
.template-list li, .template-group h3, .prompt-list li, .info-panel, .video-wrap, .journey-stage,
.cta-band .inner > *, .timeline li, .problem-grid > div, .plans > * {
  transition: opacity .8s cubic-bezier(.2, .8, .2, 1) var(--d, 0ms), translate .8s cubic-bezier(.2, .8, .2, 1) var(--d, 0ms),
              transform .3s ease, box-shadow .3s ease, border-color .3s ease;
}
.js:not(.reveal-all) :is(.section .section-head, .section .card, .split > *, .steps li, .faq details, .table-wrap,
.template-list li, .template-group h3, .prompt-list li, .info-panel, .video-wrap, .journey-stage,
.cta-band .inner > *, .timeline li, .chips .chip, .problem-grid > div, .plans > *):not(.is-in) {
  opacity: 0; translate: 0 32px;
}
.js:not(.reveal-all) .prompt-list li:not(.is-in) { translate: -28px 0; }
.js:not(.reveal-all) .chips .chip:not(.is-in) { translate: 0 0; scale: .6; }
.chips .chip { transition: opacity .5s ease var(--d, 0ms), scale .5s cubic-bezier(.2, 1.6, .4, 1) var(--d, 0ms); }

/* Cards */
.card { position: relative; overflow: hidden; }
.card > * { position: relative; z-index: 1; }
.card::before {
  content: ""; position: absolute; inset: 0 0 auto 0; height: 3px; z-index: 2;
  background: linear-gradient(90deg, var(--accent), var(--brand-gold));
  transform: scaleX(0); transform-origin: left; transition: transform .45s ease;
}
.card::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity .3s ease;
  background: radial-gradient(280px circle at var(--mx, 50%) var(--my, 0%), rgba(55, 107, 220, .10), transparent 60%);
}
.card:hover::before { transform: scaleX(1); }
.card:hover::after { opacity: 1; }
.card-icon {
  background: linear-gradient(135deg, var(--accent-soft), #fff); box-shadow: inset 0 0 0 1px #d4def9;
  transition: transform .45s cubic-bezier(.2, 1.6, .4, 1), background-color .3s ease, color .3s ease;
}
.card:hover .card-icon { transform: rotate(-8deg) scale(1.08); background: var(--accent); color: #fff; }

/* Buttons */
.btn { position: relative; overflow: hidden; isolation: isolate; }
.btn-primary::after, .btn-on-dark::after {
  content: ""; position: absolute; top: 0; left: -60%; width: 40%; height: 100%; z-index: -1;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .45), transparent);
  transform: skewX(-20deg); transition: left .7s ease;
}
.btn-primary:hover::after, .btn-on-dark:hover::after { left: 130%; }
.btn-primary:hover, .btn-on-dark:hover { transform: translateY(-2px); }

/* Problem section: scattered items fall into place */
.problem-grid { align-items: center; }
.scatter { position: relative; padding: 24px; border-radius: var(--radius); background: linear-gradient(135deg, #f3f5ff, #fff); border: 1px solid var(--line); }
.scatter-item:nth-child(1) { --n: 0; }
.scatter-item:nth-child(2) { --n: 1; }
.scatter-item:nth-child(3) { --n: 2; }
.scatter-item {
  position: relative; padding-right: 54px;
  transition: translate .9s cubic-bezier(.2, .8, .2, 1), rotate .9s cubic-bezier(.2, .8, .2, 1),
              border-color .5s ease, box-shadow .5s ease;
  transition-delay: calc(.25s + var(--n) * .12s);
}
.js .scatter:not(.is-in) .scatter-item:nth-child(1) { translate: -34px 14px; rotate: -6deg; }
.js .scatter:not(.is-in) .scatter-item:nth-child(2) { translate: 46px -8px; rotate: 5deg; }
.js .scatter:not(.is-in) .scatter-item:nth-child(3) { translate: -16px 20px; rotate: -3deg; }
.scatter.is-in .scatter-item { border-style: solid; border-color: var(--line); box-shadow: var(--shadow); }
.scatter-item::after {
  content: ""; position: absolute; right: 18px; top: 50%; width: 24px; height: 24px; border-radius: 50%;
  background: #e2f6ec url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2311885a' stroke-width='3.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center / 12px no-repeat;
  transform: translateY(-50%) scale(0);
  transition: transform .45s cubic-bezier(.2, 1.6, .4, 1) calc(1.1s + var(--n) * .18s);
}
.scatter.is-in .scatter-item::after { transform: translateY(-50%) scale(1); }

/* Steps: progress line */
.steps:not(.grid) { position: relative; }
.steps:not(.grid)::before, .steps:not(.grid)::after {
  content: ""; position: absolute; left: 37px; top: 30px; bottom: 30px; width: 2px; border-radius: 2px;
}
.steps:not(.grid)::before { background: var(--line); }
.steps:not(.grid)::after {
  background: linear-gradient(var(--accent), var(--brand-gold));
  transform: scaleY(0); transform-origin: top; transition: transform 1.8s cubic-bezier(.2, .8, .2, 1) .3s;
}
.steps.is-in::after { transform: scaleY(1); }
.steps li { position: relative; z-index: 1; }
.steps li:hover { border-color: #c9d5fb; box-shadow: var(--shadow); }

/* Video band */
.section-dark {
  position: relative; overflow: hidden; color: #c9d4f2;
  background:
    radial-gradient(55% 55% at 50% 0%, rgba(55, 107, 220, .5), transparent 70%),
    radial-gradient(40% 40% at 100% 100%, rgba(229, 180, 49, .14), transparent 70%),
    linear-gradient(180deg, #122449 0%, #0c1834 100%);
}
.section-dark h2 { color: #fff; }
.section-dark .section-head h2::after { background: var(--brand-gold); }
.section-dark .lead { color: #c9d4f2; }
.section-dark .video-wrap figcaption { color: #9fb0dc; }
.section-dark .video-player { box-shadow: 0 0 0 1px rgba(255, 255, 255, .1), 0 40px 100px rgba(0, 0, 0, .45), 0 0 140px rgba(55, 107, 220, .35); }
.section-dark .transcript { background: rgba(255, 255, 255, .06); border-color: rgba(255, 255, 255, .14); }
.section-dark .transcript summary { color: #fff; }
.section-dark .transcript div { color: #c9d4f2; }
.poster-mock {
  position: absolute; inset: 7% 9%; opacity: .32; border-radius: 14px; overflow: hidden;
  container-type: inline-size; transform: perspective(1200px) rotateX(10deg);
}
.play-icon { position: relative; transition: transform .3s ease; }
.play-icon::before, .play-icon::after {
  content: ""; position: absolute; inset: 0; border-radius: 50%; border: 2px solid rgba(255, 255, 255, .7);
  animation: ripple 2.6s ease-out infinite;
}
.play-icon::after { animation-delay: 1.3s; }
.play-button:hover .play-icon { transform: scale(1.1); }

/* Feature screenshots */
.split { isolation: isolate; }
.split .shot { position: relative; }
.split .shot::before {
  content: ""; position: absolute; inset: 10% -3% -6% 12%; z-index: -1; border-radius: 40px; filter: blur(40px);
  background: linear-gradient(135deg, rgba(55, 107, 220, .28), rgba(229, 180, 49, .26));
}
.split .shot-frame { transition: transform .5s cubic-bezier(.2, .8, .2, 1), box-shadow .5s ease; }
.split .shot:hover .shot-frame { transform: translateY(-6px); box-shadow: 0 2px 6px rgba(30, 57, 118, .08), 0 40px 80px rgba(55, 107, 220, .22); }

/* Reminder timeline */
.timeline li:nth-child(1) { --n: 0; }
.timeline li:nth-child(2) { --n: 1; }
.timeline li:nth-child(3) { --n: 2; }
.timeline li:nth-child(4) { --n: 3; }
.timeline li:nth-child(5) { --n: 4; }
.timeline.is-in li { animation: tick 4s calc(1s + var(--n) * .6s) ease-in-out infinite; }

/* Tables */
tbody tr { transition: background-color .2s ease; }
tbody tr:hover { background: #eef2ff; }

/* FAQ */
.faq details[open] { border-color: #c9d5fb; box-shadow: var(--shadow); }
.faq details[open] > div { animation: faqIn .4s cubic-bezier(.2, .8, .2, 1); }
.faq summary:hover { color: var(--accent); }

/* Pricing: animated border on Pro */
.plan-pro {
  border: 2px solid transparent;
  background:
    linear-gradient(#fff, #fff) padding-box,
    conic-gradient(from var(--angle), var(--accent), var(--brand-gold), var(--navy), var(--accent)) border-box;
  animation: spinAngle 6s linear infinite;
}

/* Closing band */
.cta-band {
  position: relative; overflow: hidden; isolation: isolate;
  background:
    radial-gradient(60% 80% at 100% 0%, rgba(229, 180, 49, .2) 0%, transparent 60%),
    linear-gradient(120deg, #376bdc, #1e3976, #2b57be, #122449);
  background-size: 100% 100%, 300% 300%;
  animation: bgShift 16s ease infinite;
}
.cta-band::before {
  content: ""; position: absolute; z-index: -1; width: 440px; height: 440px; right: -150px; top: -190px; border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, .18);
  box-shadow: 0 0 0 46px rgba(255, 255, 255, .04), 0 0 0 92px rgba(255, 255, 255, .025);
  animation: floatA 18s ease-in-out infinite;
}
.cta-band::after {
  content: ""; position: absolute; z-index: -1; width: 380px; height: 380px; left: -140px; bottom: -220px;
  border-radius: 42% 58% 60% 40% / 45% 45% 55% 55%;
  background: rgba(229, 180, 49, .16); animation: morph 18s ease-in-out infinite;
}

/* ==========================================================================
   Product mockups, shown until the real screenshots are added
   ========================================================================== */
.shot-placeholder.has-mock { padding: 0; background: #f7f9ff; container-type: inline-size; }
.shot.is-missing .shot-placeholder.has-mock { display: block; }

.m-app {
  height: 100%; display: flex; flex-direction: column; text-align: left;
  font-family: var(--font); font-size: clamp(7px, 1.85cqi, 12px); line-height: 1.3; color: var(--ink);
}
.m-top { height: 2.8em; flex-shrink: 0; display: flex; align-items: center; gap: .5em; padding: 0 1.1em; background: #fff; border-bottom: 1px solid var(--line); }
.m-top > i { width: .85em; height: .85em; border-radius: 50%; }
.m-top > i:nth-child(1) { background: #ffb3a7; }
.m-top > i:nth-child(2) { background: #ffdb7d; }
.m-top > i:nth-child(3) { background: #9fe0b0; }
.m-url { margin-left: 1.2em; flex: 0 1 46%; height: 1.7em; border-radius: 999px; background: var(--surface); display: flex; align-items: center; gap: .5em; padding: 0 .9em; color: var(--muted); }
.m-url .sk { height: .5em; }
.m-body { flex: 1; display: flex; min-height: 0; }
.m-side { width: 3.8em; flex-shrink: 0; background: var(--navy-deep); display: flex; flex-direction: column; align-items: center; gap: .8em; padding: 1em 0; }
.m-logo { width: 2em; height: 2em; border-radius: .55em; margin-bottom: .4em; background: #fff url("/assets/legalway_mark.png?v=2") center / 78% no-repeat; }
.m-nav { width: 2.3em; height: 2.3em; border-radius: .65em; display: grid; place-items: center; color: #8ea3d8; }
.m-nav svg { width: 1.25em; height: 1.25em; }
.m-nav.is-active { background: var(--accent); color: #fff; box-shadow: 0 .3em .9em rgba(55, 107, 220, .5); }
.m-main { flex: 1; min-width: 0; padding: 1.2em 1.4em; display: flex; flex-direction: column; gap: 1em; overflow: hidden; background: #f7f9ff; }
.m-app svg { display: inline-block; flex-shrink: 0; }

.sk {
  display: block; flex-shrink: 0; height: .7em; border-radius: 999px;
  background: linear-gradient(90deg, #e1e7f7 0%, #f2f5fd 50%, #e1e7f7 100%) 0 0 / 200% 100%;
  animation: shimmer 2.6s linear infinite;
}
.sk-title { height: 1.15em; background-image: linear-gradient(90deg, #cbd5f2 0%, #dfe6fa 50%, #cbd5f2 100%); }
.sk-strong { background-image: linear-gradient(90deg, #c9d3f0 0%, #dde4f8 50%, #c9d3f0 100%); }
.sk-dot { width: .75em !important; height: .75em; border-radius: 50%; }
.sk-date { height: .9em; background-image: linear-gradient(90deg, #d9e2fb 0%, #e9eefd 50%, #d9e2fb 100%); }

.m-head { display: flex; align-items: center; justify-content: space-between; gap: 1em; }
.m-avatar { width: 2.1em; height: 2.1em; border-radius: 50%; background: linear-gradient(135deg, var(--brand-gold), #f7da74); flex-shrink: 0; }
.m-panel { background: #fff; border: 1px solid var(--line); border-radius: .9em; padding: .8em; display: flex; flex-direction: column; gap: .55em; min-height: 0; }
.m-row { display: flex; align-items: center; gap: .8em; padding: .55em .7em; border-radius: .6em; background: #fafbff; border: 1px solid #edf0fa; transition: opacity .45s ease, transform .45s ease; }
.m-row .m-chip, .m-row .sk-date, .m-row .m-dates { margin-left: auto; }
.m-row .sk-date + .m-chip, .m-row .m-dates + .m-chip { margin-left: 0; }
.m-row .sk-date { width: 12% !important; }
.m-chip { font-size: .85em; font-weight: 700; padding: .28em .75em; border-radius: 999px; white-space: nowrap; flex-shrink: 0; }
.m-amber { color: #a86400; background: #fff3d9; }
.m-blue { color: var(--accent); background: var(--accent-soft); }
.m-green { color: #0f7f52; background: #e0f5ea; }
.m-grey { color: var(--muted); background: #eef0f6; }
.m-tag { font-size: .8em; font-weight: 700; color: var(--navy); background: var(--accent-soft); padding: .25em .55em; border-radius: .4em; min-width: 3.4em; text-align: center; flex-shrink: 0; }

/* dashboard */
.m-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: .8em; }
.m-stat { background: #fff; border: 1px solid var(--line); border-radius: .9em; padding: .8em 1em; display: flex; flex-direction: column; gap: .25em; box-shadow: 0 .2em .8em rgba(55, 107, 220, .06); }
.m-stat b { font-family: var(--font-display); font-size: 2.3em; line-height: 1; font-weight: 600; }
.m-stat span { color: var(--muted); font-size: .95em; }
.m-stat.m-amber, .m-stat.m-blue, .m-stat.m-green { background: #fff; }
.m-stat.m-amber b { color: #c27c0e; }
.m-stat.m-green b { color: #14915f; }
.m-stat.m-blue b { color: var(--accent); }
.m-cols { flex: 1; min-height: 0; display: grid; grid-template-columns: 1.55fr 1fr; gap: .8em; }
.m-bars { flex-direction: row; align-items: flex-end; gap: .5em; padding: 1em; }
.m-bars i { flex: 1; height: var(--h); border-radius: .45em .45em .2em .2em; background: linear-gradient(180deg, var(--accent), #9db8f6); transform: scaleY(.08); transform-origin: bottom; }
.is-in .m-bars i { animation: grow 1s cubic-bezier(.2, .8, .2, 1) calc(var(--i) * 90ms + 250ms) forwards; }

/* profile */
.m-stepper { display: flex; align-items: center; gap: .6em; padding: .2em 0; }
.m-stepper span { width: 2.1em; height: 2.1em; border-radius: 50%; display: grid; place-items: center; font-weight: 700; background: #fff; border: 2px solid var(--line); color: var(--muted); flex-shrink: 0; }
.m-stepper span.is-done { background: var(--accent); border-color: var(--accent); color: #fff; }
.m-stepper span.is-now { border-color: var(--accent); color: var(--accent); box-shadow: 0 0 0 .3em rgba(55, 107, 220, .15); }
.m-stepper i { flex: 1; height: .28em; border-radius: 9px; background: var(--line); position: relative; overflow: hidden; }
.m-stepper i::after { content: ""; position: absolute; inset: 0; background: var(--accent); transform: scaleX(0); transform-origin: left; }
.is-in .m-stepper i:first-of-type::after { animation: fillX 1s .3s forwards; }
.m-form { display: grid; grid-template-columns: 1fr 1fr; gap: 1em; background: #fff; border: 1px solid var(--line); border-radius: .9em; padding: 1.1em; }
.m-field span { display: block; font-weight: 700; font-size: .9em; margin-bottom: .4em; color: var(--ink-soft); }
.m-input { height: 2.5em; border: 1px solid var(--line); background: #fafbff; border-radius: .6em; display: flex; align-items: center; padding: 0 .8em; }
.m-type { display: block; position: relative; height: .62em; width: 0; border-radius: 9px; background: #c3cfef; }
.is-in .m-type { animation: typeIn 1s steps(12) calc(var(--i) * 550ms + 500ms) forwards; }
.m-type::after { content: ""; position: absolute; right: -.45em; top: -.35em; width: 2px; height: 1.3em; background: var(--accent); opacity: 0; }
.is-in .m-type::after { animation: blink 1s steps(1) calc(var(--i) * 550ms + 500ms) 2 both; }

/* calendar */
.m-filters { display: flex; gap: .5em; flex-wrap: wrap; }
.m-filter { font-size: .9em; padding: .35em .9em; border-radius: 999px; background: #fff; border: 1px solid var(--line); color: var(--ink-soft); font-weight: 700; transition: background-color .35s ease, color .35s ease, box-shadow .35s ease, border-color .35s ease; }
.m-filter.is-active { background: var(--accent); color: #fff; border-color: var(--accent); box-shadow: 0 .3em .9em rgba(55, 107, 220, .35); }
.m-list { gap: .5em; }
.m-row.is-dim { opacity: .32; transform: scale(.985); }

/* reminder */
.m-reminder { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1.3em; }
.m-bell { width: 4.6em; height: 4.6em; border-radius: 50%; display: grid; place-items: center; color: var(--navy-deep); background: linear-gradient(135deg, var(--brand-gold), #f7d867); box-shadow: 0 0 0 .8em rgba(229, 180, 49, .18), 0 0 0 1.6em rgba(229, 180, 49, .08); }
.m-bell svg { width: 2.2em; height: 2.2em; transform-origin: 50% 10%; }
.is-in .m-bell svg { animation: ring 2.6s ease-in-out infinite; }
.m-toast { width: min(80%, 28em); display: flex; gap: .8em; align-items: center; padding: .9em 1em; border-radius: 1em; background: #fff; border: 1px solid var(--line); box-shadow: 0 1em 2.4em rgba(55, 107, 220, .18); opacity: 0; transform: translateY(1em); }
.m-toast > div { flex: 1; display: grid; gap: .45em; }
.is-in .m-toast { animation: toastIn .6s .5s cubic-bezier(.2, .8, .2, 1) forwards; }
.m-toast-icon { width: 2.3em; height: 2.3em; border-radius: .6em; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); flex-shrink: 0; }
.m-days { display: flex; gap: .6em; }
.m-days span { width: 2.7em; height: 2.7em; border-radius: 50%; display: grid; place-items: center; font-family: var(--font-display); font-weight: 600; font-size: 1.1em; background: #fff; border: 2px solid var(--line); color: var(--navy); }
.m-days .is-due { background: var(--navy); border-color: var(--navy); color: #fff; }
.is-in .m-days span { animation: dayOn 4s calc(var(--i) * .55s + 1s) ease-in-out infinite; }

/* extension */
.m-ext { background: #fffaf0; border-color: #f6e3b0; }
.m-dates { display: flex; flex-direction: column; gap: .3em; width: 13%; flex-shrink: 0; }
.m-old { width: 100%; position: relative; background: #efd2d2; animation: none; }
.m-old::after { content: ""; position: absolute; left: -6%; right: -6%; top: 50%; height: 2px; margin-top: -1px; background: #d14b4b; transform: scaleX(0); transform-origin: left; }
.is-in .m-old::after { animation: fillX .6s .7s forwards; }
.m-new { width: 100%; background: #bfe7d2; animation: none; opacity: 0; }
.is-in .m-new { animation: fadeIn .5s 1.2s forwards; }
.m-extended { color: var(--gold); background: var(--gold-soft); box-shadow: inset 0 0 0 1px #f3dc8a; transform: scale(0); }
.is-in .m-extended { animation: pop .55s 1.5s cubic-bezier(.2, 1.6, .4, 1) forwards; }

/* chat */
.m-meter { width: 7em; height: .6em; border-radius: 9px; background: var(--line); overflow: hidden; flex-shrink: 0; }
.m-meter i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--accent), var(--brand-gold)); }
.is-in .m-meter i { animation: meter 1.4s .4s cubic-bezier(.2, .8, .2, 1) forwards; }
.m-chat { flex: 1; min-height: 0; display: flex; flex-direction: column; gap: .8em; }
.m-bubble { max-width: 80%; padding: .8em 1em; border-radius: 1em; line-height: 1.4; opacity: 0; transform: translateY(.8em); }
.m-user { align-self: flex-end; background: var(--accent); color: #fff; border-bottom-right-radius: .3em; font-weight: 500; box-shadow: 0 .4em 1em rgba(55, 107, 220, .25); }
.m-bot { align-self: flex-start; width: 78%; position: relative; min-height: 2.6em; background: #fff; border: 1px solid var(--line); border-bottom-left-radius: .3em; }
.is-in .m-user { animation: bubble .5s .35s forwards; }
.is-in .m-bot { animation: bubble .5s 1s forwards; }
.m-typing { position: absolute; top: 1em; left: 1em; display: flex; gap: .3em; }
.m-typing i { width: .5em; height: .5em; border-radius: 50%; background: #a9b8e2; animation: dots 1s ease-in-out infinite; }
.m-typing i:nth-child(2) { animation-delay: .15s; }
.m-typing i:nth-child(3) { animation-delay: .3s; }
.is-in .m-typing { animation: fadeOut .2s 2.2s forwards; }
.m-answer { display: grid; gap: .45em; opacity: 0; }
.is-in .m-answer { animation: fadeIn .5s 2.3s forwards; }
.m-sources { display: flex; gap: .4em; margin-top: .75em; opacity: 0; }
.is-in .m-sources { animation: fadeIn .5s 2.8s forwards; }
.m-sources span { display: inline-flex; align-items: center; gap: .3em; font-size: .85em; font-weight: 700; padding: .22em .65em; border-radius: 999px; background: var(--accent-soft); color: var(--accent); }
.m-compose { margin-top: auto; display: flex; align-items: center; justify-content: space-between; padding: .5em .6em .5em 1em; border-radius: 999px; background: #fff; border: 1px solid var(--line); }
.m-send { width: 2.1em; height: 2.1em; border-radius: 50%; display: grid; place-items: center; background: var(--accent); color: #fff; }
.m-file { align-self: flex-end; width: 58%; display: flex; align-items: center; gap: .8em; padding: .7em .9em; border-radius: .9em; background: #fff; border: 1px solid var(--line); opacity: 0; transform: translateY(.8em); }
.is-in .m-file { animation: bubble .5s .1s forwards; }
.m-file-icon { width: 2.6em; height: 2.6em; border-radius: .6em; display: grid; place-items: center; background: #2b579a; color: #fff; flex-shrink: 0; }
.m-file > div { flex: 1; display: grid; gap: .3em; }
.m-file small { color: var(--muted); font-size: .85em; }
.m-clip { color: var(--muted); }
.m-bullets p { display: flex; align-items: center; gap: .55em; margin: 0; }
.m-bullets p::before { content: ""; width: .45em; height: .45em; border-radius: 50%; background: var(--accent); flex-shrink: 0; }
.m-bullets p .sk { flex: 1; }

/* templates */
.m-tpls { flex: 1; display: grid; grid-template-columns: repeat(3, 1fr); gap: .8em; }
.m-tpl { display: flex; flex-direction: column; gap: .5em; padding: .9em; border-radius: .9em; background: #fff; border: 1px solid var(--line); opacity: 0; transform: translateY(1em); }
.is-in .m-tpl { animation: rise .55s calc(var(--i) * 100ms) cubic-bezier(.2, .8, .2, 1) forwards, tplPulse 7.2s calc(var(--i) * 1.2s + 1.2s) ease-in-out infinite; }
.m-tpl b { font-size: .95em; line-height: 1.25; }
.m-tpl-icon { width: 2.3em; height: 2.3em; border-radius: .6em; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); }

/* clause check and contract agent */
.m-split { flex: 1; min-height: 0; display: grid; grid-template-columns: 1.3fr 1fr; gap: .9em; }
.m-paper { position: relative; display: flex; flex-direction: column; gap: .75em; padding: 1.1em 1.2em; overflow: hidden; border-radius: .8em; background: #fff; border: 1px solid var(--line); box-shadow: 0 .3em 1em rgba(30, 57, 118, .06); }
.m-paper p { margin: 0; display: grid; gap: .4em; }
.m-gap { height: 2.6em; flex-shrink: 0; border: 2px dashed #e7a83a; border-radius: .5em; background: rgba(229, 180, 49, .1); }
.is-in .m-gap { animation: gapPulse 1.6s 2.4s ease-in-out infinite; }
.m-checks { gap: .75em; justify-content: center; }
.m-check { display: flex; align-items: center; gap: .6em; padding: .3em; border-radius: .5em; opacity: .35; }
.m-check .sk { flex: 1; }
.is-in .m-check { animation: fadeIn .4s calc(var(--i) * .45s + .4s) forwards; }
.m-check-icon { width: 1.8em; height: 1.8em; border-radius: 50%; display: grid; place-items: center; background: #e0f5ea; color: #0f7f52; transform: scale(0); flex-shrink: 0; }
.is-in .m-check-icon { animation: pop .45s calc(var(--i) * .45s + .4s) cubic-bezier(.2, 1.6, .4, 1) forwards; }
.m-check.is-missing { background: #fff7e6; }
.m-check.is-missing .m-check-icon { background: #ffe9bf; color: #a86400; }
.m-agent { grid-template-columns: 1fr 1.15fr; }
.m-agent .m-bubble { max-width: 94%; }
.m-agent .m-bot { width: 70%; }
.m-pro { position: absolute; top: .9em; right: .9em; font-size: .8em; font-weight: 700; color: var(--gold); background: var(--gold-soft); box-shadow: inset 0 0 0 1px #f3dc8a; padding: .22em .75em; border-radius: 999px; }
.m-insert { padding: .5em .6em; margin: 0 -.6em !important; border-radius: .35em; border-left: 3px solid var(--accent); background: rgba(55, 107, 220, .08); opacity: 0; transform: translateX(-.6em); }
.is-in .m-insert { animation: insertIn .6s 2.6s cubic-bezier(.2, .8, .2, 1) forwards; }

@container (max-width: 440px) {
  .m-app { font-size: clamp(7px, 2.6cqi, 11px); }
  .m-side { display: none; }
  .m-cols { grid-template-columns: 1fr; }
  .m-bars { display: none; }
  .m-split { grid-template-columns: 1fr; }
  .m-split > :first-child { display: none; }
  .m-tpls { grid-template-columns: repeat(2, 1fr); }
  .m-tpl:nth-child(n+5) { display: none; }
  .m-form { grid-template-columns: 1fr; }
  .m-field:nth-child(n+4) { display: none; }
}

/* ==========================================================================
   Keyframes
   ========================================================================== */
@keyframes fadeUp { from { opacity: 0; transform: translateY(26px); } to { opacity: 1; transform: none; } }
@keyframes heroShot { from { opacity: 0; transform: perspective(1400px) translateY(50px) rotateX(10deg) rotateY(-12deg) scale(.95); } to { opacity: 1; transform: none; } }
@keyframes floatIn { from { opacity: 0; transform: translateY(14px) scale(.9); } to { opacity: 1; transform: none; } }
@keyframes bob { 0%, 100% { translate: 0 0; } 50% { translate: 0 -10px; } }
@keyframes floatA { 0%, 100% { transform: translate(0, 0) scale(1); } 50% { transform: translate(-40px, 30px) scale(1.08); } }
@keyframes floatB { 0%, 100% { transform: translate(0, 0) scale(1); } 50% { transform: translate(50px, -30px) scale(1.1); } }
@keyframes shine { to { background-position: 220% center; } }
@keyframes shimmer { to { background-position: -200% 0; } }
@keyframes grow { to { transform: scaleY(1); } }
@keyframes fillX { to { transform: scaleX(1); } }
@keyframes typeIn { to { width: var(--w); } }
@keyframes blink { 0%, 49% { opacity: 1; } 50%, 100% { opacity: 0; } }
@keyframes ring { 0%, 60%, 100% { transform: rotate(0); } 10%, 30% { transform: rotate(14deg); } 20%, 40% { transform: rotate(-14deg); } 50% { transform: rotate(6deg); } }
@keyframes toastIn { to { opacity: 1; transform: none; } }
@keyframes dayOn { 0%, 30%, 100% { transform: none; } 8%, 20% { transform: scale(1.14); background: var(--accent); color: #fff; border-color: var(--accent); } }
@keyframes fadeIn { to { opacity: 1; } }
@keyframes fadeOut { to { opacity: 0; } }
@keyframes pop { to { transform: scale(1); } }
@keyframes bubble { to { opacity: 1; transform: none; } }
@keyframes dots { 0%, 100% { transform: translateY(0); opacity: .5; } 50% { transform: translateY(-.3em); opacity: 1; } }
@keyframes meter { to { width: 62%; } }
@keyframes rise { to { opacity: 1; transform: none; } }
@keyframes tplPulse { 0%, 22%, 100% { border-color: var(--line); box-shadow: none; } 5%, 15% { border-color: var(--accent); box-shadow: 0 0 0 .28em rgba(55, 107, 220, .18); } }
@keyframes gapPulse { 0%, 100% { background: rgba(229, 180, 49, .08); } 50% { background: rgba(229, 180, 49, .26); } }
@keyframes insertIn { to { opacity: 1; transform: none; } }
@keyframes ripple { from { transform: scale(1); opacity: .8; } to { transform: scale(1.9); opacity: 0; } }
@keyframes tick { 0%, 30%, 100% { transform: none; } 8%, 20% { transform: translateY(-6px); border-color: var(--accent); box-shadow: 0 12px 26px rgba(55, 107, 220, .22); } }
@keyframes faqIn { from { opacity: 0; translate: 0 -8px; } to { opacity: 1; translate: 0 0; } }
@keyframes spinAngle { to { --angle: 360deg; } }
@keyframes bgShift { 0%, 100% { background-position: 0 0, 0% 50%; } 50% { background-position: 0 0, 100% 50%; } }
@keyframes morph { 0%, 100% { border-radius: 42% 58% 60% 40% / 45% 45% 55% 55%; transform: rotate(0); } 50% { border-radius: 60% 40% 38% 62% / 55% 60% 40% 45%; transform: rotate(40deg); } }

/* Respect visitors who prefer less motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important; animation-delay: 0ms !important; animation-iteration-count: 1 !important;
    transition-duration: .01ms !important; transition-delay: 0ms !important;
  }
  h1 .hl { animation: none; }
}

/* ==========================================================================
   Homepage journey: "How your account comes together"
   ========================================================================== */
.journey { position: relative; overflow: hidden; }
.journey::before {
  content: ""; position: absolute; left: 50%; bottom: -260px; width: 900px; height: 520px; translate: -50% 0;
  border-radius: 50%; pointer-events: none;
  background: radial-gradient(closest-side, rgba(55, 107, 220, .18), transparent);
}
.journey .container { position: relative; }

.steps.journey-steps {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; margin: 8px 0 56px;
}
.steps.journey-steps::before, .steps.journey-steps::after {
  content: ""; position: absolute; top: 27px; bottom: auto; left: 12.5%; right: 12.5%; width: auto; height: 3px; border-radius: 3px;
}
.steps.journey-steps::before { background: #d3dcf6; }
.steps.journey-steps::after,
.steps.journey-steps.is-in::after {
  background: linear-gradient(90deg, var(--accent), var(--brand-gold));
  transform: scaleX(var(--progress, 0)); transform-origin: left;
  transition: transform .7s cubic-bezier(.2, .8, .2, 1);
}

.journey-steps li {
  padding: 76px 0 0; background: none; border: 0; border-radius: 0; text-align: center; cursor: pointer; outline: none;
}
.journey-steps li:hover { box-shadow: none; }
.journey-steps li::before {
  left: 50%; top: 0; width: 56px; height: 56px; translate: -50% 0;
  font-family: var(--font-display); font-size: 1.35rem; font-weight: 600;
  background: #fff; color: var(--muted); border: 3px solid #d3dcf6;
  transition: background-color .4s ease, color .4s ease, border-color .4s ease, box-shadow .4s ease, scale .4s ease;
}
.journey-steps li.is-done::before { background: var(--accent); color: #fff; border-color: var(--accent); }
.journey-steps li.is-active::before {
  background: linear-gradient(135deg, var(--accent), var(--navy)); color: #fff; border-color: #fff;
  box-shadow: 0 0 0 6px rgba(55, 107, 220, .18), 0 12px 26px rgba(55, 107, 220, .35); scale: 1.08;
}
.journey.is-running li.is-active::before { animation: stepPulse 2s ease-in-out infinite; }

.step-card {
  position: relative; height: 100%; overflow: hidden; padding: 22px 20px 26px;
  background: rgba(255, 255, 255, .75); border: 1px solid var(--line); border-radius: var(--radius);
  transition: transform .45s cubic-bezier(.2, .8, .2, 1), box-shadow .45s ease, border-color .45s ease, background-color .45s ease;
}
.step-card strong { display: block; margin-bottom: 8px; font-size: 1.05rem; color: var(--ink); }
.step-card p { color: var(--muted); font-size: .96rem; transition: color .45s ease; }
.journey-steps li:hover .step-card { border-color: #c9d5fb; background: #fff; }
.journey-steps li:focus-visible .step-card { outline: 3px solid var(--focus); outline-offset: 3px; }
.journey-steps li.is-active .step-card {
  background: #fff; border-color: var(--accent); transform: translateY(-6px);
  box-shadow: 0 2px 6px rgba(30, 57, 118, .06), 0 22px 44px rgba(55, 107, 220, .18);
}
.journey-steps li.is-active .step-card p { color: var(--ink-soft); }
.step-card::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 4px;
  background: linear-gradient(90deg, var(--accent), var(--brand-gold));
  transform: scaleX(0); transform-origin: left;
}
.journey li.is-active .step-card::after { transform: scaleX(var(--timer, 0)); }
.journey.is-paused li.is-active::before { animation-play-state: paused; }

/* Stage: one view per step, crossfading */
.journey-stage { position: relative; display: grid; max-width: 920px; margin: 0 auto; }
.journey-stage::before {
  content: ""; position: absolute; inset: 8% 4% -8%; z-index: -1; border-radius: 48px; filter: blur(48px);
  background: linear-gradient(135deg, rgba(55, 107, 220, .32), rgba(229, 180, 49, .28));
}
.journey-stage > .shot { grid-area: 1 / 1; transition: opacity .6s ease, transform .6s cubic-bezier(.2, .8, .2, 1); }
.journey-stage.is-ready > .shot:not(.is-active) { opacity: 0; transform: translateY(18px) scale(.97); pointer-events: none; }
.journey-stage .shot-frame { box-shadow: 0 2px 6px rgba(30, 57, 118, .08), 0 40px 90px rgba(55, 107, 220, .25); border-color: #d6e0fb; }
.journey-stage .shot-frame img { aspect-ratio: 16 / 10; object-fit: cover; object-position: top; }
.journey-cta { justify-content: center; margin-top: 40px; }

/* Sign up mockup for step one */
.m-auth { background: linear-gradient(135deg, #e8edff, #f7f9ff); }
.m-auth-body { flex: 1; display: grid; place-items: center; padding: 1.4em; }
.m-auth-card {
  width: min(62%, 30em); display: flex; flex-direction: column; gap: .9em; padding: 2em 2.2em;
  background: #fff; border: 1px solid var(--line); border-radius: 1.2em; box-shadow: 0 1.4em 3em rgba(55, 107, 220, .18);
}
.m-auth-card .m-logo { width: 2.8em; height: 2.8em; margin: 0 0 .2em; box-shadow: inset 0 0 0 1px var(--line); }
.m-auth-btn { height: 2.8em; margin-top: .4em; border-radius: 999px; background: var(--accent); display: grid; place-items: center; box-shadow: 0 .5em 1.2em rgba(55, 107, 220, .35); }
.m-auth-btn .sk { width: 36%; background: rgba(255, 255, 255, .55); animation: none; }
.is-in .m-auth-btn { animation: btnPress .5s 1.9s ease; }

@keyframes stepPulse { 0%, 100% { box-shadow: 0 0 0 6px rgba(55, 107, 220, .18), 0 12px 26px rgba(55, 107, 220, .35); } 50% { box-shadow: 0 0 0 12px rgba(55, 107, 220, .08), 0 12px 26px rgba(55, 107, 220, .35); } }
@keyframes btnPress { 50% { transform: scale(.94); } }

/* Phones and small tablets: vertical timeline */
@media (max-width: 899px) {
  .steps.journey-steps { grid-template-columns: 1fr; gap: 14px; margin-bottom: 40px; }
  .steps.journey-steps::before, .steps.journey-steps::after {
    left: 26px; right: auto; top: 28px; bottom: 28px; width: 3px; height: auto;
  }
  .steps.journey-steps::after, .steps.journey-steps.is-in::after { transform: scaleY(var(--progress, 0)); transform-origin: top; }
  .journey-steps li { padding: 0 0 0 76px; text-align: left; }
  .journey-steps li::before { left: 0; top: 4px; translate: 0 0; }
  .journey-steps li.is-active .step-card { transform: none; }
  .m-auth-card { width: 80%; }
}

@media (prefers-reduced-motion: reduce) {
  .journey .step-card::after { display: none; }
}

/* ==========================================================================
   Contact page
   ========================================================================== */
.contact-hero { padding-bottom: 120px; }
.contact-head { margin-bottom: 48px; }
.contact-head .lead { margin-left: auto; margin-right: auto; }

.quick-contacts { display: grid; gap: 20px; max-width: 1000px; margin: 0 auto; }
@media (min-width: 760px) { .quick-contacts { grid-template-columns: repeat(3, 1fr); } }
.quick-card {
  position: relative; overflow: hidden; display: flex; flex-direction: column; align-items: center; text-align: center;
  gap: 6px; padding: 32px 24px 28px; text-decoration: none; color: var(--ink);
  background: rgba(255, 255, 255, .88); border: 1px solid var(--line); border-radius: 24px; box-shadow: var(--shadow);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  animation: fadeUp .9s cubic-bezier(.2, .8, .2, 1) both;
  transition: transform .4s cubic-bezier(.2, .8, .2, 1), box-shadow .4s ease, border-color .4s ease;
}
.quick-card:nth-child(2) { animation-delay: .12s; }
.quick-card:nth-child(3) { animation-delay: .24s; }
.quick-card::before {
  content: ""; position: absolute; inset: auto 0 0 0; height: 4px;
  background: linear-gradient(90deg, var(--accent), var(--brand-gold));
  transform: scaleX(0); transition: transform .45s ease;
}
.quick-card:hover { color: var(--ink); transform: translateY(-8px); border-color: #c9d5fb; box-shadow: var(--shadow-lg); }
.quick-card:hover::before { transform: scaleX(1); }
.quick-icon {
  width: 64px; height: 64px; margin-bottom: 10px; border-radius: 20px; display: grid; place-items: center;
  color: #fff; background: linear-gradient(135deg, var(--accent), var(--navy));
  box-shadow: 0 12px 26px rgba(55, 107, 220, .35);
  transition: transform .5s cubic-bezier(.2, 1.6, .4, 1);
}
.quick-icon.is-gold { color: var(--navy-deep); background: linear-gradient(135deg, var(--brand-gold), #f7d867); box-shadow: 0 12px 26px rgba(229, 180, 49, .4); }
.quick-card:hover .quick-icon { transform: rotate(-8deg) scale(1.08); }
.quick-card small { font-size: .78rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.quick-card strong { font-size: 1.15rem; word-break: break-word; }
.quick-action { margin-top: 8px; font-size: .92rem; font-weight: 650; color: var(--accent); display: inline-flex; align-items: center; gap: 6px; }
.quick-action::after { content: "\2192"; transition: transform .2s ease; }
.quick-card:hover .quick-action::after { transform: translateX(4px); }

/* Combined information and form panel */
.contact-section { padding-top: 0; margin-top: -64px; position: relative; z-index: 1; }
.contact-panel {
  display: grid; overflow: hidden; border-radius: 28px; background: #fff;
  border: 1px solid var(--line); box-shadow: 0 2px 6px rgba(30, 57, 118, .06), 0 40px 90px rgba(55, 107, 220, .16);
}
@media (min-width: 960px) { .contact-panel { grid-template-columns: 5fr 7fr; } }

.contact-info {
  position: relative; overflow: hidden; isolation: isolate; display: flex; flex-direction: column;
  padding: 44px 40px; color: #c9d4f2;
  background: linear-gradient(160deg, var(--accent) 0%, var(--navy) 55%, var(--navy-deep) 100%);
}
.contact-info::before, .contact-info::after { content: ""; position: absolute; z-index: -1; border-radius: 50%; pointer-events: none; }
.contact-info::before { width: 260px; height: 260px; right: -90px; bottom: -90px; background: rgba(229, 180, 49, .2); animation: floatA 14s ease-in-out infinite; }
.contact-info::after { width: 180px; height: 180px; right: 40px; bottom: 60px; border: 1px solid rgba(255, 255, 255, .18); box-shadow: 0 0 0 30px rgba(255, 255, 255, .04); animation: floatB 16s ease-in-out infinite; }
.contact-info h2 { color: #fff; font-size: 1.9rem; margin-bottom: .4em; }
.contact-info > p { color: #c9d4f2; }
.info-list { list-style: none; margin: 32px 0; padding: 0; display: grid; gap: 22px; }
.info-list li { display: flex; gap: 16px; align-items: flex-start; color: #fff; line-height: 1.5; }
.info-list small { display: block; margin-bottom: 2px; font-size: .75rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--brand-gold); }
.info-list a { color: #fff; text-decoration: none; font-weight: 600; }
.info-list a:hover { color: var(--brand-gold); }
.info-icon {
  width: 44px; height: 44px; flex-shrink: 0; border-radius: 14px; display: grid; place-items: center;
  color: #fff; background: rgba(255, 255, 255, .12); border: 1px solid rgba(255, 255, 255, .18);
}
.info-foot { margin-top: auto; padding-top: 24px; border-top: 1px solid rgba(255, 255, 255, .16); display: flex; flex-wrap: wrap; gap: 6px 10px; font-size: .95rem; }
.info-foot a { color: var(--brand-gold); font-weight: 700; text-decoration: none; }
.info-foot a:hover { text-decoration: underline; color: #ffd95a; }

.contact-form-wrap { padding: 44px 40px; }
.contact-form-wrap h2 { font-size: 1.9rem; margin-bottom: .3em; }
.contact-form { display: grid; grid-template-columns: 1fr 1fr; gap: 18px 20px; margin-top: 26px; }
.form-row { display: flex; flex-direction: column; gap: 8px; }
.form-row-full { grid-column: 1 / -1; }
.contact-form label { font-weight: 650; font-size: .93rem; color: var(--ink); }
.contact-form .optional { font-weight: 400; color: var(--muted); }
.contact-form input, .contact-form select, .contact-form textarea {
  width: 100%; font: inherit; font-size: 1rem; color: var(--ink);
  padding: 13px 16px; border: 1.5px solid var(--line); border-radius: 14px; background: #f7f9ff;
  transition: border-color .2s ease, box-shadow .2s ease, background-color .2s ease;
}
.contact-form input::placeholder, .contact-form textarea::placeholder { color: #9aa3b5; }
.contact-form select {
  -webkit-appearance: none; appearance: none; padding-right: 44px; cursor: pointer;
  background: #f7f9ff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235d6270' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") right 16px center / 16px no-repeat;
}
.contact-form textarea { resize: vertical; min-height: 150px; }
.contact-form input:hover, .contact-form select:hover, .contact-form textarea:hover { border-color: #c9d5fb; }
.contact-form input:focus, .contact-form select:focus, .contact-form textarea:focus {
  outline: none; border-color: var(--accent); background-color: #fff; box-shadow: 0 0 0 4px rgba(55, 107, 220, .15);
}
.contact-form input:user-invalid, .contact-form textarea:user-invalid { border-color: #d14b4b; }
.form-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; margin-top: 4px; }
.form-actions .btn svg { transition: transform .3s ease; }
.form-actions .btn:hover svg { transform: translate(3px, -3px); }
.form-status { margin: 0; font-size: .92rem; color: var(--accent); }

@media (max-width: 600px) {
  .contact-form { grid-template-columns: 1fr; }
  .contact-info, .contact-form-wrap { padding: 32px 24px; }
}

/* Map with floating office card */
.map-section { padding-top: 0; }
.map-wrap {
  position: relative; overflow: hidden; height: 460px; border-radius: 28px;
  background: var(--surface-2); border: 1px solid var(--line); box-shadow: var(--shadow-lg);
}
.map-wrap iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; filter: saturate(.85); }
.map-card {
  position: absolute; left: 28px; bottom: 28px; width: min(380px, calc(100% - 56px));
  padding: 26px; border-radius: 22px; background: rgba(255, 255, 255, .96); border: 1px solid var(--line);
  box-shadow: var(--shadow-lg); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
}
.map-card .info-icon { color: #fff; background: linear-gradient(135deg, var(--accent), var(--navy)); border: 0; margin-bottom: 14px; }
.map-card h2 { font-size: 1.5rem; margin-bottom: .35em; }
.map-card p { color: var(--ink-soft); font-size: .98rem; margin-bottom: 18px; }
@media (max-width: 700px) {
  .map-wrap { height: auto; display: flex; flex-direction: column; }
  .map-wrap iframe { position: relative; height: 300px; }
  .map-card { position: relative; left: auto; bottom: auto; width: auto; border-radius: 0; border: 0; box-shadow: none; }
}
@media (max-width: 759px) {
  .contact-hero { padding-bottom: 96px; }
  .quick-contacts { gap: 12px; }
  .quick-card {
    display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto auto; column-gap: 16px; row-gap: 2px;
    align-items: center; text-align: left; padding: 18px 20px;
  }
  .quick-icon { grid-row: 1 / span 3; width: 52px; height: 52px; margin: 0; border-radius: 16px; }
  .quick-action { margin-top: 2px; }
}

/* Contact form: sending, errors and success */
.form-trap { position: absolute !important; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.contact-form [aria-invalid="true"] { border-color: #d14b4b; background-color: #fff7f7; }
.field-error { font-size: .86rem; font-weight: 600; color: #b42318; }
.form-status.is-error { color: #b42318; font-weight: 600; }
.form-actions .btn { min-width: 190px; }
.btn-spinner {
  display: none; width: 18px; height: 18px; border-radius: 50%;
  border: 2.5px solid rgba(255, 255, 255, .4); border-top-color: #fff; animation: spin .8s linear infinite;
}
.btn.is-loading { cursor: progress; opacity: .9; }
.btn.is-loading .btn-icon { display: none; }
.btn.is-loading .btn-spinner { display: inline-block; }
.form-success {
  display: flex; flex-direction: column; align-items: center; text-align: center; gap: 10px;
  margin-top: 28px; padding: 40px 24px; border-radius: 22px; background: linear-gradient(180deg, #f3f5ff, #fff);
  border: 1px solid var(--line); outline: none; animation: fadeUp .6s cubic-bezier(.2, .8, .2, 1) both;
}
.form-success[hidden] { display: none; }
.form-success h3 { font-size: 1.35rem; margin: 6px 0 0; }
.form-success p { color: var(--ink-soft); }
.form-success .btn { margin-top: 10px; }
.success-icon {
  width: 72px; height: 72px; border-radius: 50%; display: grid; place-items: center; color: #fff;
  background: linear-gradient(135deg, #22a06b, #0f7f52); box-shadow: 0 0 0 10px rgba(34, 160, 107, .14), 0 14px 30px rgba(15, 127, 82, .3);
  animation: successPop .6s .1s cubic-bezier(.2, 1.6, .4, 1) both;
}
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes successPop { from { transform: scale(0); } to { transform: scale(1); } }

/* Original logo lockup (mark and LegalWay wordmark) */
.brand img { height: 44px; width: auto; }
.site-header.is-scrolled .brand img { height: 40px; }
.brand img { transition: height .3s ease; }
.brand-tile { padding: 10px 16px; border-radius: 14px; }
.brand-tile img { height: 38px; width: auto; }
@media (max-width: 480px) { .brand img { height: 38px; } }

/* templates mockup: matches the app's Document Templates page */
.m-title-block { display: grid; gap: .15em; min-width: 0; }
.m-title-block b { font-size: 1.2em; color: var(--ink); }
.m-title-block small { font-size: .8em; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.m-search { display: flex; align-items: center; gap: .45em; width: 9em; height: 2em; padding: 0 .75em; flex-shrink: 0; border: 1px solid var(--line); border-radius: 999px; background: #fff; color: var(--muted); }
.m-search .sk { flex: 1; height: .45em; }
.m-tgroup { display: flex; flex-direction: column; gap: .55em; padding: .6em .7em .7em; border-radius: .9em; background: #fff; border: 1px solid var(--line); }
.m-tgroup-head { display: flex; align-items: center; gap: .55em; font-size: .82em; color: var(--muted); }
.m-tgroup-head b { color: var(--ink); text-transform: uppercase; letter-spacing: .05em; }
.m-tgroup-head em { font-style: normal; font-weight: 700; color: var(--accent); }
.m-tgroup-head span { margin-left: auto; }
.m-tcards { display: grid; grid-template-columns: repeat(3, 1fr); gap: .55em; }
.m-tcard {
  display: flex; flex-direction: column; gap: .4em; min-width: 0; padding: .6em .65em .65em; border-radius: .8em;
  background: #fff; border: 1px solid var(--line); box-shadow: 0 .2em .6em rgba(30, 57, 118, .05);
  opacity: 0; transform: translateY(.8em);
}
.is-in .m-tcard { animation: rise .55s calc(var(--i) * 90ms) cubic-bezier(.2, .8, .2, 1) forwards, tplPulse 7.2s calc(var(--i) * 1.2s + 1.2s) ease-in-out infinite; }
.m-tcard-head { display: flex; align-items: flex-start; gap: .45em; }
.m-tcard-icon { width: 2em; height: 2em; flex-shrink: 0; border-radius: 50%; display: grid; place-items: center; color: #fff; background: linear-gradient(135deg, #3b82f6, #1d4ed8); }
.m-tcard-head b { font-size: .74em; line-height: 1.25; color: var(--ink); }
.m-tcard .sk { height: .42em; }
.m-gen {
  display: flex; align-items: center; gap: .35em; margin-top: .15em; padding: .32em .6em; border-radius: 999px;
  font-size: .76em; font-weight: 600; color: var(--accent); border: 1px solid var(--accent); background: #fff;
}
.m-gen i { margin-left: auto; font-style: normal; font-size: 1.2em; line-height: 1; }
.is-in .m-tcard:nth-child(2) .m-gen { animation: genPulse 3.6s 2s ease-in-out infinite; }
@keyframes genPulse { 0%, 70%, 100% { background: #fff; color: var(--accent); } 80%, 90% { background: var(--accent); color: #fff; } }
@container (max-width: 440px) {
  .m-tcards { grid-template-columns: repeat(2, 1fr); }
  .m-tcard:nth-child(3) { display: none; }
  .m-search { display: none; }
}
