/* Capturit website: one stylesheet for every page.
   Minimal, in the app's light-mode colours (lib/constant/semantic_colors.dart):
   background grey100, text grey900, secondary grey700/grey600, lines grey200. */

@font-face {
  font-family: "Inter";
  src: url("/assets/fonts/inter-latin-var.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Ephesis";
  src: url("/assets/fonts/ephesis-latin-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #f9f9f9;
  --surface: #ffffff;
  --line: #e5e7eb;
  --line-strong: #d1d5db;
  --text: #0e0e0e;
  --text-2: #40444d;
  --text-3: #565b66;
  --selected: #e5e7eb;
  --radius: 12px;
  --page: 1120px;
  --pad: 20px;
}

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

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-optical-sizing: auto;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

a {
  color: var(--text);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  text-decoration-color: var(--line-strong);
}

a:hover {
  text-decoration-color: var(--text);
}

:focus-visible {
  outline: 2px solid var(--text);
  outline-offset: 2px;
  border-radius: 6px;
}

h1,
h2,
h3 {
  font-weight: 650;
  letter-spacing: -0.015em;
  line-height: 1.25;
  margin: 0;
}

p {
  margin: 0 0 1em;
}

.skip-link {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 10;
  background: var(--text);
  color: #fff;
  padding: 10px 14px;
  border-radius: 10px;
  font-weight: 600;
  text-decoration: none;
}

.skip-link:focus {
  top: 12px;
}

/* Wordmark: Ephesis, tilted up 6 degrees, letters a little closer, as in the app. */
.wordmark {
  display: inline-block;
  font-family: "Ephesis", cursive;
  font-weight: 700;
  font-size: 32px;
  line-height: 1;
  letter-spacing: -0.02em;
  color: var(--text);
  text-decoration: none;
  transform: rotate(-6deg);
  padding: 6px 2px 2px;
}

/* Top bar */
.site-header {
  border-bottom: 1px solid var(--line);
  background: var(--bg);
}

.site-header .inner {
  max-width: var(--page);
  margin: 0 auto;
  padding: 0 var(--pad);
  height: 64px;
  display: flex;
  align-items: center;
  gap: 14px;
}

.site-header .section-name {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-3);
  padding-left: 14px;
  border-left: 1px solid var(--line-strong);
  text-decoration: none;
}

/* Page layout: sidebar, content, and (on long policies) "On this page" */
.layout {
  max-width: var(--page);
  margin: 0 auto;
  padding: 16px var(--pad) 88px;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 24px;
}

.content {
  min-width: 0;
  max-width: 720px;
}

/* Sidebar. On phones it's a menu at the top of the page. */
.side-menu {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.side-menu > summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 48px;
  padding: 0 16px;
  font-size: 15px;
  font-weight: 600;
}

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

.side-menu > summary::after,
.faq summary::after {
  content: "";
  flex: 0 0 16px;
  height: 16px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3 6l5 5 5-5' fill='none' stroke='%23565B66' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 16px no-repeat;
  transition: transform 0.2s ease;
}

.side-menu[open] > summary::after,
.faq details[open] summary::after {
  transform: rotate(180deg);
}

.side-groups {
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding: 8px 6px 14px;
}

.side-group {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.side-label {
  margin: 0 0 4px 10px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-3);
}

.side-groups a {
  color: var(--text-2);
  text-decoration: none;
  font-size: 15px;
  line-height: 1.4;
  padding: 8px 10px;
  border-radius: 8px;
}

.side-groups a:hover {
  color: var(--text);
  background: rgba(0, 0, 0, 0.04);
}

.side-groups a[aria-current] {
  color: var(--text);
  font-weight: 600;
  background: var(--selected);
}

.side-groups .side-contact {
  border-top: 1px solid var(--line);
  border-radius: 0;
  margin-top: 4px;
  padding-top: 18px;
}

/* "On this page", filled in by site.js from the page's headings */
.toc {
  display: none;
}

/* Page title */
.crumb {
  margin: 0 0 8px;
  font-size: 13px;
  color: var(--text-3);
}

.crumb a {
  color: var(--text-3);
  text-decoration: none;
}

.content h1 {
  font-size: 30px;
  letter-spacing: -0.02em;
}

.lede {
  margin: 8px 0 0;
  font-size: 16px;
  color: var(--text-3);
  max-width: 36em;
}

.updated {
  margin: 8px 0 0;
  font-size: 14px;
  color: var(--text-3);
}

/* Help: questions */
.faq-section {
  padding-top: 40px;
}

.faq-section h2 {
  font-size: 21px;
  margin-bottom: 12px;
}

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

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

.faq summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 0;
  font-size: 16px;
  font-weight: 500;
  line-height: 1.45;
}

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

.faq details[open] summary {
  font-weight: 600;
}

.faq .answer {
  color: var(--text-2);
  padding: 0 0 18px;
  max-width: 40em;
}

.faq .answer p:last-child,
.faq .answer ul:last-child {
  margin-bottom: 0;
}

.faq .answer strong {
  color: var(--text);
  font-weight: 600;
}

/* Answers slide open where the browser can animate to "auto" height. */
@supports (interpolate-size: allow-keywords) {
  .faq {
    interpolate-size: allow-keywords;
  }

  .faq details::details-content {
    height: 0;
    overflow: clip;
    transition: height 0.2s ease, content-visibility 0.2s allow-discrete;
  }

  .faq details[open]::details-content {
    height: auto;
  }
}

/* "Still need help?" */
.contact-row {
  margin-top: 48px;
  padding-top: 28px;
  border-top: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.contact-row h2 {
  font-size: 17px;
  font-weight: 600;
  letter-spacing: 0;
}

.contact-row p {
  margin: 4px 0 0;
  font-size: 15px;
  color: var(--text-3);
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 18px;
  border-radius: 10px;
  background: var(--text);
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
}

.button:hover {
  background: #2a2c31;
}

/* Policy pages */
.prose {
  color: var(--text-2);
  padding-top: 8px;
}

.prose h2 {
  color: var(--text);
  font-size: 19px;
  margin: 40px 0 10px;
}

.prose h3 {
  color: var(--text);
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0;
  margin: 22px 0 6px;
}

.prose p,
.prose li {
  font-size: 16px;
  line-height: 1.7;
}

.prose ul,
.prose ol {
  margin: 0 0 1em;
  padding-left: 1.25em;
}

.prose li {
  margin-bottom: 0.3em;
}

.prose strong {
  color: var(--text);
  font-weight: 600;
}

.panel {
  margin: 28px 0 8px;
  padding: 18px 22px 6px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.panel h2 {
  font-size: 16px;
  margin: 0 0 8px;
}

.panel ul {
  padding-left: 1.2em;
}

.steps {
  counter-reset: step;
  list-style: none;
  padding: 0 !important;
}

.steps li {
  counter-increment: step;
  position: relative;
  padding-left: 30px;
  margin-bottom: 10px;
}

.steps li::before {
  content: counter(step) ".";
  position: absolute;
  left: 0;
  color: var(--text);
  font-weight: 600;
}

.prose .button {
  margin: 4px 0 16px;
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--line);
  color: var(--text-3);
  font-size: 13px;
}

.site-footer .inner {
  max-width: var(--page);
  margin: 0 auto;
  padding: 22px var(--pad) 32px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 24px;
}

/* Computer widths: sidebar on the left, always open */
@media (min-width: 900px) {
  :root {
    --pad: 24px;
  }

  .layout {
    grid-template-columns: 230px minmax(0, 1fr);
    gap: 48px;
    padding-top: 40px;
  }

  .sidebar {
    position: sticky;
    top: 24px;
    align-self: start;
    max-height: calc(100vh - 48px);
    overflow-y: auto;
  }

  .side-menu {
    border: 0;
    background: none;
  }

  .side-menu > summary {
    display: none;
  }

  .side-groups {
    padding: 0;
  }
}

/* Wide screens: "On this page" on the right of long policies */
@media (min-width: 1180px) {
  .layout.has-toc {
    grid-template-columns: 230px minmax(0, 1fr) 200px;
  }

  .toc:not(:empty) {
    display: block;
    position: sticky;
    top: 24px;
    align-self: start;
    font-size: 13px;
    padding-top: 2px;
  }

  .toc p {
    margin: 0 0 10px;
    font-weight: 600;
  }

  .toc ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
  }

  .toc a {
    color: var(--text-3);
    text-decoration: none;
    line-height: 1.4;
  }

  .toc a:hover,
  .toc a[aria-current] {
    color: var(--text);
  }

  .toc a[aria-current] {
    font-weight: 600;
  }
}

@media (prefers-reduced-motion: reduce) {
  .faq summary::after,
  .side-menu > summary::after,
  .faq details::details-content {
    transition: none;
  }
}

/* =========================================================================
   Home page
   ========================================================================= */

.home-header .inner {
  justify-content: space-between;
}

.home-nav {
  display: flex;
  align-items: center;
  gap: 4px;
}

.home-nav a {
  color: var(--text-2);
  text-decoration: none;
  font-size: 15px;
  font-weight: 500;
  padding: 10px 12px;
  border-radius: 8px;
}

.home-nav a:hover {
  color: var(--text);
}

.home-nav .button {
  color: #fff;
  min-height: 40px;
  padding: 0 16px;
  margin-left: 8px;
  font-size: 14px;
}

.home-nav .nav-link-optional {
  display: none;
}

@media (min-width: 640px) {
  .home-nav .nav-link-optional {
    display: inline-block;
  }
}

.wrap {
  max-width: var(--page);
  margin: 0 auto;
  padding: 0 var(--pad);
}

/* Hero: headline, store buttons, two phones, faded event photos behind */
.hero {
  position: relative;
  overflow: hidden;
  padding: 56px 0 72px;
}

.hero-photos {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.hero-photos img {
  position: absolute;
  object-fit: cover;
  border-radius: 16px;
  opacity: 0.14;
  will-change: transform, filter, opacity;
}

.hero-photos .p-wedding { left: -2%; top: 4%; width: 22%; aspect-ratio: 2 / 3; }
.hero-photos .p-trip { left: 34%; top: -6%; width: 34%; aspect-ratio: 3 / 2; }
.hero-photos .p-festival { left: 22%; bottom: -8%; width: 36%; aspect-ratio: 3 / 2; }
.hero-photos .p-party { right: -3%; top: 30%; width: 24%; aspect-ratio: 2 / 3; }

.hero-inner {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 48px;
  align-items: center;
}

.hero h1 {
  font-size: clamp(42px, 6.4vw, 80px);
  line-height: 1;
  font-weight: 650;
  letter-spacing: -0.045em;
  max-width: 11em;
  text-wrap: balance;
}

.hero .sub {
  margin: 20px 0 0;
  font-size: clamp(18px, 2vw, 21px);
  line-height: 1.45;
  color: var(--text-2);
  max-width: 26em;
}

.store-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 32px;
}

.store-button {
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  min-height: 54px;
  padding: 0 20px;
  border-radius: 12px;
  background: var(--text);
  color: #fff;
  text-decoration: none;
  line-height: 1.15;
}

.store-button small {
  font-size: 11px;
  opacity: 0.75;
}

.store-button span {
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.store-button:hover {
  background: #2a2c31;
}

.store-note {
  margin: 14px 0 0;
  font-size: 13px;
  color: var(--text-3);
}

/* Phone mockups: a real screenshot inside a drawn phone, with a metal rim,
   glass, side buttons and real thickness (edge layers added by home.js). */
.phone {
  --depth: 16px;
  position: relative;
  width: 100%;
  border-radius: 15% / 7%;
  transform-style: preserve-3d;
}

.phone-rim {
  position: relative;
  border-radius: inherit;
  padding: 1.1%;
  background: linear-gradient(135deg, #e4e5e9 0%, #8b8d94 18%, #3a3b40 42%, #6d6f76 62%, #c9cacf 82%, #f2f3f5 100%);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.35);
  transform: translateZ(0.5px);
}

.phone-screen {
  position: relative;
  border-radius: 14.2% / 6.6%;
  padding: 3%;
  background: #050506;
  overflow: hidden;
}

.phone-screen img {
  width: 100%;
  border-radius: 12% / 5.6%;
}

/* A faint reflection across the glass */
.phone-screen::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(115deg, rgba(255, 255, 255, 0.14) 0%, rgba(255, 255, 255, 0.04) 28%, rgba(255, 255, 255, 0) 42%);
  pointer-events: none;
}

/* The phone's side, built from layers stacked behind the front */
.phone-edge {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: #46474d;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.phone-edge:last-of-type {
  background: #2c2d31;
  box-shadow: 0 40px 70px -18px rgba(14, 14, 16, 0.45), 0 10px 18px -8px rgba(14, 14, 16, 0.3);
}

.phone-button {
  position: absolute;
  width: 4px;
  border-radius: 2px;
  background: linear-gradient(90deg, #6d6f76, #c9cacf);
}

.phone-button.left { left: -3px; }
.phone-button.right { right: -3px; }

.hero-phones {
  position: relative;
  height: 520px;
  perspective: 1800px;
}

.hero-phones .phone {
  position: absolute;
  width: 240px;
}

.hero-phones .phone-front {
  right: 2%;
  top: 70px;
  z-index: 2;
  transform: rotateY(-20deg) rotateX(6deg);
}

.hero-phones .phone-back {
  right: 38%;
  top: 0;
  z-index: 1;
  transform: rotateY(-20deg) rotateX(6deg) scale(0.94);
}

/* Sections */
.home-section {
  padding: 88px 0;
  border-top: 1px solid var(--line);
}

.section-title {
  font-size: clamp(30px, 4vw, 44px);
  line-height: 1.1;
  letter-spacing: -0.035em;
  max-width: 16em;
}

.steps-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr));
  gap: 32px;
  margin-top: 40px;
}

.step {
  padding-top: 20px;
  border-top: 1px solid var(--text);
}

.step b {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-3);
}

.step h3 {
  margin: 10px 0 6px;
  font-size: 21px;
  letter-spacing: -0.02em;
}

.step p {
  margin: 0;
  color: var(--text-2);
}

/* Feature rows: text beside a tilted phone, alternating sides */
.features {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.feature {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 32px;
  align-items: center;
  padding: 24px 0;
}

.feature h2 {
  font-size: clamp(30px, 4vw, 46px);
  line-height: 1.05;
  letter-spacing: -0.04em;
  max-width: 10em;
}

.feature p {
  margin: 14px 0 0;
  font-size: 18px;
  color: var(--text-2);
  max-width: 24em;
}

.feature-media {
  display: flex;
  justify-content: center;
  perspective: 1600px;
}

.feature-media .phone {
  width: 260px;
  transform: rotateY(var(--ry, -16deg)) rotateX(var(--rx, 6deg));
}

.feature.flip .feature-media .phone {
  transform: rotateY(var(--ry-flip, 16deg)) rotateX(var(--rx, 6deg));
}

/* Privacy and download */
.statement {
  font-size: clamp(26px, 3.4vw, 40px);
  line-height: 1.2;
  font-weight: 650;
  letter-spacing: -0.03em;
  max-width: 20em;
}

.statement-sub {
  margin: 16px 0 0;
  font-size: 18px;
  color: var(--text-2);
  max-width: 34em;
}

.download {
  text-align: center;
}

.download .section-title {
  margin: 0 auto;
}

.download .store-buttons {
  justify-content: center;
}

.home-footer .inner {
  align-items: center;
}

.home-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 18px;
}

.home-footer a {
  color: var(--text-3);
  text-decoration: none;
}

.home-footer a:hover {
  color: var(--text);
}

@media (min-width: 900px) {
  .hero {
    padding: 72px 0 96px;
  }

  .hero-inner {
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  }

  .hero-phones {
    height: 600px;
  }

  .hero-phones .phone {
    width: 270px;
  }

  .feature {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 64px;
  }

  .feature.flip .feature-media {
    order: -1;
  }

  .feature-media .phone {
    width: 290px;
  }
}

@media (max-width: 899px) {
  /* Too narrow for photos around the text: they'd sit behind the headline */
  .hero-photos {
    display: none;
  }

  .hero {
    padding: 40px 0 56px;
  }

  .hero-inner {
    gap: 32px;
  }

  /* The two phones as one centred pair */
  .hero-phones {
    height: 440px;
    width: 100%;
  }

  .hero-phones .phone {
    width: 200px;
  }

  .hero-phones .phone-back {
    right: auto;
    left: calc(50% - 175px);
    top: 0;
  }

  .hero-phones .phone-front {
    right: auto;
    left: calc(50% - 25px);
    top: 50px;
  }
}

@media (max-width: 420px) {
  .hero-phones {
    height: 400px;
  }

  .hero-phones .phone {
    width: 180px;
  }

  .hero-phones .phone-back {
    left: calc(50% - 158px);
  }

  .hero-phones .phone-front {
    left: calc(50% - 22px);
    top: 44px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero-photos img {
    will-change: auto;
  }
}
