/* Dayloom website: home page. */

:root {
  --step-ink: #2b2110;
  --wave-h: clamp(110px, 16.7vw, 320px);
}

.section {
  padding: clamp(64px, 9vw, 112px) 0;
}

.section h2 {
  font-size: clamp(1.9rem, 1.2rem + 2.6vw, 2.8rem);
}

.section-intro {
  max-width: 36rem;
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 1.125rem;
}

.band {
  border-block: 1px solid var(--line);
  background: var(--bg-soft);
}

/* Hero */

.hero {
  position: relative;
  isolation: isolate;
  margin-top: calc(var(--header-h) * -1);
  padding: calc(var(--header-h) + clamp(28px, 6vw, 72px)) 0 var(--wave-h);
  background: linear-gradient(180deg, var(--hero-1) 0%, var(--hero-2) 62%, var(--bg) 100%);
  overflow: hidden;
  overflow: clip;
}

.hero-grid {
  display: grid;
  gap: 48px;
  align-items: center;
}

.hero-copy {
  max-width: 36rem;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 22px;
  padding: 7px 16px 7px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgb(255 255 255 / 0.55);
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  line-height: 1.2;
  text-transform: uppercase;
}

@media (prefers-color-scheme: dark) {
  .pill {
    background: rgb(255 255 255 / 0.06);
  }
}

.pill::before {
  content: "";
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--sun-deep);
  box-shadow: 0 0 0 4px rgb(243 173 69 / 0.25);
}

.hero h1 {
  font-size: clamp(2.7rem, 1.4rem + 5vw, 4.6rem);
  font-weight: 750;
  letter-spacing: -0.03em;
  line-height: 1.04;
}

.mark {
  padding: 0 0.1em;
  margin: 0 -0.1em;
  background: linear-gradient(transparent 60%, var(--mark) 60% 90%, transparent 90%);
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}

.lead {
  max-width: 33rem;
  margin: 24px 0 0;
  color: var(--muted);
  font-size: clamp(1.08rem, 1rem + 0.45vw, 1.26rem);
  line-height: 1.6;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 34px;
}

.hero-visual {
  --w: min(314px, calc(100vw - 72px));
  --crop: 0.74;
  position: relative;
  display: grid;
  justify-items: center;
  margin-bottom: calc(var(--wave-h) * -0.45);
}

.hero-visual::before {
  content: "";
  position: absolute;
  z-index: -1;
  top: 48%;
  left: 50%;
  width: min(125%, 640px);
  aspect-ratio: 1;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle, var(--sun-halo) 0, rgb(254 207 116 / 0) 68%);
}

.hero-visual::after {
  content: "";
  position: absolute;
  z-index: -1;
  top: 3%;
  left: 50%;
  width: clamp(220px, 30vw, 330px);
  aspect-ratio: 1;
  margin-left: clamp(-90px, -6vw, -40px);
  border-radius: 50%;
  background: linear-gradient(170deg, var(--sun-disc-1), var(--sun-disc-2));
  box-shadow: 0 0 80px 20px var(--sun-halo);
}

.hero-waves {
  position: absolute;
  z-index: -1;
  right: 0;
  bottom: -1px;
  left: 0;
  width: 100%;
  height: var(--wave-h);
}

.hero-copy > *,
.hero-visual {
  animation: rise 0.8s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}

.hero-copy > :nth-child(2) { animation-delay: 0.06s; }
.hero-copy > :nth-child(3) { animation-delay: 0.12s; }
.hero-copy > :nth-child(4) { animation-delay: 0.18s; }
.hero-visual { animation-delay: 0.14s; animation-duration: 1s; }

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
}

@media (min-width: 960px) {
  .hero-grid {
    grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr);
    gap: clamp(24px, 4vw, 64px);
  }

  .hero-visual {
    justify-items: end;
    padding-right: clamp(0px, 3vw, 40px);
  }
}

/*
  iPhone frame around the real screenshots. It is drawn in points (a 424 x 896
  body around a 402 x 874 screen) and scaled with --u, so a phone is sized by
  setting --w, its width, wherever it is used.
*/

.device {
  --u: calc(var(--w, 300px) / 424);
  --shade: rgb(120 70 20 / 0.28);
  --shade-soft: rgb(120 70 20 / 0.16);
  position: relative;
  width: var(--w, 300px);
  aspect-ratio: 424 / 896;
  border-radius: calc(68 * var(--u));
  background: linear-gradient(145deg, #4a4e4b, #161817 38%, #2c2f2d 100%);
  box-shadow:
    inset 0 0 0 calc(1.5 * var(--u)) rgb(255 255 255 / 0.2),
    inset 0 0 0 calc(3.5 * var(--u)) #0b0c0c;
  filter:
    drop-shadow(0 calc(51 * var(--u)) calc(49 * var(--u)) var(--shade))
    drop-shadow(0 calc(8 * var(--u)) calc(13 * var(--u)) var(--shade-soft));
}

@media (prefers-color-scheme: dark) {
  .device {
    --shade: rgb(0 0 0 / 0.55);
    --shade-soft: rgb(0 0 0 / 0.35);
  }
}

.device::before,
.device::after {
  content: "";
  position: absolute;
  width: calc(4 * var(--u));
  border-radius: calc(2 * var(--u));
  background: #2c2f2d;
}

.device::before {
  top: calc(210 * var(--u));
  right: calc(-3 * var(--u));
  height: calc(104 * var(--u));
}

.device::after {
  top: calc(150 * var(--u));
  left: calc(-3 * var(--u));
  height: calc(58 * var(--u));
  box-shadow: 0 calc(82 * var(--u)) 0 #2c2f2d;
}

.screen {
  position: absolute;
  inset: calc(11 * var(--u));
  overflow: hidden;
  border-radius: calc(57 * var(--u));
  background: #ffffff;
  isolation: isolate;
}

@media (prefers-color-scheme: dark) {
  .screen {
    background: #000000;
  }
}

.screen img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* The simulator draws the status bar and home indicator, but not the island. */
.island {
  position: absolute;
  top: calc(11 * var(--u));
  left: 50%;
  width: calc(124 * var(--u));
  height: calc(36 * var(--u));
  margin-left: calc(-62 * var(--u));
  border-radius: calc(18 * var(--u));
  background: #000000;
}

/* Privacy card */

.promise {
  position: relative;
  z-index: 1;
  padding: clamp(4px, 1vw, 12px) 0 clamp(8px, 2vw, 24px);
}

.promise-card {
  display: grid;
  gap: 32px 64px;
  padding: clamp(26px, 4.5vw, 52px);
  border: 1px solid var(--line);
  border-radius: var(--radius-l);
  background: var(--surface);
  box-shadow: var(--shadow-md);
}

.promise-card h2 {
  font-size: clamp(1.7rem, 1.2rem + 1.9vw, 2.4rem);
}

.promise-card .card-text {
  margin: 16px 0 0;
  color: var(--muted);
}

.points {
  display: grid;
  gap: 22px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.point {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

.point-icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: var(--chip);
  color: var(--accent);
}

.point-icon svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.point h3 {
  margin: 2px 0 2px;
  font-size: 1.08rem;
  letter-spacing: -0.01em;
}

.point p {
  margin: 0;
  color: var(--muted);
  font-size: 0.98rem;
  line-height: 1.5;
}

/* Screenshot gallery: a swipeable row on small screens, four across on large ones. */

.gallery-head {
  width: min(100% - var(--gutter) * 2, 42rem);
  margin-inline: auto;
  text-align: center;
}

.gallery-head .section-intro {
  margin-inline: auto;
}

.gallery-scroller {
  margin-top: clamp(32px, 5vw, 56px);
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-padding-inline: var(--gutter);
  scroll-snap-type: x mandatory;
  scrollbar-color: var(--line-strong) transparent;
  scrollbar-width: thin;
}

.gallery-scroller:focus-visible {
  outline-offset: -4px;
}

.gallery-list {
  display: flex;
  gap: 22px;
  width: max-content;
  min-width: 100%;
  margin: 0;
  padding: 6px var(--gutter) 34px;
  list-style: none;
}

.shot {
  --w: min(72vw, 264px);
  flex: none;
  width: var(--w);
  scroll-snap-align: start;
}

.shot figure {
  margin: 0;
}

.shot .device {
  margin-inline: auto;
}

@supports (width: 1cqw) {
  .shot {
    container-type: inline-size;
  }

  .shot .device {
    --w: 100cqw;
  }
}

.shot figcaption {
  margin-top: 26px;
  text-align: center;
}

.shot figcaption strong {
  display: block;
  margin-bottom: 4px;
  font: 700 1.1rem/1.25 var(--font-display);
  letter-spacing: -0.01em;
}

.shot figcaption span {
  display: block;
  color: var(--muted);
  font-size: 0.96rem;
  line-height: 1.5;
  text-wrap: balance;
}

@media (min-width: 960px) {
  .gallery-scroller {
    width: min(100% - var(--gutter) * 2, var(--maxw));
    margin-inline: auto;
    overflow: visible;
    scroll-snap-type: none;
  }

  .gallery-list {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: clamp(24px, 3.4vw, 48px);
    width: auto;
    padding: 6px 0 0;
  }

  .shot {
    --w: 220px;
    width: auto;
  }
}

/* Getting started */

.steps-layout {
  display: grid;
  gap: 56px;
  align-items: center;
}

.steps {
  display: grid;
  margin: 40px 0 0;
  padding: 0;
  list-style: none;
}

.step {
  position: relative;
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr);
  gap: 0 22px;
  padding-bottom: 38px;
}

.step:last-child {
  padding-bottom: 0;
}

.step::before {
  content: "";
  position: absolute;
  top: 62px;
  bottom: 10px;
  left: 25px;
  width: 2px;
  background: repeating-linear-gradient(to bottom, var(--line-strong) 0 6px, transparent 6px 12px);
}

.step:last-child::before {
  display: none;
}

.step-num {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: linear-gradient(160deg, var(--sun), var(--sun-deep));
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.55), 0 10px 20px -10px rgb(243 173 69 / 0.9);
  color: var(--step-ink);
  font: 800 1.25rem/1 var(--font-display);
}

.step h3 {
  margin: 4px 0 8px;
  font-size: 1.3rem;
}

.step p {
  max-width: 30rem;
  margin: 0;
  color: var(--muted);
}

.steps-visual {
  position: relative;
  display: grid;
  justify-items: center;
  isolation: isolate;
}

.steps-visual::before {
  content: "";
  position: absolute;
  z-index: -1;
  top: 50%;
  left: 50%;
  width: 100%;
  aspect-ratio: 1;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle, var(--sun-halo) 0, rgb(254 207 116 / 0) 66%);
}

.steps-visual {
  --w: min(280px, calc(100vw - 80px));
  --crop: 0.8;
}

/* FAQ */

.faq-layout {
  display: grid;
  gap: 40px;
}

.faq-list {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-l);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.faq-list details + details {
  border-top: 1px solid var(--line);
}

.faq-list summary {
  position: relative;
  display: block;
  padding: 22px 70px 22px 26px;
  cursor: pointer;
  font-size: 1.06rem;
  font-weight: 650;
  line-height: 1.4;
  list-style: none;
  transition: background-color 0.2s ease;
}

.faq-list summary::-webkit-details-marker {
  display: none;
}

.faq-list summary:hover {
  background: var(--bg-soft);
}

.faq-list summary:focus-visible {
  outline-offset: -3px;
  border-radius: 0;
}

.faq-list summary::after {
  content: "";
  position: absolute;
  top: 50%;
  right: 22px;
  width: 30px;
  height: 30px;
  margin-top: -15px;
  border-radius: 50%;
  background:
    linear-gradient(currentColor, currentColor) center / 12px 2px no-repeat,
    linear-gradient(currentColor, currentColor) center / 2px 12px no-repeat,
    var(--chip);
  color: var(--accent);
  transition: background-size 0.25s ease, transform 0.25s ease;
}

.faq-list details[open] summary::after {
  background-size: 12px 2px, 2px 0, auto;
  transform: rotate(180deg);
}

.faq-list details > p {
  max-width: 44rem;
  margin: 0;
  padding: 0 70px 26px 26px;
  color: var(--muted);
  animation: reveal 0.32s ease both;
}

@keyframes reveal {
  from {
    opacity: 0;
    transform: translateY(-6px);
  }
}

/* Contact */

.contact-card {
  position: relative;
  isolation: isolate;
  display: grid;
  gap: 32px 56px;
  align-items: center;
  padding: clamp(28px, 5.5vw, 64px);
  border: 1px solid var(--line);
  border-radius: 36px;
  background: linear-gradient(135deg, var(--hero-1) 0%, var(--hero-2) 100%);
  overflow: hidden;
  box-shadow: var(--shadow-md);
}

.contact-card::before {
  content: "";
  position: absolute;
  z-index: -1;
  right: -90px;
  bottom: -170px;
  width: 420px;
  aspect-ratio: 1;
  border-radius: 50%;
  background: linear-gradient(170deg, var(--sun-disc-1), var(--sun-disc-2));
  box-shadow: 0 0 90px 30px var(--sun-halo);
  opacity: 0.85;
}

@media (prefers-color-scheme: dark) {
  .contact-card::before {
    opacity: 0.38;
  }
}

.contact-card h2 {
  font-size: clamp(1.9rem, 1.2rem + 2.6vw, 2.8rem);
}

.contact-card .card-text {
  max-width: 30rem;
  margin: 16px 0 0;
  color: var(--muted);
}

.contact-card .btn {
  margin-top: 28px;
  max-width: 100%;
  overflow-wrap: anywhere;
}

.keep-private {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 16px;
  align-items: start;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius-m);
  background: rgb(255 255 255 / 0.6);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}

@media (prefers-color-scheme: dark) {
  .keep-private {
    background: rgb(255 255 255 / 0.06);
  }
}

.keep-private h3 {
  margin: 2px 0 4px;
  font-size: 1.08rem;
}

.keep-private p {
  margin: 0;
  font-size: 0.98rem;
  line-height: 1.5;
}

@media (min-width: 900px) {
  .promise-card {
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
    align-items: center;
  }

  .contact-card {
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  }
}

@media (min-width: 960px) {
  .steps-layout {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: clamp(48px, 8vw, 112px);
  }

  .steps-visual {
    --w: 297px;
  }

  .steps-visual::before {
    width: 118%;
  }

  .faq-layout {
    grid-template-columns: 330px minmax(0, 1fr);
    gap: 72px;
    align-items: start;
  }

  .faq-intro {
    position: sticky;
    top: calc(var(--header-h) + 36px);
  }
}

@media (max-width: 959px) {
  .hero-visual {
    --w: min(331px, calc(100vw - 72px));
  }

  /* Crop the phones on small screens so the page does not become a long scroll. */
  .device-crop {
    height: calc(var(--w) * 2.1132 * var(--crop));
    margin-inline: -28px;
    padding-inline: 28px;
    overflow: hidden;
    -webkit-mask-image: linear-gradient(to bottom, #000 82%, transparent);
    mask-image: linear-gradient(to bottom, #000 82%, transparent);
  }

  /* The crop would cut a wide shadow off along the sides, so keep only the tight one. */
  .device-crop .device {
    --shade: transparent;
  }
}

@media (min-width: 480px) {
  .mark {
    white-space: nowrap;
  }
}

@media (max-width: 520px) {
  .actions .btn {
    flex: 1 1 auto;
  }

  .hero-visual {
    --w: min(314px, calc(100vw - 72px));
    --crop: 0.72;
  }

  .faq-list summary {
    padding: 20px 64px 20px 20px;
  }

  .faq-list details > p {
    padding: 0 20px 22px;
  }

  .faq-list summary::after {
    right: 18px;
  }
}

@media (max-width: 380px) {
  .contact-card {
    padding: 24px;
  }

  .contact-card .btn {
    padding: 0 16px;
    font-size: 0.94rem;
  }

  .contact-card .btn svg {
    display: none;
  }
}
