/* base.css — Reset + global body/screen rules */
@import url('tokens.css');

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

/* Root: no body scroll — app container model */
html, body {
  height: 100vh;
  height: 100svh;
  overflow: hidden;
  overscroll-behavior: none;
  -webkit-overflow-scrolling: auto;
  background: var(--bg-primary);
  color: var(--color-text-primary);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Screen system: each major view is a full-screen layer */
.screen {
  position: fixed;
  inset: 0;
  height: 100vh;
  height: 100svh;
  width: 100vw;
  overflow: hidden;
  background: var(--bg-primary);
  will-change: transform, opacity;
  transform: translateX(0);
  transition:
    transform 0.38s var(--ease-standard),
    opacity 0.38s ease;
  display: none;
}

.screen.active {
  display: block;
}

.screen.entering-from-right {
  transform: translateX(100%);
  display: block;
}

.screen.entering-from-bottom {
  transform: translateY(100%);
  display: block;
}

.screen.exiting-to-left {
  transform: translateX(-30%);
  opacity: 0.6;
}

/* Scrollable content inside a screen */
.screen-content {
  height: 100vh;
  height: 100svh;
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior-y: contain;
  -webkit-overflow-scrolling: touch;
  scroll-behavior: smooth;
}

/* Touch targets — Apple HIG minimum 44px */
.interactive {
  min-height: 44px;
  min-width: 44px;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;
  user-select: none;
  touch-action: manipulation;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font-family: inherit;
  border: none;
  background: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

/* Scroll reveal utility */
.scroll-reveal {
  opacity: 0;
  transform: translateY(16px);
  transition:
    opacity 0.5s ease,
    transform 0.5s var(--ease-standard);
}

.scroll-reveal.visible,
.scroll-reveal.revealed {
  opacity: 1;
  transform: translateY(0);
}
