/*
Theme Name: CryptoCastle
Description: Security-first crypto WordPress theme
Version: 3.0.0
Requires at least: 6.0
Requires PHP: 8.0
Text Domain: cryptocastle
*/

/* ── TOKENS ── */
:root {
  --bg:       #060B12;
  --bg2:      #0D1520;
  --bg3:      #111D2B;
  --card:     rgba(13,21,32,0.9);
  --border:   rgba(56,189,248,0.10);
  --border2:  rgba(56,189,248,0.22);
  --teal:     #38BDF8;
  --teal2:    #0EA5E9;
  --green:    #10B981;
  --text:     #F0F6FF;
  --muted:    #64748B;
  --muted2:   #94A3B8;
  --r:        12px;
  --rl:       20px;
  --fh:       'Manrope', sans-serif;
  --fb:       'DM Sans', sans-serif;
  --fm:       'Inter', sans-serif;
}

/* ── RESET ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--fb);
  background: var(--bg);
  color: var(--text);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: var(--teal); text-decoration: none; transition: color 0.2s; }
a:hover { color: #fff; }
h1,h2,h3,h4,h5,h6 {
  font-family: var(--fh);
  font-weight: 800;
  line-height: 1.15;
  color: var(--text);
  border: none !important;
}

/* ── GLOBAL WP OVERRIDES ── */
#page, .site, #content, .site-content,
.hentry, .entry-content, .page-content, main {
  background: var(--bg) !important;
  color: var(--text) !important;
}
p { color: var(--muted2); }
.entry-title, .page-title { display: none !important; }
.wp-block-group, .wp-block-columns { background: transparent; }

/* ── HEADER ── */
#masthead {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 9999;
  height: 68px;
  background: rgba(6,11,18,0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
}
.cc-nav {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 40px;
  height: 68px;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 0;
}
.cc-nav__brand {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 10px;
  font-family: var(--fh);
  font-weight: 800;
  font-size: 17px;
  letter-spacing: 0.05em;
  color: var(--text);
  text-decoration: none;
  white-space: nowrap;
  margin-right: 48px;
  flex-shrink: 0;
}
.cc-nav__brand span { color: var(--teal); }
.cc-nav__brand-icon {
  width: 32px; height: 32px; flex-shrink: 0;
}
.cc-nav__links {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 28px;
  list-style: none;
  flex: 1;
}
.cc-nav__links li { margin: 0; padding: 0; }
.cc-nav__links a {
  color: var(--muted2);
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
  text-decoration: none;
  transition: color 0.2s;
}
.cc-nav__links a:hover { color: var(--text); }
.cc-nav__right {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 12px;
  margin-left: auto;
  flex-shrink: 0;
}
.cc-nav__search {
  width: 36px; height: 36px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.04);
  display: flex; align-items: center; justify-content: center;
  color: var(--muted2); cursor: pointer;
  transition: all 0.2s;
}
.cc-nav__search:hover { color: var(--teal); border-color: var(--border2); }
.cc-btn-outline {
  padding: 8px 18px;
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: var(--r);
  background: transparent;
  color: var(--text);
  font-family: var(--fh);
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.2s;
  white-space: nowrap;
}
.cc-btn-outline:hover { border-color: var(--teal); color: var(--teal); }
.cc-btn-solid {
  padding: 8px 20px;
  border: none;
  border-radius: var(--r);
  background: linear-gradient(135deg, var(--teal2), #0369A1);
  color: #fff;
  font-family: var(--fh);
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  text-decoration: none;
  box-shadow: 0 4px 14px rgba(14,165,233,0.4);
  transition: all 0.2s;
  white-space: nowrap;
}
.cc-btn-solid:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 22px rgba(14,165,233,0.5);
  color: #fff;
}

/* ── SITE CONTENT OFFSET ── */
#content { padding-top: 68px; }

/* ── HERO ── */
.cc-hero {
  min-height: calc(100vh - 68px);
  position: relative;
  display: flex;
  align-items: center;
  overflow: hidden;
  padding: 60px 0 40px;
}
.cc-hero__bg {
  position: absolute; inset: 0; z-index: 0;
  background:
    radial-gradient(ellipse 55% 60% at 75% 50%, rgba(14,165,233,0.13) 0%, transparent 65%),
    radial-gradient(ellipse 35% 40% at 15% 70%, rgba(16,185,129,0.05) 0%, transparent 60%),
    linear-gradient(160deg, #060B12 0%, #0A1628 60%, #060B12 100%);
}
.cc-hero__grid {
  position: absolute; inset: 0; z-index: 0;
  background-image:
    linear-gradient(rgba(56,189,248,0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(56,189,248,0.035) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse 90% 90% at 50% 50%, black 20%, transparent 100%);
  -webkit-mask-image: radial-gradient(ellipse 90% 90% at 50% 50%, black 20%, transparent 100%);
}
.cc-hero__wrap {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 40px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
  position: relative;
  z-index: 1;
  width: 100%;
}

/* LEFT */
.cc-hero__badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(14,165,233,0.08);
  border: 1px solid rgba(56,189,248,0.22);
  border-radius: 100px;
  padding: 5px 14px;
  font-family: var(--fm);
  font-size: 11px;
  font-weight: 600;
  color: var(--teal);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 24px;
}
.cc-hero__dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--teal);
  box-shadow: 0 0 8px var(--teal);
  animation: ccpulse 2s ease-in-out infinite;
}
.cc-hero__h1 {
  font-family: var(--fh) !important;
  font-size: clamp(2.6rem, 4vw, 4rem) !important;
  font-weight: 800 !important;
  color: var(--text) !important;
  line-height: 1.08 !important;
  margin: 0 0 18px !important;
  border: none !important;
}
.cc-hero__h1 .acc { color: var(--teal); }
.cc-hero__sub {
  font-size: 16px !important;
  color: var(--muted2) !important;
  line-height: 1.75 !important;
  margin-bottom: 32px !important;
  max-width: 460px;
}
.cc-hero__btns {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 12px;
  margin-bottom: 40px;
  flex-wrap: wrap;
}
.cc-hero__btn-primary {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 13px 26px;
  border-radius: var(--r);
  background: linear-gradient(135deg, var(--teal2), #0369A1);
  color: #fff !important;
  font-family: var(--fh); font-weight: 700; font-size: 15px;
  text-decoration: none;
  box-shadow: 0 4px 18px rgba(14,165,233,0.4);
  transition: all 0.2s;
}
.cc-hero__btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 28px rgba(14,165,233,0.55);
  color: #fff !important;
}
.cc-hero__btn-ghost {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 13px 26px;
  border-radius: var(--r);
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.14);
  color: var(--text) !important;
  font-family: var(--fh); font-weight: 600; font-size: 15px;
  text-decoration: none;
  transition: all 0.2s;
}
.cc-hero__btn-ghost:hover {
  border-color: var(--teal);
  color: var(--teal) !important;
  background: rgba(56,189,248,0.06);
}
.cc-hero__trust {
  display: flex; flex-direction: row;
  align-items: center; gap: 22px;
  flex-wrap: wrap;
}
.cc-hero__trust-item {
  display: flex; align-items: center; gap: 7px;
  font-size: 13px; color: var(--muted);
}
.cc-hero__trust-item svg { color: var(--teal); flex-shrink: 0; }

/* RIGHT */
.cc-hero__right {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.cc-hero__castle {
  grid-column: 1 / -1;
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 8px;
}
.cc-castle {
  width: 100%; max-width: 400px;
  filter: drop-shadow(0 0 48px rgba(56,189,248,0.28));
  animation: ccfloat 5s ease-in-out infinite;
}
.cc-fcard {
  background: rgba(13,21,32,0.85);
  border: 1px solid var(--border2);
  border-radius: var(--r);
  padding: 14px 16px;
  backdrop-filter: blur(8px);
  transition: border-color 0.2s, transform 0.2s;
}
.cc-fcard:hover { border-color: rgba(56,189,248,0.4); transform: translateY(-2px); }
.cc-fcard__icon {
  width: 32px; height: 32px; border-radius: 8px;
  background: rgba(14,165,233,0.12);
  border: 1px solid rgba(56,189,248,0.18);
  display: flex; align-items: center; justify-content: center;
  color: var(--teal); margin-bottom: 9px;
}
.cc-fcard__title { font-family: var(--fh); font-weight: 700; font-size: 13px; color: var(--text); margin-bottom: 2px; }
.cc-fcard__sub   { font-size: 12px; color: var(--muted); }

/* ── STATS BAR ── */
.cc-stats {
  background: var(--bg3);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 28px 0;
}
.cc-stats__wrap {
  max-width: 1200px; margin: 0 auto; padding: 0 40px;
  display: grid; grid-template-columns: repeat(4,1fr);
}
.cc-stat {
  display: flex; align-items: center; gap: 14px;
  padding: 0 28px;
  border-right: 1px solid var(--border);
}
.cc-stat:first-child { padding-left: 0; }
.cc-stat:last-child  { border-right: none; padding-right: 0; }
.cc-stat__icon {
  width: 42px; height: 42px; border-radius: 10px;
  background: rgba(14,165,233,0.10);
  border: 1px solid rgba(56,189,248,0.15);
  display: flex; align-items: center; justify-content: center;
  color: var(--teal); flex-shrink: 0;
}
.cc-stat__val   { font-family: var(--fh); font-weight: 800; font-size: 20px; color: var(--text); line-height: 1; display: block; }
.cc-stat__label { font-size: 12px; color: var(--muted); margin-top: 3px; display: block; }

/* ── PAGE TEMPLATE ── */
.cc-page {
  max-width: 840px;
  margin: 0 auto;
  padding: 56px 40px 80px;
}
/* Remove wrapper padding for full-bleed custom templates */
body.page-template-page-contact .cc-page,
body.page-template-page-about .cc-page,
body.page-template-page-vault .cc-page,
body.page-template-page-academy .cc-page {
  max-width: 100%;
  padding: 0;
  margin: 0;
}
/* Contact page — kill ALL extra space */
body.page-template-page-contact #content { padding-top: 0 !important; margin: 0 !important; }
body.page-template-page-contact #primary { padding: 0 !important; margin: 0 !important; }
body.page-template-page-contact .site-content { padding: 0 !important; }
body.page-template-page-contact .hentry { padding: 0 !important; margin: 0 !important; }
body.page-template-page-contact .entry-content { padding: 0 !important; margin: 0 !important; }
body.page-template-page-contact .cc-page { padding: 0 !important; margin: 0 !important; }
.cc-page__header {
  margin-bottom: 36px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
}
.cc-page__title {
  font-family: var(--fh) !important;
  font-size: clamp(1.8rem,3vw,2.4rem) !important;
  font-weight: 800 !important;
  color: var(--text) !important;
  border: none !important;
  margin: 0 !important;
}
.cc-page__body { font-size: 15px; line-height: 1.8; color: var(--muted2); }
.cc-page__body h2 { font-size: 1.45rem; padding-bottom: 10px; border-bottom: 1px solid var(--border) !important; margin: 1.8em 0 0.7em; }
.cc-page__body h3 { font-size: 1.15rem; margin: 1.5em 0 0.6em; }
.cc-page__body p  { margin-bottom: 1.2em; color: var(--muted2); }
.cc-page__body a  { color: var(--teal); }
.cc-page__body ul, .cc-page__body ol { margin: 0 0 1.2em 1.4em; }
.cc-page__body li { margin-bottom: 6px; color: var(--muted2); }
.cc-page__body ul li::marker { color: var(--teal); }
.cc-page__body blockquote {
  border-left: 3px solid var(--teal);
  padding: 12px 18px;
  background: rgba(14,165,233,0.06);
  border-radius: 0 var(--r) var(--r) 0;
  margin: 1.4em 0; font-style: italic;
}
.cc-page__body .wp-block-button__link,
.cc-page__body .wp-element-button {
  background: linear-gradient(135deg, var(--teal2), #0369A1) !important;
  color: #fff !important; border: none !important;
  border-radius: var(--r) !important;
  font-family: var(--fh) !important; font-weight: 700 !important;
  box-shadow: 0 4px 14px rgba(14,165,233,0.35) !important;
  padding: 12px 26px !important;
}
.cc-page__body .wp-block-group {
  background: rgba(13,21,32,0.7) !important;
  border: 1px solid var(--border) !important;
  border-radius: var(--rl) !important;
  padding: 28px !important;
  margin: 20px 0 !important;
}
.cc-page__body .wp-block-group:hover { border-color: var(--border2) !important; }
.cc-page__body .wp-block-columns { gap: 20px !important; margin: 20px 0 !important; }
.cc-page__body .wp-block-column {
  background: rgba(13,21,32,0.7) !important;
  border: 1px solid var(--border) !important;
  border-radius: var(--r) !important;
  padding: 22px !important;
}

/* ── FOOTER ── */
#colophon {
  background: var(--bg2) !important;
  border-top: 1px solid var(--border) !important;
  padding: 40px 0 !important;
}
.cc-footer {
  max-width: 1200px; margin: 0 auto; padding: 0 40px;
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 16px;
}
.cc-footer__brand {
  display: flex; align-items: center; gap: 8px;
  font-family: var(--fh); font-weight: 800; font-size: 15px; color: var(--text);
}
.cc-footer__brand span { color: var(--teal); }
.cc-footer__copy { font-size: 13px; color: var(--muted); }
.cc-footer__links { display: flex; gap: 18px; }
.cc-footer__links a { font-size: 13px; color: var(--muted); }
.cc-footer__links a:hover { color: var(--teal); }

/* ── ANIMATIONS ── */
@keyframes ccfloat  { 0%,100%{transform:translateY(0)} 50%{transform:translateY(-10px)} }
@keyframes ccpulse  { 0%,100%{opacity:1} 50%{opacity:0.3} }
@keyframes ccfadeup { from{opacity:0;transform:translateY(16px)} to{opacity:1;transform:translateY(0)} }

.cc-hero__left  { animation: ccfadeup 0.7s ease both; }
.cc-hero__right { animation: ccfadeup 0.7s ease 0.15s both; }

/* ── RESPONSIVE ── */
@media (max-width: 960px) {
  .cc-hero__wrap { grid-template-columns: 1fr; }
  .cc-hero__right { display: none; }
  .cc-stats__wrap { grid-template-columns: repeat(2,1fr); gap: 20px; }
  .cc-stat { border-right: none; padding: 0; }
}
@media (max-width: 640px) {
  .cc-nav__links { display: none; }
  .cc-hero { padding: 40px 0 30px; }
  .cc-hero__wrap { padding: 0 20px; }
  .cc-page { padding: 32px 20px 60px; }
  .cc-footer { padding: 0 20px; }
}

/* Hero image float animation */
.cc-hero__castle img {
  animation: ccfloat 5s ease-in-out infinite;
  border-radius: 16px;
}
