/* =========================================================================
   Decree Help — "Fleuron" theme
   Warm cream paper, deep burgundy, antique-gold rules, Playfair display type.
   Variable NAMES are kept from the previous theme so inline styles in the
   templates keep resolving; only their values changed.
   ========================================================================= */

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

:root {
  /* surfaces */
  --bg-primary: #FBF7F1;
  --bg-secondary: #F4EDE3;
  --bg-card: #FFFDFA;
  --bg-card-hover: #FFFFFF;
  --bg-deep: #2A211E;

  /* rules */
  --border: #E6DBCB;
  --border-hover: #C9AE7E;
  --gold: #BFA06A;
  --gold-soft: #DCC9A4;

  /* ink */
  --text-primary: #1E1A18;
  --text-secondary: #57504A;
  --text-muted: #8C8177;

  /* accent */
  --accent: #8E2B2B;
  --accent-light: #A93A36;
  --accent-deep: #6E1F20;
  --accent-glow: rgba(142, 43, 43, 0.10);

  /* semantic (names kept from old theme) */
  --cyan: #9A6B3F;
  --cyan-glow: rgba(154, 107, 63, 0.10);
  --green: #4F6B4A;
  --green-glow: rgba(79, 107, 74, 0.10);
  --amber: #A97A2C;
  --red: #A2342E;
  --blue: #5C6B7A;

  /* type */
  --serif: 'Playfair Display', 'Iowan Old Style', Georgia, 'Times New Roman', serif;
  --sans: 'Lato', -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;

  /* effects */
  --shadow-sm: 0 1px 2px rgba(42, 33, 30, 0.04);
  --shadow-md: 0 10px 30px -18px rgba(42, 33, 30, 0.35);
  --shadow-lg: 0 24px 60px -30px rgba(42, 33, 30, 0.40);

  /* legacy aliases still referenced by old markup */
  --gradient-text: none;
  --gradient-accent: none;
  --gradient-card: none;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--sans);
  font-size: 1.02rem;
  color: var(--text-secondary);
  line-height: 1.75;
  background: var(--bg-primary);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* soft paper texture — two very faint warm washes, no image request */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(1100px 620px at 12% -8%, rgba(191, 160, 106, 0.10), transparent 62%),
    radial-gradient(900px 560px at 96% 4%, rgba(142, 43, 43, 0.05), transparent 60%);
}

body > * {
  position: relative;
  z-index: 1;
}

h1, h2, h3, h4, h5 {
  font-family: var(--serif);
  color: var(--text-primary);
  font-weight: 500;
  line-height: 1.18;
  letter-spacing: -0.005em;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: var(--accent-light);
}

strong { color: var(--text-primary); font-weight: 700; }

::selection { background: rgba(142, 43, 43, 0.16); }

.container {
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 28px;
}

/* =========================================================================
   Ornaments
   ========================================================================= */

/* thin gold double-rule frame */
.frame {
  position: relative;
  border: 1px solid var(--gold);
  padding: 14px;
  background: var(--bg-card);
}

.frame::after {
  content: '';
  position: absolute;
  inset: 7px;
  border: 1px solid var(--gold-soft);
  pointer-events: none;
}

/* fleuron divider between sections */
.glow-line,
.fleuron {
  border: 0;
  height: 46px;
  margin: 0;
  background-image: url('../img/fleuron.svg');
  background-repeat: no-repeat;
  background-position: center;
  background-size: 26px auto;
  position: relative;
}

.glow-line::before,
.glow-line::after {
  content: '';
  position: absolute;
  top: 50%;
  width: 190px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold-soft));
}

.glow-line::before { right: calc(50% + 24px); }
.glow-line::after {
  left: calc(50% + 24px);
  background: linear-gradient(270deg, transparent, var(--gold-soft));
}

/* line icons — inherit colour from their badge */
.dh-icon {
  width: 22px;
  height: 22px;
  display: block;
  color: var(--accent);
}

.problem-icon .dh-icon,
.tech-feature .icon .dh-icon,
.contact-detail .icon .dh-icon { width: 24px; height: 24px; }

.option-btn .icon .dh-icon { width: 19px; height: 19px; }

.logo-mark .emblem-mark { width: 46px; height: 46px; display: block; }

.form-success-mark {
  display: grid;
  place-items: center;
  width: 62px;
  height: 62px;
  margin: 0 auto 18px;
  border: 1px solid var(--gold);
  border-radius: 50%;
  color: var(--green);
}

.form-success-mark .dh-icon { width: 30px; height: 30px; color: inherit; }

/* =========================================================================
   Section furniture
   ========================================================================= */

.section {
  padding: 92px 0;
  position: relative;
}

.section:nth-of-type(even) {
  background: transparent;
}

.section-label {
  display: inline-block;
  font-family: var(--serif);
  font-size: 0.76rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.20em;
  color: var(--accent);
  padding: 0 0 10px;
  margin-bottom: 14px;
  border-bottom: 1px solid var(--gold-soft);
}

.section-label .dot { display: none; }

.section-title {
  font-size: clamp(2rem, 4.1vw, 3.05rem);
  text-align: center;
  max-width: 900px;
  margin: 6px auto 0;
}

.section-subtitle {
  text-align: center;
  max-width: 680px;
  margin: 20px auto 52px;
  color: var(--text-secondary);
  font-size: 1.03rem;
}

/* emphasis span used throughout the templates */
.gradient-text,
.highlight {
  font-style: italic;
  color: var(--accent);
  background: none;
  -webkit-text-fill-color: currentColor;
}

/* =========================================================================
   Navigation
   ========================================================================= */

.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(251, 247, 241, 0.94);
  backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid var(--border);
  transition: box-shadow 0.25s ease, background 0.25s ease;
}

.nav.scrolled {
  box-shadow: 0 1px 20px -10px rgba(42, 33, 30, 0.45);
  background: rgba(251, 247, 241, 0.985);
}

.nav-inner {
  max-width: 1160px;
  margin: 0 auto;
  padding: 16px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.nav-logo {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-family: var(--serif);
  font-size: 1.58rem;
  font-weight: 600;
  color: var(--text-primary);
  letter-spacing: -0.01em;
  white-space: nowrap;
}

.nav-logo:hover { color: var(--accent); }

.nav-logo .logo-mark,
.logo-mark {
  width: 46px;
  height: 46px;
  flex: 0 0 46px;
  display: block;
  color: var(--accent);
}

.nav-logo .logo-mark img,
.logo-mark img { width: 46px; height: 46px; display: block; }

.nav-links {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 30px;
}

.nav-links > li > a {
  font-size: 0.86rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-secondary);
  position: relative;
  padding-bottom: 3px;
}

.nav-links > li > a::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: 0;
  height: 1px;
  background: var(--accent);
  transition: width 0.25s ease;
}

.nav-links > li > a:hover { color: var(--accent); }
.nav-links > li > a:hover::after { width: 100%; }

.nav-cta,
.nav-links > li > a.nav-cta {
  background: var(--accent);
  color: #FFF9F2 !important;
  padding: 11px 22px;
  border: 1px solid var(--accent);
  letter-spacing: 0.1em;
  font-size: 0.74rem;
  transition: background 0.2s ease, color 0.2s ease;
}

.nav-links > li > a.nav-cta::after { display: none; }

.nav-cta:hover {
  background: var(--accent-deep);
  color: #FFF9F2 !important;
}

/* dropdown */
.has-dropdown { position: relative; }
.caret { font-size: 0.6em; opacity: 0.7; margin-left: 3px; }

.nav-dropdown {
  position: absolute;
  top: calc(100% + 14px);
  left: -18px;
  min-width: 244px;
  list-style: none;
  background: var(--bg-card);
  border: 1px solid var(--gold-soft);
  box-shadow: var(--shadow-lg);
  padding: 8px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: 0.22s ease;
}

.has-dropdown:hover .nav-dropdown,
.has-dropdown:focus-within .nav-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.nav-dropdown::before {
  content: '';
  position: absolute;
  top: -14px;
  left: 0;
  right: 0;
  height: 14px;
}

.nav-dropdown li a {
  display: block;
  padding: 11px 16px;
  font-size: 0.92rem;
  color: var(--text-secondary);
  font-family: var(--serif);
}

.nav-dropdown li a:hover {
  background: var(--bg-secondary);
  color: var(--accent);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: 0;
  cursor: pointer;
  padding: 6px;
}

.nav-toggle span {
  width: 24px;
  height: 1.5px;
  background: var(--text-primary);
  display: block;
}

/* =========================================================================
   Hero
   ========================================================================= */

.hero {
  padding: 96px 0 84px;
  position: relative;
}

.hero-inner {
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 28px;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 64px;
  align-items: center;
}

.hero-badge {
  display: inline-block;
  font-family: var(--serif);
  font-size: 0.74rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--accent);
  padding-bottom: 10px;
  border-bottom: 1px solid var(--gold-soft);
  margin-bottom: 26px;
}

.hero-badge .pulse { display: none; }

.hero h1 {
  font-size: clamp(2.4rem, 5.2vw, 4rem);
  line-height: 1.1;
  margin-bottom: 24px;
}

.hero-text {
  font-size: 1.06rem;
  max-width: 560px;
  margin-bottom: 34px;
}

.hero-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 34px;
}

.hero-trust {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  font-size: 0.82rem;
  color: var(--text-muted);
  font-style: italic;
  font-family: var(--serif);
  padding-top: 24px;
  border-top: 1px solid var(--border);
}

.hero-trust .divider {
  width: 1px;
  height: 14px;
  background: var(--gold-soft);
}

/* hero panel — the framed plate from the mockup */
.hero-panel {
  position: relative;
  border: 1px solid var(--gold);
  background: var(--bg-card);
  padding: 30px 30px 26px;
  box-shadow: var(--shadow-md);
}

.hero-panel::after {
  content: '';
  position: absolute;
  inset: 9px;
  border: 1px solid var(--gold-soft);
  pointer-events: none;
}

.hero-figure {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  max-width: 272px;
  height: auto;
  margin: 6px auto 0;
}

.hero-panel-caption {
  position: relative;
  z-index: 1;
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--gold-soft);
  text-align: center;
  font-family: var(--serif);
  font-style: italic;
  font-size: 0.98rem;
  color: var(--text-secondary);
}

/* four-up statistic strip under the hero */
.hero-stats { margin-top: 62px; }

.panel-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
}

.panel-stat {
  background: var(--bg-card);
  padding: 26px 20px;
  text-align: center;
}

.panel-stat .number {
  font-family: var(--serif);
  font-size: 2rem;
  font-weight: 600;
  line-height: 1.1;
  color: var(--text-primary);
  margin-bottom: 6px;
}

.panel-stat .number.accent { color: var(--accent); }
.panel-stat .number.cyan   { color: var(--cyan); }
.panel-stat .number.green  { color: var(--green); }
.panel-stat .number.white  { color: var(--text-primary); }

.panel-stat .label {
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.11em;
  color: var(--text-muted);
  line-height: 1.5;
}

/* =========================================================================
   Buttons
   ========================================================================= */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 15px 30px;
  font-family: var(--sans);
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.btn-primary {
  background: var(--accent);
  color: #FFF9F2;
  border-color: var(--accent);
}

.btn-primary:hover {
  background: var(--accent-deep);
  border-color: var(--accent-deep);
  color: #FFF9F2;
}

.btn-ghost {
  background: transparent;
  color: var(--text-primary);
  border-color: var(--gold);
}

.btn-ghost:hover {
  background: var(--bg-secondary);
  border-color: var(--accent);
  color: var(--accent);
}

.btn-pricing {
  display: block;
  width: 100%;
  text-align: center;
  padding: 14px 20px;
  margin-top: auto;
  font-size: 0.76rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  border: 1px solid var(--gold);
  color: var(--text-primary);
  background: transparent;
  transition: 0.2s ease;
}

.btn-pricing:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: #FFF9F2;
}

.pricing-card.featured .btn-pricing {
  background: var(--accent);
  border-color: var(--accent);
  color: #FFF9F2;
}

.pricing-card.featured .btn-pricing:hover { background: var(--accent-deep); }

.btn-submit {
  width: 100%;
  padding: 16px 24px;
  background: var(--accent);
  color: #FFF9F2;
  border: 1px solid var(--accent);
  font-family: var(--sans);
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  cursor: pointer;
  transition: background 0.2s ease;
}

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

/* =========================================================================
   Cards / panels
   ========================================================================= */

.glass {
  background: var(--bg-card);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}

/* -------------------------------- pricing ------------------------------- */

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
  gap: 28px;
  align-items: stretch;
}

.pricing-card {
  display: flex;
  flex-direction: column;
  background: var(--bg-card);
  border: 1px solid var(--border);
  padding: 38px 32px 32px;
  position: relative;
  transition: border-color 0.25s ease, box-shadow 0.25s ease, transform 0.25s ease;
}

.pricing-card:hover {
  border-color: var(--gold);
  box-shadow: var(--shadow-md);
  transform: translateY(-3px);
}

.pricing-card.featured {
  border-color: var(--gold);
  box-shadow: var(--shadow-md);
}

.pricing-card.featured::after {
  content: '';
  position: absolute;
  inset: 7px;
  border: 1px solid var(--gold-soft);
  pointer-events: none;
}

.pricing-tier {
  font-family: var(--serif);
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--accent);
  margin-bottom: 14px;
}

.pricing-name {
  font-family: var(--serif);
  font-size: 1.42rem;
  color: var(--text-primary);
  line-height: 1.25;
  margin-bottom: 14px;
}

.pricing-price {
  font-family: var(--serif);
  font-size: 2.5rem;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1;
  padding-bottom: 18px;
  margin-bottom: 18px;
  border-bottom: 1px solid var(--border);
}

.pricing-price span {
  font-size: 1.1rem;
  color: var(--text-muted);
  font-weight: 400;
}

.pricing-desc {
  font-size: 0.94rem;
  margin-bottom: 22px;
}

.pricing-features {
  list-style: none;
  margin-bottom: 28px;
  display: grid;
  gap: 11px;
}

.pricing-features li {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  font-size: 0.93rem;
  line-height: 1.6;
}

.pricing-features .check {
  flex: 0 0 18px;
  width: 18px;
  height: 18px;
  margin-top: 4px;
  display: grid;
  place-items: center;
  border: 1px solid var(--gold);
  border-radius: 50%;
  color: var(--accent);
  font-size: 0.66rem;
  line-height: 1;
  font-weight: 700;
}

/* ------------------------------ problem cards --------------------------- */

.problem-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 28px;
}

.problem-card {
  padding: 34px 30px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.problem-card:hover {
  border-color: var(--gold);
  box-shadow: var(--shadow-md);
}

.problem-card h3 {
  font-size: 1.24rem;
  margin-bottom: 12px;
}

.problem-card p { font-size: 0.95rem; }

.problem-icon {
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  border: 1px solid var(--gold);
  border-radius: 50%;
  font-size: 1.35rem;
  margin-bottom: 20px;
  background: var(--bg-secondary);
}

.problem-card.red    { border-top: 2px solid var(--red); }
.problem-card.amber  { border-top: 2px solid var(--amber); }
.problem-card.blue   { border-top: 2px solid var(--blue); }
.problem-card.green  { border-top: 2px solid var(--green); }

/* --------------------------- technology section ------------------------- */

.tech-layout {
  display: grid;
  grid-template-columns: 1.06fr 0.94fr;
  gap: 64px;
  align-items: center;
}

.tech-content h2 {
  font-size: clamp(1.8rem, 3.3vw, 2.55rem);
  margin-bottom: 22px;
}

.tech-content > p {
  margin-bottom: 18px;
  font-size: 1rem;
}

.tech-features {
  display: grid;
  gap: 24px;
  margin-top: 36px;
}

.tech-feature {
  display: grid;
  grid-template-columns: 54px 1fr;
  gap: 20px;
  align-items: start;
}

.tech-feature .icon {
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  border: 1px solid var(--gold);
  border-radius: 50%;
  font-size: 1.25rem;
  background: var(--bg-card);
}

.tech-feature h4 {
  font-size: 1.12rem;
  margin-bottom: 6px;
}

.tech-feature p { font-size: 0.94rem; }

.tech-visual { position: relative; }

.tech-card-stack {
  display: grid;
  gap: 16px;
  border: 1px solid var(--gold);
  padding: 22px;
  background: var(--bg-card);
  position: relative;
}

.tech-card-stack::after {
  content: '';
  position: absolute;
  inset: 8px;
  border: 1px solid var(--gold-soft);
  pointer-events: none;
}

.tech-stack-card {
  position: relative;
  z-index: 1;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  padding: 20px 22px;
}

.tech-metric {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 6px;
  flex-wrap: wrap;
}

.tech-metric .big {
  font-family: var(--serif);
  font-size: 1.75rem;
  font-weight: 600;
  color: var(--accent);
  line-height: 1;
}

.tech-metric .unit {
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-muted);
}

.tech-stack-card .desc {
  font-size: 0.87rem;
  line-height: 1.6;
  margin-bottom: 12px;
}

.tech-bar {
  height: 3px;
  background: var(--border);
  overflow: hidden;
}

.tech-bar .fill {
  height: 100%;
  background: var(--gold);
}

/* --------------------------------- steps -------------------------------- */

.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 30px;
}

.step {
  text-align: center;
  padding: 34px 22px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  position: relative;
}

.step-number {
  width: 56px;
  height: 56px;
  margin: 0 auto 20px;
  display: grid;
  place-items: center;
  border: 1px solid var(--gold);
  border-radius: 50%;
  font-family: var(--serif);
  font-size: 1.35rem;
  font-weight: 600;
  color: var(--accent);
  background: var(--bg-secondary);
}

.step h3 {
  font-size: 1.18rem;
  margin-bottom: 10px;
}

.step p { font-size: 0.93rem; }

/* ---------------------------------- FAQ --------------------------------- */

.faq-list {
  max-width: 840px;
  margin: 0 auto;
  border-top: 1px solid var(--border);
}

.faq-item { border-bottom: 1px solid var(--border); }

.faq-question {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 24px 4px;
  cursor: pointer;
}

.faq-question h3 {
  font-size: 1.14rem;
  font-weight: 500;
  transition: color 0.2s ease;
}

.faq-item:hover .faq-question h3,
.faq-item.open .faq-question h3 { color: var(--accent); }

.faq-toggle {
  flex: 0 0 30px;
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border: 1px solid var(--gold);
  border-radius: 50%;
  color: var(--accent);
  font-size: 1rem;
  line-height: 1;
  transition: transform 0.25s ease, background 0.25s ease, color 0.25s ease;
}

.faq-item.open .faq-toggle {
  transform: rotate(45deg);
  background: var(--accent);
  border-color: var(--accent);
  color: #FFF9F2;
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}

.faq-item.open .faq-answer { max-height: 620px; }

.faq-answer-inner {
  padding: 0 60px 26px 4px;
  font-size: 0.97rem;
}

/* -------------------------------- contact ------------------------------- */

.contact-grid {
  display: grid;
  grid-template-columns: 0.92fr 1.08fr;
  gap: 56px;
  align-items: start;
}

.contact-info h3 {
  font-size: 1.6rem;
  margin-bottom: 14px;
}

.contact-info > p { margin-bottom: 30px; }

.contact-detail {
  display: grid;
  grid-template-columns: 50px 1fr;
  gap: 18px;
  align-items: center;
  padding: 16px 0;
  border-top: 1px solid var(--border);
}

.contact-detail .icon {
  width: 50px;
  height: 50px;
  display: grid;
  place-items: center;
  border: 1px solid var(--gold);
  border-radius: 50%;
  font-size: 1.15rem;
  background: var(--bg-card);
}

.contact-detail .label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--text-muted);
}

.contact-detail .text {
  font-family: var(--serif);
  font-size: 1.14rem;
  color: var(--text-primary);
}

.contact-detail .text a {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease;
}

.contact-detail .text a:hover,
.contact-detail .text a:focus-visible {
  border-bottom-color: var(--gold);
}

.contact-form-wrap {
  background: var(--bg-card);
  border: 1px solid var(--gold);
  padding: 38px;
  position: relative;
  box-shadow: var(--shadow-md);
}

.contact-form-wrap::after {
  content: '';
  position: absolute;
  inset: 9px;
  border: 1px solid var(--gold-soft);
  pointer-events: none;
}

.contact-form-wrap form,
.contact-form-wrap > div { position: relative; z-index: 1; }

.form-group { margin-bottom: 18px; }

.form-group label {
  display: block;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.13em;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 13px 15px;
  font-family: var(--sans);
  font-size: 0.97rem;
  color: var(--text-primary);
  background: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: 0;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-group textarea { min-height: 124px; resize: vertical; }

.form-group input::placeholder,
.form-group textarea::placeholder { color: #B3A99C; }

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

/* =========================================================================
   Case assessment tool
   ========================================================================= */

.assessment-wrap {
  max-width: 780px;
  margin: 0 auto;
  background: var(--bg-card);
  border: 1px solid var(--gold);
  padding: 40px;
  position: relative;
  box-shadow: var(--shadow-md);
}

.assessment-wrap::after {
  content: '';
  position: absolute;
  inset: 9px;
  border: 1px solid var(--gold-soft);
  pointer-events: none;
}

.assessment-wrap > * { position: relative; z-index: 1; }

.assessment-progress {
  display: flex;
  gap: 8px;
  margin-bottom: 32px;
}

.assessment-progress .bar {
  flex: 1;
  height: 2px;
  background: var(--border);
}

.assessment-progress .bar.active,
.assessment-progress .bar.completed { background: var(--accent); }

.assessment-step { display: none; }
.assessment-step.active { display: block; animation: fadeUp 0.35s ease; }

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

.assessment-step h3 {
  font-size: 1.45rem;
  margin-bottom: 8px;
}

.assessment-step > p {
  font-size: 0.95rem;
  margin-bottom: 24px;
}

.option-grid { display: grid; gap: 12px; }

.option-btn {
  display: grid;
  grid-template-columns: 42px 1fr;
  gap: 16px;
  align-items: center;
  text-align: left;
  width: 100%;
  padding: 16px 18px;
  background: var(--bg-primary);
  border: 1px solid var(--border);
  cursor: pointer;
  font-family: var(--sans);
  transition: border-color 0.2s ease, background 0.2s ease;
}

.option-btn:hover { border-color: var(--gold); background: var(--bg-secondary); }

.option-btn.selected {
  border-color: var(--accent);
  background: var(--accent-glow);
}

.option-btn .icon {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border: 1px solid var(--gold);
  border-radius: 50%;
  font-size: 1.1rem;
  background: var(--bg-card);
}

.option-btn .label {
  font-family: var(--serif);
  font-size: 1.03rem;
  color: var(--text-primary);
  line-height: 1.35;
}

.option-btn .desc {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.assessment-nav {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-top: 28px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}

.btn-back,
.btn-next {
  padding: 13px 26px;
  font-family: var(--sans);
  font-size: 0.76rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  cursor: pointer;
  transition: 0.2s ease;
}

.btn-back {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-secondary);
}

.btn-back:hover { border-color: var(--gold); color: var(--text-primary); }

.btn-next {
  background: var(--accent);
  border: 1px solid var(--accent);
  color: #FFF9F2;
}

.btn-next:hover:not(:disabled) { background: var(--accent-deep); }

.btn-next:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.result-card,
.result-recommend {
  padding: 24px 26px;
  border: 1px solid var(--border);
  background: var(--bg-secondary);
  margin-bottom: 16px;
}

.result-card h4,
.result-recommend h4 {
  font-size: 1.16rem;
  margin-bottom: 8px;
}

.result-card p,
.result-recommend p { font-size: 0.95rem; }

.result-card.strong   { border-left: 3px solid var(--green); }
.result-card.moderate { border-left: 3px solid var(--amber); }
.result-recommend     { border-left: 3px solid var(--accent); }

/* =========================================================================
   Blog
   ========================================================================= */

.blog-posts {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 30px;
}

.blog-card {
  display: flex;
  flex-direction: column;
  background: var(--bg-card);
  border: 1px solid var(--border);
  overflow: hidden;
  transition: border-color 0.25s ease, box-shadow 0.25s ease, transform 0.25s ease;
}

.blog-card:hover {
  border-color: var(--gold);
  box-shadow: var(--shadow-md);
  transform: translateY(-3px);
}

.blog-card-image {
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-bottom: 1px solid var(--border);
}

.blog-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.blog-card-category,
.single-post-category {
  display: inline-block;
  font-family: var(--serif);
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--accent);
  margin: 24px 26px 10px;
}

.single-post-category { margin: 0 0 16px; }

.blog-card-title {
  font-size: 1.22rem;
  line-height: 1.32;
  margin: 0 26px 10px;
}

.blog-card-title a { color: var(--text-primary); }
.blog-card-title a:hover { color: var(--accent); }

.blog-card-excerpt {
  font-size: 0.93rem;
  margin: 0 26px 20px;
}

.blog-card-meta {
  margin-top: auto;
  padding: 14px 26px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
}

.blog-sidebar { display: grid; gap: 24px; align-content: start; }

.widget-item {
  padding: 26px;
  background: var(--bg-card);
  border: 1px solid var(--border);
}

.widget-title {
  font-size: 1.1rem;
  padding-bottom: 12px;
  margin-bottom: 14px;
  border-bottom: 1px solid var(--border);
}

.widget-item ul { list-style: none; display: grid; gap: 10px; }

.widget-item ul li a {
  font-size: 0.94rem;
  color: var(--text-secondary);
}

.widget-item ul li a:hover { color: var(--accent); }

/* pagination */
.page-numbers {
  display: inline-grid;
  place-items: center;
  min-width: 40px;
  height: 40px;
  padding: 0 10px;
  border: 1px solid var(--border);
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.page-numbers:hover { border-color: var(--gold); color: var(--accent); }

.page-numbers.current {
  background: var(--accent);
  border-color: var(--accent);
  color: #FFF9F2;
}

/* ------------------------------ single post ----------------------------- */

.single-post-container {
  max-width: 780px;
  margin: 0 auto;
}

.single-post-header {
  padding-bottom: 28px;
  margin-bottom: 34px;
  border-bottom: 1px solid var(--border);
  text-align: center;
}

.single-post-title {
  font-size: clamp(1.9rem, 4vw, 2.8rem);
  margin-bottom: 20px;
}

.single-post-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 22px;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.11em;
  color: var(--text-muted);
}

.single-post-featured { margin-bottom: 34px; }

.single-post-featured img {
  width: 100%;
  height: auto;
  display: block;
  border: 1px solid var(--border);
}

.single-post-content { font-size: 1.05rem; }

.single-post-content h2 {
  font-size: 1.85rem;
  margin: 42px 0 14px;
}

.single-post-content h3 {
  font-size: 1.38rem;
  margin: 32px 0 12px;
}

.single-post-content p { margin-bottom: 20px; }

.single-post-content ul,
.single-post-content ol {
  margin: 0 0 22px 22px;
  display: grid;
  gap: 8px;
}

.single-post-content blockquote {
  margin: 30px 0;
  padding: 6px 0 6px 26px;
  border-left: 2px solid var(--gold);
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.16rem;
  color: var(--text-primary);
}

.single-post-content img { max-width: 100%; height: auto; }

.single-post-content a { text-decoration: underline; text-underline-offset: 3px; }

.post-cta-box {
  margin: 48px 0;
  padding: 38px;
  text-align: center;
  background: var(--bg-card);
  border: 1px solid var(--gold);
  position: relative;
}

.post-cta-box::after {
  content: '';
  position: absolute;
  inset: 8px;
  border: 1px solid var(--gold-soft);
  pointer-events: none;
}

.post-cta-box > * { position: relative; z-index: 1; }

.post-cta-box h3 { font-size: 1.5rem; margin-bottom: 10px; }
.post-cta-box p { margin-bottom: 22px; }

.related-posts { margin-top: 56px; }

.related-posts-title {
  font-size: 1.7rem;
  text-align: center;
  margin-bottom: 30px;
}

.related-posts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 26px;
}

/* =========================================================================
   404
   ========================================================================= */

.page-404 { text-align: center; padding: 40px 0; }

.page-404-number {
  font-family: var(--serif);
  font-size: clamp(5rem, 14vw, 9rem);
  font-weight: 600;
  color: var(--gold-soft);
  line-height: 1;
}

.page-404-title { font-size: 2.1rem; margin: 10px 0 12px; }

.page-404-message {
  max-width: 480px;
  margin: 0 auto 30px;
}

.page-404-links {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 14px;
}

/* =========================================================================
   Footer
   ========================================================================= */

.footer {
  margin-top: 40px;
  padding: 72px 0 40px;
  background: var(--bg-secondary);
  border-top: 1px solid var(--border);
}

.footer-inner {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr;
  gap: 52px;
  padding-bottom: 40px;
  border-bottom: 1px solid var(--border);
}

.footer-brand .logo {
  font-family: var(--serif);
  font-size: 1.7rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.footer-brand .logo::after {
  content: '';
  display: block;
  width: 46px;
  height: 1px;
  background: var(--gold);
  margin: 14px 0;
}

.footer-brand p { font-size: 0.93rem; max-width: 420px; }

.footer-tagline {
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.02rem;
  color: var(--accent);
  margin-bottom: 12px;
}

.footer-links h4 {
  font-family: var(--serif);
  font-size: 0.74rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--accent);
  margin-bottom: 16px;
}

.footer-links ul { list-style: none; display: grid; gap: 10px; }

.footer-links a {
  font-size: 0.93rem;
  color: var(--text-secondary);
}

.footer-links a:hover { color: var(--accent); }

.footer-bottom {
  padding-top: 26px;
  text-align: center;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.footer-disclaimer {
  max-width: 940px;
  margin: 18px auto 0;
  text-align: center;
  font-size: 0.78rem;
  line-height: 1.7;
  color: var(--text-muted);
}

/* =========================================================================
   Utility overrides for legacy inline colors
   ========================================================================= */

.accent { color: var(--accent); }
.cyan   { color: var(--cyan); }
.green  { color: var(--green); }
.amber  { color: var(--amber); }
.red    { color: var(--red); }
.white  { color: var(--text-primary); }

/* =========================================================================
   Responsive
   ========================================================================= */

@media (max-width: 1000px) {
  .hero-inner,
  .tech-layout,
  .contact-grid {
    grid-template-columns: 1fr;
    gap: 44px;
  }

  .hero { padding: 64px 0 56px; }
  .footer-inner { grid-template-columns: 1fr 1fr; gap: 36px; }
  .footer-brand { grid-column: 1 / -1; }
}

@media (max-width: 860px) {
  .nav-toggle { display: flex; }

  .nav-links {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--bg-card);
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-lg);
    padding: 10px 20px 22px;
    display: none;
  }

  .nav-links.open { display: flex; }

  .nav-links > li > a {
    display: block;
    padding: 14px 4px;
    border-bottom: 1px solid var(--border);
  }

  .nav-links > li > a::after { display: none; }

  .nav-links > li > a.nav-cta {
    text-align: center;
    margin-top: 14px;
    border-bottom: 1px solid var(--accent);
  }

  .nav-dropdown {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    box-shadow: none;
    border: 0;
    border-bottom: 1px solid var(--border);
    padding: 0 0 8px 14px;
    min-width: 0;
  }

  .section { padding: 68px 0; }
  .container, .hero-inner, .nav-inner { padding-left: 20px; padding-right: 20px; }
  .contact-form-wrap, .assessment-wrap, .hero-panel { padding: 26px; }
  .faq-answer-inner { padding-right: 10px; }
  .glow-line::before, .glow-line::after { width: 110px; }
}

@media (max-width: 520px) {
  .panel-grid { grid-template-columns: 1fr; }
  .hero-buttons .btn { width: 100%; }
  .option-btn { grid-template-columns: 1fr; gap: 10px; }
  .assessment-nav { flex-direction: column-reverse; }
  .btn-back, .btn-next { width: 100%; }
  .footer-inner { grid-template-columns: 1fr; }
}

/* =========================================================================
   Misc panels carried over from the previous templates
   ========================================================================= */

.entity-note {
  margin-top: 32px;
  padding: 20px 22px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
}

.entity-note p { font-size: 0.9rem; margin: 0; }

.page-content-panel {
  max-width: 820px;
  margin: 0 auto;
  padding: 48px;
  background: var(--bg-card);
  border: 1px solid var(--border);
}

.page-content-panel h2 { font-size: 1.8rem; margin: 34px 0 12px; }
.page-content-panel h3 { font-size: 1.32rem; margin: 26px 0 10px; }
.page-content-panel p { margin-bottom: 18px; }
.page-content-panel ul,
.page-content-panel ol { margin: 0 0 20px 22px; display: grid; gap: 8px; }
