/* On The Way's public website. Light and dark follow the device; the hero and
   the photo band stay dark in both, since their photos are night scenes. */

:root {
  --bg: #ffffff;
  --bg2: #f5f6f7;
  --card: #ffffff;
  --ink: #15171a;
  --ink2: #4b5058;
  --line: rgba(0, 0, 0, 0.1);
  --red: #c62828;
  --red-hover: #a91f1f;
  --onred: #ffffff;
  --frame: #1b1e22;
  --frame-edge: #c9ccd1;
  --night: #0f1215;
  --night-ink: #f3f4f6;
  --night-ink2: #c4c8cf;
  --wrap: 1200px;
  --gutter: 20px;
  --font: 'Barlow', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --display: 'Barlow Condensed', 'Barlow', system-ui, sans-serif;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f1215;
    --bg2: #161a1f;
    --card: #1b2026;
    --ink: #f3f4f6;
    --ink2: #b4b9c1;
    --line: rgba(255, 255, 255, 0.1);
    --red: #d32f2f;
    --red-hover: #e53935;
    --frame: #050607;
    --frame-edge: #3a3f46;
  }
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 76px;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 17px/1.55 var(--font);
  overflow-x: hidden;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

h1,
h2,
p,
ul,
figure {
  margin: 0;
}

a {
  color: inherit;
}

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* Buttons */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 0 22px;
  border-radius: 6px;
  font-weight: 600;
  font-size: 17px;
  text-decoration: none;
  border: 2px solid transparent;
  transition: background 0.15s;
}

.btn svg {
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.btn-red {
  background: var(--red);
  color: var(--onred);
}

.btn-red:hover {
  background: var(--red-hover);
}

.btn-ghost {
  color: var(--night-ink);
  border-color: rgba(255, 255, 255, 0.85);
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.12);
}

/* Top bar */

.top {
  position: sticky;
  top: 0;
  z-index: 20;
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.top-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.brand img {
  width: 40px;
  height: 40px;
  border-radius: 9px;
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1;
}

.brand-name {
  font: italic 800 26px/1 var(--display);
  text-transform: uppercase;
  letter-spacing: 0.01em;
}

.brand-tag {
  margin-top: 4px;
  font: italic 700 10.5px/1 var(--display);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--ink2);
}

.links {
  display: none;
}

.menu summary {
  list-style: none;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  margin-right: -10px;
  cursor: pointer;
}

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

.menu summary svg {
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
}

.menu-panel {
  position: absolute;
  left: 0;
  right: 0;
  top: 64px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 12px var(--gutter) 20px;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.18);
}

.menu-panel a:not(.btn) {
  padding: 12px 0;
  font-size: 19px;
  font-weight: 600;
  text-decoration: none;
  border-bottom: 1px solid var(--line);
}

.menu-panel .btn {
  margin-top: 12px;
}

/* Hero: always a night scene */

.hero {
  position: relative;
  isolation: isolate;
  min-height: min(640px, 88svh);
  display: flex;
  align-items: flex-end;
  background: var(--night);
  color: var(--night-ink);
  overflow: hidden;
}

.hero-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 72% 30%;
  z-index: -2;
}

.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(
    180deg,
    rgba(15, 18, 21, 0.1) 0%,
    rgba(15, 18, 21, 0.35) 30%,
    rgba(15, 18, 21, 0.85) 60%,
    #0f1215 100%
  );
}

.hero-body {
  padding-top: 120px;
  padding-bottom: 44px;
}

.hero h1 {
  font-size: clamp(34px, 9vw, 64px);
  line-height: 1.05;
  font-weight: 800;
  letter-spacing: -0.015em;
  max-width: 14em;
}

.lead {
  margin: 18px 0 28px;
  font-size: clamp(18px, 2.2vw, 22px);
  color: var(--night-ink2);
  max-width: 30em;
}

.hero .btn {
  width: 100%;
}

/* Feature tiles */

.tiles-band {
  background: var(--bg2);
  border-bottom: 1px solid var(--line);
}

.tiles {
  list-style: none;
  display: grid;
  grid-template-columns: 1fr 1fr;
  padding-top: 8px;
  padding-bottom: 8px;
}

.tiles li {
  padding: 24px 12px;
  text-align: center;
  border-bottom: 1px solid var(--line);
}

.tiles li:nth-child(odd):not(:last-child) {
  border-right: 1px solid var(--line);
}

.tiles li:last-child {
  grid-column: 1 / -1;
  border-bottom: 0;
}

.tiles svg {
  width: 40px;
  height: 40px;
  margin: 0 auto 10px;
  fill: none;
  stroke: var(--ink);
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.tiles h2 {
  font-size: 17px;
  line-height: 1.25;
  font-weight: 700;
}

.tiles p {
  margin-top: 6px;
  font-size: 15px;
  line-height: 1.4;
  color: var(--ink2);
}

/* Feature sections */

.feature {
  padding: 64px 0;
  border-bottom: 1px solid var(--line);
}

.feature-row {
  display: flex;
  flex-direction: column;
  gap: 40px;
}

.kicker {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--red);
}

.kicker::before {
  content: '';
  width: 28px;
  height: 4px;
  background: var(--red);
}

.feature h2,
.photo-band h2,
.pricing h2 {
  font-size: clamp(30px, 6vw, 44px);
  line-height: 1.1;
  font-weight: 800;
  letter-spacing: -0.01em;
  margin-bottom: 16px;
}

.feature-text > p:not(.kicker),
.photo-band-body > p:not(.kicker),
.pricing-box > p:not(.kicker) {
  color: var(--ink2);
  font-size: 18px;
  max-width: 32em;
}

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

.checks li {
  position: relative;
  padding-left: 34px;
  font-size: 18px;
  line-height: 1.4;
}

.checks li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 1px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--red)
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 12.5l4 4 8-9'/%3E%3C/svg%3E")
    center / 15px no-repeat;
}

/* Device frames. On phones only the phone screenshot shows: the laptop's
   screen would be too small to read. */

.devices {
  position: relative;
  display: flex;
  justify-content: center;
}

.devices .laptop {
  display: none;
}

.laptop-screen {
  padding: 3.2% 3.2% 2.4%;
  background: var(--frame);
  border: 1px solid var(--frame-edge);
  border-radius: 14px 14px 4px 4px;
}

.laptop-screen img {
  width: 100%;
  border-radius: 2px;
}

.laptop-base {
  height: 14px;
  margin: 0 -6%;
  background: linear-gradient(180deg, #d5d8dc, #9aa0a7);
  border-radius: 0 0 14px 14px;
  position: relative;
}

.laptop-base::before {
  content: '';
  position: absolute;
  left: 50%;
  top: 0;
  width: 16%;
  height: 5px;
  transform: translateX(-50%);
  background: #8a9097;
  border-radius: 0 0 6px 6px;
}

.phone {
  width: min(300px, 78vw);
  padding: 10px;
  background: var(--frame);
  border: 1px solid var(--frame-edge);
  border-radius: 42px;
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.28);
}

.phone img {
  width: 100%;
  aspect-ratio: 9 / 19.5;
  object-fit: cover;
  object-position: top;
  border-radius: 32px;
}

/* Photo band: always a night scene */

.photo-band {
  position: relative;
  isolation: isolate;
  background: var(--night);
  color: var(--night-ink);
  overflow: hidden;
}

.photo-band-img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  object-position: 30% 50%;
}

.photo-band-body {
  padding-top: 36px;
  padding-bottom: 64px;
}

.photo-band .kicker {
  color: #ff6b5e;
}

.photo-band .kicker::before {
  background: #ff6b5e;
}

.photo-band-body > p:not(.kicker) {
  color: var(--night-ink2);
}

/* Pricing */

.pricing {
  padding: 64px 0;
  background: var(--bg2);
  border-bottom: 1px solid var(--line);
}

/* Closing strip and footer */

.closing {
  padding: 40px 0;
  border-bottom: 1px solid var(--line);
}

.closing-row {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 24px;
}

.closing .btn {
  width: 100%;
}

.brand-lg img {
  width: 56px;
  height: 56px;
  border-radius: 12px;
}

.brand-lg .brand-name {
  font-size: 34px;
}

.brand-lg .brand-tag {
  font-size: 12px;
}

.foot {
  padding: 28px 0 40px;
  font-size: 15px;
  color: var(--ink2);
}

.foot-row {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.credit {
  font-size: 13px;
}

/* Tablet: two columns where they fit */

@media (min-width: 768px) {
  :root {
    --gutter: 32px;
  }

  .hero .btn,
  .closing .btn {
    width: auto;
  }

  .closing-row {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }

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

  .tiles li,
  .tiles li:nth-child(odd):not(:last-child) {
    border-right: 1px solid var(--line);
  }

  .tiles li:nth-child(3n),
  .tiles li:last-child {
    border-right: 0;
  }

  .tiles li:nth-child(n + 4) {
    border-bottom: 0;
  }

  .tiles li:last-child {
    grid-column: auto;
  }
}

/* Desktop */

@media (min-width: 1024px) {
  .links {
    display: flex;
    align-items: center;
    gap: 32px;
  }

  .links a:not(.btn) {
    font-weight: 500;
    text-decoration: none;
  }

  .links a:not(.btn):hover {
    color: var(--red);
  }

  .menu {
    display: none;
  }

  .hero {
    min-height: 620px;
    align-items: center;
  }

  .hero-img {
    left: 32%;
    width: 68%;
    object-position: 60% 35%;
  }

  .hero::after {
    background:
      linear-gradient(90deg, #0f1215 30%, rgba(15, 18, 21, 0.75) 46%, rgba(15, 18, 21, 0.1) 72%),
      linear-gradient(0deg, rgba(15, 18, 21, 0.6) 0%, transparent 30%);
  }

  .hero-body {
    padding-top: 80px;
    padding-bottom: 80px;
  }

  .hero h1 {
    max-width: 11.5em;
  }

  .tiles {
    grid-template-columns: repeat(5, 1fr);
    padding-top: 20px;
    padding-bottom: 20px;
  }

  .tiles li,
  .tiles li:nth-child(n) {
    border-bottom: 0;
    border-right: 1px solid var(--line);
    padding: 16px 20px;
  }

  .tiles li:last-child {
    border-right: 0;
  }

  .tiles li:nth-child(3n):not(:last-child) {
    border-right: 1px solid var(--line);
  }

  .feature {
    padding: 96px 0;
  }

  .feature-row {
    flex-direction: row-reverse;
    align-items: center;
    gap: 56px;
  }

  .feature-flip .feature-row {
    flex-direction: row;
  }

  .feature-text {
    flex: 0 0 38%;
  }

  .devices {
    flex: 1;
    justify-content: flex-start;
    padding-right: 7%;
  }

  .devices .laptop {
    display: block;
    width: 92%;
  }

  .devices:not(.devices-one) .phone {
    position: absolute;
    right: 0;
    bottom: -28px;
    width: 30%;
    padding: 7px;
    border-radius: 30px;
  }

  .devices:not(.devices-one) .phone img {
    border-radius: 24px;
  }

  .devices-one .laptop {
    width: 100%;
    padding: 0 6%;
  }

  .devices-one .phone {
    display: none;
  }

  .photo-band {
    min-height: 560px;
    display: flex;
    align-items: center;
  }

  .photo-band-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 62%;
    height: 100%;
    aspect-ratio: auto;
    z-index: -2;
  }

  .photo-band::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: -1;
    background: linear-gradient(270deg, #0f1215 38%, rgba(15, 18, 21, 0.55) 56%, rgba(15, 18, 21, 0) 80%);
  }

  .photo-band-body {
    padding-top: 80px;
    padding-bottom: 80px;
  }

  .photo-band-body {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
  }

  .photo-band-body > * {
    width: 30rem;
    max-width: 100%;
  }

  .pricing {
    padding: 80px 0;
  }

  .foot-row {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
  }
}

@media (min-width: 1600px) {
  .hero {
    min-height: 720px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}
