/* Shared styles for Rooted Stack rental sites (public pages).
   Brand colors arrive as CSS custom properties set inline per tenant:
   --brand-primary / --brand-secondary / --brand-accent plus computed
   accessible text colors --brand-on-primary / --brand-on-secondary. */

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    color: #1a1a1a;
    background: #fff;
    line-height: 1.6;
}
h1, h2, h3, h4 { font-family: 'Plus Jakarta Sans', system-ui, sans-serif; margin: 0 0 .5em; line-height: 1.2; }
a { color: var(--brand-primary); text-decoration: none; }
img { max-width: 100%; height: auto; display: block; }
.container { max-width: 1100px; margin: 0 auto; padding: 0 1.5rem; }

/* Accessibility */
.skip-link {
    position: absolute; left: -9999px; top: 0; z-index: 100;
    background: #fff; color: var(--brand-primary); font-weight: 700;
    padding: .75rem 1.25rem; border-radius: 0 0 6px 0;
}
.skip-link:focus { left: 0; }
:focus-visible { outline: 3px solid var(--brand-secondary); outline-offset: 2px; }

/* Header */
.site-header { background: var(--brand-primary); color: var(--brand-on-primary); padding: 1rem 0; }
.site-header__inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.site-header__brand { display: flex; align-items: center; gap: .75rem; color: var(--brand-on-primary); font-weight: 700; font-size: 1.15rem; }
.site-header__logo { height: 36px; width: auto; display: block; }
.site-header__nav { display: flex; gap: 1.25rem; align-items: center; }
.site-header__nav a { color: var(--brand-on-primary); font-weight: 500; font-size: .95rem; opacity: .9; }
.site-header__nav a:hover { opacity: 1; }
.site-header__cta {
    display: inline-block;
    background: var(--brand-secondary);
    color: var(--brand-on-secondary) !important;
    padding: .55rem 1.15rem;
    border-radius: 6px;
    font-weight: 600;
    font-size: .95rem;
    opacity: 1 !important;
}
.site-header__owner {
    display: inline-flex; align-items: center; gap: .35rem;
    color: var(--brand-on-primary);
    opacity: .55;
    font-size: .8rem;
    padding: .35rem .55rem;
    border-radius: 4px;
    transition: opacity .15s ease, background .15s ease;
}
.site-header__owner:hover { opacity: 1; background: rgba(127,127,127,.18); }
.site-header__owner svg { display: block; }

/* Buttons */
.btn {
    display: inline-block;
    padding: .85rem 1.5rem;
    border-radius: 6px;
    font-weight: 600;
    font-size: 1rem;
    transition: transform .1s ease;
    cursor: pointer;
}
.btn:hover { transform: translateY(-1px); }
.btn--primary   { background: var(--brand-secondary); color: var(--brand-on-secondary); }
.btn--secondary { background: transparent; color: var(--brand-on-primary); border: 1px solid currentColor; }
.btn--outline   { background: transparent; color: var(--brand-primary); border: 2px solid var(--brand-primary); }

/* Fleet grid (shared between site home + fleet page) */
.fleet-section { padding: 4rem 0; background: #fafafa; }
.fleet-section__heading { text-align: center; margin-bottom: 2.5rem; }
.fleet-section__heading h2 { color: var(--brand-primary); font-size: 2rem; }
.fleet-section__heading p  { color: #555; max-width: 580px; margin: 0 auto; }
.fleet-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.75rem;
}
.vehicle-card {
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0,0,0,.06);
    display: flex;
    flex-direction: column;
    transition: transform .15s ease, box-shadow .15s ease;
}
.vehicle-card:hover { transform: translateY(-3px); box-shadow: 0 6px 20px rgba(0,0,0,.1); }
.vehicle-card__photo {
    aspect-ratio: 16 / 10;
    background: #eee url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="80" height="80" viewBox="0 0 24 24" fill="none" stroke="%23bbb" stroke-width="1.5"><path d="M5 17a2 2 0 1 0 4 0 2 2 0 0 0-4 0zm10 0a2 2 0 1 0 4 0 2 2 0 0 0-4 0z"/><path d="M3 17h2m4 0h6m4 0h2v-4l-3-5H6l-3 5v4z"/></svg>') center no-repeat;
    background-size: 80px;
    overflow: hidden;
}
.vehicle-card__photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.vehicle-card__body { padding: 1.25rem; flex: 1; display: flex; flex-direction: column; }
.vehicle-card__name { color: var(--brand-primary); font-size: 1.15rem; font-weight: 700; margin: 0 0 .4rem; }
.vehicle-card__year { color: #767676; font-size: .85rem; font-weight: 500; }
.vehicle-card__specs {
    display: flex;
    flex-wrap: wrap;
    gap: .75rem;
    margin: .75rem 0 1rem;
    color: #555;
    font-size: .875rem;
}
.vehicle-card__specs span { display: inline-flex; align-items: center; gap: .35rem; }
.vehicle-card__rate { font-size: 1.4rem; font-weight: 700; color: var(--brand-primary); margin-top: auto; }
.vehicle-card__rate small { font-size: .8rem; font-weight: 500; color: #767676; }
.vehicle-card__rate-alt { font-size: .8rem; font-weight: 500; color: #767676; margin-top: -.15rem; }
.vehicle-card__cta {
    display: block;
    text-align: center;
    background: var(--brand-secondary);
    color: var(--brand-on-secondary) !important;
    padding: .7rem;
    border-radius: 6px;
    font-weight: 600;
    margin-top: 1rem;
    font-size: .95rem;
}
.vehicle-card--unavailable { opacity: .55; }
.vehicle-card--unavailable .vehicle-card__cta { background: #767676; color: #fff !important; pointer-events: none; }

/* Footer */
.site-footer {
    background: var(--brand-primary);
    color: var(--brand-on-primary);
    padding: 2rem 0;
    text-align: center;
    font-size: .9rem;
}
.site-footer a { color: var(--brand-on-primary); }

@media (max-width: 640px) {
    .fleet-section { padding: 3rem 0; }
    .site-header { padding: .75rem 0; }
    .site-header__brand { font-size: 1rem; }
    .site-header__brand .site-header__logo { height: 28px; }
    .site-header__nav { gap: .5rem; }
    /* Hide secondary nav text links on mobile, keep CTA + Owner icon */
    .site-header__nav > a:not(.site-header__cta):not(.site-header__owner) { display: none; }
    .site-header__cta { padding: .45rem .85rem; font-size: .85rem; }
    .site-header__owner span { display: none; }
    .site-header__owner { padding: .4rem; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { transition: none !important; animation: none !important; }
    .btn:hover, .vehicle-card:hover { transform: none; }
}
