/*
Theme Name: Rover
Theme URI: https://example.com/
Author: Rover
Description: Custom block theme for Rover fine art shipping. Apple-neutral palette, Helvetica-only type, restrained motion. Built to the Rover brand rules.
Version: 0.1.0
Requires at least: 6.5
Tested up to: 6.7
Requires PHP: 8.0
License: GPL-2.0-or-later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: rover
Tags: full-site-editing, block-theme, custom-colors, wide-blocks
*/

/* ==========================================================================
   Rover base
   Brand rules: Helvetica only (never a serif). Apple neutral grays.
   Light theme. Ink pills in-page, Apple Blue for nav CTA / interactive.
   ========================================================================== */

:root {
  --rvr-ease: cubic-bezier(.16, .7, .2, 1);
  --rvr-nav-h: 63px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: clip;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; display: block; }
::selection { background: #1D1D1F; color: #fff; }

/* ---------- Buttons: fully-rounded pills, weight 600 ---------- */
.rvr-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  font-size: 14px;
  padding: 14px 26px;
  border-radius: 100px;
  border: 0;
  cursor: pointer;
  transition: transform .2s ease, background .2s ease, box-shadow .2s ease;
}
.rvr-btn:hover { transform: translateY(-2px); }
.rvr-btn--ink { background: #1D1D1F; color: #fff; }
.rvr-btn--ink:hover { background: #000; box-shadow: 0 16px 34px rgba(0, 0, 0, .22); }
.rvr-btn--accent { background: #0A84FF; color: #fff; }
.rvr-btn--accent:hover { background: #0A6FE0; }
.rvr-btn--ghost { background: transparent; color: #1D1D1F; box-shadow: inset 0 0 0 1px #D2D2D7; }

.rvr-arrow { display: inline-block; transition: transform .4s var(--rvr-ease); }
.rvr-btn:hover .rvr-arrow { transform: translateX(5px); }

/* ---------- Gradient text: the signature spectrum ---------- */
.rvr-grad {
  background: linear-gradient(100deg, #0A84FF, #8B5CF6 34%, #EC4899 66%, #FF7A3C);
  background-size: 200% auto;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.rvr-grad--sheen { animation: rvr-sheen 6s linear infinite; }
@keyframes rvr-sheen { to { background-position: 200% center; } }

/* ---------- Mesh surfaces ---------- */
.rvr-mesh { background: linear-gradient(135deg, #0A84FF 0%, #5E5CE6 100%); color: #fff; }
.rvr-glass {
  background: rgba(255, 255, 255, .12);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid rgba(255, 255, 255, .22);
}

/* ---------- Image slots ----------
   The design's CSS sizes these by tag name, so they must always be a block
   that fills its container. When empty they show the art-direction note. */
image-slot,
.rvr-slot {
  display: block;
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 220px;
  overflow: hidden;
  background: #F5F5F7;
}
.rvr-slot .rvr-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.rvr-slot.is-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background:
    linear-gradient(135deg, rgba(10, 132, 255, .07), rgba(94, 92, 230, .07)),
    #F5F5F7;
  box-shadow: inset 0 0 0 1px #E8E8ED;
}
.rvr-slot__note {
  font-size: 12px;
  line-height: 1.45;
  letter-spacing: .01em;
  color: #86868B;
  text-align: center;
  max-width: 30ch;
}
/* Slots sitting on a dark hero read better inverted. */
.rvr-slot.is-empty:where([data-slot$="hero"], [data-slot$="band"]) {
  background: #1D1D1F;
  box-shadow: inset 0 0 0 1px #2C2C2E;
}
.rvr-slot.is-empty:where([data-slot$="hero"], [data-slot$="band"]) .rvr-slot__note {
  color: #6E6E73;
}

/* ---------- Cards ---------- */
.rvr-card {
  background: #F5F5F7;
  border: 1px solid #E8E8ED;
  border-radius: 20px;
}

/* ---------- Eyebrow label ---------- */
.rvr-eyebrow {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: #86868B;
}

/* ---------- Reveal on scroll (fade + rise) ---------- */
.rvr-reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity .9s var(--rvr-ease), transform .9s var(--rvr-ease);
}
.rvr-reveal.is-in { opacity: 1; transform: none; }

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }
  .rvr-reveal { opacity: 1; transform: none; }
}

/* ---------- Scroll progress bar ---------- */
.rvr-progress {
  position: fixed;
  top: 0; left: 0;
  height: 2px; width: 0;
  background: #1D1D1F;
  z-index: 300;
}

/* ---------- Accessibility ---------- */
.rvr-skip-link {
  position: absolute;
  left: -9999px;
}
.rvr-skip-link:focus {
  left: 16px; top: 16px;
  z-index: 400;
  background: #1D1D1F; color: #fff;
  padding: 12px 20px; border-radius: 100px;
}
:where(a, button, input, select, textarea):focus-visible {
  outline: 2px solid #0A84FF;
  outline-offset: 3px;
}

/* ---------- Footer links ----------
 * .navlink carries an animated hover underline (.navlink::after, scaleX 0 -> 1)
 * that belongs to the main site nav. The design reuses the same class for the
 * footer link columns, so those picked up the underline too. Suppress it in the
 * footer only; the header nav keeps its underline.
 */
footer .navlink::after {
  content: none;
}

/* ---------- Sticky nav vs the WordPress admin bar ----------
 * Every page's main nav is authored inline as `position:sticky; top:0`. When a
 * logged-in user views the site, WordPress fixes a 32px admin bar at top:0 too,
 * so the nav sticks underneath it and its top edge is covered (the ROVER
 * wordmark gets sliced in half). Public visitors never see this; editors hit it
 * on every page, which makes reviewing the site painful.
 *
 * `!important` is required because the `top:0` is an inline style. Only
 * front-page.php carries the .nav-shell class, so match on the inline style
 * instead, which covers all twelve templates.
 */
.admin-bar nav[style*="position:sticky"] {
  top: var( --wp-admin--admin-bar--height, 32px ) !important;
}

/* WordPress grows the admin bar to 46px on narrow screens... */
@media screen and (max-width: 782px) {
  .admin-bar nav[style*="position:sticky"] {
    top: 46px !important;
  }
}

/* ...and stops fixing it below 600px, so the nav returns to the very top. */
@media screen and (max-width: 600px) {
  .admin-bar nav[style*="position:sticky"] {
    top: 0 !important;
  }
}

/* ---------- Selectable option cards ----------
 * Used by Create a Shipment (packing, service, insurance) and Request a
 * Consultation (services needed). The design gave every one of these its box
 * styling AND its selected state through a runtime binding
 * (style="{{ styles.packedCrated }}", style="{{ st.crating }}"), so the
 * converter dropped the attribute outright and they rendered as bare text with
 * no border, no background and no way to tell what was chosen.
 *
 * Defined in the base stylesheet on purpose: one rule set covers both pages.
 * Selected state uses Apple Blue, which the brand rules reserve for
 * interactive signals.
 */
.opt {
  border: 1px solid #E8E8ED;
  background: #FFFFFF;
  border-radius: 14px;
  padding: 14px 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  font-size: 15px;
  color: #1D1D1F;
  transition: border-color .18s ease, background .18s ease, box-shadow .18s ease;
}
.opt:hover { border-color: #C7C2B6; }
.opt:focus-visible { outline: 2px solid #0A84FF; outline-offset: 2px; }

.opt.is-selected {
  border-color: #0A84FF;
  background: rgba( 10, 132, 255, .06 );
  box-shadow: inset 0 0 0 1px #0A84FF;
}

/* ---------- Mobile safety net ----------
 * The design authors most layout inline (style="grid-template-columns:...").
 * Its own mobile rules target classes, so any grid on an element WITHOUT a
 * class cannot be reached by a stylesheet at all and stays multi-column on a
 * phone. There are 40 of these, including the footer's `2fr 1fr 1fr 1fr`, which
 * appears on all twelve pages, and sixteen form-field grids on Create a
 * Shipment.
 *
 * Matching the inline style is the only way to reach them. This lives in the
 * BASE stylesheet on purpose: per-page CSS loads afterwards, so any deliberate
 * page-specific mobile rule still wins the tie.
 */
@media (max-width: 640px) {
  [style*="grid-template-columns"] {
    grid-template-columns: 1fr !important;
  }

  /* Wide fixed paddings from the desktop comp overflow a 375px screen. */
  [style*="padding:0 56px"],
  [style*="padding: 0 56px"] {
    padding-left: 20px !important;
    padding-right: 20px !important;
  }
}

/* Nothing should ever push the page sideways. */
/* overflow-x must be `clip`, not `hidden`: `hidden` makes html/body a scroll
   container and breaks `position: sticky` everywhere (it collapsed the pinned
   hero into a black void). `clip` stops horizontal scroll without that side
   effect. Do not change back to hidden. */
html, body { max-width: 100%; overflow-x: clip; }
img, svg, video, image-slot { max-width: 100%; }
