/* ===================================================
   PrintCalc — style.css
   Modern professional design (Stripe / Linear / Vercel inspired)
   All calculations run client-side; no external CSS frameworks.
   =================================================== */

/* 1. DESIGN TOKENS */
:root {
  --bg:           #f8fafc;
  --surface:      #ffffff;
  --border:       #e2e8f0;
  --text-1:       #0f172a;
  --text-2:       #475569;
  --text-3:       #94a3b8;
  --brand:        #6366f1;
  --brand-dark:   #4f46e5;
  --brand-bg:     #eef2ff;
  --success:      #059669;
  --success-bg:   #ecfdf5;
  --r-sm:   8px;
  --r:      12px;
  --r-lg:   16px;
  --r-xl:   24px;
  --shadow-sm: 0 1px 2px rgba(0,0,0,.04);
  --shadow:    0 2px 8px rgba(0,0,0,.07);
  --shadow-md: 0 4px 20px rgba(0,0,0,.10);
  --shadow-lg: 0 8px 32px rgba(0,0,0,.12);
}

/* 2. RESET */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto,
               'Helvetica Neue', Arial, sans-serif;
  background: var(--bg);
  color: var(--text-1);
  line-height: 1.6;
  font-size: 16px;
}
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; display: block; }
button { font-family: inherit; }

/* 3. LAYOUT CONTAINERS */
.wrap    { max-width: 1100px; margin: 0 auto; padding: 0 24px; }
.wrap-sm { max-width:  760px; margin: 0 auto; padding: 0 24px; }

/* ─── HEADER ─────────────────────────────────────── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  gap: 16px;
}

/* ─── LOGO ───────────────────────────────────────── */
.logo {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -.5px;
  color: var(--text-1);
  flex-shrink: 0;
}
.logo span { color: var(--brand); }
.logo:hover { text-decoration: none; }

/* ─── NAV ────────────────────────────────────────── */
.nav-main { display: flex; align-items: center; gap: 2px; }
.nav-main a {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-2);
  padding: 6px 12px;
  border-radius: var(--r-sm);
  transition: background .15s, color .15s;
  white-space: nowrap;
}
.nav-main a:hover { background: var(--bg); color: var(--text-1); text-decoration: none; }

.menu-toggle {
  display: none;
  background: none;
  border: 1.5px solid var(--border);
  border-radius: var(--r-sm);
  width: 38px; height: 38px;
  cursor: pointer;
  font-size: 18px;
  color: var(--text-2);
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: border-color .15s, color .15s;
}
.menu-toggle:hover { border-color: var(--brand); color: var(--brand); }

/* ─── BREADCRUMB ─────────────────────────────────── */
.breadcrumb {
  font-size: 13px;
  color: var(--text-3);
  padding: 20px 0 0;
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.breadcrumb a { color: var(--text-3); }
.breadcrumb a:hover { color: var(--brand); text-decoration: none; }
.breadcrumb-sep { font-size: 11px; }

/* ─── HERO (HOME PAGE) ───────────────────────────── */
.hero {
  padding: 88px 24px 80px;
  text-align: center;
  background: linear-gradient(180deg, #fff 0%, var(--bg) 100%);
  border-bottom: 1px solid var(--border);
}
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--brand-bg);
  color: var(--brand);
  font-size: 13px;
  font-weight: 600;
  padding: 5px 14px;
  border-radius: 999px;
  margin-bottom: 28px;
  border: 1px solid rgba(99,102,241,.25);
}
.hero h1 {
  font-size: clamp(36px, 6vw, 62px);
  font-weight: 800;
  letter-spacing: -2.5px;
  line-height: 1.08;
  color: var(--text-1);
  margin-bottom: 22px;
}
.hero h1 em {
  font-style: normal;
  background: linear-gradient(135deg, var(--brand) 0%, #a78bfa 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero-lead {
  font-size: 18px;
  color: var(--text-2);
  max-width: 540px;
  margin: 0 auto 36px;
  line-height: 1.65;
}
.hero-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
}
.hero-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 7px 16px;
  font-size: 14px;
  color: var(--text-2);
  font-weight: 500;
  box-shadow: var(--shadow-sm);
}

/* ─── SECTIONS ───────────────────────────────────── */
.section     { padding: 64px 0; }
.section-alt {
  background: var(--surface);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.section-label {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--brand);
  margin-bottom: 8px;
}
.section-title {
  font-size: clamp(22px, 3vw, 32px);
  font-weight: 700;
  letter-spacing: -.5px;
  color: var(--text-1);
  margin-bottom: 10px;
  line-height: 1.2;
}
.section-sub {
  font-size: 16px;
  color: var(--text-2);
  max-width: 480px;
  line-height: 1.65;
}

/* ─── CALCULATOR LINK CARDS (home / category) ─────── */
.calc-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
  margin-top: 32px;
}
.calc-card {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--r-lg);
  padding: 20px;
  color: var(--text-1);
  transition: border-color .2s, box-shadow .2s, transform .15s;
}
.calc-card:hover {
  border-color: var(--brand);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
  text-decoration: none;
}
.calc-card-icon {
  width: 40px; height: 40px;
  background: var(--brand-bg);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  margin-bottom: 12px;
  flex-shrink: 0;
}
.calc-card-name {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-1);
  margin-bottom: 6px;
  line-height: 1.35;
}
.calc-card-desc {
  font-size: 13px;
  color: var(--text-2);
  line-height: 1.5;
  flex-grow: 1;
}
.calc-card-tag {
  display: inline-block;
  margin-top: 14px;
  font-size: 11px;
  font-weight: 600;
  color: var(--brand);
  background: var(--brand-bg);
  padding: 3px 8px;
  border-radius: 6px;
  text-transform: uppercase;
  letter-spacing: .5px;
  align-self: flex-start;
}

/* ─── CATEGORY CARDS ─────────────────────────────── */
.cat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
  margin-top: 32px;
}
.cat-card {
  display: block;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--r-xl);
  padding: 28px 24px;
  transition: border-color .2s, box-shadow .2s, transform .15s;
}
.cat-card:hover {
  border-color: var(--brand);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
  text-decoration: none;
}
.cat-icon  { font-size: 32px; margin-bottom: 14px; display: block; line-height: 1; }
.cat-name  { font-size: 17px; font-weight: 700; color: var(--text-1); margin-bottom: 6px; }
.cat-desc  { font-size: 13.5px; color: var(--text-2); line-height: 1.55; margin-bottom: 14px; }
.cat-count {
  font-size: 12px;
  font-weight: 600;
  color: var(--brand);
  background: var(--brand-bg);
  padding: 3px 10px;
  border-radius: 999px;
  display: inline-block;
}

/* ─── FEATURES / BENEFITS ────────────────────────── */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 28px;
  margin-top: 40px;
}
.feature { display: flex; gap: 16px; }
.feature-icon {
  width: 44px; height: 44px;
  background: var(--brand-bg);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  flex-shrink: 0;
}
.feature-title { font-size: 15px; font-weight: 600; margin-bottom: 4px; color: var(--text-1); }
.feature-desc  { font-size: 14px; color: var(--text-2); line-height: 1.6; }

/* ─── MAIN CONTENT AREA ──────────────────────────── */
main { padding: 0 0 80px; }

/* ─── PAGE HEADER (calc & category pages) ─────────── */
.page-header { padding: 0 0 32px; }
.page-title {
  font-size: clamp(26px, 4vw, 42px);
  font-weight: 800;
  letter-spacing: -1px;
  line-height: 1.12;
  margin: 10px 0 14px;
  color: var(--text-1);
}
.page-lead {
  font-size: 17px;
  color: var(--text-2);
  line-height: 1.65;
  max-width: 600px;
}

/* ─── CALCULATOR TOOL (2-column layout) ──────────── */
.calc-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin: 28px 0 40px;
  align-items: start;
}
.calc-panel {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--r-xl);
  padding: 28px;
  box-shadow: var(--shadow-sm);
}
.calc-panel-title {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--text-3);
  margin-bottom: 22px;
}

/* Form fields */
.field { margin-bottom: 16px; }
.field label {
  display: block;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-1);
  margin-bottom: 7px;
}
.field label .unit {
  font-weight: 400;
  color: var(--text-3);
  font-size: 13px;
}
.field input, .field select {
  width: 100%;
  height: 46px;
  padding: 0 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--r-sm);
  font-size: 15px;
  background: var(--bg);
  color: var(--text-1);
  transition: border-color .2s, box-shadow .2s, background .15s;
  outline: none;
  appearance: none;
  -webkit-appearance: none;
}
.field input:focus, .field select:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(99,102,241,.12);
  background: #fff;
}
.field input:hover:not(:focus), .field select:hover:not(:focus) {
  border-color: #aab4c8;
}
.btn-calc {
  width: 100%;
  height: 50px;
  background: var(--brand);
  color: #fff;
  border: none;
  border-radius: var(--r-sm);
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: background .2s, transform .1s, box-shadow .2s;
  margin-top: 22px;
  letter-spacing: .1px;
  box-shadow: 0 2px 8px rgba(99,102,241,.30);
}
.btn-calc:hover  { background: var(--brand-dark); box-shadow: 0 4px 14px rgba(99,102,241,.40); }
.btn-calc:active { transform: scale(.99); }

/* Result panel states */
.result-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 200px;
  text-align: center;
  color: var(--text-3);
  gap: 10px;
}
.result-empty-icon { font-size: 40px; opacity: .55; }
.result-empty p    { font-size: 14px; }

.result-big {
  font-size: 52px;
  font-weight: 800;
  letter-spacing: -2.5px;
  color: var(--success);
  line-height: 1;
  margin-bottom: 6px;
}
.result-sub {
  font-size: 14px;
  color: var(--text-2);
  margin-bottom: 28px;
}
.result-table { width: 100%; border-collapse: collapse; }
.result-table tr { border-bottom: 1px solid var(--border); }
.result-table tr:last-child { border-bottom: none; }
.result-table td {
  padding: 10px 0;
  font-size: 14px;
  color: var(--text-2);
}
.result-table td:last-child {
  text-align: right;
  font-weight: 600;
  color: var(--text-1);
}
.result-table tr.total td { font-weight: 700; color: var(--text-1); font-size: 15px; }
.result-note {
  font-size: 12px;
  color: var(--text-3);
  margin-top: 16px;
  line-height: 1.6;
  border-top: 1px solid var(--border);
  padding-top: 14px;
}

/* ─── AD SLOT ────────────────────────────────────── */
.ad-slot {
  background: repeating-linear-gradient(
    45deg, #f1f5f9, #f1f5f9 8px, #e8edf5 8px, #e8edf5 16px
  );
  border: 1px dashed #cbd5e1;
  border-radius: var(--r);
  text-align: center;
  padding: 22px;
  color: #94a3b8;
  font-size: 12px;
  margin: 24px 0;
  letter-spacing: .3px;
}

/* ─── CONTENT / ARTICLE ──────────────────────────── */
.content { max-width: 680px; }
.content h2 {
  font-size: 20px;
  font-weight: 700;
  margin: 36px 0 10px;
  color: var(--text-1);
  letter-spacing: -.3px;
}
.content h3  { font-size: 16px; font-weight: 600; margin: 24px 0 8px; color: var(--text-1); }
.content p   { font-size: 15.5px; color: var(--text-2); line-height: 1.75; margin-bottom: 12px; }
.content ul, .content ol { padding-left: 22px; margin-bottom: 14px; }
.content li  { font-size: 15.5px; color: var(--text-2); line-height: 1.75; margin-bottom: 4px; }
.content a   { color: var(--brand); font-weight: 500; }
.content code {
  font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
  font-size: 13px;
  background: var(--brand-bg);
  color: var(--brand-dark);
  padding: 2px 6px;
  border-radius: 4px;
}

/* ─── FAQ ACCORDION ──────────────────────────────── */
.faq-section { margin: 8px 0 48px; }
.faq-section > h2 {
  font-size: 22px;
  font-weight: 700;
  margin: 0 0 20px;
  color: var(--text-1);
}
.faq-item {
  border: 1.5px solid var(--border);
  border-radius: var(--r);
  margin-bottom: 8px;
  overflow: hidden;
  background: var(--surface);
  transition: border-color .2s;
}
.faq-item[open]   { border-color: var(--brand); }
.faq-item summary {
  list-style: none;
  padding: 16px 20px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  user-select: none;
  color: var(--text-1);
  gap: 12px;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: '+';
  font-size: 22px;
  font-weight: 300;
  color: var(--text-3);
  flex-shrink: 0;
  line-height: 1;
  transition: color .15s;
}
.faq-item[open] summary         { color: var(--brand); }
.faq-item[open] summary::after  { content: '−'; color: var(--brand); }
.faq-body {
  padding: 0 20px 18px;
  font-size: 14.5px;
  color: var(--text-2);
  line-height: 1.75;
}

/* ─── AFFILIATE BOX ──────────────────────────────── */
.aff-box {
  background: #fffbeb;
  border: 1.5px solid #fde68a;
  border-radius: var(--r);
  padding: 14px 18px;
  margin: 24px 0;
  font-size: 14px;
  color: #78350f;
  line-height: 1.6;
}
.aff-box strong { color: #92400e; }

/* ─── RELATED CALCULATORS ────────────────────────── */
.related-section { margin-top: 48px; }
.related-section h2 {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 18px;
  color: var(--text-1);
}
.related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 12px;
}
.related-card {
  display: block;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--r);
  padding: 16px;
  color: var(--text-1);
  transition: border-color .2s, box-shadow .15s, transform .15s;
}
.related-card:hover {
  border-color: var(--brand);
  box-shadow: var(--shadow);
  transform: translateY(-1px);
  text-decoration: none;
}
.related-card-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-1);
  margin-bottom: 5px;
  line-height: 1.35;
}
.related-card-desc {
  font-size: 12.5px;
  color: var(--text-2);
  line-height: 1.5;
}

/* ─── FOOTER ─────────────────────────────────────── */
.site-footer {
  background: #0f172a;
  color: #94a3b8;
  padding: 56px 0 32px;
  margin-top: 40px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 48px;
}
.footer-brand .logo { color: #f1f5f9; }
.footer-brand p { font-size: 14px; margin-top: 12px; line-height: 1.65; color: #64748b; }
.footer-col h4 {
  font-size: 12px;
  font-weight: 700;
  color: #e2e8f0;
  margin-bottom: 14px;
  text-transform: uppercase;
  letter-spacing: .8px;
}
.footer-col a { display: block; font-size: 14px; color: #64748b; margin-bottom: 9px; transition: color .15s; }
.footer-col a:hover { color: #e2e8f0; text-decoration: none; }
.footer-bottom {
  border-top: 1px solid #1e293b;
  padding-top: 28px;
  font-size: 13px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  color: #475569;
}
.footer-bottom a { color: #475569; margin-left: 16px; transition: color .15s; }
.footer-bottom a:hover { color: #94a3b8; text-decoration: none; }

/* ─── LEGAL PAGES ────────────────────────────────── */
.legal-content { max-width: 760px; padding: 40px 0 80px; }
.legal-content h1 {
  font-size: 32px;
  font-weight: 800;
  letter-spacing: -.5px;
  margin-bottom: 8px;
  color: var(--text-1);
}
.legal-content .updated { font-size: 14px; color: var(--text-3); margin-bottom: 32px; }
.legal-content h2 { font-size: 18px; font-weight: 700; margin: 32px 0 10px; color: var(--text-1); }
.legal-content p, .legal-content li {
  font-size: 15px;
  color: var(--text-2);
  line-height: 1.75;
  margin-bottom: 10px;
}
.legal-content ul { padding-left: 20px; margin-bottom: 16px; }

/* ─── RESPONSIVE ─────────────────────────────────── */
@media (max-width: 900px) {
  .footer-grid  { grid-template-columns: 1fr 1fr; gap: 32px; }
  .calc-layout  { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  .nav-main { display: none; }
  .nav-main.open {
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 64px;
    left: 0;
    right: 0;
    background: #fff;
    border-bottom: 1px solid var(--border);
    padding: 12px 20px 20px;
    box-shadow: var(--shadow-md);
    gap: 2px;
    z-index: 99;
  }
  .nav-main.open a { padding: 10px 14px; font-size: 15px; border-radius: var(--r-sm); }
  .menu-toggle { display: flex; }
  .hero         { padding: 56px 24px 64px; }
  .hero h1      { letter-spacing: -1.5px; }
  .hero-lead    { font-size: 16px; }
  .section      { padding: 48px 0; }
  .cat-grid     { grid-template-columns: 1fr 1fr; }
  .footer-grid  { grid-template-columns: 1fr; gap: 28px; }
  .footer-bottom { flex-direction: column; text-align: center; gap: 16px; }
  .footer-bottom a { margin-left: 0; margin-right: 12px; }
  .calc-panel   { padding: 22px 18px; }
  .result-big   { font-size: 42px; }
}

@media (max-width: 480px) {
  .wrap    { padding: 0 16px; }
  .wrap-sm { padding: 0 16px; }
  .hero h1 { font-size: 32px; letter-spacing: -1px; }
  .hero-pills  { flex-direction: column; align-items: center; }
  .cat-grid    { grid-template-columns: 1fr; }
  .calc-grid   { grid-template-columns: 1fr; }
  .related-grid { grid-template-columns: 1fr; }
}
