/* Vape Cam static site: dark twill fabric, glossy devices and flavoured oil,
   matching the app. The flavour colours are custom properties that the
   landing page's script swaps as the carousel moves. */

@property --oil-mid {
  syntax: "<color>";
  inherits: true;
  initial-value: #e3c224;
}

@property --oil-hi {
  syntax: "<color>";
  inherits: true;
  initial-value: #f7f2a0;
}

@property --oil-shadow {
  syntax: "<color>";
  inherits: true;
  initial-value: #6e2e06;
}

@property --oil-top {
  syntax: "<color>";
  inherits: true;
  initial-value: #2f7d60;
}

@property --oil-frame {
  syntax: "<color>";
  inherits: true;
  initial-value: #b0601a;
}

:root {
  color-scheme: dark;
  --cloth: #141416;
  --ink: #f4f1ea;
  --ink-soft: rgb(244 241 234 / 0.62);
  --ink-faint: rgb(244 241 234 / 0.4);
  --font-round: ui-rounded, "SF Pro Rounded", "Nunito", system-ui, sans-serif;
  --font-body: ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  transition: --oil-mid 0.6s, --oil-hi 0.6s, --oil-shadow 0.6s, --oil-top 0.6s, --oil-frame 0.6s;
}

* {
  box-sizing: border-box;
}

html {
  /* Plain dark grey with a soft vignette; the oil drops supply the colour. */
  background-color: var(--cloth);
  background-image: radial-gradient(ellipse 90% 70% at 50% 40%, transparent 45%, rgb(0 0 0 / 0.55));
  background-attachment: fixed;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  /* No background here: the grey is on <html> so the oil drops can sit on it. */
}

/* Mesh gradient: big soft fields of oil colour (pineapple, grape, watermelon,
   blue dream, mango) blending across the page, drifting slowly. Fixed so the
   wash stays put while scrolling. */
body::before {
  content: "";
  position: fixed;
  inset: -20%;
  z-index: -1;
  background:
    radial-gradient(ellipse 45% 40% at 18% 20%, rgb(227 194 36 / 0.3), transparent 70%),
    radial-gradient(ellipse 40% 45% at 85% 15%, rgb(63 134 232 / 0.28), transparent 70%),
    radial-gradient(ellipse 45% 40% at 80% 70%, rgb(255 92 142 / 0.25), transparent 70%),
    radial-gradient(ellipse 40% 45% at 15% 80%, rgb(142 69 214 / 0.3), transparent 70%),
    radial-gradient(ellipse 35% 30% at 50% 50%, rgb(255 145 36 / 0.15), transparent 70%);
  filter: blur(40px) saturate(1.2);
  animation: mesh-drift 30s ease-in-out infinite alternate;
  pointer-events: none;
}

/* Darken the middle a touch so text and screenshots stay the focus. */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background: radial-gradient(ellipse 60% 55% at 50% 45%, rgb(14 14 16 / 0.7), transparent 85%);
  pointer-events: none;
}

@keyframes mesh-drift {
  50% {
    translate: 3% -2%;
    rotate: 6deg;
  }
  to {
    translate: -2% 3%;
    rotate: -4deg;
    scale: 1.08;
  }
}

::selection {
  color: #141414;
  background-color: var(--oil-mid);
}

a:focus-visible,
button:focus-visible {
  outline: 3px solid var(--oil-hi);
  outline-offset: 4px;
}

.wordmark {
  margin: 0;
  font-family: var(--font-round);
  font-size: 0.8125rem;
  font-weight: 800;
  letter-spacing: 0.5em;
  text-indent: 0.5em;
  color: var(--ink-soft);
  text-transform: uppercase;
  text-decoration: none;
}

/* ---------- Landing ---------- */

body.landing {
  overflow-x: hidden;
}


.tagline {
  margin: 0;
  padding: 0 1.25rem;
  font-family: var(--font-round);
  font-size: clamp(1.25rem, 4.6vw, 1.625rem);
  font-weight: 800;
  line-height: 1.3;
  color: var(--ink);
}

/* The main button looks like the app's shutter: a disc of glossy oil with
   bubbles drifting up through it. */
.oil-button {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.95rem 1.9rem;
  border: 3px solid rgb(255 255 255 / 0.92);
  border-radius: 999px;
  font-family: var(--font-round);
  font-size: 1.1875rem;
  font-weight: 900;
  letter-spacing: 0.02em;
  color: #17130a;
  text-decoration: none;
  background:
    radial-gradient(ellipse 60% 45% at 30% 18%, rgb(255 255 255 / 0.65), transparent 70%),
    linear-gradient(160deg, var(--oil-hi), var(--oil-mid) 55%, color-mix(in srgb, var(--oil-mid) 70%, var(--oil-shadow)));
  box-shadow:
    0 0.5rem 2.2rem color-mix(in srgb, var(--oil-mid) 55%, transparent),
    0 0.25rem 0.6rem rgb(0 0 0 / 0.4);
  cursor: pointer;
  transition: transform 0.2s cubic-bezier(0.3, 1.6, 0.5, 1);
}

.oil-button:hover {
  transform: scale(1.04);
}

.oil-button:active {
  transform: scale(0.96);
}

.oil-button::before,
.oil-button::after {
  content: "";
  position: absolute;
  z-index: -1;
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 50%;
  border: 1.5px solid rgb(255 255 255 / 0.75);
  bottom: -0.6rem;
  animation: bubble 3.4s ease-in infinite;
}

.oil-button::before {
  left: 22%;
}

.oil-button::after {
  left: 74%;
  width: 0.3rem;
  height: 0.3rem;
  animation-delay: 1.6s;
  animation-duration: 2.8s;
}

@keyframes bubble {
  0% {
    translate: 0 0;
    opacity: 0;
  }
  15% {
    opacity: 1;
  }
  100% {
    translate: 0.4rem -4.5rem;
    opacity: 0;
  }
}

/* ---------- Hero: name, screenshots, download ---------- */

.hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: max(2.25rem, env(safe-area-inset-top)) 0 0;
}

.hero h1 {
  margin: 0;
  font-family: var(--font-round);
  font-size: clamp(2.25rem, 8vw, 3.25rem);
  font-weight: 900;
  letter-spacing: -0.01em;
}

.hero .tagline {
  margin: 0.5rem 0 0;
  padding: 0 1.25rem;
  color: var(--ink);
}

.hero .oil-button {
  margin-top: 1.5rem;
}

/* ---------- How it works ---------- */

.steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, min(15rem, 26vh)));
  justify-content: center;
  gap: 2rem;
  margin: 2.5rem auto 0;
  padding: 0 1.25rem;
  list-style: none;
}

.steps li {
  text-align: center;
}

.steps img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 2rem;
  border: 1px solid rgb(255 255 255 / 0.12);
  box-shadow: 0 1.5rem 3rem rgb(0 0 0 / 0.55);
}

.steps li:nth-child(1) img {
  rotate: -3deg;
}

.steps li:nth-child(3) img {
  rotate: 3deg;
}

.steps h2 {
  margin: 1.1rem 0 0;
  font-family: var(--font-round);
  font-size: 1.1875rem;
  font-weight: 900;
}

.steps p {
  margin: 0;
  font-size: 0.9375rem;
  line-height: 1.5;
  color: var(--ink-soft);
}

/* Phones: the screenshots become a swipeable row that peeks at the next one. */
@media (max-width: 720px) {
  .landing-footer {
    margin-top: 3rem;
  }

  .steps {
    display: flex;
    justify-content: flex-start;
    gap: 1rem;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    padding: 0.5rem 19vw 0.25rem;
    margin: 1.75rem 0 0;
    width: 100%;
  }

  .steps::-webkit-scrollbar {
    display: none;
  }

  .steps li {
    flex: none;
    width: 62vw;
    max-width: 17rem;
    scroll-snap-align: center;
  }

  .steps li img {
    rotate: 0deg !important;
    border-radius: 1.6rem;
  }
}

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

.landing-footer {
  padding-bottom: max(2.5rem, env(safe-area-inset-bottom)) !important;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem 1.5rem;
  margin: 5rem 0 0;
  padding: 0 1rem 2.5rem;
}

.landing-footer a {
  color: var(--ink-faint);
  font-size: 0.875rem;
  font-weight: 600;
  text-decoration: none;
}

.landing-footer a:hover {
  color: var(--ink);
  text-decoration: underline;
}

@media (prefers-reduced-motion: reduce) {
  :root {
    transition: none;
  }

  body::before,
  .oil-button::before,
  .oil-button::after {
    animation: none;
  }
}

/* ---------- Simple centred pages (404, TikTok) ---------- */

.center-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.25rem;
  min-height: 100vh;
  padding: 2rem 1.25rem;
  text-align: center;
}

.center-card .device {
  width: 9rem;
  height: auto;
  rotate: -8deg;
  filter: drop-shadow(0 1.2rem 1.4rem rgb(0 0 0 / 0.55));
}

.center-card h1 {
  margin: 0.5rem 0 0;
  font-family: var(--font-round);
  font-size: 2rem;
  font-weight: 900;
  color: var(--oil-hi);
}

/* ---------- Prose pages (Terms of Service, Privacy) ---------- */

.prose-header {
  display: flex;
  justify-content: center;
  padding: 1.75rem 1rem 0;
}

.prose {
  max-width: 46rem;
  margin: 1.5rem auto 4rem;
  padding: 2.25rem clamp(1.25rem, 5vw, 3rem);
  border: 1px solid rgb(255 255 255 / 0.08);
  border-radius: 1.75rem;
  background: rgb(30 31 34 / 0.82);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  color: rgb(244 241 234 / 0.78);
  font-size: 1rem;
  line-height: 1.75;
}

.prose h1 {
  margin: 0 0 0.9em;
  font-family: var(--font-round);
  font-size: clamp(1.75rem, 6vw, 2.25rem);
  line-height: 1.15;
  font-weight: 900;
  color: var(--oil-hi);
}

.prose h2 {
  margin: 2em 0 0.8em;
  font-family: var(--font-round);
  font-size: 1.375rem;
  line-height: 1.33;
  font-weight: 800;
  color: var(--ink);
}

.prose h3 {
  margin: 1.6em 0 0.6em;
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--ink);
}

.prose p {
  margin: 1.1em 0;
}

.prose strong,
.prose u {
  color: var(--ink);
  font-weight: 600;
}

.prose a {
  color: var(--oil-hi);
  font-weight: 600;
  text-decoration: underline;
  text-decoration-color: color-mix(in srgb, var(--oil-hi) 45%, transparent);
  text-underline-offset: 0.18em;
}

.prose a:hover {
  text-decoration-color: currentColor;
}

.prose ol,
.prose ul {
  margin: 1.1em 0;
  padding-left: 1.5em;
}

.prose li {
  margin: 0.45em 0;
}

.prose li::marker {
  color: var(--oil-mid);
}
