:root {
  --ink: #302814;
  --ink-soft: #5f4a25;
  --forest: #26311c;
  --forest-deep: #171d12;
  --moss: #65713c;
  --rust: #9e4d20;
  --gold: #c28b35;
  --parchment: #e7c989;
  --paper: #f0daa6;
  --cream: #f7e9c5;
  --line: rgba(67, 46, 15, .28);
  --shadow: 0 24px 70px rgba(28, 18, 7, .22);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-width: 320px;
  color: var(--ink);
  background: #d0ae6e;
  font-family: Georgia, 'Times New Roman', serif;
  line-height: 1.55;
}
body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 100;
  opacity: .13;
  background-image:
    radial-gradient(circle at 20% 20%, rgba(255,255,255,.35) 0 1px, transparent 1px),
    radial-gradient(circle at 80% 60%, rgba(50,30,5,.24) 0 1px, transparent 1px);
  background-size: 11px 11px, 17px 17px;
  mix-blend-mode: multiply;
}
a { color: inherit; }
img { max-width: 100%; display: block; }
button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 74px;
  padding: 10px clamp(18px, 4vw, 64px);
  color: var(--cream);
  background: linear-gradient(180deg, rgba(20,24,13,.94), rgba(20,24,13,.78));
  border-bottom: 1px solid rgba(218,176,90,.35);
  backdrop-filter: blur(14px);
}
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 800; letter-spacing: .16em; }
.brand img { width: 46px; height: 46px; border-radius: 50%; object-fit: cover; border: 1px solid rgba(232,190,103,.75); }
.site-nav { display: flex; align-items: center; justify-content: flex-end; gap: clamp(10px, 1.5vw, 25px); font-size: .9rem; }
.site-nav a { text-decoration: none; opacity: .88; transition: .2s ease; }
.site-nav a:hover { opacity: 1; color: #ffd98d; }
.site-nav .nav-cta { padding: 10px 16px; border: 1px solid #d3a54f; border-radius: 999px; opacity: 1; }
.menu-toggle { display: none; border: 0; background: none; color: #fff1c7; font-size: 1.6rem; cursor: pointer; }

.hero {
  position: relative;
  min-height: 780px;
  display: grid;
  place-items: center;
  overflow: hidden;
  color: var(--cream);
  background:
    linear-gradient(180deg, #8e6430 0%, #bd8b47 25%, #5a532e 100%);
}
.hero-art {
  position: absolute;
  inset: 0;
  background-image: url('/static/images/hero-banner.png');
  background-repeat: no-repeat;
  background-position: center top 72px;
  background-size: 100% auto;
  transform: scale(1.02);
}
.hero-art::after {
  content: '';
  position: absolute;
  inset: 245px 0 0;
  background:
    radial-gradient(ellipse at 50% 0%, rgba(215,171,88,.9), transparent 52%),
    linear-gradient(180deg, rgba(112,92,48,.15), rgba(28,37,21,.96)),
    url('/static/images/card-reference.png') center 30% / cover no-repeat;
  filter: saturate(.68) sepia(.28) brightness(.55);
  opacity: .64;
}
.hero-vignette { position: absolute; inset: 0; background: radial-gradient(ellipse at 50% 44%, transparent 20%, rgba(17,17,10,.35) 70%, rgba(10,13,8,.85) 100%); }
.hero-content {
  position: relative;
  z-index: 2;
  width: min(780px, calc(100% - 34px));
  margin-top: 170px;
  padding: clamp(28px, 5vw, 58px);
  text-align: center;
  background: linear-gradient(145deg, rgba(39,38,22,.83), rgba(75,55,25,.68));
  border: 1px solid rgba(225,186,103,.55);
  border-radius: 30px 5px 30px 5px;
  box-shadow: 0 30px 90px rgba(0,0,0,.38), inset 0 0 45px rgba(230,187,98,.08);
  backdrop-filter: blur(8px);
}
.hero-content::before, .hero-content::after { content: '❧'; position: absolute; color: #d8ad57; font-size: 2rem; }
.hero-content::before { left: 18px; top: 10px; }
.hero-content::after { right: 18px; bottom: 10px; transform: rotate(180deg); }
.eyebrow { margin: 0 0 12px; color: var(--gold); text-transform: uppercase; letter-spacing: .23em; font-size: .76rem; font-weight: 800; }
.hero h1 { margin: 0; font-size: clamp(4rem, 11vw, 8.5rem); line-height: .88; letter-spacing: .1em; text-shadow: 0 4px 0 rgba(48,27,5,.55); }
.hero-lead { max-width: 640px; margin: 25px auto 10px; font-size: clamp(1.15rem, 2.2vw, 1.55rem); }
.hero-note { margin: 0 auto 28px; color: #e2c790; }
.hero-actions { display: flex; justify-content: center; flex-wrap: wrap; gap: 14px; }
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 50px;
  padding: 13px 24px;
  border: 1px solid transparent;
  border-radius: 4px 18px 4px 18px;
  cursor: pointer;
  text-decoration: none;
  font-weight: 800;
  transition: transform .2s ease, box-shadow .2s ease, background .2s ease;
}
.button:hover { transform: translateY(-2px); }
.button.primary { color: #24190c; background: linear-gradient(180deg, #e1b85c, #ba782d); border-color: #f0d17f; box-shadow: 0 9px 24px rgba(26,18,7,.25); }
.button.secondary { color: #f7e6bc; background: rgba(30,37,22,.65); border-color: rgba(234,198,119,.65); }
.button.wide { width: 100%; }
.scroll-hint { position: absolute; z-index: 3; bottom: 24px; color: #ecd69f; font-size: 2.2rem; text-decoration: none; animation: float 1.8s infinite ease-in-out; }
@keyframes float { 50% { transform: translateY(8px); } }

.section { position: relative; padding: clamp(76px, 9vw, 140px) clamp(18px, 6vw, 90px); }
.parchment {
  background:
    linear-gradient(rgba(240,216,164,.93), rgba(226,190,121,.93)),
    url('/static/images/card-reference.png') center / cover fixed;
}
.parchment::before, .parchment::after { content: ''; position: absolute; left: 2%; right: 2%; height: 16px; opacity: .55; background: repeating-linear-gradient(90deg, transparent 0 15px, #6f4b1d 16px 18px, transparent 19px 28px); }
.parchment::before { top: 14px; }
.parchment::after { bottom: 14px; }
.dark-section { color: #f2dfb2; background: radial-gradient(circle at top, #465332, #1b2217 58%, #10150e); }
.calculator-section { background: linear-gradient(145deg, #d6ad65, #efd7a0 48%, #b77b35); }
.application-section { background: linear-gradient(180deg, #ead29b, #c69551); }
.memorandum-section { background: #342f1d url('/static/images/hero-banner.png') center / cover fixed; }
.section-heading { width: min(780px, 100%); margin: 0 auto 48px; text-align: center; }
.section-heading h2, .memorandum-card h2, .application-copy h2 { margin: 0 0 18px; font-size: clamp(2.1rem, 5vw, 4.3rem); line-height: 1; }
.section-heading > p:last-child { margin: 0 auto; max-width: 680px; font-size: 1.08rem; }
.ornament { display: block; color: var(--rust); font-size: 2rem; }

.advantage-grid, .direction-grid, .news-grid, .review-grid, .contact-grid { width: min(1240px, 100%); margin: 0 auto; display: grid; gap: 24px; }
.advantage-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.feature-card {
  min-height: 220px;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 24px 5px 24px 5px;
  background: rgba(246,225,178,.55);
  box-shadow: inset 0 0 30px rgba(113,78,23,.09), 0 15px 45px rgba(62,37,9,.1);
}
.feature-icon { color: var(--rust); font-size: 2rem; }
.feature-card h3 { margin: 14px 0 8px; font-size: 1.35rem; }
.feature-card p { margin: 0; color: var(--ink-soft); }

.direction-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.direction-card { position: relative; min-height: 510px; overflow: hidden; border: 1px solid rgba(229,191,106,.48); border-radius: 30px 6px 30px 6px; box-shadow: var(--shadow); }
.direction-card img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; filter: sepia(.18) brightness(.82); transition: transform .6s ease; }
.direction-card:hover img { transform: scale(1.045); }
.direction-overlay { position: absolute; inset: auto 0 0; padding: 120px 26px 28px; background: linear-gradient(transparent, rgba(12,16,10,.96) 55%); }
.direction-overlay > span { color: #d4a957; font-size: .75rem; text-transform: uppercase; letter-spacing: .15em; }
.direction-overlay h3 { margin: 7px 0; font-size: 1.7rem; }
.direction-overlay p { color: #d2c49e; }
.direction-overlay strong { display: block; margin: 14px 0; color: #f1c874; }
.text-button { padding: 0; border: 0; color: #f4d48d; background: none; cursor: pointer; font-weight: 800; }

.calculator-shell { width: min(1050px, 100%); margin: auto; display: grid; grid-template-columns: 1.15fr .85fr; overflow: hidden; border: 1px solid rgba(79,50,12,.4); border-radius: 36px 8px 36px 8px; background: rgba(246,225,179,.75); box-shadow: var(--shadow); }
.calculator-form { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; padding: clamp(24px, 5vw, 50px); }
.calculator-form label, .application-form label, .admin-form label { display: grid; gap: 7px; }
.calculator-form label span, .application-form label span { font-size: .84rem; font-weight: 800; color: #66471f; }
input, select, textarea { width: 100%; padding: 13px 14px; color: #302814; background: rgba(255,246,219,.9); border: 1px solid rgba(97,64,20,.35); border-radius: 10px 3px 10px 3px; outline: none; }
input:focus, select:focus, textarea:focus { border-color: #9f5b20; box-shadow: 0 0 0 3px rgba(159,91,32,.15); }
.calculator-form .wide { grid-column: 1 / -1; }
.calculation-result { padding: clamp(28px, 5vw, 50px); color: #f2e4bd; background: linear-gradient(155deg, #3b402a, #171c13); }
.result-caption { margin: 0; color: #cdb169; }
.calculation-result > strong { display: block; margin: 10px 0 25px; color: #f2cb72; font-size: clamp(2.4rem, 5vw, 4.6rem); line-height: 1; }
.calculation-result dl { margin: 0 0 20px; }
.calculation-result dl div { display: flex; justify-content: space-between; gap: 20px; padding: 10px 0; border-bottom: 1px solid rgba(232,205,139,.16); }
.calculation-result dd { margin: 0; font-weight: 800; }
.applied-bonuses { margin: 18px 0; }
.bonus-pill { display: flex; justify-content: space-between; gap: 16px; padding: 9px 12px; margin: 7px 0; color: #28200f; background: #d4ae5a; border-radius: 8px; font-size: .88rem; }
.legal-note { max-width: 860px; margin: 22px auto 0; color: #62481e; text-align: center; font-size: .88rem; }

.steps-grid { width: min(1160px, 100%); margin: auto; padding: 0; list-style: none; display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.step-card { position: relative; padding: 28px 22px; border-top: 2px solid #9c5522; background: rgba(247,230,191,.34); }
.step-card > span { color: rgba(150,76,29,.35); font-size: 3.2rem; font-weight: 900; line-height: 1; }
.step-card h3 { margin: 10px 0; }
.step-card p { margin: 0; color: var(--ink-soft); }

.news-grid { grid-template-columns: repeat(3, 1fr); }
.news-card { overflow: hidden; border: 1px solid rgba(222,187,108,.35); border-radius: 22px 4px 22px 4px; background: rgba(234,208,150,.08); }
.news-card img { width: 100%; height: 190px; object-fit: cover; filter: sepia(.25); }
.news-card div { padding: 22px; }
.news-card time { color: #c79b47; font-size: .8rem; }
.news-card h3 { margin: 8px 0; font-size: 1.35rem; }
.news-card p { color: #cfc49f; }
.news-card a { color: #ebc26b; font-weight: 800; text-decoration: none; }

.review-grid { grid-template-columns: repeat(2, 1fr); max-width: 980px; }
.review-card { margin: 0; padding: 30px; border: 1px solid var(--line); border-radius: 26px 5px 26px 5px; background: rgba(255,239,204,.45); }
.review-person { display: flex; align-items: center; gap: 13px; }
.review-person img { width: 62px; height: 62px; border-radius: 50%; object-fit: cover; border: 2px solid #9c672a; }
.review-person strong, .review-person span { display: block; }
.review-person span { color: var(--ink-soft); font-size: .86rem; }
.review-card > p { font-size: 1.08rem; }
.review-card small { color: #4e642c; font-weight: 800; }

.memorandum-card { width: min(900px, 100%); margin: auto; padding: clamp(30px, 7vw, 80px); color: #f3e2bb; background: rgba(28,29,18,.9); border: 1px solid rgba(229,192,106,.6); border-radius: 40px 8px 40px 8px; box-shadow: 0 35px 100px rgba(0,0,0,.45); }
.memorandum-intro { font-size: 1.2rem; color: #d5c398; }
.memorandum-card summary { cursor: pointer; margin-top: 25px; padding: 14px 0; color: #e7bb5d; font-weight: 800; }
.rich-text { white-space: pre-line; }

.application-layout { width: min(1120px, 100%); margin: auto; display: grid; grid-template-columns: .85fr 1.15fr; gap: 46px; align-items: center; }
.application-copy p:not(.eyebrow) { max-width: 500px; }
.application-copy img { width: min(360px, 70%); margin: 24px auto 0; border-radius: 50%; border: 2px solid rgba(112,71,22,.42); box-shadow: var(--shadow); }
.application-form { display: grid; gap: 16px; padding: clamp(24px, 5vw, 45px); background: rgba(248,231,192,.65); border: 1px solid var(--line); border-radius: 30px 6px 30px 6px; box-shadow: var(--shadow); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.application-summary { padding: 13px 15px; border-left: 3px solid #9e4d20; background: rgba(91,64,24,.08); font-size: .9rem; }
.form-message { margin: 0; min-height: 24px; font-weight: 800; }
.form-message.success { color: #30551f; }
.form-message.error { color: #8c251d; }
.honeypot { position: absolute !important; left: -10000px !important; opacity: 0 !important; }

.contact-grid { grid-template-columns: repeat(2, 1fr); max-width: 880px; }
.contact-card { display: flex; align-items: center; gap: 18px; padding: 24px; color: #f2e2bc; text-decoration: none; border: 1px solid rgba(222,185,103,.3); border-radius: 20px 4px 20px 4px; background: rgba(255,255,255,.04); }
.contact-card > span { font-size: 2rem; color: #dcb35d; }
.contact-card strong, .contact-card p, .contact-card small { display: block; margin: 0; }
.contact-card p { color: #e2c782; }
.contact-card small { color: #aea68f; }

.site-footer { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 26px clamp(18px,5vw,70px); color: #cdbd95; background: #0d110b; border-top: 1px solid rgba(217,181,99,.25); }
.site-footer div { display: flex; align-items: center; gap: 10px; letter-spacing: .1em; }
.site-footer img { width: 44px; height: 44px; object-fit: cover; border-radius: 50%; }
.site-footer p { font-size: .8rem; text-align: center; }
.site-footer a { color: #e1bb68; }

.simple-header { display: flex; justify-content: space-between; padding: 20px clamp(18px,5vw,70px); color: #f2dfb2; background: #1a2115; }
.simple-header a { color: #e0b85d; }
.article-page, .error-page { min-height: 100vh; padding: clamp(50px,8vw,110px) 18px; background: linear-gradient(rgba(239,216,164,.92),rgba(218,177,104,.94)), url('/static/images/card-reference.png') center/cover; }
.article-page article { width: min(850px,100%); margin:auto; padding: clamp(24px,6vw,70px); background: rgba(250,235,201,.78); border:1px solid var(--line); box-shadow: var(--shadow); }
.article-page article > img { width:100%; max-height:440px; object-fit:cover; margin-bottom:25px; }
.article-page h1 { font-size:clamp(2.3rem,6vw,5rem); line-height:1; margin:12px 0; }
.article-page .lead { font-size:1.25rem; color:var(--ink-soft); }
.error-page { display:grid; place-items:center; align-content:center; text-align:center; }
.error-page img { width:220px; border-radius:50%; }

.reveal { opacity: 0; transform: translateY(18px); transition: opacity .65s ease, transform .65s ease; }
.reveal.visible { opacity: 1; transform: none; }

@media (max-width: 1100px) {
  .site-nav { position: fixed; top: 74px; left: 14px; right: 14px; display: none; flex-direction: column; align-items: stretch; padding: 20px; background: rgba(20,25,14,.98); border: 1px solid rgba(223,184,97,.4); border-radius: 18px; }
  .site-nav.open { display: flex; }
  .site-nav a { padding: 8px 4px; }
  .menu-toggle { display: block; }
  .advantage-grid { grid-template-columns: repeat(2,1fr); }
  .direction-grid, .news-grid { grid-template-columns: repeat(2,1fr); }
  .steps-grid { grid-template-columns: repeat(2,1fr); }
}
@media (max-width: 760px) {
  .hero { min-height: 760px; }
  .hero-art { background-position: center top 72px; background-size: auto 170px; }
  .hero-art::after { inset: 210px 0 0; }
  .hero-content { margin-top: 145px; padding: 34px 20px; }
  .hero h1 { font-size: clamp(3.5rem,20vw,6rem); }
  .advantage-grid, .direction-grid, .news-grid, .review-grid, .contact-grid { grid-template-columns: 1fr; }
  .direction-card { min-height: 470px; }
  .calculator-shell, .application-layout { grid-template-columns: 1fr; }
  .calculator-form { grid-template-columns: 1fr; }
  .calculator-form .wide { grid-column: auto; }
  .steps-grid { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .site-footer { flex-direction: column; text-align:center; }
  .site-footer p { order:3; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition-duration: .01ms !important; }
  .reveal { opacity: 1; transform: none; }
}
