/* ============================================
   CSS VARIABLES
   ============================================ */
:root {
  --hz-navy: #002147;
  --hz-navy-2: #0a2a52;
  --hz-footer: #102f55;
  --hz-red: #ff5a36;
  --hz-red-dark: #d63a1f;
  --hz-text: #1f2937;
  --hz-muted: #6b7280;
  --hz-border: #e5e7eb;
  --hz-soft: #f7f8fb;
  --font-display: "Playfair Display", serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --transition-base: 0.2s ease;
}

html { scroll-padding-top: 75px; }

/* ============================================
   CKEditor utility classes (stored in DB, not
   in templates — Tailwind JIT won't generate)
   ============================================ */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

/* ============================================
   BASE — link defaults for CKEditor content
   ============================================ */
html { overflow-x: hidden; } /* prevent 100vw scrollbar offset */

a {
  color: inherit;
  text-decoration: none;
}

a:hover {
  color: var(--hz-navy);
  text-decoration: none;
}

/* ============================================
   NAV ACTIVE STATES (driven by CMS .Class)
   ============================================ */
nav li .active,
nav li .page-active {
  color: var(--hz-navy) !important;
  position: relative;
}

nav li .active::after,
nav li .page-active::after {
  content: "";
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 12px;
  height: 2px;
  background: var(--hz-red);
}

/* CTA / Contact button in navbar */
nav li a.contact {
  background: var(--hz-navy);
  color: #fff !important;
  border-radius: 2px;
  padding: 10px 14px !important;
  margin-left: 10px;
}

nav li a.contact:hover {
  background: var(--hz-red);
  color: #fff !important;
}

/* ============================================
   LOGO COMPONENT (Inter 600, two-line with JS dot)
   ============================================ */
.hz-logo {
  display: inline-block;
  position: relative;
}
.hz-heiko-line {
  display: block;
  line-height: 1;
}
.hz-spacer {
  visibility: hidden;
  display: inline;
  line-height: 0;
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  letter-spacing: -0.02em;
}
.hz-heiko {
  position: absolute;
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1;
}
.hz-dot {
  position: absolute;
  background: var(--hz-red);
  border-radius: 50%;
}
.hz-z-line {
  display: block;
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.1;
}
.hz-i { position: relative; }

/* Header: fontSize 28px */
.hz-logo-header .hz-spacer { font-size: 28px; }
.hz-logo-header .hz-z-line { font-size: 28px; color: #1e293b; }
.hz-logo-header .hz-heiko { font-size: 14.5px; color: #1e293b; margin-left: 1.68px; left: 22px; top: -7px; }
.hz-logo-header .hz-heiko-line { margin-bottom: -19px; }
.hz-logo-header .hz-dot { width: 10px; height: 10px; left: 10.5px; top: -2px; }

/* Footer: fontSize 21px (~75% of header), dark mode */
.hz-logo-footer .hz-spacer { font-size: 21px; }
.hz-logo-footer .hz-z-line { font-size: 21px; color: #f1f5f9; }
.hz-logo-footer .hz-heiko { font-size: 10.9px; color: #fff; margin-left: 3.75px; left: 14.25px; top: -3px; }
.hz-logo-footer .hz-heiko-line { margin-bottom: -15px; }
.hz-logo-footer .hz-dot { width: 5.5px; height: 5.5px; left: 6.4px; top: -1.5px; }

/* ============================================
   FOOTER — explicit colors (Tailwind purges arbitrary values)
   ============================================ */
.hz-footer {
  background-color: var(--hz-footer, #102f55);
  color: #cbd5e1;
}
.hz-footer-desc { font-weight: 700; font-size: 14px; color: rgba(255,255,255,0.92); margin-bottom: 10px; }
.hz-footer-sub { font-size: 12px; line-height: 1.625; color: rgba(255,255,255,0.68); }
.hz-footer-divider { background-color: rgba(255,255,255,0.08); }
.hz-footer-copy { font-size: 12px; color: rgba(255,255,255,0.68); }

/* ============================================
   CK-EDITOR CONTENT — full-width breakout
   Only sections/hero break out of the container.
   Regular page content stays within max-width.
   ============================================ */

/* ============================================
   CK-EDITOR CONTENT — base typography
   Tailwind preflight resets all heading sizes,
   margins, and list styles. Restore sensible
   defaults for HTML content stored in the DB.
   ============================================ */
.ck-content h1 { font-size: 36px; font-weight: 700; line-height: 1.2; margin: 0 0 16px; color: var(--hz-navy); }
.ck-content h2 { font-size: 28px; font-weight: 700; line-height: 1.25; margin: 32px 0 12px; color: var(--hz-navy); }
.ck-content h3 { font-size: 22px; font-weight: 600; line-height: 1.3; margin: 24px 0 10px; color: var(--hz-navy); }
.ck-content h4 { font-size: 18px; font-weight: 600; line-height: 1.35; margin: 20px 0 8px; color: var(--hz-text); }
.ck-content h5 { font-size: 16px; font-weight: 600; line-height: 1.4; margin: 16px 0 6px; color: var(--hz-text); }
.ck-content h6 { font-size: 14px; font-weight: 600; line-height: 1.4; margin: 16px 0 6px; color: var(--hz-muted); }
.ck-content p { font-size: 15px; line-height: 1.7; margin: 0 0 14px; color: var(--hz-text); }
.ck-content ul, .ck-content ol { margin: 0 0 14px; padding-left: 24px; font-size: 15px; line-height: 1.7; color: var(--hz-text); }
.ck-content ul { list-style-type: disc; }
.ck-content ol { list-style-type: decimal; }
.ck-content li { margin-bottom: 4px; }
.ck-content blockquote { margin: 16px 0; padding: 12px 20px; border-left: 3px solid var(--hz-border); color: var(--hz-muted); font-style: italic; }
.ck-content hr { border: none; border-top: 1px solid var(--hz-border); margin: 24px 0; }
.ck-content table { width: 100%; border-collapse: collapse; margin: 16px 0; font-size: 14px; }
.ck-content th, .ck-content td { padding: 10px 12px; border: 1px solid var(--hz-border); text-align: left; }
.ck-content th { background: var(--hz-soft); font-weight: 600; color: var(--hz-navy); }
.ck-content strong { font-weight: 700; }
.ck-content a { color: inherit; text-decoration: none; }
.ck-content a:hover { color: var(--hz-navy); }
.ck-content .small { font-size: 13px; }
.ck-content .hz-muted { color: var(--hz-muted); }
.mb-0 { margin-bottom: 0 !important; }
.spacer-10 { height: 10px; }
.spacer-22 { height: 18px; }
.spacer-26 { height: 22px; }

.ck-content .section,
.ck-content .hero {
  width: 100vw;
  margin-left: calc(-50vw + 50%);
  margin-right: calc(-50vw + 50%);
}

.ck-content .section .container,
.ck-content .hero .container {
  width: auto;
  max-width: 1170px;
  padding-left: 15px;
  padding-right: 15px;
  margin-left: auto;
  margin-right: auto;
}

/* Inside .container the padding is already provided — reset element padding */
.ck-content .container p,
.ck-content .container h1,
.ck-content .container h2,
.ck-content .container h3,
.ck-content .container h4 {
  padding-left: 0;
  padding-right: 0;
  max-width: none;
  margin-left: 0;
  margin-right: 0;
}

/* ============================================
   SECTIONS (used in CKEditor content)
   ============================================ */
.section { padding: 30px 0 50px; }
.section-tight { padding: 20px 0 40px; }
.about.section { padding: 30px 0 50px; }

section[id] { scroll-margin-top: 80px; }

/* ============================================
   TYPOGRAPHY (used in CKEditor content)
   ============================================ */
.hz-display {
  font-family: var(--font-display);
  color: var(--hz-navy);
}

.hz-kicker {
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--hz-navy);
}

.hz-muted { color: var(--hz-muted); }

h2.hz-display, .about h2, #focus h2, #projects h2 {
  font-size: 32px !important;
  line-height: 1.2 !important;
  font-weight: 700 !important;
}

h3 { font-size: 20px !important; line-height: 1.3 !important; }

.about p { font-size: 15px !important; line-height: 1.7 !important; }

/* ============================================
   HERO SECTION (CKEditor content)
   ============================================ */
.hero {
  padding: 50px 0 50px;
  background: #fff;
}

.hero .status {
  display: inline-block;
  padding: 10px 14px;
  border-bottom: 2px solid var(--hz-red);
  background: #fff;
  font-weight: 700;
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--hz-navy);
  margin-bottom: 32px;
}

.hero h1 {
  font-family: var(--font-display);
  color: var(--hz-navy);
  font-size: 58px;
  line-height: 1.08;
  margin: 0 0 22px;
  font-weight: 700;
}

.hero p {
  font-size: 19px;
  line-height: 1.65;
  color: var(--hz-muted);
  max-width: 880px;
  margin: 0 auto 32px;
}

/* Button wrapper — CKEditor uses .mt-18 div, not .btn-row */
.hero .mt-18,
.hero .btn-row {
  display: flex;
  gap: 12px;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  margin-top: 18px;
}

.hero .mt-18 > span { display: none; } /* hide inline spacer spans */

/* ============================================
   BUTTONS (CKEditor content)
   ============================================ */
a.btn-primary-hz,
.btn-primary-hz {
  display: inline-block;
  background: var(--hz-red);
  border: 1px solid var(--hz-red);
  border-radius: 2px;
  font-weight: 700;
  color: #fff !important;
  font-size: 15px;
  min-width: 220px;
  padding: 12px 24px;
  text-align: center;
  text-decoration: none;
  transition: all var(--transition-base);
}

a.btn-primary-hz:hover,
.btn-primary-hz:hover { background: var(--hz-red-dark); border-color: var(--hz-red-dark); color: #fff !important; }

a.btn-ghost-hz,
.btn-ghost-hz {
  display: inline-block;
  background: #fff;
  border: 1px solid #cfd6df;
  border-radius: 2px;
  font-weight: 700;
  color: var(--hz-navy);
  min-width: 220px;
  padding: 12px 24px;
  text-align: center;
  text-decoration: none;
  transition: all var(--transition-base);
}

.btn-ghost-hz:hover { border-color: var(--hz-navy); background: #f3f5f8; color: var(--hz-navy); }

/* ============================================
   CARDS (CKEditor content)
   ============================================ */
.card {
  border: 1px solid var(--hz-border);
  background: #fff;
  padding: 26px;
  transition: all var(--transition-base);
  min-height: 280px;
  display: flex;
  flex-direction: column;
  height: 100%;
  margin-bottom: 24px;
}

.card:hover {
  border-color: var(--hz-navy);
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.06);
  transform: translateY(-2px);
}

.card .icon {
  width: 46px;
  height: 46px;
  border: 1px solid #eef1f5;
  background: #f8fafc;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  color: var(--hz-navy);
  border-radius: 2px;
  margin-bottom: 14px;
  transition: all var(--transition-base);
}

.card:hover .icon { background: var(--hz-navy); border-color: var(--hz-navy); color: #fff; }

.card h3 { font-family: var(--font-display); font-weight: 700; color: var(--hz-navy); margin: 0 0 10px; font-size: 22px; }
.card p { color: var(--hz-muted); font-size: 14px; line-height: 1.6; flex-grow: 1; margin-bottom: 12px; }
.card .tags { margin-top: auto; padding-top: 12px; color: #8b95a3; font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; font-weight: 800; }

/* Bootstrap grid — used in CKEditor content */
.row { display: flex; flex-wrap: wrap; margin: 0 -15px; }
.col-sm-4, .col-sm-5, .col-sm-7 { padding: 0 15px; width: 100%; }
@media (min-width: 640px) {
  .col-sm-4 { flex: 0 0 33.333%; max-width: 33.333%; }
  .col-sm-5 { flex: 0 0 41.667%; max-width: 41.667%; }
  .col-sm-7 { flex: 0 0 58.333%; max-width: 58.333%; }
}

.card-row { margin-bottom: 24px; }
.card-row:last-child { margin-bottom: 0; }

/* ============================================
   ABOUT / PROJECTS / FOCUS (CKEditor content)
   ============================================ */
.about {
  background: var(--hz-soft);
  border-top: 1px solid var(--hz-border);
  border-bottom: 1px solid var(--hz-border);
}

.about p { font-size: 16px; line-height: 1.75; }

#projects.section {
  background: var(--hz-soft) !important;
  border-top: 1px solid var(--hz-border) !important;
  border-bottom: 1px solid var(--hz-border) !important;
}

#focus.section { background: #fff; }

.bg-line {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid rgba(0, 0, 0, 0.06);
  font-size: 13px;
  color: #7b8794;
}

/* ============================================
   SECTION HEADERS (CKEditor content)
   ============================================ */
.section-header { margin-bottom: 20px; }
.section-header h2 { margin-top: 0; margin-bottom: 8px; }
.section-header .red-line { width: 48px; height: 4px; background: var(--hz-red); margin-bottom: 14px; }
.section-header p { font-size: 15px; line-height: 1.65; max-width: 920px; margin: 0; }

/* ============================================
   WORK STYLE BOX (CKEditor content)
   ============================================ */
.work-style-box {
  border: 1px solid var(--hz-border);
  background: #fff;
  padding: 18px;
  border-radius: 2px;
}

.work-style-box .hz-kicker { color: #9aa3af; }
.work-style-item { margin: 14px 0; }
.work-style-item:first-of-type { margin-top: 10px; }
.work-style-item:last-of-type { margin-bottom: 0; }
.work-style-item strong { color: var(--hz-navy); display: block; margin-bottom: 4px; }
.work-style-item .hz-muted { font-size: 13px; }

/* ============================================
   FORMS (admin, session pages)
   Login form styles come from lucy_base.css.
   ============================================ */

label {
  display: block;
  font-weight: 600;
  font-size: 14px;
  color: var(--hz-navy);
  margin-bottom: 6px;
  margin-top: 16px;
}

label:first-of-type { margin-top: 0; }

.form-control {
  display: block;
  width: 100%;
  padding: 10px 12px;
  font-size: 15px;
  line-height: 1.5;
  color: var(--hz-text);
  background: #fff;
  border: 1px solid #d1d5db;
  border-radius: 3px;
  transition: border-color 0.15s ease;
  box-sizing: border-box;
}

.form-control:focus {
  outline: none;
  border-color: var(--hz-navy);
  box-shadow: 0 0 0 3px rgba(0, 33, 71, 0.1);
}

.btn-group {
  display: flex;
  gap: 10px;
  margin-top: 24px;
}

.btn {
  display: inline-block;
  padding: 10px 20px;
  font-size: 14px;
  font-weight: 600;
  text-align: center;
  border-radius: 3px;
  border-width: 1px;
  border-style: solid;
  cursor: pointer;
  transition: all 0.15s ease;
  text-decoration: none;
}

.btn-secondary {
  background: var(--hz-navy);
  color: #fff;
  border-color: var(--hz-navy);
}

.btn-secondary:hover {
  background: var(--hz-navy-2);
  color: #fff;
}

.btn-danger {
  background: var(--hz-red);
  color: #fff;
  border-color: var(--hz-red);
}

.btn-danger:hover {
  background: var(--hz-red-dark);
  color: #fff;
}

/* ============================================
   RESPONSIVE — content elements only
   ============================================ */
@media (max-width: 767px) {
  .hero { padding: 60px 0 40px; }
  .hero h1 { font-size: 44px; }
  .hero p { font-size: 18px; }
  .hero .mt-18, .hero .btn-row { flex-direction: column; align-items: center; gap: 12px; }
  .hero .btn-primary-hz, .hero .btn-ghost-hz { width: 260px; min-width: 0; }
  h2.hz-display { font-size: 36px; }
}
