
/* =========================================================
   CUAN128 MAIN STYLESHEET
   Sections:
   1. Variables & reset
   2. Layout
   3. Header / navigation
   4. Hero / cards / buttons
   5. Articles
   6. Running text
   7. Footer + sticky bottom navigation
   8. Responsive rules
   ========================================================= */

/* 1. VARIABLES & RESET */
:root{
  --bg:#120604;
  --bg-soft:#1d0905;
  --panel:#2a0c07;
  --panel-2:#3a1208;
  --text:#fff7ea;
  --muted:#d9b99b;
  --gold:#ffd35c;
  --orange:#ff9b20;
  --red:#b62810;
  --line:rgba(255,196,80,.18);
  --shadow:0 18px 45px rgba(0,0,0,.32);
  --radius:18px;
  --container:1120px;
}

*{box-sizing:border-box;margin:0;padding:0}
html{scroll-behavior:smooth}
body{
  font-family:Arial,Helvetica,sans-serif;
  background:
    radial-gradient(circle at top right,rgba(181,40,16,.14),transparent 28%),
    linear-gradient(180deg,#100402,#180704 52%,#100402);
  color:var(--text);
  line-height:1.7;
  min-height:100vh;
  padding-bottom:74px;
}
img{max-width:100%;display:block}
a{color:inherit;text-decoration:none}
button,input,textarea,select{font:inherit}

/* 2. LAYOUT */
.container{width:min(var(--container),92%);margin-inline:auto}
section{padding:64px 0}
.page-hero{padding:72px 0 34px}
.page-hero h1{
  font-size:clamp(2.25rem,5vw,4.4rem);
  line-height:1.08;
  margin:10px 0 14px;
}
.page-hero p{max-width:850px;color:var(--muted);font-size:1.05rem}

/* 3. HEADER / NAVIGATION */
.site-header{
  position:sticky;
  top:0;
  z-index:60;
  background:rgba(18,6,4,.94);
  border-bottom:1px solid var(--line);
  backdrop-filter:blur(10px);
}
.navbar{
  min-height:76px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:24px;
}
.brand img{width:190px;max-height:58px;object-fit:contain}
.main-menu ul{display:flex;align-items:center;gap:5px;list-style:none;flex-wrap:wrap;justify-content:flex-end}
.main-menu a{
  display:block;
  padding:9px 11px;
  border-radius:10px;
  color:var(--muted);
  font-size:.91rem;
  transition:.2s ease;
}
.main-menu a:hover,.main-menu a.active{background:rgba(255,170,40,.12);color:var(--gold)}
.menu-toggle{display:none;background:transparent;border:0;padding:8px;cursor:pointer}
.menu-toggle span{display:block;width:26px;height:2px;background:var(--gold);margin:5px 0}

.global-cta-bar{
  background:linear-gradient(90deg,#260a05,#4a1408,#260a05);
  border-bottom:1px solid var(--line);
}
.global-cta-inner{min-height:56px;display:flex;align-items:center;justify-content:flex-end;gap:10px}
.global-cta{
  padding:10px 16px;
  border-radius:11px;
  font-weight:800;
  font-size:.92rem;
  transition:.2s ease;
}
.global-cta:hover{transform:translateY(-2px)}
.global-cta.primary{background:linear-gradient(135deg,var(--gold),var(--orange));color:#2a0902}
.global-cta.help{border:1px solid rgba(255,211,92,.35);color:#ffe9b5;background:rgba(255,255,255,.04)}

/* 4. HERO / CARDS / BUTTONS */
.badge{
  display:inline-block;
  padding:6px 11px;
  border-radius:999px;
  background:rgba(255,171,34,.12);
  border:1px solid rgba(255,198,74,.18);
  color:var(--gold);
  font-size:.82rem;
  font-weight:800;
}
.btn{
  display:inline-flex;
  justify-content:center;
  align-items:center;
  padding:12px 18px;
  border-radius:12px;
  background:linear-gradient(135deg,var(--gold),var(--orange));
  color:#2a0902;
  font-weight:800;
  border:0;
  cursor:pointer;
}
.btn.secondary{background:transparent;color:var(--text);border:1px solid var(--line)}
.btn.full{width:100%}
.actions{display:flex;gap:12px;flex-wrap:wrap;margin-top:22px}
.grid{display:grid;grid-template-columns:repeat(3,1fr);gap:20px}
.card{
  background:linear-gradient(180deg,var(--panel),var(--panel-2));
  border:1px solid var(--line);
  border-radius:var(--radius);
  padding:22px;
  box-shadow:var(--shadow);
}
.card h3{margin:8px 0}
.card p{color:var(--muted)}
.news-list{display:grid;gap:18px}
.news-item{background:var(--panel);border:1px solid var(--line);border-radius:var(--radius);padding:22px}
.news-item small{color:var(--gold)}
.contact-wrap{display:grid;grid-template-columns:.85fr 1.15fr;gap:24px}
.contact-box,form{background:var(--panel);border:1px solid var(--line);border-radius:var(--radius);padding:24px}
label{display:block;margin-bottom:6px;font-weight:700}
input,textarea,select{
  width:100%;padding:12px;border-radius:10px;border:1px solid var(--line);
  background:#160704;color:var(--text);margin-bottom:15px
}
textarea{min-height:150px;resize:vertical}

/* 5. ARTICLES */
.article-hero h1{max-width:980px}
.breadcrumbs{display:flex;gap:8px;flex-wrap:wrap;color:#d6aa83;font-size:.9rem;margin-bottom:16px}
.breadcrumbs a{color:var(--gold)}
.article-section{padding-top:28px}
.article-layout{display:grid;grid-template-columns:minmax(0,1fr) 300px;gap:32px;align-items:start}
.article-prose{max-width:860px;font-size:1.035rem;line-height:1.86}
.article-prose h2{font-size:clamp(1.5rem,3vw,2.05rem);line-height:1.25;margin:36px 0 12px;color:var(--gold)}
.article-prose h3{font-size:1.2rem;margin:26px 0 8px;color:#ffe9c1}
.article-prose p{color:#f2d7c0;margin-bottom:18px}
.article-prose ul,.article-prose ol{padding-left:24px;margin:0 0 20px;color:#f2d7c0}
.article-prose a{color:var(--gold);text-decoration:underline;text-underline-offset:3px}
.article-cover{
  width:100%;max-height:520px;object-fit:cover;
  border-radius:22px;border:1px solid var(--line);
  margin-bottom:26px;box-shadow:var(--shadow)
}
.article-sidebar{position:relative}
.sticky-card{
  position:sticky;top:105px;
  background:linear-gradient(180deg,#350e07,#1c0704);
  border:1px solid var(--line);
  border-radius:18px;padding:20px;box-shadow:var(--shadow)
}
.sticky-card h3{color:var(--gold);margin-bottom:10px}
.sticky-card ul{padding-left:18px;color:var(--muted);margin-bottom:16px}
.sticky-card li{margin-bottom:8px}
.related-box{margin-top:42px;padding:22px;border:1px solid var(--line);border-radius:20px;background:rgba(255,180,50,.035)}
.related-box h2{margin-top:0}
.related-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:12px}
.related-grid a{padding:15px;border:1px solid rgba(255,200,80,.14);border-radius:13px;background:rgba(255,255,255,.025);text-decoration:none}
.related-grid strong{display:block;color:var(--gold)}
.related-grid span{display:block;color:var(--muted);font-size:.9rem;margin-top:3px}
.article-card-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:18px}
.article-card{
  display:block;background:linear-gradient(180deg,var(--panel),var(--panel-2));
  border:1px solid var(--line);border-radius:18px;padding:20px;
  min-height:245px;transition:.2s ease
}
.article-card:hover{transform:translateY(-4px);border-color:rgba(255,211,92,.5)}
.article-card h2{font-size:1.3rem;line-height:1.3;margin:13px 0 9px}
.article-card p{color:var(--muted);font-size:.94rem}
.read-more{display:inline-block;margin-top:16px;color:var(--gold);font-weight:800}

/* 6. RUNNING TEXT */
.running-text-wrap{
  width:100%;overflow:hidden;margin:32px 0;
  border-top:1px solid rgba(255,196,52,.38);
  border-bottom:1px solid rgba(255,196,52,.38);
  background:linear-gradient(90deg,#591104,#9b2808,#591104);
}
.running-text-track{display:flex;width:max-content;min-width:200%;animation:cuan-marquee 16s linear infinite}
.running-text-track span{
  min-width:50%;padding:13px 42px;white-space:nowrap;
  color:var(--gold);font-weight:900;letter-spacing:.55px;text-align:center
}
@keyframes cuan-marquee{from{transform:translateX(0)}to{transform:translateX(-50%)}}
@media(prefers-reduced-motion:reduce){.running-text-track{animation:none}}

/* 7. FOOTER + STICKY BOTTOM NAV */
footer{
  margin-top:38px;padding:34px 0 96px;
  border-top:1px solid var(--line);text-align:center;color:var(--muted)
}
.footer-logo{width:165px;margin:0 auto 14px}
.footer-links{margin:8px 0}
.footer-links a{color:var(--gold)}
.small-note{font-size:.88rem;opacity:.82}

.sticky-bottom-nav{
  position:fixed;
  left:50%;
  bottom:14px;
  transform:translateX(-50%);
  z-index:100;
  width:min(560px,calc(100% - 24px));
  display:grid;
  grid-template-columns:repeat(3,1fr);
  background:rgba(28,7,4,.97);
  border:1px solid rgba(255,211,92,.3);
  border-radius:18px;
  box-shadow:0 14px 35px rgba(0,0,0,.5);
  overflow:hidden;
  backdrop-filter:blur(10px);
}
.sticky-bottom-nav a{
  min-height:62px;
  display:flex;flex-direction:column;align-items:center;justify-content:center;
  gap:2px;font-weight:900;font-size:.77rem;color:#ffe9b2;
  border-right:1px solid rgba(255,211,92,.12);
}
.sticky-bottom-nav a:last-child{border-right:0}
.sticky-bottom-nav a:hover{background:rgba(255,176,39,.12);color:var(--gold)}
.sticky-icon{font-size:1.15rem}

/* 8. RESPONSIVE */
@media(max-width:980px){
  .article-layout{grid-template-columns:1fr}
  .article-sidebar{display:none}
  .article-card-grid{grid-template-columns:repeat(2,1fr)}
}
@media(max-width:820px){
  body{padding-bottom:82px}
  .menu-toggle{display:block}
  .main-menu{
    display:none;
    position:absolute;left:4%;right:4%;top:72px;
    background:#200905;border:1px solid var(--line);
    border-radius:16px;padding:12px;box-shadow:var(--shadow)
  }
  .main-menu.open{display:block}
  .main-menu ul{display:block}
  .main-menu a{padding:12px}
  .global-cta-inner{justify-content:center;padding:9px 0}
  .grid,.contact-wrap{grid-template-columns:1fr}
  .article-card-grid{grid-template-columns:1fr}
  .related-grid{grid-template-columns:1fr}
}
@media(max-width:560px){
  section{padding:48px 0}
  .page-hero{padding:48px 0 24px}
  .brand img{width:150px}
  .global-cta-inner{display:grid;grid-template-columns:1fr 1fr}
  .global-cta{text-align:center;padding:10px 8px}
  .sticky-bottom-nav{bottom:8px;width:calc(100% - 16px);border-radius:14px}
  .sticky-bottom-nav a{min-height:58px;font-size:.72rem}
  .running-text-track span{padding:12px 28px;font-size:.88rem}
}


/* =========================================================
   SEO95 / ACCESSIBILITY / PERFORMANCE POLISH
   ========================================================= */
.skip-link{
  position:fixed;
  left:12px;
  top:-80px;
  z-index:9999;
  padding:10px 14px;
  border-radius:10px;
  background:#ffd35c;
  color:#260800;
  font-weight:800;
}
.skip-link:focus{top:12px}

:focus-visible{
  outline:3px solid #ffd35c;
  outline-offset:3px;
}

img{
  height:auto;
}

@media (prefers-reduced-motion: reduce){
  html{scroll-behavior:auto}
  *,*::before,*::after{
    animation-duration:.01ms !important;
    animation-iteration-count:1 !important;
    transition-duration:.01ms !important;
  }
}

/* Prevent accidental horizontal layout shift on small screens */
html,body{max-width:100%;overflow-x:hidden}

/* Improve touch targets */
@media(max-width:820px){
  .main-menu a,
  .global-cta,
  .sticky-bottom-nav a{
    min-height:44px;
  }
}


/* =========================================================
   MOBILE / RESPONSIVE FIX
   Added after audit of all page templates.
   ========================================================= */

/* Missing legacy/template classes */
.hero{
  padding:64px 0;
}
.hero-grid{
  display:grid;
  grid-template-columns:minmax(0,1fr) minmax(360px,.9fr);
  gap:34px;
  align-items:center;
}
.hero h1{
  font-size:clamp(2.35rem,5vw,4.6rem);
  line-height:1.06;
  margin:14px 0 18px;
  max-width:760px;
}
.hero p{
  color:var(--muted);
  font-size:1.05rem;
  max-width:720px;
}
.gradient-text{
  background:linear-gradient(135deg,var(--gold),var(--orange));
  -webkit-background-clip:text;
  background-clip:text;
  color:transparent;
}
.hero-card{
  overflow:hidden;
  border:1px solid var(--line);
  border-radius:22px;
  background:linear-gradient(180deg,var(--panel),var(--panel-2));
  box-shadow:var(--shadow);
}
.hero-card > img{
  width:100%;
  aspect-ratio:1 / 1;
  object-fit:cover;
}
.hero-info{
  padding:18px 20px 20px;
}
.hero-info h3{
  color:var(--gold);
  margin-bottom:4px;
}
.hero-info p{
  color:var(--muted);
  font-size:.94rem;
}

.section-title{
  margin-bottom:24px;
}
.section-title h2{
  font-size:clamp(1.65rem,3vw,2.2rem);
  line-height:1.2;
  margin-bottom:8px;
}
.section-title p{
  color:var(--muted);
  max-width:760px;
}

.grid-2{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:22px;
  align-items:start;
}
.grid-3{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:20px;
}

.card{
  min-width:0;
  overflow:hidden;
}
.card > img{
  width:100%;
  aspect-ratio:16 / 10;
  object-fit:cover;
  border-radius:13px;
}
.card-body{
  padding-top:16px;
}
.card-body h3{
  line-height:1.28;
}
.tag{
  display:inline-flex;
  margin-top:14px;
  padding:5px 9px;
  border-radius:999px;
  border:1px solid rgba(255,211,92,.22);
  background:rgba(255,181,39,.08);
  color:var(--gold);
  font-size:.78rem;
  font-weight:800;
}

.info-box{
  min-width:0;
  padding:22px;
  border:1px solid var(--line);
  border-radius:var(--radius);
  background:linear-gradient(180deg,rgba(60,17,9,.74),rgba(35,9,5,.82));
  box-shadow:var(--shadow);
}
.list{
  display:grid;
  gap:12px;
}
.list-item{
  padding:15px 16px;
  border-radius:13px;
  border:1px solid rgba(255,211,92,.13);
  background:rgba(255,255,255,.025);
}
.list-item h4{
  color:var(--gold);
  margin-bottom:4px;
}
.list-item p{
  color:var(--muted);
}

.news-item{
  display:grid;
  grid-template-columns:minmax(220px,310px) minmax(0,1fr);
  gap:22px;
  align-items:center;
}
.news-item > img{
  width:100%;
  aspect-ratio:16 / 10;
  object-fit:cover;
  border-radius:14px;
}
.news-content{
  min-width:0;
}
.news-content h3{
  font-size:1.28rem;
  line-height:1.3;
  margin:6px 0 8px;
}
.news-content p{
  color:var(--muted);
}

.seo-home{
  border-top:1px solid rgba(255,211,92,.09);
  border-bottom:1px solid rgba(255,211,92,.09);
  background:rgba(255,178,35,.025);
}
.flash{
  display:none;
  margin-top:14px;
  padding:12px 14px;
  border:1px solid rgba(255,211,92,.2);
  border-radius:10px;
  background:rgba(255,178,35,.08);
  color:#ffe9bc;
}

/* Safer sizing and wrapping across every page */
html{
  -webkit-text-size-adjust:100%;
  text-size-adjust:100%;
}
body{
  overflow-wrap:anywhere;
}
main,
section,
.container,
.hero-grid,
.grid-2,
.grid-3,
.article-layout,
.article-card-grid,
.contact-wrap,
.news-item{
  min-width:0;
}
input,
textarea,
select,
button{
  max-width:100%;
}
input,
select,
textarea{
  font-size:16px; /* prevents iOS Safari auto-zoom */
}

/* Header anchoring */
.navbar{
  position:relative;
}

/* Sticky bottom navigation with mobile safe-area support */
.sticky-bottom-nav{
  bottom:calc(8px + env(safe-area-inset-bottom, 0px));
}
body{
  padding-bottom:calc(92px + env(safe-area-inset-bottom, 0px));
}
footer{
  padding-bottom:calc(110px + env(safe-area-inset-bottom, 0px));
}

/* Tablet */
@media(max-width:980px){
  .hero-grid{
    grid-template-columns:1fr 1fr;
    gap:24px;
  }
  .grid-3{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }
}

/* Mobile navigation and single-column content */
@media(max-width:820px){
  .site-header{
    position:sticky;
    top:0;
  }

  .navbar{
    min-height:68px;
    gap:14px;
  }

  .brand img{
    width:150px;
    max-height:52px;
  }

  .menu-toggle{
    display:flex;
    width:44px;
    height:44px;
    flex-direction:column;
    align-items:center;
    justify-content:center;
    border:1px solid rgba(255,211,92,.18);
    border-radius:11px;
    background:rgba(255,255,255,.025);
    flex:0 0 44px;
  }

  .main-menu{
    display:none;
    position:fixed;
    z-index:90;
    left:12px;
    right:12px;
    top:76px;
    max-height:calc(100dvh - 92px);
    overflow-y:auto;
    overscroll-behavior:contain;
    background:rgba(30,7,4,.985);
    border:1px solid rgba(255,211,92,.28);
    border-radius:16px;
    padding:10px;
    box-shadow:0 20px 50px rgba(0,0,0,.55);
  }
  .main-menu.open{
    display:block;
  }
  .main-menu ul{
    display:grid;
    grid-template-columns:1fr 1fr;
    gap:7px;
  }
  .main-menu a{
    display:flex;
    align-items:center;
    min-height:46px;
    padding:10px 12px;
    border:1px solid rgba(255,211,92,.08);
    background:rgba(255,255,255,.02);
  }

  .global-cta-inner{
    display:grid;
    grid-template-columns:1fr 1fr;
    gap:8px;
    padding:8px 0;
  }
  .global-cta{
    width:100%;
    min-width:0;
    min-height:44px;
    padding:9px 8px;
    text-align:center;
    line-height:1.25;
    font-size:.82rem;
  }

  .hero{
    padding:42px 0 48px;
  }
  .hero-grid,
  .grid-2,
  .grid-3,
  .contact-wrap,
  .news-item,
  .article-card-grid,
  .related-grid{
    grid-template-columns:1fr;
  }
  .hero-grid{
    gap:24px;
  }
  .hero h1{
    font-size:clamp(2rem,9vw,2.85rem);
  }
  .hero p,
  .page-hero p{
    font-size:1rem;
  }
  .hero-card{
    width:100%;
  }
  .hero-card > img{
    aspect-ratio:16 / 11;
  }

  .page-hero{
    padding:42px 0 22px;
  }
  .page-hero h1{
    font-size:clamp(1.95rem,8.6vw,2.8rem);
    overflow-wrap:normal;
    word-break:normal;
  }

  section{
    padding:46px 0;
  }

  .card,
  .info-box,
  .contact-box,
  form,
  .news-item{
    padding:17px;
  }
  .card > img,
  .news-item > img{
    aspect-ratio:16 / 10;
  }

  .article-section{
    padding-top:18px;
  }
  .article-prose{
    width:100%;
    max-width:none;
    font-size:1rem;
    line-height:1.78;
  }
  .article-prose h2{
    margin-top:30px;
    font-size:clamp(1.42rem,6.5vw,1.85rem);
  }
  .article-cover{
    border-radius:16px;
    margin-bottom:22px;
  }
  .article-sidebar{
    display:none;
  }

  .running-text-wrap{
    margin:22px 0;
  }
  .running-text-track span{
    padding:11px 24px;
    font-size:.82rem;
    letter-spacing:.25px;
  }

  .sticky-bottom-nav{
    width:calc(100% - 16px);
    max-width:520px;
    border-radius:14px;
  }
  .sticky-bottom-nav a{
    min-width:0;
    min-height:58px;
    padding:5px 3px;
    font-size:.7rem;
    line-height:1.1;
  }
  .sticky-icon{
    font-size:1rem;
  }

  footer{
    margin-top:24px;
  }
}

/* Narrow phones */
@media(max-width:480px){
  .container{
    width:min(100% - 28px,var(--container));
  }

  .brand img{
    width:138px;
  }

  .main-menu ul{
    grid-template-columns:1fr;
  }

  .global-cta-inner{
    width:min(100% - 20px,var(--container));
  }

  .actions{
    display:grid;
    grid-template-columns:1fr;
  }
  .actions .btn{
    width:100%;
  }

  .hero h1,
  .page-hero h1{
    hyphens:auto;
  }

  .breadcrumbs{
    gap:5px;
    font-size:.78rem;
  }

  .related-box{
    padding:16px;
  }

  .article-card{
    min-height:0;
  }

  .footer-links{
    line-height:2;
  }
}

/* Very narrow devices such as 320px screens */
@media(max-width:360px){
  .container{
    width:min(100% - 22px,var(--container));
  }
  .brand img{
    width:126px;
  }
  .page-hero h1,
  .hero h1{
    font-size:1.85rem;
  }
  .global-cta{
    font-size:.76rem;
  }
  .sticky-bottom-nav a{
    font-size:.66rem;
  }
}


/* Final hamburger visibility fix */
@media(max-width:820px){
  .menu-toggle{
    padding:0;
  }
  .menu-toggle span{
    flex:0 0 2px;
    width:24px;
    height:2px;
    margin:3px 0;
    border-radius:999px;
    background:var(--gold);
  }
}
