/* ============================================================
   SuiteCalculator — Design System
   shared/style.css
   Loaded by every page on the site.
   Change here → changes everywhere.
   ============================================================ */

/* ── Google Fonts ─────────────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&family=Instrument+Serif:ital@0;1&display=swap');

/* ── Variables ────────────────────────────────────────────── */
:root {
  --ink:        #111110;
  --ink-2:      #57534E;
  --ink-3:      #A8A29E;
  --paper:      #FAFAF8;
  --paper-2:    #F5F4F0;
  --line:       #E7E5E0;
  --blue:       #1A4FE8;
  --blue-dk:    #1340CC;
  --blue-soft:  #EEF2FF;
  --sans:       'Plus Jakarta Sans', sans-serif;
  --serif:      'Instrument Serif', serif;
  --r-sm:  8px;
  --r-md:  14px;
  --r-lg:  20px;
}

/* ── Reset ────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--sans);
  background: var(--paper);
  color: var(--ink);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font-family: var(--sans); }
img { display: block; max-width: 100%; }

/* ── HEADER ───────────────────────────────────────────────── */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(250,250,248,.94);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  display: flex; align-items: center;
  justify-content: space-between;
  padding: 0 16px; height: 56px; gap: 10px;
}
.logo {
  display: flex; align-items: center; gap: 8px;
  font-size: 15px; font-weight: 800;
  letter-spacing: -.3px; flex-shrink: 0;
}
.logo-mark {
  width: 28px; height: 28px;
  background: var(--ink); border-radius: 7px;
  display: flex; align-items: center; justify-content: center;
  color: var(--paper);
  font-family: var(--serif); font-style: italic; font-size: 13px;
}
.logo-suite { color: var(--ink); }
.logo-calc  { color: var(--blue); }
.main-nav   { display: none; }
.nav-link {
  font-size: 14px; font-weight: 600; color: var(--ink-2);
  padding: 6px 12px; border-radius: var(--r-sm); transition: all .15s;
}
.nav-link:hover { color: var(--ink); background: var(--paper-2); }

/* Lang dropdown */
.lang-wrap     { position: relative; flex-shrink: 0; }
.lang-btn {
  display: flex; align-items: center; gap: 5px;
  height: 32px; padding: 0 10px;
  border: 1.5px solid var(--line); border-radius: var(--r-sm);
  font-size: 13px; font-weight: 700; color: var(--ink-2);
  background: var(--paper); cursor: pointer; transition: all .15s;
}
.lang-btn:hover { border-color: var(--blue); color: var(--blue); }
.lang-chevron  { font-size: 9px; color: var(--ink-3); transition: transform .18s; }
.lang-btn.open .lang-chevron { transform: rotate(180deg); }
.lang-menu {
  display: none; position: absolute;
  top: calc(100% + 6px); right: 0;
  background: #fff; border: 1px solid var(--line);
  border-radius: var(--r-md);
  box-shadow: 0 8px 24px rgba(0,0,0,.1);
  min-width: 170px; overflow: hidden; z-index: 200;
}
.lang-menu.open { display: block; }
.lang-opt {
  display: flex; align-items: center; gap: 10px;
  padding: 11px 14px; font-size: 13px; font-weight: 600;
  color: var(--ink-2); cursor: pointer;
  transition: background .12s;
  border: none; background: none; width: 100%; text-align: left;
}
.lang-opt:hover  { background: var(--paper-2); color: var(--ink); }
.lang-opt.active { color: var(--blue); background: var(--blue-soft); }

/* Hamburger */
.hamburger {
  display: flex; flex-direction: column; gap: 4px;
  padding: 8px; background: none; border: none; cursor: pointer;
}
.hamburger span {
  display: block; width: 20px; height: 1.5px;
  background: var(--ink); border-radius: 2px;
}

/* Mobile overlay nav */
.mob-nav {
  display: none; position: fixed;
  top: 56px; left: 0; right: 0; bottom: 0;
  background: var(--paper); border-top: 1px solid var(--line);
  flex-direction: column; z-index: 99; overflow-y: auto;
}
.mob-nav.open { display: flex; }
.mob-links    { padding: 8px; }
.mob-link {
  display: block; font-size: 16px; font-weight: 600;
  color: var(--ink-2); padding: 14px 16px;
  border-radius: var(--r-sm); transition: all .15s;
}
.mob-link:hover { color: var(--ink); background: var(--paper-2); }
.mob-divider    { height: 1px; background: var(--line); margin: 4px 16px; }
.mob-lang-label {
  font-size: 11px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .08em; color: var(--ink-3); padding: 12px 16px 4px;
}
.mob-lang-opts  { padding: 0 8px 8px; }
.mob-lang-opt {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 16px; font-size: 15px; font-weight: 600;
  color: var(--ink-2); border-radius: var(--r-sm);
  cursor: pointer; transition: all .15s;
  border: none; background: none; width: 100%; text-align: left;
}
.mob-lang-opt:hover  { background: var(--paper-2); color: var(--ink); }
.mob-lang-opt.active { color: var(--blue); background: var(--blue-soft); }

/* ── PAGE WRAPPER ─────────────────────────────────────────── */
.page-wrap { padding: 0 16px; }

/* ── BREADCRUMB ───────────────────────────────────────────── */
.breadcrumb {
  display: flex; align-items: center; flex-wrap: wrap;
  gap: 4px; padding: 14px 0 0;
  font-size: 12px; color: var(--ink-3);
}
.breadcrumb a:hover { color: var(--ink); }
.breadcrumb .sep    { color: var(--line); }

/* ── CALCULATOR PAGE LAYOUT ───────────────────────────────── */
.calc-hero { margin: 16px 0 20px; }
.calc-category {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 11px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .09em;
  color: var(--blue); background: var(--blue-soft);
  padding: 3px 10px; border-radius: 99px; margin-bottom: 10px;
}
.calc-hero h1 {
  font-size: 26px; font-weight: 800;
  letter-spacing: -.5px; line-height: 1.2; margin-bottom: 8px;
}
.calc-hero p { font-size: 14px; color: var(--ink-2); line-height: 1.65; max-width: 520px; }
.calc-layout { display: flex; flex-direction: column; gap: 16px; }

/* Lang switcher (inside calculator page) */
.lang-switcher  { display: flex; gap: 6px; margin-bottom: 20px; flex-wrap: wrap; }
.lang-switch-btn {
  height: 34px; padding: 0 14px;
  border: 1.5px solid var(--line); border-radius: 99px;
  font-size: 13px; font-weight: 700; color: var(--ink-2);
  background: var(--paper); cursor: pointer; transition: all .18s;
}
.lang-switch-btn:hover  { border-color: var(--blue); color: var(--blue); }
.lang-switch-btn.active { border-color: var(--blue); background: var(--blue-soft); color: var(--blue); }

/* ── CARD ─────────────────────────────────────────────────── */
.card {
  background: #fff; border: 1px solid var(--line);
  border-radius: var(--r-lg); overflow: hidden;
}
.card-head {
  display: flex; align-items: center; gap: 10px;
  padding: 14px 16px; border-bottom: 1px solid var(--line);
}
.card-head-icon { font-size: 18px; }
.card-head h2   { font-size: 14px; font-weight: 700; }
.card-body      { padding: 16px; }

/* ── FORM ELEMENTS ────────────────────────────────────────── */
.form-row   { margin-bottom: 14px; }
.form-label {
  display: block; font-size: 12px; font-weight: 700;
  color: var(--ink-2); margin-bottom: 6px; letter-spacing: .01em;
}
.form-label .hint { font-weight: 400; color: var(--ink-3); }
.input-wrap       { position: relative; }
.input-wrap .unit {
  position: absolute; right: 13px; top: 50%; transform: translateY(-50%);
  font-size: 12px; font-weight: 600; color: var(--ink-3); pointer-events: none;
}
.form-input {
  width: 100%; height: 46px; padding: 0 44px 0 13px;
  border: 1.5px solid var(--line); border-radius: var(--r-md);
  font-size: 16px; font-weight: 600; font-family: var(--sans);
  color: var(--ink); background: var(--paper-2);
  transition: all .18s; appearance: none; -webkit-appearance: none;
}
.form-input:focus {
  outline: none; border-color: var(--blue);
  background: #fff; box-shadow: 0 0 0 3px rgba(26,79,232,.1);
}
.form-input.no-unit { padding-right: 13px; }

/* Radio group */
.radio-group    { display: flex; gap: 8px; }
.radio-opt      { flex: 1; }
.radio-opt input { display: none; }
.radio-opt label {
  display: flex; align-items: center; justify-content: center;
  height: 44px; border: 1.5px solid var(--line); border-radius: var(--r-md);
  font-size: 14px; font-weight: 600; color: var(--ink-2);
  cursor: pointer; transition: all .15s; user-select: none;
}
.radio-opt input:checked + label {
  border-color: var(--blue); background: var(--blue-soft); color: var(--blue);
}

/* Select */
.form-select {
  width: 100%; height: 46px; padding: 0 13px;
  border: 1.5px solid var(--line); border-radius: var(--r-md);
  font-size: 15px; font-weight: 500; font-family: var(--sans);
  color: var(--ink); background: var(--paper-2);
  cursor: pointer; transition: all .18s;
  appearance: none; -webkit-appearance: none;
}
.form-select:focus { outline: none; border-color: var(--blue); background: #fff; }

/* Primary button */
.calc-btn {
  width: 100%; height: 50px;
  background: var(--blue); color: #fff; border: none;
  border-radius: var(--r-md); font-size: 15px; font-weight: 700;
  cursor: pointer; transition: all .18s; margin-top: 4px;
}
.calc-btn:hover  { background: var(--blue-dk); }
.calc-btn:active { transform: scale(.99); }

/* ── RESULT BLOCK ─────────────────────────────────────────── */
.result-block {
  display: none; margin-top: 14px;
  background: var(--paper-2); border: 1px solid var(--line);
  border-radius: var(--r-md); padding: 16px;
  animation: fadeUp .22s ease;
}
.result-block.show { display: block; }
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(5px); }
  to   { opacity: 1; transform: translateY(0); }
}
.result-top   { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 6px; }
.result-value {
  font-size: 48px; font-weight: 800; letter-spacing: -2px;
  line-height: 1; font-family: var(--serif); font-style: italic;
}
.result-badge { font-size: 13px; font-weight: 700; padding: 5px 12px; border-radius: 99px; }
.result-meta  { font-size: 12px; color: var(--ink-3); margin-bottom: 14px; }
.result-tip {
  font-size: 13px; color: var(--ink-2); line-height: 1.6;
  background: var(--blue-soft);
  border-left: 3px solid var(--blue);
  border-radius: 0 var(--r-sm) var(--r-sm) 0;
  padding: 10px 14px;
}

/* ── INFO / SEO SECTION ───────────────────────────────────── */
.info-section             { margin-top: 28px; }
.info-section h2          { font-size: 18px; font-weight: 800; letter-spacing: -.3px; margin-bottom: 10px; }
.info-section h3          { font-size: 14px; font-weight: 700; margin: 18px 0 6px; }
.info-section p           { font-size: 14px; color: var(--ink-2); line-height: 1.75; margin-bottom: 10px; }
.formula-box {
  font-size: 14px; background: var(--paper-2);
  border-radius: var(--r-md); padding: 12px 14px; margin: 10px 0;
}

/* Reference table */
.ref-table                { width: 100%; border-collapse: collapse; font-size: 13px; margin: 12px 0; }
.ref-table th {
  text-align: left; font-size: 11px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .06em;
  color: var(--ink-3); padding: 8px 12px;
  background: var(--paper-2); border-bottom: 1px solid var(--line);
}
.ref-table td             { padding: 10px 12px; border-bottom: 1px solid var(--line); color: var(--ink-2); vertical-align: middle; }
.ref-table tr:last-child td { border-bottom: none; }
.ref-table tr:hover td    { background: var(--paper-2); }
.ref-table .td-num        { font-weight: 700; color: var(--ink); }
.dot {
  display: inline-block; width: 9px; height: 9px;
  border-radius: 50%; margin-right: 7px; vertical-align: middle;
}

/* ── SIDEBAR ──────────────────────────────────────────────── */
.sidebar-card {
  background: #fff; border: 1px solid var(--line);
  border-radius: var(--r-lg); padding: 16px; margin-bottom: 12px;
}
.sidebar-card h3 { font-size: 13px; font-weight: 700; margin-bottom: 12px; }
.related-list    { list-style: none; }
.related-list li { border-bottom: 1px solid var(--line); }
.related-list li:last-child { border-bottom: none; }
.related-list a {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 0; font-size: 13px; color: var(--ink-2); transition: color .15s;
}
.related-list a:hover { color: var(--blue); }
.ad-slot {
  background: var(--paper-2); border: 1.5px dashed var(--line);
  border-radius: var(--r-md); height: 200px;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  color: var(--ink-3); font-size: 11px; gap: 4px; margin-bottom: 12px;
}
.ad-slot span { font-weight: 700; text-transform: uppercase; letter-spacing: .06em; }

/* ── FOOTER ───────────────────────────────────────────────── */
.site-footer { background: var(--ink); color: rgba(255,255,255,.5); margin-top: 60px; }
.footer-inner { padding: 36px 16px 24px; }
.footer-brand { margin-bottom: 24px; }
.footer-brand .logo       { color: #fff; margin-bottom: 8px; }
.footer-brand .logo-suite { color: #fff; }
.footer-brand p           { font-size: 13px; line-height: 1.7; max-width: 280px; }
.footer-cols    { display: grid; grid-template-columns: 1fr 1fr; gap: 20px 16px; margin-bottom: 24px; }
.footer-col h4  { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; color: rgba(255,255,255,.3); margin-bottom: 10px; }
.footer-col a   { display: block; font-size: 13px; color: rgba(255,255,255,.5); margin-bottom: 7px; transition: color .15s; }
.footer-col a:hover { color: #fff; }
.footer-bottom  {
  border-top: 1px solid rgba(255,255,255,.08); padding-top: 18px;
  display: flex; flex-direction: column; gap: 10px;
}
.footer-copy  { font-size: 12px; }
.footer-legal { display: flex; flex-wrap: wrap; gap: 12px; }
.footer-legal a { font-size: 12px; color: rgba(255,255,255,.35); transition: color .15s; }
.footer-legal a:hover { color: rgba(255,255,255,.8); }

/* ── DESKTOP (768px+) ─────────────────────────────────────── */
@media (min-width: 768px) {
  .header-inner  { padding: 0 32px; height: 60px; gap: 16px; }
  .hamburger     { display: none; }
  .mob-nav       { display: none !important; }
  .main-nav      { display: flex; align-items: center; gap: 2px; flex: 1; }

  .page-wrap     { padding: 0 32px; max-width: 1120px; margin: 0 auto; }

  .calc-hero h1  { font-size: 36px; }
  .calc-layout   { flex-direction: row; align-items: start; }
  .calc-main     { flex: 1; min-width: 0; }
  .calc-sidebar  { width: 300px; flex-shrink: 0; }
  .card-body     { padding: 20px; }
  .card-head     { padding: 16px 20px; }

  .footer-inner  { padding: 48px 32px 32px; max-width: 1120px; margin: 0 auto; }
  .footer-top    { display: grid; grid-template-columns: 1.8fr 1fr 1fr 1fr; gap: 48px; margin-bottom: 32px; }
  .footer-brand  { margin-bottom: 0; }
  .footer-cols   { display: contents; }
  .footer-bottom { flex-direction: row; justify-content: space-between; align-items: center; }
}

@media (min-width: 1024px) {
  .calc-hero h1 { font-size: 42px; }
}

.site-header--calc .lang-wrap { display: none; }
}
