/* ============================================================
   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;
  /* full-bleed purple bar: background spans 100% viewport width. The inner
     content has a LOT of items (logo + 10 nav links + Windows/Linux/Login/
     trial), so the side padding is kept small (28px floor) and only auto-grows
     past a WIDE 1840px column. This gives the content max room at 1280-1920 so
     nothing clips; it intentionally does NOT align to the 1600px hero column
     (that alignment caused the right-edge "Start free trial" clip). */
  padding-top: 14px;
  padding-bottom: 14px;
  /* Align the header content's left/right edge with the .hero content column
     (max-width:1600px, centered, 48px side padding) so the logo's left edge
     lines up vertically with the hero heading's left edge below it. */
  padding-left: max(40px, calc((100% - 1600px) / 2 + 40px));
  padding-right: max(40px, calc((100% - 1600px) / 2 + 40px));
  width: 100%;
  gap: 14px;
  min-height: 104px;
  overflow: visible;   /* never crop the round logo at the header's bottom edge */
  background: #4338ca;
  border-top: 5px solid ghostwhite;
  border-bottom: 5px solid ghostwhite;
  box-sizing: border-box;
}
/* purple header: force readable light text/links over the #4338ca background */
.site-header .brand,
.site-header .brand span { color: #ffffff; }
.site-header .primary-nav a { color: rgba(255,255,255,0.82); }
.site-header .primary-nav a:hover { color: #ffffff; }
.site-header .link-login { color: #ffffff; }
.site-header .link-login:hover { color: #e9e6ff; }
.site-header .primary-nav a.has-caret::after {
  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='%23ffffff' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 19px;
  color: var(--ink);
  flex-shrink: 0;
  white-space: nowrap;
  overflow: visible;
}
/* Logo sized to sit comfortably inside the 104px bar (14px top/bottom padding
   => ~76px content box) with a little breathing room, so its rounded BOTTOM is
   never clipped by the header edge. */
.brand img { margin: -20px; width: 120px; height: auto; display: block; flex: 0 0 auto; }
.primary-nav {
  display: flex;
  align-items: center;
  gap: 8px;
  /* Size the nav to its CONTENT (not flex:1). With the header's space-between,
     this keeps the nav between brand and actions. justify-content:flex-start so
     that if the row ever gets tight, nav content never spills LEFT over the
     brand wordmark (the 1280px collision bug). */
  flex: 0 1 auto;
  justify-content: flex-start;
  min-width: 0;
  margin-left: 28px;    /* solid gap so the 247ch.at wordmark never touches "Features" */
  margin-right: 14px;   /* guaranteed breathing room before the action buttons */
}
.primary-nav a {
  color: var(--ink-soft);
  font-size: 12.5px;
  font-weight: 700;
  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: 12px;
  flex-shrink: 0;   /* the action buttons (incl. Start free trial) never clip */
}
.link-login {
  color: var(--ink);
  font-size: 15px;
  font-weight: 500;
  white-space: nowrap;
}
.link-login:hover { color: var(--brand); }

/* Header action buttons: tighter padding/font than the in-page CTAs so the
   four-item action cluster (Windows / Linux / Log in / Start free trial) fits
   on one row at 1280-1920 without the last button clipping past the viewport. */
.auth-actions .btn { padding: 11px 13px; font-size: 13.5px; gap: 6px; }
.auth-actions .link-login { font-size: 13.5px; }

/* ===== 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: 0 40px 0;
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 56px;
  align-items: start;   /* top-align text col w/ image col: 'center' was vertically
                           centering the shorter text against the tall image, which
                           read as phantom TOP/BOTTOM padding above the H1. */
  position: relative;   /* anchor for the top-right .kicker badge */
}
/* "Trusted by 2,000+ websites" badge anchored to the hero's TOP-RIGHT by
   alignment (right = hero side padding, top = hero top padding), so it tracks
   the hero's right edge responsively instead of a hardcoded left:920px. */
.hero .kicker {
  position: absolute;
  top: 48px;
  right: 48px;
  margin: 0;
  max-width: none;
  z-index: 2;
}
/* Copy column: cap the TEXT blocks at 540px, but let the trust-row span the
   full grid track so the SSL seal (margin-left:auto) lands flush against the
   left edge of the hero video, a clean gutter away, at every desktop width. */
.hero-copy { max-width: none; }
.hero-copy .kicker,
.hero-copy h1,
.hero-copy .lead,
.hero-copy .cta-row,
.hero-copy .trust-points { 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;
}

/* SSL trust seal: enlarged + pushed to the right edge of the copy column so it
   butts up against where the hero video begins. Asset is rendered at 2x
   (~379x300) for retina-sharp display at 150px tall. */
.trust-row { width: 100%; }
.ssl-seal {
  height: 150px;
  width: auto;
  display: block;
  margin-left: auto;   /* flush to the right edge of the copy column (the hero-video edge) */
  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: -60px auto 0;   /* pull the cards up to close the gap under the hero */
  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: 5px solid ghostwhite;
  border-bottom: 5px solid ghostwhite;
  margin-top: 48px;
  padding: 32px 48px;
  text-align: center;
  background: #4338ca;
  color: #ffffff;
  font-size: 14px;
  font-weight: 700;   /* white + bold so it's legible on the purple */
}
.landing-footer a {
  color: #ffffff;
  font-weight: 700;
  margin: 0 8px;
  transition: color 0.15s ease;
}
.landing-footer a:hover { color: #e9e6ff; }
.landing-footer .copy {
  font-size: 12px;
  color: #ffffff;
  font-weight: 700;
  margin-top: 8px;
}
.landing-footer .ssl-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 12px;
  padding: 5px 12px;
  border: 1px solid rgba(255,255,255,0.30);
  border-radius: 999px;
  background: rgba(255,255,255,0.14);
  color: #ffffff;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.01em;
}
.landing-footer .ssl-badge svg { flex: 0 0 auto; }

/* 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: 1400px) {
  /* Breakpoint RAISED to 1400px: the brand(144) + 10-link nav(~590) +
     action cluster(~434) + gaps simply do NOT fit on one row below ~1400px,
     and forcing it caused the nav to collide ON TOP of the logo/wordmark in
     the old 1080-1280 dead zone. Below 1400 the nav drops to its OWN
     full-width row so .brand and .primary-nav can NEVER overlap at any width. */
  .site-header { flex-wrap: wrap; }
  .primary-nav { order: 3; flex-basis: 100%; justify-content: center; flex-wrap: wrap; row-gap: 8px; margin-left: 0; }
}

/* ===== 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; }
  /* Stacked hero: the badge returns to normal in-flow top-left so it can't
     overlap the heading once the two columns collapse to one. */
  .hero .kicker { position: static; margin: 0 0 20px; }
  .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;
    margin-top: 0;   /* hero is stacked here — no negative pull (would overlap) */
  }
  /* Stacked hero: keep the seal left-aligned with the copy, slightly smaller. */
  .ssl-seal { margin-left: 0; height: 120px; }
  .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: 56px; }
  .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; }

/* themed-scrollbar v1 (247ch.at) */
* { scrollbar-width: thin; scrollbar-color: #4338ca #312e81; }
::-webkit-scrollbar { width: 13px; height: 13px; }
::-webkit-scrollbar-track { background: #312e81; }
::-webkit-scrollbar-thumb { background: #4338ca; border-radius: 7px; border: 2px solid #312e81; }
::-webkit-scrollbar-thumb:hover { background: #6d63e8; }
::-webkit-scrollbar-corner { background: #312e81; }
