/* ==========================================================================
   WeRentr Homepage — page-specific styles (loaded only by /  ·  home.html)
   Builds on the shared Legal Center tokens in styles.css; never edits them.
   Fluid-first: type and spacing scale with clamp(); grids self-fit with
   auto-fit/minmax so layout adapts continuously, not just at breakpoints.
   ========================================================================== */

:root {
  --wr-deep:  #003D35;  /* brand deep green (wordmark ink) */
  --wr-cream: #FDFCF5;
  --wr-card:  #ffffff;

  /* Fluid rhythm shared by the homepage sections */
  --home-pad-x:    clamp(16px, 4vw, 24px);
  --home-band-y:   clamp(52px, 8vw, 84px);
  --home-grid-gap: clamp(14px, 2.5vw, 18px);
}

/* ---------- Dark scheme (homepage only — legal pages have their own block
   in styles.css; keep the two value sets in sync) ---------- */
@media (prefers-color-scheme: dark) {
  :root {
    --wr-ink:        #f2f7f4;
    --wr-text:       #c9d6d0;
    --wr-text-muted: #8fa39a;
    --wr-line:       #1d2c26;
    --wr-line-soft:  #17241f;
    --wr-bg:         #0a1411;
    --wr-bg-soft:    #0f1b17;
    --wr-card:       #101d18;
    --wr-accent-tint:   #10241d;
    --wr-accent-tint-2: #0d1e18;
    --wr-accent-darker: #45d3a8;
    --wr-accent-deep:   #6fdfbd;
    --wr-shadow-sm: 0 1px 2px rgba(0,0,0,.4);
    --wr-shadow:    0 8px 30px rgba(0,0,0,.45);
    --wr-shadow-lg: 0 22px 60px rgba(0,0,0,.6);
  }
  /* Shared components that hard-code the light ink — keep them dark surfaces */
  .wr-footer { background: #0a1310; }
  .wr-skip-link { background: #0a1310; }
}

/* ---------- Header: "Get the app" CTA pill ---------- */
.home-nav-cta {
  background: var(--wr-deep); color: var(--wr-cream) !important; font-weight: 700 !important;
  padding: 10px 18px !important; border-radius: 10px !important; margin-left: 8px;
  box-shadow: 0 3px 10px rgba(0, 40, 35, 0.35);
}
.home-nav-cta:hover { background: #00332c; }
@media (max-width: 768px) {
  .home-nav-cta { margin-left: 0; margin-top: 4px; }
}

/* ---------- Shared section scaffolding ---------- */
.home-wrap { max-width: var(--wr-max); margin: 0 auto; padding: 0 var(--home-pad-x); }
.home-band { padding: var(--home-band-y) 0; background: var(--wr-bg); }
.home-band--soft { background: var(--wr-bg-soft); border-block: 1px solid var(--wr-line-soft); }
.home-sec-head { max-width: 640px; margin-bottom: clamp(28px, 5vw, 44px); }
.home-sec-head h2 {
  margin: 0 0 clamp(10px, 2vw, 14px); font-size: clamp(1.55rem, 1.2rem + 1.8vw, 2.3rem);
  font-weight: 800; line-height: 1.15; letter-spacing: -0.03em; color: var(--wr-ink);
  text-wrap: balance;
}
.home-sec-head p { color: var(--wr-text-muted); font-size: clamp(0.98rem, 0.92rem + 0.35vw, 1.06rem); margin: 0; }

/* ---------- Hero ---------- */
.home-hero { background: var(--wr-bg); border-bottom: 1px solid var(--wr-line); overflow: hidden; }
.home-hero__grid {
  max-width: var(--wr-max); margin: 0 auto;
  padding: clamp(44px, 7vw, 72px) var(--home-pad-x) clamp(40px, 6vw, 64px);
  display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: clamp(36px, 5vw, 56px); align-items: center;
}
.home-hero h1 {
  margin: 0 0 clamp(14px, 2.5vw, 20px); font-size: clamp(2.05rem, 1.4rem + 3.2vw, 3.5rem);
  line-height: 1.06; font-weight: 800; letter-spacing: -0.035em; color: var(--wr-ink);
  text-wrap: balance;
}
.home-hero h1 em { font-style: normal; color: var(--wr-accent-darker); }
.home-hero__lead {
  font-size: clamp(1.02rem, 0.95rem + 0.45vw, 1.16rem); line-height: 1.65;
  color: var(--wr-text-muted); max-width: 34em; margin: 0 0 clamp(24px, 4vw, 32px);
}
.home-cta-row {
  display: flex; flex-wrap: wrap; gap: clamp(10px, 2vw, 14px); align-items: center;
  margin-bottom: clamp(24px, 4vw, 34px);
}
.home-hero__stats {
  display: flex; flex-wrap: wrap; gap: 10px clamp(20px, 3.5vw, 36px);
  padding-top: clamp(18px, 3vw, 24px);
  border-top: 1px solid var(--wr-line-soft);
  font-size: 0.92rem; color: var(--wr-text-muted);
}
.home-hero__stats b {
  display: block; font-size: clamp(1.15rem, 1rem + 0.8vw, 1.35rem); font-weight: 800;
  color: var(--wr-ink); font-variant-numeric: tabular-nums; letter-spacing: -0.02em;
}

/* ---------- Buttons ---------- */
.home-appstore {
  display: inline-flex; align-items: center; justify-content: center; gap: 11px;
  background: #0b0f0d; color: #fff; border-radius: 12px; padding: 11px 20px 11px 16px;
  box-shadow: 0 8px 20px -8px rgba(12, 23, 19, 0.5);
}
.home-appstore:hover { filter: brightness(1.15); text-decoration: none; }
.home-appstore svg { width: 26px; height: 26px; flex: none; }
.home-appstore__lines { line-height: 1.15; text-align: left; }
.home-appstore__s { display: block; font-size: 10.5px; font-weight: 500; opacity: 0.75; letter-spacing: 0.02em; }
.home-appstore__b { display: block; font-size: 17px; font-weight: 700; letter-spacing: -0.01em; }
.home-ghost-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-weight: 700; font-size: 15.5px;
  color: var(--wr-accent-darker); padding: 12px 18px; border-radius: 12px;
  border: 1.5px solid var(--wr-line);
}
.home-ghost-btn:hover { border-color: var(--wr-accent); background: var(--wr-accent-tint); text-decoration: none; }

/* Small phones: full-width tap targets (matches .wr-btn behaviour in styles.css) */
@media (max-width: 480px) {
  .home-cta-row { flex-direction: column; align-items: stretch; }
  .home-appstore, .home-ghost-btn { width: 100%; }
}

/* ---------- Phone mock ---------- */
.home-phone-col { display: flex; justify-content: center; position: relative; }
.home-phone-col::before {
  content: ""; position: absolute; inset: -8% -14%;
  background: radial-gradient(closest-side, rgba(44, 192, 147, 0.16), transparent 72%);
  pointer-events: none;
}
.home-phone {
  position: relative; width: min(330px, 100%);
  background: var(--wr-card); border: 1px solid var(--wr-line);
  border-radius: clamp(30px, 9vw, 42px); padding: clamp(12px, 3vw, 16px) clamp(12px, 3vw, 16px) clamp(16px, 4vw, 22px);
  box-shadow: var(--wr-shadow-lg), inset 0 0 0 6px var(--wr-bg-soft);
}
.home-phone__notch { width: 108px; height: 26px; border-radius: 999px; background: var(--wr-ink); margin: 2px auto 14px; opacity: 0.9; }
.home-phone__appbar { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; padding: 0 4px; }
.home-phone__wm { font-weight: 900; font-size: 19px; letter-spacing: -0.04em; }
.home-phone__wm .we, .home-phone__wm .dot { color: var(--wr-accent); }
.home-phone__wm .rent { color: var(--wr-ink); }
.home-phone__avatar { width: 28px; height: 28px; border-radius: 50%; background: linear-gradient(180deg, var(--wr-head-a), var(--wr-head-b)); }

.home-review-card {
  background: var(--wr-bg-soft); border: 1px solid var(--wr-line);
  border-radius: 22px; padding: clamp(14px, 3.5vw, 18px);
}
.home-rc__head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.home-rc__name { font-weight: 800; color: var(--wr-ink); font-size: 15.5px; letter-spacing: -0.01em; line-height: 1.3; }
.home-rc__loc { font-size: 12px; color: var(--wr-text-muted); margin-top: 1px; }
.home-rc__stars { color: #f0b429; font-size: 13px; letter-spacing: 1.5px; margin: 6px 0 2px; }
.home-rc__score { flex: none; text-align: center; background: var(--wr-accent-tint); border-radius: 12px; padding: 7px 11px; }
.home-rc__score b { display: block; font-size: 19px; font-weight: 800; color: var(--wr-accent-deep); line-height: 1.1; font-variant-numeric: tabular-nums; }
.home-rc__score span { font-size: 10px; color: var(--wr-text-muted); font-weight: 600; }
.home-rc__bars { margin: 14px 0 4px; display: grid; gap: 9px; }
.home-bar {
  display: grid; grid-template-columns: minmax(68px, 92px) minmax(40px, 1fr) 30px;
  gap: clamp(6px, 1.5vw, 10px); align-items: center; font-size: 12px;
}
.home-bar__lbl { color: var(--wr-text); font-weight: 600; }
.home-bar__val { color: var(--wr-text-muted); font-weight: 700; text-align: right; font-variant-numeric: tabular-nums; }
.home-bar__track { height: 7px; border-radius: 999px; background: var(--wr-line); overflow: hidden; }
.home-bar__fill { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--wr-head-a), var(--wr-head-b)); }
.home-rc__quote {
  margin: 14px 0 0; background: var(--wr-card); border: 1px solid var(--wr-line);
  border-radius: 14px; padding: 12px 14px; font-size: 12.5px; line-height: 1.55; color: var(--wr-text);
}
.home-rc__who { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 8px; font-size: 11px; color: var(--wr-text-muted); font-weight: 600; }
.home-vbadge {
  display: inline-flex; align-items: center; gap: 4px;
  color: var(--wr-accent-deep); background: var(--wr-accent-tint);
  font-size: 10px; font-weight: 800; padding: 2.5px 8px; border-radius: 999px; letter-spacing: 0.03em;
}
.home-vbadge svg { width: 10px; height: 10px; }

/* ---------- Category cards (self-fitting grid; min() guards <230px screens) ---------- */
.home-cat-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(min(230px, 100%), 1fr));
  gap: var(--home-grid-gap);
}
.home-cat {
  background: var(--wr-card); border: 1px solid var(--wr-line); border-radius: var(--wr-radius);
  padding: clamp(20px, 3.5vw, 26px) clamp(18px, 3vw, 24px); box-shadow: var(--wr-shadow-sm);
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}
.home-cat:hover { transform: translateY(-3px); box-shadow: var(--wr-shadow); border-color: rgba(44, 192, 147, 0.45); }
.home-cat__ic {
  width: 44px; height: 44px; border-radius: 12px; background: var(--wr-accent-tint);
  display: grid; place-items: center; margin-bottom: 16px;
}
.home-cat__ic svg { width: 22px; height: 22px; stroke: var(--wr-accent-darker); }
.home-cat h3 { margin: 0 0 6px; font-size: 1.06rem; font-weight: 800; color: var(--wr-ink); letter-spacing: -0.01em; }
.home-cat p { margin: 0; font-size: 0.93rem; color: var(--wr-text-muted); line-height: 1.6; }

/* ---------- Steps (auto-fit: 3-up → 2-up → 1-up as space allows) ---------- */
.home-steps {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(min(250px, 100%), 1fr));
  gap: var(--home-grid-gap); counter-reset: step;
}
.home-step {
  position: relative; background: var(--wr-card); border: 1px solid var(--wr-line);
  border-radius: var(--wr-radius); padding: clamp(24px, 4vw, 30px) clamp(20px, 3.5vw, 26px) clamp(20px, 3.5vw, 26px);
  box-shadow: var(--wr-shadow-sm);
}
.home-step::before {
  counter-increment: step; content: counter(step);
  display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 12px;
  background: linear-gradient(180deg, var(--wr-head-a), var(--wr-head-b)); color: #fff;
  font-weight: 800; font-size: 17px; margin-bottom: 18px;
  box-shadow: 0 6px 14px -6px rgba(27, 168, 125, 0.65);
}
.home-step h3 { margin: 0 0 8px; font-size: 1.1rem; font-weight: 800; color: var(--wr-ink); letter-spacing: -0.01em; }
.home-step p { margin: 0; font-size: 0.95rem; color: var(--wr-text-muted); }

/* ---------- Trust ---------- */
.home-trust-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr));
  gap: var(--home-grid-gap);
}
.home-trust {
  border: 1px solid var(--wr-line); border-left: 4px solid var(--wr-accent);
  background: var(--wr-card); border-radius: var(--wr-radius);
  padding: clamp(18px, 3.5vw, 24px); box-shadow: var(--wr-shadow-sm);
}
.home-trust h3 { margin: 0 0 6px; font-size: 1.02rem; font-weight: 800; color: var(--wr-ink); letter-spacing: -0.01em; }
.home-trust p { margin: 0; font-size: 0.93rem; color: var(--wr-text-muted); }

/* ---------- CTA band ---------- */
.home-cta-band {
  background: linear-gradient(135deg, var(--wr-head-a), var(--wr-head-b) 60%, #17936d);
  color: #fff; padding: clamp(52px, 8vw, 76px) 0; text-align: center;
  scroll-margin-top: calc(var(--wr-header-h) + 20px);
}
.home-cta-band h2 {
  margin: 0 0 12px; color: #fff; font-size: clamp(1.7rem, 1.3rem + 2vw, 2.5rem);
  font-weight: 800; letter-spacing: -0.03em; text-wrap: balance;
}
.home-cta-band p {
  color: rgba(255, 255, 255, 0.9); font-size: clamp(1rem, 0.95rem + 0.4vw, 1.08rem);
  max-width: 34em; margin: 0 auto clamp(22px, 4vw, 30px);
}
.home-cta-band__wm { font-weight: 900; letter-spacing: -0.04em; }
.home-cta-band__wm .we, .home-cta-band__wm .dot { color: var(--wr-deep); }
.home-cta-band__wm .rent { color: var(--wr-cream); }
.home-cta-band .home-appstore { background: var(--wr-deep); }
@media (max-width: 480px) {
  .home-cta-band .home-appstore { width: min(320px, 100%); }
}

/* ---------- Footer: homepage has 3 columns (brand + Product + Legal);
   the shared styles.css grid only plans for 2. Mobile stack re-declared here
   because this file loads after styles.css and would otherwise override it. */
.wr-footer__inner { grid-template-columns: 1.4fr 1fr 1fr; }
@media (max-width: 768px) {
  .wr-footer__inner { grid-template-columns: 1fr; }
}

/* ---------- Layout breakpoint: hero stacks (grids elsewhere self-fit) ---------- */
@media (max-width: 900px) {
  .home-hero__grid { grid-template-columns: 1fr; gap: clamp(32px, 6vw, 44px); }
  .home-phone-col { order: 2; } /* keep the pitch first, visual second */
  /* Single column: center the actions and the stats row */
  .home-cta-row { justify-content: center; }
  .home-hero__stats { justify-content: center; text-align: center; }
}

/* ---------- Motion ---------- */
@media (prefers-reduced-motion: reduce) {
  .home-cat, .home-cat:hover { transform: none; transition: none; }
}
