/* Works page — modern, airy layout (does not affect Home / legal pages) */

.works-page .shell {
  width: min(1000px, calc(100% - 40px));
}

.works-page main {
  padding-bottom: 24px;
}

.works-page .section {
  padding: 56px 0 8px;
}

.works-page .section h2 {
  margin: 0 0 8px;
  font-size: clamp(1.35rem, 2.4vw, 1.7rem);
  font-weight: 720;
  letter-spacing: -0.03em;
}

.works-page .section-lead {
  margin: 0 0 28px;
  max-width: 36rem;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.6;
}

/* —— Hero —— */
.works-page header.top {
  padding-bottom: 0;
}

.w-hero {
  display: grid;
  grid-template-columns: minmax(0, 0.78fr) minmax(0, 1.42fr);
  gap: 28px;
  align-items: center;
  padding: 10px 0 20px;
}

.w-hero .kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 14px;
  padding: 5px 12px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.w-hero h1 {
  margin: 0 0 16px;
  font-size: clamp(1.75rem, 3.4vw, 2.35rem);
  line-height: 1.22;
  font-weight: 750;
  letter-spacing: -0.035em;
}

.w-hero .lede {
  margin: 0;
  max-width: 34rem;
  color: var(--muted);
  font-size: 0.98rem;
  line-height: 1.65;
}

.w-hero .lede strong {
  color: var(--text);
  font-weight: 680;
}

.w-hero .cta-row {
  margin-top: 28px;
}

.w-hero-visual {
  position: relative;
}

.w-slides {
  position: relative;
  width: 100%;
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--panel);
  line-height: 0;
}

.w-slide {
  appearance: none;
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.55s ease;
  z-index: 0;
}

.w-slide.is-active {
  position: relative;
  inset: auto;
  height: auto;
  opacity: 1;
  z-index: 1;
}

.w-slide:not(.is-active) {
  pointer-events: none;
}

.w-slide img {
  display: block;
  width: 100%;
  height: auto;
  vertical-align: top;
  background: transparent;
}

.w-dots {
  position: absolute;
  left: 50%;
  bottom: 12px;
  z-index: 2;
  display: flex;
  gap: 7px;
  transform: translateX(-50%);
  padding: 6px 10px;
  border-radius: 999px;
  background: rgb(255 255 255 / 0.82);
  border: 1px solid var(--line);
  backdrop-filter: blur(6px);
}

[data-theme="dark"] .w-dots {
  background: rgb(40 50 46 / 0.85);
}

.w-dots button {
  appearance: none;
  width: 8px;
  height: 8px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: var(--line);
  cursor: pointer;
  transition: width 0.2s ease, background 0.2s ease;
}

.w-dots button.is-active {
  width: 20px;
  background: var(--accent);
}

/* —— Stats —— */
.w-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin: 36px 0 0;
  padding: 0;
  list-style: none;
}

.w-stats li {
  padding: 18px 20px;
  border-radius: 16px;
  background: var(--panel);
  border: 1px solid var(--line);
}

.w-stats strong {
  display: block;
  margin-bottom: 4px;
  font-size: 1.05rem;
  font-weight: 730;
  letter-spacing: -0.02em;
}

.w-stats span {
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.45;
}

/* —— Problem chips —— */
.w-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 20px 0 0;
  padding: 0;
  list-style: none;
}

.w-chips li {
  padding: 10px 16px;
  border-radius: 999px;
  background: var(--panel);
  border: 1px solid var(--line);
  font-size: 0.9rem;
  line-height: 1.4;
  color: var(--text);
}

/* —— Principle —— */
.w-principle .section-lead,
.w-principle h2 {
  max-width: 38rem;
}

.w-principle-list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin: 20px 0 0;
  padding: 0;
  list-style: none;
}

.w-principle-list li {
  padding: 18px 20px;
  border-radius: 16px;
  background: var(--panel);
  border: 1px solid var(--line);
  font-size: 0.95rem;
  line-height: 1.55;
}

/* —— Before / after flow —— */
.w-flow {
  display: grid;
  gap: 14px;
  margin-top: 20px;
}

.w-flow-row {
  padding: 20px 22px;
  border-radius: 18px;
  background: var(--panel);
  border: 1px solid var(--line);
}

.w-flow-row.is-after {
  background: linear-gradient(160deg, var(--accent-soft), var(--panel) 55%);
  border-color: color-mix(in srgb, var(--accent) 35%, var(--line));
}

.w-flow-label {
  display: block;
  margin-bottom: 12px;
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 750;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.w-flow-row ol {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 4px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.w-flow-row li {
  display: flex;
  align-items: center;
  gap: 8px;
}

.w-flow-row li span {
  padding: 8px 12px;
  border-radius: 10px;
  background: var(--bg);
  border: 1px solid var(--line);
  font-size: 0.86rem;
  font-weight: 650;
  line-height: 1.35;
}

.w-flow-row li:not(:last-child)::after {
  content: "→";
  color: var(--muted);
  font-weight: 600;
}

.w-flow-note {
  margin: 16px 0 0;
  max-width: 38rem;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.55;
}

/* —— Split highlight —— */
.w-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 20px;
}

.w-panel {
  padding: 28px 26px;
  border-radius: 20px;
  background: var(--panel);
  border: 1px solid var(--line);
}

.w-panel.accent {
  background: linear-gradient(160deg, var(--accent-soft), var(--panel) 55%);
  border-color: color-mix(in srgb, var(--accent) 35%, var(--line));
}

.w-panel h3 {
  margin: 0 0 10px;
  font-size: 1.15rem;
  font-weight: 720;
  letter-spacing: -0.02em;
}

.w-panel p {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.65;
}

.w-panel ul {
  margin: 14px 0 0;
  padding: 0;
  list-style: none;
}

.w-panel li {
  position: relative;
  padding: 7px 0 7px 18px;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.45;
}

.w-panel li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.85em;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
}

/* —— Services —— */
.w-services {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.w-service {
  padding: 22px 20px;
  border-radius: 18px;
  background: var(--panel);
  border: 1px solid transparent;
  box-shadow: 0 1px 0 var(--shadow);
  outline: 1px solid var(--line);
  transition: outline-color 0.2s ease, transform 0.2s ease;
}

.w-service:hover {
  outline-color: var(--accent);
  transform: translateY(-2px);
}

.w-service .ico {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  margin-bottom: 14px;
  border-radius: 12px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 1.05rem;
  font-weight: 750;
}

.w-service strong {
  display: block;
  margin-bottom: 6px;
  font-size: 0.98rem;
}

.w-service p {
  margin: 0;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.55;
}

/* —— Steps —— */
.w-steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
  border-radius: 20px;
  background: var(--panel);
  border: 1px solid var(--line);
  overflow: hidden;
}

.w-steps li {
  position: relative;
  padding: 22px 20px 20px;
  counter-increment: step;
}

.w-steps li + li {
  border-left: 1px solid var(--line);
}

.w-steps li::before {
  content: counter(step, decimal-leading-zero);
  display: block;
  margin-bottom: 12px;
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 750;
  letter-spacing: 0.04em;
}

.w-steps strong {
  display: block;
  margin-bottom: 6px;
  font-size: 0.95rem;
}

.w-steps p {
  margin: 0;
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.5;
}

/* —— Packages —— */
.w-plans {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.w-plan {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 24px 22px;
  border-radius: 20px;
  background: var(--panel);
  border: 1px solid var(--line);
  min-height: 100%;
}

.w-plan.featured {
  border-color: var(--accent);
  background: linear-gradient(180deg, var(--accent-soft), var(--panel) 40%);
  box-shadow: 0 16px 40px var(--shadow);
}

.w-plan .name {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 1.1rem;
  font-weight: 730;
}

.w-plan .plan-price {
  margin: 0;
  color: var(--accent);
  font-size: 1.15rem;
  font-weight: 750;
  letter-spacing: -0.03em;
}

.w-plan .blurb {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.5;
  flex: 1;
}

.w-plan ul {
  margin: 4px 0 0;
  padding: 0;
  list-style: none;
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.55;
}

.w-plan li + li {
  margin-top: 4px;
}

.w-plan li::before {
  content: "· ";
  color: var(--accent);
  font-weight: 700;
}

/* —— Industries —— */
.w-industries {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.w-industries span {
  padding: 10px 16px;
  border-radius: 12px;
  background: var(--panel);
  border: 1px solid var(--line);
  font-size: 0.88rem;
  font-weight: 600;
}

/* —— Diagnostic / form —— */
.w-card {
  padding: 28px 28px 24px;
  border-radius: 22px;
  background: var(--panel);
  border: 1px solid var(--line);
  box-shadow: 0 12px 36px var(--shadow);
}

.w-card .diag-q {
  margin: 0 0 12px;
  font-weight: 680;
  font-size: 0.98rem;
}

.w-card .diag-q + .chip-grid + .diag-q {
  margin-top: 22px;
}

.works-page .chip,
.works-page .choice-row label {
  background: var(--bg);
  border-radius: 999px;
  padding: 8px 14px;
  font-size: 0.86rem;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.works-page .chip:hover,
.works-page .choice-row label:hover {
  border-color: color-mix(in srgb, var(--accent) 45%, var(--line));
}

.works-page .diag-result {
  margin: 16px 0 0;
  padding: 16px 18px;
  border-radius: 14px;
  background: var(--accent-soft);
  font-size: 0.9rem;
  line-height: 1.5;
}

.works-page .diag-result h4 {
  margin: 0 0 6px;
  font-size: 1rem;
  font-weight: 720;
  letter-spacing: -0.02em;
}

.works-page .diag-result p {
  margin: 0;
  color: var(--text);
}

.works-page .diag-result ul {
  margin: 10px 0 0;
  padding: 0 0 0 1.15rem;
  color: var(--text);
}

.works-page .diag-result li + li {
  margin-top: 4px;
}

.works-consult-lede {
  margin: 0 0 14px;
  max-width: 38rem;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.65;
}

.no-obligation {
  margin: 0 0 18px;
  padding: 14px 18px;
  border-radius: 14px;
  background: var(--accent-soft);
  border: 1px solid color-mix(in srgb, var(--accent) 28%, var(--line));
  font-size: 0.98rem;
  font-weight: 720;
}

.assess-list {
  display: grid;
  gap: 8px;
  margin: 0 0 28px;
  padding: 0;
  list-style: none;
  counter-reset: assess;
}

.assess-list li {
  display: flex;
  align-items: baseline;
  gap: 12px;
  padding: 12px 16px;
  border-radius: 14px;
  background: var(--panel);
  border: 1px solid var(--line);
  counter-increment: assess;
  font-size: 0.94rem;
  line-height: 1.45;
}

.assess-list li::before {
  content: counter(assess);
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 0.75rem;
  font-weight: 750;
}

.works-page .lead-form label,
.works-page .lead-form fieldset {
  margin-bottom: 16px;
}

.works-page .lead-form input[type="text"],
.works-page .lead-form input[type="email"],
.works-page .lead-form input[type="tel"],
.works-page .lead-form textarea {
  border-radius: 12px;
  padding: 12px 14px;
  background: var(--bg);
}

.works-page .cta {
  border-radius: 12px;
  padding: 12px 18px;
}

.works-page .cta.secondary {
  background: transparent;
}

.works-page .thanks-card {
  position: relative;
  overflow: hidden;
  display: none;
  flex-direction: column;
  align-items: flex-start;
  gap: 0;
  border-radius: 22px;
  padding: 36px 32px 32px;
  border: 1px solid color-mix(in srgb, var(--accent) 42%, var(--line));
  background: linear-gradient(
    165deg,
    color-mix(in srgb, var(--accent-soft) 88%, var(--panel)),
    var(--panel) 58%
  );
  box-shadow:
    0 18px 48px var(--shadow),
    0 0 0 1px color-mix(in srgb, var(--accent) 12%, transparent);
}

.works-page .thanks-card:not([hidden]) {
  display: flex;
}

.works-page .thanks-card.is-shown {
  animation: thanks-in 0.65s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.works-page .thanks-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 5px;
  background: var(--accent);
}

.works-page .thanks-mark {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  margin-bottom: 16px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 8px 20px color-mix(in srgb, var(--accent) 35%, transparent);
}

.works-page .thanks-card.is-shown .thanks-mark {
  animation: thanks-mark-pop 0.55s cubic-bezier(0.22, 1, 0.36, 1) 0.12s both;
}

.works-page .thanks-mark::after {
  content: "";
  width: 12px;
  height: 20px;
  margin-top: -4px;
  border: solid var(--on-accent);
  border-width: 0 3px 3px 0;
  transform: rotate(45deg);
}

.works-page .thanks-card.is-shown .thanks-mark::after {
  animation: thanks-check 0.32s ease 0.38s both;
}

.works-page .thanks-kicker {
  margin: 0 0 8px;
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 750;
}

.works-page .thanks-kicker.i18n-en {
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* —— Form helpers reused —— */
.works-page .chip-grid,
.works-page .choice-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.works-page .chip,
.works-page .choice-row label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--line);
  cursor: pointer;
}

.works-page .chip:has(input:checked),
.works-page .choice-row label:has(input:checked) {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.works-page .form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.works-page .lead-form legend,
.works-page .lead-form label > span:first-child {
  display: block;
  margin-bottom: 6px;
  font-size: 0.82rem;
  font-weight: 650;
}

.works-page .lead-form fieldset {
  border: 0;
  padding: 0;
}

.works-page .lead-form .cta {
  appearance: none;
  border: 0;
  cursor: pointer;
  margin-top: 4px;
}

.works-page .lead-form .cta:disabled {
  opacity: 0.65;
  cursor: wait;
}

.works-page .form-error {
  margin: 0 0 10px;
  color: #b42318;
  font-size: 0.86rem;
}

.works-page .hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.works-page .thanks-card h3 {
  margin: 0 0 12px;
  font-size: clamp(1.45rem, 2.6vw, 1.85rem);
  font-weight: 750;
  letter-spacing: -0.03em;
  line-height: 1.3;
}

.works-page .thanks-card .thanks-body {
  margin: 0 0 16px;
  color: var(--text);
  font-size: 1.05rem;
  line-height: 1.7;
}

.works-page .thanks-card .thanks-tip {
  margin: 0;
  padding: 14px 16px;
  border-radius: 14px;
  background: color-mix(in srgb, var(--accent-soft) 70%, var(--panel));
  border: 1px solid color-mix(in srgb, var(--accent) 22%, var(--line));
  color: var(--text);
  font-size: 1.02rem;
  font-weight: 600;
  line-height: 1.65;
}

.works-page .thanks-card.is-shown .thanks-tip {
  animation: thanks-tip-in 0.5s ease 0.42s both;
}

@keyframes thanks-in {
  from {
    opacity: 0;
    transform: translateY(18px) scale(0.985);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes thanks-mark-pop {
  from {
    opacity: 0;
    transform: scale(0.55);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes thanks-check {
  from {
    opacity: 0;
    transform: rotate(45deg) scale(0.4);
  }
  to {
    opacity: 1;
    transform: rotate(45deg) scale(1);
  }
}

@keyframes thanks-tip-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .works-page .thanks-card.is-shown,
  .works-page .thanks-card.is-shown .thanks-mark,
  .works-page .thanks-card.is-shown .thanks-mark::after,
  .works-page .thanks-card.is-shown .thanks-tip {
    animation: none;
  }
}

@media (max-width: 900px) {
  .w-hero,
  .w-split,
  .w-principle-list {
    grid-template-columns: 1fr;
  }

  .w-hero-visual {
    order: -1;
    max-width: 520px;
    margin: 0 auto;
  }

  .w-services,
  .w-plans {
    grid-template-columns: 1fr 1fr;
  }

  .w-stats {
    grid-template-columns: 1fr;
  }

  .w-steps {
    grid-template-columns: 1fr 1fr;
  }

  .w-steps li:nth-child(odd) {
    border-left: 0;
  }

  .w-steps li:nth-child(n + 3) {
    border-top: 1px solid var(--line);
  }

  .w-steps li:nth-child(even) {
    border-left: 1px solid var(--line);
  }
}

@media (max-width: 640px) {
  .works-page .shell {
    width: min(1000px, calc(100% - 28px));
  }

  .w-hero {
    padding-top: 8px;
    gap: 22px;
  }

  .w-services,
  .w-plans,
  .w-steps {
    grid-template-columns: 1fr;
  }

  .w-steps li,
  .w-steps li:nth-child(even) {
    border-left: 0;
  }

  .w-steps li + li {
    border-top: 1px solid var(--line);
  }

  .works-page .form-grid {
    grid-template-columns: 1fr;
  }

  .w-card {
    padding: 20px 18px;
  }

}
