/* Reset + iOS-Grundverhalten (Design: Smartcard App.dc.html) */

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

/* hidden gewinnt immer — auch gegen display:flex aus Komponenten-Klassen */
[hidden] { display: none !important; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100dvh;
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.4;
  color: var(--ink);
  background: var(--bg);
  -webkit-tap-highlight-color: transparent;
  -webkit-font-smoothing: antialiased;
  overscroll-behavior-y: none;
  touch-action: manipulation;
}

h1, h2, h3, p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
img { display: block; max-width: 100%; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
a { color: inherit; text-decoration: none; }
input, select { font: inherit; }
s { color: var(--sec-45); }

:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 2px;
  border-radius: 6px;
}

/* App-Spalte: iPhone volle Breite, Desktop zentriert */
.screen {
  max-width: var(--content-max);
  margin-inline: auto;
  min-height: 100dvh;
  padding: calc(74px + var(--safe-top)) var(--page-pad) var(--tab-clearance);
  display: flex;
  flex-direction: column;
  gap: 16px;
  animation: sc-slide-up 0.34s var(--ease-out) both;
}

.screen--flush { padding-inline: 0; padding-top: 0; }
.screen--sheet { padding: 0 0 48px; animation: sc-sheet-up 0.55s var(--ease-drawer) both; background: var(--bg); border-radius: var(--r-sheet) var(--r-sheet) 0 0; min-height: 100dvh; }

body.no-tabbar .screen { padding-bottom: calc(var(--safe-bottom) + 32px); }

/* Native Wrapper: Web-Chrome ausblenden */
body.hotwire-native .tab-bar,
body.hotwire-native .inline-title { display: none; }
body.hotwire-native .screen { padding-bottom: 32px; }

/* Typo-Hilfen */
.t-large { font-size: 28px; font-weight: 800; letter-spacing: -0.7px; }
.t-section { font-size: 19px; font-weight: 800; letter-spacing: -0.4px; }
.t-label {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--sec-55);
  text-transform: uppercase;
  letter-spacing: 0.4px;
}
.t-sec { color: var(--sec-60); }
.tabular { font-variant-numeric: tabular-nums; }
.mono { font-family: var(--font-mono); }

/* Animationen aus dem Design */
@keyframes sc-slide-up { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: translateY(0); } }
@keyframes sc-pop { from { opacity: 0; transform: scale(0.88); } to { opacity: 1; transform: scale(1); } }
@keyframes sc-pulse { 0% { transform: scale(1); } 50% { transform: scale(1.06); } 100% { transform: scale(1); } }
@keyframes sc-sheen { 0% { transform: translateX(-120%) skewX(-18deg); } 55%, 100% { transform: translateX(220%) skewX(-18deg); } }
@keyframes sc-glow { 0% { transform: translate(0, 0) scale(1); } 50% { transform: translate(60px, 40px) scale(1.15); } 100% { transform: translate(-30px, 10px) scale(0.95); } }
@keyframes sc-float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-9px); } }
@keyframes sc-scan { 0% { top: 44px; } 100% { top: calc(100% - 46px); } }
@keyframes sc-hero { from { transform: scale(1.05); } to { transform: scale(1); } }
@keyframes sc-sheet-up { from { transform: translateY(100%); } to { transform: translateY(0); } }

/* Gestaffelte Eintritte */
.rise { animation: sc-slide-up 0.45s var(--ease-out) both; }
.rise-1 { animation-delay: 0.05s; }
.rise-2 { animation-delay: 0.12s; }
.rise-3 { animation-delay: 0.18s; }
.rise-4 { animation-delay: 0.24s; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
