/*
Theme Name: Digital Detox Benefits
Author: Mr. Faheem Shahzad
Author URI: https://rankyourwebsite.site
Description: Practical ways to spend less time on your screens. An editorial theme for Digital Detox Benefits built around a habit-tracking snapshot instead of a market ticker.
Version: 1.0.0
Requires at least: 6.0
Requires PHP: 7.4
Tested up to: 6.6
License: GNU General Public License v2 or later
License URI: LICENSE
Text Domain: tradernews
*/

/* ---------------------------------------------
   Design tokens
--------------------------------------------- */
:root{
  --bg: #F7F9F6;
  --paper: #FFFFFF;
  --ink: #16231E;
  --ink-soft: #4A564F;
  --accent: #2E7D6B;
  --accent-deep: #084F39;
  --gold: #C9A227;
  --rose: #A63D40;
  --line: #D8DED9;
  --line-strong: #B9C4BC;
  --font-display: "Source Serif 4", Georgia, "Times New Roman", serif;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --max: 1180px;
}

*, *::before, *::after{ box-sizing: border-box; }
html{ scroll-behavior: smooth; }
body{
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
img{ max-width: 100%; display: block; }
a{ color: inherit; text-decoration: none; }
ul{ margin: 0; padding: 0; list-style: none; }
h1,h2,h3,h4{ font-family: var(--font-display); margin: 0; font-weight: 600; }
p{ margin: 0 0 1em; }
.wrap{ max-width: var(--max); margin: 0 auto; padding: 0 24px; }
:focus-visible{ outline: 2px solid var(--accent); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce){
  *{ animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; scroll-behavior: auto !important; }
}

/* ---------------------------------------------
   Utility bar
--------------------------------------------- */
.utility-bar{
  background: var(--ink);
  color: #DCE7E1;
  font-size: 13px;
}
.utility-bar .wrap{
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 8px;
  padding-bottom: 8px;
}
.utility-bar .status{ display: flex; align-items: center; gap: 8px; }
.utility-bar .status-dot{
  width: 7px; height: 7px; border-radius: 50%;
  background: #56C596;
  box-shadow: 0 0 0 3px rgba(86,197,150,0.2);
}

/* ---------------------------------------------
   Ticker
--------------------------------------------- */
.ticker{
  background: var(--accent-deep);
  overflow: hidden;
  white-space: nowrap;
  position: relative;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.ticker-track{
  display: inline-flex;
  align-items: center;
  animation: scroll-ticker 38s linear infinite;
  padding: 10px 0;
}
.ticker-item{
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 22px;
  border-right: 1px solid rgba(255,255,255,0.12);
  font-variant-numeric: tabular-nums;
  font-size: 13.5px;
  color: #EAF3EE;
}
.ticker-item .sym{ color: #9FD9BE; font-weight: 600; }
.ticker-item .chg.up{ color: #7FE3B4; }
.ticker-item .chg.down{ color: #F0A2A5; }
@keyframes scroll-ticker{
  from{ transform: translateX(0); }
  to{ transform: translateX(-50%); }
}

/* ---------------------------------------------
   Masthead
--------------------------------------------- */
.masthead{
  background: var(--paper);
  border-bottom: 1px solid var(--line);
}
.masthead .wrap{
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px 24px;
}
.logo{
  font-family: var(--font-display);
  font-size: 30px;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.logo span{ color: var(--accent); }
.tagline{
  font-size: 13px;
  color: var(--ink-soft);
  margin-top: 2px;
}
.main-nav ul{ display: flex; gap: 28px; }
.main-nav a{
  font-size: 14.5px;
  font-weight: 500;
  padding-bottom: 4px;
  border-bottom: 2px solid transparent;
  transition: border-color 0.15s ease, color 0.15s ease;
}
.main-nav a:hover, .main-nav a.current{
  border-color: var(--accent);
  color: var(--accent-deep);
}
.nav-toggle{ display: none; background: none; border: 1px solid var(--line-strong); border-radius: 6px; padding: 8px 10px; }

/* ---------------------------------------------
   Hero
--------------------------------------------- */
.hero{ padding: 40px 0 44px; }
.hero-grid{
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: 40px;
  align-items: start;
}
.category-tag{
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 13px;
  font-weight: 600;
  color: var(--accent-deep);
  margin-bottom: 12px;
}
.category-tag::before{
  content: "";
  width: 7px; height: 7px;
  background: var(--gold);
  display: inline-block;
}
.hero-story .thumb{
  width: 100%;
  aspect-ratio: 16/9;
  background: linear-gradient(135deg, var(--accent-deep), var(--accent) 55%, #2E9B72);
  margin-bottom: 20px;
  position: relative;
  overflow: hidden;
}
.hero-story .thumb::after{
  content: "";
  position: absolute; inset: 0;
  background-image: repeating-linear-gradient(90deg, rgba(255,255,255,0.06) 0 1px, transparent 1px 64px);
}
.hero-story h1{
  font-size: 40px;
  line-height: 1.14;
  margin-bottom: 14px;
}
.hero-story .dek{
  font-size: 17px;
  color: var(--ink-soft);
  max-width: 62ch;
}
.byline{
  margin-top: 18px;
  font-size: 13px;
  color: var(--ink-soft);
  display: flex;
  gap: 10px;
  align-items: center;
}
.byline .dot{ width: 3px; height: 3px; background: var(--line-strong); border-radius: 50%; }

/* Market pulse panel */
.pulse-panel{
  background: var(--paper);
  border: 1px solid var(--line);
}
.pulse-head{
  padding: 16px 20px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.pulse-head h3{ font-size: 15px; }
.pulse-head .as-of{ font-size: 12px; color: var(--ink-soft); }
.pulse-row{
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 13px 20px;
  border-bottom: 1px solid var(--line);
  font-size: 14.5px;
}
.pulse-row:last-child{ border-bottom: none; }
.pulse-row .name{ font-weight: 500; }
.pulse-row .name small{ display: block; font-weight: 400; color: var(--ink-soft); font-size: 12px; }
.pulse-figs{ text-align: right; font-variant-numeric: tabular-nums; }
.pulse-figs .price{ font-weight: 600; }
.pulse-figs .chg{ font-size: 12.5px; }
.chg.up{ color: var(--accent-deep); }
.chg.down{ color: var(--rose); }

/* ---------------------------------------------
   Story grid
--------------------------------------------- */
.section-head{
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  border-bottom: 1px solid var(--line-strong);
  padding-bottom: 12px;
  margin-bottom: 24px;
}
.section-head h2{ font-size: 22px; }
.section-head .view-all{ font-size: 13.5px; font-weight: 500; color: var(--accent-deep); }
.story-grid{
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  padding-bottom: 48px;
}
.story-card .thumb{
  width: 100%;
  aspect-ratio: 4/3;
  background: #E7EDE9;
  margin-bottom: 14px;
  position: relative;
}
.story-card .thumb.commodity{ background: linear-gradient(160deg,#EFE6C4,#D9C67E); }
.story-card .thumb.fx{ background: linear-gradient(160deg,#DCEAE3,#9FD9BE); }
.story-card .thumb.policy{ background: linear-gradient(160deg,#EAD9D9,#D6AFAF); }
.story-card h3{ font-size: 18.5px; line-height: 1.3; margin-bottom: 8px; }
.story-card a:hover h3{ color: var(--accent-deep); }
.story-card .excerpt{ font-size: 14px; color: var(--ink-soft); }
.story-card .byline{ margin-top: 12px; }

/* ---------------------------------------------
   Newsletter
--------------------------------------------- */
.newsletter{
  background: var(--accent-deep);
  color: #EAF3EE;
  padding: 44px 0;
}
.newsletter .wrap{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}
.newsletter h2{ color: #fff; font-size: 24px; max-width: 32ch; }
.newsletter p{ color: #BFDACD; margin-top: 8px; }
.nl-form{ display: flex; gap: 10px; flex-wrap: wrap; }
.nl-form input[type="email"]{
  padding: 12px 14px;
  border: 1px solid rgba(255,255,255,0.25);
  background: rgba(255,255,255,0.06);
  color: #fff;
  min-width: 260px;
  font-size: 14px;
}
.nl-form input[type="email"]::placeholder{ color: #9FC1B0; }
.nl-form button{
  padding: 12px 22px;
  background: var(--gold);
  color: #22200B;
  border: none;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
}
.nl-form button:hover{ background: #DBB33C; }

/* ---------------------------------------------
   Footer
--------------------------------------------- */
.site-footer{ background: var(--ink); color: #B9C7BF; padding: 48px 0 28px; }
.footer-grid{
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 32px;
  padding-bottom: 32px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}
.footer-grid h4{ color: #fff; font-size: 14px; margin-bottom: 14px; font-family: var(--font-body); }
.footer-grid li{ margin-bottom: 9px; font-size: 13.5px; }
.footer-grid a:hover{ color: #7FE3B4; }
.footer-brand .logo{ color: #fff; font-size: 22px; }
.footer-brand .logo span{ color: #7FE3B4; }
.footer-brand p{ font-size: 13.5px; margin-top: 10px; max-width: 40ch; }
.footer-bottom{
  padding-top: 20px;
  display: flex;
  justify-content: space-between;
  font-size: 12.5px;
  color: #7E8C84;
  flex-wrap: wrap;
  gap: 10px;
}

/* ---------------------------------------------
   Single / page content
--------------------------------------------- */
.content-wrap{ padding: 44px 0 60px; }
.article-header{ max-width: 74ch; margin: 0 auto 28px; }
.article-header h1{ font-size: 34px; line-height: 1.18; margin-bottom: 14px; }
.article-body{ max-width: 74ch; margin: 0 auto; font-size: 17.5px; }
.article-body p{ margin-bottom: 1.3em; }
.article-body h2{ font-size: 24px; margin: 1.6em 0 0.6em; }
.article-body blockquote{
  border-left: 3px solid var(--accent);
  margin: 1.6em 0;
  padding: 4px 0 4px 20px;
  color: var(--ink-soft);
  font-style: italic;
}

/* ---------------------------------------------
   Responsive
--------------------------------------------- */
@media (max-width: 900px){
  .hero-grid{ grid-template-columns: 1fr; }
  .story-grid{ grid-template-columns: 1fr 1fr; }
  .footer-grid{ grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px){
  .main-nav{ display: none; position: absolute; top: 100%; left: 0; right: 0; background: var(--paper); border-bottom: 1px solid var(--line); }
  .main-nav.open{ display: block; }
  .main-nav ul{ flex-direction: column; padding: 10px 24px 18px; gap: 4px; }
  .main-nav a{ display: block; padding: 10px 0; border-bottom: 1px solid var(--line); }
  .nav-toggle{ display: inline-flex; }
  .masthead .wrap{ position: relative; }
  .hero-story h1{ font-size: 28px; }
  .story-grid{ grid-template-columns: 1fr; }
  .footer-grid{ grid-template-columns: 1fr; }
  .newsletter .wrap{ flex-direction: column; align-items: flex-start; }
}
