/* NewINT landing page: 1:1 recreation of the Figma screenshot (501px design width).
   1u = page width / 501; coordinates live in the HTML as --x/--y/--w/--h. */

/* non-inheriting so a child never picks up its parent's coordinates */
@property --x { syntax: "*"; inherits: false; }
@property --y { syntax: "*"; inherits: false; }
@property --w { syntax: "*"; inherits: false; }
@property --h { syntax: "*"; inherits: false; }

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: #1d1626;
  color: #1b1b1b;
  font-family: "Chiron GoRound TC", "PingFang TC", "Microsoft JhengHei", sans-serif;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4, p, ol, ul, figure, address { margin: 0; padding: 0; font-style: normal; }
ol, ul { list-style: none; }
img { display: block; max-width: 100%; }

.site {
  width: 100%;
  max-width: 1440px;
  margin: 0 auto;
  container-type: inline-size;
  --u: calc(100cqw / 501);
}
.site > header, .site section { position: relative; overflow: hidden; }

/* absolute placement from screenshot coordinates (missing values fall back to auto) */
.abs {
  position: absolute;
  left: calc(var(--x) * var(--u));
  top: calc(var(--y) * var(--u));
  width: calc(var(--w) * var(--u));
  height: calc(var(--h) * var(--u));
}

/* One look for every section title (導入進程, 產品導向, 誰適合導入？), placed from the
   section's top-left at the page's scale. */
.section-title {
  position: absolute;
  z-index: 1;
  left: calc(8 * var(--u));
  top: calc(12 * var(--u));
  font-size: calc(16 * var(--u));
  font-weight: 700;
  line-height: 1.2;
}

/* ---------- 1. Hero ---------- */
.hero { height: calc(548 * var(--u)); background: #b65bfd; }
.hero-logo { position: absolute; inset: 0; width: 100%; height: 100%; }
.logo-frame { fill: #a040ff; fill-opacity: .3; }
.logo-tile { fill: #fff; fill-opacity: .27; }

.hero-title {
  font-family: "IBM Plex Sans", "Chiron GoRound TC", sans-serif;
  font-size: calc(24 * var(--u));
  font-weight: 700;
  line-height: .94;
  color: #1e1525;
}
/* The heading is anchored on the backdrop logo (index.html): .hero-heading sits at the
   top-left tile's corner point (190, 81). */
.hero-heading { --cap-mid: calc(9.6 * var(--u)); }  /* middle of the capitals below the line's top: .4 × 24u */
.hero-title { position: absolute; top: calc(var(--cap-mid) * -1); white-space: nowrap; }
.hero-left  { position: absolute; right: 100%; }    /* WE CAN INT ends at the point… */
.hero-right { position: absolute; left: 0; }        /* …EGRATE starts there */
.hero-sub {                                         /* starts under WE, top 3u below the tile */
  position: absolute;
  left: 0;
  /* the tile's bottom (126) + 3, relative to the title's top (81 − the capitals' shift) */
  top: calc((126 + 3 - 81) * var(--u) + var(--cap-mid));
  font-family: "Chiron GoRound TC", "PingFang TC", "Microsoft JhengHei", sans-serif;
  font-size: calc(14 * var(--u));
  font-weight: 500;
  line-height: 1.2;
  color: #1a1a1a;
}

.cta {
  display: flex;
  gap: calc(7 * var(--u));
  padding: calc(3 * var(--u)) calc(7 * var(--u));
  border-radius: calc(5 * var(--u));
  background: rgba(255, 255, 255, .34);
}
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  height: calc(17 * var(--u));
  border-radius: calc(3.5 * var(--u));
  font-size: calc(6.3 * var(--u));
  font-weight: 500;
  text-decoration: none;
}
.btn-dark { width: calc(39 * var(--u)); background: #000; color: #fff; }
.btn-light { width: calc(36 * var(--u)); background: transparent; color: #222; box-shadow: inset 0 0 0 calc(.6 * var(--u)) #b57be0; }
.btn:hover { filter: brightness(1.12); }
.btn:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }

/* the pinned 免費諮詢/試用產品 group (js/main.js); outside .site, so it brings its own unit */
.cta-dock {
  --u: calc(min(100vw, 1440px) / 501);
  position: fixed;
  z-index: 50;
  top: calc(6 * var(--u));
  right: calc(max(0px, (100vw - 1440px) / 2) + 8 * var(--u));   /* the page's right edge, inset */
  pointer-events: none;                                          /* empty: clicks pass through */
}
.cta-dock.is-on { pointer-events: auto; }
.cta-dock .cta {
  position: static;                        /* drop the hero coordinates */
  background: rgba(255, 255, 255, .6);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  box-shadow: 0 calc(1 * var(--u)) calc(4 * var(--u)) rgba(0, 0, 0, .12);
  animation: cta-dock-in .25s ease-out;
}
@keyframes cta-dock-in { from { opacity: 0; transform: translateY(calc(-4 * var(--u))); } }

.hero-tagline p { font-size: calc(11.35 * var(--u)); font-weight: 700; line-height: calc(24.4 * var(--u)); color: #111; }

/* ---------- 2. 導入進程 (scroll-driven, steps 0-7; see js/main.js) ---------- */
.process-track { height: 500vh; }
.site .process {
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100svh;
  overflow: hidden;
  display: grid;
  place-items: center;
  background: #e1a7f9;
  --brush: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 400 100' preserveAspectRatio='none'%3E%3Cfilter id='b'%3E%3CfeGaussianBlur stdDeviation='4'/%3E%3C/filter%3E%3Cpath filter='url(%23b)' d='M125-10C115 15 135 30 120 50S132 85 122 110H278C268 85 290 70 280 50S288 15 275-10Z'/%3E%3C/svg%3E");
}
.process .stage {                      /* scaled to fit the visible screen */
  /* The frame is cropped to the drawing: 501 wide, y 8–318 (the design frame was 352
     high, but nothing sits below 318 and the title now lives outside the frame). */
  --u: min(100cqw / 501, 100svh / 310);
  position: relative;
  width: calc(501 * var(--u));
  height: calc(310 * var(--u));
}
.process .stage > div { position: relative; top: calc(-8 * var(--u)); }   /* y 8 → top edge */
/* step bar at the right: a rounded pill of 7 dots, the current step's dot highlighted (js/main.js) */
.step-rail {
  position: absolute;
  z-index: 1;
  right: calc(6 * var(--u));
  top: 50%;
  translate: 0 -50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: calc(5 * var(--u));
  padding: calc(6 * var(--u)) calc(3 * var(--u));
  border-radius: 999px;
  background: rgba(255, 255, 255, .35);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
}
.process:not(.is-scripted) .step-rail { display: none; }   /* no steps without JS */
.step-rail button {
  display: block;
  width: calc(4 * var(--u));
  height: calc(4 * var(--u));
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(30, 21, 37, .25);
  cursor: pointer;
  transition: transform .3s ease, background .3s ease;
}
.step-rail button:hover { background: rgba(30, 21, 37, .5); }
.step-rail button.is-current { background: #1e1525; transform: scale(1.5); }
.step-rail button:focus-visible { outline: 2px solid #1e1525; outline-offset: 2px; }
.chunk, .arrow, .step-icon { display: block; }
.arrow path { fill: #111; }
.step-label {
  transform: translateX(-50%);
  font-size: calc(7.5 * var(--u));
  line-height: 1.2;
  white-space: nowrap;
}

.note { font-size: calc(8.27 * var(--u)); line-height: calc(10 * var(--u)); color: #111; white-space: nowrap; }
.note-manual {
  padding: calc(5.5 * var(--u)) calc(3.8 * var(--u));
  background: linear-gradient(rgba(230, 235, 246, .9), rgba(250, 238, 252, .9));
  box-shadow: inset 0 calc(.6 * var(--u)) calc(1 * var(--u)) rgba(0, 0, 0, .12);
}
.note-auto {
  padding: calc(12 * var(--u)) calc(4 * var(--u)) calc(4 * var(--u));
  border-radius: calc(15 * var(--u)) calc(15 * var(--u)) 0 0;
  background: linear-gradient(#f3eefc, #fefbe3);
  box-shadow: 0 calc(1.5 * var(--u)) calc(2.5 * var(--u)) rgba(0, 0, 0, .18);
}

/* effects: only once JS runs (without JS the final diagram shows) */
.fx-wipe { --mask: linear-gradient(90deg, transparent 31.25%, #000 31.25% 68.75%, transparent 68.75%); }
.fx-paint, .exit-paint.is-after { --mask: var(--brush); }

.is-scripted :is(.fx-wipe, .fx-paint) {
  -webkit-mask: var(--mask) 100% 0 / 400% 100% no-repeat;
  mask: var(--mask) 100% 0 / 400% 100% no-repeat;
  transition: -webkit-mask-position .7s ease, mask-position .7s ease;
  transition-delay: calc(var(--leave-offset, 0s) + var(--x) * 1ms);    /* leaving: after the notes */
}
.is-scripted :is(.fx-wipe, .fx-paint).is-on {
  -webkit-mask-position: 50% 0;
  mask-position: 50% 0;
  transition-delay: calc(var(--arrive-offset, .3s) + var(--x) * 2ms);  /* arriving: after the leavers */
}
.is-scripted :is(.fx-wipe, .fx-paint).is-after { -webkit-mask-position: 0 0; mask-position: 0 0; }

.is-scripted .note { transition: clip-path .4s ease; clip-path: inset(-5% -5% -10% -5%); }  /* leave first */
.is-scripted .note-manual:not(.is-on) { clip-path: inset(0 0 100% 0); }   /* roll down in, roll up out */
.is-scripted .note-auto.is-before { clip-path: inset(100% 0 0 0); }       /* roll up in */
.is-scripted .note.is-on { transition-duration: .5s; transition-delay: var(--note-in, .3s); }  /* arrive last */


/* ---------- 3. 產品導向 (click the bottom-right heading to spin; see js/main.js) ---------- */
@property --spin { syntax: "<angle>"; inherits: false; initial-value: 86.7deg; }

.product {
  height: calc(310 * var(--u));
  background: conic-gradient(from var(--spin) at calc(330.2 * var(--u)) calc(214.2 * var(--u)),
    #9550d5 0deg, #9d5ccf 40deg, #a76ccc 90deg, #be92c6 130deg, #e6cdbb 150deg, #f3dfb4 165deg,
    #fcd96c 205deg, #fdd864 235deg, #f8dc9e 290deg, #f3dfb6 340deg, #f2ddb6 352deg, #9550d5 360deg);
  transition: --spin 1.2s ease-in-out .3s;
}

.trait-title {
  font-size: calc(13.7 * var(--u));
  font-weight: 700;
  line-height: 1.2;
  white-space: nowrap;
  transform-origin: left center;
}
.group-title { font-size: calc(11.15 * var(--u)); font-weight: 700; line-height: 1.2; }
.group-toggle { padding: 0; border: 0; background: none; font: inherit; color: inherit; cursor: default; }

/* the heading in the bottom-right slot is the clickable one: a soft blurred pill,
   breathing gently until the first spin (.has-spun, js/main.js) */
.group-toggle { border-radius: 999px; }
.product:not(.show-cons) .cons .group-toggle,
.product.show-cons .pros .group-toggle {
  cursor: pointer;
  position: relative;
  isolation: isolate;                     /* keeps the blurred layer behind the text only */
  /* padding cancelled by the margin: the text stays where the design puts it */
  padding: calc(2.5 * var(--u)) calc(7 * var(--u));
  margin: calc(-2.5 * var(--u)) calc(-7 * var(--u));
  color: #f6f0fb;                         /* text on the dark pill (設計妥協; 核心優勢 below) */
  transition: color .3s;
}
/* the pill itself: a blurred layer behind the text, so its edges are soft but the text stays sharp */
.product:not(.show-cons) .cons .group-toggle::before,
.product.show-cons .pros .group-toggle::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: 999px;
  background: rgba(35, 22, 50, .8);       /* dark at rest (設計妥協; 核心優勢 below) */
  filter: blur(calc(2.5 * var(--u)));     /* how soft the edge is */
  transition: background .3s;
  animation: invite 3s ease-in-out infinite;
}
/* 設計妥協 clickable: dark, light on hover */
.product:not(.show-cons) .cons .group-toggle:hover { color: #1b1b1b; }
.product:not(.show-cons) .cons .group-toggle:hover::before { background: rgba(255, 255, 255, .92); }
/* 核心優勢 clickable: light, dark on hover */
.product.show-cons .pros .group-toggle { color: #1b1b1b; }
.product.show-cons .pros .group-toggle::before { background: rgba(255, 255, 255, .92); }
.product.show-cons .pros .group-toggle:hover { color: #f6f0fb; }
.product.show-cons .pros .group-toggle:hover::before { background: rgba(35, 22, 50, .8); }
.product.has-spun .group-toggle::before { animation: none; }
@keyframes invite {
  50% { transform: scale(1.08); filter: blur(calc(3.5 * var(--u))); }
}
.group-toggle:focus-visible { outline: 2px solid #1b1b1b; outline-offset: 2px; border-radius: 999px; }

/* final positions of the other state (the flight itself is animated by JS) */
.show-cons .group-title { transform: translate(calc(var(--dx) * var(--u)), calc(var(--dy) * var(--u))); }
.product:not(.show-cons) .cons .trait-title,
.product.show-cons .pros .trait-title {
  transform: translate(calc(var(--dx) * var(--u)), calc(var(--dy) * var(--u))) scale(.905);
}

.pill {
  padding: calc(2.2 * var(--u)) calc(5.5 * var(--u));
  border-radius: calc(6 * var(--u));
  background: rgba(255, 255, 255, .45);
  font-size: calc(8.35 * var(--u));
  line-height: calc(10 * var(--u));
  color: #333;
  transition: clip-path .4s ease 1.5s, visibility 0s 1.5s;          /* roll in last */
}
.cons .pill { background: rgba(255, 255, 255, .55); }
.product:not(.show-cons) .cons .pill,
.product.show-cons .pros .pill {
  clip-path: inset(0 0 100% 0);
  visibility: hidden;
  transition: clip-path .3s ease, visibility 0s .3s;                /* roll away first */
}

/* ---------- 4. 誰適合導入？ ---------- */
.who { height: calc(160 * var(--u)); background: #f5deb3; }
.fit-list li { display: flex; align-items: center; gap: calc(8 * var(--u)); font-size: calc(9.6 * var(--u)); font-weight: 500; }
.fit-list li + li { margin-top: calc(18 * var(--u)); }
.fit-list svg {
  flex: none;
  width: calc(13 * var(--u));
  height: calc(13 * var(--u));
  fill: none; stroke: #1b1b1b; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
}

/* ---------- 5. 聯絡我們 ---------- */
.contact { padding-top: calc(3 * var(--u)); background: #f5deb3; }   /* the page ends at the card's bottom */
.contact-card {
  display: grid;
  grid-template-columns: 242fr 243fr;
  margin: 0 calc(8 * var(--u));
  border-radius: calc(14 * var(--u)) calc(14 * var(--u)) 0 0;   /* runs into the page bottom */
  overflow: hidden;
}
.contact-info { background: #5f5b55; padding: calc(8 * var(--u)) calc(4 * var(--u)) calc(10 * var(--u)); }  /* hugs title + 3 cards; sets the card height */
.contact-info h2 { margin: 0 0 calc(10 * var(--u)) calc(18 * var(--u)); font-size: calc(11 * var(--u)); font-weight: 700; color: #f1ebe1; }
.contact-list { display: grid; grid-auto-rows: 1fr; gap: calc(4 * var(--u)); }   /* three equal cards, sized to content */
.contact-list a {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: calc(10 * var(--u)) calc(16 * var(--u));
  border-radius: calc(13 * var(--u));
  background: rgba(255, 255, 255, .22);
  color: #fff;
  font-size: calc(10 * var(--u));
  text-decoration: none;
}
.contact-list a:hover { background: rgba(255, 255, 255, .3); }
.contact-list a { transition: background .2s, transform .15s; }
.contact-list a:active { transform: scale(.98); }                 /* every card: a small press */
.contact-list a.is-copied { background: rgba(255, 255, 255, .38); }
.contact-list a.is-copied span { animation: copied-pop .3s ease-out; }
@keyframes copied-pop { from { opacity: 0; transform: translateY(calc(3 * var(--u))); } }
.contact-list svg {
  display: block;
  width: calc(18 * var(--u));
  height: calc(18 * var(--u));
  margin-bottom: calc(6 * var(--u));
  fill: none; stroke: #fff; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round;
}
.contact-list svg text { fill: #fff; stroke: none; font: 700 5px sans-serif; }

.contact-form {
  contain: size;               /* its own height doesn't stretch the card: the left panel sets it */
  overflow-y: auto;            /* so it scrolls inside itself */
  scrollbar-width: thin;
  scrollbar-color: #9b8f80 transparent;
  background: #d5cab9;
  padding: 0 calc(4 * var(--u)) calc(10 * var(--u)) calc(6 * var(--u));
}
.contact-form h2 {             /* stays visible while the fields scroll */
  position: sticky;
  top: 0;
  z-index: 1;
  margin: 0 0 calc(8 * var(--u));
  padding: calc(10 * var(--u)) 0 calc(2 * var(--u)) calc(17 * var(--u));
  background: #d5cab9;
  font-size: calc(11 * var(--u));
  font-weight: 700;
  color: #2b2b2b;
}
.field { margin-bottom: calc(5 * var(--u)); }
.field label { display: block; margin-bottom: calc(2 * var(--u)); font-size: calc(8.5 * var(--u)); font-weight: 700; color: #222; }
.req { color: #e03131; }
.field input, .field textarea {
  display: block;
  width: 100%;
  height: calc(14 * var(--u));
  padding: 0 calc(4 * var(--u));
  border: 0;
  border-radius: calc(4 * var(--u));
  background: #fff;
  font: inherit;
  font-size: calc(7 * var(--u));
  color: #222;
}
.field textarea { height: calc(44 * var(--u)); padding-block: calc(3 * var(--u)); resize: vertical; }
::placeholder { color: #9b9b9b; }
.submit {
  display: block;
  margin-left: auto;
  padding: calc(3 * var(--u)) calc(14 * var(--u));
  border: 0;
  border-radius: calc(4 * var(--u));
  background: #5f5b55;
  color: #fff;
  font: inherit;
  font-size: calc(8 * var(--u));
  font-weight: 700;
  cursor: pointer;
}
input:focus-visible, textarea:focus-visible, .submit:focus-visible, .contact-list a:focus-visible {
  outline: 2px solid #7c3aed;
  outline-offset: 1px;
}

/* ---------- contact form: submit flow and privacy notice (see js/main.js) ---------- */
.hp-field { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.consent-row { display: flex; align-items: center; gap: calc(2 * var(--u)); margin-top: calc(1 * var(--u)); font-size: calc(7.5 * var(--u)); }
.consent-row input { width: calc(8 * var(--u)); height: calc(8 * var(--u)); margin: 0; accent-color: #5f5b55; cursor: pointer; }
.consent-row label { cursor: pointer; }
.consent-link {
  padding: 0; border: 0; background: none; font: inherit; color: #5f3fa0;
  text-decoration: underline; text-underline-offset: .2em; cursor: pointer;
}
.consent-link:focus-visible { outline: 2px solid #7c3aed; outline-offset: 2px; border-radius: 2px; }
.consent-row .submit { margin-left: auto; }
.consent-hint { margin-top: calc(3 * var(--u)); font-size: calc(6.5 * var(--u)); color: #6b6257; text-align: right; }
.contact-form:has(#f-consent:checked) .consent-hint { visibility: hidden; }
.form-status { margin-top: calc(2 * var(--u)); font-size: calc(8 * var(--u)); font-weight: 700; }
.form-status[data-kind="pending"] { color: #5f5b55; }
.form-status[data-kind="ok"] { color: #2f6b3a; }
.form-status[data-kind="error"] { color: #b42318; }
.submit:disabled { opacity: .45; cursor: not-allowed; }
.contact-form.is-sent :is(.field, .consent-row, .consent-hint) { display: none; }   /* success: message only */
.contact-form.is-sent .form-status { margin-top: calc(20 * var(--u)); font-size: calc(10 * var(--u)); }

/* privacy notice: an overlay, so normal screen sizes instead of page units */
.privacy-dialog {
  width: min(92vw, 560px);
  max-height: 85vh;
  padding: 0;
  border: 0;
  border-radius: 14px;
  background: #f6efe4;
  color: #2b2b2b;
  box-shadow: 0 20px 60px rgba(0, 0, 0, .35);
}
.privacy-dialog[open] { display: flex; flex-direction: column; }
.privacy-dialog:focus { outline: none; }
.privacy-dialog::backdrop { background: rgba(29, 22, 38, .55); }
.privacy-dialog h2 { padding: 20px 24px 2px; font-size: 18px; font-weight: 700; }
.privacy-version { padding: 0 24px 12px; font-size: 12px; color: #7a7064; border-bottom: 1px solid #e0d5c4; }
.privacy-body { overflow: auto; padding: 14px 24px; font-size: 14px; line-height: 1.75; }
.privacy-body ol { list-style: decimal; padding-left: 1.4em; margin-top: 8px; }
.privacy-body li + li { margin-top: 6px; }
.privacy-body a { color: #5f3fa0; }
.privacy-actions { display: flex; justify-content: flex-end; gap: 10px; padding: 14px 24px 18px; border-top: 1px solid #e0d5c4; }
.privacy-actions button { padding: 8px 18px; border-radius: 6px; font: inherit; font-size: 14px; font-weight: 700; cursor: pointer; }
.privacy-close { border: 1px solid #5f5b55; background: transparent; color: #5f5b55; }
.privacy-agree { border: 0; background: #5f5b55; color: #fff; }
.privacy-actions button:focus-visible, .privacy-body:focus-visible { outline: 2px solid #7c3aed; outline-offset: 2px; }
