/*
Theme Name: The eCoin Website
Theme URI: https://ecoin.website
Author: The eCoin Website
Author URI: https://ecoin.website
Description: A dark, neon-accented WordPress theme styled for cryptocurrencies — Bitcoin, Ethereum, and the broader e-coin ecosystem. Built for blogs, token projects, exchanges, and Web3 landing pages.
Version: 1.9.0
Requires at least: 6.0
Tested up to: 6.6
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: ecoin-website
Tags: dark, one-column, two-columns, custom-menu, custom-logo, featured-images, threaded-comments, translation-ready, blog, news
*/

:root {
  --cv-bg: #070a12;
  --cv-bg-2: #0b101c;
  --cv-surface: #12182a;
  --cv-surface-2: #181f35;
  --cv-border: rgba(247, 147, 26, 0.18);
  --cv-border-soft: rgba(255, 255, 255, 0.08);
  --cv-btc: #f7931a;
  --cv-eth: #627eea;
  --cv-gold: #f0b90b;
  --cv-gain: #00e396;
  --cv-loss: #ff5c7a;
  --cv-text: #e8eef8;
  --cv-muted: #8b9bb4;
  --cv-white: #ffffff;
  --cv-shadow: 0 24px 80px rgba(0, 0, 0, 0.45);
  --cv-radius: 18px;
  --cv-font: "Outfit", "Segoe UI", sans-serif;
  --cv-mono: "JetBrains Mono", ui-monospace, monospace;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background:
    radial-gradient(1200px 600px at 10% -10%, rgba(247, 147, 26, 0.14), transparent 50%),
    radial-gradient(900px 500px at 100% 0%, rgba(98, 126, 234, 0.16), transparent 45%),
    var(--cv-bg);
  color: var(--cv-text);
  font-family: var(--cv-font);
  font-size: 17px;
  line-height: 1.65;
  min-height: 100vh;
}

a {
  color: var(--cv-btc);
  text-decoration: none;
  transition: color 0.2s ease, opacity 0.2s ease;
}

a:hover {
  color: var(--cv-gold);
}

img {
  max-width: 100%;
  height: auto;
}

.cv-wrap {
  width: min(1180px, calc(100% - 40px));
  margin-inline: auto;
}

/* Header */
.cv-header {
  position: sticky;
  top: 0;
  z-index: 40;
  backdrop-filter: blur(16px);
  background: rgba(7, 10, 18, 0.78);
  border-bottom: 1px solid var(--cv-border-soft);
}

.cv-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 78px;
}

.cv-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--cv-white);
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.cv-mark {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--cv-btc), var(--cv-eth));
  display: grid;
  place-items: center;
  box-shadow: 0 0 24px rgba(247, 147, 26, 0.35);
  font-family: var(--cv-mono);
  font-size: 14px;
}

.cv-nav ul {
  display: flex;
  gap: 8px;
  list-style: none;
  margin: 0;
  padding: 0;
  flex-wrap: wrap;
}

.cv-nav a {
  color: var(--cv-muted);
  padding: 8px 12px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 500;
}

.cv-nav a:hover,
.cv-nav .current-menu-item > a {
  color: var(--cv-white);
  background: rgba(255, 255, 255, 0.06);
}

.cv-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, var(--cv-btc), #ffb347);
  color: #1a1206 !important;
  font-weight: 700;
  padding: 10px 16px;
  border-radius: 999px;
  font-size: 14px;
}

/* Hero */
.cv-hero {
  padding: 88px 0 56px;
  position: relative;
  overflow: hidden;
}

.cv-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--cv-gold);
  font-family: var(--cv-mono);
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  margin-bottom: 18px;
}

.cv-hero h1 {
  font-size: clamp(40px, 7vw, 76px);
  line-height: 1.05;
  margin: 0 0 18px;
  max-width: 22ch;
  letter-spacing: -0.03em;
}

.cv-hero h1 span {
  background: linear-gradient(90deg, var(--cv-btc), var(--cv-gold), var(--cv-eth));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.cv-lead {
  max-width: 58ch;
  color: var(--cv-muted);
  font-size: 19px;
  margin-bottom: 28px;
}

.cv-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.cv-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 13px 20px;
  border-radius: 999px;
  font-weight: 650;
  border: 1px solid transparent;
}

.cv-btn-primary {
  background: var(--cv-btc);
  color: #1a1206;
}

.cv-btn-ghost {
  border-color: var(--cv-border-soft);
  color: var(--cv-text);
  background: rgba(255, 255, 255, 0.03);
}

/* Ticker */
.cv-ticker {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin: 48px 0 8px;
}

.cv-coin {
  background: linear-gradient(180deg, var(--cv-surface), var(--cv-bg-2));
  border: 1px solid var(--cv-border-soft);
  border-radius: var(--cv-radius);
  padding: 18px;
  box-shadow: var(--cv-shadow);
  color: inherit;
  display: block;
}

a.cv-coin:hover {
  border-color: rgba(247, 147, 26, 0.45);
  color: inherit;
}

.cv-coin .sym {
  font-family: var(--cv-mono);
  font-size: 12px;
  color: var(--cv-muted);
  letter-spacing: 0.08em;
}

.cv-coin h3 {
  margin: 6px 0 10px;
  font-size: 18px;
}

.cv-price {
  font-family: var(--cv-mono);
  font-size: 22px;
}

.cv-chg.up { color: var(--cv-gain); }
.cv-chg.down { color: var(--cv-loss); }

/* Sections */
.cv-section {
  padding: 72px 0;
}

.cv-section h2 {
  font-size: clamp(28px, 4vw, 42px);
  margin: 0 0 12px;
  letter-spacing: -0.03em;
}

.cv-sub {
  color: var(--cv-muted);
  max-width: 60ch;
  margin-bottom: 32px;
}

.cv-grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.cv-card {
  background: var(--cv-surface);
  border: 1px solid var(--cv-border-soft);
  border-radius: var(--cv-radius);
  padding: 24px;
}

.cv-card h3 {
  margin-top: 0;
}

.cv-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  margin-bottom: 16px;
  background: rgba(247, 147, 26, 0.12);
  color: var(--cv-btc);
  font-size: 20px;
}

/* Posts */
.cv-posts {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 28px;
}

.cv-post {
  background: var(--cv-surface);
  border: 1px solid var(--cv-border-soft);
  border-radius: var(--cv-radius);
  overflow: hidden;
  margin-bottom: 22px;
}

.cv-post-body {
  padding: 22px 24px 26px;
}

.cv-meta {
  color: var(--cv-muted);
  font-size: 13px;
  font-family: var(--cv-mono);
  margin-bottom: 8px;
}

.cv-post h2,
.cv-post h1 {
  margin: 0 0 10px;
  font-size: 28px;
}

.cv-post h2 a {
  color: var(--cv-white);
}

article .entry-content p {
  color: #c9d3e4;
}

.cv-sidebar .widget {
  background: var(--cv-surface);
  border: 1px solid var(--cv-border-soft);
  border-radius: var(--cv-radius);
  padding: 20px;
  margin-bottom: 18px;
}

.cv-sidebar h2 {
  font-size: 16px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--cv-gold);
}

/* Footer */
.cv-footer {
  border-top: 1px solid var(--cv-border-soft);
  padding: 48px 0 28px;
  color: var(--cv-muted);
  background: rgba(0, 0, 0, 0.25);
}

.cv-footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 24px;
  margin-bottom: 28px;
}



/* Forms */
input[type="search"],
input[type="text"],
input[type="email"],
textarea {
  width: 100%;
  background: #0b101c;
  border: 1px solid var(--cv-border-soft);
  color: var(--cv-text);
  border-radius: 12px;
  padding: 10px 12px;
  font: inherit;
}

button,
input[type="submit"] {
  background: var(--cv-btc);
  color: #1a1206;
  border: 0;
  border-radius: 999px;
  padding: 10px 16px;
  font-weight: 700;
  cursor: pointer;
}

.alignwide,
.alignfull {
  width: 100%;
}

.wp-block-image img,
.featured {
  border-radius: 14px;
}

/* Hex pattern overlay */
.cv-hero::after {
  content: "";
  position: absolute;
  inset: auto -10% -30% auto;
  width: 420px;
  height: 420px;
  background:
    repeating-linear-gradient(60deg, rgba(98, 126, 234, 0.08) 0 2px, transparent 2px 18px),
    repeating-linear-gradient(-60deg, rgba(247, 147, 26, 0.08) 0 2px, transparent 2px 18px);
  pointer-events: none;
  mask-image: radial-gradient(circle, #000 40%, transparent 70%);
}

@media (max-width: 900px) {
  .cv-ticker,
  .cv-grid-3,
  .cv-posts,
  .cv-footer-grid {
    grid-template-columns: 1fr;
  }

  .cv-header-inner {
    flex-wrap: wrap;
    padding: 12px 0;
  }
}


/* Stage 1.3 — gold footer */
.cv-footer {
  position: relative;
  border-top: 0;
  padding: 0 0 28px;
  color: var(--cv-muted);
  background:
    radial-gradient(700px 180px at 20% 0%, rgba(240, 185, 11, 0.14), transparent 60%),
    radial-gradient(500px 160px at 90% 10%, rgba(247, 147, 26, 0.1), transparent 55%),
    linear-gradient(180deg, #0c0a06 0%, #070a12 100%);
}

.cv-footer-goldbar {
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--cv-gold), var(--cv-btc), var(--cv-gold), transparent);
  box-shadow: 0 0 18px rgba(240, 185, 11, 0.45);
}

.cv-footer .cv-wrap {
  padding-top: 48px;
}

.cv-footer h3 {
  color: var(--cv-gold);
  font-size: 13px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  margin: 0 0 14px;
}

.cv-footer-coins a {
  color: var(--cv-gold);
}

.cv-gold-dot {
  color: var(--cv-gold);
  padding: 0 4px;
}

.cv-ver {
  font-family: var(--cv-mono);
  font-size: 11px;
  color: var(--cv-gold);
  margin-left: 8px;
}



/* Stage 1.3 — selected coin restyles the page */
body.ecoin-on-coin {
  background:
    radial-gradient(1100px 560px at 8% -10%, rgba(var(--cv-theme-glow, 247,147,26), 0.28), transparent 52%),
    radial-gradient(800px 420px at 100% 0%, rgba(var(--cv-theme-glow, 247,147,26), 0.16), transparent 46%),
    var(--cv-theme-bg, var(--cv-bg));
}

body.ecoin-on-coin .cv-header {
  border-bottom-color: rgba(var(--cv-theme-glow, 240,185,11), 0.28);
}

body.ecoin-on-coin .cv-kicker {
  color: var(--cv-btc);
}

body.ecoin-on-coin .cv-mark {
  background: linear-gradient(135deg, var(--cv-btc), var(--cv-eth));
  box-shadow: 0 0 24px rgba(var(--cv-theme-glow, 247,147,26), 0.45);
}

body.ecoin-on-coin .cv-cta,
body.ecoin-on-coin .cv-btn-primary,
body.ecoin-on-coin button,
body.ecoin-on-coin input[type="submit"] {
  background: var(--cv-btc);
}

body.ecoin-on-coin .cv-post {
  border-color: rgba(var(--cv-theme-glow, 247,147,26), 0.28);
}

.cv-copy {
  font-size: 13px;
  border-top: 1px solid rgba(240, 185, 11, 0.18);
  padding-top: 18px;
  margin: 8px 0 0;
  text-align: center;
  justify-content: center;
  display: block;
  color: var(--cv-muted);
}

.cv-picker-label {
  display: block;
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--cv-gold);
  margin-bottom: 8px;
}
.cv-picker-search {
  max-width: 420px;
  margin-bottom: 12px;
}
.cv-picker-hint {
  color: var(--cv-muted);
  font-size: 13px;
  margin-bottom: 22px;
}
.cv-picker-grid .cv-coin[hidden] {
  display: none;
}

.cv-nav-toggle {
  display: none;
  background: transparent;
  color: var(--cv-text);
  border: 1px solid var(--cv-border-soft);
  border-radius: 999px;
  padding: 8px 14px;
}
@media (max-width: 900px) {
  .cv-nav-toggle { display: inline-flex; }
  .cv-nav { display: none; width: 100%; }
  .cv-nav.is-open { display: block; }
}


/* ==========================================================================
   Stage 1.9 — sitewide responsive foundation and page content
   Fixes: single 900px breakpoint, unstyled page/post content, landscape
   phones, horizontal overflow, small tap targets, notched-phone safe areas.
   ========================================================================== */

/* Ported from the 1.8.1 preview */
[hidden] { display: none !important; }
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
.cv-coin:focus-visible {
  outline: 2px solid var(--cv-gold);
  outline-offset: 2px;
}
.entry-content p { color: #c9d3e4; }
.cv-footer ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.cv-picker-grid { grid-template-columns: repeat(4, 1fr); }
.cv-picker-grid .cv-coin .rank { font-size: 16px; }

/* Base */
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: 96px;
}
body {
  min-height: 100vh;
  min-height: 100svh;
  overflow-x: clip;
  overflow-wrap: break-word;
}
@supports (padding: max(0px)) {
  .cv-wrap {
    width: min(1180px, calc(100% - 40px - env(safe-area-inset-left, 0px) - env(safe-area-inset-right, 0px)));
  }
}
.cv-section { padding: clamp(40px, 8vw, 72px) 0; }
.cv-hero { padding: clamp(44px, 10vw, 88px) 0 clamp(28px, 6vw, 56px); }
.cv-post-body { padding: clamp(18px, 4vw, 30px); }
.cv-post h1,
.cv-post h2 { font-size: clamp(24px, 4.5vw, 32px); line-height: 1.2; }
.cv-price { font-size: clamp(18px, 4vw, 22px); }

/* Header */
.cv-header-inner { gap: 12px 20px; }
.cv-brand { min-width: 0; }
.cv-brand > span:last-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.cv-header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}
.cv-nav { flex: 1 1 auto; min-width: 0; }
.cv-nav ul { justify-content: center; }
.cv-cta { white-space: nowrap; }

/* Page and post content */
.entry-content { overflow-wrap: break-word; }
.entry-content::after { content: ""; display: table; clear: both; }
.entry-content > *:first-child { margin-top: 0; }
.entry-content > *:last-child { margin-bottom: 0; }
.entry-content h2,
.entry-content h3,
.entry-content h4,
.entry-content h5,
.entry-content h6 {
  color: var(--cv-white);
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin: 1.7em 0 0.6em;
}
.entry-content h2 { font-size: clamp(22px, 3.6vw, 30px); }
.entry-content h3 { font-size: clamp(19px, 3vw, 24px); }
.entry-content h4 { font-size: 18px; }
.entry-content ul,
.entry-content ol { padding-left: 1.3em; margin: 0 0 1.2em; }
.entry-content li { margin: 0.35em 0; color: #c9d3e4; }
.entry-content a {
  text-decoration: underline;
  text-decoration-color: rgba(247, 147, 26, 0.45);
  text-underline-offset: 3px;
  overflow-wrap: anywhere;
}
.entry-content blockquote,
.wp-block-quote {
  margin: 1.6em 0;
  padding: 4px 0 4px 20px;
  border-left: 3px solid var(--cv-btc);
  color: var(--cv-muted);
}
.entry-content img,
.entry-content video,
.entry-content embed,
.entry-content object { max-width: 100%; height: auto; }
.entry-content iframe { max-width: 100%; border: 0; }
.entry-content pre {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  background: #0b101c;
  border: 1px solid var(--cv-border-soft);
  border-radius: 12px;
  padding: 16px;
  font-family: var(--cv-mono);
  font-size: 14px;
  line-height: 1.55;
}
.entry-content code {
  font-family: var(--cv-mono);
  font-size: 0.9em;
  background: rgba(255, 255, 255, 0.06);
  padding: 0.1em 0.4em;
  border-radius: 6px;
}
.entry-content pre code { background: none; padding: 0; }
.entry-content table {
  display: block;
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-collapse: collapse;
  margin: 0 0 1.4em;
}
.entry-content th,
.entry-content td {
  padding: 10px 14px;
  text-align: left;
  border-bottom: 1px solid var(--cv-border-soft);
}
.entry-content th { color: var(--cv-gold); font-size: 13px; letter-spacing: 0.08em; text-transform: uppercase; }
.wp-block-table { overflow-x: auto; margin: 0 0 1.4em; }
.entry-content hr,
.wp-block-separator { border: 0; border-top: 1px solid var(--cv-border-soft); margin: 2em 0; }
.entry-content figure { margin: 1.5em 0; max-width: 100%; }
.entry-content figcaption,
.wp-caption-text { color: var(--cv-muted); font-size: 13px; text-align: center; margin-top: 8px; }
.wp-caption { max-width: 100%; }
.alignleft { float: left; margin: 0.3em 1.4em 1em 0; }
.alignright { float: right; margin: 0.3em 0 1em 1.4em; }
.aligncenter { display: block; margin-inline: auto; }
.wp-block-columns { gap: clamp(16px, 3vw, 32px); }
.wp-block-button__link {
  background: var(--cv-btc);
  color: #1a1206;
  border-radius: 999px;
  font-weight: 700;
  padding: 13px 22px;
}
.wp-block-group.has-background,
.wp-block-cover { border-radius: var(--cv-radius); }
.wp-block-group.has-background { padding: clamp(16px, 3vw, 28px); }
.wp-block-embed iframe { max-width: 100%; }

/* Forms, search, comments, pagination */
input[type="url"],
input[type="tel"],
input[type="number"],
input[type="password"],
input[type="date"],
select {
  width: 100%;
  background: #0b101c;
  border: 1px solid var(--cv-border-soft);
  color: var(--cv-text);
  border-radius: 12px;
  padding: 10px 12px;
  font: inherit;
}
textarea { min-height: 120px; }
input,
select,
textarea { max-width: 100%; }
.search-form { display: flex; flex-wrap: wrap; gap: 10px; }
.search-form label { flex: 1 1 200px; }
.comment-list { list-style: none; padding: 0; margin: 0 0 24px; }
.comment-list .children { list-style: none; padding-left: clamp(12px, 4vw, 32px); }
.comment-body { padding: 14px 0; border-bottom: 1px solid var(--cv-border-soft); }
.nav-links { display: flex; flex-wrap: wrap; gap: 8px; justify-content: space-between; margin: 24px 0; }
.page-numbers { display: inline-block; padding: 8px 14px; border: 1px solid var(--cv-border-soft); border-radius: 999px; }
.page-numbers.current { background: var(--cv-btc); color: #1a1206; border-color: transparent; }

/* Touch devices: comfortable tap targets */
@media (pointer: coarse) {
  .cv-btn,
  .cv-cta,
  .cv-nav-toggle,
  button,
  input[type="submit"] { min-height: 44px; }
  .cv-nav a { padding: 12px 14px; }
}

/* Large tablets and small laptops */
@media (max-width: 1100px) {
  .cv-ticker,
  .cv-picker-grid { grid-template-columns: repeat(2, 1fr); }
  .cv-grid-3 { grid-template-columns: repeat(2, 1fr); }
  .cv-nav a { padding: 8px 10px; }
}

/* Tablets and phones: collapsible menu, stacked layouts */
@media (max-width: 900px) {
  .cv-header-inner {
    flex-wrap: wrap;
    min-height: 64px;
    padding: 10px 0;
  }
  .cv-brand { order: 1; flex: 1 1 auto; }
  .cv-header-actions { order: 2; margin-left: auto; }
  .cv-nav { order: 3; flex: 1 1 100%; }
  .cv-nav ul {
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    padding: 6px 0 12px;
  }
  .cv-nav a { display: block; }
  .cv-ticker,
  .cv-picker-grid,
  .cv-grid-3 { grid-template-columns: repeat(2, 1fr); }
  .cv-posts { grid-template-columns: 1fr; }
  .cv-footer-grid { grid-template-columns: 1fr 1fr; }
  .cv-footer-grid > :first-child { grid-column: 1 / -1; }
}

/* Phones */
@media (max-width: 600px) {
  body { font-size: 16px; }
  .cv-grid-3,
  .cv-footer-grid { grid-template-columns: 1fr; }
  .cv-ticker,
  .cv-picker-grid { gap: 10px; }
  .cv-coin { padding: 14px; }
  .cv-cta { padding: 8px 12px; font-size: 13px; }
  .cv-actions { flex-direction: column; }
  .cv-actions .cv-btn { width: 100%; }
  .alignleft,
  .alignright { float: none; display: block; margin: 1em auto; }
  .wp-block-columns { flex-wrap: wrap !important; }
  .wp-block-column { flex-basis: 100% !important; }
}

/* Very small phones */
@media (max-width: 380px) {
  .cv-ticker,
  .cv-picker-grid { grid-template-columns: 1fr; }
  .cv-brand { font-size: 14px; }
}

/* Landscape phones: short viewport, so release the sticky header */
@media (orientation: landscape) and (max-height: 520px) {
  .cv-header { position: static; backdrop-filter: none; }
  .cv-header-inner { min-height: 56px; }
  .cv-hero { padding-top: 28px; padding-bottom: 28px; }
  .cv-section { padding: 32px 0; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *,
  *::before,
  *::after { transition: none !important; animation: none !important; }
}

/* Stage 1.9 follow-up: core table borders on dark, single-row phone header */
.entry-content .wp-block-table table { width: 100%; border: 0; }
.entry-content .wp-block-table td,
.entry-content .wp-block-table th { border: 0; border-bottom: 1px solid var(--cv-border-soft); padding: 10px 14px; }
.entry-content .wp-block-table thead { border-bottom: 1px solid rgba(240, 185, 11, 0.4); }
.entry-content .wp-block-table tfoot { border-top: 1px solid var(--cv-border-soft); }
@media (max-width: 900px) {
  .cv-brand { flex: 1 1 0; }
}
