/* =========================================================
   Cal’s Auto — Light Canvas / Gray Surfaces (Refactor)
   - no glare, no red glow, no vignette
   - gray buttons + red primary
   - micro-polish + accessible focus
   ========================================================= */

:root{
  /* Canvas */
  --bg1:#f6f8fb;
  --bg2:#e9eff6;

  /* Text */
  --text:#0b0c0e;
  --muted:#535a64;

  /* Surfaces (cards/tiles/panels) */
  --surface:#eef2f7;
  --surface2:#e2e8f0;

  /* Borders + shadow */
  --line:rgba(0,0,0,.10);
  --line2:rgba(0,0,0,.14);
  --shadow: 0 10px 24px rgba(0,0,0,.10), 0 2px 6px rgba(0,0,0,.05);
  --shadowHover: 0 16px 40px rgba(0,0,0,.12), 0 4px 10px rgba(0,0,0,.06);

  /* Accent */
  --red:#c41616;
  --red2:#ff2b2b;

  /* Layout */
  --radius:18px;
  --radiusSm:14px;
  --max:1120px;

  /* Motion */
  --dur:.18s;
  --ease:cubic-bezier(.2,.8,.2,1);

  /* Focus */
  --focus: 0 0 0 3px rgba(196,22,22,.25);
}

*{box-sizing:border-box}
html,body{margin:0;padding:0}
html{background:var(--bg1);}
body{
  min-height:100vh;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial;
  /* Flat, even canvas — no glare */
  background: linear-gradient(180deg, var(--bg1), var(--bg2));
  color:var(--text);
  line-height:1.45;
}

a{color:inherit;text-decoration:none}
a:focus-visible, button:focus-visible{
  outline:none;
  box-shadow: var(--focus);
  border-radius:12px;
}

/* ===== WRAP ===== */
.wrap{
  max-width:var(--max);
  margin:0 auto;
  padding:18px 16px 36px;
}

/* ===== TOPBAR ===== */
.topbar{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
  padding:10px 0 18px;
}

/* Brand */
.brand{
  display:flex;
  align-items:center;
  gap:12px;
}
.brand img{
  width:34px;
  height:34px;
  object-fit:contain;
  filter: drop-shadow(0 6px 10px rgba(0,0,0,.12));
}
.brand .t1{font-weight:900; letter-spacing:.2px}
.brand .t2{font-size:12px; color:var(--muted)}

/* Nav */
.nav{display:flex; gap:10px; flex-wrap:wrap}
.nav a{
  padding:9px 12px;
  border-radius:999px;
  border:1px solid var(--line);
  background: rgba(255,255,255,.70);
  font-weight:900;
  transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease), border-color var(--dur) var(--ease);
}
.nav a:hover{
  transform: translateY(-1px);
  border-color: var(--line2);
  box-shadow: 0 10px 20px rgba(0,0,0,.08);
}
.nav a.active{
  border-color: rgba(196,22,22,.35);
  background: rgba(196,22,22,.06);
}

/* ===== BUTTONS ===== */
/* Default = gray button */
.btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:10px;
  padding:11px 14px;
  border-radius:12px;
  border:1px solid var(--line);
  background: linear-gradient(180deg, #f7f9fc, #e9eef5);
  color:var(--text);
  font-weight:900;
  box-shadow: 0 10px 18px rgba(0,0,0,.08);
  transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease), border-color var(--dur) var(--ease);
  user-select:none;
}
.btn:hover{
  transform: translateY(-2px);
  border-color: var(--line2);
  box-shadow: 0 14px 28px rgba(0,0,0,.12);
}
.btn:active{
  transform: translateY(0px) scale(.99);
  box-shadow: 0 8px 14px rgba(0,0,0,.10);
}

/* Primary = red (NO glow) */
.btn.primary{
  background: linear-gradient(180deg, var(--red2), var(--red));
  color:#fff;
  border-color: rgba(0,0,0,.08);
  box-shadow: 0 12px 22px rgba(0,0,0,.16);
}
.btn.primary:hover{
  box-shadow: 0 16px 32px rgba(0,0,0,.18);
}

/* Ghost = slightly more matte gray */
.btn.ghost{
  background: linear-gradient(180deg, #eef2f7, #dde6ef);
}

/* ===== SURFACES ===== */
.card,
.tile,
.banner,
.kv .item,
.footer,
.ph{
  background: linear-gradient(180deg, var(--surface), var(--surface2));
  border:1px solid var(--line);
  border-radius:var(--radius);
  box-shadow: var(--shadow);
}

/* ===== HERO ===== */
.hero{
  display:grid;
  grid-template-columns: 1.15fr .85fr;
  gap:14px;
  align-items:stretch;
}
@media(max-width:940px){ .hero{grid-template-columns:1fr;} }

.hero-left{ padding:24px; }
.hero-right{ padding:18px; }

.hero-logo{
  width:min(320px, 84%);
  height:auto;
  display:block;
  margin:0 0 12px;
  filter: drop-shadow(0 10px 18px rgba(0,0,0,.14));
}

h1{
  margin:10px 0 10px;
  font-size: clamp(28px, 3.6vw, 50px);
  line-height:1.06;
  letter-spacing:-.5px;
}
.sub{
  margin:0 0 14px;
  max-width:62ch;
  color:var(--muted);
  font-size:16px;
  line-height:1.55;
}
.cta-row{display:flex; gap:10px; flex-wrap:wrap;}

/* Right panel text */
.panel-title{margin:0 0 10px; font-weight:900;}
.panel-sub{margin:0 0 14px; color:var(--muted); font-size:14px;}

/* ===== KV list ===== */
.kv{display:grid; gap:10px;}
.kv .item{
  border-radius: var(--radiusSm);
  padding:14px;
}
.kv .k{font-size:12px; color:var(--muted);}
.kv .v{margin-top:4px; font-weight:900;}

/* ===== SECTIONS ===== */
.section{margin-top:16px;}
.section h2{margin:0 0 10px; font-size:18px; letter-spacing:.2px;}

/* ===== GRID ===== */
.grid{
  display:grid;
  grid-template-columns:repeat(12,1fr);
  gap:12px;
}
.col-12{grid-column:span 12}
.col-6{grid-column:span 6}
.col-4{grid-column:span 4}
@media(max-width:900px){
  .col-6,.col-4{grid-column:span 12}
}

/* ===== TILES ===== */
.tile{
  padding:16px;
  border-radius:16px;
  transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease), border-color var(--dur) var(--ease);
}
.tile h3{margin:0 0 6px; font-size:16px;}
.tile p{margin:0 0 10px; color:var(--muted); font-size:14px;}
.tile ul{margin:0; padding-left:18px; color:var(--muted); font-size:14px;}
.tile li{margin:6px 0;}
.tile:hover{
  transform: translateY(-3px);
  box-shadow: var(--shadowHover);
  border-color: rgba(196,22,22,.18);
}

/* ===== BANNER ===== */
.banner{
  padding:18px;
  border-radius:var(--radius);
  border-color: rgba(196,22,22,.18);
}
.banner:hover{
  border-color: rgba(196,22,22,.24);
  box-shadow: var(--shadowHover);
}

/* ===== GALLERY ===== */
.gallery{
  display:grid;
  grid-template-columns:repeat(3,1fr);
  gap:12px;
}
@media(max-width:900px){ .gallery{grid-template-columns:1fr;} }

.ph{
  min-height:190px;
  display:flex;
  align-items:center;
  justify-content:center;
  color:var(--muted);
  font-weight:900;
  border-radius:16px;
  transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease), border-color var(--dur) var(--ease);
}
.ph:hover{
  transform: scale(1.01);
  box-shadow: var(--shadowHover);
  border-color: rgba(196,22,22,.18);
}
.ph img{width:100%; height:100%; object-fit:cover; display:block; border-radius:16px;}
/* size gallery images (no placeholders) */
.gallery img{
  width:100%;
  aspect-ratio:4 / 3;
  object-fit:cover;
  display:block;
  border-radius:16px;
}

/* ===== FOOTER ===== */
.footer{
  margin-top:18px;
  padding:18px;
  font-size:13px;
  color:var(--muted);
}
.footer .row{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  justify-content:space-between;
  align-items:center;
}
.hr{height:1px; background:rgba(0,0,0,.10); margin:14px 0;}
.small{color:var(--muted)}

/* ===== Subtle load-in (not flashy) ===== */
@keyframes fadeUp{
  from{opacity:0; transform: translateY(10px);}
  to{opacity:1; transform: translateY(0);}
}
.topbar, .hero, .section{
  animation: fadeUp .35s var(--ease) both;
}

/* ===== Reduced motion ===== */
@media (prefers-reduced-motion: reduce){
  *{ animation:none !important; transition:none !important; }
}
.nav{
  display:flex;
  gap:10px;
  flex-wrap:wrap;           /* allows wrapping */
  align-items:center;
}

@media(max-width:720px){
  .nav{
    overflow-x:auto;        /* allows swipe */
    flex-wrap:nowrap;       /* keeps it one line */
    -webkit-overflow-scrolling:touch;
    padding-bottom:6px;
  }
  .nav a{ white-space:nowrap; }
}
/* Mobile safety: prevent wide layouts from breaking */
img { max-width: 100%; height: auto; }
.wrap { max-width: 1100px; margin: 0 auto; }
body { overflow-x: hidden; }

/* If services uses any grid/card layout, force 1 column on phones */
@media (max-width: 720px){
  .grid { grid-template-columns: 1fr !important; }
  .col-6 { grid-column: auto / span 12 !important; } /* if you use col-6 tiles */
}
