@import url('https://fonts.googleapis.com/css2?family=Barlow+Condensed:wght@400;700;800;900&family=Space+Grotesk:wght@300;400;500;700&display=swap');

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

:root {
  --bg:     #1c1a17;
  --bg2:    #111009;
  --text:   #e8e0d0;
  --muted:  #8a8278;
  --dim:    #555;
  --border: #333;
  --yellow: #f5c518;
  --barlow: 'Barlow Condensed', sans-serif;
  --mono:   'Space Grotesk', sans-serif;
  --grotesk:'Space Grotesk', sans-serif;
}

html, body { height: 100%; overflow: hidden; background: var(--bg); color: var(--text); font-family: var(--grotesk); }

/* ─── NAV ─── */
nav {
  background: var(--bg2);
  border-bottom: 2px solid var(--yellow);
  padding: 0 40px; height: 56px;
  display: flex; align-items: center; justify-content: space-between;
}
.logo {
  font-family: var(--barlow); font-size: 22px; font-weight: 900;
  letter-spacing: 3px; text-transform: uppercase;
  color: var(--text); text-decoration: none;
}
.logo span { color: var(--yellow); }
.nav-links { display: flex; gap: 28px; list-style: none; }
.nav-links a {
  font-family: var(--barlow); font-size: 14px; font-weight: 700;
  letter-spacing: 2px; text-transform: uppercase;
  color: #888; text-decoration: none; transition: color .15s;
}
.nav-links a:hover, .nav-links a.active { color: var(--yellow); }
.nav-cta {
  font-family: var(--barlow); font-size: 13px; font-weight: 800;
  letter-spacing: 2px; text-transform: uppercase;
  background: var(--yellow); color: #111;
  padding: 8px 20px; border: none; cursor: pointer;
  text-decoration: none; display: inline-block; transition: background .15s;
}
.nav-cta:hover, .nav-cta.active { background: #ffd740; }

/* ─── PAGE LAYOUT ─── */
.page { height: calc(100vh - 56px); display: flex; flex-direction: column; overflow: hidden; }
.main { flex: 1; overflow: hidden; }

/* ─── TICKER ─── */
.ticker {
  background: var(--yellow); color: #111;
  padding: 8px 0; overflow: hidden; white-space: nowrap; flex-shrink: 0;
}
.ticker-inner {
  display: inline-block; animation: ticker 28s linear infinite;
  font-family: var(--barlow); font-size: 13px; font-weight: 800;
  letter-spacing: 3px; text-transform: uppercase;
}
@keyframes ticker { 0% { transform: translateX(0); } 100% { transform: translateX(-50%); } }

/* ─── TYPOGRAPHY ─── */
.tag {
  font-family: var(--mono); font-size: 11px; color: var(--yellow);
  letter-spacing: 3px; text-transform: uppercase;
  margin-bottom: 14px; display: flex; align-items: center; gap: 12px;
}
.tag::before { content: ''; width: 32px; height: 1px; background: var(--yellow); }

h1 {
  font-family: var(--barlow); font-size: clamp(44px, 5.5vw, 80px);
  font-weight: 900; line-height: .92;
  text-transform: uppercase; letter-spacing: -1px; margin-bottom: 20px;
}
h1 em { font-style: normal; color: var(--yellow); display: block; }

h2 {
  font-family: var(--barlow); font-size: clamp(28px, 3vw, 46px);
  font-weight: 900; line-height: .95;
  text-transform: uppercase; letter-spacing: -0.5px; margin-bottom: 12px;
}
h2 em { font-style: normal; color: var(--yellow); }

/* ─── BUTTONS ─── */
.btn-main {
  font-family: var(--barlow); font-size: 14px; font-weight: 800;
  letter-spacing: 2px; text-transform: uppercase;
  background: var(--yellow); color: #111;
  padding: 12px 24px; border: 2px solid var(--yellow); cursor: pointer;
  transition: all .15s; text-decoration: none; display: inline-block;
}
.btn-main:hover { background: transparent; color: var(--yellow); }
.btn-sec {
  font-family: var(--barlow); font-size: 14px; font-weight: 700;
  letter-spacing: 2px; text-transform: uppercase;
  background: transparent; color: var(--text);
  padding: 12px 24px; border: 2px solid var(--border); cursor: pointer;
  transition: border-color .15s; text-decoration: none; display: inline-block;
}
.btn-sec:hover { border-color: #666; }

/* ─── FOOTER ─── */
footer {
  background: var(--bg2); border-top: 1px solid var(--border);
  padding: 10px 40px; display: flex; align-items: center; justify-content: space-between;
  flex-shrink: 0;
}
.footer-logo { font-family: var(--barlow); font-size: 17px; font-weight: 900; letter-spacing: 2px; text-transform: uppercase; }
.footer-contact { font-family: var(--mono); font-size: 11px; color: var(--yellow); }
.footer-copy { font-size: 11px; color: var(--dim); }
.footer-social { display: flex; gap: 12px; align-items: center; }
.footer-social a { color: var(--dim); transition: color .15s; display: flex; }
.footer-social a:hover { color: var(--yellow); }

/* ─── FORMS ─── */
.form-group { display: flex; flex-direction: column; gap: 5px; }
label { font-family: var(--mono); font-size: 10px; letter-spacing: 2px; text-transform: uppercase; color: var(--muted); }
input, select, textarea {
  background: #0d0d0b; border: 1px solid var(--border); color: var(--text);
  padding: 7px 11px; font-family: var(--grotesk); font-size: 13px;
  outline: none; transition: border-color .15s; border-radius: 0; width: 100%;
}
input:focus, select:focus, textarea:focus { border-color: var(--yellow); }
textarea { resize: none; }
select { cursor: pointer; }
select option { background: #111; }
input[type="checkbox"] { width: 15px; height: 15px; accent-color: var(--yellow); cursor: pointer; }
.check-label { display: flex; align-items: center; gap: 9px; cursor: pointer; font-size: 13px; color: var(--muted); }

/* ─── BLOG ─── */
.blog-wrap {
  height: 100%;
  display: grid;
  grid-template-columns: 300px 1fr;
}
.blog-left {
  background: var(--bg2); border-right: 1px solid var(--border);
  padding: 28px 28px;
  display: flex; flex-direction: column; justify-content: space-between;
}
.blog-left .desc { font-size: 13px; color: var(--muted); line-height: 1.7; margin-bottom: 20px; }

.blog-categories { display: flex; flex-direction: column; gap: 0; border: 1px solid var(--border); }
.blog-cat {
  padding: 10px 14px; border-bottom: 1px solid var(--border);
  font-family: var(--barlow); font-size: 13px; font-weight: 700;
  letter-spacing: 1px; text-transform: uppercase;
  color: var(--muted); cursor: pointer; transition: all .15s;
  text-decoration: none; display: flex; align-items: center; gap: 10px;
}
.blog-cat:last-child { border-bottom: none; }
.blog-cat:hover, .blog-cat.active { color: var(--yellow); background: rgba(245,197,24,0.04); }
.blog-cat-count {
  font-family: var(--mono); font-size: 10px; color: var(--dim);
  margin-left: auto;
}

.blog-right { overflow-y: auto; }
.blog-grid {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 1px; background: var(--border);
}
.blog-card {
  background: var(--bg);
  display: flex; flex-direction: column;
  transition: background .15s;
  text-decoration: none; color: inherit;
  overflow: hidden;
}
.blog-card:hover { background: #232118; }
.blog-card:hover .blog-card-img img { transform: scale(1.05); }
.blog-card-img {
  width: 100%; height: 140px; overflow: hidden;
  border-bottom: 1px solid var(--border);
}
.blog-card-img img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform .4s ease;
}
.blog-card-body { padding: 16px 20px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.blog-card-cat {
  font-family: var(--mono); font-size: 10px; color: var(--yellow);
  letter-spacing: 2px; text-transform: uppercase;
}
.blog-card-title {
  font-family: var(--barlow); font-size: 17px; font-weight: 800;
  text-transform: uppercase; letter-spacing: 0.5px; line-height: 1.15;
  color: var(--text);
}
.blog-card-excerpt {
  font-size: 12px; color: var(--muted); line-height: 1.6;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.blog-card-meta {
  font-family: var(--mono); font-size: 10px; color: var(--dim);
  letter-spacing: 1px; margin-top: auto; display: flex; gap: 12px;
}
.blog-card-cta {
  font-family: var(--barlow); font-size: 11px; font-weight: 700;
  letter-spacing: 1.5px; text-transform: uppercase;
  color: var(--yellow); margin-top: 4px;
}

/* Blog article page */
.article-wrap {
  height: 100%;
  display: grid;
  grid-template-columns: 280px 1fr;
}
.article-left {
  background: var(--bg2); border-right: 1px solid var(--border);
  padding: 28px 24px;
  display: flex; flex-direction: column; justify-content: space-between;
}
.article-meta-block { display: flex; flex-direction: column; gap: 14px; margin-top: 20px; }
.article-meta-item {}
.article-meta-label {
  font-family: var(--mono); font-size: 9px; color: var(--dim);
  letter-spacing: 2px; text-transform: uppercase; margin-bottom: 3px;
}
.article-meta-value { font-size: 13px; color: var(--text); }

.article-nav { display: flex; flex-direction: column; gap: 6px; margin-top: auto; }
.article-nav a {
  font-family: var(--barlow); font-size: 12px; font-weight: 700;
  letter-spacing: 1px; text-transform: uppercase;
  color: var(--muted); text-decoration: none; transition: color .15s;
  padding: 6px 0; border-bottom: 1px solid var(--border);
}
.article-nav a:hover { color: var(--yellow); }

.article-right {
  padding: 32px 48px;
  overflow-y: auto;
}
.article-right::-webkit-scrollbar { width: 4px; }
.article-right::-webkit-scrollbar-track { background: transparent; }
.article-right::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }
.article-right::-webkit-scrollbar-thumb:hover { background: var(--dim); }

.article-content { max-width: 680px; }
.article-hero {
  width: 100%; border-radius: 0; margin-bottom: 28px; overflow: hidden;
  border: 1px solid var(--border);
}
.article-hero img {
  width: 100%; height: auto; display: block;
}
.article-content h3 {
  font-family: var(--barlow); font-size: 20px; font-weight: 800;
  text-transform: uppercase; letter-spacing: 0.5px;
  margin: 28px 0 12px; color: var(--text);
}
.article-content h3:first-child { margin-top: 0; }
.article-content p {
  font-size: 14px; color: var(--muted); line-height: 1.8;
  margin-bottom: 16px;
}
.article-content strong { color: var(--text); }
.article-content ul, .article-content ol {
  margin: 0 0 16px 20px; font-size: 14px; color: var(--muted); line-height: 1.8;
}
.article-content li { margin-bottom: 4px; }
.article-content li strong { color: var(--text); }
.article-tip {
  border-left: 3px solid var(--yellow); padding: 14px 18px; margin: 20px 0;
  background: rgba(245,197,24,0.04);
  font-size: 13px; color: var(--muted); line-height: 1.7;
}
.article-tip strong { color: var(--yellow); }

/* ─── BLOG RESPONSIVE ─── */
@media (max-width: 900px) {
  html, body { height: auto; overflow: auto; -webkit-text-size-adjust: 100%; }
  nav { padding: 0 14px; height: 54px; position: sticky; top: 0; z-index: 100; }
  nav .logo { font-size: 16px; letter-spacing: 2px; gap: 8px !important; }
  nav .logo img { height: 28px !important; }
  .nav-links { display: none !important; }
  .nav-cta { padding: 6px 12px; font-size: 11px; letter-spacing: 1px; }

  .page { height: auto; min-height: calc(100vh - 54px); }
  .main { overflow: visible; }
  footer {
    flex-direction: column; gap: 10px; padding: 18px 16px;
    text-align: center; align-items: center;
  }
  .footer-logo, .footer-contact, .footer-copy, .footer-social { font-size: 11px; }

  /* Blog index */
  .blog-wrap { grid-template-columns: 1fr; height: auto; }
  .blog-left {
    padding: 20px 16px; border-right: none;
    border-bottom: 1px solid var(--border);
  }
  .blog-left .desc { font-size: 13px; margin-bottom: 14px; }
  .blog-right { overflow: visible; }
  .blog-grid { grid-template-columns: 1fr; }
  .blog-card-img { height: 180px; }
  .blog-card-body { padding: 14px 16px; gap: 6px; }
  .blog-card-title { font-size: 16px; line-height: 1.2; }
  .blog-card-excerpt { -webkit-line-clamp: 2; font-size: 12px; }

  /* Article — flatten left panel so nav moves to bottom */
  .article-wrap { grid-template-columns: 1fr; height: auto; display: grid; }
  .article-left {
    display: contents;
  }
  .article-left > div:first-child {
    order: 1;
    padding: 16px 16px 18px;
    background: var(--bg2);
    border-bottom: 1px solid var(--border);
  }
  .article-left > div:first-child h2 { font-size: 24px !important; margin-bottom: 10px; }
  .article-meta-block {
    display: grid; grid-template-columns: 1fr 1fr; gap: 10px;
    margin-top: 12px;
  }
  .article-meta-label { font-size: 9px; }
  .article-meta-value { font-size: 12px; }

  .article-right {
    order: 2;
    padding: 22px 16px 28px;
    overflow: visible;
  }
  .article-content { max-width: 100%; }
  .article-content p,
  .article-content ul,
  .article-content ol { font-size: 15px; line-height: 1.7; }
  .article-content h3 { font-size: 18px; margin: 22px 0 10px; }
  .article-hero { margin-bottom: 20px; }
  .article-tip { font-size: 14px; padding: 12px 14px; }

  .article-nav {
    order: 3;
    padding: 20px 16px 22px;
    background: var(--bg2);
    border-top: 1px solid var(--border);
    flex-direction: column; gap: 0;
    margin-top: 0;
  }
  .article-nav > span {
    margin-bottom: 10px !important;
    font-family: var(--mono); font-size: 10px; color: var(--dim);
    letter-spacing: 2px; text-transform: uppercase;
  }
  .article-nav a {
    border-bottom: 1px solid var(--border); border-left: none; border-right: none; border-top: none;
    padding: 12px 2px; font-size: 13px; color: var(--text);
    display: flex; align-items: center; justify-content: space-between;
  }
  .article-nav a:last-of-type { border-bottom: none; }
  .article-nav a::after {
    content: '→'; color: var(--yellow); font-family: var(--mono);
  }

  /* Headings general shrink */
  h1 { font-size: clamp(32px, 9vw, 48px); }
  h2 { font-size: clamp(24px, 7vw, 34px); }
}

@media (min-width: 600px) and (max-width: 900px) {
  .blog-grid { grid-template-columns: 1fr 1fr; }
}
