/* =========================================================
   MURASU E-PAPER DEMO — SHARED STYLES
   Design tokens, base styles, and reusable components
   ========================================================= */

@import url('https://fonts.googleapis.com/css2?family=Catamaran:wght@500;600;700;800;900&family=Noto+Sans+Tamil:wght@400;500;600&family=Inter:wght@400;500;600;700&display=swap');

:root{
  /* ---- Color tokens ---- */
  --ink:        #1c1a18;
  --ink-soft:   #4a443e;
  --muted:      #8a8178;
  --paper:      #fbf7ef;
  --bg:         #f4efe6;
  --line:       #e6ddcd;
  --red:        #c8202e;
  --red-dark:   #9c151f;
  --red-tint:   #fdebec;
  --gold:       #d79a3b;
  --gold-tint:  #fbf1de;
  --ink-rev:    #fffaf0;

  /* ---- Type ---- */
  --f-display: 'Catamaran', 'Noto Sans Tamil', sans-serif;
  --f-body:    'Noto Sans Tamil', 'Catamaran', sans-serif;
  --f-ui:      'Inter', 'Catamaran', sans-serif;

  /* ---- Misc ---- */
  --radius: 4px;
  --shadow-card: 0 1px 2px rgba(28,26,24,.06), 0 6px 18px -10px rgba(28,26,24,.25);
  --shadow-pop:  0 18px 50px -18px rgba(28,26,24,.45);
}

*{ box-sizing: border-box; }
html{ scroll-behavior: smooth; }
body{
  font-family: var(--f-body);
  color: var(--ink);
  background: var(--bg);
  margin: 0;
  -webkit-font-smoothing: antialiased;
}
img{ max-width: 100%; display:block; }
a{ text-decoration:none; color: inherit; }
a:focus-visible, button:focus-visible, .tab:focus-visible{
  outline: 2px solid var(--red);
  outline-offset: 2px;
}
h1,h2,h3,h4,h5{
  font-family: var(--f-display);
  margin: 0;
  letter-spacing: .01em;
}
.container-x{
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 1.25rem;
}
.eyebrow{
  font-family: var(--f-ui);
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
}

/* =========================================================
   TOP UTILITY BAR
   ========================================================= */
.topbar{
  background: var(--ink);
  color: var(--ink-rev);
  font-family: var(--f-ui);
  font-size: .8rem;
}
.topbar .container-x{
  display:flex;
  align-items:center;
  justify-content:space-between;
  height: 38px;
}
.topbar__date{
  color: #d8cfc2;
  letter-spacing: .02em;
}
.topbar__right{
  display:flex;
  align-items:center;
  gap: 1.1rem;
}
.topbar__right a{
  color: #efe6d8;
  opacity:.85;
  transition: opacity .15s, color .15s;
}
.topbar__right a:hover{ opacity:1; color: var(--gold); }
.topbar__social{
  display:flex;
  gap: .75rem;
  padding-left: 1rem;
  border-left: 1px solid rgba(255,255,255,.18);
}
.topbar__social svg{ width:15px; height:15px; display:block; }

/* =========================================================
   MAIN NAVBAR
   ========================================================= */
.navbar-main{
  background: var(--paper);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 60;
}
.navbar-main .container-x{
  display:flex;
  align-items:center;
  justify-content:space-between;
  height: 78px;
  gap: 1.5rem;
}
.brand{
  display:flex;
  align-items:center;
  gap:.65rem;
}
.brand__mark{
  width: 46px; height:46px; flex-shrink:0;
}
.brand__text{
  font-family: var(--f-display);
  font-weight: 900;
  font-size: 1.9rem;
  color: var(--ink);
  line-height: 1;
}
.brand__text span{ color: var(--red); }
.brand__tagline{
  font-family: var(--f-ui);
  font-size: .62rem;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--muted);
  margin-top: 2px;
}

.nav-links{
  display:flex;
  align-items:center;
  gap: 1.9rem;
  list-style:none;
  margin:0; padding:0;
  font-family: var(--f-display);
  font-weight: 700;
  font-size: 1.02rem;
}
.nav-links a{
  position:relative;
  padding: 6px 2px;
  color: var(--ink-soft);
  transition: color .15s;
}
.nav-links a::after{
  content:"";
  position:absolute;
  left:0; right:0; bottom:-2px;
  height: 3px;
  background: var(--red);
  border-radius: 2px;
  transform: scaleX(0);
  transition: transform .18s ease;
}
.nav-links a:hover, .nav-links a.active{ color: var(--ink); }
.nav-links a:hover::after, .nav-links a.active::after{ transform: scaleX(1); }
.nav-links .nav-epaper{
  display:inline-flex;
  align-items:center;
  gap:.4rem;
  background: var(--red);
  color: var(--ink-rev);
  padding: 8px 16px;
  border-radius: 999px;
  font-size: .92rem;
}
.nav-links .nav-epaper::after{ display:none; }
.nav-links .nav-epaper:hover{ background: var(--red-dark); color: var(--ink-rev); }
.nav-links .nav-epaper svg{ width:15px; height:15px; }

.nav-tools{
  display:flex;
  align-items:center;
  gap: .9rem;
}
.icon-btn{
  width: 38px; height:38px;
  display:flex; align-items:center; justify-content:center;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--ink-soft);
  cursor:pointer;
  transition: background .15s, color .15s, border-color .15s;
}
.icon-btn:hover{ background: var(--red); color:#fff; border-color: var(--red); }
.icon-btn svg{ width:17px; height:17px; }
.nav-burger{ display:none; }

/* =========================================================
   BREAKING NEWS TICKER
   ========================================================= */
.ticker{
  background: var(--ink);
  color: var(--ink-rev);
  overflow:hidden;
  position:relative;
}
.ticker .container-x{
  display:flex;
  align-items:center;
  height: 44px;
  gap: 1.1rem;
  padding-left: 0;
  padding-right: 0;
}
.ticker__label{
  flex-shrink:0;
  background: var(--red);
  color:#fff;
  height:100%;
  display:flex;
  align-items:center;
  gap:.4rem;
  padding: 0 1.25rem;
  font-family: var(--f-ui);
  font-weight:700;
  font-size:.78rem;
  letter-spacing:.12em;
  text-transform:uppercase;
  clip-path: polygon(0 0, 100% 0, 88% 100%, 0% 100%);
  margin-left: -1.25rem;
}
.ticker__label .dot{
  width:7px; height:7px; border-radius:50%;
  background:#fff;
  animation: pulse 1.4s ease-in-out infinite;
}
@keyframes pulse{ 0%,100%{opacity:1;} 50%{opacity:.25;} }
.ticker__track-wrap{
  flex:1;
  overflow:hidden;
  margin-left: 1.5rem;
}
.ticker__track{
  display:flex;
  gap: 3.5rem;
  white-space:nowrap;
  width: max-content;
  animation: ticker-scroll 38s linear infinite;
  font-family: var(--f-display);
  font-weight:600;
  font-size: .98rem;
}
.ticker:hover .ticker__track{ animation-play-state: paused; }
.ticker__track span{ opacity:.55; margin-right:.6rem; font-family: var(--f-ui); }
@keyframes ticker-scroll{
  from{ transform: translateX(0); }
  to{ transform: translateX(-50%); }
}

/* =========================================================
   SECTION HEADERS
   ========================================================= */
.section{ padding: 2.75rem 0; }
.section-head{
  display:flex;
  align-items:baseline;
  justify-content:space-between;
  margin-bottom: 1.25rem;
  border-bottom: 2px solid var(--ink);
  padding-bottom: .6rem;
}
.section-title{
  font-size: 1.6rem;
  font-weight: 900;
  display:flex;
  align-items:center;
  gap:.6rem;
}
.section-title::before{
  content:"";
  display:inline-block;
  width: 10px; height: 26px;
  background: var(--red);
  border-radius: 2px;
}
.section-more{
  font-family: var(--f-ui);
  font-size:.82rem;
  font-weight:700;
  color: var(--red);
  display:flex; align-items:center; gap:.3rem;
  white-space:nowrap;
}
.section-more svg{ width:14px; height:14px; }

/* =========================================================
   HERO
   ========================================================= */
.hero{ padding-top: 2.25rem; }
.hero-grid{
  display:grid;
  grid-template-columns: 1.7fr 1fr;
  gap: 1.5rem;
}
.hero-main{
  position:relative;
  border-radius: var(--radius);
  overflow:hidden;
  background: var(--ink);
  color:#fff;
  box-shadow: var(--shadow-card);
}
.hero-main__img{ aspect-ratio: 16/9; }
.hero-main__body{ padding: 1.4rem 1.6rem 1.6rem; }
.hero-main__body .news-card__tag{ margin-bottom:.6rem; }
.hero-main__body h1{
  font-size: 1.85rem;
  font-weight:800;
  line-height:1.25;
  margin-bottom:.55rem;
}
.hero-main__body p{
  color:#d8cfc2;
  font-size:.95rem;
  line-height:1.65;
  margin:0 0 .9rem;
}
.hero-side{
  display:flex;
  flex-direction:column;
  gap: 1rem;
}
.hero-side-item{
  display:flex;
  gap: .9rem;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: .7rem;
  flex: 1;
  transition: border-color .15s, transform .15s;
}
.hero-side-item:hover{ border-color: var(--red); transform: translateY(-2px); }
.hero-side-item__img{
  width: 92px; height:72px; flex-shrink:0;
  border-radius: 3px; overflow:hidden;
}
.hero-side-item__body .news-card__tag{ margin-bottom:.3rem; }
.hero-side-item__body h3{
  font-size: .98rem;
  font-weight:700;
  line-height:1.35;
}

/* =========================================================
   NEWS CARDS
   ========================================================= */
.news-card__tag{
  display:inline-block;
  font-family: var(--f-ui);
  font-size: .66rem;
  font-weight:800;
  letter-spacing:.1em;
  text-transform:uppercase;
  color: var(--red);
  background: var(--red-tint);
  padding: 3px 9px;
  border-radius: 3px;
}
.news-card{
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow:hidden;
  height:100%;
  display:flex;
  flex-direction:column;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.news-card:hover{
  transform: translateY(-4px);
  box-shadow: var(--shadow-card);
  border-color: var(--line);
}
.news-card__img{ aspect-ratio: 4/3; }
.news-card__body{
  padding: .95rem 1rem 1.1rem;
  display:flex;
  flex-direction:column;
  gap:.5rem;
  flex:1;
}
.news-card__body h3{
  font-size: 1.05rem;
  font-weight:700;
  line-height:1.4;
}
.news-card__body p{
  font-size: .85rem;
  color: var(--ink-soft);
  line-height:1.6;
  margin:0;
  flex:1;
}
.news-card__meta{
  font-family: var(--f-ui);
  font-size: .72rem;
  color: var(--muted);
  display:flex;
  align-items:center;
  gap:.4rem;
  margin-top:.2rem;
}
.news-card__meta svg{ width:12px; height:12px; }

.news-grid{
  display:grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
}
.news-grid--3{ grid-template-columns: repeat(3,1fr); }
.news-grid--2{ grid-template-columns: repeat(2,1fr); }

/* category split layout: 1 big + list */
.split-grid{
  display:grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 1.25rem;
}
.split-grid .news-card__img{ aspect-ratio: 16/10; }
.story-list{
  display:flex;
  flex-direction:column;
  gap: 0;
}
.story-list-item{
  display:flex;
  gap:.85rem;
  padding: .85rem 0;
  border-bottom: 1px solid var(--line);
}
.story-list-item:last-child{ border-bottom:none; }
.story-list-item__num{
  font-family: var(--f-display);
  font-weight:900;
  font-size:1.6rem;
  color: var(--line);
  line-height:1;
  width: 2.1rem;
  flex-shrink:0;
}
.story-list-item__body h3{
  font-size: .98rem;
  font-weight:700;
  line-height:1.4;
  margin-bottom:.25rem;
}

/* =========================================================
   PLACEHOLDER PHOTOS
   ========================================================= */
.ph-photo{
  width:100%; height:100%;
  display:flex; align-items:center; justify-content:center;
  background: linear-gradient(135deg, var(--p1, #e7c9a9), var(--p2, #c8202e));
  color: rgba(255,255,255,.85);
  position:relative;
  overflow:hidden;
}
.ph-photo svg{ width: 34%; height:34%; opacity:.9; }
.ph-photo::after{
  content:"";
  position:absolute; inset:0;
  background: linear-gradient(0deg, rgba(0,0,0,.18), transparent 55%);
}
.ph-1{ --p1:#f1cf9a; --p2:#c8202e; }
.ph-2{ --p1:#9bd1c9; --p2:#1f6f6b; }
.ph-3{ --p1:#f3c1c8; --p2:#9c151f; }
.ph-4{ --p1:#cfe0a9; --p2:#4f7d2c; }
.ph-5{ --p1:#f6dca0; --p2:#d79a3b; }
.ph-6{ --p1:#c9d6f1; --p2:#3c5a99; }
.ph-7{ --p1:#e2c6e8; --p2:#7a3c8c; }
.ph-8{ --p1:#f0b48a; --p2:#a14b1c; }

/* =========================================================
   E-PAPER PROMO BAND
   ========================================================= */
.epaper-promo{
  background: var(--ink);
  border-radius: var(--radius);
  color: var(--ink-rev);
  display:grid;
  grid-template-columns: auto 1fr auto;
  align-items:center;
  gap: 1.75rem;
  padding: 1.5rem 2rem;
  position:relative;
  overflow:hidden;
}
.epaper-promo::before{
  content:"";
  position:absolute; inset:0;
  background:
    radial-gradient(circle at 90% -10%, rgba(200,32,46,.35), transparent 55%);
}
.epaper-promo__thumb{
  width: 92px; aspect-ratio: 3/4;
  border-radius: 3px;
  box-shadow: var(--shadow-pop);
  position:relative; z-index:1;
  transform: rotate(-4deg);
}
.epaper-promo__text{ position:relative; z-index:1; }
.epaper-promo__text .eyebrow{ color: var(--gold); }
.epaper-promo__text h2{
  font-size: 1.55rem;
  font-weight:800;
  margin: .35rem 0 .35rem;
}
.epaper-promo__text p{
  margin:0;
  color:#d8cfc2;
  font-size:.92rem;
  max-width: 46ch;
}
.btn-brand{
  font-family: var(--f-ui);
  font-weight:700;
  font-size:.9rem;
  display:inline-flex; align-items:center; gap:.5rem;
  background: var(--red);
  color:#fff;
  border:none;
  padding: .8rem 1.4rem;
  border-radius: 999px;
  cursor:pointer;
  white-space:nowrap;
  transition: background .15s, transform .15s;
  position:relative; z-index:1;
}
.btn-brand:hover{ background: var(--red-dark); transform: translateY(-1px); }
.btn-brand svg{ width:16px; height:16px; }
.btn-ghost{
  font-family: var(--f-ui);
  font-weight:700;
  font-size:.85rem;
  display:inline-flex; align-items:center; gap:.45rem;
  background: transparent;
  color: var(--ink);
  border:1px solid var(--line);
  padding: .65rem 1.15rem;
  border-radius: 999px;
  cursor:pointer;
  transition: border-color .15s, color .15s;
}
.btn-ghost:hover{ border-color: var(--red); color: var(--red); }

/* =========================================================
   FOOTER
   ========================================================= */
.site-footer{
  background: var(--ink);
  color: #cfc6b9;
  margin-top: 2rem;
}
.site-footer .container-x{
  padding-top: 3rem;
  padding-bottom: 2rem;
  display:grid;
  grid-template-columns: 1.4fr 1fr 1fr 1.2fr;
  gap: 2.5rem;
}
.footer-brand .brand__text{ color:#fff; }
.footer-brand .brand__tagline{ color:#9c9389; }
.footer-brand p{
  font-size:.85rem;
  line-height:1.75;
  color:#a89e91;
  margin: 1rem 0 0;
  max-width: 32ch;
}
.footer-col h4{
  font-family: var(--f-ui);
  font-size:.78rem;
  letter-spacing:.14em;
  text-transform:uppercase;
  color: var(--gold);
  margin-bottom: 1rem;
}
.footer-col ul{ list-style:none; margin:0; padding:0; display:flex; flex-direction:column; gap:.6rem; }
.footer-col a{
  font-size:.9rem;
  color:#cfc6b9;
  transition: color .15s;
  display:inline-flex;
  align-items:center;
  gap:.45rem;
}
.footer-col a svg{ width:15px; height:15px; flex-shrink:0; }
.footer-col a:hover{ color: var(--gold); }
.footer-social{ display:flex; gap:.6rem; margin-top:1rem; }
.footer-social a{
  width:36px; height:36px; border-radius:50%;
  border:1px solid rgba(255,255,255,.15);
  display:flex; align-items:center; justify-content:center;
}
.footer-social a:hover{ background: var(--red); border-color: var(--red); }
.footer-social svg{ width:15px; height:15px; }
.footer-bottom{
  border-top:1px solid rgba(255,255,255,.1);
  font-family: var(--f-ui);
  font-size:.8rem;
  color:#9c9389;
  text-align:center;
  padding: 1.2rem 0;
}

/* =========================================================
   RESPONSIVE
   ========================================================= */
@media (max-width: 1080px){
  .news-grid{ grid-template-columns: repeat(2,1fr); }
  .news-grid--3{ grid-template-columns: repeat(2,1fr); }
  .hero-grid{ grid-template-columns: 1fr; }
  .split-grid{ grid-template-columns: 1fr; }
  .site-footer .container-x{ grid-template-columns: 1fr 1fr; }
}
@media (max-width: 860px){
  .nav-links{
    position:absolute;
    top: 78px; left:0; right:0;
    background: var(--paper);
    border-bottom:1px solid var(--line);
    flex-direction:column;
    align-items:flex-start;
    padding: 1rem 1.25rem 1.5rem;
    gap: .35rem;
    display:none;
    box-shadow: var(--shadow-card);
  }
  .nav-links.open{ display:flex; }
  .nav-links a{ width:100%; padding: .55rem 0; }
  .nav-links a::after{ display:none; }
  .nav-links .nav-epaper{ margin-top:.4rem; }
  .nav-burger{
    display:flex; width:38px; height:38px;
    border-radius:50%; border:1px solid var(--line);
    align-items:center; justify-content:center;
    background:transparent; cursor:pointer;
  }
  .nav-burger svg{ width:18px; height:18px; }
}
@media (max-width: 640px){
  .news-grid, .news-grid--3{ grid-template-columns: 1fr; }
  .site-footer .container-x{ grid-template-columns: 1fr; gap:2rem; padding-top:2.25rem; }
  .epaper-promo{ grid-template-columns: 1fr; text-align:center; padding:1.75rem 1.25rem; }
  .epaper-promo__thumb{ margin:0 auto; transform:none; }
  .epaper-promo__text p{ margin:0 auto; }
  .hero-main__body h1{ font-size:1.45rem; }
}
@media (max-width: 480px){
  .news-grid, .news-grid--3{ grid-template-columns: 1fr; }
  .brand__text{ font-size:1.5rem; }
  .topbar__date{ display:none; }
}

/* =========================================================
   SEARCH BAR (decorative)
   ========================================================= */
.search-bar{
  max-height: 0;
  overflow:hidden;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
  transition: max-height .25s ease;
}
.search-bar.open{ max-height: 70px; }
.search-bar .container-x{
  display:flex;
  align-items:center;
  gap:.75rem;
  height: 64px;
}
.search-bar input{
  flex:1;
  border: 1px solid var(--line);
  background: var(--paper);
  border-radius: 999px;
  padding: .7rem 1.2rem;
  font-family: var(--f-body);
  font-size: .95rem;
  color: var(--ink);
}
.search-bar input:focus{ outline:none; border-color: var(--red); }

/* =========================================================
   BACK TO TOP
   ========================================================= */
.back-to-top{
  position:fixed;
  right: 1.5rem; bottom: 1.5rem;
  width: 46px; height:46px;
  border-radius:50%;
  background: var(--ink);
  color:#fff;
  border:none;
  display:flex; align-items:center; justify-content:center;
  cursor:pointer;
  opacity:0; visibility:hidden;
  transform: translateY(8px);
  transition: opacity .2s, transform .2s, background .2s;
  z-index: 70;
  box-shadow: var(--shadow-card);
}
.back-to-top.show{ opacity:1; visibility:visible; transform:none; }
.back-to-top:hover{ background: var(--red); }
.back-to-top svg{ width:18px; height:18px; }

/* =========================================================
   SCROLL REVEAL
   ========================================================= */
.reveal{
  opacity:0;
  transform: translateY(14px);
  transition: opacity .5s ease, transform .5s ease;
}
.reveal.in{ opacity:1; transform:none; }
