/* Home page */

/* Hero */

.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: center;
  overflow: hidden;
  background: var(--night-deep);
}

.hero-photo,
.hero-photo img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.hero-photo img { object-fit: cover; object-position: 30% 40%; }

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(16, 29, 53, 0) 25%, rgba(16, 29, 53, 0.55) 52%, rgba(16, 29, 53, 0.85) 100%),
    linear-gradient(0deg, rgba(23, 40, 70, 1) 0%, rgba(23, 40, 70, 0) 22%);
}

.hero-inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  padding-block: 8rem 6rem;
}

.hero-copy { grid-column: 6 / -1; }

.hero h1 { margin-bottom: 2rem; font-size: clamp(2.5rem, 0.9rem + 5.6vw, 6.25rem); }

.hero h1 .line { display: block; overflow: hidden; padding-bottom: 0.06em; }
.hero h1 .line > span {
  display: inline-block;
  animation: rise 1.1s cubic-bezier(0.2, 0.7, 0.1, 1) both;
}
.hero h1 .line:nth-child(2) > span { animation-delay: 0.12s; }
.hero h1 .line:nth-child(3) > span { animation-delay: 0.24s; }

.hero-lead,
.hero-actions { animation: fade 1s 0.6s ease both; }

.hero-lead { font-size: var(--step-1); line-height: 1.55; color: #dbe4f0; max-width: 26em; }

.hero-actions { display: flex; flex-wrap: wrap; gap: 0.8rem; margin-top: 2.2rem; }

@keyframes rise {
  from { transform: translateY(105%); }
  to { transform: none; }
}
@keyframes fade {
  from { opacity: 0; }
  to { opacity: 1; }
}

@media (max-width: 900px) {
  .hero { align-items: flex-end; }
  .hero-copy { grid-column: 1 / -1; }
  .hero-photo img { object-position: 22% 30%; }
  .hero::after {
    background: linear-gradient(0deg, rgba(23, 40, 70, 1) 8%, rgba(23, 40, 70, 0.8) 45%, rgba(16, 29, 53, 0.1) 75%);
  }
  .hero-inner { padding-block: 40vh 3.5rem; }
  .hero-lead { font-size: var(--step-0); }
}

/* Loudness meter */

.loud { padding-block: clamp(5rem, 10vw, 9rem) clamp(4rem, 8vw, 7rem); }

.loud-head {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem 4rem;
  align-items: end;
  margin-bottom: clamp(2.5rem, 5vw, 4.5rem);
}
.loud-head p { color: var(--mist); margin: 0; }

.meter-readout {
  display: flex;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: 1rem 3rem;
  margin-bottom: 2rem;
}

.meter-db {
  font-family: var(--display);
  font-weight: 300;
  font-size: clamp(5.5rem, 3rem + 11vw, 12rem);
  line-height: 0.82;
  letter-spacing: -0.06em;
  font-variant-numeric: tabular-nums;
  color: var(--white);
  transition: color 0.3s;
}
.meter-db .unit {
  font-size: 0.22em;
  letter-spacing: 0;
  margin-left: 0.35em;
  color: var(--mist);
}

.meter[data-zone="danger"] .meter-db { color: var(--signal); }
.meter[data-zone="calm"] .meter-db { color: var(--mist); }

.meter-info { padding-bottom: 0.4rem; }
.meter-source {
  font-family: var(--display);
  font-size: var(--step-1);
  margin: 0 0 0.3rem;
  min-height: 1.3em;
}
.meter-time { color: var(--mist); margin: 0; font-size: var(--step-1); }
.meter[data-zone="danger"] .meter-time { color: var(--signal-soft); }

.ruler {
  position: relative;
  height: 96px;
  margin-top: 1.5rem;
  touch-action: pan-y;
}

.ruler-ticks {
  position: absolute;
  inset: 0;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  padding-bottom: 28px;
}

.tick {
  position: relative;
  width: 1px;
  height: 18px;
  background: var(--line);
}
.tick.major { height: 40px; background: var(--mist); }
.tick.danger { background: rgba(239, 75, 63, 0.55); }
.tick.danger.major { background: var(--signal); }
.tick.lit { background: var(--white); }
.tick.danger.lit { background: var(--signal); }

.tick-label {
  position: absolute;
  top: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--display);
  font-size: 0.72rem;
  color: var(--mist);
  font-variant-numeric: tabular-nums;
}

.tick.limit::after {
  content: attr(data-label);
  position: absolute;
  bottom: calc(100% + 8px);
  left: 0;
  white-space: nowrap;
  font-family: var(--display);
  font-size: 0.72rem;
  color: var(--signal);
  padding-left: 6px;
  border-left: 1px solid var(--signal);
  line-height: 1;
  padding-block: 2px 14px;
}

.ruler-needle {
  position: absolute;
  top: 0;
  bottom: 22px;
  width: 3px;
  margin-left: -1px;
  background: var(--white);
  border-radius: 2px;
  pointer-events: none;
  transition: left 0.08s linear;
}
.meter[data-zone="danger"] .ruler-needle { background: var(--signal); }

.ruler input[type="range"] {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: ew-resize;
  -webkit-appearance: none;
  appearance: none;
}
.ruler input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; width: 2px; height: 96px; }
.ruler input[type="range"]::-moz-range-thumb { width: 2px; height: 96px; border: 0; }

.ruler:has(input:focus-visible) {
  outline: 2px solid var(--signal);
  outline-offset: 8px;
  border-radius: 4px;
}

.ruler-sources {
  list-style: none;
  padding: 0;
  margin: 2.2rem 0 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.ruler-sources button {
  font: inherit;
  font-family: var(--display);
  font-size: 0.8rem;
  color: var(--mist);
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.5rem 0.9rem;
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s, background-color 0.2s;
}
.ruler-sources button span { color: var(--white); opacity: 0.55; margin-left: 0.4em; font-variant-numeric: tabular-nums; }
.ruler-sources button:hover { color: var(--white); border-color: var(--mist); }
.ruler-sources button[aria-pressed="true"] { color: var(--night); background: var(--white); border-color: var(--white); }
.ruler-sources button[aria-pressed="true"] span { color: var(--night); }

.loud-note { color: var(--mist); font-size: var(--step--1); margin-top: 2.5rem; max-width: 52em; }

@media (max-width: 760px) {
  .loud-head { grid-template-columns: 1fr; }
  .tick-label:not(.keep) { display: none; }
  .tick.major { height: 30px; }
}

/* What breaks inside */

.inside { padding-block: clamp(3rem, 7vw, 6rem); }

.inside-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 2.5rem;
  align-items: center;
}

.inside-figure { grid-column: 1 / span 7; margin: 0; }
.inside-figure img { border-radius: 6px; aspect-ratio: 3 / 2; object-fit: cover; width: 100%; }
.inside-figure figcaption {
  margin-top: 0.9rem;
  font-size: var(--step--1);
  font-style: italic;
  color: var(--mist);
}

.inside-copy { grid-column: 8 / -1; }
.inside-copy h2 { margin-bottom: 1.6rem; }
.inside-copy p { color: #d5deea; }

@media (max-width: 900px) {
  .inside-grid { grid-template-columns: 1fr; }
  .inside-figure,
  .inside-copy { grid-column: 1 / -1; }
}

/* Problems */

.problems { padding-bottom: clamp(4rem, 9vw, 8rem); }

.problems-band {
  position: relative;
  min-height: min(78vh, 760px);
  display: flex;
  align-items: flex-end;
  margin: clamp(3rem, 6vw, 5rem) 0 clamp(3.5rem, 7vw, 6rem);
  overflow: hidden;
}
.problems-band img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.problems-band::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, var(--night) 0%, rgba(23, 40, 70, 0.7) 30%, rgba(23, 40, 70, 0) 65%),
              linear-gradient(180deg, var(--night) 0%, rgba(23, 40, 70, 0) 18%);
}
.problems-band .wrap { position: relative; z-index: 1; padding-bottom: 1rem; }

.band-quote {
  font-size: var(--step-2);
  font-style: italic;
  line-height: 1.35;
  max-width: 24em;
  margin: 0;
}

.problems h2 { margin-bottom: 2.5rem; }

.problem-list { margin: 0; border-top: 1px solid var(--line); }

.problem {
  display: grid;
  grid-template-columns: 5fr 7fr;
  gap: 0.8rem 3rem;
  padding-block: 2rem;
  border-bottom: 1px solid var(--line);
}
.problem dt {
  font-family: var(--display);
  font-size: var(--step-2);
  font-weight: 300;
  letter-spacing: -0.02em;
  line-height: 1.15;
}
.problem dd { margin: 0; color: #d5deea; max-width: var(--measure); }

@media (max-width: 760px) {
  .problem { grid-template-columns: 1fr; }
}

/* Care */

.care {
  background: var(--membrane);
  color: var(--membrane-ink);
  padding-block: clamp(4rem, 9vw, 8rem);
}
.care a:hover { text-decoration-color: var(--signal); }

.care-top {
  display: grid;
  grid-template-columns: 5fr 7fr;
  gap: 2.5rem 4rem;
  align-items: center;
  margin-bottom: clamp(3rem, 6vw, 5rem);
}
.care-top h2 { margin-bottom: 1.4rem; }
.care-top p { color: #44597a; font-size: var(--step-1); line-height: 1.5; }
.care-photo { border-radius: 6px; width: 100%; aspect-ratio: 16 / 10; object-fit: cover; object-position: 40% 60%; }

.habits {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 3rem 3.5rem;
}
.habits li { border-top: 2px solid var(--membrane-ink); padding-top: 1.3rem; }
.habits h3 { margin-bottom: 0.8rem; }
.habits p { font-size: 1.02rem; color: #33486a; margin: 0; }

.urgent {
  margin-top: clamp(3.5rem, 7vw, 5.5rem);
  padding: clamp(1.5rem, 3vw, 2.5rem);
  border: 2px solid var(--signal);
  border-radius: 6px;
  background: #fff;
  display: grid;
  grid-template-columns: 4fr 8fr;
  gap: 1rem 3rem;
}
.urgent h3 { font-size: var(--step-2); font-weight: 400; color: var(--signal); }
.urgent ul { margin: 0; padding-left: 1.2em; }
.urgent li { margin-bottom: 0.4rem; }
.urgent li::marker { color: var(--signal); }

@media (max-width: 1000px) {
  .habits { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 760px) {
  .care-top,
  .urgent { grid-template-columns: 1fr; }
  .care-top .care-photo { order: -1; }
  .habits { grid-template-columns: 1fr; gap: 2.2rem; }
}

/* Night / masker CTA */

.night {
  position: relative;
  min-height: min(92vh, 900px);
  display: flex;
  align-items: center;
  overflow: hidden;
  background: #0d1729;
}
.night-photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 70% 50%;
}
.night::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(13, 23, 41, 0.75) 0%, rgba(13, 23, 41, 0.35) 45%, rgba(13, 23, 41, 0) 65%);
}

.night-inner { position: relative; z-index: 1; padding-block: 6rem; }
.night-copy { max-width: 34rem; }
.night-copy h2 { margin-bottom: 1.5rem; }
.night-copy p { color: #d5deea; }

.night-features {
  list-style: none;
  padding: 0;
  margin: 1.8rem 0 2.4rem;
  color: #d5deea;
}
.night-features li {
  position: relative;
  padding-left: 1.6rem;
  margin-bottom: 0.7rem;
}
.night-features li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.62em;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--signal);
  box-shadow: 0 0 10px var(--signal);
}

@media (max-width: 760px) {
  .night { display: block; min-height: 0; }
  .night-photo { position: relative; height: 62vw; object-position: 78% 50%; }
  .night::after { display: none; }
  .night-inner { padding-block: 2.5rem 4rem; }
}
