/*
Theme Name: DevX Atlas
Theme URI: https://devxatlas.space
Author: DevX Atlas
Description: A professional theme for a web development business. It shows the common website problems clients face, and how you fix each one, with flip cards and 3D effects. No testimonials. Challenges are editable from the WordPress dashboard.
Version: 2.0.0
Requires at least: 6.0
Requires PHP: 7.4
License: GPLv2 or later
Text Domain: devx-atlas
*/

:root {
  --navy: #0a1128;
  --navy-2: #111b3a;
  --ink: #13203f;
  --text: #3a445c;
  --blue: #3b82f6;
  --blue-dark: #2563eb;
  --cyan: #22d3ee;
  --soft: #f4f7fc;
  --line: #e2e8f2;
  --white: #fff;
  --radius: 14px;
  --shadow: 0 10px 30px rgba(10, 17, 40, .08);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 17px;
  line-height: 1.65;
  color: var(--text);
  background: var(--white);
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; }
a { color: var(--blue-dark); }
h1, h2, h3, h4 { color: var(--ink); line-height: 1.15; margin: 0 0 .5em; letter-spacing: -.01em; }
h1 { font-size: clamp(2.3rem, 5.5vw, 4rem); }
h2 { font-size: clamp(1.8rem, 3.6vw, 2.5rem); }
h3 { font-size: 1.2rem; }
p { margin: 0 0 1em; }
ul { padding-left: 1.2em; }

.container { width: min(1140px, 92%); margin: 0 auto; }
.section { padding: 90px 0; position: relative; }
.section.alt { background: var(--soft); }
.section-head { max-width: 680px; margin-bottom: 44px; }
.section-head p { font-size: 1.1rem; }
.eyebrow {
  display: inline-block; font-size: .8rem; font-weight: 700; letter-spacing: .12em;
  text-transform: uppercase; color: var(--blue-dark); margin-bottom: 12px;
}
.skip-link { position: absolute; left: -9999px; top: 0; background: var(--white); padding: 10px 16px; z-index: 999; }
.skip-link:focus { left: 10px; top: 10px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-block; background: linear-gradient(135deg, var(--blue), var(--blue-dark));
  color: var(--white); padding: 14px 28px; border-radius: 10px; text-decoration: none;
  font-weight: 600; border: 0; cursor: pointer; font-size: 1rem; font-family: inherit;
  box-shadow: 0 8px 20px rgba(37, 99, 235, .3);
  transition: transform .2s ease, box-shadow .2s ease;
  will-change: transform;
}
.btn:hover { color: var(--white); box-shadow: 0 12px 26px rgba(37, 99, 235, .4); }
.btn.small { padding: 10px 18px; font-size: .95rem; }
.btn.outline { background: transparent; color: var(--white); border: 2px solid rgba(255, 255, 255, .5); box-shadow: none; }
.btn.outline:hover { background: rgba(255, 255, 255, .12); }
.btn.outline-dark { background: transparent; color: var(--blue-dark); border: 2px solid var(--blue); box-shadow: none; }
.btn.outline-dark:hover { background: var(--blue); color: var(--white); }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 60;
  background: rgba(10, 17, 40, .88);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255, 255, 255, .08);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; padding: 14px 0; gap: 20px; }
.logo { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--white); font-weight: 800; font-size: 1.3rem; }
.logo-mark {
  width: 28px; height: 28px; border-radius: 8px;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  transform: rotate(45deg) scale(.85);
  box-shadow: 0 0 16px rgba(34, 211, 238, .5);
}
.main-nav { display: flex; align-items: c.logo {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	text-decoration: none;
}
.logo-img {
	height: 40px;   /* adjust to taste */
	width: auto;
	display: block;
}
.logo-text {
	font-weight: 700;
	font-size: 1.15rem;
	line-height: 1;
}enter; gap: 26px; }
.main-nav ul { list-style: none; display: flex; gap: 26px; margin: 0; padding: 0; align-items: center; }
.main-nav li a { text-decoration: none; color: #d3dbee; font-weight: 500; }
.main-nav li a:hover, .main-nav .current-menu-item a { color: var(--white); }
.nav-toggle {
  display: none; background: transparent; color: var(--white);
  border: 1px solid rgba(255, 255, 255, .3); border-radius: 8px; padding: 8px 14px;
  font-size: 1rem; cursor: pointer; font-family: inherit;
}

/* ---------- Hero with 3D scene ---------- */
.hero {
  position: relative; background: radial-gradient(1200px 600px at 75% 30%, #16275a 0%, var(--navy) 60%);
  color: #c4cee6; padding: 110px 0 150px; overflow: hidden; --mx: 0; --my: 0;
}
.hero h1 { color: var(--white); }
.hero .lead { font-size: 1.2rem; max-width: 560px; color: #c4cee6; }
.hero-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 40px; align-items: center; position: relative; z-index: 2; }
.hero-buttons { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 30px; }
.typed-line { display: block; min-height: 1.2em; color: var(--cyan); }
.caret { display: inline-block; width: 3px; height: .9em; background: var(--cyan); margin-left: 4px; vertical-align: -.08em; animation: devx-blink 1s steps(1) infinite; }
@keyframes devx-blink { 50% { opacity: 0; } }

.scene { position: relative; height: 380px; perspective: 1000px; }
.cube-wrap {
  position: absolute; left: 50%; top: 50%; width: 170px; height: 170px; margin: -85px 0 0 -85px;
  transform-style: preserve-3d;
  transform: rotateX(calc(var(--my) * -18deg)) rotateY(calc(var(--mx) * 22deg));
  transition: transform .25s ease-out;
}
.cube { position: absolute; inset: 0; transform-style: preserve-3d; animation: devx-spin 22s linear infinite; }
.face {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  border: 1px solid rgba(120, 190, 255, .55);
  background: linear-gradient(135deg, rgba(59, 130, 246, .25), rgba(34, 211, 238, .08));
  box-shadow: inset 0 0 30px rgba(59, 130, 246, .25), 0 0 20px rgba(59, 130, 246, .15);
  color: #e8f2ff; font-weight: 800; font-size: 1.3rem; letter-spacing: .04em;
}
.face.f1 { transform: translateZ(85px); }
.face.f2 { transform: rotateY(90deg) translateZ(85px); }
.face.f3 { transform: rotateY(180deg) translateZ(85px); }
.face.f4 { transform: rotateY(-90deg) translateZ(85px); }
.face.f5 { transform: rotateX(90deg) translateZ(85px); }
.face.f6 { transform: rotateX(-90deg) translateZ(85px); }
@keyframes devx-spin { from { transform: rotateX(-20deg) rotateY(0); } to { transform: rotateX(-20deg) rotateY(360deg); } }

.shape { position: absolute; border: 2px solid rgba(34, 211, 238, .55); border-radius: 12px; animation: devx-float 7s ease-in-out infinite; }
.shape.s1 { width: 54px; height: 54px; left: 6%; top: 14%; transform: rotate(20deg); }
.shape.s2 { width: 34px; height: 34px; right: 8%; top: 20%; border-radius: 50%; border-color: rgba(59, 130, 246, .7); animation-delay: -2s; }
.shape.s3 { width: 70px; height: 70px; right: 14%; bottom: 8%; transform: rotate(-15deg); animation-delay: -4s; }
.shape.s4 { width: 22px; height: 22px; left: 14%; bottom: 14%; background: rgba(34, 211, 238, .5); border: 0; animation-delay: -1s; }
@keyframes devx-float { 0%, 100% { translate: 0 0; } 50% { translate: 0 -22px; } }

.grid-floor {
  position: absolute; left: -50%; bottom: -2px; width: 200%; height: 55%;
  background-image:
    linear-gradient(rgba(59, 130, 246, .5) 1px, transparent 1px),
    linear-gradient(90deg, rgba(59, 130, 246, .5) 1px, transparent 1px);
  background-size: 60px 60px;
  transform: perspective(500px) rotateX(62deg); transform-origin: center bottom;
  animation: devx-grid 3s linear infinite;
  -webkit-mask-image: linear-gradient(to top, #000 10%, transparent 90%);
  mask-image: linear-gradient(to top, #000 10%, transparent 90%);
  opacity: .55; z-index: 1;
}
@keyframes devx-grid { to { background-position: 0 60px; } }

/* ---------- Flip cards ---------- */
.grid { display: grid; gap: 24px; }
.grid.two { grid-template-columns: repeat(2, 1fr); }
.grid.three { grid-template-columns: repeat(3, 1fr); }
.grid.four { grid-template-columns: repeat(4, 1fr); }

.flip { perspective: 1100px; height: 290px; cursor: pointer; outline: none; }
.flip-inner { position: relative; width: 100%; height: 100%; transform-style: preserve-3d; transition: transform .7s cubic-bezier(.2, .8, .2, 1); }
.flip.flipped .flip-inner, .flip:focus-visible .flip-inner { transform: rotateY(180deg); }
@media (hover: hover) { .flip:hover .flip-inner { transform: rotateY(180deg); } }
.flip:focus-visible { outline: 3px solid var(--blue); outline-offset: 4px; border-radius: var(--radius); }
.flip-face {
  position: absolute; inset: 0; backface-visibility: hidden; -webkit-backface-visibility: hidden;
  border-radius: var(--radius); padding: 28px; display: flex; flex-direction: column;
  box-shadow: var(--shadow);
}
.flip-front { background: var(--white); border: 1px solid var(--line); }
.flip-back { background: linear-gradient(145deg, var(--navy-2), var(--navy)); color: #cdd6ee; transform: rotateY(180deg); border: 1px solid rgba(255, 255, 255, .08); }
.flip-back h3 { color: var(--white); }
.flip .icon { font-size: 2rem; margin-bottom: 10px; line-height: 1; }
.tag {
  align-self: flex-start; font-size: .72rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  padding: 4px 10px; border-radius: 99px; background: #e8f0ff; color: var(--blue-dark); margin-bottom: 12px;
}
.flip-back .tag { background: rgba(34, 211, 238, .15); color: var(--cyan); }
.label-problem { color: #c2410c; font-weight: 700; font-size: .8rem; letter-spacing: .08em; text-transform: uppercase; }
.label-fix { color: var(--cyan); font-weight: 700; font-size: .8rem; letter-spacing: .08em; text-transform: uppercase; }
.flip-hint { margin-top: auto; font-size: .85rem; color: #7a859e; }
.flip-more { margin-top: auto; color: var(--cyan); font-weight: 600; text-decoration: none; font-size: .95rem; }

/* ---------- Tilt cards ---------- */
.card {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 30px; box-shadow: var(--shadow); position: relative; overflow: hidden;
}
.tilt { transform-style: preserve-3d; will-change: transform; transition: transform .15s ease-out; }
.tilt::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity .2s;
  background: radial-gradient(260px circle at var(--gx, 50%) var(--gy, 50%), rgba(59, 130, 246, .16), transparent 60%);
}
.tilt:hover::after { opacity: 1; }
.card .big-icon {
  width: 52px; height: 52px; border-radius: 14px; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #e6efff, #dffaff); font-size: 1.5rem; margin-bottom: 16px;
}
.step-number {
  display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: 50%;
  background: linear-gradient(135deg, var(--blue), var(--cyan)); color: var(--white); font-weight: 800; margin-bottom: 14px;
}

/* ---------- Stats ---------- */
.stats { background: var(--navy); color: #c4cee6; padding: 60px 0; }
.stats .grid { text-align: center; }
.stat-num { font-size: clamp(2.4rem, 5vw, 3.4rem); font-weight: 800; color: var(--white); line-height: 1; }
.stat-num span { color: var(--cyan); }
.stat-label { margin-top: 8px; }

/* ---------- Lists ---------- */
.check-list { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px 34px; }
.check-list li { padding-left: 34px; position: relative; }
.check-list li::before {
  content: "✓"; position: absolute; left: 0; top: 2px; width: 24px; height: 24px; border-radius: 50%;
  background: var(--blue); color: var(--white); text-align: center; line-height: 24px; font-size: .85rem; font-weight: 700;
}

/* ---------- CTA / contact ---------- */
.cta { background: linear-gradient(160deg, var(--navy-2), var(--navy)); color: #c4cee6; }
.cta h2 { color: var(--white); }
.contact-wrap { display: grid; grid-template-columns: 1fr 1fr; gap: 50px; align-items: start; }
.contact-form {
  background: var(--white); padding: 30px; border-radius: var(--radius); box-shadow: var(--shadow); color: var(--text);
}
.contact-form label { display: block; font-weight: 600; margin-bottom: 6px; color: var(--ink); }
.contact-form input[type="text"], .contact-form input[type="email"], .contact-form textarea {
  width: 100%; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; font: inherit; margin-bottom: 16px; background: var(--white);
}
.contact-form input:focus, .contact-form textarea:focus { outline: 2px solid var(--blue); border-color: transparent; }
.contact-form textarea { min-height: 130px; resize: vertical; }
.notice { padding: 14px 18px; border-radius: 10px; margin-bottom: 20px; }
.notice.ok { background: #e7f7ee; color: #14633a; }
.notice.bad { background: #fdeaea; color: #8a1f1f; }
.hp-field { position: absolute; left: -9999px; }

/* ---------- Filter bar ---------- */
.page-hero { background: radial-gradient(900px 400px at 80% 0%, #16275a, var(--navy)); color: #c4cee6; padding: 80px 0 60px; }
.page-hero h1 { color: var(--white); font-size: clamp(2rem, 4.5vw, 3rem); }
.page-hero p { max-width: 640px; font-size: 1.1rem; }
.filters { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 32px; }
.filter-btn {
  border: 1px solid var(--line); background: var(--white); color: var(--ink); padding: 9px 18px; border-radius: 99px;
  cursor: pointer; font: inherit; font-weight: 600; font-size: .95rem; transition: all .2s;
}
.filter-btn:hover { border-color: var(--blue); }
.filter-btn.active { background: var(--blue-dark); color: var(--white); border-color: var(--blue-dark); }
.flip[hidden] { display: none; }

/* ---------- Single challenge ---------- */
.compare { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin: 30px 0; }
.compare .box { border-radius: var(--radius); padding: 28px; }
.compare .problem { background: #fff4ec; border: 1px solid #fbd7bf; }
.compare .fix { background: #ebf5ff; border: 1px solid #c4defb; }

/* ---------- Pages and posts ---------- */
.page-content { padding: 70px 0; }
.entry { max-width: 760px; }
.post-item { border-bottom: 1px solid var(--line); padding: 24px 0; }
.post-item h2 a { text-decoration: none; color: var(--ink); }

/* ---------- Footer ---------- */
.site-footer { background: var(--navy); color: #aab5d0; padding: 56px 0 24px; font-size: .96rem; }
.site-footer a { color: #aab5d0; }
.site-footer a:hover { color: var(--white); }
.site-footer strong { color: var(--white); }
.site-footer ul { list-style: none; padding: 0; margin: 8px 0 0; }
.footer-inner { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 30px; }
.footer-bottom { border-top: 1px solid rgba(255, 255, 255, .1); margin-top: 36px; padding-top: 20px; font-size: .88rem; }

/* ---------- Cursor glow (desktop only) ---------- */
.cursor-glow {
  position: fixed; left: 0; top: 0; width: 360px; height: 360px; margin: -180px 0 0 -180px; pointer-events: none; z-index: 1;
  background: radial-gradient(circle, rgba(59, 130, 246, .14), transparent 65%); opacity: 0; transition: opacity .3s;
}
.cursor-glow.on { opacity: 1; }

/* ---------- Scroll reveal ---------- */
.js .reveal { opacity: 0; transform: translateY(40px) rotateX(10deg); transform-origin: top center; transition: opacity .8s ease, transform .8s cubic-bezier(.2, .8, .2, 1); transition-delay: var(--d, 0s); }
.js .reveal.in { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .hero-grid, .contact-wrap, .compare, .footer-inner { grid-template-columns: 1fr; }
  .grid.three, .grid.four, .grid.two, .check-list { grid-template-columns: 1fr; }
  .section { padding: 60px 0; }
  .hero { padding: 70px 0 120px; }
  .scene { height: 300px; }
  .nav-toggle { display: block; }
  .main-nav {
    display: none; position: absolute; top: 100%; left: 0; right: 0; background: var(--navy);
    padding: 18px 4% 24px; flex-direction: column; align-items: flex-start; border-bottom: 1px solid rgba(255, 255, 255, .1);
  }
  .main-nav.open { display: flex; }
  .main-nav ul { flex-direction: column; align-items: flex-start; gap: 14px; }
  .header-inner { position: relative; }
  .grid.four.stats-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
  .stats .grid.three { grid-template-columns: 1fr; }
}

/* ---------- Respect "reduce motion" ---------- */
/* Animations are ON by default. A visitor can turn them off with the footer
   button, which adds the .motion-off class to <html> and is remembered. */
.motion-toggle {
  background: transparent; color: #aab5d0; border: 1px solid rgba(255, 255, 255, .25);
  border-radius: 8px; padding: 6px 12px; font: inherit; font-size: .85rem; cursor: pointer; margin-top: 12px;
}
.motion-toggle:hover { color: var(--white); border-color: var(--white); }
html.motion-off *, html.motion-off *::before, html.motion-off *::after {
  animation: none !important; transition-duration: .01s !important; scroll-behavior: auto !important;
}
html.js.motion-off .reveal { opacity: 1; transform: none; }
html.motion-off .cube { transform: rotateX(-20deg) rotateY(35deg); }

.logo {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	text-decoration: none;
}
.logo-img {
	height: 40px;   /* adjust to taste */
	width: auto;
	display: block;
}
.logo-text {
	font-weight: 700;
	font-size: 1.15rem;
	line-height: 1;
}

/* Stats strip */
.stats-strip .stat-card {
	text-align: left;
	display: flex;
	flex-direction: column;
	gap: 8px;
}
.stats-strip .stat-number {
	font-size: clamp(2.6rem, 5vw, 3.6rem);
	font-weight: 800;
	line-height: 1;
	letter-spacing: -0.02em;
	color: var(--blue-dark, #0b3d91);
}
.stats-strip .stat-card h3 {
	margin: 4px 0 0;
	font-size: 1.1rem;
}
.stats-strip .stat-card p {
	margin: 0;
}
.stats-strip .stat-source {
	margin-top: auto;
	padding-top: 10px;
	font-size: 0.78rem;
	opacity: 0.65;
}
.stats-strip .stat-cta {
	margin-top: 36px;
}
