/* Casly home page, second pass (2026-11-16): clean, centred, short. Builds on style.css (tokens, Manrope).
   The photo is the protagonist; one dark action; terracotta only in small touches, as in the app. */
@font-face {
  font-family: "Fraunces";
  src: url("/assets/Fraunces-Italic-Variable.ttf") format("truetype");
  font-style: italic;
  font-weight: 300 700;
  font-display: swap;
}

:root {
  --wide: 1080px;
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --shadow-photo: 0 1px 2px rgb(0 0 0 / 0.05), 0 16px 48px rgb(0 0 0 / 0.10);
  --cta: #141414;
  --on-cta: #FFFFFF;
}
@media (prefers-color-scheme: dark) {
  :root {
    --shadow-photo: 0 0 0 1px rgb(255 255 255 / 0.06), 0 16px 48px rgb(0 0 0 / 0.5);
    --cta: #F5F5F7;
    --on-cta: #0C0B0A;
  }
}

html { scroll-behavior: smooth; }

/* Never a coloured ring when something is clicked or tapped. Only keyboard users (Tab, home.js adds .kbd) see a
   quiet light ring, so they always know where they are. */
body.home * { -webkit-tap-highlight-color: transparent; }
body.home :focus { outline: none; }
html.kbd body.home :focus-visible { outline: 2px solid color-mix(in srgb, var(--ink) 55%, transparent); outline-offset: 3px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
[id] { scroll-margin-top: 80px; }

body.home main { max-width: none; padding: 0; }
body.home { background: transparent; overflow-x: clip; }
html:has(body.home) { background: var(--bg); }

/* The wall of rooms behind the page, and the veil over it. The veil is lighter at the top (the rooms show
   through the hero) and fuller further down (home.js sets --veil), so every section stays easy to read. */
.mosaic {
  position: fixed;
  inset: 0;
  z-index: -2;
  overflow: hidden;
  pointer-events: none;
}
.mosaic-inner {
  display: flex;
  justify-content: center;
  gap: 16px;
  height: 100%;
}
.mosaic .col {
  flex: 0 0 clamp(150px, 19vw, 300px);
  display: flex;
  flex-direction: column;
  gap: 16px;
  will-change: transform;
  animation: drift-up 90s linear infinite;
}
.mosaic .col:nth-child(even) { animation-name: drift-down; animation-duration: 110s; margin-top: -120px; }
.mosaic .col:nth-child(3n) { animation-duration: 100s; }
.mosaic img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 18px;
}
@keyframes drift-up { from { transform: translateY(0); } to { transform: translateY(calc(-50% - 8px)); } }
@keyframes drift-down { from { transform: translateY(calc(-50% - 8px)); } to { transform: translateY(0); } }
@media (prefers-reduced-motion: reduce) { .mosaic .col { animation: none; } }
.veil {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: var(--bg);
  opacity: var(--veil, 0.62);
}
@media (prefers-color-scheme: light) { .veil { opacity: var(--veil, 0.74); } }
@media (max-width: 700px) { .mosaic .col:nth-child(n+4) { display: none; } .mosaic .col { flex-basis: 34vw; } }
.wrap { width: 100%; max-width: var(--wide); margin: 0 auto; padding-left: 20px; padding-right: 20px; }
em.accent {
  font-family: "Fraunces", Georgia, serif;
  font-style: italic;
  font-weight: 400;
  letter-spacing: -0.01em;
}

/* Header: sticky glass bar. */
.site-top {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--bg) 80%, transparent);
  -webkit-backdrop-filter: saturate(1.6) blur(18px);
  backdrop-filter: saturate(1.6) blur(18px);
  border-bottom: 1px solid transparent;
  transition: border-color 200ms ease;
}
.site-top.scrolled { border-bottom-color: var(--hairline); }
/* Logo on the left, the menu exactly in the middle of the page (a spacer as wide as the logo's column on the right). */
.site-top .wrap {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 12px;
  min-height: 60px;
}
.site-top .brand { justify-self: start; }
.site-top nav { justify-self: center; }
/* "Coming soon to the App Store", top right. When the app is out it becomes Apple's official badge (the Apple
   logo may only be used inside Apple's own badges). */
.soon {
  justify-self: end;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 34px;
  padding: 0 14px 0 11px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 650;
  color: var(--ink);
  background: color-mix(in srgb, var(--bg) 42%, transparent);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--ink) 16%, transparent);
  white-space: nowrap;
}
.site-top .brand { font-size: 18px; gap: 8px; }
.site-top .brand img { border-radius: 7px; }
.site-top nav { display: flex; align-items: center; gap: 2px; }
.site-top nav a.link {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 12px;
  font-size: 14px;
  font-weight: 600;
  color: var(--muted);
  text-decoration: none;
  transition: color 150ms ease;
}
.site-top nav a.link:hover { color: var(--ink); }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 20px;
  border: 0;
  border-radius: 999px;
  background: var(--cta);
  color: var(--on-cta);
  font: 650 14.5px/1 "Manrope", sans-serif;
  text-decoration: none;
  cursor: pointer;
  transition: transform 160ms var(--ease-out), opacity 160ms ease;
  -webkit-tap-highlight-color: transparent;
}
.btn:active { transform: scale(0.96); }
.btn[disabled] { opacity: 0.6; cursor: default; }
/* Language menu. */
.lang { position: relative; }
.lang summary {
  list-style: none;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 40px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 13.5px;
  font-weight: 650;
  color: var(--muted);
  cursor: pointer;
  transition: color 150ms ease, background-color 150ms ease;
}
.lang summary::-webkit-details-marker { display: none; }
.lang summary:hover, .lang[open] summary { color: var(--ink); background: var(--surface); }
.lang-list {
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  min-width: 160px;
  padding: 6px;
  border-radius: 16px;
  background: var(--bg);
  box-shadow: 0 0 0 1px var(--hairline), 0 12px 32px rgb(0 0 0 / 0.14);
  display: grid;
  transform-origin: top right;
}
@media (prefers-reduced-motion: no-preference) {
  .lang[open] .lang-list { animation: pop 160ms var(--ease-out); }
  @keyframes pop { from { opacity: 0; transform: scale(0.96); } }
}
.lang-list a {
  display: flex;
  align-items: center;
  min-height: 40px;
  padding: 0 12px;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  color: var(--ink);
}
.lang-list a { gap: 10px; }
.lang-list a:hover { background: var(--surface); }
.flag {
  display: inline-block;
  flex: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  overflow: hidden;
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--ink) 18%, transparent);
}
.flag svg { display: block; width: 100%; height: 100%; }
.lang-list a[aria-current="true"] { background: var(--surface); }

/* Hero: everything on one centred axis. */
.hero {
  position: relative;
  text-align: center;
  min-height: calc(100svh - 60px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-top: 24px;
  padding-bottom: 72px;
}
/* A soft pool of the page colour behind the words, so they read over the rooms. */
.hero::before {
  content: "";
  position: absolute;
  inset: 8% 0;
  z-index: -1;
  background: radial-gradient(50% 50% at 50% 50%, color-mix(in srgb, var(--bg) 78%, transparent) 0%, color-mix(in srgb, var(--bg) 40%, transparent) 55%, transparent 80%);
  pointer-events: none;
}
.hero h1 {
  font-size: clamp(38px, 6.6vw, 72px);
  line-height: 1.04;
  font-weight: 700;
  letter-spacing: -0.035em;
  margin: 0 auto 18px;
  max-width: 15ch;
  text-wrap: balance;
}
.hero .sub {
  font-size: clamp(17px, 2vw, 19px);
  line-height: 1.55;
  color: var(--muted);
  max-width: 42ch;
  margin: 0 auto 28px;
  text-wrap: pretty;
}

/* Waitlist form: a glass bar; on hover or focus a bright light runs around its edge. */
@property --angle { syntax: "<angle>"; inherits: false; initial-value: 0deg; }
.signup { max-width: 420px; margin: 0 auto; }
.signup form {
  position: relative;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--bg) 42%, transparent);
  -webkit-backdrop-filter: blur(22px) saturate(1.5);
  backdrop-filter: blur(22px) saturate(1.5);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--ink) 16%, transparent), inset 0 1px 0 color-mix(in srgb, #fff 10%, transparent), 0 10px 30px rgb(0 0 0 / 0.18);
}
@media (prefers-color-scheme: light) { .signup form { background: color-mix(in srgb, #fff 55%, transparent); } }
/* The light that runs around an edge: on hover or focus (email bar, cards), or always, slowly (final panel).
   Bright white in dark mode, ink in light mode. */
.glow { position: relative; --glow: #FFFFFF; }
@media (prefers-color-scheme: light) { .glow { --glow: #141414; } }
.glow::before {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  padding: 1.5px;
  background: conic-gradient(from var(--angle), transparent 0deg, transparent 220deg, color-mix(in srgb, var(--glow) 35%, transparent) 290deg, var(--glow) 335deg, transparent 360deg);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
  opacity: 0;
  transition: opacity 300ms ease;
  pointer-events: none;
  z-index: 1;
}
.glow:hover::before, .glow:focus-within::before { opacity: 1; animation: run-around 2.6s linear infinite; }
.glow-always::before { opacity: 0.85; animation: run-around 7s linear infinite; }
.glow-always:hover::before { animation-duration: 3.5s; }
@keyframes run-around { to { --angle: 360deg; } }
@media (prefers-reduced-motion: reduce) {
  .glow:hover::before, .glow:focus-within::before, .glow-always::before { animation: none; background: color-mix(in srgb, var(--glow) 45%, transparent); }
}
/* Frosted glass, as the email bar. */
.glass {
  background: color-mix(in srgb, var(--bg) 42%, transparent) !important;
  -webkit-backdrop-filter: blur(22px) saturate(1.5);
  backdrop-filter: blur(22px) saturate(1.5);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--ink) 14%, transparent), inset 0 1px 0 color-mix(in srgb, #fff 8%, transparent), 0 10px 30px rgb(0 0 0 / 0.18);
}
.signup .btn { min-height: 38px; padding: 0 16px; font-size: 14px; }
.signup input[type="email"] {
  flex: 1;
  min-width: 0;
  min-height: 40px;
  padding: 0 14px 0 16px;
  border: 0;
  background: transparent;
  color: var(--ink);
  font: 500 16px "Manrope", sans-serif;
  outline: none;
}
.signup input::placeholder { color: var(--muted); }
.signup .hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.signup .status { font-size: 14px; font-weight: 600; color: var(--ink); margin: 12px 0 0; text-align: center; }
.signup .status:empty { display: none; }
.signup .status.error { color: #C2412D; }
@media (prefers-color-scheme: dark) { .signup .status.error { color: #FF8A73; } }
.signup.done form { display: none; }
.signup.done .status { padding: 14px 20px; border-radius: 20px; background: var(--surface); font-size: 15.5px; margin: 0; }

/* Before / after slider. */
.ba {
  --pos: 50%;
  position: relative;
  aspect-ratio: 4 / 3;
  border-radius: 28px;
  overflow: hidden;
  background: var(--surface);
  box-shadow: var(--shadow-photo);
  touch-action: pan-y;
  user-select: none;
  -webkit-user-select: none;
  cursor: ew-resize;
  isolation: isolate;
}
.ba img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
  -webkit-user-drag: none;
  transition: opacity 220ms ease;
}
.ba img.swapping { opacity: 0; }
.ba .before { clip-path: inset(0 calc(100% - var(--pos)) 0 0); }
.ba .line {
  position: absolute;
  top: 0;
  bottom: 0;
  left: var(--pos);
  width: 2px;
  margin-left: -1px;
  background: rgb(255 255 255 / 0.95);
  box-shadow: 0 0 12px rgb(0 0 0 / 0.25);
  pointer-events: none;
}
.ba .handle {
  position: absolute;
  top: 50%;
  left: var(--pos);
  width: 44px;
  height: 44px;
  margin: -22px 0 0 -22px;
  border-radius: 50%;
  background: #fff;
  color: #141414;
  display: grid;
  place-items: center;
  box-shadow: 0 2px 12px rgb(0 0 0 / 0.25);
  transition: transform 160ms var(--ease-out);
}
.ba.dragging .handle { transform: scale(1.08); }
.ba .tag {
  position: absolute;
  top: 14px;
  padding: 5px 11px;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 650;
  color: #141414;
  background: rgb(255 255 255 / 0.85);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  pointer-events: none;
}
.ba .tag.b { left: 14px; }
.ba .tag.a { right: 14px; }
.hero-photo { margin: 48px auto 0; max-width: 960px; }
.hero-photo .ba { border-radius: 32px; }

/* Sections. */
section.block { padding-top: 120px; }
.block-title {
  font-size: clamp(30px, 4.6vw, 48px);
  line-height: 1.08;
  font-weight: 700;
  letter-spacing: -0.03em;
  text-align: center;
  margin: 0 auto 14px;
  max-width: 18ch;
  text-wrap: balance;
}
.block-sub {
  text-align: center;
  color: var(--muted);
  font-size: 18px;
  margin: 0 auto 44px;
  max-width: 44ch;
  text-wrap: pretty;
}
.block-title + .gallery, .block-title + .steps, .block-title + .trio, .block-title + .faq { margin-top: 40px; }

/* Gallery: one slider, tabs above, caption below. */
.gallery { max-width: 960px; margin: 0 auto; }
.tabs {
  display: flex;
  justify-content: center;
  gap: 4px;
  width: fit-content;
  max-width: 100%;
  margin: 0 auto 24px;
  padding: 4px;
  border-radius: 999px;
  background: var(--surface);
  overflow-x: auto;
  scrollbar-width: none;
}
.tabs::-webkit-scrollbar { display: none; }
.tabs button {
  flex: none;
  min-height: 38px;
  padding: 0 16px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font: 650 14px "Manrope", sans-serif;
  cursor: pointer;
  transition: color 150ms ease, background-color 150ms ease, box-shadow 150ms ease;
}
.tabs button:hover { color: var(--ink); }
.tabs button[aria-selected="true"] { background: var(--bg); color: var(--ink); box-shadow: 0 1px 3px rgb(0 0 0 / 0.08), 0 0 0 1px var(--hairline); }
.caption { text-align: center; max-width: 52ch; margin: 24px auto 0; }
.caption h3 { font-size: 21px; font-weight: 700; letter-spacing: -0.015em; margin: 0 0 6px; }
.caption p { margin: 0; color: var(--muted); text-wrap: pretty; }

/* How it works: three centred steps. */
.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
  max-width: 920px;
  margin: 0 auto;
}
.step { text-align: center; }
.step-icon {
  display: inline-grid;
  place-items: center;
  height: 40px;
  margin-bottom: 16px;
  color: var(--ink);
}
.step h3 { font-size: 19px; font-weight: 700; letter-spacing: -0.01em; margin: 0 0 6px; }
.step p { color: var(--muted); margin: 0 auto; max-width: 30ch; text-wrap: pretty; }

/* More features: a quiet centred grid, no boxes. */
.items {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 44px 40px;
  max-width: 960px;
  margin: 0 auto;
}
.item { text-align: center; }
.item svg { color: var(--ink); margin-bottom: 12px; }
.item h3 { font-size: 17px; font-weight: 700; margin: 0 0 6px; letter-spacing: -0.01em; }
.item p { margin: 0 auto; color: var(--muted); font-size: 15.5px; max-width: 30ch; text-wrap: pretty; }

/* Why Casly. */
.trio {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  max-width: 960px;
  margin: 0 auto;
}
.trio > div {
  padding: 30px 26px;
  border-radius: 26px;
  background: var(--surface);
  text-align: center;
}
.trio h3 { font-size: 19px; font-weight: 700; letter-spacing: -0.015em; margin: 0 0 8px; }
.trio p { margin: 0; color: var(--muted); text-wrap: pretty; }
.trio svg { color: var(--ink); margin-bottom: 14px; }

/* FAQ. */
.faq { max-width: 720px; margin: 0 auto; }
.faq details { border-bottom: 1px solid var(--hairline); }
.faq summary {
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 60px;
  padding: 14px 0;
  font-size: 17px;
  font-weight: 650;
  cursor: pointer;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary svg { flex: none; color: var(--muted); transition: transform 200ms var(--ease-out); }
.faq details[open] summary svg { transform: rotate(45deg); }
.faq details p { margin: 0 0 20px; color: var(--muted); max-width: 62ch; text-wrap: pretty; }

/* Final call. */
.final {
  --bg: #0C0B0A;
  --ink: #F5F5F7;
  --muted: #A8A29C;
  --cta: #F5F5F7;
  --on-cta: #0C0B0A;
  --glow: #FFFFFF;
  max-width: 960px;
  margin: 120px auto 0;
  padding: 64px 24px;
  border-radius: 36px;
  background: #050505;
  color: var(--ink);
  text-align: center;
  box-shadow: inset 0 0 0 1px rgb(255 255 255 / 0.10), 0 24px 60px rgb(0 0 0 / 0.35);
}
.final .signup form { background: color-mix(in srgb, #fff 6%, transparent); --glow: #FFFFFF; }
.final .block-title { margin-bottom: 10px; }
.final .block-sub { margin-bottom: 28px; }

body.home footer { max-width: var(--wide); margin-top: 72px; text-align: center; }
body.home footer .foot-links, body.home footer .langs { justify-content: center; }
.foot-links { display: flex; flex-wrap: wrap; gap: 4px 18px; margin-bottom: 4px; }
.foot-links a { display: inline-flex; align-items: center; min-height: 44px; text-decoration: none; font-weight: 600; }

/* Reveal on scroll, only when motion is welcome. */
@media (prefers-reduced-motion: no-preference) {
  .reveal { opacity: 0; transform: translateY(14px); transition: opacity 450ms var(--ease-out), transform 450ms var(--ease-out); }
  .reveal.in { opacity: 1; transform: none; }
}

@media (max-width: 900px) {
  .site-top nav a.link { display: none; }
  .site-top .wrap { grid-template-columns: 1fr auto; }
  .site-top nav { justify-self: end; }
  .soon { display: none; }
  .steps { grid-template-columns: 1fr; gap: 40px; }
  .items { grid-template-columns: 1fr 1fr; }
  .trio { grid-template-columns: 1fr; max-width: 520px; }
}
@media (max-width: 600px) {
  .hero { min-height: calc(100svh - 60px); padding-bottom: 56px; }
  .hero-photo { margin-top: 36px; }
  section.block { padding-top: 92px; }
  .items { grid-template-columns: 1fr; gap: 36px; }
  .ba, .hero-photo .ba, .reel { border-radius: 22px; }
  .tabs { justify-content: flex-start; width: auto; max-width: none; margin-left: -20px; margin-right: -20px; border-radius: 0; background: none; padding: 0 20px; }
  .tabs button { background: var(--surface); }
  .tabs button[aria-selected="true"] { background: var(--cta); color: var(--on-cta); box-shadow: none; }
  .final { border-radius: 28px; padding: 48px 20px; margin-top: 92px; }
}
