:root {
  color-scheme: light;
  --base: #f8f8ff;
  --panel: #fff;
  --ink: #20213c;
  --muted: #4d526e;
  --line: #d9d8ed;
  --accent: #5540b4;
  --gutter: clamp(1.25rem, 5vw, 4rem);
  font-family: Inter, "Segoe UI", sans-serif;
  background: var(--base);
  color: var(--ink);
}
* { box-sizing: border-box; }
body { margin: 0; }
a { color: inherit; }
a:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
[id] { scroll-margin-top: 5.5rem; }
.wrap { width: min(100% - 2 * var(--gutter), 72rem); margin-inline: auto; }
.skip-link { position: fixed; z-index: 3; top: .75rem; left: .75rem; padding: .75rem; background: var(--base); transform: translateY(-200%); }
.skip-link:focus { transform: translateY(0); }

.topbar {
  position: sticky;
  z-index: 2;
  top: 0;
  background: #fdfcfff5;
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(14px);
}
.header-inner, nav { display: flex; align-items: center; }
.header-inner { justify-content: space-between; gap: .75rem; min-height: 4.25rem; }
nav { gap: clamp(.75rem, 3vw, 2rem); }
.topbar a { text-decoration: none; }
.brand { display: inline-flex; align-items: center; gap: .65rem; font-size: 1.125rem; font-weight: 400; line-height: 1.15; }
.brand-mark {
  position: relative;
  display: grid;
  place-items: center;
  flex: none;
  width: 2rem;
  height: 2rem;
  border-radius: .6rem;
  background: linear-gradient(145deg, #5341c4, #9275f8);
}
.brand-mark::before {
  content: "";
  width: 1.25rem;
  height: 1.25rem;
  background: #fff;
  clip-path: polygon(50% 0%, 64% 36%, 100% 50%, 64% 64%, 50% 100%, 36% 64%, 0% 50%, 36% 36%);
}
.nav-contact { color: var(--accent); }
nav a { display: inline-flex; align-items: center; min-height: 2.75rem; font-size: .9rem; font-weight: 600; }
nav a:hover { text-decoration: underline; }

.hero { position: relative; isolation: isolate; overflow: hidden; background: #f1efff; border-bottom: 1px solid var(--line); }
.hero::before {
  position: absolute;
  z-index: -1;
  inset: -3%;
  content: "";
  background: url("images/hero-background.webp") center / cover no-repeat;
  transform: scaleX(-1);
  animation: glass-drift 19s ease-in-out infinite alternate;
  animation-play-state: paused;
}
.hero::after {
  position: absolute;
  z-index: -1;
  inset: 0;
  content: "";
  background: linear-gradient(105deg, #f4f0ff12 15%, #faf9ffa6 60%, #faf9ffa6);
}
.hero.is-visible::before { animation-play-state: running; }
@keyframes glass-drift {
  from { transform: translateX(1.5%) scale(1.015) scaleX(-1); }
  to { transform: translateX(-1.5%) scale(1.065) scaleX(-1); }
}
@media (prefers-reduced-motion: reduce) {
  .hero::before { animation: none; }
}
.hero-inner {
  display: grid;
  grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr);
  align-items: center;
  gap: clamp(2rem, 8vw, 7rem);
  padding-block: clamp(3rem, 7vw, 6rem);
}
.portrait {
  display: block;
  aspect-ratio: 4 / 5;
  max-width: 24rem;
  width: 100%;
  height: auto;
  object-fit: cover;
  object-position: center 38%;
  border: 1px solid var(--line);
  border-radius: 1.5rem;
  background: #eeeaff;
}
.hero-copy { min-width: 0; }
.hero h1 { max-width: 13ch; margin: 0; font-size: clamp(2.65rem, 6vw, 5.5rem); line-height: 1; letter-spacing: -.055em; text-wrap: balance; }
.hero h1 span { color: var(--accent); white-space: nowrap; }
.hero p { max-width: 38ch; margin: 1.45rem 0 2rem; font-size: clamp(1.15rem, 2.2vw, 1.75rem); line-height: 1.42; }
.button {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  min-height: 3rem;
  padding: .75rem 1.2rem;
  border-radius: .65rem;
  background: var(--accent);
  color: #fff;
  text-decoration: none;
  text-align: center;
  font-weight: 700;
}
.button:hover { background: #433097; }
.button:focus-visible { outline-color: var(--ink); }

.services { padding-block: clamp(3.4rem, 7vw, 6rem); }
h2 { margin: 0; font-size: clamp(2rem, 5vw, 3.4rem); line-height: 1.1; letter-spacing: -.045em; }
.cards { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: .9rem; margin: 1.75rem 0 0; padding: 0; list-style: none; }
.cards > li { grid-column: span 2; overflow: hidden; background: var(--panel); border: 1px solid var(--line); border-radius: 1.25rem; }
.cards > li:nth-child(n + 4) { grid-column: span 3; }
.card-image { display: block; width: 100%; height: clamp(11rem, 19vw, 16rem); object-fit: cover; background: #efecff; }
.card-copy { padding: clamp(1.25rem, 2.5vw, 2rem); }
.cards h3 { margin: 0 0 .65rem; font-size: 1.25rem; line-height: 1.25; }
.cards p { margin: 0; color: var(--muted); line-height: 1.55; }
.example-toggle {
  position: relative;
  display: block;
  width: 100%;
  padding: 0;
  overflow: hidden;
  border: 0;
  background: #efecff;
  font: inherit;
  text-decoration: none;
  cursor: pointer;
}
.example-toggle:focus-visible { outline: 3px solid var(--accent); outline-offset: -4px; }
.example-toggle-label {
  position: absolute;
  inset: auto .75rem .75rem auto;
  padding: .5rem .75rem;
  border-radius: .6rem;
  background: #fff;
  color: #44318e;
  font-size: .875rem;
  font-weight: 600;
}
@media (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
  .example-toggle .card-image { transition: transform .3s ease; }
  .example-toggle:hover .card-image { transform: scale(1.06); }
}
.card-example { margin-top: 1.4rem; padding-top: 1rem; border-top: 1px solid var(--line); }
.card-example h4 { margin: 0 0 .65rem; font-size: 1rem; line-height: 1.35; }
.summary-sample { display: grid; gap: .65rem; }
.summary-source, .summary-result { padding: .9rem; border-radius: .8rem; background: #f5f2ff; }
.summary-result { background: #e9f3fd; }
.summary-result ul { margin: 0; padding-inline-start: 1.2rem; color: var(--muted); line-height: 1.55; }
.summary-result li + li { margin-top: .35rem; }
.photo-comparison {
  --before-width: 50%;
  position: relative;
  overflow: hidden;
  aspect-ratio: 3 / 2;
  border-radius: .8rem;
  background: #e9f3fd;
}
.photo-comparison img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.photo-after { filter: sepia(.12) contrast(1.12) saturate(1.38); }
.photo-before { clip-path: inset(0 calc(100% - var(--before-width)) 0 0); }
.photo-divider {
  position: absolute;
  inset-block: 0;
  left: var(--before-width);
  width: 2px;
  background: #fff;
  box-shadow: 0 0 5px #20213c;
  transform: translateX(-50%);
}
.photo-tag {
  position: absolute;
  top: .6rem;
  padding: .25rem .55rem;
  border-radius: .45rem;
  background: #20213c;
  color: #fff;
  font-size: .875rem;
  font-weight: 600;
}
.photo-tag-before { left: .6rem; }
.photo-tag-after { right: .6rem; }
.photo-range-label { display: block; margin-top: .65rem; color: var(--muted); }
.photo-range { display: block; width: 100%; min-height: 2.75rem; margin: 0; accent-color: var(--accent); cursor: ew-resize; }
.photo-range:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.chat { display: grid; gap: .6rem; }
.card-example > p + .chat { margin-top: .75rem; }
.cards .chat-message {
  justify-self: start;
  max-width: 92%;
  padding: .55rem .7rem;
  border-radius: .8rem .8rem .8rem .2rem;
  background: #eeebff;
  color: var(--ink);
  font-size: .95rem;
}
.cards .chat-visitor { justify-self: end; border-radius: .8rem .8rem .2rem .8rem; background: #e9f3fd; }
.chat-message strong { display: block; margin-bottom: .1rem; color: #44318e; font-size: .875rem; }
.contact { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1.25rem; padding: clamp(1.5rem, 4vw, 3rem); margin-bottom: 3rem; border: 1px solid var(--line); border-radius: 1rem; background: #eeebff; }
.contact h2 { font-size: clamp(1.6rem, 4vw, 2.4rem); }
.contact-links { display: flex; flex-wrap: wrap; align-items: stretch; gap: .65rem; }
.button-outline { border: 1px solid #6651c3; background: #fff; color: #44318e; }
.button-outline:hover { background: #f5f0ff; }
.feedback-page { min-height: 100svh; display: grid; place-items: center; padding-block: 2rem; }
.feedback {
  width: min(100%, 43rem);
  padding: clamp(1.25rem, 4vw, 2.5rem);
  border: 1px solid var(--line);
  border-radius: 1rem;
  background: var(--panel);
}
.feedback h1 { margin: 0; font-size: clamp(2rem, 5vw, 3rem); line-height: 1.1; letter-spacing: -.045em; }
.feedback p { margin: .75rem 0 1.5rem; color: var(--muted); line-height: 1.5; }
.feedback-form { display: grid; gap: 1rem; }
.feedback-form label { display: grid; gap: .4rem; color: var(--ink); font-weight: 600; }
.feedback-form input, .feedback-form textarea {
  min-width: 0;
  min-height: 2.75rem;
  padding: .6rem .75rem;
  border: 1px solid #928ab3;
  border-radius: .5rem;
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-weight: 400;
}
.feedback-form textarea { resize: vertical; }
.feedback-form .button { justify-self: start; border: 0; font: inherit; font-weight: 700; cursor: pointer; }

@media (max-width: 54rem) {
  .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cards > li:nth-child(n) { grid-column: auto; }
  .cards > li:last-child { grid-column: 1 / -1; }
}
@media (max-width: 40rem) {
  .brand { gap: .45rem; font-size: 1rem; }
  .brand-mark { width: 1.75rem; height: 1.75rem; }
  .hero-inner { grid-template-columns: minmax(0, 1fr); }
  .hero::after { background: linear-gradient(180deg, #f4f0ff25, #faf9ffcf 55%); }
  .portrait { max-width: 15rem; }
  .cards { grid-template-columns: minmax(0, 1fr); }
  .card-image { height: auto; aspect-ratio: 3 / 2; }
}
