/* ===============================
   RESET
================================= */

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
}

/* ===============================
   VARIABLES
================================= */

:root {
  --max-width: 1600px;
  --content-width: 1200px;

  --space-xl: 5rem;
  --space-lg: 3.5rem;
  --space-md: 2rem;
  --space-sm: 1rem;

  --grid-gap: 1.25rem;

  --color-text: #1a1a1a;
  --color-muted: #6f6f6f;
  --color-light: #eaeaea;
  --color-border: #e5e5e5;
  --color-nav: #555;
  --color-logo: #7a8376;
  --color-slider: #6e6e6e;
}

/* ===============================
   BASE
================================= */

body {
  font-family: "Helvetica Neue", sans-serif;
  color: var(--color-text);
  line-height: 1.6;
  background: #fff;
}

img {
  display: block;
  width: 100%;
}

/* ===============================
   LAYOUT
================================= */

.section {
  padding: var(--space-xl) 0;
  border-bottom: 1px solid var(--color-light);
}

.section:last-of-type {
  border-bottom: none;
}

.section--hero {
  padding-top: 0;
}

.container {
  width: 90%;
  max-width: var(--max-width);
  margin: 0 auto;
}

/* ===============================
   HEADER
================================= */

.site-header {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 10;
  width: 100%;
  background: linear-gradient(
    to right,
    rgba(255, 255, 255, 1) 0%,
    rgba(255, 255, 255, 0.95) 20%,
    rgba(255, 255, 255, 0.75) 35%,
    rgba(255, 255, 255, 0.4) 55%,
    rgba(255, 255, 255, 0) 100%
  );
}

.site-header::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 1px;
  background: rgba(0, 0, 0, 0.05);
}

.nav-primary {
  border-bottom: 1px solid var(--color-border);
}

.nav-primary__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 1.25rem var(--space-md);
}

/* Logo */

.logo {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  line-height: 1;
}

.logo__title-img {
  width: 180px;
  height: auto;
}

.logo__sub-img {
  width: 270px;
  height: auto;
  margin-top: 0.9rem;
}

/* Nav links */

.nav-links {
  display: flex;
  align-items: center;
}

.nav-links a {
  margin-left: 2rem;
  font-size: 0.95rem;
  color: var(--color-nav);
  text-decoration: none;
}

/* Hamburger button */

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  padding: 0;
  border: none;
  background: transparent;
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  margin: 5px auto;
  background: var(--color-nav);
  transition:
    transform 0.25s ease,
    opacity 0.25s ease;
}

/* ===============================
   HERO
================================= */

.hero {
  position: relative;
  width: 100%;
  max-width: 1920px;
  margin: 0 auto;
}

.hero__overlay-wrapper {
  position: absolute;
  bottom: 2rem;
  left: 0;
  width: 100%;
}

.hero__overlay {
  max-width: 590px;
  padding: 1rem 1.5rem;
  background: rgba(255, 255, 255, 0.9);
}

.hero__overlay h1 {
  margin-bottom: 0.5rem;
  font-size: 1.2rem;
}

.hero__overlay p {
  font-size: 0.85rem;
  color: var(--color-muted);
}

/* ===============================
   TYPOGRAPHY
================================= */

h2 {
  margin-bottom: 0.75rem;
  font-size: 1.2rem;
  font-weight: 500;
}

.section-title {
  margin-bottom: var(--space-md);
  font-size: 1rem;
  font-weight: 600;
}

.text-block p {
  font-size: 0.9rem;
  line-height: 1.5;
  color: var(--color-muted);
}

.meta {
  padding-top: var(--space-md);
}

/* ===============================
   GRID
================================= */

.grid {
  display: grid;
  gap: var(--grid-gap);
}

.grid--2col {
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-md);
}

.grid--3col {
  grid-template-columns: repeat(3, 1fr);
}

.grid--asym {
  grid-template-columns: 1fr 1fr 1fr;
  row-gap: var(--grid-gap);
  column-gap: var(--grid-gap);
  align-items: stretch;
}

/* ===============================
   FINAL SECTION
================================= */

.section--closing .container {
  max-width: 600px;
}

/* ===============================
   COMPONENTS
================================= */

.text-block {
  margin: auto 0;
}

/* ===============================
   FEATURE GRID LAYOUT
================================= */

.layout--feature-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-md) var(--grid-gap);
  align-items: start;
}

/* Text block becomes the first grid item */
.layout--feature-grid > .text-block {
  width: 100%;
  margin: auto 0;
}

/* Override the default 2-column text-block behavior inside this layout */
.layout--feature-grid > .text-block.grid--2col {
  display: block;
  width: 100%;
}

/* Let the 3 image blocks participate in the parent 2-column grid */
.layout--feature-grid > .grid--3col {
  display: contents;
}

/* Keep the desktop slider visually contained */
.layout--feature-grid .compare-control {
  max-width: 65%;
  margin-left: 0;
  margin-right: 0;
}

/* ===============================
   COMPARE
================================= */

.compare-images {
  position: relative;
}

.compare-img {
  display: block;
  width: 100%;
}

.compare-img--after {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

/* Desktop compare control */

.compare-control {
  max-width: 98%;
  margin: 1.5rem auto 0;
}

.grid--2col .compare-control {
  max-width: 520px;
  margin: 1.5rem 0 0;
}

.compare-control__track {
  position: relative;
  height: 10px;
  background: var(--color-border);
  border-radius: 999px;
}

.compare-control__fill {
  position: absolute;
  width: 100%;
  height: 100%;
  background: var(--color-slider);
  border-radius: 999px;
}

.compare-control__handle {
  --slider-percent: 100;
  position: absolute;
  top: 50%;
  left: calc(var(--slider-percent) * 1%);
  width: 20px;
  height: 20px;
  background: var(--color-slider);
  border-radius: 50%;
  cursor: grab;
  transform: translate(calc(var(--slider-percent) * -1%), -50%);
}

.compare-control__labels {
  display: flex;
  justify-content: space-between;
  margin-top: 0.5rem;
  font-size: 0.75rem;
  color: #888;
}

.compare-control__labels span {
  font-weight: 600;
  color: var(--color-nav);
}

.compare-control__labels span.is-dimmed,
.label-edited {
  color: #c4c4c4;
}

.label-original {
  color: var(--color-text);
}

/* Mobile compare slider hidden by default */

.compare-slider {
  display: none;
}

/* Prevent text/image highlighting while using sliders */

.compare-control,
.compare-control *,
.compare-slider,
.compare-slider * {
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
}

.compare-control__track,
.compare-control__handle,
.compare-slider__track,
.compare-slider__handle,
.handle {
  touch-action: none;
}

body.is-slider-dragging,
body.is-slider-dragging * {
  user-select: none;
  -webkit-user-select: none;
}

body.is-slider-dragging {
  cursor: grabbing;
}

/* ===============================
   FULL MEDIA LAYOUT
================================= */

.layout--full-media {
  display: grid;
  gap: var(--space-md);
}

/* Desktop/tablet default: text uses a 3-column rhythm */
.layout--full-media > .text-block.grid--2col {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--grid-gap);
  width: 100%;
  margin: 0;
}

/* Place text block in the right column */
.layout--full-media > .text-block .left-col {
  grid-column: 1 / span 1;
}

/* ===============================
   FOOTER
================================= */

.site-footer {
  padding: 2rem 0;
  border: none;
  text-align: center;
}

.site-footer p {
  font-size: 0.85rem;
  color: var(--color-muted);
}

/* ===============================
   SCROLL REVEAL ANIMATION
================================= */

.js-scroll-animations .section:not(.section--hero) {
  opacity: 0;
  transform: translateY(36px);
  transition:
    opacity 0.7s ease,
    transform 0.7s ease;
}

.js-scroll-animations .section:not(.section--hero).is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ===============================
   RESPONSIVE
================================= */

/* Large desktop: text row and images share the same 3-column rhythm */
@media (min-width: 1281px) {
  .layout--feature-grid {
    grid-template-columns: 1fr;
  }

  .layout--feature-grid > .text-block.grid--2col {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: var(--grid-gap);
    width: 100%;
    margin-bottom: var(--space-md);
  }

  .layout--feature-grid > .text-block .left-col {
    grid-column: 1 / span 1;
  }

  .layout--feature-grid > .grid--3col {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: var(--grid-gap);
  }

  .layout--feature-grid .compare-control {
    max-width: 100%;
  }

  .layout--full-media {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    column-gap: var(--grid-gap);
    row-gap: var(--space-md);
    align-items: center;
  }

  .layout--full-media > .compare-images {
    grid-column: 1 / span 2;
    grid-row: 1;
    width: 100%;
  }

  .layout--full-media > .text-block.grid--2col {
    display: block;
    grid-column: 3 / span 1;
    grid-row: 1;
    width: 100%;
    margin: 0;
  }

  .layout--full-media > .text-block .left-col {
    grid-column: auto;
  }
}

@media (min-width: 769px) {
  .mobileonly {
    display: none;
  }
}

@media (max-width: 768px) {
  .section {
    padding: var(--space-lg) 0;
  }

  .section--hero {
    padding-top: 0;
  }

  .site-header {
    position: relative;
    top: auto;
    left: auto;
    z-index: auto;
    width: 100%;
    background: #fff;
  }

  .site-header::after {
    display: none;
  }

  .nav-primary__inner {
    flex-wrap: wrap;
    padding: 1rem var(--space-sm);
  }

.logo__title-img {
}

.logo__sub-img {
  margin-top: 0.65rem;
}

  .nav-toggle {
    display: block;
  }

  .nav-toggle.is-open span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
  }

  .nav-toggle.is-open span:nth-child(2) {
    opacity: 0;
  }

  .nav-toggle.is-open span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
  }

  .nav-links {
    display: none;
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--color-border);
  }

  .nav-links.is-open {
    display: flex;
  }

  .nav-links a {
    margin-left: 0;
    padding: 0.85rem 0;
    border-bottom: 1px solid #f1f1f1;
    font-size: 0.95rem;
  }
  
.layout--feature-grid {
    grid-template-columns: 1fr;
  }

  .layout--feature-grid > .grid--3col {
    display: grid;
    grid-template-columns: 1fr;
  }

  .layout--feature-grid .compare-control {
    max-width: 100%;
  }

  .grid--2col,
  .grid--asym {
    grid-template-columns: 1fr;
  }

  .hero__overlay-wrapper {
    position: static;
    margin-top: 1rem;
  }

  .desktop-break {
    display: none;
  }

  .compare-images {
    order: 2;
  }

  .compare-control {
    display: none;
  }

  .compare-slider {
    position: absolute;
    bottom: 20px;
    left: 5%;
    z-index: 10;
    display: grid;
    grid-template-columns: 0.5fr 1fr 0.5fr;
    align-items: center;
    width: 90%;
    height: 30px;
    background: rgba(59, 59, 59, 0.4);
    border-radius: 999px;
  }

  .compare-slider p {
    margin: auto;
    color: #fff;
  }

  .compare-slider__track {
    position: relative;
    height: 10px;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 999px;
  }

  .compare-slider__fill {
    position: absolute;
    width: 100%;
    height: 100%;
    background: #fff;
    border-radius: 999px;
  }

  /* Mobile handle hit area */
  .compare-slider__handle {
    --slider-percent: 100;
    position: absolute;
    top: 50%;
    left: calc(var(--slider-percent) * 1%);
    transform: translate(calc(var(--slider-percent) * -1%), -50%);
  }

  /* Visible mobile circle */
  .handle {
    width: 20px;
    height: 20px;
    background: #fff;
    border-radius: 50%;
  }
  
  .layout--full-media > .text-block.grid--2col {
    grid-template-columns: 1fr;
  }

  .layout--full-media > .text-block .left-col {
    grid-column: auto;
  }
  
}

@media (prefers-reduced-motion: reduce) {
  .nav-toggle span,
  .compare-img--after,
  .js-scroll-animations .section:not(.section--hero) {
    transition: none;
  }

  .js-scroll-animations .section:not(.section--hero) {
    opacity: 1;
    transform: none;
  }
}