/* ==========================================================================
   Charlotte Grace Real Estate: live-site and phone polish
   --------------------------------------------------------------------------
   Loaded last (after motion.css), so these rules win. Two parts:

   1. Live site only. Hides development labels and placeholder-only content.
      <body data-dev-mode="false"> is set by layouts/site.blade.php when
      APP_ENV=production, so your laptop still shows the yellow DEV labels.

   2. Phones and tablets. Calmer headings, tighter spacing, one "Book a free
      valuation" button instead of two, no progress line under the header,
      gentler scroll animations and a compact cookie banner.

   Desktop is left as it is: every layout rule in part 2 sits inside a
   max-width media query.
   ========================================================================== */


/* ==========================================================================
   1. Live site: no development labels or placeholder content
   ========================================================================== */
[data-dev-mode="false"] .dev-note,
[data-dev-mode="false"] .dev-tag,
[data-dev-mode="false"] .dev-placeholder,
[data-dev-mode="false"] .dev-toast { display: none !important; }

/* "Kind words" stays hidden until the first review is published
   in the admin area (Reviews), which replaces the placeholder cards. */
[data-dev-mode="false"] .feedback:has(.testimonial__placeholder) { display: none; }

/* Links still waiting for their address (e.g. the Rightmove page) */
[data-dev-mode="false"] .trust-bar__item:has(.text-link.is-disabled) { display: none; }

/* A heading whose only content is a DEV note (e.g. "Areas we cover") */
[data-dev-mode="false"] .areas__list-title:has(+ .dev-note) { display: none; }

/* "Coming soon" states, shown when there are no real properties or articles
   yet (js/listings.js and js/news.js add these classes). */
.results--soon .filters,
.results--soon .filters__backdrop,
.results--soon .results__toolbar,
.results--soon .pagination { display: none !important; }
.results--soon .results__layout { display: block; }
.results--soon .results__empty {
  max-width: 40rem;
  margin: 0 auto;
  padding: clamp(2rem, 1.5rem + 3vw, 3.5rem) clamp(1.25rem, 1rem + 2vw, 3rem);
  text-align: center;
  background: var(--paper-warm);
  border-top: 2px solid var(--cg-red);
}
.results--soon .results__empty h3 {
  margin-bottom: var(--space-3);
  font-size: clamp(1.25rem, 1.1rem + 0.6vw, 1.5rem);
  font-weight: var(--fw-light);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.results--soon .results__empty p { color: var(--ink-soft); }
.results--soon .results__empty-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: var(--space-4) var(--space-6);
  margin-top: var(--space-5);
}
.news__soon {
  max-width: 36rem;
  margin: var(--space-4) auto 0;
  padding: var(--space-7) var(--space-5);
  text-align: center;
  color: var(--ink-soft);
  background: var(--paper-warm);
  border-top: 2px solid var(--cg-red);
}
.news__soon strong {
  display: block;
  margin-bottom: var(--space-2);
  font-family: var(--font-brand);
  font-size: 1.25rem;
  font-weight: var(--fw-light);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink);
}

/* Office photo still to be supplied: nothing rather than a cartoon */
[data-dev-mode="false"] .office__photo:has(img[src*="/placeholder/"]) { display: none; }

/* Team members whose photos haven't arrived yet: their initials, not a cartoon */
.initials-tile {
  display: grid;
  place-items: center;
  width: 100%;
  aspect-ratio: 4 / 5;
  font-family: var(--font-brand);
  font-size: clamp(2.5rem, 2rem + 3vw, 4rem);
  font-weight: var(--fw-light);
  letter-spacing: 0.08em;
  color: var(--cg-red);
  background: var(--paper-warm);
  border: 1px solid var(--line);
}
/* About page: the initials fill the overlapping circles */
.team-teaser__faces .initials-tile--round { width: 100%; height: 100%; border: 0; background: #fff; }
.initials-tile--round {
  width: 56px;
  height: 56px;
  aspect-ratio: 1;
  font-size: 1rem;
  border-radius: 50%;
  border-color: var(--cg-red);
  background: #fff;
}


/* ==========================================================================
   2. Phones and tablets (under 992px): one valuation button, no glitchy line
   ========================================================================== */
@media (max-width: 61.99em) {
  /* The bottom bar already has "Book a free valuation", so the header
     button is not repeated. */
  .site-header__cta { display: none !important; }

  /* The thin red reading-progress line read as a glitch on small screens */
  .scroll-progress { display: none; }
}


/* ==========================================================================
   3. Phones (under 768px): type, spacing, sections
   ========================================================================== */
@media (max-width: 47.99em) {

  /* ---- Type scale: smaller, tighter capitals that fit on two lines ---- */
  :root {
    --section-y: 3rem;
    --tracking-heading: 0.04em;
    --tracking-wide: 0.14em;
  }
  body { font-size: 1rem; line-height: 1.6; }
  h2, .h2 {
    font-size: 1.5rem;
    line-height: 1.2;
    letter-spacing: 0.04em;
  }
  h3 { font-size: 1.0625rem; line-height: 1.35; }
  .lead { font-size: 1.0625rem; line-height: 1.6; }
  .eyebrow { margin-bottom: var(--space-3); font-size: 0.6875rem; }
  .eyebrow::before, .eyebrow--center::after { width: 20px; }

  .page-banner__intro { font-size: 1.0625rem; line-height: 1.55; }

  .person__name { font-size: 1.75rem; letter-spacing: 0.04em; }
  .person__quote { font-size: 1.25rem; line-height: 1.4; }
  .person__lead { font-size: 1.0625rem; }
  .person__bio { font-size: 1rem; line-height: 1.65; }

  .newsletter__title { font-size: 1.5rem; line-height: 1.2; }

  /* Buttons and arrow links: smaller letters, same comfortable tap size */
  .button { font-size: 0.75rem; letter-spacing: 0.12em; padding-inline: 1.25rem; }
  .text-link { font-size: 0.75rem; letter-spacing: 0.12em; }

  /* Softer shadow under solid buttons: the large red glow looked heavy */
  .button:not(.button--outline):not(.button--outline-light):not(.button--light) {
    box-shadow: 0 6px 14px -10px rgb(130 0 0 / 0.55) !important;
  }

  /* ---- Centred blocks of long text are hard to read on a phone ---- */
  .section-head { margin-bottom: var(--space-6); }
  .section-head--center { text-align: left; }
  .section-head--center .lead { margin-inline: 0; }
  .eyebrow--center::after { content: none; }
  .welcome__statement,
  .expect__closing { text-align: left; }
  .welcome__statement .eyebrow::after { content: none; }
  .expect__closing { margin-top: var(--space-6); font-size: 1.0625rem; line-height: 1.65; }
  .expect__actions { text-align: left; }

  /* ---- Mobile menu: calmer sizes ---- */
  .site-nav__link {
    min-height: 56px;
    padding-block: var(--space-3);
    font-size: 1.125rem;
    letter-spacing: 0.08em;
  }
  .site-nav__hint { font-size: 0.8125rem; }

  /* ---- Charlotte's photo: portrait, whole photo, no frame sticking out ---- */
  .person__media {
    width: 100%;
    max-width: 22rem;
    margin: 0;
  }
  .person__media::after { display: none; }
  .person__media img {
    width: 100%;
    aspect-ratio: 4 / 5;
    max-height: none;
    object-fit: cover;
    object-position: center 20%;
  }

  /* Same for the newsletter picture's offset frame */
  .newsletter__media::after { display: none; }

  /* ---- Moving "Sell · Buy · Let" band: distracting on a small screen ---- */
  .marquee { display: none; }

  /* ---- Scroll reveals: a quick, subtle fade rather than a slow slide ---- */
  .js [data-reveal],
  .js [data-stagger] > * {
    transform: translateY(8px);
    transition-duration: 450ms;
    transition-delay: 0ms !important;
  }

  /* ---- Cookie banner: compact, so it never covers half the screen ---- */
  .cookie-banner { padding-block: var(--space-4) calc(var(--space-4) + env(safe-area-inset-bottom)); }
  .cookie-banner__title { margin-bottom: var(--space-1); font-size: 0.9375rem; }
  .cookie-banner__text { margin-bottom: var(--space-3); font-size: 0.8125rem; line-height: 1.5; }
  .cookie-banner__actions { gap: var(--space-2); }
  .cookie-banner__actions .button { min-height: 44px; font-size: 0.6875rem; letter-spacing: 0.08em; }
  .cookie-banner__manage { padding-block: var(--space-1); font-size: 0.8125rem; }

  /* ---- Let page ---- */
  .let-intro__lead { font-size: 1.0625rem; line-height: 1.6; }
  /* The two package cards already list everything included; the comparison
     table repeats it row by row, so it stays on larger screens only. */
  .compare-wrap { display: none; }

  /* ---- Map: shorter, so it doesn't fill the screen ---- */
  .areas__map { aspect-ratio: auto; height: 260px; }
}
