/* ==========================================================================
   Finomo — Design 
   ========================================================================== */
:root {
  --color-bg: #ffffff;
  --color-surface: #f6f6f6;
  --color-text: #0a0a0a;
  --color-text-muted: #666666;
  --color-border: #e2e2e2;
  --color-success: #1f9d63;
  --color-danger: #d43b3b;

  /* App-screenshot palette — mockup always mirrors the OPPOSITE theme of the site */
  --app-bg: #13151c;
  --app-text: #f5f7fa;
  --app-text-muted: #97a1b3;
  --app-accent: #5b93ff;
  --app-accent-bg: rgba(91, 147, 255, 0.16);
  --app-border: #272b37;
  --app-chart-1: #5b93ff;
  --app-chart-2: #ff9f43;
  --app-chart-3: #b98cf0;
  --app-chart-4: #383d4a;
  --app-positive: #34c78a;
  --app-negative: #ff6b6b;

  --font-base: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

  --radius-sm: 4px;
  --radius-md: 10px;
  --radius-lg: 22px;

  --container-width: 1180px;
  --transition: 0.2s ease;
}

[data-theme="dark"] {
  --color-bg: #0a0a0a;
  --color-surface: #161616;
  --color-text: #f5f5f5;
  --color-text-muted: #9c9c9c;
  --color-border: #2a2a2a;

  /* Site is dark → mockup flips to the app's light theme */
  --app-bg: #ffffff;
  --app-text: #101828;
  --app-text-muted: #5b6472;
  --app-accent: #2f7dfa;
  --app-accent-bg: #e8f1ff;
  --app-border: #eef1f5;
  --app-chart-1: #2f7dfa;
  --app-chart-2: #ff9f43;
  --app-chart-3: #b98cf0;
  --app-chart-4: #d8dee6;
  --app-positive: #1f9d63;
  --app-negative: #e0344c;
}

/* ==========================================================================
   Reset & Base
   ========================================================================== */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

/* Theme switch: circular reveal driven from JS via clip-path animation */
::view-transition-old(root),
::view-transition-new(root) {
  animation: none;
  mix-blend-mode: normal;
}

body {
  margin: 0;
  font-family: var(--font-base);
  background-color: var(--color-bg);
  color: var(--color-text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  transition: background-color var(--transition), color var(--transition);
}

h1, h2, h3 { line-height: 1.2; margin: 0 0 0.5em; }
p { margin: 0 0 1em; color: var(--color-text-muted); }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { font-family: inherit; cursor: pointer; }

.container {
  width: 100%;
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* ==========================================================================
   Reveal animations (Intersection Observer targets)
   ========================================================================== */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ==========================================================================
   Header
   ========================================================================== */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background-color: var(--color-bg);
  border-bottom: 1px solid var(--color-border);
}

.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 0.9rem;
  padding-bottom: 0.9rem;
}

.nav {
  display: flex;
  align-items: center;
  gap: 0.9rem;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 1.4rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--color-text);
}

.header__status {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  opacity: 0;
  transform: translateY(-4px);
  transition: opacity 0.4s ease, transform 0.4s ease;
  pointer-events: none;
}
.header__status.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 640px) {
  .header__status {
    display: none;
  }
}

.logo__icon { display: inline-flex; }

.theme-toggle {
  width: 42px;
  height: 42px;
  padding: 0;
  border-radius: 50%;
  border: 1px solid var(--color-border);
  background-color: var(--color-surface);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color var(--transition);
  perspective: 240px;
}
.theme-toggle:hover { border-color: var(--color-text); }

.coin {
  position: relative;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  transition: transform 0.6s cubic-bezier(0.4, 0.2, 0.2, 1);
}
.coin.is-flipped { transform: rotateY(180deg); }

.coin__face {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  backface-visibility: hidden;
  font-size: 1.05rem;
}

.coin__face--front {
  /* Light mode face: bright, polished silver/gold */
  background: linear-gradient(135deg, #fff8e0 0%, #f3d998 30%, #c9a24a 55%, #f3d998 75%, #fff8e0 100%);
  box-shadow: inset 0 0 3px rgba(255, 255, 255, 0.8), inset 0 0 1px rgba(0, 0, 0, 0.15);
}

.coin__face--back {
  transform: rotateY(180deg);
  /* Dark mode face: matte carbon/obsidian */
  background: linear-gradient(135deg, #3a3a3d 0%, #202023 40%, #0a0a0b 70%, #262629 100%);
  box-shadow: inset 0 0 3px rgba(0, 0, 0, 0.7), inset 0 0 1px rgba(255, 255, 255, 0.05);
}

/* ==========================================================================
   Intro / Coming Soon Splash
   ========================================================================== */
.intro {
  position: relative;
  overflow: hidden;
  min-height: 100svh;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  text-align: center;
  padding: 2rem 1.25rem;
  animation: introFadeIn 0.8s ease;
}

.intro__grid {
  position: absolute;
  inset: 0;
  z-index: 0;
  background-image:
    linear-gradient(var(--color-border) 1px, transparent 1px),
    linear-gradient(90deg, var(--color-border) 1px, transparent 1px);
  background-size: 48px 48px;
  opacity: 0.5;
  /* Radius/position tuned so the fade reaches full transparency exactly at the section's bottom edge,
     avoiding a residual visible seam where the grid meets the next section. */
  -webkit-mask-image: radial-gradient(ellipse 140% 65% at 50% 35%, black 0%, black 10%, transparent 100%);
  mask-image: radial-gradient(ellipse 140% 65% at 50% 35%, black 0%, black 10%, transparent 100%);
}

.intro__glow {
  position: absolute;
  top: 50%;
  left: 50%;
  width: min(680px, 90vw);
  height: min(680px, 90vw);
  transform: translate(-50%, -50%);
  background-color: var(--color-text);
  filter: blur(150px);
  opacity: 0.16;
  border-radius: 50%;
  z-index: 0;
}

.intro__trend {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  opacity: 0.07;
}
.intro__trend path {
  fill: none;
  stroke: var(--color-text);
  stroke-width: 2;
  stroke-linecap: round;
  animation: drawTrendLine 1.8s ease-out 0.4s forwards;
}

.intro__brand {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  animation: introFadeInUp 0.7s ease 0.1s both;
}

.intro__wordmark {
  font-size: clamp(1.4rem, 3.5vw, 1.75rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--color-text);
}

.intro__headline {
  position: relative;
  z-index: 1;
  max-width: 17ch;
  margin: 0.75rem 0 0;
  font-size: clamp(2.25rem, 6.5vw, 3.75rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.15;
  color: var(--color-text);
  animation: introFadeInUp 0.7s ease 0.3s both;
}

.intro__status {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  margin: 0.5rem 0 0;
  padding: 0.6rem 1.2rem;
  border: 1px solid var(--color-border);
  border-radius: 999px;
  background-color: var(--color-surface);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  animation: introFadeInUp 0.7s ease 0.5s both;
}

.intro__status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background-color: var(--color-text);
  flex-shrink: 0;
}

.intro__scroll {
  position: absolute;
  bottom: 2.5rem;
  z-index: 1;
  width: 26px;
  height: 40px;
  border: 2px solid var(--color-border);
  border-radius: 14px;
  display: flex;
  justify-content: center;
  padding-top: 7px;
  animation: introFadeInUp 0.7s ease 0.7s both;
}

.intro__scroll-dot {
  width: 4px;
  height: 8px;
  border-radius: 2px;
  background-color: var(--color-text-muted);
  animation: scrollDot 1.6s ease infinite;
}

@keyframes introFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes introFadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes drawTrendLine {
  to {
    stroke-dashoffset: 0;
  }
}

@keyframes scrollDot {
  0% { transform: translateY(0); opacity: 1; }
  70% { transform: translateY(13px); opacity: 0; }
  100% { transform: translateY(0); opacity: 0; }
}

/* ==========================================================================
   Hero
   ========================================================================== */
.hero {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
  padding: 3rem 1.25rem 3.5rem;
  align-items: center;
}

.hero h2 {
  font-size: clamp(2.1rem, 6.5vw, 3.2rem);
  font-weight: 800;
  letter-spacing: -0.02em;
}

.hero h3 {
  font-size: clamp(1.1rem, 3vw, 1.4rem);
  font-weight: 600;
  color: var(--color-text-muted);
  margin-bottom: 1rem;
}

.hero__text p {
  font-size: 1.05rem;
  max-width: 46ch;
}

/* Hero visual / mockup */
.hero__visual {
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
  padding: 1.5rem 0 1.5rem 2.5rem;
}

.mockup {
  width: min(320px, 82vw);
  aspect-ratio: 9 / 18;
  background-color: #0a0a0a;
  border-radius: var(--radius-lg);
  padding: 1rem;
}

.mockup--front {
  position: relative;
  z-index: 1;
}

.mockup--back {
  position: absolute;
  left: 0;
  top: 4%;
  width: min(230px, 62vw);
  transform: rotate(-9deg);
  z-index: 0;
  opacity: 0.85;
}

.mockup__notch {
  width: 40%;
  height: 20px;
  background-color: #ffffff;
  opacity: 0.15;
  border-radius: 0 0 12px 12px;
  margin: 0 auto;
}

.mockup__screen {
  height: calc(100% - 20px);
  margin-top: 0.6rem;
  border-radius: var(--radius-md);
  background-color: var(--app-bg);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: left;
  padding: 1rem 0.9rem 0.6rem;
  transition: background-color var(--transition);
}

.app-greeting {
  width: 100%;
  color: var(--app-text);
  font-size: 0.8rem;
  font-weight: 600;
  margin: 0 0 0.7rem;
  transition: color var(--transition);
}

.app-card {
  width: 100%;
  background-color: var(--app-accent-bg);
  border-radius: var(--radius-md);
  padding: 0.6rem 0.8rem;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  margin-bottom: 0.9rem;
  transition: background-color var(--transition);
}
.app-card__label {
  font-size: 0.55rem;
  color: var(--app-text-muted);
}
.app-card__value {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--app-accent);
}

.app-section-title {
  width: 100%;
  font-size: 0.65rem;
  font-weight: 700;
  color: var(--app-text);
  margin: 0 0 0.5rem;
  transition: color var(--transition);
}

.app-stats {
  width: 100%;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.6rem;
  margin-top: 0.3rem;
}
.app-stat {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  background-color: var(--app-accent-bg);
  border-radius: var(--radius-md);
  padding: 0.55rem 0.6rem;
}
.app-stat span {
  font-size: 0.5rem;
  color: var(--app-text-muted);
}
.app-stat__value {
  font-size: 0.85rem;
  font-weight: 800;
  color: var(--app-text);
}
.app-stat__value--up { color: var(--app-positive); }
.app-stat__value--down { color: var(--app-negative); }

.donut { transform: rotate(-90deg); margin: 0 auto 0.7rem; display: block; }
.donut__track {
  fill: none;
  stroke: var(--app-border);
  stroke-width: 10;
}
.donut__seg {
  fill: none;
  stroke-width: 10;
  stroke-dasharray: 0 314.159;
  transition: stroke-dasharray 1s ease;
}
.donut__total {
  transform: rotate(90deg);
  transform-box: fill-box;
  transform-origin: center;
  fill: var(--app-text);
  font-size: 1rem;
  font-weight: 700;
}

.mockup__legend {
  list-style: none;
  margin: 0 0 0.7rem;
  padding: 0;
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  font-size: 0.65rem;
  color: var(--app-text);
}
.mockup__legend li {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}
.mockup__legend b {
  margin-left: auto;
  font-weight: 700;
}

.app-nav {
  width: 100%;
  margin-top: auto;
  padding-top: 0.6rem;
  border-top: 1px solid var(--app-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.app-nav__icon {
  font-size: 0.9rem;
  color: var(--app-text-muted);
}
.app-nav__fab {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background-color: var(--app-accent);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  font-weight: 700;
  transform: translateY(-6px);
}

.dot {
  width: 9px;
  height: 9px;
  border-radius: 2px;
  flex-shrink: 0;
}
.dot--1 { background-color: var(--app-chart-1); }
.dot--2 { background-color: var(--app-chart-2); }
.dot--3 { background-color: var(--app-chart-3); }
.dot--4 { background-color: var(--app-chart-4); }

/* ==========================================================================
   Section Title
   ========================================================================== */
.section-title {
  text-align: center;
  font-size: clamp(1.6rem, 4vw, 2.2rem);
  margin-bottom: 2.5rem;
}

/* ==========================================================================
   Features
   ========================================================================== */
.features { padding: 3rem 1.25rem; }

.features__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
  max-width: 900px;
  margin: 0 auto;
}

@media (min-width: 700px) {
  .features__grid { grid-template-columns: repeat(2, 1fr); gap: 1.5rem; }
}

.card {
  position: relative;
  overflow: hidden;
  background-color: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 2.25rem 2rem;
  transition: border-color var(--transition);
}
.card:hover {
  border-color: var(--color-text);
}

.card__index {
  position: absolute;
  top: 0;
  right: 1.25rem;
  font-size: 3.75rem;
  font-weight: 800;
  color: var(--color-border);
  line-height: 1;
  z-index: 0;
}

.card__icon {
  position: relative;
  z-index: 1;
  width: 48px;
  height: 48px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.25rem;
  color: var(--color-text);
}
.card__icon svg { width: 24px; height: 24px; }

.card h3 { position: relative; z-index: 1; font-size: 1.15rem; }
.card p { position: relative; z-index: 1; font-size: 0.92rem; margin-bottom: 0; }

/* ==========================================================================
   Audience Tabs
   ========================================================================== */
.audience { padding: 3rem 1.25rem 4rem; }

.tabs__list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  justify-content: center;
  margin-bottom: 2rem;
}

.tabs__btn {
  border: 1px solid var(--color-border);
  background-color: var(--color-surface);
  color: var(--color-text-muted);
  padding: 0.6rem 1.1rem;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 600;
  transition: background-color var(--transition), color var(--transition), border-color var(--transition);
}

.tabs__btn.is-active,
.tabs__btn:hover {
  background-color: var(--color-text);
  border-color: var(--color-text);
  color: var(--color-bg);
}

.tabs__panel {
  display: none;
  background-color: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 2.5rem;
  max-width: 820px;
  margin: 0 auto;
}
.tabs__panel.is-active { display: block; animation: fadeIn 0.3s ease; }

.tabs__panel h3 { color: var(--color-text); }
.tabs__panel p { font-size: 1.05rem; }

.tabpanel__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  align-items: center;
}

@media (min-width: 640px) {
  .tabpanel__grid { grid-template-columns: 1.3fr 1fr; }
}

.tabpanel__list {
  list-style: none;
  margin: 1.25rem 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}
.tabpanel__list li {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--color-text);
}
.tabpanel__list li::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: var(--color-text);
  flex-shrink: 0;
}

.tabpanel__visual {
  display: flex;
  align-items: center;
  justify-content: center;
}

.tabpanel__badge {
  width: 140px;
  height: 140px;
  border-radius: 50%;
  border: 1px solid var(--color-border);
  background-color: var(--color-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text);
}
.tabpanel__badge svg { width: 56px; height: 56px; }

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ==========================================================================
   Final CTA
   ========================================================================== */
.cta-final {
  text-align: center;
  padding: 3rem 1.25rem 4rem;
}
.cta-final h2 { font-size: clamp(1.5rem, 4vw, 2rem); }
.cta-final p { max-width: 50ch; margin-left: auto; margin-right: auto; }

.btn-notify {
  margin-top: 1.75rem;
  padding: 0.85rem 1.75rem;
  border: 1px solid var(--color-text);
  border-radius: var(--radius-sm);
  background-color: var(--color-text);
  color: var(--color-bg);
  font-size: 0.95rem;
  font-weight: 600;
  transition: background-color var(--transition), color var(--transition);
}
.btn-notify:hover {
  background-color: transparent;
  color: var(--color-text);
}

.btn-notify--header {
  margin-top: 0;
  padding: 0.55rem 1.15rem;
  font-size: 0.85rem;
  white-space: nowrap;
}

.btn-notify:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* ==========================================================================
   Notify Me Modal
   ========================================================================== */
.modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  visibility: hidden;
  opacity: 0;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}
.modal.is-open {
  visibility: visible;
  opacity: 1;
}

.modal__overlay {
  position: absolute;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.5);
}

.modal__dialog {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 420px;
  background-color: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 2rem;
  text-align: left;
  transform: translateY(12px);
  transition: transform 0.25s ease;
}
.modal.is-open .modal__dialog {
  transform: translateY(0);
}

.modal__dialog h3 {
  margin: 0 0 0.5rem;
  font-size: 1.25rem;
  color: var(--color-text);
}
.modal__dialog p { font-size: 0.92rem; }

.modal__close {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  width: 32px;
  height: 32px;
  border: 1px solid var(--color-border);
  border-radius: 50%;
  background-color: var(--color-surface);
  color: var(--color-text-muted);
  font-size: 1.1rem;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}
.modal__close:hover { border-color: var(--color-text); color: var(--color-text); }

.notify-form {
  display: flex;
  gap: 0.6rem;
  margin-top: 1.25rem;
}
.notify-form input[type="email"] {
  flex: 1;
  min-width: 0;
  padding: 0.7rem 0.9rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  background-color: var(--color-surface);
  color: var(--color-text);
  font-size: 0.9rem;
  font-family: inherit;
}
.notify-form input[type="email"]:focus {
  outline: none;
  border-color: var(--color-text);
}
.notify-form__submit { margin-top: 0; white-space: nowrap; }

.notify-form__honeypot {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
}

.notify-form__message {
  margin: 0.9rem 0 0;
  font-size: 0.85rem;
  min-height: 1.2em;
}
.notify-form__message--success { color: var(--color-success); }
.notify-form__message--error { color: var(--color-danger); }

@media (max-width: 420px) {
  .notify-form { flex-direction: column; }
}

/* ==========================================================================
   Footer
   ========================================================================== */
.footer {
  border-top: 1px solid var(--color-border);
  padding: 2.5rem 1.25rem;
  margin-top: 2rem;
}

.footer__inner {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
}

.logo--footer { font-size: 1.3rem; }

.footer__contact a {
  color: var(--color-text);
  font-weight: 600;
  border-bottom: 1px solid var(--color-text);
}

.footer__copy {
  font-size: 0.85rem;
  color: var(--color-text-muted);
  margin: 0;
}

/* ==========================================================================
   Larger viewports
   ========================================================================== */
@media (min-width: 860px) {
  .hero {
    grid-template-columns: 1.1fr 0.9fr;
    padding: 5rem 1.25rem 6rem;
  }
  .hero__visual { justify-content: flex-end; }
}
