/*
Theme Name: Wire 3
Theme URI: https://wp.wire3.me
Author: Wire 3
Author URI: https://wire3.com
Description: The Wire 3 design system as a WordPress block theme. The reimagined wire3.com — design-first, agent-first. Tokens and components derive from the Wire 3 buyflow/eero design language (navy, lime-green, blue; DM Sans; the dark value-band motif). See wire3-wp/docs/NEW_WIRE3COM_BUILD.md.
Version: 0.11.2
Requires at least: 6.7
Tested up to: 7.0
Requires PHP: 7.4
License: Proprietary
Text Domain: wire3
*/

/* ===========================================================================
   The look comes from two bundles: assets/eero/eero-bundle.css (every page —
   the eero sections, verbatim) and assets/shared/outward-bundle.css (/buy only —
   the wire3-shared plan cards). This file is the glue: what block markup can't
   express, plus the few things the sandbox adds on top of eero. Tokens live in
   theme.json (--wp--preset-*) and the bundles (--navy, --green, ...).
   =========================================================================== */

/* --- Page frame ---------------------------------------------------------- */

/* Pages are stacks of full-bleed eero sections; the flow layout's block gap
   would open a strip of page background between every band. */
main.wp-block-group > *,
main .wp-block-post-content > *,
.w3buy-why {
  margin-block-start: 0;
}

/* Let the sticky .site-header stick to the page, not just to its template-part
   wrapper (which is only as tall as the header itself). */
.wp-site-blocks > .wp-block-template-part:first-child {
  display: contents;
}

/* --- Header: ONE navy bar — logo + tagline · page links · phone + CTA ------
   (replaces eero's two-tier navy header + white subnav). Content lines up with
   the 1040px section column; under 900px the links fold into a menu panel. */
.site-header {
  display: block;
  height: auto;
  padding: 0;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.06), 0 8px 24px rgba(5, 15, 31, 0.18);
}
.header-bar {
  max-width: 1040px;
  height: 72px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  gap: 28px;
}
section[id], [id] { scroll-margin-top: 88px; } /* clear the 72px bar (eero assumed bar + subnav) */

/* Logo lockup: the Wire 3 mark + a "Fiber internet" tagline. */
.header-logo { gap: 0; flex-shrink: 0; }
.header-tagline {
  margin-left: 14px;
  padding-left: 14px;
  border-left: 1px solid rgba(255, 255, 255, 0.22);
  color: rgba(255, 255, 255, 0.78);
  font-family: var(--font-head);
  font-weight: 500;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  line-height: 1.2;
  white-space: nowrap;
}

/* Page links: quiet white text, the current page gets a green underline. */
.site-nav { display: flex; align-items: center; gap: 4px; flex: 1; }
.site-nav-link {
  position: relative;
  padding: 8px 12px;
  border-radius: 8px;
  color: rgba(255, 255, 255, 0.78);
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 0.92rem;
  white-space: nowrap;
  transition: color 0.15s, background 0.15s;
}
.site-nav-link:hover { color: #fff; background: rgba(255, 255, 255, 0.07); }
.site-nav-link[aria-current="page"] { color: #fff; }
.site-nav-link[aria-current="page"]::after {
  content: "";
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 2px;
  height: 2px;
  border-radius: 2px;
  background: var(--green);
}
.site-nav-phone { display: none; }

.header-actions { gap: 16px; flex-shrink: 0; }
.header-phone { gap: 8px; margin: 0; color: rgba(255, 255, 255, 0.78); }
.header-phone svg { width: 16px; height: 16px; }
.header-phone:hover { color: #fff; }
.header-cta { padding: 10px 18px; font-size: 0.92rem; white-space: nowrap; }

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 10px;
  background: transparent;
  color: #fff;
  cursor: pointer;
  align-items: center;
  justify-content: center;
}
.nav-toggle-bars,
.nav-toggle-bars::before,
.nav-toggle-bars::after {
  display: block;
  width: 18px;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
  transition: transform 0.2s ease, opacity 0.2s ease;
}
.nav-toggle-bars { position: relative; }
.nav-toggle-bars::before,
.nav-toggle-bars::after { content: ""; position: absolute; left: 0; }
.nav-toggle-bars::before { top: -6px; }
.nav-toggle-bars::after { top: 6px; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars { background: transparent; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars::before { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars::after { transform: translateY(-6px) rotate(-45deg); }

@media (max-width: 1080px) {
  .header-phone-num { display: none; } /* phone becomes an icon */
}
@media (max-width: 900px) {
  .header-bar { gap: 12px; }
  .header-actions { margin-left: auto; gap: 10px; }
  .nav-toggle { display: inline-flex; }
  .site-nav {
    display: none;
    position: absolute;
    top: 72px;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 8px 16px 18px;
    background: var(--navy);
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 18px 36px rgba(5, 15, 31, 0.35);
  }
  .site-header.is-open .site-nav { display: flex; }
  .site-nav-link { padding: 14px 8px; font-size: 1rem; border-radius: 0; border-bottom: 1px solid rgba(255, 255, 255, 0.07); }
  .site-nav-link[aria-current="page"]::after { left: 8px; right: auto; width: 24px; bottom: 6px; }
  .site-nav-phone { display: block; padding: 16px 8px 4px; color: var(--green); font-weight: 700; }
}
@media (max-width: 560px) {
  .header-bar { padding: 0 16px; }
  .header-tagline, .header-phone { display: none; }
  .header-cta { padding: 9px 14px; font-size: 0.86rem; }
}

/* --- Buttons: color-agnostic hover + the named brand styles -------------- */
.wp-element-button,
.wp-block-button__link {
  transition: filter 0.15s ease, transform 0.1s ease, background-color 0.15s ease;
}
.wp-element-button:hover {
  filter: brightness(0.93);
  transform: translateY(-1px);
}
.wp-block-button.is-style-outline > .wp-block-button__link:hover {
  filter: none;
  background-color: rgba(255, 255, 255, 0.1);
}

/* Named brand button styles (registered in functions.php). */
.wp-block-button.is-style-wire3-green > .wp-block-button__link {
  background-color: var(--wp--preset--color--green);
  color: var(--wp--preset--color--navy);
}
.wp-block-button.is-style-wire3-ghost > .wp-block-button__link {
  background-color: transparent;
  color: var(--wp--preset--color--grey-dk);
  border: 1.5px solid var(--wp--preset--color--grey-lt);
}
.wp-block-button.is-style-wire3-ghost > .wp-block-button__link:hover {
  filter: none;
  background-color: var(--wp--preset--color--off-white);
  border-color: var(--wp--preset--color--grey-mid);
  color: var(--wp--preset--color--navy);
}

/* --- eero sections: sandbox additions ------------------------------------ */

/* Fiber has FOUR speed tiers (eero's own grid is 3-up good/better/best). */
.offers.offers-4 { grid-template-columns: repeat(4, 1fr); max-width: 1180px; }
@media (max-width: 1080px) { .offers.offers-4 { grid-template-columns: repeat(2, 1fr); max-width: 640px; } }
@media (max-width: 560px) { .offers.offers-4 { grid-template-columns: 1fr; max-width: 420px; } }
/* At 4-up the featured card's extra padding leaves its CTA too narrow for one line. */
.offers.offers-4 .offer-feature { padding-inline: 26px; }
.offers.offers-4 .offer-cta { white-space: nowrap; }

/* Fine print under the plan cards / Wi-Fi add-ons. */
.plans-fine {
  margin: 26px auto 0;
  max-width: 620px;
  text-align: center;
  font-size: 0.86em;
  color: var(--grey-mid);
}

/* Shorter hero for secondary pages (plans/about/contact) — eero's .hero-inner is
   64/72; trim it when there's no offer/trust block beneath the headline. */
.hero.hero-sm .hero-inner { padding-top: 48px; padding-bottom: 50px; }
.hero p.sub a { color: #fff; text-decoration: underline; text-underline-offset: 3px; }

/* A section that follows a band closely (features after plans, etc). */
.section.section-tight { padding-top: 8px; }

/* Technology page: space between the house video and the TrueMesh trio. */
.feat-grid.tech-feats { margin-top: 42px; }

/* "The technology inside" band (wire3_tech_teaser) — navy, copy left, the
   eero Max 7 + Pro 7 floating right; features /wifi/technology/. */
.tech-teaser {
  position: relative;
  overflow: hidden;
  color: #fff;
  background:
    radial-gradient(520px 360px at 82% 40%, rgba(46, 144, 224, 0.28), transparent 70%),
    radial-gradient(420px 300px at 6% 100%, rgba(125, 196, 0, 0.16), transparent 70%),
    linear-gradient(160deg, var(--navy) 0%, #13305a 100%);
}
.tt-inner {
  max-width: 1040px;
  margin: 0 auto;
  padding: 64px 24px;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 40px;
  align-items: center;
}
.tt-copy h2 { color: #fff; font-size: 2.2em; line-height: 1.12; margin: 10px 0 14px; }
.tt-copy h2 .accent { color: var(--blue); }
.tt-copy p { color: rgba(255, 255, 255, 0.78); font-size: 1.08em; line-height: 1.6; max-width: 520px; }
.tt-points { list-style: none; margin: 20px 0 28px; padding: 0; display: grid; gap: 10px; }
.tt-points li { position: relative; padding-left: 28px; color: rgba(255, 255, 255, 0.9); font-weight: 600; }
.tt-points li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--green) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230D2240' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center / 11px no-repeat;
}
.tech-teaser .btn-row { display: flex; gap: 14px; flex-wrap: wrap; }
.tt-art { display: flex; align-items: flex-end; justify-content: center; gap: 36px; padding-bottom: 8px; }
.tt-dev { width: auto; filter: drop-shadow(0 30px 44px rgba(0, 0, 0, 0.5)); }
.tt-max { height: 270px; transform: rotate(-4deg); }
.tt-pro { height: 224px; transform: rotate(5deg) translateY(-6px); }
@media (max-width: 840px) {
  .tt-inner { grid-template-columns: 1fr; padding: 52px 24px 44px; gap: 36px; }
  .tt-copy h2 { font-size: 1.7em; }
  .tt-art { order: -1; gap: 24px; }
  .tt-max { height: 170px; }
  .tt-pro { height: 140px; }
}

/* About: the story block reads as left-aligned prose, not a centred lead. */
.section.about-story { max-width: 760px; }
.section.about-story .lead { text-align: left; max-width: none; }
.section.about-story .lead + .lead { margin-top: 18px; }
.vi-title.vi-stat { font-size: 2.4em; color: var(--green); }

/* Landing hero: promo code + agent attribution (filled by wire3-landing). */
.hero .hero-badge { margin-bottom: 14px; }
.hero-agent { color: rgba(255, 255, 255, 0.85); margin-top: 14px; font-size: 0.95rem; }
.hero-badge:empty,
.hero-agent:empty { display: none; }

/* --- Eyebrow (uppercase green kicker above headlines) ------------------- */
.wire3-eyebrow {
  font-weight: 700;
  font-size: 0.82rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

/* --- Native lead form --------------------------------------------------- */
.wire3-lead-form {
  background: var(--wp--preset--color--white);
  border: 1px solid var(--wp--preset--color--grey-lt);
  border-radius: var(--wp--custom--radius);
  box-shadow: var(--wp--custom--shadow);
  padding: clamp(20px, 4vw, 36px);
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.wire3-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1 1 0;
}
.wire3-field-row {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}
.wire3-field--zip {
  flex: 0 1 120px;
}
.wire3-lead-form label {
  font-family: var(--wp--preset--font-family--dm-sans);
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--wp--preset--color--grey-dk);
}
.wire3-lead-form input,
.wire3-lead-form select,
.wire3-lead-form textarea {
  font-family: var(--wp--preset--font-family--dm-sans);
  font-size: 1rem;
  color: var(--wp--preset--color--navy);
  background: var(--wp--preset--color--off-white);
  border: 1.5px solid var(--wp--preset--color--grey-lt);
  border-radius: var(--wp--custom--radius-sm);
  padding: 12px 14px;
  width: 100%;
  box-sizing: border-box;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.wire3-lead-form input:focus,
.wire3-lead-form select:focus,
.wire3-lead-form textarea:focus {
  outline: none;
  border-color: var(--wp--preset--color--blue);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--wp--preset--color--blue) 18%, transparent);
}
.wire3-hp {
  position: absolute !important;
  left: -9999px !important;
  width: 1px;
  height: 1px;
  opacity: 0;
}
.wire3-lead-submit {
  font-family: var(--wp--preset--font-family--dm-sans);
  font-weight: 700;
  font-size: 1rem;
  color: var(--wp--preset--color--navy);
  background: var(--wp--preset--color--green);
  border: 0;
  border-radius: var(--wp--custom--radius-sm);
  padding: 14px 22px;
  cursor: pointer;
  transition: filter 0.15s ease, transform 0.1s ease;
}
.wire3-lead-submit:hover:not(:disabled) {
  filter: brightness(0.93);
  transform: translateY(-1px);
}
.wire3-lead-submit:disabled {
  opacity: 0.7;
  cursor: progress;
}
.wire3-lead-status {
  margin: 0;
  font-weight: 600;
  font-size: 0.9rem;
  min-height: 1.2em;
}
.wire3-lead-status.is-ok {
  color: var(--wp--preset--color--green-dk);
}
.wire3-lead-status.is-err {
  color: var(--wp--preset--color--red);
}

/* --- Accessibility ------------------------------------------------------- */

/* Visible keyboard focus for every interactive element. */
a:focus-visible,
button:focus-visible,
summary:focus-visible,
.wp-element-button:focus-visible,
.wp-block-button__link:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--wp--preset--color--blue);
  outline-offset: 2px;
  border-radius: var(--wp--custom--radius-sm);
}
/* On navy, the blue ring is low-contrast — use green. */
.site-header a:focus-visible,
.site-header button:focus-visible,
.hero a:focus-visible,
.cta-band a:focus-visible,
.foot a:focus-visible {
  outline-color: var(--wp--preset--color--green);
}

/* Respect users who ask for less motion. */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
  .wp-element-button:hover,
  .wire3-lead-submit:hover {
    transform: none !important;
  }
}
