/* Amana landing page. Colours match the app (android/.../ui/Theme.kt). */
:root {
  --page: #050505;
  --card: #141415;
  --sheet: #1c1c1e;
  --raised: #232325;
  --line: #2e2e31;
  --text: #f2f2f7;
  --dim: #8e8e93;
  --faint: #55555a;
  --green: #30d158;
  --red: #ff453a;
  --max: 1120px;
  --pad: clamp(20px, 5vw, 48px);
  --ease: cubic-bezier(.2, .7, .2, 1);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--page);
  color: var(--text);
  font: 400 17px/1.55 Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, video, svg { display: block; max-width: 100%; }
a { color: inherit; }
h1, h2, h3 { margin: 0; font-weight: 600; letter-spacing: -0.025em; line-height: 1.08; text-wrap: balance; }
p { margin: 0; text-wrap: pretty; }
strong { color: var(--text); font-weight: 600; }

/* Nav */
.nav {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px var(--pad);
  background: rgba(5, 5, 5, .78);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid rgba(46, 46, 49, .6);
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 600; font-size: 19px; letter-spacing: -0.02em; }
.brand svg { width: 28px; height: 28px; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 52px; padding: 0 26px;
  border-radius: 999px;
  background: var(--green); color: #050505;
  font-weight: 600; text-decoration: none;
  transition: transform .2s var(--ease), background .2s;
}
.btn:hover { background: #2bbe50; }
.btn:active { transform: scale(.97); }
.btn:focus-visible, summary:focus-visible, .brand:focus-visible { outline: 2px solid var(--green); outline-offset: 3px; }
.btn-small { min-height: 40px; padding: 0 18px; font-size: 15px; }
.cta-row { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; margin-top: 32px; }
.cta-row.center { justify-content: center; }
.note { color: var(--dim); font-size: 15px; }

.eyebrow { display: inline-flex; align-items: center; gap: 10px; color: var(--dim); font-size: 15px; font-weight: 500; margin-bottom: 22px; }
.dot { width: 9px; height: 9px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 4px rgba(48, 209, 88, .15); }
.lede { color: var(--dim); font-size: clamp(18px, 2.2vw, 22px); margin-top: 22px; max-width: 34ch; }

/* Sections */
section { padding: clamp(72px, 12vw, 140px) var(--pad); max-width: var(--max); margin: 0 auto; }

.hero { display: grid; gap: 40px; align-items: center; padding-top: clamp(48px, 9vw, 110px); }
.hero h1 { font-size: clamp(42px, 7.4vw, 84px); letter-spacing: -0.035em; max-width: 13ch; }

.media { margin: 0; aspect-ratio: 1 / 1; background: var(--page); overflow: hidden; border-radius: 28px; }
.media video, .media img { width: 100%; height: 100%; object-fit: cover; }
.media-hero { aspect-ratio: 1080 / 1350; max-width: 460px; justify-self: center; width: 100%; }
.media-wide { aspect-ratio: 16 / 9; margin-bottom: 56px; }

/* Story beats */
.story { display: grid; gap: 40px; align-items: center; }
.story h2 { font-size: clamp(34px, 5.2vw, 60px); max-width: 16ch; }
.story-copy p { color: var(--dim); font-size: clamp(18px, 2vw, 21px); margin-top: 20px; max-width: 38ch; }
.illo { margin: 0; padding: 20px; border: 1px solid var(--line); border-radius: 28px; background: var(--card); }

.party { fill: var(--sheet); stroke: var(--line); stroke-width: 1.5; }
.party-label { fill: var(--text); font: 600 15px Inter, system-ui, sans-serif; text-anchor: middle; }
.caption { fill: var(--dim); font: 500 13px Inter, system-ui, sans-serif; text-anchor: middle; }

/* Cash: a note travels from you to them, then "Paid". */
.cash .note rect { fill: rgba(48, 209, 88, .12); stroke: var(--green); stroke-width: 1.5; }
.cash .note text { fill: var(--green); font: 600 16px Inter, system-ui, sans-serif; text-anchor: middle; }
.cash .note { transform: translate(60px, 110px); animation: hand-over 4.5s var(--ease) infinite; }
.cash .paid circle { fill: var(--green); }
.cash .paid path { fill: none; stroke: #050505; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.cash .paid text { fill: var(--green); font: 600 15px Inter, system-ui, sans-serif; text-anchor: middle; }
.cash .paid { opacity: 0; animation: paid 4.5s var(--ease) infinite; }
@keyframes hand-over {
  0%, 12% { transform: translate(60px, 110px); opacity: 0; }
  20% { opacity: 1; }
  55%, 85% { transform: translate(360px, 110px); opacity: 1; }
  100% { transform: translate(360px, 110px); opacity: 0; }
}
@keyframes paid { 0%, 52% { opacity: 0; } 60%, 85% { opacity: 1; } 100% { opacity: 0; } }

/* Transfers: a pulse has to pass through the network. */
.wire .track { stroke: var(--line); stroke-width: 2; stroke-dasharray: 4 6; }
.wire .tower circle { fill: var(--raised); stroke: var(--line); stroke-width: 1.5; }
.wire .bars rect { fill: var(--text); }
.wire .pulse { fill: var(--green); animation: through 3.2s var(--ease) infinite; }
@keyframes through {
  0% { transform: translate(94px, 110px); opacity: 0; }
  10% { opacity: 1; }
  40%, 55% { transform: translate(210px, 110px); }
  90% { transform: translate(326px, 110px); opacity: 1; }
  100% { transform: translate(326px, 110px); opacity: 0; }
}

/* The network drops: a transfer that never resolves. */
.story-drop { text-align: left; }
.stuck { margin: 0; }
.stuck-card { background: var(--card); border: 1px solid var(--line); border-radius: 28px; padding: 28px; max-width: 460px; width: 100%; justify-self: center; }
.stuck-top { display: flex; align-items: center; gap: 14px; }
.stuck-amount { font-size: 28px; font-weight: 600; letter-spacing: -0.02em; flex: 1; }
.spinner { width: 26px; height: 26px; border-radius: 50%; border: 3px solid var(--line); border-top-color: var(--dim); animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.bars-off { display: flex; align-items: flex-end; gap: 3px; height: 22px; }
.bars-off i { width: 5px; border-radius: 1px; background: var(--faint); animation: bar-drop 4.5s var(--ease) infinite; }
.bars-off i:nth-child(1) { height: 6px; }
.bars-off i:nth-child(2) { height: 11px; animation-delay: .1s; }
.bars-off i:nth-child(3) { height: 16px; animation-delay: .2s; }
.bars-off i:nth-child(4) { height: 22px; animation-delay: .3s; }
@keyframes bar-drop { 0%, 15% { background: var(--text); } 30%, 100% { background: var(--line); } }
.stuck-lines { list-style: none; margin: 24px 0 0; padding: 0; display: grid; gap: 10px; }
.stuck-lines li { font-size: clamp(20px, 2.6vw, 26px); font-weight: 500; letter-spacing: -0.015em; color: var(--faint); opacity: .35; animation: cycle 6s infinite; }
.stuck-lines li:nth-child(2) { animation-delay: 2s; }
.stuck-lines li:nth-child(3) { animation-delay: 4s; }
@keyframes cycle { 0%, 33% { color: var(--red); opacity: 1; } 40%, 100% { color: var(--faint); opacity: .35; } }

/* The turn */
.turn { text-align: center; padding-top: clamp(96px, 16vw, 200px); padding-bottom: clamp(96px, 16vw, 200px); }
.turn .eyebrow { justify-content: center; }
.display { font-size: clamp(40px, 6.6vw, 80px); letter-spacing: -0.035em; max-width: 15ch; margin: 0 auto; }
.turn .lede { margin-left: auto; margin-right: auto; max-width: 40ch; }

/* Feature groups */
.group { padding-top: clamp(40px, 6vw, 72px); padding-bottom: clamp(40px, 6vw, 72px); }
.group-label { font-size: 15px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--green); margin-bottom: 8px; }
.feature { display: grid; gap: 32px; align-items: center; padding: clamp(32px, 6vw, 64px) 0; border-top: 1px solid var(--line); }
.group-label + .feature { border-top: 0; }
.feature h2 { font-size: clamp(32px, 4.6vw, 52px); max-width: 16ch; }
.feature-copy p { color: var(--dim); font-size: clamp(18px, 2vw, 20px); margin-top: 18px; max-width: 38ch; }

/* Steps */
.steps h2 { font-size: clamp(32px, 4.6vw, 52px); max-width: 18ch; }
.steps ol { list-style: none; padding: 0; margin: 40px 0 0; display: grid; gap: 16px; }
.steps li { background: var(--card); border: 1px solid var(--line); border-radius: 24px; padding: 26px; }
.steps .n { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--raised); color: var(--green); font-weight: 600; margin-bottom: 18px; }
.steps h3 { font-size: 22px; letter-spacing: -0.015em; }
.steps li p { color: var(--dim); margin-top: 8px; }

/* FAQ */
.faq { max-width: 820px; }
.faq h2 { font-size: clamp(32px, 4.6vw, 52px); margin-bottom: 28px; }
.faq details { border-top: 1px solid var(--line); }
.faq details:last-of-type { border-bottom: 1px solid var(--line); }
.faq summary { cursor: pointer; list-style: none; display: flex; justify-content: space-between; gap: 20px; padding: 22px 0; font-size: clamp(18px, 2vw, 21px); font-weight: 500; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--dim); font-weight: 400; font-size: 26px; line-height: 1; transition: transform .25s var(--ease); }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { color: var(--dim); padding: 0 0 24px; max-width: 60ch; }

/* Closing */
.closing { text-align: center; }

.foot { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; max-width: var(--max); margin: 0 auto; padding: 32px var(--pad) 48px; color: var(--faint); font-size: 14px; border-top: 1px solid var(--line); }

/* Scroll reveal (only when JS is running, so content is never hidden without it) */
.js .reveal { opacity: 0; transform: translateY(24px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
.js .reveal.in { opacity: 1; transform: none; }

/* Wider screens */
@media (min-width: 860px) {
  .hero { grid-template-columns: 1.15fr .85fr; }
  .story { grid-template-columns: 1fr 1fr; gap: 64px; }
  .feature { grid-template-columns: 1fr 1fr; gap: 72px; }
  .feature.flip .feature-copy { order: 2; }
  .steps ol { grid-template-columns: repeat(3, 1fr); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js .reveal { opacity: 1; transform: none; }
  .cash .note { transform: translate(360px, 110px); }
  .cash .paid { opacity: 1; }
  .wire .pulse { transform: translate(210px, 110px); }
  .stuck-lines li { color: var(--red); opacity: 1; }
}
