/* =========================================
   BASE & RESET
========================================= */
@font-face {
  font-family: 'Resist Sans Text';
  src: url('fonts/ResistSansText-Regular.otf') format('opentype');
  font-weight: 400;
  font-style: normal;
}
@font-face {
  font-family: 'Resist Sans Text';
  src: url('fonts/ResistSansText-Medium.otf') format('opentype');
  font-weight: 500;
  font-style: normal;
}
@font-face {
  font-family: 'Resist Sans Text';
  src: url('fonts/ResistSansText-Bold.otf') format('opentype');
  font-weight: 700;
  font-style: normal;
}
@font-face {
  font-family: 'Resist Sans Text';
  src: url('fonts/ResistSansText-Black.otf') format('opentype');
  font-weight: 900;
  font-style: normal;
}

@font-face {
  font-family: 'Resist Sans Display';
  src: url('fonts/ResistSansDisplay-Regular.otf') format('opentype');
  font-weight: 400;
  font-style: normal;
}
@font-face {
  font-family: 'Resist Sans Display';
  src: url('fonts/ResistSansDisplay-Medium.otf') format('opentype');
  font-weight: 500;
  font-style: normal;
}
@font-face {
  font-family: 'Resist Sans Display';
  src: url('fonts/ResistSansDisplay-Bold.otf') format('opentype');
  font-weight: 700;
  font-style: normal;
}
@font-face {
  font-family: 'Resist Sans Display';
  src: url('fonts/ResistSansDisplay-Black.otf') format('opentype');
  font-weight: 900;
  font-style: normal;
}

:root {
  --bg-color: #f7f7f7;
  --card-bg: #ffffff;
  --text-color: #000000;
  --secondary-text: #888888;
  --border-color: #e5e5e5;
  --accent-color: #000000;
  --red-color: #e94b3c;
  --orange-color: #f39c12;
  --font-text: 'Resist Sans Text', sans-serif;
  --font-display: 'Resist Sans Display', sans-serif;
}
[data-theme="dark"] {
  --bg-color: #000000;
  --card-bg: #111111;
  --text-color: #ffffff;
  --secondary-text: #888888;
  --border-color: #333333;
  --accent-color: #ffffff;
}

/* Theme Toggle Icons */
.theme-btn .icon-sun { display: none; }
.theme-btn .icon-moon { display: block; }
[data-theme="dark"] .theme-btn .icon-sun { display: block; }
[data-theme="dark"] .theme-btn .icon-moon { display: none; }

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: var(--font-text);
  background-color: var(--bg-color);
  color: var(--text-color);
  text-transform: lowercase;
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
  transition: background-color 0.3s, color 0.3s;
}

.fixed-header-wrapper {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  pointer-events: none;
}
header {
  pointer-events: auto;
}

.snap-container {
  height: 100vh;
  height: 100dvh;
  width: 100%;
  overflow-y: scroll;
  scroll-snap-type: y mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.snap-container::-webkit-scrollbar {
  display: none;
}

h1, h2, h3, h4, .font-display, .huge-number {
  font-family: var(--font-display);
}

a { color: inherit; text-decoration: none; }
ul { list-style: none; }

.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.text-secondary { color: var(--secondary-text); }
.text-center { text-align: center; }

/* =========================================
   BUTTONS & BADGES
========================================= */
.pill-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 24px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 1rem;
  border: 2px solid var(--text-color);
  background: var(--text-color);
  color: var(--bg-color);
  cursor: pointer;
  transition: transform 0.2s;
}
.pill-btn:hover { transform: scale(0.98); }
.pill-btn.outline {
  background: transparent;
  color: var(--text-color);
}

/* =========================================
   HEADER
========================================= */
header {
  padding: 24px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.header-profile {
  display: flex;
  align-items: center;
  gap: 16px;
}
.avatar {
  position: relative;
  width: 56px; height: 56px;
  background-color: var(--card-bg);
  border-radius: 50%;
  border: 2px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
}
.level-badge {
  position: absolute;
  bottom: -4px; right: -4px;
  background-color: var(--text-color);
  color: var(--bg-color);
  font-size: 0.7rem;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 8px;
  font-family: var(--font-display);
}
.greeting h2 { font-size: 1.5rem; font-weight: 900; letter-spacing: -0.02em; }
.greeting p { font-size: 0.9rem; color: var(--secondary-text); font-weight: 500; }
.header-actions { display: flex; gap: 12px; align-items: center; }

/* =========================================
   LAYOUT & CARDS (The App Vibe)
========================================= */
.app-card {
  background-color: var(--card-bg);
  border-radius: 24px;
  padding: 24px;
  margin-bottom: 16px;
  border: 1px solid var(--border-color);
}

/* Sections */
.section-massive {
  height: 100vh;
  height: 100dvh;
  width: 100%;
  scroll-snap-align: start;
  scroll-snap-stop: always;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 110px 0 40px;
  box-sizing: border-box;
  overflow: hidden;
}
.huge-title {
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 900;
  line-height: 1.1;
  letter-spacing: -0.03em;
  margin-bottom: 16px;
}
@media (max-width: 768px) { .huge-title { font-size: 2.2rem; } }
.subtitle {
  font-size: 1rem;
  max-width: 450px;
  margin-bottom: 24px;
  color: var(--secondary-text);
  line-height: 1.5;
}

/* Grid Override */
.split-hero {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
  align-items: center;
}
@media (min-width: 992px) {
  .split-hero { grid-template-columns: 1fr 1fr; }
}

/* =========================================
   APP REPLICA COMPONENTS
========================================= */

/* 1. Numpad & New Transaction View */
.tx-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 8px;
}
.tx-options {
  display: flex;
  gap: 16px;
  align-items: center;
}
.tx-opt {
  font-size: 1rem;
  font-weight: 800;
  color: var(--secondary-text);
  padding: 8px 16px;
  border-radius: 999px;
  border: 1px solid transparent;
}
.tx-opt.active {
  color: var(--text-color);
  border: 1px solid var(--text-color);
}
.date-picker {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 16px 0;
}
.date-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 52px;
  border-radius: 20px;
  color: var(--secondary-text);
}
.date-item.active {
  background: var(--text-color);
  color: var(--bg-color);
}
.date-item .d-num {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 900;
  line-height: 1;
  margin-bottom: 4px;
}
.date-item .d-name {
  font-size: 0.65rem;
  font-weight: 700;
}
.amount-display-row {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  margin-bottom: 8px;
}
.backspace-btn {
  position: absolute;
  right: 8px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--bg-color);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--secondary-text);
}
.category-info {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 20px;
}
.category-sub {
  font-size: 0.75rem;
  color: var(--secondary-text);
  margin-top: 6px;
  font-weight: 600;
}
.huge-number {
  font-size: 3.2rem;
  font-weight: 900;
  letter-spacing: -0.05em;
  line-height: 1;
}
.category-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--text-color);
  color: var(--bg-color);
  padding: 6px 12px;
  border-radius: 999px;
  font-weight: 700;
  margin-top: 12px;
  font-size: 0.85rem;
}
.numpad {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  max-width: 280px;
  margin: 0 auto;
}
.num-btn {
  aspect-ratio: 1;
  border-radius: 50%;
  background-color: var(--bg-color);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  font-weight: 800;
  font-family: var(--font-display);
}
.num-btn.primary {
  background-color: var(--text-color);
  color: var(--bg-color);
}

/* 2. Streak Strip */
.streak-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; font-weight: 800; font-family: var(--font-display); }
.streak-btn { background: var(--text-color); color: var(--bg-color); padding: 8px 16px; border-radius: 999px; font-size: 0.8rem; }
.streak-days { display: flex; justify-content: space-between; }
.streak-day { width: 44px; height: 64px; border-radius: 22px; border: 1px solid var(--border-color); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; font-size: 0.8rem; font-weight: 700; color: var(--secondary-text); }
.streak-day.active { border: 2.5px solid var(--text-color); color: var(--text-color); font-size: 0.9rem; }
.streak-day .day-name { text-transform: uppercase; font-size: 0.7rem; }
.streak-day .day-num { font-family: var(--font-display); font-size: 1.1rem; }

/* 3. Categories Modal */
.modal-header { font-size: 1.1rem; font-weight: 800; margin-bottom: 16px; font-family: var(--font-display); display: flex; justify-content: space-between; }
.close-btn { width: 28px; height: 28px; border-radius: 50%; background: var(--bg-color); display: flex; align-items: center; justify-content: center; }
.category-list { display: flex; flex-direction: column; gap: 8px; }
.category-item { display: flex; align-items: center; gap: 12px; padding: 16px; border: 1px solid var(--border-color); border-radius: 12px; font-weight: 700; font-size: 1rem; background: var(--card-bg); }

/* 4. Chart & Budget */
.chart-header { text-transform: uppercase; font-size: 0.75rem; letter-spacing: 0.05em; font-weight: 800; color: var(--secondary-text); margin-bottom: 16px; }
.chart-svg { width: 100%; height: 60px; overflow: visible; }
.chart-svg path { fill: none; stroke: var(--text-color); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.budget-progress { height: 6px; background: var(--border-color); border-radius: 999px; margin: 12px 0; overflow: hidden; }
.budget-progress .fill { height: 100%; background: var(--red-color); width: 83%; border-radius: 999px; }

/* =========================================
   BANK MARQUEE
========================================= */
.scrolling-marquee {
  display: flex;
  overflow: hidden;
  position: relative;
  width: 100%;
  padding: 12px 0;
  mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
  -webkit-mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
}
.scrolling-marquee-inner {
  display: flex;
  gap: 16px;
  width: max-content;
  animation: marquee 20s linear infinite;
  padding-right: 16px;
}
@keyframes marquee {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}
.bank-pill {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 14px 24px;
  border-radius: 20px;
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 800;
  white-space: nowrap;
}
.bank-pill img {
  width: 22px;
  height: 22px;
}

/* =========================================
   BENTO FEATURE GRID
========================================= */
.bento-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  width: 100%;
}
.bento-card {
  display: flex;
  flex-direction: column;
  margin: 0 !important;
}
.bento-title {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 1.1rem;
  margin-bottom: 4px;
}
.bento-desc {
  font-size: 0.8rem;
  color: var(--secondary-text);
  line-height: 1.4;
  margin-bottom: 16px;
}
.bento-visual {
  margin-top: auto;
}
.bento-tx {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
  font-weight: 700;
  padding: 7px 0;
  border-bottom: 1px solid var(--border-color);
}
.bento-tx:last-child { border-bottom: none; }
.bento-tag {
  font-size: 0.65rem;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 999px;
  background: var(--bg-color);
  white-space: nowrap;
}
.bento-sub {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8rem;
  font-weight: 700;
  padding: 8px 12px;
  background: var(--bg-color);
  border-radius: 12px;
  margin-bottom: 6px;
}
.bento-sub:last-child { margin-bottom: 0; }

/* =========================================
   ANIMATIONS
========================================= */
.reveal > * {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.3s ease, transform 0.3s ease;
}
.reveal.active > * {
  opacity: 1;
  transform: none;
  transition-duration: 0.7s;
  transition-timing-function: cubic-bezier(0.22, 1, 0.36, 1);
}
.reveal.active > *:nth-child(1) { transition-delay: 0s; }
.reveal.active > *:nth-child(2) { transition-delay: 0.15s; }
.reveal.active > *:nth-child(3) { transition-delay: 0.3s; }
.reveal.active > *:nth-child(4) { transition-delay: 0.45s; }
.reveal.active > *:nth-child(5) { transition-delay: 0.6s; }

/* =========================================
   FOOTER
========================================= */
.footer-simple {
  text-align: center;
  padding: 64px 0;
  border-top: 1px solid var(--border-color);
  color: var(--secondary-text);
  font-weight: 500;
}

/* =========================================
   MOBILE RESPONSIVENESS
========================================= */
@keyframes fade {
  0%, 100% { opacity: 0.3; }
  50% { opacity: 1; }
}

@media (max-width: 992px) {
  html, body {
    width: 100%;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
  }
  .container {
    width: 100%;
    max-width: 100%;
    padding: 0 20px;
    margin: 0 auto;
    box-sizing: border-box;
  }
  .section-massive {
    padding: 76px 0 16px;
  }
  .split-hero {
    display: flex;
    flex-direction: column;
    justify-content: center;
    flex: 1;
    min-height: 0;
    margin: 0;
    gap: 10px;
    width: 100%;
    max-width: 100%;
    min-width: 0;
  }
  .split-hero > .app-card {
    order: 1;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
  }
  .split-hero > div:not(.app-card) {
    order: -1;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
  }
  .huge-title {
    font-size: min(1.8rem, 7.5vw) !important;
    line-height: 1.1;
    margin-bottom: 4px;
  }
  .subtitle {
    font-size: 0.8rem;
    margin-bottom: 8px;
    line-height: 1.3;
  }
  .app-card {
    padding: 14px !important;
    margin-bottom: 4px !important;
  }
  .huge-number {
    font-size: 1.8rem !important;
  }
  .numpad {
    gap: 5px;
    max-width: 200px;
  }
  .num-btn {
    font-size: 1rem;
    padding: 2px;
    height: auto;
    aspect-ratio: 1;
  }
  .pill-btn {
    width: 100%;
    margin-top: 4px !important;
    padding: 10px 14px !important;
    font-size: 0.85rem !important;
  }
  .hero-text > div[style*="display:flex"] {
    flex-direction: column;
    gap: 6px !important;
  }
  header.container { padding: 10px 5%; width: 100%; }
  .avatar { width: 38px; height: 38px; font-size: 1.2rem; }
  .greeting h2 { font-size: 1.1rem; margin: 0; }
  .greeting p { font-size: 0.7rem; margin: 0; }
  .streak-header { margin-bottom: 6px; font-size: 0.85rem; }
  .streak-day { width: 32px; height: 44px; border-radius: 12px; }
  .streak-day .day-num { font-size: 0.85rem; }
  .bento-grid { gap: 8px; }
  .bento-title { font-size: 0.85rem; }
  .bento-desc { font-size: 0.65rem; margin-bottom: 10px; line-height: 1.3; }
  .bento-tx { font-size: 0.75rem; padding: 5px 0; }
  .bento-tag { font-size: 0.55rem; padding: 2px 6px; }
  .bento-sub { font-size: 0.65rem; padding: 6px 10px; border-radius: 10px; margin-bottom: 4px; }
}

@media (max-width: 992px) and (max-height: 750px) {
  .section-massive {
    padding: 68px 0 12px;
  }
  .split-hero {
    transform: scale(0.88);
    transform-origin: center center;
  }
}
@media (max-width: 992px) and (max-height: 650px) {
  .split-hero {
    transform: scale(0.75);
    transform-origin: center center;
  }
}
