/* TomatoMaster · landing page · matches the app's DarkScheme
 * (composeApp/.../ui/theme/Theme.kt). Warm coral primary, mint secondary,
 * deep warm-brown surfaces. */

:root {
  --primary: #ff7a6e;
  --primary-dark: #ff9b91;       /* Brighter on hover — interactions push UP in dark UIs. */
  --primary-soft: rgba(255, 122, 110, 0.14);
  --primary-on: #2a0705;          /* App's onPrimary — text colour on a primary-tinted surface. */
  --secondary: #78d1a6;
  --tertiary: #7ab6e3;
  --bg: #14100f;
  --surface: #1e1815;
  --surface-elevated: #2a201c;
  --text: #f5edea;
  --text-soft: #a89890;
  --border: #2d241f;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.45);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.5);
  --shadow-lg: 0 12px 40px rgba(255, 122, 110, 0.28);
  --radius-card: 16px;
  --radius-button: 10px;
  color-scheme: dark;
}

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

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

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: var(--primary);
  text-decoration: none;
}

a:hover {
  color: var(--primary-dark);
}

h1,
h2,
h3 {
  margin: 0;
  letter-spacing: -0.02em;
  color: var(--text);
}

h2 {
  font-size: clamp(1.8rem, 3vw, 2.4rem);
  font-weight: 700;
  text-align: center;
  margin-bottom: 12px;
}

p {
  margin: 0;
}

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
}

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

header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(20, 16, 15, 0.78);
  backdrop-filter: saturate(160%) blur(16px);
  -webkit-backdrop-filter: saturate(160%) blur(16px);
  border-bottom: 1px solid var(--border);
}

nav {
  max-width: 1100px;
  margin: 0 auto;
  padding: 14px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.brand-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.brand {
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--text);
  text-decoration: none;
  letter-spacing: -0.01em;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.brand-logo {
  width: 28px;
  height: 28px;
  display: block;
  border-radius: 6px;
}

.brand-wordmark {
  font-weight: 800;
  letter-spacing: -0.015em;
}

/* "Tomato" stays brand-red on hover too — the wordmark is intentionally
   bichromatic to match the reference logo. */
.brand-tomato {
  color: #e72929;
}

.brand-master {
  color: var(--text);
}

.brand:hover .brand-master {
  color: var(--text);
}

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

.header-version {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.72rem;
  color: var(--text-soft);
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 2px 6px;
  border-radius: 6px;
  letter-spacing: 0.02em;
}

.nav-links {
  display: flex;
  gap: 24px;
  align-items: center;
}

/* Scope to non-.btn anchors so the header CTA's own .btn-primary colour
 * (dark text on coral) wins specificity, not this muted nav-link colour
 * — otherwise the button text reads as low-contrast pale grey on coral. */
.nav-links a:not(.btn) {
  color: var(--text-soft);
  font-size: 0.95rem;
}

.nav-links a:not(.btn):hover {
  color: var(--text);
}

/* ------------------------------------------------------------------ Buttons */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  border-radius: var(--radius-button);
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  transition:
    transform 0.15s ease,
    background 0.15s ease,
    color 0.15s ease,
    box-shadow 0.15s ease,
    border-color 0.15s ease;
  white-space: nowrap;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-sm {
  padding: 8px 14px;
  font-size: 0.9rem;
}

.btn-large {
  padding: 14px 24px;
  font-size: 1rem;
}

.btn-primary {
  background: var(--primary);
  color: var(--primary-on);
  box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
  background: var(--primary-dark);
  color: var(--primary-on);
  box-shadow: var(--shadow-md);
}

.btn-outline {
  background: transparent;
  border-color: var(--border);
  color: var(--text);
}

.btn-outline:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.btn-ghost {
  background: transparent;
  color: var(--text);
}

.btn-ghost:hover {
  color: var(--primary);
}

/* Used inside the highlighted (coral-on-coral) Lifetime card — sits on a
 * primary-coloured background, so we invert: bg becomes the dark
 * primary-on tone, text becomes near-white for max contrast. */
.btn-light {
  background: var(--primary-on);
  color: #fff5f3;
}

.btn-light:hover {
  background: #1a0402;
  color: #ffffff;
}

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

.hero {
  text-align: center;
  padding: 96px 24px 96px;
  background:
    radial-gradient(
      ellipse 800px 400px at 50% -10%,
      rgba(255, 122, 110, 0.22),
      transparent 60%
    ),
    linear-gradient(180deg, rgba(255, 122, 110, 0.06) 0%, var(--bg) 100%);
}

.hero .badge-pill {
  display: inline-block;
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--border);
  font-size: 0.85rem;
  color: var(--text-soft);
  margin-bottom: 24px;
}

.hero h1 {
  font-size: clamp(2.2rem, 5vw, 3.6rem);
  font-weight: 800;
  line-height: 1.05;
  margin-bottom: 20px;
}

.hero .lede {
  font-size: clamp(1.05rem, 2vw, 1.2rem);
  color: var(--text-soft);
  max-width: 620px;
  margin: 0 auto 32px;
}

.hero .cta-row {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

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

section {
  padding: 80px 0;
}

.section-lede {
  text-align: center;
  color: var(--text-soft);
  max-width: 600px;
  margin: 0 auto 48px;
  font-size: 1.05rem;
}

/* ------------------------------------------------------------------ Features */

.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
}

.feature-card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  padding: 24px;
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease;
}

.feature-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.feature-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--primary-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  margin-bottom: 16px;
}

/* Premium variant: subtler coral fill + coral border, instead of a bright
 * primary-coloured tile. The flat bright fill washed out coloured emoji
 * (🔒 yellow, 🚫 red, 🎨 multi) right into the background — the deeper
 * tint keeps the "premium" cue while the emoji stays legible. */
.feature-icon.premium {
  background: rgba(255, 122, 110, 0.22);
  border: 1px solid rgba(255, 122, 110, 0.4);
  color: var(--primary);
}

.feature-card h3 {
  font-size: 1.05rem;
  font-weight: 600;
  margin-bottom: 6px;
}

.feature-card p {
  color: var(--text-soft);
  font-size: 0.95rem;
}

.feature-card .tag {
  position: absolute;
  top: 16px;
  right: 16px;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--primary);
  background: var(--primary-soft);
  padding: 4px 8px;
  border-radius: 6px;
}

/* ------------------------------------------------------------------ Pricing */

.plan-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
}

.plan-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  padding: 28px;
  display: flex;
  flex-direction: column;
}

.plan-card .plan-label {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--text-soft);
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
}

.plan-card .plan-price {
  display: flex;
  align-items: baseline;
  gap: 4px;
  margin-bottom: 10px;
}

.plan-card .amount {
  font-size: 2.5rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1;
}

.plan-card .unit {
  font-size: 1rem;
  color: var(--text-soft);
}

.plan-card .plan-footnote {
  color: var(--text-soft);
  font-size: 0.9rem;
  flex-grow: 1;
  margin-bottom: 20px;
}

.plan-card.highlighted {
  background: var(--primary);
  color: var(--primary-on);
  border-color: var(--primary);
  box-shadow: var(--shadow-lg);
}

.plan-card.highlighted .plan-label,
.plan-card.highlighted .unit,
.plan-card.highlighted .plan-footnote {
  color: rgba(42, 7, 5, 0.78); /* primary-on at lower opacity */
}

.badge-save {
  font-size: 0.7rem;
  font-weight: 700;
  background: var(--secondary); /* mint = app's secondary, pops on dark bg */
  color: #062716;                /* app's onSecondary */
  padding: 3px 8px;
  border-radius: 6px;
  letter-spacing: 0.06em;
}

.badge-best {
  font-size: 0.7rem;
  font-weight: 700;
  background: var(--primary-on);
  color: #fff5f3;
  padding: 3px 8px;
  border-radius: 6px;
  letter-spacing: 0.06em;
}

.reassurance {
  list-style: none;
  display: flex;
  justify-content: center;
  gap: 32px;
  flex-wrap: wrap;
  margin: 40px 0 0;
  padding: 0;
  color: var(--text-soft);
  font-size: 0.9rem;
}

/* ------------------------------------------------------------------ Download */

.download {
  background: linear-gradient(
    180deg,
    var(--bg) 0%,
    rgba(255, 122, 110, 0.08) 100%
  );
}

.version-pill {
  text-align: center;
  margin: 0 0 16px;
  font-size: 0.85rem;
  color: var(--text-soft);
  letter-spacing: 0.02em;
}

.version-pill strong {
  color: var(--text);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.9rem;
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 2px 8px;
  border-radius: 6px;
}

.download-row {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

/* Detected-OS primary CTA. Sits between the lede and the
   all-platforms row. Collapses to nothing when JS is off / OS
   couldn't be identified — the [hidden] inner <a> hides the
   button and the empty row gets zero vertical space, so the
   secondary row reads as the only CTA in that case. */
.download-primary-row {
  display: flex;
  justify-content: center;
  margin: 8px 0 24px;
}

.download-primary-row:has(#primary-download[hidden]) {
  display: none;
}

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

.faq-list {
  max-width: 720px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.faq-list details {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  padding: 18px 22px;
  transition: border-color 0.15s ease;
}

.faq-list details[open] {
  border-color: rgba(255, 122, 110, 0.4);
}

.faq-list summary {
  font-weight: 600;
  list-style: none;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

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

.faq-list summary::after {
  content: "+";
  font-size: 1.4rem;
  color: var(--text-soft);
  transition: transform 0.2s ease;
}

.faq-list details[open] summary::after {
  content: "−";
}

.faq-list details p {
  color: var(--text-soft);
  margin-top: 12px;
  font-size: 0.95rem;
  line-height: 1.6;
}

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

footer {
  border-top: 1px solid var(--border);
  padding: 32px 0;
  margin-top: 40px;
}

.footer-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  color: var(--text-soft);
  font-size: 0.9rem;
}

.footer-links {
  display: flex;
  gap: 24px;
}

.footer-links a {
  color: var(--text-soft);
}

.footer-links a:hover {
  color: var(--text);
}

.footer-credits {
  margin-top: 12px;
  color: var(--text-soft);
  font-size: 0.78rem;
  opacity: 0.7;
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.footer-credits a {
  color: var(--text-soft);
  text-decoration: underline;
  text-decoration-color: rgba(255, 255, 255, 0.2);
}

.footer-credits a:hover {
  color: var(--text);
}

/* ------------------------------------------------------------------ Language switcher */

.lang-switch {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-left: 12px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-soft);
}

.lang-switch a {
  color: var(--text-soft);
  text-decoration: none;
  padding: 2px 4px;
  border-radius: 4px;
}

.lang-switch a:hover {
  color: var(--text);
}

.lang-switch a.active {
  color: var(--text);
  background: rgba(255, 255, 255, 0.08);
}

.lang-sep {
  opacity: 0.4;
}

/* ------------------------------------------------------------------ Legal pages (refund / privacy) */

.legal {
  max-width: 760px;
  padding: 80px 24px 96px;
  line-height: 1.7;
  color: var(--text-soft);
}

.legal h1 {
  margin-bottom: 8px;
}

.legal .subhead {
  color: var(--text);
  font-size: 18px;
  font-weight: 600;
  margin-top: 0;
  margin-bottom: 32px;
}

.legal h2 {
  margin-top: 40px;
  font-size: 22px;
  color: var(--text);
}

.legal h3 {
  margin-top: 24px;
  margin-bottom: 4px;
  font-size: 17px;
  color: var(--text);
}

.legal .meta-line {
  font-size: 13px;
  color: var(--text-soft);
  margin: -16px 0 24px;
  font-style: italic;
}

.legal ul {
  margin: 12px 0 24px 24px;
}

.legal li + li {
  margin-top: 8px;
}

/* Inline links inside legal-page prose, but NOT .btn elements — same
 * specificity gotcha that bit `.nav-links a`: without :not(.btn) this rule
 * wins over .btn-primary's text colour and the button text disappears
 * (coral text on coral background). */
.legal a:not(.btn) {
  color: var(--primary);
}

.back-link {
  margin-bottom: 16px;
  font-size: 14px;
}

.back-link a {
  color: var(--text-soft);
  text-decoration: none;
}

.back-link a:hover {
  color: var(--text);
}

/* ------------------------------------------------------------------ Responsive */

@media (max-width: 720px) {
  .nav-links a:not(.btn):not([data-set-lang]) {
    display: none;
  }

  .hero {
    padding: 64px 24px;
  }

  section {
    padding: 56px 0;
  }

  .legal {
    padding: 56px 16px 72px;
  }
}

/* ===== Features carousel ===== */
.carousel {
  position: relative;
  margin-top: 16px;
}

.carousel-viewport {
  overflow: hidden;
  border-radius: var(--radius-card);
  /* Tell the browser this region prefers horizontal pan gestures, and
     surface a grab cursor so desktop users know they can swipe with the
     mouse. */
  cursor: grab;
  touch-action: pan-y;
  user-select: none;
}

.carousel-viewport:active {
  cursor: grabbing;
}

.carousel-track {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  transition: transform 0.4s ease;
}

.carousel-slide {
  flex: 0 0 100%;
  min-width: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  padding: 32px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  align-items: center;
  min-height: 420px;
  box-sizing: border-box;
}

.carousel-slide-text {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.carousel-slide-text .feature-icon {
  font-size: 32px;
}

.carousel-slide-text h3 {
  font-size: 24px;
  margin: 0;
}

.carousel-slide-text p {
  margin: 0;
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  opacity: 0.85;
}

.carousel-slide-text .tag {
  align-self: flex-start;
}

.carousel-slide-image {
  display: flex;
  align-items: center;
  justify-content: center;
  /* Constrain image area so portrait shots don't blow up the slide. */
  max-height: 360px;
}

.carousel-slide-image img {
  display: block;
  width: 100%;
  height: auto;
}

/* ===== Laptop-mockup wrapper (matches the OG image's device frame) =====
   A real desktop is always landscape, so the laptop bezel is always 16:10
   regardless of the screenshot orientation:
     - Landscape screenshots (break overlay, launcher) fill the screen.
     - Portrait screenshots (the timer window) render inside a faux
       macOS desktop, as a floating window with traffic-light buttons.
*/

.device-laptop {
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 100%;
  width: 100%;
}

.device-laptop-screen {
  background: var(--device-bezel, #14181F);
  padding: 8px;
  border-radius: 14px;
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.22);
  width: 100%;
  box-sizing: border-box;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  /* Centre whatever child we host inside the screen. */
  display: flex;
  align-items: stretch;
  justify-content: stretch;
}

/* Landscape screenshots fill the entire screen — they ARE the device's
   active display. */
.device-laptop-screen > img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 7px;
}

/* The trapezoidal laptop base — wider on top, narrower on bottom,
   mirroring the OG image generator. */
.device-laptop-base {
  width: 112%;
  height: 8px;
  background: linear-gradient(180deg, #2D3240 0%, #1A1E28 100%);
  clip-path: polygon(0% 0%, 100% 0%, 94% 100%, 6% 100%);
  border-bottom-left-radius: 2px;
  border-bottom-right-radius: 2px;
  margin-top: -1px;
}

/* ===== Faux macOS desktop, used to host portrait app screenshots. ===== */

.desktop-mockup {
  width: 100%;
  height: 100%;
  border-radius: 7px;
  /* Light, airy wallpaper reminiscent of recent macOS defaults — soft
     sky blue with a warm-pink highlight in one corner and our brand
     green peek in the other. */
  background:
    radial-gradient(ellipse 70% 55% at 20% 5%, rgba(255, 255, 255, 0.35) 0%, transparent 60%),
    radial-gradient(ellipse 70% 60% at 100% 0%, rgba(255, 200, 220, 0.4) 0%, transparent 60%),
    radial-gradient(ellipse 80% 70% at 0% 100%, rgba(120, 180, 255, 0.35) 0%, transparent 60%),
    radial-gradient(ellipse 60% 50% at 100% 100%, rgba(75, 213, 128, 0.25) 0%, transparent 65%),
    linear-gradient(160deg, #9bb5db 0%, #7e9bc6 50%, #6884b5 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

/* Thin menu bar at the top — translucent, sits flush like macOS. */
.desktop-mockup::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 5%;
  background: rgba(20, 24, 32, 0.22);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  z-index: 1;
}

/* Faux macOS dock — translucent rounded pill anchored bottom-center
   with a row of colored icon-like squares. Sits behind the app
   window like a real macOS dock that's partly hidden by a foreground
   window. */
.dock {
  position: absolute;
  /* Smaller bottom inset + slightly taller pill so the dock is
     guaranteed to peek out below the (now-square) app window. */
  bottom: 2%;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 3px 7px;
  height: 13%;
  background: rgba(255, 255, 255, 0.28);
  backdrop-filter: blur(14px) saturate(160%);
  -webkit-backdrop-filter: blur(14px) saturate(160%);
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  box-shadow:
    0 6px 20px rgba(0, 0, 0, 0.25),
    inset 0 1px 0 rgba(255, 255, 255, 0.35);
  z-index: 0;
}

.dock-icon {
  height: 85%;
  aspect-ratio: 1;
  border-radius: 4px;
  display: block;
  box-shadow:
    0 1px 2px rgba(0, 0, 0, 0.25),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
}
.dock-icon-finder { background: linear-gradient(160deg, #6ec6ff 0%, #2d7bd4 100%); }
.dock-icon-mail { background: linear-gradient(160deg, #ffcf6b 0%, #f59e0b 100%); }
.dock-icon-pomodoro {
  background: linear-gradient(160deg, #6cdf95 0%, #28a85e 100%);
  position: relative;
}
.dock-icon-pomodoro::after {
  /* Running-app indicator dot below the icon. */
  content: "";
  position: absolute;
  bottom: -5px;
  left: 50%;
  transform: translateX(-50%);
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.55);
}
.dock-icon-notes { background: linear-gradient(160deg, #d9b3ff 0%, #9333ea 100%); }
.dock-icon-music { background: linear-gradient(160deg, #ff8a82 0%, #d63846 100%); }
.dock-icon-photos { background: linear-gradient(160deg, #ffd778 0%, #ff7eb9 50%, #6ec6ff 100%); }
.dock-icon-calendar { background: linear-gradient(160deg, #ffffff 0%, #e8e8ec 100%); position: relative; }
.dock-icon-calendar::before {
  content: "";
  position: absolute;
  top: 12%;
  left: 0;
  right: 0;
  height: 18%;
  background: #ff5f57;
  border-top-left-radius: 4px;
  border-top-right-radius: 4px;
}

/* The floating app window. Sized so the timer's tall window takes
   most of the desktop height without crowding the edges. */
.app-window {
  background: #1a1d24;
  border-radius: 6px;
  box-shadow:
    0 12px 36px rgba(0, 0, 0, 0.45),
    0 0 0 1px rgba(255, 255, 255, 0.06);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  /* Shrunk from 82% so the dock at the bottom of the desktop mockup
     stays fully visible. Square screenshots (460×460) are wider per
     unit-of-height than the old portrait shots, so the window's
     overall footprint still reads as the primary element even at
     this shorter height. */
  height: 72%;
  max-height: 72%;
  margin-top: 6%;
  position: relative;
  z-index: 1;
}

.app-window-titlebar {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 5px 7px;
  background: rgba(255, 255, 255, 0.04);
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
  flex-shrink: 0;
}

.traffic {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
}
.traffic-red { background: #ff5f57; }
.traffic-yellow { background: #febc2e; }
.traffic-green { background: #28c840; }

.app-window > img {
  display: block;
  width: auto;
  height: 100%;
  /* Maintain the screenshot's native aspect; the window's height is
     locked to 85% of the desktop screen, so width follows. */
  object-fit: contain;
  background: #14181F;
}

@media (max-width: 720px) {
  .device-laptop-screen {
    padding: 6px;
    border-radius: 12px;
  }
  .app-window {
    height: 80%;
    max-height: 80%;
    margin-top: 3%;
  }
}

/* Nav arrows — floating just outside the slide frame so they don't cut
   into the card's border. Centered vertically with the slide. */
.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(20, 24, 32, 0.78);
  backdrop-filter: blur(8px) saturate(140%);
  -webkit-backdrop-filter: blur(8px) saturate(140%);
  color: var(--text);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  /* Subtle outer shadow + a soft inner highlight so the chip reads as
     "raised", not flat against the section. */
  box-shadow:
    0 4px 14px rgba(0, 0, 0, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
  transition: background 0.15s ease, transform 0.15s ease,
              border-color 0.15s ease;
  z-index: 2;
  /* Tighten the glyph optical-centering — the `‹` / `›` characters have
     small intrinsic side-bearings that nudge them off-centre. */
  padding-bottom: 2px;
}

.carousel-btn:hover {
  background: rgba(30, 36, 48, 0.92);
  border-color: rgba(255, 255, 255, 0.18);
  transform: translateY(-50%) scale(1.06);
}

.carousel-btn:active {
  transform: translateY(-50%) scale(0.98);
}

/* Fully outside the slide card so neither arrow overlaps its border.
   Slide max-width is constrained by .container, so this is safe on
   widescreen; the @media block below tucks the arrows back inside the
   card on narrow viewports where there's no breathing room. */
.carousel-btn-prev {
  left: -56px;
}

.carousel-btn-next {
  right: -56px;
}

.carousel-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 20px;
}

.carousel-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: none;
  padding: 0;
  background: var(--border);
  cursor: pointer;
  transition: background 0.15s ease, transform 0.15s ease;
}

.carousel-dot:hover {
  transform: scale(1.2);
}

.carousel-dot.active {
  background: var(--primary);
  transform: scale(1.15);
}

@media (max-width: 720px) {
  .carousel-slide {
    grid-template-columns: 1fr;
    gap: 20px;
    padding: 24px;
    min-height: 0;
  }
  .carousel-slide-image {
    order: -1; /* image above text on narrow screens */
  }
  .carousel-slide[data-orientation="portrait"] .carousel-slide-image img {
    max-width: 220px;
    max-height: 320px;
  }
  .carousel-btn {
    width: 36px;
    height: 36px;
    font-size: 20px;
  }
  /* On narrow viewports there's no room for the arrows outside the
     slide frame — tuck them in 10px from each edge instead. */
  .carousel-btn-prev { left: 10px; }
  .carousel-btn-next { right: 10px; }
}

/* ------------------------------------------------------------------ */
/* Cookie consent banner + privacy-page settings                       */
/* ------------------------------------------------------------------ */

/* Docked bottom strip. Slides in from below on .open. Never traps
   focus / never blocks interaction with the page — declining and
   accepting both reach the same destination, no forced friction. */
.consent-banner {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1000;
  background: var(--surface, #1d1d1f);
  border-top: 1px solid var(--border, rgba(255, 255, 255, 0.12));
  box-shadow: 0 -8px 24px rgba(0, 0, 0, 0.35);
  transform: translateY(100%);
  transition: transform 0.28s ease-out;
}
.consent-banner.open {
  transform: translateY(0);
}
.consent-banner-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 18px 24px;
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  align-items: center;
  justify-content: space-between;
}
.consent-banner-text {
  flex: 1 1 480px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.consent-banner-title {
  font-size: 1rem;
}
.consent-banner-body {
  margin: 0;
  font-size: 0.92rem;
  color: var(--text-soft, rgba(255, 255, 255, 0.7));
  line-height: 1.5;
}
.consent-banner-link {
  font-size: 0.85rem;
  align-self: flex-start;
}
.consent-banner-actions {
  display: flex;
  gap: 12px;
  flex-shrink: 0;
}
.consent-banner-actions .btn {
  min-width: 120px;
}

@media (max-width: 640px) {
  .consent-banner-inner {
    flex-direction: column;
    align-items: stretch;
    text-align: left;
  }
  .consent-banner-actions {
    width: 100%;
    flex-direction: row;
  }
  .consent-banner-actions .btn {
    flex: 1 1 auto;
  }
}

/* Privacy settings widget (inside /privacy.html). */
.privacy-settings {
  background: var(--surface, #1d1d1f);
  border: 1px solid var(--border, rgba(255, 255, 255, 0.12));
  border-radius: 12px;
  padding: 20px 24px;
  margin: 24px 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.privacy-settings-status {
  display: flex;
  align-items: baseline;
  gap: 10px;
  font-size: 1rem;
}
.privacy-settings-value[data-state="granted"] { color: #4ade80; }
.privacy-settings-value[data-state="denied"]  { color: #f87171; }
.privacy-settings-value[data-state="undecided"] { color: var(--text-soft, rgba(255, 255, 255, 0.7)); }
.privacy-settings-meta {
  margin: 0;
  color: var(--text-soft, rgba(255, 255, 255, 0.55));
}
.privacy-settings-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
.privacy-settings-actions .btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
