:root{
  --bg:#f5f5f7; --fg:#1d1d1f; --muted:#6e6e73;
  --card:#ffffff; --ring:#e5e5e7; --hover:#ebebef; --link:#0071e3;
  --maxw:1100px; --radius:18px;
}

body{
  margin:0; background:var(--bg); color:var(--fg);
  font:16px/1.5 -apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Inter,Helvetica Neue,Arial,system-ui,"Apple Color Emoji","Segoe UI Emoji";
  -webkit-font-smoothing:antialiased; text-rendering:optimizeLegibility;
}

*{box-sizing:border-box}

/* Header */
header{
  position:sticky; top:0; z-index:10;
  background:linear-gradient(to bottom,rgba(245,245,247,.9),rgba(245,245,247,.6));
  backdrop-filter:saturate(180%) blur(10px);
  border-bottom:1px solid var(--ring);
}
.inner{
  max-width:var(--maxw); margin:0 auto; padding:16px 20px;
  display:flex; align-items:center; justify-content:space-between;
  gap:12px; flex-wrap:wrap;
}
.brand{
  font-weight:700; font-size:clamp(20px,3.2vw,30px); color:var(--fg);
  text-decoration:none; letter-spacing:-0.01em;
}
.brand:hover{text-decoration:underline;}
.header-actions{display:flex; align-items:center; gap:12px;}
.header-logo{
  display:inline-flex; width:44px; height:44px; border-radius:12px;
  overflow:hidden; border:1px solid var(--ring); background:var(--card);
  transition:transform .12s ease;
  align-items:center; justify-content:center;
}
.header-logo:hover{transform:translateY(-1px);}
.header-logo img{
  width:100%; height:100%; object-fit:cover; display:block;
}

/* Intro */
main{max-width:var(--maxw); margin:24px auto 80px; padding:0 20px;}
.rows{display:flex; flex-direction:column; gap:12px; margin:28px 0 24px;}
.title{font-size:clamp(28px,5vw,44px); font-weight:800; letter-spacing:-0.02em; margin-bottom:14px;}
.subtitle{font-size:clamp(15px,2.2vw,18px); color:var(--muted); margin-top:6px;}
.company-hero{align-items:center; text-align:center;}
.company-hero.brand-left{align-items:flex-start; text-align:left;}
.company-hero.brand-left nav{width:100%;}
.company-hero.brand-left .hero-body{
  display:flex; align-items:center; gap:28px; margin-top:10px; flex-wrap:wrap;
}
.company-hero.brand-left .logo-card{
  width:140px; height:140px; border-radius:32px; background:#ffffff;
  border:1px solid rgba(0,0,0,.06); display:flex; align-items:center;
  justify-content:center; overflow:hidden;
  mask:radial-gradient(120% 120% at 30% 30%,#000 77%,transparent 100%);
  -webkit-mask:radial-gradient(120% 120% at 30% 30%,#000 77%,transparent 100%);
}
.company-hero.brand-left .logo-card img{
  width:100%; height:auto; object-fit:contain; display:block;
}
.company-hero.brand-left .hero-copy{flex:1; min-width:240px;}

body.theme-salesforce{background:#e6f4ff;}
body.theme-salesforce .card{background:#ffffff; border:1px solid rgba(0,161,224,.26);}
body.theme-salesforce .card:hover{border-color:rgba(0,161,224,.55); box-shadow:0 8px 20px rgba(0,161,224,.18);}
body.theme-salesforce .media{background:#f5fbff;}
body.theme-salesforce .logo-card{
  border-color:rgba(0,161,224,.32);
}
body.theme-salesforce .company-hero .subtitle{color:#0f4971;}

body.theme-chime{background:#e7f8f0;}
body.theme-chime .card{background:#ffffff; border:1px solid rgba(11,191,102,.24);}
body.theme-chime .card:hover{border-color:rgba(11,191,102,.5); box-shadow:0 8px 20px rgba(11,191,102,.16);}
body.theme-chime .media{background:#f3fcf7;}
body.theme-chime .logo-card{
  border-color:rgba(11,191,102,.32);
}
body.theme-chime .company-hero .subtitle{color:#166042;}

body.theme-servicenow{background:#ecf7f6;}
body.theme-servicenow .card{background:#ffffff; border:1px solid rgba(11,125,107,.24);}
body.theme-servicenow .card:hover{border-color:rgba(11,125,107,.48); box-shadow:0 8px 20px rgba(11,125,107,.18);}
body.theme-servicenow .media{background:#f4fbfa;}
body.theme-servicenow .logo-card{
  border-color:rgba(11,125,107,.28);
}
body.theme-servicenow .company-hero .subtitle{color:#13594d;}
.crumbs{font-size:15px; color:var(--muted); margin-bottom:8px;}
.crumbs ol{
  display:flex; align-items:center; gap:6px; padding:0; margin:0; list-style:none;
}
.crumbs li{display:flex; align-items:center; gap:6px;}
.crumbs li+li::before{
  content:"/"; color:var(--ring);
}
.crumbs a{color:var(--link); text-decoration:none;}
.crumbs a:hover{text-decoration:underline;}
.crumbs li[aria-current="page"]{color:var(--fg);}

/* Grid */
.grid{display:grid; grid-template-columns:repeat(3,1fr); gap:18px;}
@media (max-width:800px){ .grid{grid-template-columns:1fr;} }

/* Card */
.card{
  display:block; text-decoration:none; color:inherit; background:var(--card);
  border:1px solid var(--ring); border-radius:var(--radius); overflow:hidden;
  transition:transform .12s ease, box-shadow .12s ease, border-color .12s ease;
}
.card:hover{transform:translateY(-2px); box-shadow:0 4px 10px rgba(0,0,0,.06),0 14px 30px rgba(0,0,0,.10); border-color:#c9c9cf;}

.blocks{
  display:flex; flex-direction:column; gap:18px;
  margin:24px 0 60px; padding:0; list-style:none;
}
.block{
  display:flex; flex-direction:column; background:var(--card);
  border:1px solid var(--ring); border-radius:var(--radius); overflow:hidden;
  transition:transform .12s ease, box-shadow .12s ease, border-color .12s ease;
}
.block:hover{transform:translateY(-2px); box-shadow:0 6px 18px rgba(0,0,0,.08),0 18px 36px rgba(0,0,0,.10); border-color:#c9c9cf;}
.block-media{
  padding:22px; background:var(--card); display:flex; align-items:center; justify-content:center;
}
.block-media .emoji{font-size:42px; line-height:1;}
.block-body{padding:20px 24px 24px;}
.block-title{font-size:20px; font-weight:600; margin:0 0 6px; letter-spacing:-0.01em;}
.block-meta{font-size:15px; color:var(--muted); margin:0 0 12px;}
.block-desc{font-size:15px; margin:0 0 14px;}
.block-actions{display:flex; align-items:center; gap:12px;}
.block-actions a{
  display:inline-flex; align-items:center; gap:6px; color:var(--link);
  font-weight:500; text-decoration:none;
}
.block-actions a:hover{text-decoration:underline;}
@media (min-width:760px){
  .block{flex-direction:row; align-items:stretch;}
  .block-media{width:170px; border-right:1px solid var(--ring);}
  .block-body{flex:1;}
}

.alert {
  background:#fffbea;
  border:1px solid #f6e05e;
  color:#744210;
  padding:12px 16px;
  border-radius:12px;
  font-size:14px;
  line-height:1.5;
  margin:20px 0 32px;
}
.alert strong{font-weight:600;}

/* Media area = either an <img> OR a centered emoji */
.media{
  display:flex; align-items:center; justify-content:center;
  width:100%; height:180px; background:#ffffff;
}
.media img{
  width:100%; height:100%; object-fit:contain; display:block;
  padding:20px;
  max-height:110px;
  max-width:210px;
}
.logo-media-img{
  width:96px; height:96px; border-radius:20px; overflow:hidden;
  background:transparent; display:flex;
  align-items:center; justify-content:center;
  mask:radial-gradient(120% 120% at 30% 30%,#000 68%,transparent 100%);
  -webkit-mask:radial-gradient(120% 120% at 30% 30%,#000 68%,transparent 100%);
}
.logo-media-img img{
  width:100%; height:100%; object-fit:cover; padding:0;
}
.media .emoji{
  font-size:72px; line-height:1;
  display:flex; align-items:center; justify-content:center;
}

.body{padding:12px;}
.card .heading{font-size:18px; font-weight:600; margin:2px 0 6px; letter-spacing:-0.01em;}
.card .desc{font-size:15px; color:var(--muted); margin:0; line-height:1.4;}

footer{max-width:var(--maxw); margin:40px auto 60px; padding:0 20px; color:var(--muted); font-size:15px;}
