/*
 * Scorilla website. Bootstrap 5.3 does the layout; this file holds the brand (DESIGN_PRINCIPLES §5a
 * and CLAUDE.md §Design system) and the few components Bootstrap has no class for.
 * Bright fills carry ink text, never white.
 */

@font-face {
  font-family: "Outfit";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("/fonts/outfit-latin.woff2") format("woff2");
}

:root {
  color-scheme: light;

  --tb-page: #FAFAF8;
  --tb-surface: #FFFFFF;
  --tb-ink: #14140F;
  --tb-muted: rgba(20, 20, 15, 0.62);
  --tb-line: rgba(20, 20, 15, 0.1);
  --tb-amber: #F5A524;
  --tb-amber-soft: rgba(245, 165, 36, 0.18);
  --tb-amber-ink: #8A4A06;
  --tb-blue: #3D9BE9;
  --tb-blue-ink: #1C7FD0;
  --tb-optic: #D4EB2E;

  --bs-body-font-family: "Outfit", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --bs-body-bg: var(--tb-page);
  --bs-body-color: var(--tb-ink);
  --bs-emphasis-color: var(--tb-ink);
  --bs-secondary-color: var(--tb-muted);
  --bs-border-color: var(--tb-line);
  --bs-link-color: var(--tb-amber-ink);
  --bs-link-color-rgb: 138, 74, 6;
  --bs-link-hover-color: var(--tb-ink);
  --bs-link-hover-color-rgb: 20, 20, 15;
  --bs-heading-color: var(--tb-ink);
}

/* Screen margin 20, as in the app. */
.container {
  --bs-gutter-x: 2.5rem;
}

body {
  background: var(--tb-page);
  font-size: 1.0625rem;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, .h1, .h2, .h3 {
  font-weight: 700;
  letter-spacing: -0.02em;
}

a:focus-visible,
button:focus-visible,
.lang-switch a:focus-visible {
  outline: 3px solid var(--tb-ink);
  outline-offset: 2px;
}

/* --- Type ------------------------------------------------------------------------------------- */

.label {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.label-amber {
  color: var(--tb-amber-ink);
}

.display-hero {
  font-size: clamp(2.5rem, 7vw, 4.5rem);
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 1.02;
}

.section-title {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  line-height: 1.12;
}

.lead-copy {
  font-size: 1.1875rem;
  line-height: 1.55;
}

.text-muted-ink {
  color: var(--tb-muted);
}

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

.site-header {
  background: var(--tb-amber);
}

.site-header-plain {
  background: var(--tb-page);
  border-bottom: 1px solid var(--tb-line);
}

.brand {
  color: var(--tb-ink);
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  text-decoration: none;
}

.brand:hover {
  color: var(--tb-ink);
}

/* The gorilla is taller than wide (614 × 718). */
.brand-mark {
  width: auto;
  height: 2.25rem;
}

/* Segmented control, DESIGN_PRINCIPLES §5a: every one-of-a-few choice is one. */
.lang-switch {
  display: inline-flex;
  padding: 3px;
  border-radius: 12px;
  background: rgba(20, 20, 15, 0.08);
}

.lang-switch a {
  min-width: 2.75rem;
  padding: 0.3rem 0.65rem;
  border-radius: 9px;
  color: var(--tb-ink);
  font-size: 0.875rem;
  font-weight: 600;
  text-align: center;
  text-decoration: none;
}

.lang-switch a:hover {
  background: rgba(20, 20, 15, 0.06);
}

.lang-switch a[aria-current="true"] {
  background: var(--tb-surface);
  box-shadow: 0 1px 2px rgba(20, 20, 15, 0.12);
}

/* --- Hero ------------------------------------------------------------------------------------- */

.hero {
  background: var(--tb-amber);
  color: var(--tb-ink);
  overflow: hidden;
}

.hero .lead-copy {
  color: rgba(20, 20, 15, 0.85);
}

/* A phone, and optionally a watch over its lower left corner. */
.device-pair {
  position: relative;
  max-width: 340px;
}

.device-pair-watch {
  position: absolute;
  left: -2.5rem;
  bottom: 2.5rem;
}

/* --- Store buttons (placeholders until the listings exist) --------------------------------------- */

.store-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  height: 56px;
  padding: 0 1.25rem 0 1rem;
  border-radius: 16px;
  background: var(--tb-ink);
  color: #FFFFFF;
  text-decoration: none;
  line-height: 1.1;
}

.store-btn:hover {
  color: #FFFFFF;
}

.store-btn-icon {
  width: 1.75rem;
  height: 1.75rem;
  flex-shrink: 0;
}

.store-btn-small {
  display: block;
  font-size: 0.75rem;
  opacity: 0.8;
}

.store-btn-name {
  display: block;
  font-size: 1.125rem;
  font-weight: 600;
}

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

.phone-frame {
  width: 100%;
  max-width: 280px;
  aspect-ratio: 9 / 19.5;
  margin: 0 auto;
  padding: 10px;
  border-radius: 44px;
  background: var(--tb-ink);
  box-shadow: 0 24px 48px -16px rgba(20, 20, 15, 0.35);
}

.phone-screen {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  height: 100%;
  border-radius: 34px;
  background: var(--tb-page);
  color: var(--tb-muted);
  text-align: center;
  overflow: hidden;
}

.phone-screen img {
  width: 100%;
  height: 100%;
  border-radius: 34px;
  object-fit: cover;
}

.watch-screen img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
}

.watch-frame {
  width: 168px;
  height: 168px;
  padding: 9px;
  border-radius: 50%;
  background: #3A3A36;
  box-shadow: 0 16px 32px -12px rgba(20, 20, 15, 0.45);
}

/* Only the watch stays black. */
.watch-screen {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  height: 100%;
  border-radius: 50%;
  background: #000000;
  color: rgba(255, 255, 255, 0.7);
  text-align: center;
  overflow: hidden;
}

/* --- Sections --------------------------------------------------------------------------------- */

.section {
  padding: 5rem 0;
}

.section-alt {
  background: var(--tb-surface);
  border-top: 1px solid var(--tb-line);
  border-bottom: 1px solid var(--tb-line);
}

.checklist {
  padding: 0;
  list-style: none;
}

.checklist li {
  display: flex;
  gap: 0.625rem;
  align-items: baseline;
  padding: 0.3rem 0;
}

.checklist-icon {
  position: relative;
  top: 0.15em;
  width: 1.125rem;
  height: 1.125rem;
  flex-shrink: 0;
  color: var(--tb-amber-ink);
}

/* --- Gallery: five screenshots, the middle one larger (js/gallery.js) ---------------------------- */

.gallery-section {
  overflow: hidden;
}

.gallery {
  --slide-w: 240px;
  --step-1: 250px;
  --step-2: 460px;
  --edge-opacity: 0.55;
}

.gallery-stage {
  position: relative;
  height: calc(var(--slide-w) * 19.5 / 9);
  touch-action: pan-y;
  user-select: none;
}

.gallery-slide {
  --x: 0px;
  --s: 1;
  position: absolute;
  top: 0;
  left: 50%;
  width: var(--slide-w);
  transform: translateX(-50%) translateX(var(--x)) scale(var(--s));
  transition: transform 0.45s cubic-bezier(0.22, 0.61, 0.36, 1), opacity 0.45s ease;
}

.gallery-slide .phone-frame {
  max-width: none;
}

.gallery-slide img {
  pointer-events: none;
  -webkit-user-drag: none;
}

.gallery-slide[data-pos="0"] {
  z-index: 3;
}

.gallery-slide[data-pos="-1"],
.gallery-slide[data-pos="1"] {
  --s: 0.82;
  z-index: 2;
  cursor: pointer;
}

.gallery-slide[data-pos="-1"] {
  --x: calc(var(--step-1) * -1);
}

.gallery-slide[data-pos="1"] {
  --x: var(--step-1);
}

.gallery-slide[data-pos="-2"],
.gallery-slide[data-pos="2"] {
  --s: 0.68;
  z-index: 1;
  opacity: var(--edge-opacity);
  cursor: pointer;
}

.gallery-slide[data-pos="-2"] {
  --x: calc(var(--step-2) * -1);
}

.gallery-slide[data-pos="2"] {
  --x: var(--step-2);
}

/* The slide that crosses from one end to the other appears there instead of sliding across. */
.gallery-slide.is-wrapping {
  transition: none;
  animation: gallery-arrive 0.45s ease both;
}

@keyframes gallery-arrive {
  from {
    opacity: 0;
  }
}

/* Round icon button, 48 (DESIGN_PRINCIPLES §5a). */
.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  padding: 0;
  border: 1.5px solid rgba(20, 20, 15, 0.2);
  border-radius: 50%;
  background: var(--tb-surface);
  color: var(--tb-ink);
}

.icon-btn:hover {
  background: rgba(20, 20, 15, 0.04);
}

.icon-btn svg {
  width: 20px;
  height: 20px;
}

.gallery-dot {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  padding: 0;
  border: 0;
  background: none;
}

.gallery-dot::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: rgba(20, 20, 15, 0.25);
  transition: width 0.2s ease, background-color 0.2s ease;
}

.gallery-dot[aria-current="true"]::before {
  width: 20px;
  background: var(--tb-ink);
}

@media (max-width: 991.98px) {
  .gallery {
    --slide-w: 220px;
    --step-1: 228px;
    --step-2: 420px;
  }
}

@media (max-width: 575.98px) {
  .gallery {
    --slide-w: 210px;
    --step-1: 205px;
    --step-2: 380px;
    --edge-opacity: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .gallery-slide,
  .gallery-slide.is-wrapping,
  .gallery-dot::before {
    transition: none;
    animation: none;
  }
}

/* --- Closing band and footer --------------------------------------------------------------------- */

.cta-band {
  background: var(--tb-amber);
  color: var(--tb-ink);
}

.site-footer {
  padding: 2.5rem 0;
  border-top: 1px solid var(--tb-line);
  font-size: 0.9375rem;
}

.footer-links a {
  color: var(--tb-ink);
  text-decoration: none;
}

.footer-links a:hover {
  text-decoration: underline;
}

/* --- Legal pages -------------------------------------------------------------------------------- */

.legal {
  max-width: 46rem;
  padding: 3rem 0 4rem;
}

.legal h1 {
  font-size: 2.25rem;
}

.legal h2 {
  margin-top: 2.5rem;
  font-size: 1.375rem;
}

.legal h3 {
  margin-top: 1.5rem;
  font-size: 1.125rem;
}

.legal p,
.legal li,
.legal dd {
  line-height: 1.65;
}

.legal dt {
  font-weight: 600;
}

.legal dd {
  margin-bottom: 0.75rem;
}

/* --- Small screens ----------------------------------------------------------------------------- */

@media (max-width: 575.98px) {
  .section {
    padding: 3.5rem 0;
  }

  .device-pair-watch {
    left: -0.5rem;
    bottom: 1.5rem;
  }

  .watch-frame {
    width: 128px;
    height: 128px;
    padding: 7px;
  }

  .store-btn {
    width: 100%;
    justify-content: center;
  }
}
