/* Zolvo.net — shared stylesheet */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  /* ── Zolvo brand palette ─────────────────────────────────── */
  --primary:   #34495E;   /* Primary Blue  — nav, titles, logo, body text  */
  --primary-h: #2c3e50;   /* Primary Blue hover / darker                   */
  --accent:    #829A8E;   /* Accent Green  — CTA buttons, active states     */
  --accent-h:  #6d8880;   /* Accent Green hover                             */
  --mint:      #A3B1AA;   /* Mint Grey     — secondary buttons, hover       */
  --bg:        #F9F8F3;   /* Soft Ivory    — main background                */
  --card:      #ffffff;   /* White cards   — contrast against ivory bg      */
  --border:    #dde3e0;   /* Warm-neutral border                            */
  --text:      #34495E;   /* Primary Blue  — body text                      */
  --muted:     #707B7C;   /* Slate Grey    — meta, footers, labels          */
  --success:   #829A8E;   /* Accent Green  — success / positive states      */
  /* ── Accent tints (for result boxes, gradients, badges) ─── */
  --accent-bg: #eef1f0;   /* Very light mint — result box backgrounds       */
  --accent-bd: #c5d0cd;   /* Muted mint border                              */
  /* ── Misc ──────────────────────────────────────────────── */
  --radius:    10px;
  --shadow:    0 1px 3px rgba(0,0,0,.07), 0 4px 16px rgba(0,0,0,.05);
  --shadow-lg: 0 20px 50px rgba(52, 73, 94, 0.12);
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
}

/* ── Layout ────────────────────────────────────────────────── */
.site-header {
  background: var(--primary);
  border-bottom: 1px solid var(--primary-h);
  padding: .75rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.site-logo { font-weight: 700; font-size: 1.15rem; color: #ffffff; text-decoration: none; letter-spacing: .01em; }
.site-logo span { color: var(--mint); }

.site-brand { display: flex; align-items: center; gap: 1rem; }
.site-tagline { display: flex; flex-direction: column; justify-content: center; line-height: 1.3; }
.site-tagline-title { color: #ffffff; font-weight: 700; font-size: .9rem; }
.site-tagline-sub { color: var(--mint); font-size: .75rem; }
@media (max-width: 700px) {
  .site-tagline { display: none; }
}

.page-wrapper { max-width: 860px; margin: 0 auto; padding: 2rem 1.25rem 4rem; }

.page-title { font-size: 1.75rem; font-weight: 700; margin-bottom: .5rem; line-height: 1.25; color: var(--primary); }
.page-intro  { color: var(--muted); margin-bottom: 1.75rem; max-width: 640px; }

/* ── Card ───────────────────────────────────────────────────── */
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow);
  margin-bottom: 1.5rem;
}
.card-title { font-size: .78rem; font-weight: 600; margin-bottom: 1rem; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }

/* ── Form elements ──────────────────────────────────────────── */
.input-row { display: flex; gap: .75rem; align-items: flex-end; flex-wrap: wrap; }
.field { display: flex; flex-direction: column; gap: .35rem; flex: 1; min-width: 140px; }
.field label { font-size: .85rem; font-weight: 500; color: var(--muted); }

input[type="number"], input[type="text"], input[type="date"], input[type="time"],
select, textarea {
  width: 100%;
  padding: .6rem .85rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 1rem;
  background: var(--bg);
  color: var(--text);
  transition: border-color .15s;
}
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(130,154,142,.18);
}
textarea { resize: vertical; min-height: 120px; font-family: "SFMono-Regular", Consolas, monospace; font-size: .9rem; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .4rem;
  padding: .65rem 1.25rem;
  border: none; border-radius: 8px; cursor: pointer;
  font-size: .95rem; font-weight: 600; transition: background .15s, transform .15s, box-shadow .15s;
  text-decoration: none;
}
.btn-primary { background: var(--accent); color: #fff; box-shadow: 0 10px 24px rgba(130,154,142,.32); }
.btn-primary:hover { background: var(--accent-h); transform: translateY(-1px); box-shadow: 0 14px 28px rgba(130,154,142,.38); }
.btn-secondary { background: var(--border); color: var(--text); box-shadow: none; }
.btn-secondary:hover { background: var(--mint); color: #fff; }
.btn:active { transform: scale(.97); }
.btn-lg { padding: .8rem 1.75rem; font-size: 1rem; }

/* ── Result display ─────────────────────────────────────────── */
.result-box {
  background: var(--accent-bg);
  border: 1px solid var(--accent-bd);
  border-radius: 8px;
  padding: 1.1rem 1.25rem;
  margin-top: 1rem;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary);
}
.result-box .result-label { font-size: .8rem; font-weight: 500; color: var(--muted); display: block; margin-bottom: .15rem; }

/* ── Tables ─────────────────────────────────────────────────── */
.ref-table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.ref-table th { text-align: left; padding: .55rem .75rem; font-weight: 600; background: var(--bg); border-bottom: 2px solid var(--border); color: var(--primary); }
.ref-table td { padding: .5rem .75rem; border-bottom: 1px solid var(--border); }
.ref-table tr:last-child td { border-bottom: none; }
.ref-table tr:hover td { background: var(--accent-bg); }

/* ── Tabs ───────────────────────────────────────────────────── */
.tab-bar { display: flex; gap: 0; border-bottom: 2px solid var(--border); margin-bottom: 1rem; overflow-x: auto; }
.tab-btn {
  padding: .55rem 1rem; border: none; background: none; cursor: pointer;
  font-size: .9rem; font-weight: 500; color: var(--muted);
  border-bottom: 2px solid transparent; margin-bottom: -2px;
  white-space: nowrap;
}
.tab-btn.active { color: var(--accent); border-bottom-color: var(--accent); }
.tab-panel { display: none; }
.tab-panel.active { display: block; }

/* ── Code blocks ────────────────────────────────────────────── */
pre {
  background: #0f172a;
  color: #e2e8f0;
  border-radius: 8px;
  padding: 1.1rem 1.25rem;
  overflow-x: auto;
  font-size: .85rem;
  line-height: 1.6;
}
code { font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace; }

/* ── Tool hero (converter pages) ─────────────────────────────── */
.tool-hero { text-align: center; margin-bottom: 1.75rem; }
.tool-eyebrow {
  display: inline-flex;
  margin-bottom: .85rem;
  padding: .4rem .85rem;
  border-radius: 999px;
  background: var(--accent-bg);
  color: var(--accent-h);
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.tool-hero .page-title {
  font-size: clamp(1.9rem, 5vw, 2.75rem);
  letter-spacing: -.02em;
  line-height: 1.08;
}
.tool-hero .page-intro {
  max-width: 620px;
  margin: .9rem auto 0;
  font-size: 1.05rem;
}

/* ── Homepage hero CTA ────────────────────────────────────────── */
.home-hero-cta {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  padding: 1.75rem 2rem;
  border-radius: 20px;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-h) 100%);
  color: #fff;
  text-decoration: none;
  box-shadow: var(--shadow-lg);
  margin-bottom: .85rem;
  transition: transform .2s ease, box-shadow .2s ease;
}
.home-hero-cta:hover {
  transform: translateY(-3px);
  box-shadow: 0 24px 56px rgba(130,154,142,.4);
}
.home-hero-cta-icon {
  flex-shrink: 0;
  width: 64px; height: 64px;
  border-radius: 16px;
  background: rgba(255,255,255,.18);
  display: grid; place-items: center;
}
.home-hero-cta-text { flex: 1; display: flex; flex-direction: column; gap: .35rem; }
.home-hero-cta-title { font-size: 1.4rem; font-weight: 800; letter-spacing: -.01em; }
.home-hero-cta-sub { font-size: .92rem; opacity: .92; line-height: 1.5; }
.home-hero-cta-arrow { font-size: 1.75rem; font-weight: 700; flex-shrink: 0; transition: transform .2s ease; }
.home-hero-cta:hover .home-hero-cta-arrow { transform: translateX(4px); }

.home-more-to-come {
  text-align: center;
  color: var(--muted);
  font-size: .9rem;
  font-style: italic;
  margin: 0 0 1.75rem;
}

@media (max-width: 600px) {
  .home-hero-cta { flex-direction: column; text-align: center; padding: 1.5rem; }
  .home-hero-cta-arrow { display: none; }
}

/* ── Converter card (unified upload + options "machine") ─────── */
.converter-card {
  padding: .85rem;
  border-radius: 24px;
  background: var(--card);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-lg);
  margin-bottom: 1.5rem;
}

/* ── Upload / image converters ──────────────────────────────── */
.drop-zone {
  border: 2px dashed var(--border); border-radius: calc(var(--radius) + 8px);
  padding: 2.5rem 1.5rem; text-align: center; cursor: pointer;
  min-height: 230px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .65rem;
  background: radial-gradient(circle at top, var(--accent-bg) 0%, transparent 60%), var(--bg);
  transition: transform .18s ease, border-color .18s ease, background .2s;
  position: relative;
}
.drop-zone:hover {
  transform: translateY(-2px);
  border-color: var(--accent);
}
@keyframes pulse-drop {
  0% { box-shadow: 0 0 0 0 rgba(130,154,142, 0.4); }
  70% { box-shadow: 0 0 0 15px rgba(130,154,142, 0); }
  100% { box-shadow: 0 0 0 0 rgba(130,154,142, 0); }
}
.drop-zone.drag-over {
  border-color: var(--accent);
  background: var(--accent-bg);
  animation: pulse-drop 1.5s infinite;
  transform: scale(1.02);
}
.drop-zone input[type="file"] { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; height: 100%; }
.drop-zone .dz-icon {
  width: 64px; height: 64px;
  border-radius: 16px;
  display: grid; place-items: center;
  background: var(--card);
  color: var(--accent);
  box-shadow: 0 10px 24px rgba(130,154,142,.3);
}
.drop-zone .dz-title { font-size: 1.25rem; font-weight: 700; letter-spacing: -.01em; color: var(--text); }
.drop-zone .dz-sub { max-width: 380px; color: var(--muted); font-size: .92rem; line-height: 1.5; }

/* ── Conversion options grid + actions ───────────────────────── */
.options-panel {
  border-top: 1px solid var(--border);
  margin-top: 1rem;
  padding: 1.1rem .65rem 0;
}
.options-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: .85rem;
}
.options-grid .field label {
  font-size: .72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .06em;
}
.field-checkbox {
  flex-direction: row !important;
  align-items: center;
  justify-content: flex-start;
  gap: .5rem !important;
  padding-bottom: .35rem;
}
.actions {
  display: flex;
  justify-content: flex-end;
  gap: .6rem;
  margin-top: 1.25rem;
  flex-wrap: wrap;
}
@media (max-width: 600px) {
  .actions { flex-direction: column-reverse; }
  .actions .btn { width: 100%; justify-content: center; }
}

.preview-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 1rem; margin-top: 1rem; }
.preview-item { border: 1px solid var(--border); border-radius: 8px; overflow: hidden; }
.preview-item img { width: 100%; display: block; max-height: 160px; object-fit: cover; }
.preview-item .pi-foot { padding: .4rem .6rem; font-size: .78rem; color: var(--muted); display: flex; justify-content: space-between; align-items: center; }
.preview-item .pi-foot a { color: var(--accent); text-decoration: none; font-weight: 600; }

/* ── AdSense placeholders ───────────────────────────────────── */
.ad-slot { min-height: 90px; background: var(--bg); border: 1px dashed var(--border); border-radius: 6px; display: flex; align-items: center; justify-content: center; color: var(--mint); font-size: .8rem; margin: 1.5rem 0; }

/* ── Footer ─────────────────────────────────────────────────── */
.site-footer { border-top: 1px solid var(--border); padding: 1.5rem; text-align: center; color: var(--muted); font-size: .85rem; margin-top: 3rem; }
.site-footer a { color: var(--muted); }

/* ── Responsive ─────────────────────────────────────────────── */
@media (max-width: 600px) {
  .page-title { font-size: 1.35rem; }
  .input-row { flex-direction: column; }
}

/* Card title overrides for semantic hierarchy alignment */
h2.card-title {
  font-size: .85rem;
  font-weight: 600;
  margin-bottom: 1rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .05em;
  border-bottom: 1px solid var(--border);
  padding-bottom: 0.5rem;
}

/* Subtle visual queue for conversions in progress */
.preview-item {
  transition: transform 0.2s, box-shadow 0.2s;
}
.preview-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.06);
}

/* Responsive updates for mobile converters */
@media (max-width: 480px) {
  .preview-grid {
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  }
}

/* ── Format info / glossary blocks (spoke pages) ────────────── */
.format-info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
}
.format-info-block h3 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: .75rem;
  padding-bottom: .35rem;
  border-bottom: 1px solid var(--border);
}
.format-info-item {
  font-size: .88rem;
  color: var(--text);
  line-height: 1.6;
  margin-bottom: .6rem;
}
.format-info-item strong { color: var(--primary); }

/* ── Legal / long-form content pages ────────────────────────── */
.legal-content h2 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--primary);
  margin: 1.5rem 0 .6rem;
}
.legal-content h2:first-child { margin-top: 0; }
.legal-content h3 {
  font-size: .98rem;
  font-weight: 600;
  color: var(--primary);
  margin: 1.1rem 0 .4rem;
}
.legal-content p, .legal-content li {
  font-size: .92rem;
  color: var(--text);
  line-height: 1.7;
  margin-bottom: .6rem;
}
.legal-content ul { padding-left: 1.4rem; margin-bottom: .8rem; }
.legal-content a { color: var(--accent); }

/* ── Contact form ────────────────────────────────────────────── */
.contact-status { margin-top: 1rem; font-size: .9rem; font-weight: 600; min-height: 1.2em; }
.contact-status.success { color: var(--success); }
.contact-status.error { color: #c0392b; }
.visually-hidden {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* ── Converter preset chips ──────────────────────────────────── */
.preset-row { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; margin-top: 1.25rem; }
.preset-label { font-size: .8rem; font-weight: 600; color: var(--muted); margin-right: .25rem; }
.preset-chip {
  padding: .35rem .7rem; border: 1px solid var(--border); border-radius: 999px;
  background: var(--card); color: var(--text); font-size: .8rem; font-weight: 600;
  cursor: pointer; transition: background .15s, border-color .15s, color .15s;
}
.preset-chip:hover { border-color: var(--accent); color: var(--accent); }
.preset-chip.active { background: var(--accent); border-color: var(--accent); color: #fff; }

/* ── Format guide (/formats/) ────────────────────────────────── */
.crumbs { font-size: .82rem; color: var(--muted); margin-bottom: 1rem; display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--accent); text-decoration: underline; }
.crumbs [aria-current] { color: var(--text); font-weight: 600; }

/* "At a glance" definition list */
.glossary-list { display: grid; gap: .9rem; }
.glossary-item dt { font-size: .88rem; font-weight: 700; color: var(--primary); margin-bottom: .15rem; }
.glossary-item dd { font-size: .92rem; line-height: 1.6; color: var(--text); }

/* Specification table — label column reads as a header, not a data cell */
.spec-table th[scope="row"] {
  width: 38%; background: transparent; border-bottom: 1px solid var(--border);
  font-weight: 600; color: var(--muted); vertical-align: top; white-space: normal;
}
.spec-table tr:last-child th { border-bottom: none; }
.spec-table td { vertical-align: top; }

/* Long-form article body */
.format-article h2 {
  font-size: 1.18rem; font-weight: 700; color: var(--primary);
  margin: 1.8rem 0 .7rem; line-height: 1.35;
}
.format-article h2:first-child { margin-top: 0; }
.format-article p { font-size: .96rem; line-height: 1.72; margin-bottom: .9rem; }
.format-article p:last-child { margin-bottom: 0; }
.format-article em { font-style: normal; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .9em; background: var(--accent-bg); padding: .05em .35em; border-radius: 4px; }

/* Converter cross-links */
.convert-cta p,
.convert-cta-intro { font-size: .93rem; line-height: 1.65; color: var(--muted); margin-bottom: 1rem; }
.convert-chips { display: flex; flex-wrap: wrap; gap: .5rem; }
.convert-chip {
  padding: .45rem .9rem; border: 1px solid var(--accent-bd); border-radius: 999px;
  background: var(--accent-bg); color: var(--primary); font-size: .84rem; font-weight: 600;
  text-decoration: none; transition: background .15s, border-color .15s, color .15s;
}
.convert-chip:hover { background: var(--accent); border-color: var(--accent); color: #fff; }

/* FAQ */
.faq-list { display: grid; gap: 1.1rem; }
.faq-item h3 { font-size: .97rem; font-weight: 600; color: var(--text); margin-bottom: .3rem; }
.faq-item p { font-size: .9rem; line-height: 1.62; color: var(--muted); }

/* Related formats */
.related-formats { list-style: none; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: .5rem; }
.related-formats a { color: var(--accent); text-decoration: none; font-size: .9rem; font-weight: 600; }
.related-formats a:hover { text-decoration: underline; }
.related-all { margin-top: 1rem; font-size: .87rem; }
.related-all a { color: var(--muted); text-decoration: none; }
.related-all a:hover { color: var(--accent); }

/* Index page cards */
.format-index-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: .85rem; }
.format-index-item {
  display: flex; flex-direction: column; gap: .3rem; padding: 1rem 1.1rem;
  border: 1px solid var(--border); border-radius: 10px; background: var(--bg);
  text-decoration: none; color: var(--text); transition: border-color .15s, box-shadow .15s, transform .15s;
}
.format-index-item:hover { border-color: var(--accent); box-shadow: var(--shadow); transform: translateY(-2px); }
.format-index-code { font-size: .72rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--accent); }
.format-index-title { font-size: .98rem; font-weight: 700; color: var(--primary); }
.format-index-intro { font-size: .85rem; line-height: 1.55; color: var(--muted); }

@media (max-width: 600px) {
  .spec-table th[scope="row"] { width: 45%; }
  .format-article h2 { font-size: 1.08rem; }
}
