:root {
  --hs-bg: #070b10;
  --hs-bg-deep: #04070a;
  --hs-surface: #0d141b;
  --hs-surface-2: #111a23;
  --hs-line: #293640;
  --hs-line-soft: #1b252e;
  --hs-text: #f3f7f8;
  --hs-muted: #aeb9c2;
  --hs-accent: #c1f36d;
  --hs-accent-ink: #172009;
  --hs-error: #ffaaa3;
  --hs-page: min(1360px, calc(100vw - 48px));
  --hs-radius: 14px;
  --hs-ease: cubic-bezier(.16, 1, .3, 1);
}

#main-content:has(.head-swap-page) {
  padding: 0;
  max-width: none;
}

.head-swap-page,
.head-swap-page * {
  box-sizing: border-box;
}

.head-swap-page {
  min-width: 320px;
  overflow: clip;
  color: var(--hs-text);
  background: var(--hs-bg);
  font-family: "Avenir Next", Inter, system-ui, sans-serif;
}

.head-swap-page img { display: block; max-width: 100%; }
.head-swap-page :focus-visible { outline: 3px solid var(--hs-accent); outline-offset: 3px; }
.head-swap-page a { text-underline-offset: 4px; }
.hs-wrap { width: var(--hs-page); margin-inline: auto; }

.head-swap-hero {
  min-height: min(920px, calc(100svh - 64px));
  position: relative;
  display: grid;
  align-items: end;
  padding: clamp(72px, 9vw, 124px) 24px;
  overflow: hidden;
  background-image:
    linear-gradient(90deg, rgba(4,7,10,.96) 0%, rgba(4,7,10,.75) 38%, rgba(4,7,10,.16) 76%),
    linear-gradient(0deg, rgba(4,7,10,.82), transparent 43%),
    url("../images/head-swap-design-b/head-swap-red-triptych-v1.webp");
  background-size: cover;
  background-position: center 34%;
}

.head-swap-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(120deg, rgba(193,243,109,.055), transparent 30%);
}

.head-swap-hero > div { width: var(--hs-page); position: relative; z-index: 1; }
.head-swap-hero > div > div {
  width: min(760px, 62vw) !important;
  margin-inline: 0 !important;
  text-align: start !important;
}
.head-swap-hero h1 {
  max-width: 760px !important;
  margin-top: 20px;
  font-size: clamp(48px, 5.6vw, 82px) !important;
  line-height: .96;
  letter-spacing: -.061em;
  overflow-wrap: normal !important;
}
.head-swap-hero h1 + p {
  max-width: 610px !important;
  margin-top: 24px;
  color: #d8dfe4 !important;
  font-size: clamp(17px, 1.45vw, 20px) !important;
  line-height: 1.52;
  overflow-wrap: normal !important;
}
.head-swap-hero .inline-flex:first-child {
  justify-content: flex-start;
  border: 0;
  background: transparent;
  padding: 0;
  color: var(--hs-accent) !important;
  letter-spacing: .15em;
}
.head-swap-hero .mx-auto > .rounded-2xl { display: none; }
.head-swap-hero .mx-auto > .mt-8.flex { justify-content: flex-start; }
.head-swap-hero .mx-auto > .mt-8.flex a {
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--hs-line);
  border-radius: 11px;
  background: rgba(7,11,16,.7) !important;
  color: var(--hs-text);
  box-shadow: none;
}
.head-swap-hero .mx-auto > .mt-8.flex a:first-child {
  border-color: var(--hs-accent);
  background: var(--hs-accent) !important;
  color: var(--hs-accent-ink);
}
.head-swap-hero .mx-auto > .mt-5 { color: #c8d0d6 !important; text-align: start; }
.head-swap-hero .mx-auto > .mt-5 a {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  color: var(--hs-accent) !important;
}

.hs-tool-dock {
  width: var(--hs-page);
  position: relative;
  z-index: 3;
  margin: -38px auto 0;
}
.hs-tool-shell {
  overflow: hidden;
  border: 1px solid var(--hs-line);
  border-radius: var(--hs-radius);
  background: var(--hs-surface);
  box-shadow: 0 30px 90px rgba(0,0,0,.4);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
.hs-tool-bar {
  min-height: 76px;
  padding: 14px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  border-bottom: 1px solid var(--hs-line-soft);
}
.hs-tool-bar h2 { margin: 0; font-size: 20px; font-weight: 700; letter-spacing: -.025em; }
.hs-tool-bar p { margin: 6px 0 0; color: #c6cfd5; font-size: 15px; line-height: 1.45; }
.hs-tool-actions { display: flex; gap: 8px; }
.hs-tool-mini {
  min-height: 44px;
  padding: 0 13px;
  border: 1px solid #3a4854;
  border-radius: 9px;
  background: transparent;
  color: #f0f4f6;
  font-size: 14px;
  font-weight: 650;
  cursor: pointer;
}

.head-swap-page > section:not(.head-swap-hero, .hs-tool-dock, .hs-examples) li a {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}
.hs-tool-mini:hover { border-color: #687986; background: rgba(255,255,255,.04); }
.hs-tool-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 1.15fr);
  gap: 18px;
  padding: 18px;
}
.hs-tool-inputs { min-width: 0; }
.hs-tool-fields { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 12px; }
.hs-field { min-width: 0; }
.hs-field-heading { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.hs-field-heading label { color: #f4f7f8; font-size: 15px; font-weight: 700; }
.hs-field-heading span {
  min-width: 26px;
  height: 26px;
  display: inline-grid;
  place-items: center;
  border-radius: 50%;
  background: var(--hs-accent);
  color: var(--hs-accent-ink);
  font-size: 12px;
  font-weight: 750;
}
.hs-field > p { min-height: 42px; margin: 8px 0 11px; color: #c6cfd5; font-size: 14px; line-height: 1.5; }
.hs-upload-zone {
  min-height: 210px;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: flex-end;
  border: 1px dashed #53616c;
  border-radius: 12px;
  background-color: var(--hs-surface-2);
  background-repeat: no-repeat;
  background-position: center 22%;
  background-size: cover;
  cursor: pointer;
  isolation: isolate;
}
.hs-target-zone { background-image: linear-gradient(0deg, rgba(4,8,12,.88), transparent 58%), url("../images/head-swap-design-b/head-swap-target-v1.webp"); background-position: center 20%; }
.hs-source-zone { background-image: linear-gradient(0deg, rgba(4,8,12,.88), transparent 58%), url("../images/head-swap-design-b/head-swap-source-v1.webp"); background-position: center 25%; }
.hs-upload-zone:hover { border-color: var(--hs-accent); }
.hs-upload-zone input { position: absolute; inset: 0; z-index: 4; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.hs-upload-zone img { width: 100%; height: 100%; position: absolute; inset: 0; z-index: 1; object-fit: cover; object-position: center 22%; }
.hs-source-zone img { object-position: center 25%; }
.hs-upload-zone::after { content: ""; position: absolute; inset: 45% 0 0; z-index: 2; background: linear-gradient(to top, rgba(4,8,12,.95), transparent); }
.hs-upload-zone > span { position: relative; z-index: 3; width: 100%; padding: 14px; color: var(--hs-text); font-size: 14px; font-weight: 700; }
.hs-consent { margin-top: 14px; display: flex; align-items: flex-start; gap: 10px; color: #d3dae0; font-size: 15px; line-height: 1.5; cursor: pointer; }
.hs-consent input { width: 20px; height: 20px; margin: 0; flex: 0 0 auto; accent-color: var(--hs-accent); }
.hs-primary-button {
  width: 100%;
  min-height: 50px;
  margin-top: 14px;
  border: 1px solid var(--hs-accent);
  border-radius: 11px;
  background: var(--hs-accent);
  color: var(--hs-accent-ink);
  font-size: 16px;
  font-weight: 750;
  cursor: pointer;
  transition: transform .2s var(--hs-ease), background-color .2s var(--hs-ease);
}
.hs-primary-button:hover { background: #d0fa8d; transform: translateY(-1px); }
.hs-primary-button:disabled { cursor: wait; opacity: .7; transform: none; }
.hs-price-note, .hs-tool-status { margin: 10px 0 0; color: #c6cfd5; font-size: 14px; line-height: 1.5; }
.hs-tool-status { min-height: 18px; }
.hs-tool-status[data-type="error"] { color: var(--hs-error); }
.hs-tool-status[data-type="success"], .hs-tool-status[data-type="ready"] { color: #d5f6a7; }
.hs-result-field { min-width: 0; }
.hs-result-label { display: block; margin-bottom: 8px; color: #f4f7f8; font-size: 15px; font-weight: 700; }
.hs-tool-result {
  min-height: 390px;
  position: relative;
  overflow: hidden;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: #101820;
}
.hs-tool-result > img { width: 100%; height: 100%; position: absolute; inset: 0; object-fit: cover; object-position: center 20%; }
.hs-result-empty { display: flex; align-items: center; gap: 14px; color: #64737e; }
.hs-result-empty span:not(.hs-result-plus) { width: 58px; height: 58px; display: grid; place-items: center; border: 1px solid #53636f; border-radius: 50%; color: #93a2ac; font-size: 20px; font-weight: 700; }
.hs-result-plus { color: var(--hs-accent); font-size: 24px; }
.hs-result-loading { position: absolute; inset: 0; background: linear-gradient(105deg, #111921 20%, #2b3944 42%, #111921 64%); background-size: 220% 100%; animation: hs-shimmer 1.1s linear infinite; }
.hs-noscript { padding: 0 18px 18px; }
.hs-noscript a { color: var(--hs-accent); }

.hs-examples { padding: clamp(88px, 9vw, 140px) 0; background: var(--hs-bg); }
.hs-section-head { max-width: 780px; margin-bottom: 44px; }
.hs-section-head h2 { margin: 0; font-size: clamp(38px, 4.5vw, 66px); line-height: 1; letter-spacing: -.055em; }
.hs-section-head p { max-width: 650px; margin: 18px 0 0; color: var(--hs-muted); font-size: 18px; line-height: 1.55; }
.hs-story-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 20px; align-items: start; }
.hs-story-side { display: grid; gap: 20px; padding-top: 82px; }
.hs-triptych { overflow: hidden; margin: 0; border-radius: var(--hs-radius); background: var(--hs-surface); }
.hs-triptych img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; }
.hs-triptych figcaption { padding-top: 12px; display: grid; grid-template-columns: repeat(3, 1fr); color: #bac5cc; font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; font-size: 14px; font-weight: 550; }
.hs-triptych figcaption span:nth-child(2) { text-align: center; }
.hs-triptych figcaption span:last-child { text-align: end; color: var(--hs-accent); }

.head-swap-page > section:not(.head-swap-hero, .hs-tool-dock, .hs-examples) {
  padding: clamp(72px, 8vw, 118px) 24px !important;
  background: var(--hs-bg) !important;
}
.head-swap-page > section:not(.head-swap-hero, .hs-tool-dock, .hs-examples) + section:not(.hs-tool-dock, .hs-examples) {
  border-top: 1px solid var(--hs-line-soft);
}
.head-swap-page > section:not(.head-swap-hero, .hs-tool-dock, .hs-examples) > div { max-width: 1360px !important; }
.head-swap-page > section h2 { letter-spacing: -.04em; }
.head-swap-page > section:not(.head-swap-hero, .hs-tool-dock, .hs-examples) h2 { font-size: clamp(30px, 3.5vw, 52px) !important; line-height: 1.04; }
.head-swap-page > section:not(.head-swap-hero, .hs-tool-dock, .hs-examples) .grid > .rounded-2xl,
.head-swap-page > section:not(.head-swap-hero, .hs-tool-dock, .hs-examples) .grid > .rounded-xl {
  border-color: var(--hs-line) !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}
.head-swap-page > section:not(.head-swap-hero, .hs-tool-dock, .hs-examples) .grid > .rounded-2xl + .rounded-2xl,
.head-swap-page > section:not(.head-swap-hero, .hs-tool-dock, .hs-examples) .grid > .rounded-xl + .rounded-xl { border-inline-start-width: 0 !important; }
.head-swap-page table { border-collapse: collapse; }
.head-swap-page th, .head-swap-page td { border-color: var(--hs-line) !important; }
.head-swap-page details { border: 0 !important; border-bottom: 1px solid var(--hs-line) !important; border-radius: 0 !important; background: transparent !important; }
.head-swap-page details summary { min-height: 64px; display: flex; align-items: center; justify-content: space-between; gap: 20px; list-style: none; }
.head-swap-page details summary::-webkit-details-marker { display: none; }
.head-swap-page details summary::after { content: "+"; color: var(--hs-accent); font-size: 25px; font-weight: 400; }
.head-swap-page details[open] summary::after { content: "−"; }
.head-swap-page > section:last-of-type { background: var(--hs-bg-deep) !important; }

@keyframes hs-shimmer { to { background-position: -220% 0; } }
@media (prefers-reduced-motion: no-preference) {
  .head-swap-hero > div, .hs-tool-shell { animation: hs-rise .65s var(--hs-ease) both; }
  .hs-tool-shell { animation-delay: .08s; }
  @keyframes hs-rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
}
@media (prefers-reduced-motion: reduce) {
  .head-swap-page { scroll-behavior: auto; }
  .head-swap-page *, .head-swap-page *::before, .head-swap-page *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

@media (max-width: 900px) {
  .hs-tool-form { grid-template-columns: 1fr; }
  .hs-tool-result { min-height: 340px; }
  .hs-story-grid { grid-template-columns: 1fr; }
  .hs-story-side { grid-template-columns: repeat(2, minmax(0,1fr)); padding-top: 0; }
}

@media (max-width: 767px) {
  :root { --hs-page: calc(100vw - 32px); }
  .head-swap-hero {
    min-height: auto;
    padding: 54px 16px 440px;
    align-items: start;
    background-image:
      linear-gradient(0deg, rgba(4,7,10,.08) 35%, rgba(4,7,10,.96) 67%),
      url("../images/head-swap-design-b/head-swap-red-triptych-v1.webp");
    background-position: 72% bottom;
    background-size: auto 430px;
    background-repeat: no-repeat;
  }
  .head-swap-hero > div > div { width: 100% !important; }
  .head-swap-hero h1 { font-size: clamp(42px, 12vw, 58px) !important; }
  .head-swap-hero h1 + p { font-size: 16px !important; }
  .head-swap-hero .mx-auto > .mt-8.flex { display: grid; grid-template-columns: 1fr; }
  .head-swap-hero .mx-auto > .mt-8.flex a { width: 100%; }
  .hs-tool-dock { margin-top: 26px; }
  .hs-tool-bar { align-items: flex-start; }
  .hs-tool-actions { flex-wrap: wrap; justify-content: flex-end; }
  .hs-tool-form { padding: 14px; }
  .hs-tool-fields { grid-template-columns: 1fr; }
  .hs-field > p { min-height: 0; }
  .hs-upload-zone { min-height: 225px; }
  .hs-result-field { margin-top: 6px; }
  .hs-tool-result { min-height: 360px; }
  .hs-examples { padding: 82px 0; }
  .hs-section-head h2 { font-size: clamp(36px, 10.5vw, 48px); }
  .hs-section-head p { font-size: 16px; }
  .hs-story-side { grid-template-columns: 1fr; }
  .head-swap-page > section:not(.head-swap-hero, .hs-tool-dock, .hs-examples) { padding: 72px 16px !important; }
  .head-swap-page > section:not(.head-swap-hero, .hs-tool-dock, .hs-examples) .grid > .rounded-2xl + .rounded-2xl,
  .head-swap-page > section:not(.head-swap-hero, .hs-tool-dock, .hs-examples) .grid > .rounded-xl + .rounded-xl { border-inline-start-width: 1px !important; border-top-width: 0 !important; }
}

@media (max-width: 420px) {
  :root { --hs-page: calc(100vw - 24px); }
  .head-swap-hero { padding-inline: 12px; }
  .hs-tool-bar { padding-inline: 14px; gap: 10px; }
  .hs-tool-bar p { display: none; }
  .hs-tool-mini { padding-inline: 9px; }
}
