/* Filome website (step 97). The page is a set of files: every section
   opens with a folder tab, like the categories in the app. One animated
   phone in the hero; nothing else moves on its own. */

@font-face {
  font-family: "Bricolage";
  src: url("../fonts/bricolage-var.woff") format("woff");
  font-weight: 500 800;
  font-display: swap;
}

/* Lexend: made to be easy to read, for every age (the page's readers
   include parents and grandparents). */
@font-face {
  font-family: "Lexend";
  src: url("../fonts/lexend-var.woff") format("woff");
  font-weight: 300 600;
  font-display: swap;
}

:root {
  --ink: #15203b;
  --ink-soft: #46506b;
  --paper: #ffffff;
  --mist: #eef1fb;
  --line: #d7dcec;
  --cobalt: #2b47d6;
  --cobalt-deep: #1f35a8;
  --red: #df2f2a;
  --manila: #f2cf73;
  --manila-deep: #c99a2e;
  --green-tile: #39ff14;
  --focus: #ffb000;

  --display: "Bricolage", "Segoe UI", system-ui, sans-serif;
  --body: "Lexend", "Segoe UI", system-ui, sans-serif;

  --step--1: 0.9rem;
  --step-0: 1.0625rem;
  --step-1: 1.3rem;
  --step-2: 1.7rem;
  --step-3: 2.3rem;
  --step-4: clamp(2.4rem, 5.4vw, 4rem);

  --gutter: clamp(16px, 4vw, 40px);
  --measure: 68ch;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 350 var(--step-0)/1.65 var(--body);
}

strong, b, th { font-weight: 600; }

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

a { color: var(--cobalt); text-underline-offset: 0.18em; }
a:hover { color: var(--cobalt-deep); }

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
  border-radius: 4px;
}

h1, h2, h3 {
  font-family: var(--display);
  font-weight: 750;
  line-height: 1.08;
  letter-spacing: -0.01em;
  margin: 0 0 0.5em;
}

h1 { font-size: var(--step-4); font-weight: 800; }
h2 { font-size: var(--step-3); }
h3 { font-size: var(--step-1); line-height: 1.25; }

p { margin: 0 0 1em; max-width: var(--measure); }

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

.skip {
  position: absolute;
  left: -999px;
  top: 8px;
  background: var(--ink);
  color: #fff;
  padding: 8px 14px;
  border-radius: 8px;
  z-index: 10;
}
.skip:focus { left: 8px; }

/* -- top bar ---------------------------------------------------------------- */

.top {
  border-bottom: 1px solid var(--line);
  background: var(--paper);
}

.top .wrap {
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: 68px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  text-decoration: none;
  font: 800 1.45rem/1 var(--display);
  letter-spacing: 0.01em;
}

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

.top nav { margin-left: auto; }

.top nav ul {
  display: flex;
  gap: 4px 18px;
  list-style: none;
  margin: 0;
  padding: 0;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.top nav a {
  color: var(--ink);
  text-decoration: none;
  font-weight: 700;
}

.top nav a:hover, .top nav a[aria-current="page"] {
  color: var(--cobalt);
  text-decoration: underline;
}

@media (max-width: 640px) {
  .top .wrap { flex-wrap: wrap; padding-top: 10px; padding-bottom: 10px; }
  .top nav { margin-left: 0; width: 100%; }
  .top nav ul { justify-content: flex-start; }
}

/* -- buttons ---------------------------------------------------------------- */

.store {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 10px 18px 10px 14px;
  border-radius: 12px;
  background: var(--ink);
  color: #fff;
  text-decoration: none;
  min-width: 210px;
}

.store:hover { color: #fff; background: #000; }

.store svg { width: 28px; height: 28px; flex: none; }

.store span { display: flex; flex-direction: column; line-height: 1.15; }
.store small { font-size: 0.74rem; opacity: 0.85; }
.store strong { font: 700 1.15rem/1.1 var(--display); }

.store[aria-disabled="true"] { cursor: default; }

.stores { display: flex; flex-wrap: wrap; gap: 12px; margin: 28px 0 10px; }

.soon { color: var(--ink-soft); font-size: var(--step--1); margin: 0; }

.button {
  display: inline-block;
  padding: 12px 20px;
  border-radius: 10px;
  background: var(--cobalt);
  color: #fff;
  font-weight: 700;
  text-decoration: none;
}
.button:hover { background: var(--cobalt-deep); color: #fff; }

/* -- hero ------------------------------------------------------------------- */

.hero { padding: clamp(36px, 7vw, 84px) 0 clamp(40px, 6vw, 72px); }

.hero .wrap {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: clamp(28px, 5vw, 64px);
  align-items: center;
}

.hero h1 { max-width: 13ch; }

.hero .lead {
  font-size: var(--step-1);
  line-height: 1.5;
  color: var(--ink-soft);
  max-width: 34ch;
}

@media (max-width: 860px) {
  .hero .wrap { grid-template-columns: 1fr; }
  .hero h1 { max-width: 16ch; }
}

/* -- the folder: the page's one device --------------------------------------- */

.folder {
  --tab: var(--manila);
  --tab-ink: var(--ink);
  position: relative;
  margin-top: 64px;
  border-top: 6px solid var(--tab);
  background: var(--paper);
}

.folder.on-mist { background: var(--mist); }

.folder > .wrap { padding-top: clamp(28px, 5vw, 56px); padding-bottom: clamp(36px, 6vw, 72px); }

.tab {
  position: absolute;
  top: -48px;
  left: max(var(--gutter), calc((100% - 1160px) / 2 + var(--gutter)));
  height: 42px;
  padding: 0 26px 0 20px;
  display: flex;
  align-items: center;
  background: var(--tab);
  color: var(--tab-ink);
  font: 750 1.05rem/1 var(--display);
  border-radius: 12px 22px 0 0;
}

/* A sliver of the document inside, peeking out like a real file. */
.tab::after {
  content: "";
  position: absolute;
  left: 100%;
  bottom: 0;
  width: 26px;
  height: 22px;
  background: var(--tab);
  clip-path: polygon(0 0, 100% 100%, 0 100%);
}

.folder.red { --tab: var(--red); --tab-ink: #fff; }
.folder.cobalt { --tab: var(--cobalt); --tab-ink: #fff; }
.folder.ink { --tab: var(--ink); --tab-ink: #fff; }

.folder h2 { max-width: 20ch; }

.intro { font-size: var(--step-1); color: var(--ink-soft); line-height: 1.5; }

/* -- what it keeps ----------------------------------------------------------- */

.shelf {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 20px 18px;
  margin-top: 28px;
}

.doc-card {
  padding: 18px 18px 16px;
  border: 1px solid var(--line);
  border-radius: 6px 14px 14px 14px;
  background: var(--paper);
}

.doc-card h3 { margin-bottom: 6px; display: flex; align-items: center; gap: 10px; }

.doc-card p { margin: 0; color: var(--ink-soft); font-size: 0.98rem; }

.swatch {
  width: 14px;
  height: 18px;
  flex: none;
  border-radius: 2px 5px 2px 2px;
  background: var(--c, var(--manila));
}

/* -- how it works (a real sequence) ----------------------------------------- */

.steps {
  list-style: none;
  padding: 0;
  margin: 28px 0 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 28px;
  counter-reset: step;
}

.steps li { counter-increment: step; }

.steps li::before {
  content: counter(step);
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  margin-bottom: 12px;
  border-radius: 50%;
  background: var(--cobalt);
  color: #fff;
  font: 800 1.25rem/1 var(--display);
}

.steps p { color: var(--ink-soft); }

/* -- advantages ------------------------------------------------------------- */

.reasons {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 380px), 1fr));
  gap: 34px 48px;
  margin-top: 30px;
}

.reasons h3 { font-size: var(--step-2); max-width: 18ch; }

.reasons p { color: var(--ink-soft); }

/* -- everything it does ----------------------------------------------------- */

.does {
  columns: 2 320px;
  column-gap: 48px;
  margin-top: 26px;
  padding: 0;
  list-style: none;
}

.does li {
  break-inside: avoid;
  padding: 12px 0 12px 30px;
  border-bottom: 1px solid var(--line);
  position: relative;
}

.does li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 19px;
  width: 14px;
  height: 10px;
  border-left: 3px solid var(--cobalt);
  border-bottom: 3px solid var(--cobalt);
  transform: rotate(-45deg);
}

.does strong { display: block; }

.does span { color: var(--ink-soft); font-size: 0.98rem; }

.does .paid { color: var(--red); font-weight: 700; font-size: 0.9rem; }

/* -- plans ------------------------------------------------------------------ */

.plans {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
  margin-top: 28px;
  align-items: start;
}

.plan {
  border: 2px solid var(--line);
  border-radius: 6px 18px 18px 18px;
  padding: 22px;
  background: var(--paper);
}

.plan.big { border-color: var(--cobalt); }

.plan h3 { font-size: var(--step-2); margin-bottom: 4px; }

.price { font: 750 var(--step-1)/1.2 var(--display); margin: 6px 0 14px; }

.plan ul { padding-left: 1.1em; margin: 0; }
.plan li { margin: 4px 0; }

.addon {
  margin-top: 22px;
  padding: 18px 22px;
  border-left: 6px solid var(--red);
  background: var(--paper);
  max-width: 760px;
}

.note { color: var(--ink-soft); font-size: var(--step--1); }

/* -- FAQ -------------------------------------------------------------------- */

.faq { max-width: 820px; margin-top: 20px; }

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

.faq summary {
  cursor: pointer;
  list-style: none;
  font: 700 var(--step-1)/1.3 var(--display);
  padding: 14px 36px 14px 0;
  position: relative;
}

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

.faq summary::after {
  content: "+";
  position: absolute;
  right: 6px;
  top: 10px;
  font-size: 1.6rem;
  color: var(--cobalt);
  transition: transform 0.2s ease;
}

.faq details[open] summary::after { transform: rotate(45deg); }

.faq details p { color: var(--ink-soft); }

@media (prefers-reduced-motion: reduce) {
  .faq summary::after { transition: none; }
}

/* -- download band ---------------------------------------------------------- */

.download {
  background: var(--cobalt);
  color: #fff;
  padding: clamp(40px, 7vw, 80px) 0;
  margin-top: 0;
}

.download h2 { color: #fff; max-width: 18ch; }
.download p { color: #dfe5ff; }
.download .soon { color: #dfe5ff; }

.download .wrap {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 28px;
  align-items: center;
}

.download img.mark { width: 120px; height: 120px; border-radius: 28px; }

@media (max-width: 640px) {
  .download .wrap { grid-template-columns: 1fr; }
}

/* -- footer ----------------------------------------------------------------- */

footer {
  background: var(--ink);
  color: #c9cfe3;
  padding: 40px 0 48px;
  font-size: 0.97rem;
}

footer .wrap {
  display: grid;
  grid-template-columns: 2fr repeat(3, 1fr);
  gap: 28px;
}

footer h3 { color: #fff; font-size: 1.05rem; margin-bottom: 10px; }

footer ul { list-style: none; padding: 0; margin: 0; }
footer li { margin: 6px 0; }
footer a { color: #fff; }
footer a:hover { color: var(--manila); }

@media (max-width: 760px) {
  footer .wrap { grid-template-columns: 1fr 1fr; }
}

/* -- document pages (manual, policies) -------------------------------------- */

.doc-head { padding: clamp(32px, 6vw, 64px) 0 0; }

.doc-head h1 { font-size: var(--step-3); max-width: 22ch; }

.doc-head .updated { color: var(--ink-soft); }

.doc {
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr);
  gap: 48px;
  align-items: start;
}

.toc {
  position: sticky;
  top: 20px;
  font-size: 0.95rem;
  border-left: 4px solid var(--manila);
  padding-left: 16px;
}

.toc h2 { font-size: 1.05rem; }

.toc ol { padding-left: 1.2em; margin: 0; }
.toc li { margin: 5px 0; }

.prose h2 {
  font-size: var(--step-2);
  margin-top: 1.8em;
  padding-top: 0.6em;
  border-top: 1px solid var(--line);
}

.prose h2:first-child { margin-top: 0; border-top: 0; padding-top: 0; }

.prose h3 { margin-top: 1.4em; }

.prose ul, .prose ol { max-width: var(--measure); padding-left: 1.3em; }
.prose li { margin: 6px 0; }

.prose table {
  border-collapse: collapse;
  width: 100%;
  max-width: 760px;
  margin: 10px 0 20px;
  font-size: 0.96rem;
}

.prose th, .prose td {
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--line);
  padding: 9px 12px 9px 0;
}

.callout {
  border-left: 6px solid var(--manila-deep);
  background: #fdf6e1;
  padding: 14px 18px;
  margin: 18px 0;
  max-width: var(--measure);
}

.callout p:last-child { margin-bottom: 0; }

.fill { background: #ffe9a6; padding: 0 4px; border-radius: 3px; }

@media (max-width: 860px) {
  .doc { grid-template-columns: 1fr; gap: 24px; }
  .toc { position: static; }
}

.video {
  max-width: 260px;
  border-radius: 28px;
  border: 1px solid var(--line);
  margin: 10px 0 24px;
}

/* -- the animated phone (hero) ------------------------------------------------ */

.demo { justify-self: center; width: 100%; max-width: 290px; }

.phone {
  position: relative;
  aspect-ratio: 9 / 18.5;
  width: 100%;
  border-radius: 42px;
  background: #0d1426;
  padding: 12px;
  box-shadow: 0 30px 60px -30px rgba(21, 32, 59, 0.55);
}

.screen {
  position: relative;
  height: 100%;
  border-radius: 32px;
  overflow: hidden;
  background: #f7f8fd;
  font-family: var(--body);
  font-size: 13px;
  color: var(--ink);
}

.strip {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 52px;
  padding: 14px 16px 0;
  background: #c8d9e2;
  font: 800 18px/1 var(--display);
  letter-spacing: 0.04em;
}

.strip img { width: 26px; height: 26px; border-radius: 7px; }

.vault {
  margin: 10px 12px 8px;
  padding: 8px 12px;
  border-radius: 12px;
  background: #e4e8fb;
  font-weight: 700;
  display: flex;
  justify-content: space-between;
}

.vault em { font-style: normal; font-weight: 400; color: var(--ink-soft); }

.cats { padding: 0 12px; display: grid; gap: 7px; }

.cat {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 12px;
  background: #fff;
  border-radius: 12px;
  border: 1px solid #e3e7f3;
  font-weight: 700;
}

.cat small { font-weight: 400; color: var(--ink-soft); }

.cat.target { transition: background 0.4s ease, border-color 0.4s ease; }

/* Scenes: the screen shows one at a time, driven by data-scene. */
.scene {
  position: absolute;
  inset: 0;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.45s ease, visibility 0s linear 0.45s;
}

.phone[data-scene="scan"] .scene.scan,
.phone[data-scene="filed"] .scene.home,
.phone[data-scene="share"] .scene.home,
.phone[data-scene="share"] .scene.share,
.phone[data-scene="backup"] .scene.home,
.phone[data-scene="backup"] .scene.backup {
  opacity: 1;
  visibility: visible;
  transition: opacity 0.45s ease, visibility 0s;
}

.scene.home { z-index: 1; }

/* Scan: the camera, a card, the corners closing in, a flash. */
.scene.scan { background: #222b3f; z-index: 3; }

.viewfinder {
  position: absolute;
  inset: 70px 22px 120px;
  display: grid;
  place-items: center;
}

.idcard {
  width: 86%;
  aspect-ratio: 1.58;
  border-radius: 10px;
  background: linear-gradient(180deg, #fff 0 30%, #f6f7fb 30% 100%);
  border-top: 8px solid #f29b38;
  border-bottom: 8px solid #2f9a4d;
  padding: 10px 12px;
  display: grid;
  grid-template-columns: 34% 1fr;
  gap: 8px;
  transform: rotate(-4deg);
  transition: transform 0.6s ease;
}

.idcard .face { background: #cfd6e6; border-radius: 6px; }

.idcard .lines { display: grid; gap: 7px; align-content: center; }
.idcard .lines i { display: block; height: 7px; border-radius: 4px; background: #c4cbe0; }
.idcard .lines i:nth-child(2) { width: 70%; }
.idcard .lines b { font: 800 13px/1 var(--display); color: #15203b; letter-spacing: 0.12em; }

.corner {
  position: absolute;
  width: 34px;
  height: 34px;
  border: 4px solid var(--green-tile);
  transition: all 0.7s cubic-bezier(.2,.8,.2,1);
}

.corner.tl { left: 0; top: 0; border-right: 0; border-bottom: 0; }
.corner.tr { right: 0; top: 0; border-left: 0; border-bottom: 0; }
.corner.bl { left: 0; bottom: 0; border-right: 0; border-top: 0; }
.corner.br { right: 0; bottom: 0; border-left: 0; border-top: 0; }

.phone.locked .corner.tl { left: 6%; top: 24%; }
.phone.locked .corner.tr { right: 6%; top: 24%; }
.phone.locked .corner.bl { left: 6%; bottom: 24%; }
.phone.locked .corner.br { right: 6%; bottom: 24%; }
.phone.locked .idcard { transform: rotate(0); }

.shutter {
  position: absolute;
  left: 50%;
  bottom: 38px;
  width: 64px;
  height: 64px;
  margin-left: -32px;
  border-radius: 50%;
  border: 5px solid #fff;
  background: rgba(255, 255, 255, 0.25);
}

.flash {
  position: absolute;
  inset: 0;
  background: #fff;
  opacity: 0;
  pointer-events: none;
}

.phone.flashing .flash { animation: flash 0.5s ease-out; }

@keyframes flash { 0% { opacity: 0.95; } 100% { opacity: 0; } }

.scanlabel {
  position: absolute;
  top: 26px;
  left: 0;
  right: 0;
  text-align: center;
  color: #fff;
  font-weight: 700;
}

/* Filed: a small copy of the card drops into Identity. */
.flyer {
  position: absolute;
  z-index: 2;
  left: 50%;
  top: 40%;
  width: 120px;
  margin-left: -60px;
  aspect-ratio: 1.58;
  border-radius: 8px;
  background: #fff;
  border-top: 5px solid #f29b38;
  border-bottom: 5px solid #2f9a4d;
  box-shadow: 0 10px 24px rgba(21, 32, 59, 0.3);
  opacity: 0;
  transform: scale(1.2);
}

.phone[data-scene="filed"] .flyer { animation: file-in 1.4s cubic-bezier(.3,.7,.2,1) forwards; }

@keyframes file-in {
  0% { opacity: 1; transform: translate(0, 0) scale(1.2); }
  70% { opacity: 1; transform: translate(-40px, -142px) scale(0.32); }
  100% { opacity: 0; transform: translate(-40px, -142px) scale(0.2); }
}

.phone[data-scene="filed"] .cat.target,
.phone[data-scene="share"] .cat.target,
.phone[data-scene="backup"] .cat.target {
  background: #fff6d6;
  border-color: var(--manila-deep);
}

.toast {
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 18px;
  z-index: 4;
  padding: 11px 14px;
  border-radius: 12px;
  background: var(--ink);
  color: #fff;
  font-weight: 700;
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.35s ease, transform 0.35s ease;
}

.phone.toasting .toast { opacity: 1; transform: none; }

/* Share: the sheet with the three ways. */
.scene.share { z-index: 3; background: rgba(13, 20, 38, 0.35); }

.sheet {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 16px 16px 22px;
  border-radius: 22px 22px 0 0;
  background: #fff;
  transform: translateY(100%);
  transition: transform 0.5s cubic-bezier(.2,.8,.2,1);
}

.phone[data-scene="share"] .sheet { transform: none; }

.sheet h4 { margin: 0 0 10px; font: 750 15px/1.2 var(--display); }

.way {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  margin-bottom: 6px;
  border: 1px solid #e3e7f3;
  transition: background 0.3s ease, border-color 0.3s ease;
}

.way i {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid #9aa3bd;
  flex: none;
}

.phone.chosen .way.pdf { background: #e4e9ff; border-color: var(--cobalt); }
.phone.chosen .way.pdf i { border: 5px solid var(--cobalt); }

/* Backup: the cloud, then the check. */
.scene.backup { z-index: 3; background: rgba(247, 248, 253, 0.94); display: grid; place-items: center; }

.cloud {
  width: 150px;
  text-align: center;
  font-weight: 700;
}

.cloud svg { width: 110px; height: 80px; margin: 0 auto 10px; }

.cloud .bar {
  height: 8px;
  border-radius: 4px;
  background: #dfe4f5;
  overflow: hidden;
  margin: 10px 0;
}

.cloud .bar b {
  display: block;
  height: 100%;
  width: 0;
  background: var(--cobalt);
}

.phone[data-scene="backup"] .cloud .bar b { animation: fill 1.6s ease-in-out forwards 0.3s; }

@keyframes fill { to { width: 100%; } }

.cloud .done { color: #1c7c3a; opacity: 0; transition: opacity 0.4s ease; }
.phone.backed .cloud .done { opacity: 1; }

.caption {
  margin-top: 18px;
  min-height: 3.4em;
  text-align: center;
  font: 700 var(--step-0)/1.4 var(--display);
}

.caption small {
  display: block;
  font: 400 0.95rem/1.4 var(--body);
  color: var(--ink-soft);
}

.dots { display: flex; justify-content: center; gap: 8px; margin-top: 8px; }

.dots button {
  width: 12px;
  height: 12px;
  padding: 0;
  border-radius: 50%;
  border: 2px solid var(--cobalt);
  background: transparent;
  cursor: pointer;
}

.dots button[aria-pressed="true"] { background: var(--cobalt); }

.pause {
  display: block;
  margin: 10px auto 0;
  font: 600 0.9rem var(--body);
  color: var(--cobalt);
  background: none;
  border: 0;
  cursor: pointer;
  text-decoration: underline;
}

/* Captured for the GIF and video: only the phone, no page around it. */
body.capture { background: #ffffff; }
body.capture .demo { margin: 24px auto; }
body.capture .dots, body.capture .pause { display: none; }
