/* CCC Subzero detail stage and focused responsive repair.
   Loaded only by the Trockeneis page so the stable homepage remains untouched. */

.ccc-subzero {
  --subzero-progress: 12%;
  --subzero-scan: 12%;
  position: relative;
  overflow: hidden;
  isolation: isolate;
  background: #09090b;
  color: #f5f3ef;
}

.ccc-subzero::before {
  position: absolute;
  inset: 0;
  z-index: 4;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 48px 48px;
  content: "";
  opacity: 0.38;
  -webkit-mask-image: linear-gradient(135deg, #000, transparent 68%);
  mask-image: linear-gradient(135deg, #000, transparent 68%);
}

.ccc-subzero::after {
  position: absolute;
  right: -12%;
  bottom: -32%;
  z-index: 4;
  width: 62%;
  aspect-ratio: 1;
  border: 1px solid rgba(225, 37, 27, 0.18);
  border-radius: 50%;
  box-shadow: 0 0 0 38px rgba(225, 37, 27, 0.025), 0 0 90px rgba(225, 37, 27, 0.1);
  content: "";
  pointer-events: none;
}

.ccc-subzero__image,
.ccc-subzero__reveal,
.ccc-subzero__shade {
  position: absolute;
  inset: 0;
}

.ccc-subzero__image {
  z-index: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 52% center;
  filter: grayscale(0.68) brightness(0.48) contrast(1.12);
  transition: filter 900ms ease;
}

.ccc-subzero__reveal {
  z-index: 1;
  background:
    linear-gradient(rgba(255, 255, 255, 0.015), rgba(255, 255, 255, 0.015)),
    url("/assets/img/cinematic/ccc-trockeneis-freilegung-v1.webp") 52% center / cover no-repeat;
  clip-path: inset(0 calc(100% - var(--subzero-progress)) 0 0);
  filter: saturate(0.88) brightness(0.82) contrast(1.12);
  transition: clip-path 1.05s cubic-bezier(0.16, 1, 0.3, 1);
}

.ccc-subzero__shade {
  z-index: 2;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(5, 5, 6, 0.56), transparent 31%, transparent 53%, rgba(5, 5, 6, 0.94)),
    linear-gradient(90deg, rgba(5, 5, 6, 0.66), transparent 48%, rgba(5, 5, 6, 0.12));
}

.ccc-subzero__scan {
  position: absolute;
  z-index: 3;
  top: -8%;
  bottom: -8%;
  left: var(--subzero-scan);
  width: 1px;
  background: linear-gradient(transparent, rgba(255, 255, 255, 0.94) 36%, #e1251b 58%, transparent 88%);
  box-shadow: 0 0 18px rgba(255, 255, 255, 0.38), 0 0 42px rgba(225, 37, 27, 0.18);
  opacity: 0.78;
  transform: rotate(2deg);
  transition: left 1.05s cubic-bezier(0.16, 1, 0.3, 1), opacity 420ms ease;
}

.ccc-subzero__impact {
  position: absolute;
  z-index: 3;
  top: 34%;
  left: min(calc(var(--subzero-scan) + 2%), 82%);
  width: clamp(34px, 7vw, 76px);
  aspect-ratio: 1;
  border: 1px solid rgba(255, 255, 255, 0.48);
  border-radius: 50%;
  box-shadow: 0 0 0 8px rgba(255, 255, 255, 0.035), 0 0 30px rgba(255, 255, 255, 0.2);
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.72);
  transition: left 1.05s cubic-bezier(0.16, 1, 0.3, 1), opacity 360ms ease, transform 560ms ease;
}

.ccc-subzero__impact::after {
  position: absolute;
  inset: 28%;
  border: 1px solid rgba(255, 255, 255, 0.58);
  border-radius: inherit;
  content: "";
}

.ccc-subzero__trace,
.ccc-subzero__temperature,
.ccc-subzero__plate,
.ccc-subzero__status,
.ccc-subzero__phase {
  position: absolute;
  z-index: 6;
}

.ccc-subzero__trace {
  top: clamp(18px, 4vw, 30px);
  left: clamp(18px, 4vw, 32px);
  display: flex;
  align-items: center;
  gap: 10px;
  color: rgba(245, 243, 239, 0.72);
  font: 800 clamp(0.5rem, 1vw, 0.62rem) / 1.25 "JetBrains Mono", ui-monospace, monospace;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.ccc-subzero__trace::before {
  width: 30px;
  height: 1px;
  flex: 0 0 auto;
  background: #e1251b;
  box-shadow: 0 0 12px rgba(225, 37, 27, 0.72);
  content: "";
}

.ccc-subzero__temperature {
  top: clamp(54px, 10vw, 92px);
  right: clamp(15px, 4vw, 32px);
  color: rgba(255, 255, 255, 0.11);
  font: 900 clamp(3.8rem, 10vw, 8.4rem) / 0.8 "Archivo", sans-serif;
  letter-spacing: -0.09em;
  white-space: nowrap;
}

.ccc-subzero__status {
  top: clamp(18px, 4vw, 28px);
  right: clamp(18px, 4vw, 30px);
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 999px;
  background: rgba(7, 7, 9, 0.9);
  padding: 8px 10px;
  color: rgba(245, 243, 239, 0.76);
  font: 800 clamp(0.43rem, 0.9vw, 0.54rem) / 1 "JetBrains Mono", ui-monospace, monospace;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.ccc-subzero__status i {
  position: static;
  inset: auto;
  width: 6px;
  height: 6px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: #e1251b;
  box-shadow: 0 0 10px rgba(225, 37, 27, 0.82);
  opacity: 1;
  transform: none;
  animation: none;
}

.ccc-subzero__plate {
  right: clamp(16px, 4vw, 30px);
  bottom: clamp(18px, 4vw, 30px);
  min-width: min(42%, 240px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 14px;
  background: rgba(7, 7, 9, 0.9);
  padding: 12px 14px;
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.35);
}

.ccc-subzero__plate small,
.ccc-subzero__plate strong,
.ccc-subzero__plate em {
  position: static;
  inset: auto;
  display: block;
}

.ccc-subzero__plate small,
.ccc-subzero__plate em {
  color: rgba(245, 243, 239, 0.54);
  font: 750 clamp(0.42rem, 0.9vw, 0.54rem) / 1.35 "JetBrains Mono", ui-monospace, monospace;
  font-style: normal;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.ccc-subzero__plate strong {
  margin: 5px 0;
  color: #fff;
  font: 880 clamp(1.15rem, 3vw, 2rem) / 0.95 "Archivo", sans-serif;
  letter-spacing: -0.045em;
}

.ccc-subzero__phase {
  right: clamp(16px, 4vw, 30px);
  bottom: clamp(18px, 4vw, 30px);
  left: clamp(16px, 4vw, 30px);
  max-width: min(62%, 440px);
  border-left: 2px solid #e1251b;
  background: linear-gradient(90deg, rgba(6, 6, 8, 0.94), rgba(6, 6, 8, 0.58) 74%, transparent);
  padding: 14px 16px;
}

.ccc-subzero__phase span,
.ccc-subzero__phase strong,
.ccc-subzero__phase small {
  display: block;
}

.ccc-subzero__phase span {
  color: #ff6a61;
  font: 800 0.54rem / 1.2 "JetBrains Mono", ui-monospace, monospace;
  letter-spacing: 0.14em;
}

.ccc-subzero__phase strong {
  margin-top: 6px;
  color: #fff;
  font: 850 clamp(1.18rem, 3.3vw, 2.25rem) / 0.95 "Archivo", sans-serif;
  letter-spacing: -0.045em;
}

.ccc-subzero__phase small {
  max-width: 45ch;
  margin-top: 6px;
  color: rgba(245, 243, 239, 0.68);
  font-size: clamp(0.58rem, 1.1vw, 0.7rem);
  line-height: 1.4;
}

.dryice-tech__story {
  grid-template-columns: minmax(0, 1.38fr) minmax(300px, 0.62fr);
  gap: clamp(24px, 4vw, 58px);
}

.dryice-tech__visual-shell {
  min-width: 0;
}

.dryice-tech__visual.ccc-subzero {
  position: relative;
  top: auto;
  min-height: 0;
  aspect-ratio: 16 / 10;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 24px;
  background: #09090b;
  box-shadow: 0 34px 86px rgba(0, 0, 0, 0.46), 0 0 0 1px rgba(255, 255, 255, 0.035);
}

.dryice-tech[data-phase="0"] .ccc-subzero { --subzero-progress: 12%; --subzero-scan: 12%; }
.dryice-tech[data-phase="1"] .ccc-subzero { --subzero-progress: 34%; --subzero-scan: 34%; }
.dryice-tech[data-phase="2"] .ccc-subzero { --subzero-progress: 66%; --subzero-scan: 66%; }
.dryice-tech[data-phase="3"] .ccc-subzero { --subzero-progress: 90%; --subzero-scan: 90%; }

.dryice-tech[data-phase="1"] .ccc-subzero__impact,
.dryice-tech[data-phase="2"] .ccc-subzero__impact {
  opacity: 0.72;
  transform: translate(-50%, -50%) scale(1);
}

.dryice-tech[data-phase="3"] .ccc-subzero__scan {
  opacity: 0.24;
}

.dryice-tech[data-phase="3"] .ccc-subzero__image {
  filter: grayscale(0.46) brightness(0.55) contrast(1.11);
}

.dryice-tech__replay {
  display: flex;
  width: 100%;
  min-height: 44px;
  margin-top: 12px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.035);
  padding: 10px 14px;
  color: rgba(245, 243, 239, 0.76);
  font: 800 0.58rem / 1.2 "JetBrains Mono", ui-monospace, monospace;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  cursor: pointer;
  transition: border-color 220ms ease, color 220ms ease, background 220ms ease;
}

.dryice-tech__replay[hidden] {
  display: none;
}

.dryice-tech__replay:hover,
.dryice-tech__replay:focus-visible {
  border-color: rgba(225, 37, 27, 0.68);
  background: rgba(225, 37, 27, 0.08);
  color: #fff;
}

.dryice-tech__replay b {
  color: #ff6a61;
  font-size: 1rem;
}

.dryice-tech__steps {
  grid-auto-flow: row;
  grid-auto-columns: auto;
  grid-template-columns: 1fr;
  gap: 10px;
  overflow: visible;
  scroll-snap-type: none;
}

.dryice-tech__steps li {
  min-height: 0;
}

.dryice-tech__steps button {
  position: relative;
  height: 100%;
  min-height: 126px;
  overflow: hidden;
  padding: 18px 18px 18px 22px;
  opacity: 0.88;
  transform: none;
}

.dryice-tech__steps button::before {
  position: absolute;
  top: 14px;
  bottom: 14px;
  left: 0;
  width: 2px;
  background: rgba(255, 255, 255, 0.12);
  content: "";
  transition: background 240ms ease, box-shadow 240ms ease;
}

.dryice-tech__steps button[aria-current="step"]::before {
  background: #e1251b;
  box-shadow: 0 0 15px rgba(225, 37, 27, 0.7);
}

.dryice-tech__steps small {
  font-size: 0.78rem;
  line-height: 1.48;
}

.dryice-tech__telemetry {
  z-index: 6;
  top: clamp(58px, 10vw, 92px);
  right: clamp(18px, 4vw, 30px);
  bottom: auto;
  left: clamp(18px, 4vw, 30px);
  max-width: 250px;
}

/* Make the original hero reveal geometrically crisp and finite. */
.dryice-hero__media > img {
  transform: none;
}

.dryice-hero__clean {
  animation-iteration-count: 1;
  animation-fill-mode: both;
}

.dryice-hero__scan {
  animation-iteration-count: 1;
  animation-fill-mode: both;
}

@media (max-width: 919px) {
  .dryice-tech__story {
    grid-template-columns: 1fr;
  }

  .dryice-tech__steps {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* On compact desktop and tablet stages the result panel owns the lower edge.
   The machine plate is redundant there and must not compete with the phase copy. */
@media (max-width: 1199px) {
  .ccc-subzero--story .ccc-subzero__plate {
    display: none;
  }
}

/* The legacy 768px rules switched to a five-column process before there was
   enough room and gave the one-column cabin visual a circular 100% height.
   Keep a deliberate tablet composition until the real desktop grid begins. */
@media (min-width: 768px) and (max-width: 1099px) {
  .process-track {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    border-left: 1px solid var(--ice-line-dark);
  }

  .process-track li {
    grid-template-columns: 42px minmax(0, 1fr);
    gap: 14px;
    min-height: 0;
    padding: 24px 20px;
    border-right: 1px solid var(--ice-line-dark);
  }

  .process-track li:last-child {
    grid-column: 1 / -1;
  }

  .process-track h3 {
    font-size: clamp(1.45rem, 3.4vw, 2rem);
  }

  .process-track small {
    font-size: 0.6rem;
  }

  .dryice-interior__visual {
    min-height: clamp(420px, 60vw, 560px);
  }

  .dryice-interior__limits {
    grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
  }

  .dryice-interior__limits h3 {
    font-size: clamp(2rem, 4.6vw, 2.75rem);
  }
}

@media (max-width: 767px) {
  .dryice-header__inner {
    grid-template-areas:
      "brand cta"
      "nav nav";
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 6px 10px;
    min-height: 0;
    padding-block: 8px;
  }

  .dryice-header .brand {
    grid-area: brand;
  }

  .dryice-nav {
    grid-area: nav;
    justify-content: space-between;
    gap: 3px;
    overflow-x: auto;
    padding-bottom: 0;
  }

  .dryice-nav a {
    min-height: 44px;
    padding: 9px 8px;
    font-size: 0.66rem;
  }

  .header-cta {
    grid-area: cta;
    min-height: 44px;
    padding: 9px 12px;
    font-size: 0.64rem;
    white-space: nowrap;
  }

  .dryice-tech {
    scroll-margin-top: 122px;
  }

  .dryice-hero {
    min-height: 0;
  }

  .dryice-hero__content {
    padding-block: clamp(165px, 22svh, 205px) 52px;
  }

  .dryice-hero h1 {
    max-width: 12ch;
    font-size: clamp(2.5rem, 11.8vw, 3.25rem);
    letter-spacing: -0.052em;
  }

  .dryice-hero__lead {
    margin-top: 18px;
    font-size: 0.96rem;
    line-height: 1.58;
  }

  .dryice-actions {
    margin-top: 22px;
  }

  .dryice-hero__media > img,
  .dryice-hero__clean {
    object-position: 62% center;
    background-position: 62% center;
  }

  .dryice-tech__head h2 {
    font-size: clamp(2.3rem, 10.6vw, 3.2rem);
    line-height: 0.92;
  }

  .ccc-subzero__image,
  .ccc-subzero__reveal {
    object-position: 60% center;
    background-position: 60% center;
  }

  .ccc-subzero__temperature {
    top: 82px;
    font-size: clamp(3rem, 17vw, 5rem);
  }

  .ccc-subzero__trace {
    top: 17px;
    right: 14px;
    left: 14px;
    max-width: 58%;
    gap: 7px;
    font-size: 0.43rem;
    letter-spacing: 0.1em;
  }

  .ccc-subzero__trace::before {
    width: 18px;
  }

  .ccc-subzero__status {
    top: 48px;
    right: 14px;
    padding: 7px 8px;
    font-size: 0.42rem;
  }

  .ccc-subzero--story .ccc-subzero__plate {
    display: none;
  }

  .dryice-tech__visual.ccc-subzero {
    min-height: 0;
    aspect-ratio: 4 / 5;
    border-radius: 18px;
  }

  .ccc-subzero__phase {
    right: 14px;
    bottom: 16px;
    left: 14px;
    max-width: none;
    padding: 12px 13px;
  }

  .ccc-subzero__phase strong {
    font-size: clamp(1.25rem, 7vw, 1.8rem);
  }

  .dryice-tech__telemetry {
    display: none;
  }

  .dryice-tech__steps {
    grid-auto-flow: row;
    grid-auto-columns: auto;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    padding: 0;
    overflow: visible;
    scroll-snap-type: none;
  }

  .dryice-tech__steps button {
    min-height: 158px;
    padding: 16px 13px 16px 16px;
  }

  .dryice-tech__steps strong {
    font-size: clamp(1rem, 5vw, 1.18rem);
  }

  .dryice-tech__steps small {
    font-size: 0.73rem;
    line-height: 1.42;
  }
}

@media (max-width: 479px) {
  .dryice-tech__steps {
    grid-template-columns: 1fr;
  }

  .dryice-tech__steps button {
    min-height: 0;
  }
}

@media (max-width: 360px) {
  .dryice-header__inner {
    width: min(100% - 20px, 1320px);
  }

  .dryice-header .brand {
    gap: 7px;
  }

  .dryice-header .brand img {
    width: 38px;
    height: 38px;
  }

  .dryice-header .brand strong {
    font-size: 0.76rem;
  }

  .dryice-header .brand small {
    display: none;
  }

  .header-cta {
    padding-inline: 9px;
    font-size: 0.59rem;
  }

  .dryice-nav a {
    min-height: 44px;
    padding-inline: 5px;
    font-size: 0.62rem;
  }
}

.dryice-tech[data-motion="static"] .ccc-subzero__image,
.dryice-tech[data-motion="static"] .ccc-subzero__reveal,
.dryice-tech[data-motion="static"] .ccc-subzero__scan,
.dryice-tech[data-motion="static"] .ccc-subzero__impact,
html.ccc-detailing-static .ccc-subzero__image,
html.ccc-detailing-static .ccc-subzero__reveal,
html.ccc-detailing-static .ccc-subzero__scan,
html.ccc-detailing-static .ccc-subzero__impact {
  animation: none !important;
  transition: none !important;
}

.dryice-tech[data-motion="static"] .dryice-tech__replay,
html.ccc-detailing-static .dryice-tech__replay {
  display: none;
}

.dryice-tech[data-motion="static"] .ccc-subzero__reveal,
html.ccc-detailing-static .ccc-subzero__reveal {
  clip-path: inset(0 10% 0 0);
}

.dryice-tech[data-motion="static"] .ccc-subzero__scan,
html.ccc-detailing-static .ccc-subzero__scan {
  left: 90%;
  opacity: 0.22;
}

.dryice-tech[data-motion="static"] .ccc-subzero__image,
html.ccc-detailing-static .ccc-subzero__image {
  filter: grayscale(0.46) brightness(0.55) contrast(1.11);
}

.dryice-tech[data-motion="static"] .ccc-subzero__impact,
html.ccc-detailing-static .ccc-subzero__impact {
  opacity: 0;
}

.dryice-tech[data-inview="false"] .ccc-subzero__impact {
  animation-play-state: paused;
}

@media (prefers-reduced-motion: reduce) {
  .ccc-subzero__image,
  .ccc-subzero__reveal,
  .ccc-subzero__scan,
  .ccc-subzero__impact,
  .dryice-hero__clean,
  .dryice-hero__scan {
    animation: none !important;
    transition: none !important;
  }
}

@media print {
  .ccc-subzero__scan,
  .ccc-subzero__impact,
  .dryice-tech__replay {
    display: none;
  }
}
