/*
 * Kasir Sheet landing page — component styles.
 *
 * Utilities come from Tailwind (browser build). This file holds the few
 * repeated components and anything Tailwind cannot express cleanly. It is
 * unlayered CSS, so it wins over Tailwind's layered utilities: keep these
 * rules free of layout properties that markup sets per instance.
 */

:root {
  --ks-brand: #e8620e;
  --ks-brand-dark: #b84a08;
  --ks-brand-light: #ff8a3d;
  --ks-brand-surface: #fff3ea;
  --ks-canvas: #f3f3f3;
  --ks-surface-alt: #fafafa;
  --ks-stroke: #e1e1e1;
  --ks-ink: #1b1b1b;
  --ks-muted: #616161;
  --ks-ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* Baseline before Tailwind's runtime finishes, to soften the first paint. */
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  background: #fff;
  color: var(--ks-ink);
  font-family: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI",
    Roboto, sans-serif;
  font-optical-sizing: auto;
}

img {
  max-width: 100%;
  height: auto;
}

::selection {
  background: var(--ks-brand-surface);
  color: var(--ks-brand-dark);
}

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

/* ---------- Header ---------- */

#site-header.is-scrolled {
  border-bottom-color: var(--ks-stroke);
}

.nav-link {
  display: inline-flex;
  align-items: center;
  height: 2.5rem;
  padding: 0 0.875rem;
  border-radius: 9999px;
  transition: background-color 0.2s, color 0.2s;
}

.nav-link:hover {
  background: var(--ks-canvas);
  color: var(--ks-ink);
}

.mobile-link {
  display: block;
  padding: 0.75rem 0.75rem;
  border-radius: 0.875rem;
}

.mobile-link:hover {
  background: var(--ks-canvas);
}

/* ---------- Typography helpers ---------- */

.eyebrow {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--ks-brand-dark);
}

.eyebrow--dark {
  color: var(--ks-brand-light);
}

.section-title {
  font-size: clamp(2rem, 1.2rem + 3.2vw, 3.5rem);
  font-weight: 600;
  line-height: 1.08;
  letter-spacing: -0.03em;
  text-wrap: balance;
}

h1 {
  text-wrap: balance;
}

/* ---------- Google Play button ---------- */

.play-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  height: 3.5rem;
  padding: 0 1.75rem 0 1.375rem;
  border-radius: 9999px;
  background: var(--ks-ink);
  color: #fff;
  box-shadow: 0 10px 30px -12px rgba(27, 27, 27, 0.55);
  transition: transform 0.25s var(--ks-ease), background-color 0.2s,
    box-shadow 0.25s;
}

.play-badge:hover {
  background: #000;
  transform: translateY(-2px);
  box-shadow: 0 16px 36px -14px rgba(27, 27, 27, 0.6);
}

/* ---------- Device frames ---------- */

.device-tablet {
  margin: 0;
  padding: clamp(6px, 1.2vw, 14px);
  border-radius: clamp(20px, 2.6vw, 32px);
  background: #1b1b1b;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.06) inset,
    0 40px 80px -30px rgba(27, 27, 27, 0.45),
    0 20px 40px -20px rgba(184, 74, 8, 0.18);
}

.device-tablet--dark {
  background: #0b0b0b;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.12),
    0 40px 120px -40px rgba(232, 98, 14, 0.45);
}

.device-phone {
  margin: 0;
  padding: 7px;
  border-radius: 30px;
  background: #1b1b1b;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.06) inset,
    0 30px 60px -24px rgba(27, 27, 27, 0.5);
}

/* ---------- Decorative glows ----------
 * Gradients rather than blurred blobs: WebKit does not clip a `filter`ed
 * child to its parent's border-radius, which shows up as a square corner.
 */

.stage-glow {
  background-image: radial-gradient(
    circle at 100% 0%,
    rgba(232, 98, 14, 0.12),
    rgba(232, 98, 14, 0) 42%
  );
}

.cta-glow {
  background-image:
    radial-gradient(
      circle at 0% 0%,
      rgba(255, 255, 255, 0.16),
      rgba(255, 255, 255, 0) 38%
    ),
    radial-gradient(
      circle at 100% 100%,
      rgba(184, 74, 8, 0.55),
      rgba(184, 74, 8, 0) 50%
    );
}

/* ---------- Spreadsheet mock ---------- */

.sheet-table th,
.sheet-table td {
  padding: 0.55rem 0.75rem;
  border-right: 1px solid var(--ks-stroke);
  border-bottom: 1px solid var(--ks-stroke);
  white-space: nowrap;
  max-width: 9rem;
}

.sheet-table th {
  background: var(--ks-surface-alt);
  color: var(--ks-muted);
  font-weight: 500;
  text-align: center;
}

.sheet-table td:first-child {
  background: var(--ks-surface-alt);
  color: var(--ks-muted);
  text-align: center;
}

.sheet-table tr > :last-child {
  border-right: 0;
}

.sheet-new td {
  animation: sheet-flash 2.8s var(--ks-ease) 0.6s infinite;
}

@keyframes sheet-flash {
  0%,
  70%,
  100% {
    background-color: transparent;
  }
  15%,
  45% {
    background-color: #e6f4ea;
  }
}

/* ---------- Feature cards ---------- */

.feature-card {
  padding: 1.5rem;
  border-radius: 24px;
  background: var(--ks-canvas);
  overflow: hidden;
  transition: transform 0.35s var(--ks-ease), background-color 0.3s;
}

@media (min-width: 640px) {
  .feature-card {
    padding: 2rem;
  }
}

.feature-card:hover,
.js .feature-card.reveal.is-visible:hover {
  transform: translateY(-3px);
}

.feature-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 14px;
  background: #fff;
  color: var(--ks-brand);
  box-shadow: 0 1px 0 var(--ks-stroke);
}

.feature-title {
  margin-top: 1.25rem;
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: -0.015em;
  line-height: 1.3;
}

.feature-text {
  margin-top: 0.625rem;
  font-size: 0.9875rem;
  line-height: 1.65;
  color: var(--ks-muted);
}

.chip {
  display: inline-flex;
  align-items: center;
  height: 2rem;
  padding: 0 0.875rem;
  border-radius: 9999px;
  border: 1px solid var(--ks-stroke);
  background: #fff;
  font-size: 0.8125rem;
  font-weight: 500;
}

.check-dot {
  display: inline-flex;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border-radius: 9999px;
  background: #fff;
  color: var(--ks-brand);
}

/* ---------- Tablet tabs ---------- */

.tab-btn {
  flex-shrink: 0;
  height: 2.5rem;
  padding: 0 1.125rem;
  border-radius: 9999px;
  font-size: 0.9375rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.75);
  cursor: pointer;
  transition: background-color 0.2s, color 0.2s;
}

.tab-btn:hover {
  color: #fff;
}

.tab-btn.is-active {
  background: #fff;
  color: var(--ks-ink);
}

/* ---------- Phone gallery ---------- */

.gallery-track {
  --gutter: 1rem;
  padding-inline: var(--gutter);
  scroll-padding-inline: var(--gutter);
}

@media (min-width: 640px) {
  .gallery-track {
    --gutter: 1.5rem;
  }
}

@media (min-width: 1024px) {
  .gallery-track {
    /* Align the first card with the 80rem content column. */
    --gutter: max(2rem, calc((100vw - 80rem) / 2 + 2rem));
  }
}

.phone-card {
  flex: 0 0 auto;
  width: min(68vw, 270px);
  margin: 0;
  scroll-snap-align: start;
}

.phone-card figcaption {
  margin-top: 1.25rem;
  font-size: 0.9375rem;
  line-height: 1.55;
  color: var(--ks-muted);
}

.phone-card figcaption strong {
  display: block;
  margin-bottom: 0.125rem;
  font-weight: 600;
  color: var(--ks-ink);
}

.gallery-nav {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3rem;
  height: 3rem;
  border-radius: 9999px;
  border: 1px solid #d1d1d1;
  background: #fff;
  cursor: pointer;
  transition: border-color 0.2s, opacity 0.2s;
}

.gallery-nav:hover {
  border-color: var(--ks-ink);
}

.gallery-nav:disabled {
  opacity: 0.35;
  cursor: default;
}

.no-scrollbar {
  scrollbar-width: none;
}

.no-scrollbar::-webkit-scrollbar {
  display: none;
}

/* ---------- Steps ---------- */

.step-card {
  padding: 2rem;
  border-radius: 24px;
  background: #fff;
}

.step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3rem;
  height: 3rem;
  border-radius: 9999px;
  background: var(--ks-brand-surface);
  color: var(--ks-brand-dark);
  font-size: 1.25rem;
  font-weight: 700;
}

/* ---------- Privacy ---------- */

.privacy-item {
  padding: 1.75rem;
  border-radius: 24px;
  border: 1px solid var(--ks-stroke);
}

/* ---------- FAQ ---------- */

.faq-item summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 1.5rem 0;
  font-size: 1.125rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  cursor: pointer;
  list-style: none;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary::after {
  content: "";
  flex-shrink: 0;
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 9999px;
  background:
    linear-gradient(var(--ks-ink), var(--ks-ink)) center / 11px 1.75px
      no-repeat,
    linear-gradient(var(--ks-ink), var(--ks-ink)) center / 1.75px 11px
      no-repeat,
    var(--ks-canvas);
  transition: transform 0.3s var(--ks-ease);
}

.faq-item[open] summary::after {
  transform: rotate(45deg);
}

.faq-item p {
  margin: -0.5rem 0 0;
  padding: 0 3rem 1.5rem 0;
  line-height: 1.7;
  color: var(--ks-muted);
}

/* ---------- Footer ---------- */

.footer-link {
  transition: color 0.2s;
}

.footer-link:hover {
  color: var(--ks-ink);
}

.social-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 9999px;
  border: 1px solid var(--ks-stroke);
  background: #fff;
  color: var(--ks-ink);
  transition: border-color 0.2s, background-color 0.2s;
}

.social-btn:hover {
  border-color: var(--ks-ink);
}

/* ---------- Reveal on scroll ---------- */

.js .reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.8s var(--ks-ease), transform 0.8s var(--ks-ease);
}

.js .reveal.is-visible {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto !important;
  }

  .js .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .sheet-new td {
    animation: none;
  }

  .feature-card:hover,
  .js .feature-card.reveal.is-visible:hover,
  .play-badge:hover {
    transform: none;
  }
}
