/* Tangem Folio — marketing landing (kept separate from the app shell). */

:root {
  color-scheme: light;
  --ink: #0c1220;
  --ink-2: #3a465c;
  --ink-3: #6b788f;
  --paper: #eef2f7;
  --paper-2: #f7f9fc;
  --line: rgba(12, 18, 32, 0.1);
  --brand: #0066c8;
  --brand-deep: #004a96;
  --accent: #0a7ae0;
  --glow: rgba(0, 102, 200, 0.18);
  --font-display: "Bricolage Grotesque", "Avenir Next", system-ui, sans-serif;
  --font-body: "Source Sans 3", "Avenir Next", system-ui, sans-serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --max: 1120px;
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.55;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { display: block; max-width: 100%; }
a { color: inherit; }
button { font: inherit; }

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

/* Atmosphere */
.atmosphere {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
  background:
    radial-gradient(70% 55% at 78% -10%, rgba(10, 122, 224, 0.28), transparent 58%),
    radial-gradient(50% 40% at -8% 20%, rgba(0, 74, 150, 0.12), transparent 55%),
    linear-gradient(180deg, #e8eef7 0%, var(--paper) 42%, #e6ebf3 100%);
}
.atmosphere::after {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.35;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.55'/%3E%3C/svg%3E");
  mix-blend-mode: soft-light;
}

.shell { position: relative; z-index: 1; }

/* Nav */
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  width: min(var(--max), calc(100% - 40px));
  margin: 0 auto;
  padding: 22px 0 0;
}
.nav-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}
.nav-brand img {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  box-shadow: 0 8px 20px rgba(12, 18, 32, 0.08);
}
.nav-mark {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: -0.03em;
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 8px;
}
.nav-links a {
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--ink-2);
  padding: 8px 12px;
  border-radius: 999px;
  transition: color 0.2s var(--ease), background 0.2s var(--ease);
}
.nav-links a:hover { color: var(--ink); background: rgba(255, 255, 255, 0.55); }
.nav-links .nav-cta {
  color: #fff;
  background: var(--ink);
  padding: 9px 16px;
}
.nav-links .nav-cta:hover { background: var(--brand-deep); color: #fff; }

/* Hero — one composition */
.hero {
  position: relative;
  width: min(var(--max), calc(100% - 40px));
  margin: 0 auto;
  min-height: calc(100svh - 78px);
  display: grid;
  align-content: center;
  padding: 48px 0 72px;
  overflow: hidden;
}

.hero-plane {
  position: absolute;
  inset: -8% -18% auto auto;
  width: min(720px, 92vw);
  height: min(520px, 58vh);
  z-index: 0;
  pointer-events: none;
  border-radius: 40% 48% 36% 52%;
  background:
    radial-gradient(circle at 35% 30%, rgba(255, 255, 255, 0.85), transparent 55%),
    radial-gradient(circle at 70% 60%, rgba(10, 122, 224, 0.35), transparent 60%),
    linear-gradient(145deg, #9ec8f5 0%, #4d8fd6 45%, #1a4f8f 100%);
  filter: blur(2px);
  opacity: 0.9;
  animation: plane-drift 14s var(--ease) infinite alternate;
}
.hero-plane::before {
  content: "";
  position: absolute;
  inset: 12% 18%;
  border-radius: inherit;
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.35), transparent 50%);
  mix-blend-mode: soft-light;
}

.hero-copy {
  position: relative;
  z-index: 1;
  max-width: 34rem;
}

.brand-hero {
  margin: 0 0 18px;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(3.4rem, 10vw, 6.4rem);
  line-height: 0.92;
  letter-spacing: -0.055em;
  color: var(--ink);
}
.brand-hero span {
  display: block;
  color: var(--brand-deep);
}

.hero h1 {
  margin: 0 0 14px;
  font-family: var(--font-display);
  font-weight: 650;
  font-size: clamp(1.35rem, 2.6vw, 1.75rem);
  line-height: 1.25;
  letter-spacing: -0.03em;
  color: var(--ink);
  max-width: 22ch;
}

.hero-lede {
  margin: 0 0 28px;
  max-width: 38ch;
  font-size: 1.08rem;
  color: var(--ink-2);
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 0 20px;
  border-radius: 999px;
  border: 1px solid transparent;
  text-decoration: none;
  font-weight: 700;
  font-size: 0.98rem;
  letter-spacing: -0.01em;
  transition: transform 0.2s var(--ease), background 0.2s var(--ease), border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
.btn:hover { transform: translateY(-1px); }
.btn-primary {
  background: var(--ink);
  color: #fff;
  box-shadow: 0 14px 36px rgba(12, 18, 32, 0.18);
}
.btn-primary:hover { background: var(--brand-deep); }
.btn-ghost {
  background: rgba(255, 255, 255, 0.62);
  border-color: var(--line);
  color: var(--ink);
  backdrop-filter: blur(10px);
}
.btn-ghost:hover { border-color: rgba(12, 18, 32, 0.22); background: #fff; }

.hero-folio {
  position: absolute;
  right: -2%;
  bottom: 8%;
  z-index: 1;
  width: min(460px, 46vw);
  aspect-ratio: 5 / 4;
  pointer-events: none;
  filter: drop-shadow(0 28px 50px rgba(12, 18, 32, 0.18));
  animation: folio-in 1.1s var(--ease) both;
}
.hero-folio svg { width: 100%; height: 100%; }

/* Sections */
.section {
  width: min(var(--max), calc(100% - 40px));
  margin: 0 auto;
  padding: 72px 0;
}
.section + .section { border-top: 1px solid var(--line); }

.section-kicker {
  margin: 0 0 10px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--brand);
}
.section h2 {
  margin: 0 0 12px;
  font-family: var(--font-display);
  font-weight: 750;
  font-size: clamp(1.8rem, 3.5vw, 2.55rem);
  letter-spacing: -0.04em;
  line-height: 1.1;
  max-width: 16ch;
}
.section-lede {
  margin: 0;
  max-width: 48ch;
  color: var(--ink-2);
  font-size: 1.05rem;
}

.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
  margin: 40px 0 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
}
.steps li {
  position: relative;
  padding-top: 8px;
}
.steps li::before {
  counter-increment: step;
  content: "0" counter(step);
  display: block;
  margin-bottom: 14px;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  color: var(--brand);
}
.steps h3 {
  margin: 0 0 8px;
  font-family: var(--font-display);
  font-size: 1.2rem;
  letter-spacing: -0.03em;
}
.steps p {
  margin: 0;
  color: var(--ink-2);
  font-size: 0.98rem;
}

.pillars {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 48px;
  align-items: end;
  margin-top: 40px;
}
.pillar-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 22px;
}
.pillar-list h3 {
  margin: 0 0 6px;
  font-family: var(--font-display);
  font-size: 1.15rem;
  letter-spacing: -0.03em;
}
.pillar-list p {
  margin: 0;
  color: var(--ink-2);
  max-width: 42ch;
}
.pillar-aside {
  padding: 28px 28px 32px;
  border-radius: 28px;
  background: linear-gradient(165deg, #0f1728 0%, #16345f 100%);
  color: #e8eef8;
  box-shadow: 0 24px 50px rgba(12, 18, 32, 0.18);
}
.pillar-aside p {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.45rem;
  line-height: 1.3;
  letter-spacing: -0.03em;
}
.pillar-aside small {
  display: block;
  margin-top: 16px;
  color: rgba(232, 238, 248, 0.68);
  font-size: 0.92rem;
  line-height: 1.45;
}

.trust {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: start;
}
.trust-points {
  margin: 28px 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 14px;
}
.trust-points li {
  display: grid;
  grid-template-columns: 18px 1fr;
  gap: 12px;
  align-items: start;
  color: var(--ink-2);
}
.trust-points svg {
  width: 18px;
  height: 18px;
  margin-top: 3px;
  color: var(--brand);
}

.closing {
  text-align: center;
  padding-bottom: 96px;
}
.closing h2 {
  max-width: none;
  margin-left: auto;
  margin-right: auto;
}
.closing .section-lede {
  margin: 0 auto 28px;
}
.closing .cta-row { justify-content: center; }

.site-foot {
  width: min(var(--max), calc(100% - 40px));
  margin: 0 auto;
  padding: 28px 0 40px;
  border-top: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  gap: 16px 28px;
  justify-content: space-between;
  align-items: flex-start;
  color: var(--ink-3);
  font-size: 0.9rem;
}
.site-foot b { color: var(--ink-2); }
.site-foot nav {
  display: flex;
  flex-wrap: wrap;
  gap: 14px 18px;
}
.site-foot a {
  color: var(--ink-2);
  text-decoration: none;
  font-weight: 600;
}
.site-foot a:hover { color: var(--brand); }

/* Motion */
[data-reveal] {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
  transition-delay: var(--d, 0ms);
}
[data-reveal].is-in,
html.is-ready .hero [data-reveal] {
  opacity: 1;
  transform: none;
}
html.is-ready .brand-hero { animation: brand-rise 0.9s var(--ease) both; }
html.is-ready .hero h1 { animation: brand-rise 0.9s var(--ease) 0.08s both; }
html.is-ready .hero-lede { animation: brand-rise 0.9s var(--ease) 0.16s both; }
html.is-ready .cta-row { animation: brand-rise 0.9s var(--ease) 0.24s both; }

@keyframes brand-rise {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: none; }
}
@keyframes folio-in {
  from { opacity: 0; transform: translate(24px, 28px) rotate(2deg); }
  to { opacity: 1; transform: none; }
}
@keyframes plane-drift {
  from { transform: translate(0, 0) scale(1); }
  to { transform: translate(-18px, 14px) scale(1.04); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
  [data-reveal] { opacity: 1; transform: none; }
}

@media (max-width: 900px) {
  .hero-folio { display: none; }
  .hero-plane {
    inset: auto -30% -10% auto;
    width: 120%;
    height: 55%;
    opacity: 0.55;
  }
  .steps { grid-template-columns: 1fr; gap: 22px; }
  .pillars, .trust { grid-template-columns: 1fr; gap: 28px; }
}

@media (max-width: 640px) {
  .nav { width: calc(100% - 28px); }
  .hero, .section, .site-foot { width: calc(100% - 28px); }
  .nav-links a:not(.nav-cta) { display: none; }
  .hero { min-height: calc(100svh - 70px); padding: 36px 0 56px; }
  .brand-hero { font-size: clamp(3rem, 16vw, 4.4rem); }
}
