/* ==========================================================================
   Calltica — design tokens + custom styles
   Everything Tailwind can't express cleanly lives here.
   Change the brand colours in ONE place: the :root block below,
   then mirror the same hex values in the tailwind.config block in each page.
   ========================================================================== */

:root {
  /* Brand — wine, sampled from the app icon (#4E171D … #5B2329) */
  --brand-50:  #fdf4f5;
  --brand-100: #f9e4e7;
  --brand-200: #f0c4cb;
  --brand-300: #e29aa6;
  --brand-400: #ce6d7f;
  --brand-500: #b04e62;
  --brand-600: #8b3244;
  --brand-700: #6b2130;
  --brand-800: #4e171d;
  --brand-900: #351016;

  /* Accent — muted champagne. Used sparingly: gradient type, markers, rules. */
  --accent-400: #e3c583;
  --accent-500: #cda85c;

  /* Silver — the logo's metal. For hairlines and embossed edges. */
  --silver-100: #ffffff;
  --silver-300: #e8e8e6;
  --silver-500: #bfc0bc;

  /* Neutrals — warm charcoal with a wine undertone, not cold slate */
  --ink-950: #0c0609;
  --ink-900: #180f13;
  --ink-700: #40363a;
  --ink-500: #8a7d81;
  --ink-200: #e3dbdd;
  --ink-50:  #faf7f7;
}

html { scroll-behavior: smooth; }

/* Respect users who get motion sickness. */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

body {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;

  /* A flat near-black reads cheap. Two very low-opacity wine washes give the
     page depth and keep it unmistakably in the brand's colour world. The
     gradients are fixed so they do not band or shift while scrolling. */
  background-color: var(--ink-950);
  background-image:
    radial-gradient(58rem 34rem at 50% -14rem, rgba(107, 33, 48, 0.42), transparent 70%),
    radial-gradient(46rem 30rem at 108% 8%,   rgba(78, 23, 29, 0.30), transparent 68%);
  background-attachment: fixed;
  background-repeat: no-repeat;
}

/* Selection in brand colours rather than the browser default blue. */
::selection { background: var(--brand-600); color: #fff; }

/* Scrollbar, on the browsers that allow it. Small detail, reads considered. */
* { scrollbar-color: var(--brand-700) transparent; }
::-webkit-scrollbar { width: 11px; height: 11px; }
::-webkit-scrollbar-track { background: var(--ink-950); }
::-webkit-scrollbar-thumb {
  background: var(--brand-800);
  border-radius: 99px;
  border: 3px solid var(--ink-950);
}
::-webkit-scrollbar-thumb:hover { background: var(--brand-600); }

/* --------------------------------------------------------------------------
   Scroll reveal — main.js toggles .is-visible via IntersectionObserver
   -------------------------------------------------------------------------- */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1),
              transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
  will-change: opacity, transform;
}
.reveal.is-visible {
  opacity: 1;
  transform: none;
}
/* Stagger helpers — put .reveal-d1..d5 on siblings for a cascade */
.reveal-d1 { transition-delay: 80ms; }
.reveal-d2 { transition-delay: 160ms; }
.reveal-d3 { transition-delay: 240ms; }
.reveal-d4 { transition-delay: 320ms; }
.reveal-d5 { transition-delay: 400ms; }

/* --------------------------------------------------------------------------
   Decorative background washes
   -------------------------------------------------------------------------- */
.bg-grid {
  background-image:
    linear-gradient(to right, rgba(160, 148, 151, 0.12) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(160, 148, 151, 0.12) 1px, transparent 1px);
  background-size: 56px 56px;
}

/* Fades a decorative layer out towards the edges so it never looks pasted on. */
.mask-fade {
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, #000 40%, transparent 100%);
          mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, #000 40%, transparent 100%);
}

.glow {
  position: absolute;
  border-radius: 9999px;
  filter: blur(90px);
  pointer-events: none;
}

/* Thin gradient rule used to separate dark sections. */
.hairline {
  height: 1px;
  background: linear-gradient(to right, transparent, rgba(160, 148, 151, 0.35), transparent);
}

/* --------------------------------------------------------------------------
   Gradient type — used for one or two words in a headline, never a sentence
   -------------------------------------------------------------------------- */
.text-gradient {
  background: linear-gradient(115deg,
    var(--brand-300) 0%,
    var(--accent-400) 52%,
    var(--silver-300) 100%);
  -webkit-background-clip: text;
          background-clip: text;
  color: transparent;
}

/* --------------------------------------------------------------------------
   Metal rule — the logo is embossed silver, so a hairline that catches a
   highlight in the middle echoes it. Used under major section headings.
   -------------------------------------------------------------------------- */
.rule-metal {
  height: 1px;
  border: 0;
  background: linear-gradient(to right,
    transparent,
    rgba(191, 192, 188, 0.45) 35%,
    rgba(255, 255, 255, 0.65) 50%,
    rgba(191, 192, 188, 0.45) 65%,
    transparent);
}

/* --------------------------------------------------------------------------
   Phone mockup — pure CSS, no image asset needed.
   Replace the inner .phone-screen markup with a real screenshot <img>
   once you have one from the Flutter app.
   -------------------------------------------------------------------------- */
.phone {
  position: relative;
  width: 300px;
  border-radius: 44px;
  padding: 10px;
  background: linear-gradient(160deg, #2a2125, #0c0609);
  box-shadow:
    0 0 0 1px rgba(160, 148, 151, 0.25),
    0 40px 80px -20px rgba(12, 6, 9, 0.75),
    0 0 60px -20px rgba(176, 78, 98, 0.5);
}
.phone::before {                       /* notch */
  content: "";
  position: absolute;
  top: 18px; left: 50%;
  transform: translateX(-50%);
  width: 96px; height: 22px;
  background: #0c0609;
  border-radius: 999px;
  z-index: 3;
}
.phone-screen {
  position: relative;
  border-radius: 36px;
  overflow: hidden;
  background: #faf7f7;
  aspect-ratio: 9 / 19.5;
}

/* Ripple behind the dial button so the mockup feels alive. */
.dial-pulse::after {
  content: "";
  position: absolute;
  inset: -8px;
  border-radius: 999px;
  border: 2px solid rgba(227, 197, 131, 0.7);
  animation: dial-ring 2.4s ease-out infinite;
}
@keyframes dial-ring {
  0%   { transform: scale(0.85); opacity: 0.9; }
  70%  { transform: scale(1.45); opacity: 0; }
  100% { transform: scale(1.45); opacity: 0; }
}

/* Slow float for the mockup and floating stat cards. */
.float { animation: float 6s ease-in-out infinite; }
.float-slow { animation: float 9s ease-in-out infinite; }
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-12px); }
}

/* --------------------------------------------------------------------------
   FAQ accordion
   -------------------------------------------------------------------------- */
.faq-panel {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}
.faq-item.is-open .faq-panel { grid-template-rows: 1fr; }
.faq-panel > div { overflow: hidden; }
.faq-item.is-open .faq-icon { transform: rotate(45deg); }
.faq-icon { transition: transform 0.3s ease; }

/* --------------------------------------------------------------------------
   Marquee for the "who it's for" strip
   -------------------------------------------------------------------------- */
.marquee { display: flex; overflow: hidden; user-select: none; gap: 2rem; }
.marquee__track {
  display: flex;
  gap: 2rem;
  flex-shrink: 0;
  min-width: 100%;
  animation: scroll-x 32s linear infinite;
}
@keyframes scroll-x {
  from { transform: translateX(0); }
  to   { transform: translateX(calc(-100% - 2rem)); }
}
.marquee:hover .marquee__track { animation-play-state: paused; }

/* --------------------------------------------------------------------------
   Focus states — visible for keyboard users, invisible for mouse users
   -------------------------------------------------------------------------- */
:focus-visible {
  outline: 2px solid var(--accent-400);
  outline-offset: 3px;
  border-radius: 6px;
}

/* Skip link, revealed on focus. */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
}
.skip-link:focus {
  left: 1rem;
  top: 1rem;
  padding: 0.75rem 1.25rem;
  background: var(--brand-600);
  color: #fff;
  border-radius: 8px;
}

/* Prevent background scroll while the mobile menu is open. */
body.nav-open { overflow: hidden; }

/* --------------------------------------------------------------------------
   Blog article typography
   Long-form reading styles. Applied once to the <article> wrapper so the
   article body can be written as plain HTML without utility classes on
   every paragraph — which keeps the posts easy to edit by hand.
   -------------------------------------------------------------------------- */
.prose {
  font-size: 1.0625rem;      /* 17px — comfortable on phones, not shouty */
  line-height: 1.75;
  color: #c8bdc0;            /* ink-300 */
}
@media (min-width: 640px) {
  .prose { font-size: 1.125rem; line-height: 1.8; }
}

.prose > * + * { margin-top: 1.5em; }

.prose h2 {
  font-family: 'Plus Jakarta Sans', Inter, system-ui, sans-serif;
  font-weight: 800;
  font-size: 1.6rem;
  line-height: 1.25;
  letter-spacing: -0.02em;
  color: #fff;
  margin-top: 2.75em;
  scroll-margin-top: 6rem;
}
@media (min-width: 640px) { .prose h2 { font-size: 1.9rem; } }

.prose h3 {
  font-family: 'Plus Jakarta Sans', Inter, system-ui, sans-serif;
  font-weight: 700;
  font-size: 1.2rem;
  line-height: 1.35;
  color: #fff;
  margin-top: 2.25em;
}

.prose h2 + p, .prose h3 + p { margin-top: 0.85em; }

.prose strong { color: #f3eeef; font-weight: 600; }
.prose em { color: #e3dbdd; }

.prose a {
  color: var(--brand-400);
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color 0.2s;
}
.prose a:hover { color: #fff; }

.prose ul, .prose ol { padding-left: 1.35em; }
.prose ul { list-style: disc; }
.prose ol { list-style: decimal; }
.prose li { margin-top: 0.6em; padding-left: 0.35em; }
.prose li::marker { color: var(--brand-400); }

/* Lead paragraph — the standfirst under the headline. */
.prose .lead {
  font-size: 1.2rem;
  line-height: 1.65;
  color: #a09497;
}
@media (min-width: 640px) { .prose .lead { font-size: 1.3rem; } }

/* Pull quote — the line worth screenshotting for LinkedIn. */
.prose blockquote {
  margin-top: 2.25em;
  margin-bottom: 2.25em;
  padding: 1.5rem 1.75rem;
  border-left: 3px solid var(--brand-500);
  background: rgba(176, 78, 98, 0.07);
  border-radius: 0 1rem 1rem 0;
  font-family: 'Plus Jakarta Sans', Inter, system-ui, sans-serif;
  font-size: 1.2rem;
  font-weight: 600;
  line-height: 1.5;
  color: #fff;
}
@media (min-width: 640px) { .prose blockquote { font-size: 1.35rem; } }
.prose blockquote > * + * { margin-top: 0.75em; }

/* Callout — used for the arithmetic boxes. */
.prose .callout {
  padding: 1.5rem 1.75rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(24, 15, 19, 0.6);
  border-radius: 1.25rem;
  font-size: 1rem;
  line-height: 1.7;
}
.prose .callout > * + * { margin-top: 0.75em; }
.prose .callout-title {
  font-family: 'Plus Jakarta Sans', Inter, system-ui, sans-serif;
  font-weight: 700;
  font-size: 0.75rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent-400);
}
.prose .callout .figure {
  font-family: 'Plus Jakarta Sans', Inter, system-ui, sans-serif;
  font-weight: 800;
  font-size: 1.75rem;
  color: #fff;
  display: block;
}

/* Divider between major beats of an argument. */
.prose hr {
  margin-top: 3em;
  margin-bottom: 3em;
  border: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.15), transparent);
}

/* Comparison table inside an article. */
.prose .table-wrap {
  overflow-x: auto;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 1.25rem;
}
.prose table {
  width: 100%;
  min-width: 34rem;
  border-collapse: collapse;
  font-size: 0.95rem;
}
.prose th, .prose td {
  text-align: left;
  padding: 0.9rem 1.25rem;
  border-bottom: 1px solid rgba(255,255,255,0.07);
  vertical-align: top;
}
.prose thead th {
  font-family: 'Plus Jakarta Sans', Inter, system-ui, sans-serif;
  font-weight: 700;
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #fff;
}
.prose tbody tr:last-child th,
.prose tbody tr:last-child td { border-bottom: 0; }
.prose tbody th { font-weight: 600; color: #e3dbdd; }

/* First paragraph after the headline block gets no top margin. */
.prose > :first-child { margin-top: 0; }

/* ==========================================================================
   VIDEO
   A click-to-play "facade": the poster is a plain <img>, and the YouTube
   iframe is only created once the visitor presses play. That keeps the ~700 KB
   of YouTube player JS — and every YouTube cookie — off the page until it is
   actually wanted, which is what keeps these pages fast enough to rank.
   ========================================================================== */
.video-frame {
  position: relative;
  aspect-ratio: 16 / 9;
  border-radius: 1.5rem;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.12);
  background: #180f13;
  box-shadow: 0 30px 80px -30px rgba(0,0,0,0.9);
}
.video-frame iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}
.video-facade {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  cursor: pointer;
  background: #180f13;
  display: block;
}
.video-poster {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.7s ease, opacity 0.3s ease;
}
.video-facade:hover .video-poster,
.video-facade:focus-visible .video-poster { transform: scale(1.04); opacity: 0.8; }

/* Wine wash so white play button and duration stay legible on any thumbnail. */
.video-facade::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(60% 60% at 50% 50%, rgba(12,6,9,0.15), rgba(12,6,9,0.62));
}
.video-play {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  z-index: 1;
  display: grid;
  place-items: center;
  width: 78px;
  height: 78px;
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(180deg, var(--brand-500, #b04e62), var(--brand-700, #6b2130));
  box-shadow: 0 18px 40px -12px rgba(0,0,0,0.85), inset 0 1px 0 rgba(255,255,255,0.22);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
@media (min-width: 640px) { .video-play { width: 92px; height: 92px; } }
.video-facade:hover .video-play,
.video-facade:focus-visible .video-play { transform: translate(-50%, -50%) scale(1.08); }
.video-play svg { width: 30px; height: 30px; margin-left: 4px; }
@media (min-width: 640px) { .video-play svg { width: 34px; height: 34px; } }

.video-duration {
  position: absolute;
  right: 0.85rem;
  bottom: 0.85rem;
  z-index: 1;
  padding: 0.25rem 0.6rem;
  border-radius: 0.6rem;
  font-size: 0.78rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: #fff;
  background: rgba(12,6,9,0.78);
  border: 1px solid rgba(255,255,255,0.12);
  backdrop-filter: blur(4px);
}

/* Category chips on the video library. */
.vchip[aria-pressed="true"] {
  background: var(--brand-600, #8b3244);
  border-color: rgba(255,255,255,0.22);
  color: #fff;
}
