/* lifinance.xyz — life insurance needs calculator
   Identity: deep slate-violet + muted sage + warm cream + soft amber
   Typography: humanist serif headlines + clean sans body
   Layout: planning-report, soft 12px cards, sage dividers */

:root {
  --slate: #3d3a5e;
  --slate-deep: #2a273f;
  --slate-soft: #6c688a;
  --sage: #9eb89e;
  --sage-soft: #c8d6c8;
  --sage-deep: #6a8a6a;
  --cream: #fbf7ee;
  --cream-deep: #f1ebda;
  --amber: #d4a574;
  --amber-deep: #b07f48;
  --line: #e3dccb;
  --text: #2c2a3a;
  --grey: #74708a;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Inter", "Helvetica Neue", "Segoe UI", system-ui, sans-serif;
  font-size: 16.5px;
  line-height: 1.7;
  color: var(--text);
  background: var(--cream);
  font-weight: 400;
}

.serif {
  font-family: "Lora", "Source Serif Pro", "Charter", "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
}

.container {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 1.4rem;
}

/* ---------- header ---------- */
.site-header {
  background: var(--cream);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 50;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.4rem;
  gap: 1rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: .85rem;
  text-decoration: none;
  color: var(--slate);
}

.brand-mark {
  width: 46px;
  height: 46px;
  display: inline-grid;
  place-items: center;
  background: var(--cream-deep);
  border-radius: 12px;
  position: relative;
}

.brand-mark .umbrella {
  position: relative;
  width: 30px;
  height: 30px;
}
.brand-mark .umbrella::before {
  content: '';
  position: absolute;
  top: 4px; left: 0;
  width: 30px; height: 14px;
  background: var(--slate);
  border-radius: 30px 30px 0 0;
}
.brand-mark .umbrella::after {
  content: '';
  position: absolute;
  top: 18px; left: 14px;
  width: 2px; height: 10px;
  background: var(--slate);
}
.brand-mark .umbrella span {
  position: absolute;
  bottom: -2px; left: 9px;
  width: 12px; height: 5px;
  border-bottom: 2px solid var(--slate);
  border-radius: 0 0 12px 12px;
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.05;
}

.brand-name {
  font-family: "Lora", "Source Serif Pro", Georgia, serif;
  font-weight: 600;
  font-size: 1.25rem;
  color: var(--slate);
  letter-spacing: -0.01em;
}

.brand-tagline {
  font-size: .72rem;
  color: var(--amber-deep);
  margin-top: 3px;
  letter-spacing: 1px;
  font-style: italic;
}

.nav {
  display: flex;
  flex-wrap: wrap;
  gap: 1.3rem;
  align-items: center;
}

.nav a {
  text-decoration: none;
  color: var(--slate);
  font-size: .92rem;
  font-weight: 500;
  transition: color .15s ease;
}

.nav a:hover { color: var(--amber-deep); }

.nav-toggle { display: none; }

@media (max-width: 920px) {
  .nav { display: none; }
  .nav.open {
    display: flex;
    position: absolute;
    top: 78px; left: 0; right: 0;
    background: var(--cream);
    border-bottom: 1px solid var(--line);
    flex-direction: column;
    padding: 1rem 1.4rem;
    gap: .8rem;
  }
  .nav-toggle {
    display: flex; flex-direction: column; gap: 4px;
    background: none; border: 1.5px solid var(--slate);
    border-radius: 10px;
    padding: 8px 10px; cursor: pointer;
  }
  .nav-toggle span { display: block; width: 22px; height: 2px; background: var(--slate); border-radius: 2px; }
}

/* ---------- hero ---------- */
.hero {
  background: linear-gradient(180deg, var(--cream-deep) 0%, var(--cream) 100%);
  padding: 3.5rem 0 3rem;
  position: relative;
}

.hero::after {
  content: '';
  position: absolute;
  bottom: 0; left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 1px;
  background: var(--sage);
}

.hero-inner { text-align: center; }

.eyebrow {
  display: inline-block;
  font-size: .78rem;
  font-weight: 500;
  color: var(--sage-deep);
  background: rgba(158, 184, 158, 0.18);
  padding: .35rem 1.1rem;
  border-radius: 999px;
  letter-spacing: .8px;
  margin-bottom: 1.3rem;
  font-style: italic;
}

.hero h1 {
  font-family: "Lora", "Source Serif Pro", Georgia, serif;
  font-weight: 500;
  font-size: clamp(2rem, 4.2vw, 3.1rem);
  line-height: 1.18;
  margin: 0 0 1rem;
  color: var(--slate);
  letter-spacing: -0.015em;
}

.hero .lead {
  max-width: 720px;
  margin: 0 auto;
  font-size: 1.08rem;
  color: var(--slate-soft);
  line-height: 1.65;
}

/* ---------- main content ---------- */
main { padding: 2.8rem 0 4rem; }

.content > section { margin-bottom: 2.6rem; }

h2 {
  font-family: "Lora", "Source Serif Pro", Georgia, serif;
  font-weight: 600;
  font-size: 1.6rem;
  color: var(--slate);
  margin: 0 0 1rem;
  letter-spacing: -0.01em;
  border-bottom: 1px solid var(--sage);
  padding-bottom: .5rem;
}

h3 {
  font-family: "Lora", "Source Serif Pro", Georgia, serif;
  font-weight: 500;
  font-size: 1.18rem;
  color: var(--slate);
  margin: 1.5rem 0 .5rem;
  font-style: italic;
}

p { margin: 0 0 1rem; }

a { color: var(--amber-deep); text-decoration: none; border-bottom: 1px solid rgba(212, 165, 116, 0.4); transition: border-color .15s ease; }
a:hover { border-bottom-color: var(--amber-deep); }

ul, ol { padding-left: 1.4rem; margin: 0 0 1rem; }
li { margin-bottom: .4rem; }

/* ---------- calculator card ---------- */
.tool-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 2.4rem 2.4rem;
  margin: 2rem 0;
  box-shadow: 0 4px 24px rgba(61, 58, 94, 0.06), 0 1px 3px rgba(61, 58, 94, 0.04);
}

.tool-card h2 {
  text-align: center;
  border-bottom: none;
  padding-bottom: 0;
  position: relative;
  margin-bottom: .5rem;
}

.tool-card h2::after {
  content: '';
  display: block;
  width: 50px;
  height: 1px;
  background: var(--amber);
  margin: .8rem auto 0;
}

.tool-subtitle {
  text-align: center;
  color: var(--grey);
  margin-bottom: 1.8rem;
  font-size: .98rem;
  font-style: italic;
}

.method-tabs {
  display: flex;
  gap: 0;
  background: var(--cream-deep);
  padding: .35rem;
  border-radius: 12px;
  margin: 0 auto 1.8rem;
  width: fit-content;
}

.method-tab {
  padding: .6rem 1.4rem;
  font-family: inherit;
  font-size: .9rem;
  font-weight: 500;
  color: var(--slate-soft);
  background: transparent;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: all .2s ease;
}

.method-tab.active {
  background: #fff;
  color: var(--slate);
  box-shadow: 0 1px 3px rgba(61, 58, 94, 0.1);
  font-weight: 600;
}

.tool-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.2rem 1.6rem;
}

@media (max-width: 700px) { .tool-grid { grid-template-columns: 1fr; } }

.tool-grid label, .tool-grid .field {
  display: flex;
  flex-direction: column;
  font-size: .85rem;
  font-weight: 500;
  color: var(--slate);
  letter-spacing: .1px;
}

.tool-grid input, .tool-grid select {
  margin-top: .4rem;
  padding: .8rem 1rem;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 400;
  color: var(--text);
  background: var(--cream);
  border: 1.5px solid var(--line);
  border-radius: 10px;
  outline: none;
  transition: border-color .15s ease, background .15s ease;
}

.tool-grid input:focus, .tool-grid select:focus {
  border-color: var(--sage-deep);
  background: #fff;
}

.btn {
  display: inline-block;
  padding: .85rem 2rem;
  font-family: inherit;
  font-size: .98rem;
  font-weight: 500;
  letter-spacing: .3px;
  color: var(--cream);
  background: var(--slate);
  border: none;
  border-radius: 999px;
  cursor: pointer;
  text-decoration: none;
  transition: background .15s ease;
}

.btn:hover { background: var(--slate-deep); }

.tool-actions {
  display: flex;
  justify-content: center;
  gap: .8rem;
  margin-top: 1.8rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
}

.tool-actions .btn-secondary {
  background: var(--cream);
  color: var(--slate);
  border: 1.5px solid var(--slate);
}

.tool-actions .btn-secondary:hover { background: var(--cream-deep); border-color: var(--slate); color: var(--slate); }

/* ---------- result panel ---------- */
.result {
  margin-top: 2rem;
  padding: 1.8rem 1.6rem;
  background: var(--cream-deep);
  border-radius: 16px;
  border: 1px solid var(--sage-soft);
}

.result h3 {
  margin: 0 0 1.2rem;
  text-align: center;
  color: var(--slate);
  font-size: 1.05rem;
  font-style: normal;
  font-weight: 500;
  letter-spacing: 1px;
  text-transform: uppercase;
  border-bottom: 1px solid var(--sage);
  padding-bottom: .6rem;
}

.result-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
}

.result-tile {
  text-align: center;
  padding: 1.2rem .8rem;
  background: #fff;
  border-radius: 12px;
  border: 1px solid var(--line);
}

.result-tile-label {
  display: block;
  font-size: .76rem;
  color: var(--grey);
  margin-bottom: .5rem;
  letter-spacing: .8px;
  text-transform: uppercase;
  font-weight: 500;
}

.result-tile-value {
  display: block;
  font-family: "Lora", "Source Serif Pro", Georgia, serif;
  font-size: 1.55rem;
  font-weight: 600;
  color: var(--slate);
  letter-spacing: -0.02em;
}

.result-tile-value.amber { color: var(--amber-deep); }
.result-tile-value.sage { color: var(--sage-deep); }

.breakdown-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 1.2rem;
  font-size: .94rem;
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--line);
}
.breakdown-table th, .breakdown-table td {
  text-align: left;
  padding: .7rem 1rem;
  border-bottom: 1px solid var(--line);
}
.breakdown-table th {
  background: var(--slate);
  color: var(--cream);
  font-weight: 500;
  font-size: .82rem;
  letter-spacing: .5px;
  text-transform: uppercase;
}
.breakdown-table td:last-child { text-align: right; font-variant-numeric: tabular-nums; font-weight: 500; }
.breakdown-table tr:last-child td { font-weight: 700; background: var(--cream); }

/* ---------- E-E-A-T author card ---------- */
.author-card {
  background: var(--cream);
  border-left: 3px solid var(--amber);
  border-radius: 0 12px 12px 0;
  padding: 1.4rem 1.6rem;
  margin: 2rem 0;
  color: var(--slate-soft);
  font-size: .96rem;
  font-style: italic;
}

.author-card strong { color: var(--slate); font-style: normal; font-weight: 600; }

/* ---------- about/contact form card ---------- */
.form-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 2rem 2.2rem;
  margin: 1rem 0 2.5rem;
  box-shadow: 0 2px 16px rgba(61, 58, 94, 0.05);
}

.form-card label {
  display: block;
  margin-bottom: 1rem;
  font-size: .88rem;
  font-weight: 500;
  color: var(--slate);
}

.form-card input, .form-card select, .form-card textarea {
  width: 100%;
  padding: .8rem 1rem;
  font-family: inherit;
  font-size: 1rem;
  color: var(--text);
  background: var(--cream);
  border: 1.5px solid var(--line);
  border-radius: 10px;
  margin-top: .35rem;
}

.form-card input:focus, .form-card select:focus, .form-card textarea:focus {
  border-color: var(--sage-deep);
  outline: none;
  background: #fff;
}

/* ---------- tables ---------- */
.cookie-table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0 1.5rem;
  font-size: .92rem;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--line);
}

.cookie-table th, .cookie-table td {
  text-align: left;
  padding: .6rem .8rem;
  border-bottom: 1px solid var(--line);
}

.cookie-table th {
  background: var(--slate);
  color: var(--cream);
  font-weight: 500;
  font-size: .82rem;
  letter-spacing: .3px;
  text-transform: uppercase;
}

.cookie-table tr:nth-child(even) td { background: var(--cream-deep); }

.cookie-table code {
  font-family: "SF Mono", "JetBrains Mono", Consolas, monospace;
  background: var(--cream);
  padding: 1px 6px;
  border: 1px solid var(--line);
  border-radius: 3px;
  font-size: .88rem;
}

/* ---------- footer ---------- */
.site-footer {
  background: var(--slate);
  color: var(--cream-deep);
  padding: 2.6rem 0 1.4rem;
  margin-top: 3rem;
}

.site-footer .brand-name { color: var(--cream); }
.site-footer .brand-tagline { color: var(--sage); }
.site-footer .brand-mark { background: rgba(255,255,255,0.08); }
.site-footer .brand-mark .umbrella::before { background: var(--cream); }
.site-footer .brand-mark .umbrella::after { background: var(--cream); }
.site-footer .brand-mark .umbrella span { border-bottom-color: var(--cream); }

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 2rem;
  margin-bottom: 1.6rem;
}

@media (max-width: 700px) { .footer-grid { grid-template-columns: 1fr; } }

.site-footer h4 {
  font-family: "Lora", "Source Serif Pro", Georgia, serif;
  font-weight: 500;
  color: var(--sage);
  margin: 0 0 .7rem;
  font-size: 1rem;
  font-style: italic;
}

.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: .45rem; }
.site-footer a { color: var(--cream-deep); border-bottom: none; font-size: .94rem; }
.site-footer a:hover { color: var(--amber); }

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 1.2rem;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  font-size: .85rem;
  color: var(--sage);
}

.footer-bottom small a { color: var(--sage); border-bottom: none; }
