/* ============================================================
   UC Davis EV Core — Site Styles
   Brand: UC Davis Aggie Blue + Gold, with modern science accent
   ============================================================ */

:root {
  --aggie-blue: #022851;
  --aggie-blue-700: #0B3464;
  --aggie-blue-100: #E6ECF3;
  --aggie-gold: #FFBF00;
  --aggie-gold-soft: #FFE082;
  --teal: #15A0A8;
  --teal-50: #E6F6F7;
  --coral: #E55D52;
  --ink: #0E1626;
  --ink-2: #2A3447;
  --muted: #5D6678;
  --line: #E3E7EE;
  --bg: #FFFFFF;
  --bg-alt: #F6F8FB;
  --bg-dark: #061A33;
  --radius: 14px;
  --radius-sm: 8px;
  --radius-lg: 22px;
  --shadow-sm: 0 1px 2px rgba(2,40,81,0.06), 0 1px 3px rgba(2,40,81,0.04);
  --shadow: 0 4px 14px rgba(2,40,81,0.08), 0 1px 3px rgba(2,40,81,0.04);
  --shadow-lg: 0 24px 60px -20px rgba(2,40,81,0.25);
  --maxw: 1180px;
  --font-sans: -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font-sans);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.55;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a { color: var(--aggie-blue); text-decoration: none; }
a:hover { color: var(--teal); }
img { max-width: 100%; display: block; }

h1, h2, h3, h4 { font-weight: 700; letter-spacing: -0.01em; line-height: 1.18; color: var(--ink); margin: 0 0 0.5em; }
h1 { font-size: clamp(2rem, 4.2vw, 3.4rem); letter-spacing: -0.025em; }
h2 { font-size: clamp(1.5rem, 2.8vw, 2.25rem); letter-spacing: -0.02em; }
h3 { font-size: 1.25rem; }
p { margin: 0 0 1em; color: var(--ink-2); }

.container { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
.section { padding: 88px 0; }
.section-tight { padding: 56px 0; }
.eyebrow { display: inline-block; text-transform: uppercase; letter-spacing: 0.12em; font-weight: 700; font-size: 0.75rem; color: var(--teal); margin-bottom: 14px; }
.lede { font-size: 1.18rem; color: var(--ink-2); max-width: 60ch; }
.center { text-align: center; }
.muted { color: var(--muted); }

/* ======== Header ======== */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255,255,255,0.92);
  backdrop-filter: saturate(160%) blur(8px);
  -webkit-backdrop-filter: saturate(160%) blur(8px);
  border-bottom: 1px solid var(--line);
}
.nav {
  display: flex; align-items: center; justify-content: space-between;
  height: 72px;
}
.brand {
  display: flex; align-items: center; gap: 12px;
  font-weight: 800; color: var(--aggie-blue);
  letter-spacing: -0.01em;
  font-size: 1.05rem;
}
.brand-mark {
  width: 44px; height: 44px;
  background-image: url("assets/logo-mark.svg");
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  flex-shrink: 0;
}
.brand-name { display: flex; flex-direction: column; gap: 2px; line-height: 1; }
.brand-name strong { font-size: 1rem; }
.brand-name span { font-size: 0.72rem; color: var(--muted); font-weight: 500; letter-spacing: 0.04em; }

.nav-links { display: flex; align-items: center; gap: 28px; }
.nav-links a { color: var(--ink-2); font-weight: 500; font-size: 0.95rem; }
.nav-links a:hover, .nav-links a.is-active { color: var(--aggie-blue); }
.nav-cta { display: flex; align-items: center; gap: 12px; }

@media (max-width: 880px) {
  .nav-links { display: none; }
}

/* ======== Buttons ======== */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 22px; border-radius: 10px;
  font-weight: 600; font-size: 0.95rem;
  border: 1px solid transparent; cursor: pointer;
  transition: transform 0.08s ease, box-shadow 0.18s ease, background 0.18s ease, color 0.18s ease;
}
.btn-primary { background: var(--aggie-blue); color: #fff; box-shadow: var(--shadow-sm); }
.btn-primary:hover { background: var(--aggie-blue-700); color: #fff; transform: translateY(-1px); box-shadow: var(--shadow); }
.btn-gold { background: var(--aggie-gold); color: var(--aggie-blue); }
.btn-gold:hover { background: var(--aggie-gold-soft); color: var(--aggie-blue); }
.btn-ghost { background: transparent; color: var(--aggie-blue); border-color: var(--line); }
.btn-ghost:hover { background: var(--bg-alt); color: var(--aggie-blue); }
.btn-lg { padding: 16px 28px; font-size: 1rem; }
.btn-sm { padding: 8px 14px; font-size: 0.85rem; }

/* ======== Hero ======== */
.hero {
  position: relative;
  background:
    radial-gradient(900px 500px at 90% -10%, rgba(21,160,168,0.18), transparent 60%),
    radial-gradient(700px 400px at -10% 110%, rgba(255,191,0,0.14), transparent 60%),
    linear-gradient(180deg, #FAFCFE 0%, #F1F5FB 100%);
  padding: 96px 0 72px;
  border-bottom: 1px solid var(--line);
  overflow: hidden;
}
.hero-grid { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 56px; align-items: center; }
.hero h1 { color: var(--aggie-blue); }
.hero h1 .accent { color: var(--teal); display: inline-block; }
.hero .lede { font-size: 1.25rem; }
.hero-cta { display: flex; gap: 14px; margin-top: 28px; flex-wrap: wrap; }
.hero-trust { display: flex; gap: 28px; margin-top: 36px; flex-wrap: wrap; align-items: center; }
.trust-item { font-size: 0.8rem; color: var(--muted); display: flex; align-items: center; gap: 6px; font-weight: 500; }
.trust-item::before { content: "✓"; color: var(--teal); font-weight: 700; }

.hero-visual {
  position: relative; aspect-ratio: 1/1;
  border-radius: var(--radius-lg);
  background:
    radial-gradient(circle at 50% 50%, #fff 0%, #fff 4%, transparent 5%),
    radial-gradient(circle at 25% 35%, #FFE082 0%, #FFE082 6%, transparent 7%),
    radial-gradient(circle at 75% 30%, #15A0A8 0%, #15A0A8 5%, transparent 6%),
    radial-gradient(circle at 30% 75%, #15A0A8 0%, #15A0A8 4%, transparent 5%),
    radial-gradient(circle at 78% 78%, #FFBF00 0%, #FFBF00 5%, transparent 6%),
    radial-gradient(circle at 50% 90%, #fff 0%, #fff 3%, transparent 4%),
    radial-gradient(circle at 12% 50%, #fff 0%, #fff 3%, transparent 4%),
    radial-gradient(circle at 90% 55%, #fff 0%, #fff 2.5%, transparent 3.5%),
    linear-gradient(135deg, var(--aggie-blue) 0%, var(--aggie-blue-700) 60%, #0E2C5C 100%);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}
.hero-visual::before {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(circle at 50% 50%, transparent 35%, rgba(255,255,255,0.04) 36%, transparent 37%);
}
.hero-visual::after {
  content: "EV cryo-EM render"; position: absolute; bottom: 16px; left: 18px;
  color: rgba(255,255,255,0.7); font-size: 0.72rem; letter-spacing: 0.08em; text-transform: uppercase; font-weight: 500;
}

@media (max-width: 880px) {
  .hero-grid { grid-template-columns: 1fr; gap: 40px; }
  .hero-visual { max-width: 420px; margin: 0 auto; width: 100%; }
}

/* ======== Trust Bar ======== */
.trust-bar {
  background: var(--aggie-blue);
  color: #fff;
  padding: 18px 0;
}
.trust-bar-inner {
  display: flex; gap: 36px; justify-content: center; align-items: center;
  flex-wrap: wrap;
  font-size: 0.85rem; font-weight: 500;
  color: rgba(255,255,255,0.85);
}
.trust-bar strong { color: var(--aggie-gold); margin-right: 6px; }

/* ======== Section helpers ======== */
.section-head { max-width: 720px; margin: 0 auto 56px; text-align: center; }
.bg-alt { background: var(--bg-alt); }
.bg-dark { background: var(--bg-dark); color: #fff; }
.bg-dark h1, .bg-dark h2, .bg-dark h3 { color: #fff; }
.bg-dark p, .bg-dark .lede { color: rgba(255,255,255,0.78); }
.bg-blue { background: var(--aggie-blue); color: #fff; }
.bg-blue h1, .bg-blue h2, .bg-blue h3 { color: #fff; }
.bg-blue p, .bg-blue .lede { color: rgba(255,255,255,0.85); }

/* ======== Cards Grid ======== */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 24px; }
.card {
  background: #fff; border: 1px solid var(--line);
  border-radius: var(--radius); padding: 28px;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: var(--teal); }
.card-icon {
  width: 44px; height: 44px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  background: var(--teal-50); color: var(--teal);
  font-size: 1.4rem; font-weight: 700;
  margin-bottom: 16px;
}
.card h3 { color: var(--aggie-blue); margin-bottom: 8px; font-size: 1.15rem; }
.card p { font-size: 0.95rem; margin: 0; color: var(--ink-2); }

/* ======== Tier ladder (escalation) ======== */
.tier-ladder { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; align-items: stretch; }
@media (max-width: 980px) { .tier-ladder { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .tier-ladder { grid-template-columns: 1fr; } }

.tier {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 28px 24px;
  display: flex; flex-direction: column;
  position: relative; overflow: hidden;
}
.tier::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 4px;
  background: var(--teal);
}
.tier.popular::before { background: var(--aggie-gold); height: 5px; }
.tier.popular { border-color: var(--aggie-gold); box-shadow: 0 8px 28px -10px rgba(255,191,0,0.4); }
.tier.popular .tier-badge { display: inline-block; }
.tier-badge {
  display: none; position: absolute; top: 18px; right: 18px;
  background: var(--aggie-gold); color: var(--aggie-blue);
  font-size: 0.7rem; font-weight: 700; letter-spacing: 0.08em;
  padding: 4px 10px; border-radius: 999px; text-transform: uppercase;
}
.tier-name { font-size: 0.78rem; letter-spacing: 0.1em; color: var(--teal); font-weight: 700; text-transform: uppercase; margin-bottom: 8px; }
.tier h3 { font-size: 1.35rem; color: var(--aggie-blue); margin-bottom: 6px; }
.tier-price { font-size: 1.6rem; font-weight: 700; color: var(--aggie-blue); margin: 14px 0 6px; }
.tier-price small { font-size: 0.8rem; color: var(--muted); font-weight: 500; }
.tier-desc { font-size: 0.92rem; color: var(--ink-2); margin-bottom: 18px; min-height: 3.2em; }
.tier-list { list-style: none; padding: 0; margin: 0 0 22px; flex-grow: 1; }
.tier-list li {
  position: relative; padding-left: 24px; margin-bottom: 8px;
  font-size: 0.9rem; color: var(--ink-2);
}
.tier-list li::before {
  content: "→"; position: absolute; left: 0; top: 0;
  color: var(--teal); font-weight: 700;
}
.tier .btn { width: 100%; justify-content: center; }

/* ======== Two-column feature ======== */
.feature-row { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
.feature-row.reverse { grid-template-columns: 1fr 1fr; direction: rtl; }
.feature-row.reverse > * { direction: ltr; }
@media (max-width: 880px) { .feature-row, .feature-row.reverse { grid-template-columns: 1fr; gap: 32px; direction: ltr; } }

.feature-visual {
  border-radius: var(--radius);
  aspect-ratio: 4/3;
  position: relative; overflow: hidden;
  box-shadow: var(--shadow);
}

/* ======== Stat band ======== */
.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
@media (max-width: 760px) { .stat-grid { grid-template-columns: 1fr 1fr; } }
.stat { padding: 24px; border-right: 1px solid rgba(255,255,255,0.12); }
.stat:last-child { border-right: 0; }
.stat-num { font-size: 2.4rem; font-weight: 800; color: var(--aggie-gold); line-height: 1; letter-spacing: -0.02em; }
.stat-lbl { font-size: 0.85rem; color: rgba(255,255,255,0.78); margin-top: 8px; }

/* ======== Quote ======== */
.quote {
  background: #fff; border-left: 4px solid var(--aggie-gold);
  padding: 32px 36px; border-radius: 0 var(--radius) var(--radius) 0;
  box-shadow: var(--shadow-sm);
  font-size: 1.15rem; color: var(--ink-2); font-style: italic; line-height: 1.5;
}
.quote-author { display: block; margin-top: 12px; font-style: normal; color: var(--aggie-blue); font-weight: 600; font-size: 0.95rem; }
.quote-author small { color: var(--muted); font-weight: 500; }

/* ======== CTA Block ======== */
.cta-block {
  background: linear-gradient(135deg, var(--aggie-blue) 0%, var(--aggie-blue-700) 100%);
  color: #fff;
  border-radius: var(--radius-lg);
  padding: 56px;
  display: grid; grid-template-columns: 1.5fr 1fr; gap: 32px; align-items: center;
}
@media (max-width: 760px) { .cta-block { grid-template-columns: 1fr; padding: 40px 28px; text-align: center; } }
.cta-block h2 { color: #fff; margin-bottom: 8px; }
.cta-block p { color: rgba(255,255,255,0.85); margin: 0; }
.cta-block .btn-gold { font-size: 1rem; padding: 16px 28px; }

/* ======== Footer ======== */
.site-footer { background: var(--bg-dark); color: rgba(255,255,255,0.78); padding: 64px 0 32px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 40px; margin-bottom: 48px; }
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
.footer-grid h4 { color: #fff; font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.1em; margin-bottom: 16px; }
.footer-grid a { color: rgba(255,255,255,0.7); display: block; padding: 5px 0; font-size: 0.92rem; }
.footer-grid a:hover { color: var(--aggie-gold); }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.12);
  padding-top: 24px;
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px;
  font-size: 0.82rem;
}
.footer-bottom .badges { display: flex; gap: 12px; flex-wrap: wrap; }
.badge {
  background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.14);
  padding: 4px 10px; border-radius: 6px; font-size: 0.75rem;
  color: var(--aggie-gold); font-weight: 600;
}
.footer-brand p { color: rgba(255,255,255,0.7); font-size: 0.9rem; max-width: 36ch; }
.footer-brand .brand-name strong { color: #fff; }
.footer-brand .brand-name span { color: rgba(255,255,255,0.6); }
.footer-signature {
  display: block; margin-bottom: 14px;
  max-width: 280px; height: auto;
}

/* ======== Service detail page ======== */
.service-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
@media (max-width: 760px) { .service-grid { grid-template-columns: 1fr; } }
.service {
  background: #fff; border: 1px solid var(--line);
  border-radius: var(--radius); padding: 28px;
}
.service h3 { color: var(--aggie-blue); margin-bottom: 10px; }
.service .tag-row { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0 14px; }
.tag {
  font-size: 0.72rem; padding: 4px 10px; border-radius: 999px;
  background: var(--teal-50); color: var(--teal); font-weight: 600;
}
.tag.gold { background: #FFF7DD; color: #946A00; }
.tag.coral { background: #FCE9E7; color: #B53A30; }
.service ul { padding-left: 20px; margin: 10px 0; font-size: 0.92rem; color: var(--ink-2); }
.service li { margin-bottom: 4px; }

/* ======== Pricing table ======== */
.pricing-table {
  width: 100%; border-collapse: collapse; background: #fff;
  box-shadow: var(--shadow-sm); border-radius: var(--radius);
  overflow: hidden; font-size: 0.92rem;
}
.pricing-table th, .pricing-table td { padding: 14px 18px; text-align: left; border-bottom: 1px solid var(--line); }
.pricing-table thead { background: var(--aggie-blue-100); }
.pricing-table th { color: var(--aggie-blue); font-weight: 700; font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.06em; }
.pricing-table tr:last-child td { border-bottom: 0; }
.pricing-table tr:hover { background: var(--bg-alt); }

/* ======== Case study cards ======== */
.case {
  background: #fff; border: 1px solid var(--line);
  border-radius: var(--radius); overflow: hidden;
  display: flex; flex-direction: column;
}
.case-banner {
  height: 160px;
  background: linear-gradient(135deg, var(--aggie-blue), var(--teal));
  position: relative; color: #fff;
  display: flex; align-items: flex-end; padding: 18px;
}
.case-banner.alt { background: linear-gradient(135deg, var(--aggie-blue-700), var(--coral)); }
.case-banner.gold { background: linear-gradient(135deg, var(--aggie-blue), #946A00 90%, var(--aggie-gold)); }
.case-banner.green { background: linear-gradient(135deg, #0E5C4A, var(--teal)); }
.case-banner h3 { color: #fff; margin: 0; font-size: 1.15rem; line-height: 1.3; }
.case-body { padding: 22px 24px; }
.case-meta { font-size: 0.78rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.08em; font-weight: 600; margin-bottom: 8px; }
.case-body p { font-size: 0.93rem; }
.case-link { color: var(--teal); font-weight: 600; font-size: 0.9rem; }
.case-link::after { content: " →"; }

/* ======== Sample report card ======== */
.report-grid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 18px; }
@media (max-width: 880px) { .report-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .report-grid { grid-template-columns: 1fr; } }

.report-card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.report-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.report-thumb {
  height: 200px; background: var(--aggie-blue-100);
  position: relative; overflow: hidden;
  border-bottom: 1px solid var(--line);
}
.report-thumb svg { width: 100%; height: 100%; }
.report-card-body { padding: 18px 22px; }
.report-card-body h4 { color: var(--aggie-blue); font-size: 1rem; margin: 0 0 6px; }
.report-card-body p { font-size: 0.85rem; margin: 0; color: var(--muted); }

/* ======== FAQ ======== */
.faq details {
  background: #fff; border: 1px solid var(--line);
  border-radius: var(--radius); padding: 18px 24px;
  margin-bottom: 12px;
}
.faq summary {
  font-weight: 600; color: var(--aggie-blue);
  cursor: pointer; padding: 6px 0;
  list-style: none;
  display: flex; justify-content: space-between; align-items: center;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--teal); font-size: 1.2rem; font-weight: 600; }
.faq details[open] summary::after { content: "−"; }
.faq details[open] { box-shadow: var(--shadow-sm); }
.faq p { color: var(--ink-2); margin: 12px 0 0; font-size: 0.95rem; }

/* ======== Form ======== */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
@media (max-width: 720px) { .form-grid { grid-template-columns: 1fr; } }
.field label { display: block; font-weight: 600; font-size: 0.85rem; color: var(--ink-2); margin-bottom: 6px; }
.field input, .field select, .field textarea {
  width: 100%; padding: 12px 14px; border: 1px solid var(--line);
  border-radius: 10px; font-family: inherit; font-size: 0.95rem; background: #fff; color: var(--ink);
  transition: border-color 0.12s ease, box-shadow 0.12s ease;
}
.field input:focus, .field select:focus, .field textarea:focus {
  border-color: var(--teal); outline: 0;
  box-shadow: 0 0 0 3px rgba(21,160,168,0.18);
}
.field textarea { resize: vertical; min-height: 120px; }
.field-full { grid-column: 1 / -1; }

/* ======== Misc ======== */
.divider { border: 0; border-top: 1px solid var(--line); margin: 56px 0; }

/* utility */
.hidden-mobile { }
@media (max-width: 720px) { .hidden-mobile { display: none; } }

/* simple SVG-based abstract patterns for case banners */
.banner-pattern {
  position: absolute; inset: 0;
  background-image:
    radial-gradient(circle at 20% 30%, rgba(255,255,255,0.18) 0, rgba(255,255,255,0.18) 6px, transparent 7px),
    radial-gradient(circle at 70% 60%, rgba(255,255,255,0.12) 0, rgba(255,255,255,0.12) 5px, transparent 6px),
    radial-gradient(circle at 85% 25%, rgba(255,255,255,0.14) 0, rgba(255,255,255,0.14) 4px, transparent 5px),
    radial-gradient(circle at 35% 75%, rgba(255,255,255,0.1) 0, rgba(255,255,255,0.1) 7px, transparent 8px);
}
