.scroll-site { --bar-height: 78px; --story-bg: #06152e; --story-text: #f7faff; --story-soft: #c1d5ee; }
.scroll-site .header { position: sticky; top: 0; z-index: 3; }
.scroll-site section[id] { scroll-margin-top: calc(var(--bar-height) + 18px); }

.scroll-story { color: var(--story-text); background: var(--story-bg); }
.story-stage { isolation: isolate; }
.story-panel { display: grid; grid-template-rows: auto minmax(0, 1fr); justify-items: center; gap: clamp(12px, 2.5vh, 30px); min-width: 0; padding: clamp(44px, 6.5vh, 80px) 0 26px; }
.story-panel + .story-panel { border-top: 1px solid #294263; }
.story-copy { width: min(100% - var(--gutter) * 2, 920px); text-align: center; }
.story-copy h1, .story-copy h2 { font-family: var(--thai); line-height: 1.08; letter-spacing: -.029em; font-weight: 500; }
.story-copy h1 { font-size: clamp(3.3rem, 6.6vw, 6rem); }
.story-copy h1 span { display: block; }
.story-copy h1 span:last-child { color: #92d2ff; }
.story-copy h2 { font-size: clamp(2.7rem, 5.5vw, 5.25rem); }
.story-copy p { margin: 12px auto 0; max-width: 56ch; color: var(--story-soft); font-size: clamp(16px, 1.6vw, 20px); font-weight: 300; line-height: 1.48; }

.story-intro { position: relative; isolation: isolate; }
.story-halo { position: absolute; z-index: -1; inset: 30% 5% 0; background: radial-gradient(ellipse at 50% 65%, #0c376b 0, #09234a 37%, transparent 68%); pointer-events: none; }

.story-photo {
  display: grid;
  align-items: center;
  width: min(100%, 1170px);
  min-height: 0;
  overflow: hidden;
  mask-image: radial-gradient(ellipse 56% 58% at 50% 48%, #000 55%, transparent 98%);
  mix-blend-mode: lighten;
}
.story-photo img { width: 100%; height: 100%; max-height: 510px; object-fit: contain; object-position: 50% 52%; }
.story-photo.has-cutout { width: min(100% - var(--gutter), 1070px); justify-items: center; mask-image: none; mix-blend-mode: normal; }
.story-photo.has-cutout img { width: min(100%, 980px); filter: drop-shadow(0 13px 20px #010b1ca1); }
.story-visual { display: grid; place-items: center; width: min(100% - var(--gutter) * 2, 920px); min-height: 0; }
.demo-window { width: 100%; overflow: hidden; background: #f8fbff; color: var(--navy); border-radius: 16px; box-shadow: 0 26px 56px #0007; }
.demo-top { display: flex; justify-content: space-between; min-height: 57px; align-items: center; gap: 12px; padding: 8px 21px; background: #eaf3ff; border-bottom: 1px solid #cbdcf3; color: #466180; font-size: 14px; }
.demo-top > span:first-child { display: flex; align-items: center; gap: 9px; color: #1858a8; font: 650 15px var(--latin); }
.demo-top .icon { width: 19px; height: 19px; }
.demo-body { display: grid; grid-template-columns: minmax(130px, 22%) minmax(0, 1fr); }
.demo-side { display: grid; align-content: start; gap: 7px; padding: 18px 12px; color: #485e78; font-size: 15px; border-right: 1px solid #dbe7f5; }
.demo-side > span { padding: 8px 10px; }
.demo-side .demo-current { color: #154f99; background: #eaf2ff; border-radius: 7px; }
.demo-content { padding: clamp(14px, 2.4vw, 28px); }
.demo-title { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.demo-title h3 { font-size: clamp(1.15rem, 2vw, 1.65rem); font-weight: 500; }
.demo-title > span { font-size: 13px; letter-spacing: .025em; color: #486382; white-space: nowrap; }
.demo-steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: 14px 0; padding: 0; list-style: none; }
.demo-steps li { display: flex; gap: 7px; align-items: center; justify-content: center; min-height: 46px; padding: 7px; background: #eaf3ff; color: #174f98; border-radius: 6px; text-align: center; font-size: clamp(.8rem, 1.27vw, 1rem); line-height: 1.2; }
.demo-steps .icon { width: 15px; height: 15px; }
.demo-crm-steps li:first-child { color: #466180; background: #eef2f8; }
.demo-facts { margin: 0; }
.demo-facts > div { display: flex; justify-content: space-between; align-items: center; min-height: 42px; gap: 10px; padding-block: 6px; border-bottom: 1px solid #dce7f5; font-size: 14px; }
.demo-facts dt { color: #485e78; }
.demo-facts dd { margin: 0; }

.story-footer { display: flex; min-height: 53px; justify-content: center; align-items: center; width: min(100% - var(--gutter) * 2, 1240px); margin-inline: auto; padding: 4px 0 8px; color: var(--story-soft); }
.story-footer a, .story-cue { display: inline-flex; gap: 8px; align-items: center; white-space: nowrap; font-size: 15px; }
.story-footer a { min-height: 44px; color: #e8f3ff; }
.story-footer a:hover { color: #92d2ff; }
.story-footer a:focus-visible { outline-color: #92d2ff; }
.story-footer .icon { width: 17px; height: 17px; }
.story-cue, .story-progress { display: none; }

.scroll-story:not(.has-story-motion) :is(.story-panel, .story-copy, .story-halo, .story-photo, .demo-window) {
  opacity: 1 !important;
  transform: none !important;
}

.has-story-motion { --stage-height: calc(100svh - var(--bar-height)); min-height: calc(var(--stage-height) + clamp(900px, 134svh, 1360px)); }
.has-story-motion .story-stage { position: sticky; top: var(--bar-height); display: grid; grid-template: minmax(0, 1fr) auto / minmax(0, 1fr); height: var(--stage-height); overflow: clip; }
.has-story-motion .story-panel { grid-area: 1 / 1; min-height: 0; padding: clamp(24px, 5.3vh, 62px) 0 4px; border-top: 0; pointer-events: none; }
.has-story-motion.is-in-view .story-panel, .has-story-motion.is-in-view .story-photo { will-change: transform, opacity; }
.has-story-motion .story-footer { grid-row: 2; display: grid; grid-template-columns: 1fr auto 1fr; border-top: 1px solid #263b58; }
.has-story-motion .story-footer a { justify-self: end; }
.has-story-motion .story-cue { display: inline-flex; }
.has-story-motion .story-progress { display: flex; gap: 6px; }
.story-progress span { width: clamp(19px, 3.5vw, 40px); height: 3px; border-radius: 3px; background: #6885a7; }
.story-progress span.is-current { background: #94d3ff; }

.scroll-site .services { padding: clamp(86px, 10.7vw, 166px) 0; }
.scroll-site .service-heading { align-items: end; margin-bottom: clamp(25px, 3.7vw, 53px); }
.scroll-site .service-heading h2 { font-size: clamp(2.45rem, 5.3vw, 5.2rem); }
.scroll-site .service-grid {
  grid-template-columns: minmax(0, .72fr) minmax(0, 1.28fr);
  grid-template-rows: repeat(5,minmax(84px,auto));
  gap: 0 clamp(20px, 4.6vw, 64px);
  border: 0;
  transition: none;
}
.scroll-site .service { display: contents; }
.scroll-site .service > h3 { grid-column: 1; grid-row: var(--service-row); border-bottom: 1px solid #d6e4f4; }
.scroll-site .service:first-child > h3 { border-top: 1px solid #d6e4f4; }
.scroll-site .service-grid .service-toggle {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr) 20px;
  align-items: center;
  gap: 14px;
  min-height: 82px;
  height: 100%;
  padding: 10px 12px;
  border-radius: 7px;
  line-height: 1;
}
.scroll-site .service-toggle::after, .scroll-site .service:not(.active) .service-toggle::after { content: none; }
.scroll-site .service-toggle:hover { background: #f1f7ff; }
.scroll-site .service.active .service-toggle { background: #edf5ff; color: #103a73; cursor: default; }
.scroll-site .service-grid .service-icon { place-items: center; background: #edf5ff; color: #1558a7; border-radius: 8px; }
.scroll-site .service.active .service-icon { color: #fff; background: var(--royal); }
.service-name { display: grid; gap: 6px; }
.service-name small { color: #465f7f; letter-spacing: 0; line-height: 1.25; font-size: 14px; font-weight: 300; }
.service-direction { width: 18px; height: 18px; color: #527398; transition: transform .2s; }
.service-toggle:hover .service-direction { transform: translate(2px,-2px); }
.scroll-site .service-content {
  grid-column: 2;
  grid-row: 1 / 6;
  display: flex;
  min-width: 0;
  flex-direction: column;
  align-items: start;
  justify-content: center;
  padding: clamp(24px, 4vw, 55px);
  background: #eaf3ff;
  border-radius: 16px;
}
.flow-icon { display: grid; place-items: center; width: 61px; height: 61px; margin-bottom: 18px; border: 1px solid #bbd4f3; background: #f7fbff; color: #1857a5; border-radius: 12px; }
.flow-icon .icon { width: 32px; height: 32px; }
.service-content h4 { margin: 0 0 10px; max-width: 18ch; color: var(--navy); font-size: clamp(1.75rem, 3.12vw, 3.15rem); font-weight: 500; line-height: 1.12; letter-spacing: -.025em; }
.scroll-site .service-content > p { max-width: 50ch; font-size: clamp(16px, 1.4vw, 18px); }
.service-flow { width: 100%; margin-top: 29px; }
.service-flow > p { font-size: 14px; font-weight: 400; }
.service-flow ol { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); align-items: stretch; gap: clamp(8px,1.1vw,15px); list-style: none; padding: 0; margin: 8px 0 0; }
.service-flow li { position: relative; display: grid; place-items: center; min-height: 46px; padding: 6px; text-align: center; border-radius: 6px; color: #104681; background: #fff; font-size: clamp(13px,1.27vw,16px); }
.service-flow li + li::before { content: ''; position: absolute; top: 50%; right: 100%; width: clamp(8px,1.1vw,15px); height: 1px; background: #5590c9; }
.scroll-site .service-content a { margin-top: 20px; min-height: 44px; font-weight: 500; }
@media (prefers-reduced-motion: no-preference) {
  .scroll-site .service.active .service-flow li { animation: flow-node .36s cubic-bezier(.16,1,.3,1) both; }
  .scroll-site .service.active .service-flow li:nth-child(2) { animation-delay: .05s; }
  .scroll-site .service.active .service-flow li:nth-child(3) { animation-delay: .1s; }
}
@keyframes flow-node {
  from { opacity: .5; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

.scroll-site .approach { background: #eef4fd; padding: clamp(90px, 11vw, 170px) 0; }
.approach-layout { display: grid; grid-template-columns: minmax(0, .91fr) minmax(0, 1.09fr); align-items: start; gap: clamp(35px, 7.5vw, 120px); }
.approach-intro h2 { font-size: clamp(2.4rem, 4.65vw, 4.6rem); }
.approach-intro > p { max-width: 45ch; margin-block: 20px 25px; color: #435b78; font-weight: 300; font-size: 18px; line-height: 1.6; }
.approach-visual { aspect-ratio: 2.25; width: 100%; overflow: hidden; border-radius: 15px; background: #06152e; }
.approach-visual img { width: 100%; height: 100%; object-fit: cover; object-position: center 77%; }
.approach-route { position: relative; padding-left: clamp(26px, 3.2vw, 48px); }
.approach-rail { position: absolute; inset: 0 auto 0 3px; width: 2px; background: #c5d9ef; }
.approach-rail > span { display: block; width: 100%; height: 100%; background: var(--royal); transform-origin: top; }
.approach-route:not(.is-approach-motion) .approach-rail > span { transform: none !important; }
.approach-steps { display: grid; gap: 15px; margin: 0; padding: 0; list-style: none; }
.approach-steps li { position: relative; }
.approach-steps li::before { position: absolute; content: ''; top: 40px; right: calc(100% + clamp(16px, 3.2vw - 10px, 38px)); width: 12px; height: 12px; border: 2px solid #7a9cc4; border-radius: 50%; background: #eef4fd; }
.approach-steps li.is-current::before { border-color: var(--royal); background: var(--royal); }
.approach-card { padding: clamp(18px, 3vw, 34px); background: #fff; border-radius: 15px; }
.approach-card .process-icon { margin-bottom: 18px; }
.approach-card h3 { font-size: clamp(1.3rem, 2vw, 1.85rem); font-weight: 500; line-height: 1.18; }
.approach-card > p { margin-top: 9px; color: #435b78; font-weight: 300; font-size: 16px; line-height: 1.55; }
.approach-card .approach-result { margin-top: 16px; padding-top: 12px; border-top: 1px solid #d7e5f4; }
.approach-result strong { margin-right: 5px; color: #1b549c; font-weight: 500; }
@media (min-width: 761px) and (min-height: 720px) and (prefers-reduced-motion: no-preference) {
  .approach-intro { position: sticky; top: calc(var(--bar-height) + 39px); }
}

.scroll-site .contact { position: relative; overflow: hidden; padding: clamp(87px, 11vw, 160px) 0; background: #061f48; }
.scroll-site .contact-layout { align-items: center; gap: clamp(38px, 8vw, 115px); }
.scroll-site .contact h2 { font-size: clamp(3rem, 5.9vw, 5.7rem); }
.scroll-site .contact-form { border-radius: 16px; box-shadow: 0 18px 50px #04123054; }
.contact-emblem { display: grid; width: 86px; height: 86px; place-items: center; margin-top: 30px; border-radius: 16px; background: #edf5ff; }
.contact-emblem img { width: 59px; height: 65px; object-fit: contain; }

@media (min-width: 761px) {
  .has-story-motion .story-photo.has-cutout { grid-template-rows: minmax(0,1fr); padding-bottom: 8px; }
  .has-story-motion .story-photo.has-cutout img { max-height: 100%; min-height: 0; }
}

@media (max-width: 760px) {
  .scroll-site { --bar-height: 68px; }
  .story-copy h1 { font-size: clamp(2.2rem, 9.6vw, 4.3rem); }
  .story-copy h2 { font-size: clamp(1.85rem, 7.6vw, 3.25rem); }
  .story-copy p { margin-top: 10px; }
  .story-photo { width: 100%; mask-image: linear-gradient(180deg, transparent, #000 19%, #000 79%, transparent); }
  .story-photo img { object-fit: cover; object-position: center; max-height: 340px; }
  .demo-top { padding-inline: 13px; min-height: 43px; }
  .demo-body { grid-template-columns: 1fr; }
  .demo-side { display: none; }
  .demo-facts > div { min-height: 37px; }
  .demo-steps { gap: 5px; margin-block: 10px; }
  .demo-steps li { flex-direction: column; gap: 4px; padding: 6px 3px; }
  .has-story-motion { min-height: calc(var(--stage-height) + clamp(680px, 112svh, 1020px)); }
  .has-story-motion .story-panel { gap: 17px; padding-top: clamp(30px, 8vh, 65px); }
  .has-story-motion .story-intro { padding-top: clamp(34px, 9vh, 80px); }
  .has-story-motion .story-photo img { height: auto; aspect-ratio: 1.23; }
  .has-story-motion .story-photo.has-cutout img { object-fit: contain; aspect-ratio: auto; }
  .story-footer { font-size: 13px; }
  .story-footer a, .story-cue { font-size: 13px; gap: 4px; }
  .story-footer .icon { width: 15px; height: 15px; }
  .scroll-site .service-grid { display: block; }
  .scroll-site .service { display: block; border: 0; }
  .scroll-site .service:first-child > h3 { border-top: 0; }
  .scroll-site .service > h3 { border-bottom: 1px solid #d6e4f4; }
  .scroll-site .service-grid .service-toggle { grid-template-columns: 42px minmax(0,1fr) 17px; padding: 7px 8px; min-height: 69px; gap: 10px; }
  .scroll-site .service-content { margin: 8px 0 15px; padding: 19px; }
  .flow-icon { width: 46px; height: 46px; margin-bottom: 14px; }
  .flow-icon .icon { width: 25px; height: 25px; }
  .service-flow { margin-top: 19px; }
  .scroll-site .service-content a { margin-top: 11px; }
  .approach-layout { grid-template-columns: 1fr; gap: 28px; }
  .approach-intro > p { font-size: 17px; }
  .contact-emblem { width: 65px; height: 65px; margin-top: 22px; }
  .contact-emblem img { width: 46px; height: 52px; }
}

@media (max-width: 370px) {
  .has-story-motion .story-progress { gap: 4px; }
  .story-progress span { width: 14px; }
}
