/* Siftory website. Colours from the app theme (src/theme/app-theme.ts). */
:root {
  --page: #E9EEE9;
  --card: #FFFDF8;
  --tint: #EEF4F0;
  --pale: #DCE9E2;
  --deep: #174B3A;
  --primary: #2F7259;
  --ink: #10231C;
  --muted: #4A5F56;
  --line: #A9C2B6;
  --gold: #D3A84F;
  --gold-soft: #F4E6BE;
  --orange: #E88B32;
  --sift: #F0A85E;
  --coll: #8FC2A8;
  --danger: #A33A32;
  --marker: #C2303A;
  --keep: #1F6B47; --keep-bg: #C9E7D5;
  --later: #1F6773; --later-bg: #C5E5E8;
  --fav: #6E5210; --fav-bg: #F1DEA2;
  --trash: #9E2F2F; --trash-bg: #F1CACA;
  --browse: #2F5672; --browse-bg: #D7E2EA;
  --radius: 24px;
  --shadow: 0 1px 2px rgba(16, 35, 28, .06), 0 10px 30px -12px rgba(40, 71, 59, .28);
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --wrap: 1120px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--ink);
  background: var(--page);
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--primary); text-underline-offset: .18em; }
a:hover { color: var(--deep); }
h1, h2, h3 { line-height: 1.15; letter-spacing: -.02em; margin: 0 0 .5em; }
h1 { font-size: clamp(2.25rem, 8vw, 3.75rem); font-weight: 900; }
h2 { font-size: clamp(1.6rem, 5vw, 2.3rem); font-weight: 900; }
h3 { font-size: 1.2rem; font-weight: 800; }
p { margin: 0 0 1em; }

:focus-visible { outline: 3px solid var(--orange); outline-offset: 3px; border-radius: 6px; }
.skip-link {
  position: absolute; left: 1rem; top: -4rem; z-index: 10;
  background: var(--deep); color: #fff; padding: .6rem 1rem; border-radius: 12px; font-weight: 800;
}
.skip-link:focus { top: 1rem; color: #fff; }
.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

.wrap { width: min(100% - 2.5rem, var(--wrap)); margin-inline: auto; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 5;
  background: rgba(233, 238, 233, .92);
  backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid rgba(169, 194, 182, .5);
}
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 64px; }
.brand { display: inline-flex; align-items: center; gap: .55rem; text-decoration: none; color: var(--ink); font-weight: 900; font-size: 1.35rem; letter-spacing: -.03em; }
.brand img { width: 36px; height: 36px; border-radius: 10px; }
.brand:hover { color: var(--ink); }
.site-nav ul { display: flex; gap: .25rem; list-style: none; margin: 0; padding: 0; }
.site-nav a {
  display: inline-block; padding: .5rem .7rem; border-radius: 999px;
  text-decoration: none; font-weight: 700; font-size: .95rem; color: var(--ink);
}
.site-nav a:hover { background: var(--pale); }
.site-nav a[aria-current="page"] { background: var(--deep); color: #fff; }
@media (max-width: 420px) {
  .site-nav .nav-optional { display: none; }
  .site-nav a { padding: .45rem .55rem; font-size: .9rem; }
}

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .65rem;
  min-height: 52px; padding: .7rem 1.3rem; border-radius: 16px;
  font: inherit; font-weight: 800; text-decoration: none; border: 0; cursor: pointer;
}
.btn-play { background: var(--ink); color: #fff; }
.btn-play:hover { color: #fff; background: #000; }
.btn-play svg { width: 26px; height: 26px; flex: none; }
.btn-play span { display: grid; line-height: 1.15; text-align: left; }
.btn-play small { font-size: .72rem; font-weight: 600; opacity: .85; letter-spacing: .02em; text-transform: uppercase; }
.btn-play strong { font-size: 1.1rem; }
.btn-play[aria-disabled="true"] { cursor: default; }
.btn-ghost { background: transparent; color: var(--deep); border: 2px solid var(--line); }
.btn-ghost:hover { border-color: var(--deep); }

/* Hero */
.hero { padding: 2.5rem 0 3rem; overflow: hidden; }
.hero .wrap { display: grid; gap: 2.5rem; align-items: center; }
.hero-logo { width: 88px; height: 88px; border-radius: 24px; box-shadow: var(--shadow); margin-bottom: 1.25rem; }
.eyebrow { display: inline-block; font-size: .8rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--primary); margin-bottom: .75rem; }
.lead { font-size: clamp(1.15rem, 3.6vw, 1.4rem); color: var(--muted); max-width: 34ch; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .75rem; align-items: center; margin: 1.5rem 0 1rem; }
.beta { font-size: .98rem; color: var(--muted); }
.trust { display: flex; flex-wrap: wrap; gap: .5rem; list-style: none; padding: 0; margin: 1.25rem 0 0; }
.trust li { background: var(--card); border: 1px solid var(--pale); border-radius: 999px; padding: .3rem .8rem; font-size: .88rem; font-weight: 700; color: var(--deep); }
.hero-phones { display: flex; justify-content: center; gap: 1rem; }
.hero-phones .phone:nth-child(2) { display: none; }
@media (min-width: 600px) { .hero-phones .phone:nth-child(2) { display: flex; transform: translateY(2rem); } }
@media (min-width: 960px) {
  .hero { padding: 4rem 0 5rem; }
  .hero .wrap { grid-template-columns: 1.05fr 1fr; }
}

/* Sections */
section { padding: 3rem 0; }
.section-intro { max-width: 60ch; color: var(--muted); margin-bottom: 2rem; }
.band { background: var(--deep); color: #fff; }
.band h2, .band h3 { color: #fff; }
.band .section-intro, .band p { color: #D6E6DD; }

.steps { list-style: none; padding: 0; margin: 0; display: grid; gap: 1rem; counter-reset: step; }
.steps li { position: relative; padding: 1.25rem 1.25rem 1.25rem 4.25rem; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.18); border-radius: var(--radius); counter-increment: step; }
.steps li::before {
  content: counter(step); position: absolute; left: 1.25rem; top: 1.2rem;
  width: 2.1rem; height: 2.1rem; border-radius: 50%; display: grid; place-items: center;
  background: var(--orange); color: var(--ink); font-weight: 900;
}
.steps h3 { margin-bottom: .25rem; }
.steps p { margin: 0; }
@media (min-width: 760px) { .steps { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1040px) { .steps { grid-template-columns: repeat(4, 1fr); } .steps li { padding: 4rem 1.25rem 1.25rem; } .steps li::before { top: 1.25rem; } }

.cards { display: grid; gap: 1rem; }
@media (min-width: 680px) { .cards { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1040px) { .cards { grid-template-columns: repeat(3, 1fr); } }
.card { background: var(--card); border-radius: var(--radius); padding: 1.5rem; box-shadow: var(--shadow); }
.card p { color: var(--muted); margin: 0; }
.card-icon { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; margin-bottom: .9rem; font-size: 1.3rem; font-weight: 900; }
.ic-sift { background: var(--sift); color: var(--ink); }
.ic-roll { background: var(--deep); color: #fff; }
.ic-coll { background: var(--coll); color: var(--ink); }
.ic-review { background: var(--gold-soft); color: var(--fav); }
.ic-private { background: var(--pale); color: var(--deep); }
.card-wide { background: var(--deep); color: #fff; }
.card-wide p { color: #D6E6DD; }

.showcase { display: grid; gap: 2.5rem; align-items: center; }
.showcase + .showcase { margin-top: 3rem; }
@media (min-width: 860px) {
  .showcase { grid-template-columns: 1fr 1fr; }
  .showcase.flip > :first-child { order: 2; }
}
.ticks { list-style: none; padding: 0; margin: 1rem 0 0; display: grid; gap: .6rem; }
.ticks li { padding-left: 1.9rem; position: relative; }
.ticks li::before { content: ""; position: absolute; left: 0; top: .3em; width: 1.15rem; height: 1.15rem; border-radius: 50%; background: var(--primary); box-shadow: inset 0 0 0 4px var(--pale); }

.cta { text-align: center; }
.cta .hero-actions { justify-content: center; }

/* Phone mocks */
.phone {
  --w: 248px;
  width: var(--w); flex: none;
  aspect-ratio: 9 / 18.5;
  background: var(--page);
  border: 9px solid var(--ink);
  border-radius: 38px;
  box-shadow: 0 30px 60px -25px rgba(16, 35, 28, .55);
  padding: 1.6rem .8rem .8rem;
  display: flex; flex-direction: column; gap: .55rem;
  position: relative;
  font-size: 12px; line-height: 1.3;
}
.phone::before { content: ""; position: absolute; top: 8px; left: 50%; width: 54px; height: 6px; margin-left: -27px; border-radius: 6px; background: var(--ink); opacity: .9; }
.phone.dark { background: #0B0F0D; color: #fff; }
.phone.dark::before { background: #2a332f; }
.phone.short { aspect-ratio: auto; min-height: 380px; }

.m-head { display: flex; align-items: center; gap: .4rem; font-weight: 900; font-size: 14px; }
.m-logo { width: 20px; height: 20px; border-radius: 6px; background: url("assets/favicon.png") center / cover, var(--deep); }
.m-head .m-grow { flex: 1; }
.m-cog { width: 18px; height: 18px; border-radius: 50%; border: 2.5px dashed var(--ink); }
.m-bar { border-radius: 10px; padding: .55rem .7rem; font-weight: 900; font-size: 11.5px; position: relative; }
.m-card { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: .55rem; display: grid; gap: .35rem; position: relative; }
.m-card b { font-size: 13px; }
.m-card small { color: var(--muted); font-size: 10.5px; }
.m-nav { margin-top: auto; display: flex; justify-content: space-around; padding-top: .45rem; border-top: 1px solid var(--line); font-size: 10px; font-weight: 800; color: var(--muted); position: relative; }
.m-nav .on { color: var(--deep); }

.m-stage { flex: 1; display: grid; grid-template-rows: auto 1fr auto; gap: .45rem; }
.m-mid { display: grid; grid-template-columns: auto 1fr auto; gap: .45rem; align-items: center; }
.m-tab { justify-self: center; border: 2px solid; border-radius: 9px; padding: .25rem .7rem; font-weight: 900; font-size: 11px; position: relative; }
.m-tab.v { writing-mode: vertical-rl; padding: .7rem .2rem; }
.m-tab.v.l { transform: rotate(180deg); }
.t-keep { color: var(--keep); background: var(--keep-bg); border-color: var(--keep); }
.t-later { color: var(--later); background: var(--later-bg); border-color: var(--later); }
.t-fav { color: var(--fav); background: var(--fav-bg); border-color: var(--fav); }
.t-trash { color: var(--trash); background: var(--trash-bg); border-color: var(--trash); }
.t-browse { color: var(--browse); background: var(--browse-bg); border-color: var(--browse); }
.m-photo {
  position: relative; height: 100%; min-height: 150px; border-radius: 12px; overflow: hidden;
  background:
    radial-gradient(circle at 72% 26%, #F4E6BE 0 9%, transparent 10%),
    linear-gradient(170deg, transparent 55%, #2F7259 56% 70%, #174B3A 71%),
    linear-gradient(160deg, #9CC9D9, #DCE9E2 60%);
  box-shadow: 0 8px 18px -8px rgba(0,0,0,.4);
}
.m-photo.tilt { transform: rotate(-4deg) translateY(-4px); }
.m-photo.b { background:
    radial-gradient(ellipse at 50% 120%, #E88B32 0 30%, transparent 31%),
    linear-gradient(180deg, #F0A85E, #F4E6BE 70%, #D3A84F); }
.m-tools { display: flex; justify-content: center; gap: .35rem; font-size: 10px; font-weight: 800; position: relative; }
.m-tools span { background: var(--card); border: 1px solid var(--line); border-radius: 999px; padding: .15rem .5rem; color: var(--deep); }
.dark .m-tools span { background: rgba(255,255,255,.14); border-color: rgba(255,255,255,.25); color: #fff; }
.m-pill { justify-self: center; background: rgba(255,255,255,.16); border-radius: 12px; padding: .3rem .65rem; font-weight: 800; font-size: 10.5px; position: relative; }
.m-top { display: flex; justify-content: space-between; align-items: center; font-weight: 800; font-size: 10.5px; position: relative; }
.m-top span { background: rgba(255,255,255,.14); border-radius: 999px; padding: .2rem .55rem; }
.m-progress { height: 6px; border-radius: 6px; background: #F7E8D6; overflow: hidden; }
.m-progress i { display: block; width: 38%; height: 100%; background: var(--orange); }
.m-row { display: flex; align-items: center; gap: .45rem; background: var(--card); border-radius: 11px; padding: .4rem; position: relative; }
.m-row .m-grow { flex: 1; min-width: 0; }
.m-row b { display: block; font-size: 11.5px; }
.m-row small { color: var(--muted); font-size: 10px; }
.m-row .m-link { color: var(--primary); font-weight: 800; font-size: 10.5px; }
.m-num { width: 22px; height: 22px; border-radius: 50%; background: var(--deep); color: #fff; display: grid; place-items: center; font-weight: 900; font-size: 11px; flex: none; }
.m-thumb { width: 30px; height: 30px; border-radius: 7px; flex: none; background: #B9CFC3; }
.m-grid { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; }
.m-tile { position: relative; display: grid; gap: .2rem; font-weight: 800; font-size: 11px; }
.m-tile i { display: block; height: 62px; border-radius: 10px; }
.m-tile small { font-weight: 600; color: var(--muted); font-size: 9.5px; }
.m-label { font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin-top: .2rem; }
.m-toggle { width: 28px; height: 16px; border-radius: 999px; background: var(--primary); position: relative; flex: none; }
.m-toggle::after { content: ""; position: absolute; right: 2px; top: 2px; width: 12px; height: 12px; border-radius: 50%; background: #fff; }
.m-toggle.off { background: var(--line); }
.m-toggle.off::after { right: auto; left: 2px; }
.m-radio { width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--line); flex: none; }
.m-radio.on { border: 4px solid var(--primary); }
.m-chips { display: flex; flex-wrap: wrap; gap: .3rem; }
.m-chips span { font-size: 10px; font-weight: 800; padding: .15rem .5rem; border-radius: 999px; background: var(--pale); color: var(--deep); }
.m-chips span.on { background: var(--deep); color: #fff; }
.m-arrow { position: absolute; font-weight: 900; font-size: 18px; color: rgba(255,255,255,.9); text-shadow: 0 1px 4px rgba(0,0,0,.4); }

/* Callout markers */
.mk {
  position: absolute; z-index: 2;
  width: 22px; height: 22px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--marker); color: #fff; border: 2px solid #fff;
  font: 900 11px/1 var(--font);
  box-shadow: 0 2px 6px rgba(0,0,0,.35);
  writing-mode: horizontal-tb;
}
.mk.r { right: -11px; top: -9px; }
.mk.l { left: -11px; top: -9px; }
.mk.c { left: calc(50% - 11px); top: calc(50% - 11px); }
.m-tab.v.l .mk { transform: rotate(180deg); }

/* Guide layout (support page) */
.guide-nav { display: flex; flex-wrap: wrap; gap: .5rem; list-style: none; padding: 0; margin: 0 0 1rem; }
.guide-nav a { display: inline-block; padding: .4rem .85rem; border-radius: 999px; background: var(--card); border: 1px solid var(--pale); text-decoration: none; font-weight: 700; font-size: .92rem; color: var(--deep); }
.guide-nav a:hover { border-color: var(--deep); }
.guide { display: grid; gap: 1.75rem; align-items: start; padding: 2rem 0; border-top: 1px solid rgba(169, 194, 182, .6); }
.guide figure { margin: 0; display: flex; justify-content: center; }
.guide h3 { font-size: 1.45rem; }
.guide .intro { color: var(--muted); }
@media (min-width: 820px) { .guide { grid-template-columns: 300px 1fr; gap: 3rem; } }
.legend { list-style: none; padding: 0; margin: 1rem 0 0; display: grid; gap: .75rem; counter-reset: lg; }
.legend li { position: relative; padding-left: 2.4rem; counter-increment: lg; }
.legend li::before {
  content: counter(lg); position: absolute; left: 0; top: .05em;
  width: 1.6rem; height: 1.6rem; border-radius: 50%;
  background: var(--marker); color: #fff; display: grid; place-items: center;
  font-weight: 900; font-size: .85rem;
}
.legend strong { color: var(--deep); }
.note { background: var(--gold-soft); border-radius: 16px; padding: .9rem 1.1rem; margin-top: 1.25rem; font-size: .98rem; }

.faq details { background: var(--card); border-radius: 18px; box-shadow: var(--shadow); margin-bottom: .75rem; }
.faq summary { cursor: pointer; padding: 1.1rem 3rem 1.1rem 1.25rem; font-weight: 800; position: relative; list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 1.25rem; top: .85rem; font-size: 1.5rem; font-weight: 700; color: var(--primary); }
.faq details[open] summary::after { content: "\2212"; }
.faq .answer { padding: 0 1.25rem 1.1rem; color: var(--muted); }
.faq .answer p:last-child { margin-bottom: 0; }
.tag { display: inline-block; font-size: .72rem; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; background: var(--pale); color: var(--deep); padding: .1rem .5rem; border-radius: 999px; vertical-align: middle; margin-left: .3rem; }

/* Legal / plain pages */
.page-head { padding: 2.5rem 0 1rem; }
.prose { max-width: 72ch; padding-bottom: 3rem; }
.prose h2 { font-size: 1.5rem; margin-top: 2rem; }
.prose h3 { margin-top: 1.5rem; }
.prose ul, .prose ol { padding-left: 1.3rem; }
.prose li { margin-bottom: .35rem; }

/* Footer */
.site-footer { background: var(--ink); color: #C9D8D0; padding: 2.5rem 0; margin-top: 2rem; font-size: .95rem; }
.site-footer .wrap { display: grid; gap: 1.25rem; }
.site-footer a { color: #fff; }
.site-footer ul { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: .5rem 1.25rem; }
.site-footer .brand { color: #fff; font-size: 1.2rem; }
.site-footer p { margin: 0; }
@media (min-width: 760px) { .site-footer .wrap { grid-template-columns: 1fr auto; align-items: center; } }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
@media (prefers-reduced-motion: no-preference) {
  .btn, .site-nav a, .guide-nav a { transition: background-color .15s, border-color .15s, color .15s; }
  .hero-phones .m-photo.tilt { animation: nudge 4s ease-in-out infinite; }
  @keyframes nudge { 0%, 100% { transform: rotate(-4deg) translateY(-4px); } 50% { transform: rotate(-1deg) translateY(-14px); } }
}
@media print { .site-header, .site-footer, .hero-phones { display: none; } }
.m-tab.v.t-browse { writing-mode: horizontal-tb; padding: 1.4rem .3rem; }
.phone .mk { background: var(--marker); color: #fff; border: 2px solid #fff; border-radius: 50%; padding: 0; }
