/* Thermo theme, layered on top of bootstrap.css */

:root {
  --thermo-blue: #0072F0;
  --thermo-blue-light: #3D9BFF;   /* blue for use on dark backgrounds */
  --thermo-navy: #002D5F;
  --thermo-navy-deep: #001B3D;
  --thermo-orange: #FF7A2F;
  --thermo-orange-light: #FFB067;
  --thermo-line: rgba(0, 45, 95, 0.1);

  --bs-primary: var(--thermo-blue);
  --bs-primary-rgb: 0, 114, 240;
  --bs-primary-bg-subtle: #E6F1FE;
  --bs-primary-text-emphasis: var(--thermo-navy);
  --bs-link-color: var(--thermo-blue);
  --bs-link-color-rgb: 0, 114, 240;
  --bs-link-hover-color: var(--thermo-navy);
  --bs-link-hover-color-rgb: 0, 45, 95;
  --bs-body-font-family: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --bs-body-color: #22364D;
  --bs-heading-color: var(--thermo-navy);
}

body {
  font-family: var(--bs-body-font-family);
}

/* ---------- Typography ---------- */

h1, h2, h3, h4, h5, h6,
.display-1, .display-2, .display-3, .display-4, .display-5, .display-6 {
  letter-spacing: -0.025em;
}

.display-3, .display-4, .display-5, .display-6 {
  font-weight: 800;
}

.lead {
  font-weight: 400;
}

/* Small uppercase label above section headings */
.eyebrow {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--thermo-blue);
  margin-bottom: 0.75rem;
}

.eyebrow-heat {
  color: var(--thermo-orange);
}

.text-heat {
  color: var(--thermo-orange);
}

.text-gradient-heat {
  background: linear-gradient(90deg, var(--thermo-orange), var(--thermo-orange-light));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* Headings on dark or blue backgrounds */
.bg-navy, .bg-primary, .site-footer, .compare-table .thermo-col {
  --bs-heading-color: #fff;
}

.bg-navy {
  background-color: var(--thermo-navy);
  color: #fff;
}

/* ---------- Navbar (frosted glass) ---------- */

.navbar-glass {
  background-color: rgba(255, 255, 255, 0.4);
  -webkit-backdrop-filter: saturate(180%) blur(6px);
  backdrop-filter: saturate(180%) blur(6px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.4);
  transition: box-shadow 0.2s;
}

.navbar-glass .nav-link {
  font-weight: 500;
  color: var(--thermo-navy);
}

.navbar-glass .nav-link:hover,
.navbar-glass .nav-link.active {
  color: var(--thermo-blue);
}

/* ---------- Hero ---------- */

.hero {
  position: relative;
  overflow: hidden;
  padding: 8rem 0 5rem;
  background: #fff;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 0.9rem;
  border-radius: 50rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--thermo-navy);
  background: var(--bs-primary-bg-subtle);
}

.hero-badge i {
  color: var(--thermo-orange);
}

.hero-visual {
  border-radius: 2rem;
  padding: 1.5rem;
  background: #F5F9FE;
  border: 1px solid var(--thermo-line);
}

/* Animated cooling loop diagram */
.loop-svg {
  display: block;
  width: 100%;
  height: auto;
  max-height: 560px;
}

.loop-svg .gilet {
  fill: #fff;
  stroke: rgba(0, 45, 95, 0.35);
  stroke-width: 2;
  stroke-linejoin: round;
}

.loop-svg .gilet-detail {
  fill: none;
  stroke: rgba(0, 45, 95, 0.18);
  stroke-width: 2;
  stroke-linecap: round;
}

.loop-svg .gilet-zip {
  fill: rgba(0, 45, 95, 0.35);
}

.loop-svg .chiller {
  fill: var(--thermo-navy);
  stroke: var(--thermo-navy);
  stroke-width: 2;
}

.loop-svg .snowflake {
  stroke: var(--thermo-blue-light);
  stroke-width: 3;
  stroke-linecap: round;
}

.loop-svg .tube {
  fill: none;
  stroke-width: 8;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: 0.2;
}

.loop-svg .flow {
  fill: none;
  stroke-width: 4;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 1 15;
  animation: flow 1.2s linear infinite;
}

.loop-svg .cold { stroke: var(--thermo-blue); }
.loop-svg .warm { stroke: var(--thermo-orange); }
.loop-svg .mix { stroke: url(#waterWarming); }

.loop-svg .svg-label {
  fill: var(--thermo-navy);
  font-family: var(--bs-body-font-family);
  font-size: 15px;
  font-weight: 600;
}

.loop-svg .svg-label-light {
  fill: #fff;
}

@keyframes flow {
  to { stroke-dashoffset: -16; }
}

.legend-dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  margin-right: 0.4rem;
}

.legend-dot.cold { background: var(--thermo-blue); }
.legend-dot.warm { background: var(--thermo-orange); }

/* ---------- Problem stats ---------- */

.stat-number {
  font-size: calc(1.6rem + 1.2vw);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.1;
}

@media (min-width: 1200px) {
  .stat-number { font-size: 2.75rem; }
}

/* ---------- Comparison table ---------- */

.compare-table {
  border-collapse: separate;
  border-spacing: 0;
  min-width: 640px;
}

.compare-table > :not(caption) > * > * {
  padding: 1rem;
  border-bottom: 1px solid var(--thermo-line);
}

.compare-table thead th {
  font-weight: 700;
  color: var(--thermo-navy);
  border-bottom-width: 2px;
}

.compare-table .thermo-col {
  --bs-table-bg: var(--thermo-navy);
  --bs-table-color: #fff;
  color: #fff;
  border-bottom-color: rgba(255, 255, 255, 0.1);
}

.compare-table thead .thermo-col {
  color: #fff;
  font-size: 1.15rem;
  padding-top: 1.5rem;
  border-top-left-radius: 1.25rem;
  border-top-right-radius: 1.25rem;
}

.compare-table tbody tr:last-child .thermo-col {
  padding-bottom: 1.5rem;
  border-bottom: 0;
  border-bottom-left-radius: 1.25rem;
  border-bottom-right-radius: 1.25rem;
}

.compare-table .thermo-col .bi-check-circle-fill {
  color: var(--thermo-blue-light);
}

/* ---------- Specs strip ---------- */

.spec-strip {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  background: var(--thermo-line);
  border: 1px solid var(--thermo-line);
  border-radius: 1.5rem;
  overflow: hidden;
}

.spec-item {
  background: var(--bs-body-bg);
  padding: 2rem 1rem;
  text-align: center;
}

.spec-item:first-child {
  grid-column: span 2;
}

.spec-value {
  font-size: 2.25rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--thermo-navy);
  line-height: 1.1;
  margin: 0.5rem 0 0.25rem;
}

@media (min-width: 768px) {
  .spec-strip { grid-template-columns: repeat(5, 1fr); }
  .spec-item:first-child { grid-column: auto; }
}

/* ---------- Timeline ---------- */

.timeline {
  --dot: 28px;
  --track: #D9E3EF;
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: 1fr;
}

.timeline-step {
  position: relative;
  padding: 0 0 2.5rem calc(var(--dot) + 1.25rem);
}

/* Line to the next step */
.timeline-step::after {
  content: "";
  position: absolute;
  left: calc(var(--dot) / 2 - 2px);
  top: calc(var(--dot) + 4px);
  bottom: 4px;
  width: 4px;
  border-radius: 4px;
  background: var(--track);
}

.timeline-step:last-child::after { display: none; }
.timeline-step.done::after { background: var(--thermo-blue); }
.timeline-step.current::after {
  background: linear-gradient(180deg, var(--thermo-blue) 0 45%, var(--track) 45%);
}

.timeline-dot {
  position: absolute;
  left: 0;
  top: 0;
  width: var(--dot);
  height: var(--dot);
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #fff;
  border: 4px solid var(--track);
  color: #fff;
  font-size: 0.9rem;
}

.timeline-step.done .timeline-dot {
  background: var(--thermo-blue);
  border-color: var(--thermo-blue);
}

.timeline-step.current .timeline-dot {
  border-color: var(--thermo-blue);
  animation: pulse 2s ease-out infinite;
}

.timeline-when {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--bs-secondary-color);
  margin-bottom: 0.25rem;
}

.timeline-step.done .timeline-when,
.timeline-step.current .timeline-when {
  color: var(--thermo-blue);
}

@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(0, 114, 240, 0.45); }
  70% { box-shadow: 0 0 0 14px rgba(0, 114, 240, 0); }
  100% { box-shadow: 0 0 0 0 rgba(0, 114, 240, 0); }
}

@media (min-width: 992px) {
  .timeline { grid-template-columns: repeat(4, 1fr); }

  .timeline-step {
    padding: calc(var(--dot) + 1.25rem) 1rem 0;
    text-align: center;
  }

  .timeline-step::after {
    left: calc(50% + var(--dot) / 2 + 6px);
    right: calc(-50% + var(--dot) / 2 + 6px);
    top: calc(var(--dot) / 2 - 2px);
    bottom: auto;
    width: auto;
    height: 4px;
  }

  .timeline-step.current::after {
    background: linear-gradient(90deg, var(--thermo-blue) 0 45%, var(--track) 45%);
  }

  .timeline-dot {
    left: calc(50% - var(--dot) / 2);
  }
}

/* ---------- Waitlist ---------- */

.waitlist-panel {
  background:
    radial-gradient(60% 80% at 100% 0%, rgba(255, 255, 255, 0.14), transparent 70%),
    linear-gradient(135deg, var(--thermo-blue), var(--thermo-navy));
}

/* ---------- Forms ---------- */

.form-control, .form-select {
  border-radius: 0.9rem;
  border-color: #D3DDE9;
}

.form-control:focus, .form-select:focus {
  border-color: var(--thermo-blue);
  box-shadow: 0 0 0 0.25rem rgba(0, 114, 240, 0.18);
}

.waitlist-panel .form-control:focus,
.waitlist-panel .form-select:focus {
  border-color: #fff;
  box-shadow: 0 0 0 0.25rem rgba(255, 255, 255, 0.35);
}

.form-floating > label {
  color: #5B6B7D;
}

.form-floating > textarea.form-control {
  height: 9rem;
}

/* Success message with a check mark that draws itself */
.form-success {
  animation: pop-in 0.5s ease-out both;
}

.check-anim {
  width: 72px;
  height: 72px;
  margin-bottom: 1rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.check-anim circle {
  stroke-dasharray: 151;
  stroke-dashoffset: 151;
  animation: draw 0.6s ease-out 0.15s forwards;
}

.check-anim path {
  stroke-dasharray: 36;
  stroke-dashoffset: 36;
  animation: draw 0.4s ease-out 0.65s forwards;
}

@keyframes draw {
  to { stroke-dashoffset: 0; }
}

@keyframes pop-in {
  from { opacity: 0; transform: scale(0.96) translateY(8px); }
  to { opacity: 1; transform: none; }
}

/* ---------- Footer ---------- */

.site-footer {
  background: var(--thermo-navy);
  color: rgba(255, 255, 255, 0.75);
}

.site-footer a {
  color: rgba(255, 255, 255, 0.75);
  text-decoration: none;
}

.site-footer a:hover {
  color: #fff;
}

/* Blue logo to white on the navy footer */
.logo-white {
  filter: brightness(0) invert(1);
}

/* ---------- Hero entrance (on page load only) ---------- */

@media (prefers-reduced-motion: no-preference) {
  .hero-copy > * {
    animation: pop-in 0.7s ease-out both;
  }

  .hero-copy > :nth-child(2) { animation-delay: 0.1s; }
  .hero-copy > :nth-child(3) { animation-delay: 0.2s; }
  .hero-copy > :nth-child(4) { animation-delay: 0.3s; }
}

@media (prefers-reduced-motion: reduce) {
  .loop-svg .flow,
  .timeline-step.current .timeline-dot,
  .form-success {
    animation: none;
  }

  .check-anim circle,
  .check-anim path {
    animation: none;
    stroke-dashoffset: 0;
  }
}
