/* ========================================================
   SHARED STYLES — YO! NELLORE
   ======================================================== */

:root {
  --ink: #0D0D0D;
  --cream: #F4F0E8;
  --orange: #FF4D00;
  --rust: #B83500;
  --white: #FFFFFF;
  --gray: #545454; /* darkened from #6B6B6B — now 5.8:1 on cream, meets WCAG AA */
  --light: #FAFAF7;
  --border: #E0DDD6;
  --nav-h: 88px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--nav-h) + 1.5rem); overflow-x: hidden; }
body { font-family: 'DM Sans', sans-serif; background: var(--cream); color: var(--ink); }

/* ---- UTILITIES ---- */
/* Screen-reader only text (WCAG 1.3.1) */
.visually-hidden {
  position: absolute; width: 1px; height: 1px; padding: 0;
  margin: -1px; overflow: hidden; clip: rect(0,0,0,0);
  white-space: nowrap; border: 0;
}

/* ---- SKIP LINK (WCAG 2.4.1) ---- */
.skip-link {
  position: absolute;
  top: -100%;
  left: 1rem;
  z-index: 9999;
  background: var(--ink);
  color: var(--white);
  padding: 0.75rem 1.4rem;
  border-radius: 0 0 10px 10px;
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
  transition: top 0.15s ease;
}
.skip-link:focus { top: 0; outline: 3px solid var(--orange); outline-offset: 2px; }

/* ---- FOCUS VISIBLE (WCAG 2.4.7, 2.4.11) ---- */
/* Remove browser default for mouse, keep for keyboard */
:focus:not(:focus-visible) { outline: none; }
:focus-visible {
  outline: 3px solid var(--orange);
  outline-offset: 3px;
  border-radius: 4px;
}
/* Pill-shaped elements get matching radius */
a.nav-cta:focus-visible,
.btn-primary:focus-visible,
.cta-btn-white:focus-visible,
.cta-btn-outline:focus-visible,
.btn-outline:focus-visible { border-radius: 100px; }

/* ---- NAV ---- */
nav { position: fixed; top: 0; left: 0; right: 0; z-index: 100; display: flex; align-items: center; justify-content: space-between; height: var(--nav-h); padding: 0 3rem; background: rgba(244,240,232,0.92); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-bottom: 1px solid var(--border); }
.nav-logo { text-decoration: none; display: inline-flex; align-items: center; height: 100%; padding: 10px 0; flex-shrink: 0; }
.nav-logo img { height: 100%; max-height: 64px; width: auto; display: block; }
.nav-links { display: flex; gap: 2.2rem; list-style: none; }
.nav-links a { font-size: 0.88rem; font-weight: 500; color: var(--gray); text-decoration: none; transition: color 0.2s; }
.nav-links a:hover, .nav-links a.active { color: var(--ink); }
.nav-cta { background: linear-gradient(135deg, var(--ink) 0%, #2a1a0a 100%); color: var(--white); border: none; border-radius: 100px; padding: 0.6rem 1.4rem; font-family: 'DM Sans', sans-serif; font-size: 0.88rem; font-weight: 600; cursor: pointer; text-decoration: none; transition: background 0.25s, transform 0.15s, box-shadow 0.25s; display: inline-flex; align-items: center; gap: 0.35rem; box-shadow: 0 2px 8px rgba(255,77,0,0.18); }
.nav-cta:hover { background: linear-gradient(135deg, var(--orange) 0%, var(--rust) 100%); transform: translateY(-1px); box-shadow: 0 4px 16px rgba(255,77,0,0.32); }
.nav-cta .ai-spark { font-size: 1rem; line-height: 1; display: inline-block; transition: transform 0.25s; }
.nav-cta:hover .ai-spark { transform: rotate(20deg) scale(1.2); }

/* ---- HAMBURGER ---- */
.nav-hamburger { display: none; flex-direction: column; gap: 5px; background: none; border: none; cursor: pointer; padding: 0.4rem; z-index: 101; }
.nav-hamburger span { display: block; width: 22px; height: 2px; background: var(--ink); border-radius: 2px; transition: transform 0.25s, opacity 0.2s; }
.nav-hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-hamburger.open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.nav-hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---- PAGE HERO (inner pages) ---- */
.page-hero { padding: 10rem 3rem 6rem; background: var(--cream); position: relative; overflow: hidden; }
.page-hero::before { content: ''; position: absolute; inset: 0; background-image: linear-gradient(var(--border) 1px, transparent 1px), linear-gradient(90deg, var(--border) 1px, transparent 1px); background-size: 60px 60px; opacity: 0.45; }
.page-hero-circle { position: absolute; top: -80px; right: -60px; width: 500px; height: 500px; border-radius: 50%; background: var(--orange); opacity: 0.07; pointer-events: none; }
.page-hero-circle-2 { position: absolute; bottom: 40px; left: -120px; width: 300px; height: 300px; border-radius: 50%; border: 2px solid var(--orange); opacity: 0.1; pointer-events: none; }
.page-hero-tag { position: relative; display: inline-flex; align-items: center; gap: 0.5rem; border: 1px solid var(--border); border-radius: 100px; padding: 0.4rem 1rem; font-size: 0.8rem; font-weight: 500; color: var(--gray); background: var(--white); margin-bottom: 1.8rem; }
.page-hero h1 { font-family: 'Syne', sans-serif; font-size: clamp(2.8rem, 6vw, 5.5rem); font-weight: 800; line-height: 1.05; letter-spacing: -0.03em; color: var(--ink); margin-bottom: 1.5rem; position: relative; }
.page-hero h1 .accent { color: var(--rust); }
.page-hero h1 .stroke { -webkit-text-stroke: 2px var(--ink); color: transparent; }
.page-hero p.lead { font-size: 1.1rem; font-weight: 300; color: var(--gray); max-width: 620px; line-height: 1.75; position: relative; }

/* ---- SHARED SECTION ---- */
section { padding: 7rem 3rem; }
.section-label { font-size: 0.75rem; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--rust); margin-bottom: 1.2rem; }
.section-title { font-family: 'Syne', sans-serif; font-size: clamp(2rem, 4vw, 3.2rem); font-weight: 800; line-height: 1.1; letter-spacing: -0.02em; color: var(--ink); }
.section-title .muted { color: var(--gray); }
.section-title .accent { color: var(--rust); }

/* ---- BUTTONS ---- */
.btn-primary { background: var(--rust); color: var(--white); border: none; border-radius: 100px; padding: 0.85rem 2rem; font-family: 'DM Sans', sans-serif; font-size: 0.95rem; font-weight: 500; cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; gap: 0.5rem; transition: background 0.2s, transform 0.15s; }
.btn-primary:hover { background: #a82f00; transform: translateY(-2px); }
.btn-outline { color: var(--ink); text-decoration: none; font-size: 0.9rem; font-weight: 500; display: inline-flex; align-items: center; gap: 0.4rem; padding: 0.82rem 1.6rem; border: 1.5px solid var(--ink); border-radius: 100px; transition: color 0.2s, border-color 0.2s; }
.btn-outline:hover { color: var(--orange); border-color: var(--orange); }

/* ---- CTA BAND ---- */
.cta-band { background: var(--rust); padding: 7rem 3rem; text-align: center; position: relative; overflow: hidden; }
.cta-band::before { content: 'YO!'; position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); font-family: 'Syne', sans-serif; font-size: 22vw; font-weight: 800; color: rgba(255,255,255,0.07); pointer-events: none; white-space: nowrap; letter-spacing: -0.05em; }
.cta-band .section-title { color: var(--white); font-size: clamp(2.5rem, 5vw, 4rem); margin-bottom: 1rem; position: relative; }
.cta-band p { color: var(--white); font-size: 1.1rem; font-weight: 300; margin-bottom: 2.5rem; position: relative; }
.cta-buttons { display: flex; justify-content: center; gap: 1rem; flex-wrap: wrap; position: relative; }
.cta-btn-white { background: var(--white); color: var(--rust); border: none; border-radius: 100px; padding: 0.95rem 2.2rem; font-family: 'DM Sans', sans-serif; font-size: 0.95rem; font-weight: 600; text-decoration: none; transition: background 0.2s, transform 0.15s; }
.cta-btn-white:hover { background: var(--cream); transform: translateY(-2px); }
.cta-btn-outline { background: transparent; color: var(--white); border: 1.5px solid rgba(255,255,255,0.5); border-radius: 100px; padding: 0.95rem 2.2rem; font-family: 'DM Sans', sans-serif; font-size: 0.95rem; font-weight: 500; text-decoration: none; transition: border-color 0.2s, background 0.2s, transform 0.15s; }
.cta-btn-outline:hover { border-color: var(--white); background: rgba(255,255,255,0.1); transform: translateY(-2px); }

/* ---- FOOTER ---- */
footer { background: var(--ink); padding: 4rem 3rem 2.5rem; }
.footer-top { display: flex; justify-content: space-between; align-items: flex-start; padding-bottom: 3rem; border-bottom: 1px solid rgba(255,255,255,0.1); margin-bottom: 2.5rem; }
.footer-brand .nav-logo img { height: 46px; }
.footer-brand p { color: rgba(255,255,255,0.65); font-size: 0.86rem; font-weight: 300; margin-top: 0.6rem; max-width: 240px; line-height: 1.65; } /* was 0.4 — failed contrast */
.footer-cols { display: flex; gap: 4rem; }
.footer-col h5 { font-family: 'Syne', sans-serif; font-size: 0.78rem; font-weight: 700; color: rgba(255,255,255,0.5); letter-spacing: 0.1em; text-transform: uppercase; margin-bottom: 1.2rem; }
.footer-col a { display: block; color: rgba(255,255,255,0.65); text-decoration: none; font-size: 0.88rem; font-weight: 300; margin-bottom: 0.65rem; transition: color 0.2s; }
.footer-col a:hover { color: var(--orange); }
.footer-bottom { display: flex; justify-content: space-between; align-items: center; }
.footer-bottom p { font-size: 0.8rem; color: rgba(255,255,255,0.55); font-weight: 300; } /* was 0.3 — failed contrast */
.footer-social { display: flex; gap: 1rem; }
.footer-social a { width: 34px; height: 34px; border-radius: 50%; border: 1px solid rgba(255,255,255,0.12); display: flex; align-items: center; justify-content: center; font-size: 0.8rem; color: rgba(255,255,255,0.4); text-decoration: none; transition: border-color 0.2s, color 0.2s, background 0.2s; }
.footer-social a:hover { border-color: var(--orange); color: var(--orange); background: rgba(255,77,0,0.08); }

/* ---- TESTIMONIALS ---- */
#testimonials { background: var(--light); }
.testimonials-header { display: flex; justify-content: space-between; align-items: flex-end; margin-bottom: 4rem; }
.testimonials-rating { text-align: right; }
.rating-stars { font-size: 1.35rem; color: #F59E0B; letter-spacing: 0.06em; line-height: 1; margin-bottom: 0.35rem; }
.rating-meta { font-size: 0.85rem; color: var(--gray); font-weight: 400; }
.rating-meta strong { color: var(--ink); font-weight: 700; }
.testimonials-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
.testimonial-card { background: var(--white); border: 1px solid var(--border); border-radius: 20px; padding: 2rem; display: flex; flex-direction: column; gap: 1.2rem; transition: border-color 0.2s, transform 0.2s; }
.testimonial-card:hover { border-color: var(--orange); transform: translateY(-4px); box-shadow: 0 8px 32px rgba(0,0,0,0.06); }
.testimonial-stars { font-size: 0.95rem; color: #F59E0B; letter-spacing: 0.06em; }
.testimonial-card blockquote { font-size: 0.95rem; color: var(--ink); line-height: 1.72; font-weight: 300; font-style: italic; flex: 1; margin: 0; }
.testimonial-author { display: flex; align-items: center; gap: 0.85rem; padding-top: 1.1rem; border-top: 1px solid var(--border); margin-top: auto; }
.testimonial-avatar { width: 40px; height: 40px; border-radius: 50%; background: linear-gradient(135deg, var(--orange), var(--rust)); display: flex; align-items: center; justify-content: center; font-family: 'Syne', sans-serif; font-weight: 800; color: #fff; font-size: 0.78rem; flex-shrink: 0; }
.testimonial-name { font-family: 'Syne', sans-serif; font-size: 0.88rem; font-weight: 700; color: var(--ink); margin-bottom: 0.15rem; }
.testimonial-role { font-size: 0.78rem; color: var(--gray); font-weight: 300; }

/* ---- ANIMATION ---- */
@keyframes fadeUp { from { opacity: 0; transform: translateY(28px); } to { opacity: 1; transform: translateY(0); } }
.anim { animation: fadeUp 0.7s ease both; }

/* ---- REDUCED MOTION (WCAG 2.3.3) ---- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  html { scroll-behavior: auto; }
}

/* ---- RESPONSIVE ---- */
@media (max-width: 900px) {
  :root { --nav-h: 76px; }
  nav { height: var(--nav-h); padding: 0 1.5rem; }
  .nav-logo { padding: 8px 0; }
  .nav-logo img { max-height: 52px; }
  .nav-links { display: none; }
  .nav-cta { display: none; }
  .nav-hamburger { display: flex; }
  .nav-links.open {
    display: flex !important;
    position: fixed;
    top: var(--nav-h);
    left: 0; right: 0;
    background: rgba(244,240,232,0.98);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    flex-direction: column;
    gap: 0;
    border-bottom: 1px solid var(--border);
    padding: 0.5rem 0 1.2rem;
    z-index: 99;
    animation: mobileMenuIn 0.2s ease;
  }
  @keyframes mobileMenuIn { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: translateY(0); } }
  .nav-links.open li { width: 100%; }
  .nav-links.open a { display: block; padding: 0.9rem 1.5rem; font-size: 1rem; color: var(--ink); border-bottom: 1px solid var(--border); font-weight: 500; }
  .nav-links.open li:last-child a { border-bottom: none; }
  section { padding: 5rem 1.5rem; }
  .page-hero { padding: calc(var(--nav-h) + 3rem) 1.5rem 4rem; }
  .testimonials-header { flex-direction: column; align-items: flex-start; gap: 1.5rem; }
  .testimonials-rating { text-align: left; }
  .testimonials-grid { grid-template-columns: 1fr; }
  .footer-top { flex-direction: column; gap: 2.5rem; }
  .footer-cols { flex-wrap: wrap; gap: 2rem; }
  /* ---- ARTICLE MOBILE ---- */
  /* Hero: shorter, tighter padding */
  .article-hero { height: 230px; }
  .article-hero-content { padding: 1rem 1.25rem 1.4rem; }
  .article-hero-content h1 { font-size: 1.35rem; line-height: 1.25; }

  /* Layout: single column, article body first, sidebar pinned to bottom */
  .article-layout {
    grid-template-columns: 1fr;
    gap: 0;
    padding: 2rem 1.25rem 3rem;
  }

  /* Sidebar: collapses to a compact section below the article */
  .article-sidebar {
    position: static;
    margin-top: 2.5rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border);
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }

  /* Author card: slim horizontal strip — no wasted vertical space */
  .sidebar-author {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 0.85rem;
    padding: 0.85rem 1rem;
    margin-bottom: 0;
    border-radius: 14px;
  }
  .author-avatar {
    width: 38px;
    height: 38px;
    font-size: 0.78rem;
    flex-shrink: 0;
    margin-bottom: 0;
  }
  .sidebar-author h4 { font-size: 0.88rem; margin-bottom: 0.1rem; }
  /* Hide bio on mobile — long bio in a slim strip wastes space */
  .sidebar-author > p { display: none; }

  /* Related articles: compact list */
  .sidebar-related { padding: 1rem 1.2rem; }
  .sidebar-related h4 { font-size: 0.82rem; margin-bottom: 0.75rem; }
  .sidebar-related li { padding: 0.55rem 0; }
  .sidebar-related a { font-size: 0.81rem; line-height: 1.4; }
  .sidebar-related .rel-cat { font-size: 0.68rem; }

  /* Article body typography adjustments */
  .article-body p { font-size: 0.97rem; line-height: 1.8; margin-bottom: 1.3rem; }
  .article-body h2 { font-size: 1.25rem; margin: 2rem 0 0.8rem; }
  .article-body h3 { font-size: 1rem; margin: 1.5rem 0 0.6rem; }
  .article-body li { font-size: 0.97rem; }
  .article-body ul, .article-body ol { padding-left: 1.2rem; }

  /* Content blocks */
  .pull-quote { margin: 1.4rem 0; padding: 0.9rem 1.2rem; }
  .pull-quote p { font-size: 1rem; }
  .callout { padding: 1rem 1.2rem; margin: 1.4rem 0; }
  pre { padding: 1rem; border-radius: 10px; }

  /* Footer nav at end of article */
  .article-footer-nav { flex-direction: column; align-items: flex-start; gap: 0.75rem; padding-top: 2rem; margin-top: 2rem; }
}

/* ---- AI BRIEF FAB ---- */
.ai-fab {
  position: fixed;
  bottom: max(1.5rem, calc(env(safe-area-inset-bottom, 0px) + 0.75rem));
  right: max(1.5rem, env(safe-area-inset-right, 1.5rem));
  z-index: 200;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: linear-gradient(145deg, #1e1e1e 0%, #0d0d0d 100%);
  border: 1.5px solid rgba(255,77,0,0.28);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  text-decoration: none;
  cursor: pointer;
  box-shadow: 0 4px 20px rgba(255,77,0,0.28), 0 2px 8px rgba(0,0,0,0.28);
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
  animation: fab-in 0.45s 0.6s cubic-bezier(0.34,1.56,0.64,1) both;
}
.ai-fab:hover {
  transform: translateY(-3px) scale(1.06);
  box-shadow: 0 10px 32px rgba(255,77,0,0.48), 0 4px 12px rgba(0,0,0,0.25);
  border-color: rgba(255,77,0,0.55);
}
.ai-fab:focus-visible {
  outline: 3px solid var(--orange);
  outline-offset: 3px;
  border-radius: 50%;
}
/* Pulsing ring */
.ai-fab::before {
  content: '';
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  border: 1.5px solid rgba(255,77,0,0.4);
  animation: fab-ring 3s ease-in-out infinite;
  pointer-events: none;
}
/* Tooltip label */
.ai-fab-tooltip {
  position: absolute;
  right: calc(100% + 0.65rem);
  top: 50%;
  transform: translateY(-50%);
  background: var(--ink);
  color: var(--white);
  font-family: 'DM Sans', sans-serif;
  font-size: 0.76rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  padding: 0.38rem 0.8rem;
  border-radius: 100px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s ease;
  box-shadow: 0 2px 10px rgba(0,0,0,0.2);
}
.ai-fab:hover .ai-fab-tooltip,
.ai-fab:focus-visible .ai-fab-tooltip { opacity: 1; }
@keyframes fab-in {
  from { opacity: 0; transform: scale(0.55) translateY(14px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}
@keyframes fab-ring {
  0%   { transform: scale(1);   opacity: 0.5; }
  65%  { transform: scale(1.5); opacity: 0; }
  100% { transform: scale(1.5); opacity: 0; }
}
/* Reduce motion */
@media (prefers-reduced-motion: reduce) {
  .ai-fab { animation: none; }
  .ai-fab::before { animation: none; }
}
