/* =================================================================
   My Desktop CertVault — base.css
   Design tokens + reset. Cool neutral surface that lets the four
   Google colors (blue / red / yellow / green) carry the visual weight.
   ================================================================= */

:root {
  /* ---- Google 4-color anchor palette ---- */
  --g-blue:    #4285F4;
  --g-red:     #DB4437;
  --g-yellow:  #F4B400;
  --g-green:   #0F9D58;

  /* ---- Backgrounds ---- */
  --bg: #f6f8fc;
  --bg-accent: #eef3fb;
  --surface: rgba(255, 255, 255, 0.88);
  --surface-strong: #ffffff;
  --surface-muted: #f3f7fe;

  /* ---- Text ---- */
  --text: #1f2937;
  --text-soft: #5f6b7a;

  /* ---- Lines & shadows ---- */
  --line: rgba(66, 133, 244, 0.16);
  --shadow: 0 24px 60px rgba(66, 133, 244, 0.10);

  /* ---- Brand colors (semantic roles) ---- */
  --primary: var(--g-blue);
  --primary-strong: #1a73e8;
  --accent: var(--g-green);
  --danger: var(--g-red);
  --success: var(--g-green);
  --warning: var(--g-yellow);

  /* ---- Radii ---- */
  --radius-xl: 28px;
  --radius-lg: 20px;
  --radius-md: 14px;

  /* ---- Layout ---- */
  --content-width: 1240px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; overflow-x: hidden; }

body {
  margin: 0;
  color: var(--text);
  font-family: "Avenir Next", "Segoe UI", "Trebuchet MS", sans-serif;
  background:
    radial-gradient(circle at top left, rgba(255, 255, 255, 0.85), transparent 32%),
    radial-gradient(circle at bottom right, rgba(66, 133, 244, 0.10), transparent 30%),
    linear-gradient(180deg, var(--bg-accent) 0%, var(--bg) 42%, #f7faff 100%);
  line-height: 1.5;
  overflow-x: hidden;
  -webkit-text-size-adjust: 100%;
}

a { color: var(--primary); }
button, input, select, textarea { font: inherit; }

.site-shell { min-height: 100vh; }

/* ---- Header ---- */
.site-header {
  position: sticky;
  top: 4px; /* leave room for the 4-color stripe above */
  z-index: 20;
  backdrop-filter: blur(18px);
  background: rgba(246, 248, 252, 0.88);
  border-bottom: 1px solid rgba(66, 133, 244, 0.10);
}
.site-header-inner {
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 16px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
}
.brand { display: flex; align-items: center; gap: 14px; text-decoration: none; }
.brand-mark {
  width: 48px; height: 48px;
  border-radius: 12px;
  display: grid; place-items: center;
  font-weight: 800;
  /* White background + 4-color border set in brand.css so the
     transparent logo PNG is fully visible. */
  overflow: hidden;
}
.brand-mark img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 4px;
}
.brand-copy { display: flex; flex-direction: column; gap: 2px; }
.brand-title {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 22px;
  letter-spacing: 0.01em;
  color: var(--text);
}
.brand-subtitle {
  color: var(--text-soft);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.16em;
}

.nav-links { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 10px; }
.nav-link {
  padding: 10px 14px;
  border-radius: 999px;
  text-decoration: none;
  color: var(--text-soft);
  transition: 0.2s ease;
}
.nav-link:hover {
  color: var(--primary);
  background: rgba(66, 133, 244, 0.08);
}
.nav-link.primary {
  background: linear-gradient(135deg, var(--g-blue), var(--g-green));
  color: white;
  box-shadow: 0 12px 24px rgba(66, 133, 244, 0.22);
}

/* ---- Page shell ---- */
.page-shell {
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 36px 24px 56px;
}
.page-intro { margin-bottom: 24px; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(66, 133, 244, 0.10);
  color: var(--primary);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.14em;
}
.eyebrow.accent-green  { background: rgba(15, 157, 88, 0.10);  color: var(--g-green); }
.eyebrow.accent-yellow { background: rgba(244, 180, 0, 0.14);  color: #8a6500; }
.eyebrow.accent-red    { background: rgba(219, 68, 55, 0.10);  color: var(--g-red); }

.page-title {
  margin: 14px 0 8px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(34px, 5vw, 56px);
  line-height: 1.02;
}
.page-subtitle {
  max-width: 760px;
  margin: 0;
  color: var(--text-soft);
  font-size: 17px;
  line-height: 1.7;
}

/* ---- Layout primitives ---- */
.center-shell { max-width: 760px; margin: 0 auto; }
.stack { display: grid; gap: 20px; }

/* ---- Form view: centered eyebrow + title ---- */
.cert-form-card {
  max-width: 640px;
  margin: 40px auto;
  text-align: center;
}

/* ---- Results view ("Certificates Found"): wide, low side padding ---- */
.cert-results-card {
  padding: 24px 26px;
  text-align: center;
}
@media (max-width: 640px) {
  .cert-results-card { padding: 16px 12px; }
}
.cert-form-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}
.cert-form-title {
  font-size: clamp(28px, 5vw, 44px) !important;
  margin: 6px 0 0 !important;
}
.cert-form-subtitle {
  margin-left: auto !important;
  margin-right: auto !important;
}

/* ---- Certificate action bar (Back + Download) ---- */
.cert-action-bar {
  justify-content: center;
  margin-bottom: 18px;
}

/* ---- Certificate image display ---- */
.certificate-image-frame {
  max-width: 1123px;
  margin: 0 auto;
  overflow: hidden;
}
.certificate-image {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 0 auto;
  border-radius: 12px;
  box-shadow: 0 16px 40px rgba(66, 133, 244, 0.16);
}

/* ---- Verify URL box ---- */
.cert-url-box {
  max-width: 760px;
  margin: 0 auto 22px;
}

/* ---- Responsive ---- */
@media (max-width: 980px) {
  .site-header-inner { flex-direction: column; align-items: flex-start; }
  .nav-links { width: 100%; justify-content: flex-start; }
  .cert-form-card { margin: 24px auto; }
}

@media (max-width: 640px) {
  .page-shell { padding: 16px 12px 32px; }
  .site-header-inner { padding: 12px 16px; }
  .brand-mark { width: 40px; height: 40px; border-radius: 10px; }
  .brand-mark img { padding: 3px; }
  .brand-title { font-size: 17px; }
  .brand-subtitle { font-size: 9px; letter-spacing: 0.12em; }
  .brand { gap: 10px; }

  .cert-form-card {
    margin: 16px auto;
    padding: 20px 16px;
    gap: 16px;
  }
  .cert-form-title { font-size: 26px !important; }
  .cert-form-subtitle { font-size: 14px !important; line-height: 1.5; }
  .eyebrow { font-size: 10px; padding: 6px 10px; letter-spacing: 0.12em; }

  .cert-action-bar { gap: 8px; margin-bottom: 14px; }
  .cert-url-box { padding: 16px; margin-bottom: 16px; }

  .certificate-image { border-radius: 8px; }

  .page-title { font-size: 28px; }
  .page-subtitle { font-size: 14px; line-height: 1.5; }
}

@media (max-width: 400px) {
  .site-header-inner { padding: 10px 12px; }
  .brand-title { font-size: 15px; }
  .brand-subtitle { display: none; }
  .cert-form-card { padding: 16px 12px; }
  .cert-form-title { font-size: 22px !important; }
}
