/* ============================================================
   247ch.at — landing.css
   Variable-based architecture per LAYOUT_COMP_TO_SITE_WHITEPAPER.md.
   No magic hex constants in component rules.
   ============================================================ */

:root {
  --brand:          #4338ca;          /* deep indigo from the comp */
  --brand-dark:     #312e81;
  --brand-soft:     rgba(67, 56, 202, 0.08);
  --ink:            #1a1633;
  --ink-soft:       #5b5670;
  --bg:             #ffffff;
  --bg-soft:        #f7f6fb;
  --line:           rgba(26, 22, 51, 0.08);
  --radius:         14px;
  --radius-sm:      8px;
  --shadow-card:    0 8px 24px rgba(26, 22, 51, 0.06);
  --shadow-hover:   0 12px 32px rgba(26, 22, 51, 0.10);
  --shadow-cta:     0 8px 18px rgba(67, 56, 202, 0.32);
  --font-sans:      -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", Helvetica, Arial, sans-serif;
}

/* ===== reset ===== */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; overflow-x: hidden; }  /* no horizontal scroll / edge-clip */
body {
  font-family: var(--font-sans);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  font-feature-settings: "ss01" on, "cv02" on;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button, input, textarea { font: inherit; color: inherit; }

/* ===== header / nav ===== */
.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: nowrap;
  padding: 18px 48px;
  max-width: 1600px;
  margin: 0 auto;
  gap: 32px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 20px;
  color: var(--ink);
  flex-shrink: 0;
  white-space: nowrap;
}
.brand img { width: 30px; height: auto; }
.primary-nav {
  display: flex;
  align-items: center;
  gap: 28px;
  flex: 1;
  justify-content: center;
  flex-shrink: 0;
}
.primary-nav a {
  color: var(--ink-soft);
  font-size: 15px;
  font-weight: 500;
  white-space: nowrap;
  transition: color 0.15s ease;
}
.primary-nav a:hover { color: var(--ink); }
.primary-nav a.has-caret::after {
  content: "";
  display: inline-block;
  width: 9px;
  height: 9px;
  margin-left: 5px;
  background: no-repeat center / contain
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235b5670' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
}
.auth-actions {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-shrink: 0;
}
.link-login {
  color: var(--ink);
  font-size: 15px;
  font-weight: 500;
  white-space: nowrap;
}
.link-login:hover { color: var(--brand); }

/* ===== buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: var(--radius-sm);
  font-size: 15px;
  font-weight: 600;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease, color 0.15s ease;
}
.btn.primary {
  background: var(--brand);
  color: #fff;
  box-shadow: var(--shadow-cta);
}
.btn.primary:hover {
  background: var(--brand-dark);
  transform: translateY(-1px);
  box-shadow: 0 12px 24px rgba(67, 56, 202, 0.40);
}
.btn.ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--line);
}
.btn.ghost:hover {
  border-color: var(--ink-soft);
  transform: translateY(-1px);
}
.btn.large { padding: 14px 26px; font-size: 16px; }

/* Demo CTA — prominent secondary: brand-tinted fill + brand border so it reads
   as a strong action next to the primary trial button, not a faint ghost link. */
.btn.demo {
  background: var(--brand-soft);
  color: var(--brand);
  border-color: var(--brand);
  font-weight: 700;
}
.btn.demo:hover {
  background: var(--brand);
  color: #fff;
  transform: translateY(-1px);
  box-shadow: var(--shadow-cta);
}
.btn.demo .play-icon {
  font-size: 12px;
  line-height: 1;
  display: inline-flex;
}

/* Trust badges — capability/security badges (NOT customer logos). */
.trust-badges {
  display: flex;
  list-style: none;
  padding: 0;
  margin: 14px 0 0;
  gap: 18px;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-soft);
  flex-wrap: wrap;
}
.trust-badges li {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.trust-badges .badge-ico {
  flex: 0 0 auto;
  color: var(--brand);
  display: block;
}
/* Inline SVG icons inside buttons/links never shrink or mis-baseline. */
.btn .ico,
.play-icon svg { flex: 0 0 auto; display: block; }

/* ===== hero ===== */
.hero {
  max-width: 1600px;
  margin: 0 auto;
  padding: 48px 48px 32px;
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 56px;
  align-items: center;
}
.hero-copy { max-width: 540px; }
.kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  background: var(--brand-soft);
  color: var(--brand);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  margin: 0 0 20px;
}
.kicker::before {
  content: "";
  display: inline-block;
  width: 14px;
  height: 14px;
  background: radial-gradient(circle, var(--brand) 50%, transparent 52%) no-repeat center;
}
.hero h1 {
  font-size: 56px;
  line-height: 1.05;
  font-weight: 800;
  margin: 0 0 18px;
  color: var(--ink);
  letter-spacing: -0.02em;
  /* Long single words (URLs, brand names) must never punch past the viewport. */
  overflow-wrap: break-word;
}
.hero .lead {
  font-size: 18px;
  color: var(--ink-soft);
  margin: 0 0 28px;
  line-height: 1.55;
  overflow-wrap: break-word;
}
.cta-row {
  display: flex;
  gap: 12px;
  margin: 0 0 24px;
  flex-wrap: wrap;
}
.trust-points {
  display: flex;
  list-style: none;
  padding: 0;
  margin: 0;
  gap: 22px;
  font-size: 14px;
  color: var(--ink-soft);
  flex-wrap: wrap;
}
.trust-points li {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.trust-points li .chk {
  color: var(--brand);
  flex: 0 0 auto;
}

.hero-figure {
  position: relative;
  margin: 0;
  min-height: 520px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.hero-figure .hero-video {
  width: 100%;
  max-width: 732px;   /* native size — fills the column, never upscales past source */
  height: auto;
  display: block;
}
/* The hero_person_photo.png has the design-comp's headline ("…ns.") + a stray
   purple CTA button baked into its LEFT edge (layout-extraction artifact), with
   the actual subject (woman at a desk) on the RIGHT. Crop the photo to its right
   portion via object-fit cover so that baked-in ghost text/button never shows
   beside the widget. The woman lives upper-right, so we keep that region. */
.hero-figure .person {
  width: 100%;
  max-width: 320px;           /* narrower than the 475px source so object-fit cover
                                 discards the left ~35% where the ghost "…ns." +
                                 button are baked in. */
  height: 500px;
  object-fit: cover;
  object-position: 100% 20%;  /* pin to the RIGHT edge → keep the woman, drop the baked-in left text */
  border-radius: var(--radius);
  margin-left: auto;
  display: block;
}
/* Widget sits over the BOTTOM-LEFT corner of the photo (was top-right, which
   buried the woman's face). Bottom-left keeps her face + torso fully visible. */
.hero-figure .widget-overlay {
  position: absolute;
  bottom: 18px;
  left: 0;
  width: 300px;
  max-width: 72%;
  filter: drop-shadow(0 18px 40px rgba(26, 22, 51, 0.22));
  transition: transform 0.25s ease;
}
.hero-figure .widget-overlay:hover { transform: translateY(-4px); }

/* ===== features row ===== */
.features {
  max-width: 1600px;
  margin: 0 auto;
  padding: 56px 48px 32px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 28px;
}
.feature {
  padding: 8px 4px;
}
.feature .icon-wrap {
  width: 64px;
  height: 64px;
  border-radius: 50%;        /* the pastel circle is now CSS, never a clipped raster */
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
}
.feature .icon-wrap svg { display: block; }
.feature h3 {
  font-size: 18px;
  font-weight: 700;
  margin: 0 0 8px;
  color: var(--ink);
}
.feature p {
  font-size: 14.5px;
  color: var(--ink-soft);
  margin: 0;
  line-height: 1.55;
}

/* ===== pricing teaser strip ===== */
.pricing-cta {
  max-width: 1600px;
  margin: 32px auto 64px;
  padding: 0 48px;
}
.pricing-cta .strip {
  background: var(--brand-soft);
  border-radius: var(--radius);
  padding: 28px 36px;
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
  overflow: visible;   /* never clip the round badge / its drop-shadow at the rounded corner */
}
.pricing-cta .strip .tag {
  width: 44px;
  height: 44px;
  min-width: 44px;     /* flex must not squash the circle into an oval/clip */
  border-radius: 50%;
  background: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  box-shadow: var(--shadow-card);
}
/* Desktop-band CTA icon: keep the full rounded square visible, never clipped. */
.pricing-cta .strip .cta-icon {
  flex: 0 0 auto;
  display: block;
}
.pricing-cta .strip .tag::before {
  content: "$";
  color: var(--brand);
  font-weight: 800;
  font-size: 18px;
}
.pricing-cta .strip .text {
  flex: 1;
  min-width: 200px;
}
.pricing-cta .strip h3 {
  font-size: 22px;
  font-weight: 700;
  margin: 0 0 4px;
  color: var(--ink);
}
.pricing-cta .strip p {
  margin: 0;
  font-size: 15px;
  color: var(--ink-soft);
}

/* ===== footer ===== */
.landing-footer {
  border-top: 1px solid var(--line);
  margin-top: 48px;
  padding: 32px 48px;
  text-align: center;
  color: var(--ink-soft);
  font-size: 14px;
}
.landing-footer a {
  color: var(--ink-soft);
  margin: 0 8px;
  transition: color 0.15s ease;
}
.landing-footer a:hover { color: var(--ink); }
.landing-footer .copy {
  font-size: 12px;
  color: var(--ink-soft);
  margin-top: 8px;
  opacity: 0.7;
}

/* Header gets tight before the content does: once the brand + nav + 4 action
   buttons can no longer share one row, drop the nav to its own centered row so
   nothing overflows / smooshes. Desktop (>1080px) stays single-row, full-width. */
@media (max-width: 1080px) {
  .site-header { flex-wrap: wrap; }
  .primary-nav { order: 3; flex-basis: 100%; justify-content: center; }
}

/* ===== responsive — tablet (~1100px) ===== */
@media (max-width: 1100px) {
  .site-header { padding: 18px 28px; }
  .primary-nav { gap: 20px; }
  .hero {
    padding: 32px 28px 24px;
    grid-template-columns: 1fr;
    gap: 32px;
    text-align: left;
  }
  .hero h1 { font-size: 44px; }
  .hero-figure { min-height: auto; }
  .hero-figure .person { max-width: 380px; height: 360px; margin: 0 auto; object-position: 78% 22%; }
  .hero-figure .widget-overlay { left: 0; right: auto; top: auto; bottom: 12px; width: 230px; }
  .features {
    grid-template-columns: repeat(2, 1fr);
    padding: 40px 28px 16px;
    gap: 28px 24px;
  }
  .pricing-cta { padding: 0 28px; }
}

/* ===== responsive — mobile (~720px) ===== */
@media (max-width: 720px) {
  .site-header {
    flex-wrap: wrap;
    padding: 14px 20px;
    gap: 12px;
  }
  .primary-nav { order: 3; flex-basis: 100%; justify-content: flex-start; gap: 14px; font-size: 14px; }
  .auth-actions { gap: 12px; flex-wrap: wrap; justify-content: flex-end; }
  .auth-actions .btn { padding: 10px 16px; font-size: 14px; }
  .link-login { font-size: 14px; }
  /* No one installs a Windows/Linux DESKTOP app from a phone — drop the two
     download buttons from the mobile header so it stays a clean brand +
     Log in + Start-trial bar (the in-page download section still covers it). */
  .auth-actions .btn-download,
  .auth-actions .linux-menu { display: none; }
  .hero { padding: 24px 20px; gap: 24px; }
  .hero h1 { font-size: 34px; }
  .hero .lead { font-size: 16px; }
  .cta-row .btn { flex: 1 1 100%; }
  .trust-points { gap: 14px; }
  /* The person PNG has the desktop headline ("…s.") baked into its left edge
     (layout-comp extraction artifact). On stacked mobile that stray text reads
     as a glitch, so crop the photo to its right portion via object-fit cover. */
  .hero-figure { width: 100%; }
  .hero-figure .person {
    width: 100%;
    max-width: 100%;
    height: 260px;
    object-fit: cover;
    object-position: 88% 28%;   /* crop past the baked-in "…s." headline text on the left */
    margin: 0;
  }
  /* Chat-mockup over the bottom-left corner so the woman stays visible; capped
     so the avatar circles never spill past the figure edge on ~360px phones. */
  .hero-figure .widget-overlay { width: 200px; max-width: 56%; left: 0; right: auto; top: auto; bottom: 10px; }
  /* Tap targets ≥44px on touch. */
  .btn { min-height: 44px; }
  .primary-nav a, .link-login { display: inline-flex; align-items: center; min-height: 44px; }
  .features {
    grid-template-columns: 1fr;
    padding: 32px 20px 0;
    gap: 24px;
  }
  .pricing-cta { padding: 0 20px; margin-bottom: 40px; }
  .pricing-cta .strip { padding: 22px 22px; }
  .landing-footer { padding: 24px 20px; }
}

/* ===== responsive — small phones (~360px and down: iPhone SE, small Android) === */
@media (max-width: 420px) {
  .site-header { padding: 12px 16px; gap: 10px; }
  .brand { font-size: 18px; }
  .brand img { width: 26px; }
  .primary-nav { gap: 12px; font-size: 13px; }
  .auth-actions { gap: 8px; }
  .auth-actions .btn { padding: 9px 12px; font-size: 13px; }
  .hero { padding: 20px 16px; gap: 20px; }
  .hero h1 { font-size: 28px; }
  .hero .lead { font-size: 15px; }
  .btn.large { padding: 13px 18px; font-size: 15px; }
  /* Mockup overlays the hero photo; cap it so the avatar circles never spill
     past the figure edge and trigger horizontal scroll on a 320–360px screen. */
  .hero-figure .person { max-width: 100%; height: 220px; }
  .hero-figure .widget-overlay { width: 170px; max-width: 52%; }
  .features { padding: 28px 16px 0; gap: 20px; }
  .feature .icon-wrap { width: 56px; height: 56px; margin-bottom: 14px; }
  .pricing-cta { padding: 0 16px; }
  .pricing-cta .strip { padding: 20px 18px; gap: 16px; }
  .pricing-cta .strip h3 { font-size: 19px; }
  .landing-footer { padding: 20px 16px; }
  .landing-footer a { display: inline-block; margin: 4px 6px; }  /* wrap + tappable */
}

/* Linux app download dropdown — native <details>, no JS, light theme */
.linux-menu { position: relative; display: inline-block; }
.linux-menu > summary { display: inline-flex; align-items: center; gap: 7px; }
.linux-menu > summary::-webkit-details-marker { display: none; }
.linux-menu > summary::marker { content: ""; }
.linux-menu-list {
  position: absolute; right: 0; top: calc(100% + 8px); z-index: 60;
  min-width: 244px; padding: 6px;
  background: #fff; border: 1px solid rgba(26,22,51,0.10);
  border-radius: 12px; box-shadow: 0 14px 34px rgba(26,22,51,0.16);
  display: flex; flex-direction: column;
}
.linux-menu-list a, .linux-menu-list .soon {
  padding: 9px 12px; border-radius: 8px; font-size: 14px;
  color: var(--ink); text-decoration: none; white-space: nowrap;
}
.linux-menu-list a:hover { background: var(--brand-soft); }
.linux-menu-list a strong, .linux-menu-list .soon strong { color: var(--brand); margin-right: 5px; }
.linux-menu-list .soon { color: var(--ink-soft); opacity: .72; cursor: default; }
