/* ==========================================================================
   Nestru — shared site styles (blog, policies, 404)
   Design language matched to the homepage (index.html)
   ========================================================================== */

*,*::before,*::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --brand: #DB1C0A;
  --brand-dark: #B01508;
  --brand-soft: #FFF1EF;
  --ink: #0B0B0C;
  --ink-2: #2A2A2E;
  --gray: #5C5C63;
  --gray-2: #8A8A92;
  --line: #ECEAE7;
  --line-2: #E2DFDB;
  --bg: #FFFFFF;
  --bg-warm: #FAF8F6;
  --bg-warm-2: #F4F1ED;
  --green: #1FA463;
  --radius: 18px;
  --radius-lg: 26px;
  --maxw: 1200px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

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

body {
  font-family: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 28px; }
.wrap-narrow { max-width: 760px; margin: 0 auto; padding: 0 28px; }
.wrap-media { max-width: 1000px; margin: 0 auto; padding: 0 28px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-family: inherit;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.2px;
  padding: 15px 28px;
  border-radius: 13px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease), background 0.25s var(--ease), border-color 0.25s var(--ease);
  white-space: nowrap;
}
.btn-primary {
  background: var(--brand);
  color: #fff;
  box-shadow: 0 8px 22px -8px rgba(219,28,10,0.55);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 14px 30px -10px rgba(219,28,10,0.6); }
.btn-light { background: #fff; color: var(--brand); box-shadow: 0 16px 34px -14px rgba(0,0,0,0.4); }
.btn-light:hover { transform: translateY(-2px); background: #fff; }
.btn-ghost { background: var(--bg); color: var(--ink); border-color: var(--line-2); }
.btn-ghost:hover { background: var(--bg-warm); border-color: var(--gray-2); transform: translateY(-2px); }
.btn-sm { padding: 11px 20px; font-size: 14.5px; border-radius: 11px; }

/* ---------- Nav ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255,255,255,0.78);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--line);
}
.nav-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 15px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.brand {
  font-size: 23px;
  font-weight: 800;
  letter-spacing: -0.8px;
  display: inline-flex;
  align-items: center;
}
.brand .mark { color: var(--brand); margin-left: 1px; }

/* ---------- Page hero (blog index + policy titles) ---------- */
.page-hero {
  background:
    radial-gradient(900px 460px at 78% -20%, rgba(219,28,10,0.05), transparent 60%),
    linear-gradient(180deg, #FFFDFC 0%, #FFFFFF 100%);
  border-bottom: 1px solid var(--line);
  text-align: center;
  padding: 72px 0 64px;
}
.page-hero .wrap-narrow { padding: 0 28px; }
.page-hero .eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 12.5px; font-weight: 600; letter-spacing: 0.4px;
  text-transform: uppercase; color: var(--brand);
  background: var(--brand-soft); padding: 7px 15px; border-radius: 100px;
  margin-bottom: 20px;
}
.page-hero h1 {
  font-size: clamp(32px, 5vw, 52px);
  font-weight: 700;
  letter-spacing: -1.8px;
  line-height: 1.06;
}
.page-hero-sub {
  margin: 18px auto 0;
  max-width: 600px;
  font-size: clamp(16px, 1.4vw, 19px);
  color: var(--gray);
  line-height: 1.65;
}
.page-hero .last-updated {
  margin-top: 16px;
  font-size: 14px;
  font-weight: 500;
  color: var(--gray-2);
}

/* ---------- Blog index grid ---------- */
.post-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
  padding: 64px 0 16px;
}
.post-card {
  display: flex;
  flex-direction: column;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease), border-color 0.3s var(--ease);
}
.post-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 28px 56px -30px rgba(20,12,8,0.28);
  border-color: var(--line-2);
}
.post-card-img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; background: var(--bg-warm-2); }
.post-card-body { padding: 26px 26px 28px; display: flex; flex-direction: column; flex: 1; }
.post-tag {
  align-self: flex-start;
  font-size: 11px; font-weight: 600; letter-spacing: 0.5px; text-transform: uppercase;
  color: var(--brand); background: var(--brand-soft);
  padding: 5px 11px; border-radius: 100px; margin-bottom: 16px;
}
.post-card-body h2 {
  font-size: 20px; font-weight: 700; letter-spacing: -0.5px;
  line-height: 1.25; color: var(--ink);
}
.post-card-body p { margin-top: 12px; font-size: 14.5px; color: var(--gray); line-height: 1.6; }
.post-card .read-more {
  margin-top: 20px; font-size: 14.5px; font-weight: 600; color: var(--ink);
  display: inline-flex; align-items: center; gap: 6px;
  transition: gap 0.25s var(--ease), color 0.25s var(--ease);
}
.post-card:hover .read-more { color: var(--brand); gap: 10px; }

/* ---------- Blog post article ---------- */
.breadcrumb {
  padding-top: 36px;
  font-size: 13.5px; font-weight: 500; color: var(--gray-2);
}
.breadcrumb a { color: var(--gray); transition: color 0.2s ease; }
.breadcrumb a:hover { color: var(--brand); }
.breadcrumb .sep { margin: 0 8px; color: var(--line-2); }

.post-title {
  margin-top: 22px;
  font-size: clamp(30px, 4.4vw, 46px);
  font-weight: 700; letter-spacing: -1.6px; line-height: 1.08;
}
.post-meta {
  margin-top: 18px;
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 13px; font-weight: 600; color: var(--gray-2);
}
.post-meta .dot { width: 5px; height: 5px; border-radius: 50%; background: var(--gray-2); }
.post-hero-img {
  width: 100%;
  margin: 40px auto 0;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  box-shadow: 0 30px 60px -34px rgba(20,12,8,0.3);
}

/* ---------- Long-form content (blog + policies) ---------- */
.content { padding: 48px 0 80px; }
.content > .lead {
  font-size: 19px; color: var(--ink-2); line-height: 1.7; font-weight: 400;
  padding: 22px 26px; margin-bottom: 14px;
  background: var(--bg-warm); border: 1px solid var(--line);
  border-left: 3px solid var(--brand); border-radius: 14px;
}
.content h2 {
  font-size: clamp(24px, 2.4vw, 30px); font-weight: 700;
  letter-spacing: -0.8px; line-height: 1.25; color: var(--ink);
  margin: 46px 0 18px;
}
.content h3 {
  font-size: 21px; font-weight: 700; letter-spacing: -0.5px;
  color: var(--ink); margin: 38px 0 14px;
}
.content p { font-size: 17.5px; color: var(--gray); line-height: 1.8; margin-bottom: 22px; }
.content ul { list-style: none; margin: 22px 0 26px; padding: 0; }
.content ul li {
  position: relative;
  font-size: 17px; color: var(--gray); line-height: 1.7;
  padding-left: 30px; margin-bottom: 13px;
}
.content ul li::before {
  content: '';
  position: absolute; left: 4px; top: 11px;
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--brand); box-shadow: 0 0 0 4px var(--brand-soft);
}
.content strong { color: var(--ink); font-weight: 600; }
.content a:not(.btn) { color: var(--brand); font-weight: 600; border-bottom: 1px solid rgba(219,28,10,0.3); }
.content a:not(.btn):hover { border-bottom-color: var(--brand); }
.content .back-link { margin-top: 44px; }

/* ---------- CTA box (matches homepage) ---------- */
.cta-box {
  margin: 64px 0 8px;
  background:
    radial-gradient(600px 300px at 100% 0%, rgba(255,255,255,0.12), transparent 60%),
    linear-gradient(135deg, var(--brand) 0%, var(--brand-dark) 100%);
  border-radius: var(--radius-lg);
  padding: 56px 48px;
  text-align: center;
  color: #fff;
  position: relative;
  overflow: hidden;
}
.cta-box h2 { font-size: clamp(26px, 3.4vw, 38px); font-weight: 700; letter-spacing: -1.2px; line-height: 1.1; color: #fff; }
.cta-box p { margin: 16px auto 30px; font-size: 17px; color: rgba(255,255,255,0.92); max-width: 520px; line-height: 1.6; }
.content .cta-box h2 { color: #fff; margin: 0; }
.content .cta-box p { color: rgba(255,255,255,0.92); }
.content .cta-box .btn-light { background: #fff; color: var(--brand); }

/* ---------- 404 ---------- */
.error-page {
  min-height: calc(100vh - 64px);
  display: flex; align-items: center; justify-content: center;
  text-align: center;
  padding: 64px 24px;
  background:
    radial-gradient(700px 460px at 50% -10%, rgba(219,28,10,0.06), transparent 60%),
    linear-gradient(180deg, #FFFDFC 0%, #FFFFFF 100%);
}
.error-inner { max-width: 560px; }
.error-code {
  font-size: clamp(110px, 22vw, 180px);
  font-weight: 800; line-height: 1; letter-spacing: -8px;
  background: linear-gradient(115deg, var(--brand) 0%, #FF6A4D 100%);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.error-inner h1 { margin-top: 18px; font-size: clamp(26px, 4vw, 36px); font-weight: 700; letter-spacing: -1px; }
.error-inner p { margin-top: 14px; font-size: 17px; color: var(--gray); line-height: 1.65; }
.error-actions { margin-top: 34px; display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.error-links { margin-top: 46px; padding-top: 30px; border-top: 1px solid var(--line); }
.error-links h3 { font-size: 13px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; color: var(--gray-2); }
.error-links-row { margin-top: 16px; display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.error-links-row a {
  font-size: 14px; font-weight: 500; color: var(--ink-2);
  border: 1px solid var(--line-2); padding: 8px 16px; border-radius: 9px;
  transition: all 0.2s ease;
}
.error-links-row a:hover { color: var(--brand); border-color: var(--brand); background: var(--brand-soft); }

/* ---------- Footer ---------- */
.site-footer { background: var(--bg-warm); border-top: 1px solid var(--line); padding: 72px 0 36px; margin-top: 0; }
.footer-top { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 56px; }
.footer-brand .brand { font-size: 26px; margin-bottom: 16px; }
.footer-brand p { font-size: 15px; color: var(--gray); line-height: 1.7; max-width: 320px; }
.footer-social { margin-top: 22px; display: flex; gap: 10px; flex-wrap: wrap; }
.footer-social a {
  font-size: 13.5px; font-weight: 500; color: var(--ink-2);
  border: 1px solid var(--line-2); padding: 8px 15px; border-radius: 9px;
  transition: all 0.2s ease;
}
.footer-social a:hover { background: var(--bg); border-color: var(--gray-2); }
.footer-col h4 { font-size: 14px; font-weight: 600; margin-bottom: 16px; color: var(--ink); }
.footer-col ul { list-style: none; }
.footer-col li { margin-bottom: 11px; }
.footer-col a { font-size: 14.5px; color: var(--gray); transition: color 0.2s ease; }
.footer-col a:hover { color: var(--ink); }
.footer-bottom {
  margin-top: 56px; padding-top: 28px;
  border-top: 1px solid var(--line-2);
  display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  font-size: 13.5px; color: var(--gray-2);
}

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .post-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-top { grid-template-columns: 1fr 1fr; gap: 40px; }
}
@media (max-width: 720px) {
  .wrap, .nav-inner { padding-left: 20px; padding-right: 20px; }
  .wrap-narrow, .wrap-media { padding-left: 20px; padding-right: 20px; }
  .page-hero { padding: 52px 0 46px; }
  .post-grid { grid-template-columns: 1fr; gap: 22px; padding: 44px 0 8px; }
  .cta-box { padding: 44px 26px; }
  .content { padding: 36px 0 64px; }
  .footer-top { grid-template-columns: 1fr; gap: 32px; }
}
@media (max-width: 480px) {
  .nav-inner { padding: 12px 18px; }
  .wrap, .wrap-narrow, .wrap-media { padding-left: 18px; padding-right: 18px; }
  .page-hero h1 { letter-spacing: -1px; }
  .post-title { letter-spacing: -1px; }
  .content > .lead { font-size: 17px; padding: 18px 20px; }
  .content p, .content ul li { font-size: 16px; }
  .content h2 { letter-spacing: -0.5px; }
  .cta-box { padding: 38px 22px; }
  .cta-box p { font-size: 16px; }
  .error-actions .btn { width: 100%; }
}
