/*
Theme Name: Forgendo
Theme URI: https://forgendo.com
Author: Forgendo
Author URI: https://forgendo.com
Description: Terminal-engineered theme for the Forgendo SaaS. Dark, fast, distinctive — a static-feel landing on the front page plus a matching blog for content/SEO.
Version: 1.0.2
Requires at least: 6.0
Tested up to: 6.7
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: linkforge
*/

:root {
  --bg: #0a0b0a;
  --bg-2: #111311;
  --fg: #edeee9;
  --muted: #8a8f86;
  --accent: #c8f235;
  --accent-dim: #9bbd28;
  --line: #ffffff14;
  --display: 'Syne', sans-serif;
  --mono: 'JetBrains Mono', monospace;
  --body: 'Hanken Grotesk', system-ui, sans-serif;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  cursor: none;
}
@media (max-width: 900px) { body { cursor: auto; } }

body::after {
  content: "";
  position: fixed; inset: 0; z-index: 9998; pointer-events: none;
  opacity: 0.04;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.cursor {
  position: fixed; top: 0; left: 0; width: 10px; height: 10px;
  border-radius: 50%; background: var(--accent);
  pointer-events: none; z-index: 9999; mix-blend-mode: difference;
  transform: translate(-50%, -50%); transition: width .2s, height .2s;
}
.cursor.big { width: 44px; height: 44px; }

a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; }
::selection { background: var(--accent); color: #000; }

.wrap { max-width: 1200px; margin: 0 auto; padding: 0 clamp(1.25rem, 4vw, 3rem); }
.mono { font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--accent-dim); }

/* NAV */
.site-nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  padding: 1.1rem clamp(1.25rem, 4vw, 3rem);
  backdrop-filter: blur(12px);
  background: color-mix(in srgb, var(--bg) 70%, transparent);
  border-bottom: 1px solid transparent; transition: border-color .3s;
}
.site-nav.scrolled { border-bottom-color: var(--line); }
.logo { font-family: var(--display); font-weight: 800; font-size: 1.35rem; letter-spacing: -0.02em; display: flex; align-items: center; gap: 0.5rem; }
.logo .dot { width: 9px; height: 9px; background: var(--accent); border-radius: 50%; box-shadow: 0 0 14px var(--accent); animation: pulse 2s infinite; }
@keyframes pulse { 50% { opacity: 0.35; } }
.nav-links { display: flex; gap: 2rem; align-items: center; }
.nav-links a { font-size: 0.9rem; color: var(--muted); transition: color .2s; }
.nav-links a:hover { color: var(--fg); }
.btn { font-family: var(--body); font-weight: 600; font-size: 0.9rem; padding: 0.7rem 1.3rem; border-radius: 4px; border: 1px solid var(--accent); background: var(--accent); color: #000; cursor: none; transition: all .2s; display: inline-flex; align-items: center; gap: 0.5rem; }
.btn:hover { background: transparent; color: var(--accent); box-shadow: 0 0 24px -4px var(--accent); }
.btn-ghost { background: transparent; color: var(--fg); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--fg); box-shadow: none; color: var(--fg); }
@media (max-width: 760px) { .nav-links a:not(.btn) { display: none; } }

/* HERO */
.hero { padding: clamp(8rem, 16vh, 12rem) 0 5rem; position: relative; }
.hero-grid { position: absolute; inset: 0; z-index: -1; background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px); background-size: 64px 64px; mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 20%, transparent 75%); -webkit-mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 20%, transparent 75%); }
.hero .eyebrow { margin-bottom: 1.5rem; opacity: 0; animation: rise .7s .1s forwards; }
h1, .h1 { font-family: var(--display); font-weight: 800; font-size: clamp(2rem, 8vw, 5.75rem); line-height: 0.99; letter-spacing: -0.035em; max-width: 16ch; opacity: 0; animation: rise .8s .2s forwards; overflow-wrap: break-word; }
.h1 .hl, h1 .hl { color: var(--accent); }
.hero .sub { margin: 1.75rem 0 2.5rem; font-size: clamp(1.05rem, 1.7vw, 1.3rem); color: var(--muted); max-width: 56ch; line-height: 1.55; opacity: 0; animation: rise .8s .35s forwards; }
.hero-cta { display: flex; gap: 1rem; flex-wrap: wrap; opacity: 0; animation: rise .8s .5s forwards; }
@keyframes rise { from { opacity: 0; transform: translateY(28px); } to { opacity: 1; transform: translateY(0); } }

/* MOBILE responsive — centered hero, tidy nav, no horizontal overflow */
@media (max-width: 760px) {
  html, body { overflow-x: hidden; }
  .nav-links { gap: 0.6rem; }
  .site-nav { padding: 0.9rem 1.1rem; }
  .site-nav .btn { padding: 0.55rem 1rem; font-size: 0.85rem; white-space: nowrap; }
  .logo { font-size: 1.15rem; }

  .hero { padding: 6.5rem 0 3.5rem; }
  .hero .wrap { text-align: center; }
  h1, .h1 { max-width: 100%; }
  .hero .eyebrow { margin-left: auto; margin-right: auto; }
  .hero .sub { margin-left: auto; margin-right: auto; }
  .hero-cta { justify-content: center; }
  .hero-cta .btn { flex: 1 1 auto; justify-content: center; }

  .foot-grid { justify-content: center; text-align: center; }
  .foot-links { justify-content: center; }
}

.terminal { margin-top: 4rem; border: 1px solid var(--line); border-radius: 8px; background: linear-gradient(180deg, #0e100e, #0a0b0a); overflow: hidden; max-width: 720px; opacity: 0; animation: rise .9s .65s forwards; box-shadow: 0 30px 80px -30px #000, 0 0 0 1px var(--line); }
.terminal-bar { display: flex; align-items: center; gap: 0.5rem; padding: 0.75rem 1rem; border-bottom: 1px solid var(--line); }
.terminal-bar i { width: 11px; height: 11px; border-radius: 50%; background: #2a2d2a; display: block; }
.terminal-bar i:nth-child(1) { background: #ff5f56; } .terminal-bar i:nth-child(2) { background: #ffbd2e; } .terminal-bar i:nth-child(3) { background: #27c93f; }
.terminal-bar span { margin-left: auto; font-family: var(--mono); font-size: 0.7rem; color: var(--muted); }
.terminal-body { padding: 1.25rem 1.5rem; font-family: var(--mono); font-size: 0.85rem; line-height: 2; min-height: 230px; }
.terminal-body .line { white-space: pre-wrap; }
.terminal-body .prompt { color: var(--accent); } .terminal-body .ok { color: var(--accent); } .terminal-body .dim { color: var(--muted); }
.cursor-blink { display: inline-block; width: 9px; height: 1.1em; background: var(--accent); vertical-align: -2px; animation: blink 1s steps(2) infinite; }
@keyframes blink { 50% { opacity: 0; } }

/* MARQUEE */
.marquee-section { padding: 3rem 0; border-block: 1px solid var(--line); margin-top: 5rem; overflow: hidden; }
.marquee-label { text-align: center; margin-bottom: 1.5rem; }
.marquee { display: flex; gap: 4rem; white-space: nowrap; animation: scroll 28s linear infinite; width: max-content; }
.marquee span { font-family: var(--display); font-weight: 700; font-size: 1.5rem; color: var(--muted); display: flex; align-items: center; gap: 0.6rem; }
.marquee span::before { content: "◆"; color: var(--accent); font-size: 0.7rem; }
@keyframes scroll { to { transform: translateX(-50%); } }

/* SECTIONS */
.section { padding: clamp(5rem, 10vw, 8rem) 0; }
.reveal { opacity: 0; transform: translateY(30px); transition: opacity .7s, transform .7s; }
.reveal.in { opacity: 1; transform: none; }
.section-head { max-width: 60ch; margin-bottom: 3.5rem; }
.section-head .mono { display: block; margin-bottom: 1rem; }
h2 { font-family: var(--display); font-weight: 700; font-size: clamp(2rem, 4.5vw, 3.5rem); line-height: 1.04; letter-spacing: -0.03em; }
h2 .hl { color: var(--accent); }
.lead { color: var(--muted); font-size: 1.15rem; margin-top: 1.25rem; max-width: 52ch; }

.problem h2 { max-width: 18ch; }
.problem .lead { font-size: 1.35rem; color: var(--fg); margin-top: 2rem; }
.problem .lead strong { color: var(--accent); font-weight: 600; }

.features-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.feature { background: var(--bg); padding: 2.25rem; transition: background .3s; }
.feature:hover { background: var(--bg-2); }
.feature .num { font-family: var(--mono); font-size: 0.72rem; color: var(--accent-dim); letter-spacing: 0.15em; }
.feature h3 { font-family: var(--display); font-weight: 700; font-size: 1.4rem; margin: 1rem 0 0.75rem; letter-spacing: -0.01em; }
.feature p { color: var(--muted); font-size: 0.98rem; }
.feature .tag { display: inline-block; margin-top: 1rem; font-family: var(--mono); font-size: 0.66rem; text-transform: uppercase; letter-spacing: 0.12em; color: var(--accent); border: 1px solid var(--accent); padding: 0.2rem 0.55rem; border-radius: 3px; }

.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem; }
@media (max-width: 760px) { .steps { grid-template-columns: 1fr; } }
.step { padding-top: 2rem; border-top: 2px solid var(--line); }
.step .n { font-family: var(--display); font-weight: 800; font-size: 3.5rem; color: var(--accent); line-height: 1; letter-spacing: -0.04em; }
.step h3 { font-family: var(--display); font-weight: 700; font-size: 1.3rem; margin: 0.75rem 0; }
.step p { color: var(--muted); font-size: 0.98rem; }

.pricing-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; }
@media (max-width: 980px) { .pricing-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .pricing-grid { grid-template-columns: 1fr; } }
.price-card { border: 1px solid var(--line); border-radius: 10px; padding: 1.75rem; display: flex; flex-direction: column; transition: border-color .3s, transform .3s; background: var(--bg); }
.price-card:hover { transform: translateY(-4px); }
.price-card.featured { border-color: var(--accent); box-shadow: 0 0 40px -16px var(--accent); }
.price-card .plan { font-family: var(--mono); font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.15em; color: var(--accent-dim); }
.price-card .amt { font-family: var(--display); font-weight: 800; font-size: 2.75rem; margin: 0.75rem 0 0.25rem; letter-spacing: -0.03em; }
.price-card .amt small { font-family: var(--body); font-size: 0.9rem; color: var(--muted); font-weight: 400; }
.price-card ul { list-style: none; margin: 1.5rem 0; display: grid; gap: 0.6rem; flex: 1; }
.price-card li { font-size: 0.92rem; color: var(--muted); display: flex; gap: 0.6rem; }
.price-card li::before { content: "→"; color: var(--accent); }
.price-card .btn { width: 100%; justify-content: center; }
.badge { font-family: var(--mono); font-size: 0.62rem; text-transform: uppercase; letter-spacing: 0.12em; color: #000; background: var(--accent); padding: 0.15rem 0.5rem; border-radius: 3px; margin-left: auto; }
.price-head { display: flex; align-items: center; }

.cmp { width: 100%; border-collapse: collapse; font-size: 0.95rem; }
.cmp th, .cmp td { padding: 1rem; text-align: left; border-bottom: 1px solid var(--line); }
.cmp th { font-family: var(--mono); font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--muted); font-weight: 500; }
.cmp td:first-child { color: var(--muted); }
.cmp .us { color: var(--accent); font-weight: 600; }
.cmp .yes { color: var(--accent); } .cmp .no { color: #5a5d58; }
.cmp tr:hover td { background: var(--bg-2); }

.faq-item { border-bottom: 1px solid var(--line); }
.faq-q { width: 100%; text-align: left; background: none; border: none; color: var(--fg); font-family: var(--body); font-size: 1.15rem; font-weight: 600; padding: 1.5rem 0; cursor: none; display: flex; justify-content: space-between; gap: 1rem; align-items: center; }
.faq-q::after { content: "+"; color: var(--accent); font-family: var(--mono); font-size: 1.5rem; transition: transform .3s; }
.faq-item.open .faq-q::after { transform: rotate(45deg); }
.faq-a { max-height: 0; overflow: hidden; transition: max-height .35s ease; color: var(--muted); }
.faq-item.open .faq-a { max-height: 260px; }
.faq-a p { padding-bottom: 1.5rem; }

.final { text-align: center; position: relative; }
.final h2 { max-width: 20ch; margin: 0 auto 1.5rem; font-size: clamp(2.5rem, 6vw, 4.5rem); }
.final .glow { position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%); width: 600px; height: 300px; background: radial-gradient(ellipse, color-mix(in srgb, var(--accent) 22%, transparent), transparent 70%); filter: blur(40px); z-index: -1; }

/* FOOTER */
.site-footer { border-top: 1px solid var(--line); padding: 3rem 0; }
.foot-grid { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 2rem; align-items: center; }
.foot-grid .mono { color: var(--muted); }
.foot-links { display: flex; flex-wrap: wrap; gap: 0.75rem 1.5rem; }
.foot-links a { color: var(--muted); font-size: 0.9rem; transition: color .2s; }
.foot-links a:hover { color: var(--accent); }

/* ---------- BLOG ---------- */
.page-shell { padding: clamp(8rem, 16vh, 11rem) 0 5rem; }
.page-head { max-width: 60ch; margin-bottom: 3rem; }
.page-head h1 { animation: none; opacity: 1; font-size: clamp(2.2rem, 5vw, 3.5rem); max-width: none; }

.post-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); gap: 1.5rem; }
.post-card { border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: var(--bg); transition: transform .3s, border-color .3s; display: flex; flex-direction: column; }
.post-card:hover { transform: translateY(-4px); border-color: var(--accent); }
.post-card .thumb { aspect-ratio: 16/9; object-fit: cover; width: 100%; display: block; background: var(--bg-2); }
.post-card .pc-body { padding: 1.5rem; display: flex; flex-direction: column; flex: 1; }
.post-card .pc-meta { font-family: var(--mono); font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.12em; color: var(--accent-dim); margin-bottom: 0.75rem; }
.post-card h2 { font-size: 1.4rem; line-height: 1.15; margin-bottom: 0.6rem; }
.post-card h2 a:hover { color: var(--accent); }
.post-card .excerpt { color: var(--muted); font-size: 0.95rem; flex: 1; }
.post-card .more { font-family: var(--mono); font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--accent); margin-top: 1rem; }
.post-card .more::after { content: " →"; }

/* Single post */
.single-wrap { max-width: 44rem; margin: 0 auto; }
.single-meta { font-family: var(--mono); font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.12em; color: var(--accent-dim); margin-bottom: 1rem; }
.single-wrap > h1 { font-size: clamp(2rem, 5vw, 3.25rem); line-height: 1.05; margin-bottom: 1.5rem; animation: none; opacity: 1; max-width: none; }
.entry-hero { width: 100%; aspect-ratio: 16/9; object-fit: cover; border-radius: 8px; margin-bottom: 2.5rem; }
.entry { font-size: 1.1rem; line-height: 1.7; overflow-wrap: break-word; }
.entry p { margin: 1.25rem 0; }
.entry table { display: block; max-width: 100%; overflow-x: auto; border-collapse: collapse; margin: 1.75rem 0; font-size: 0.98rem; }
.entry th, .entry td { padding: 0.7rem 0.95rem; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
.entry th { font-family: var(--mono); font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); font-weight: 500; }
.entry tbody td:first-child { color: var(--fg); }
.entry tbody tr:hover td { background: var(--bg-2); }
.entry h2 { font-size: 1.8rem; margin: 2.5rem 0 1rem; }
.entry h3 { font-family: var(--display); font-weight: 700; font-size: 1.3rem; margin: 2rem 0 0.75rem; }
.entry a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.entry ul, .entry ol { padding-left: 1.5rem; margin: 1.25rem 0; }
.entry li { margin: 0.5rem 0; }
.entry blockquote { border-left: 3px solid var(--accent); padding-left: 1.5rem; margin: 2rem 0; color: var(--muted); font-size: 1.2rem; font-style: italic; }
.entry code { font-family: var(--mono); font-size: 0.9em; background: var(--bg-2); padding: 0.1em 0.4em; border-radius: 3px; }
.entry pre { background: var(--bg-2); padding: 1.25rem; border-radius: 6px; overflow-x: auto; border-left: 2px solid var(--accent); margin: 1.5rem 0; }
.entry img { border-radius: 6px; margin: 1.5rem 0; }

/* Inline blog CTA — auto-injected between <h2> sections (see functions.php) */
.entry .post-cta {
  margin: 2.75rem 0;
  padding: 1.7rem 1.9rem;
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  border-radius: 10px;
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--accent) 8%, transparent), transparent),
    var(--bg-2);
  box-shadow: 0 18px 40px -28px rgba(0, 0, 0, 0.9);
}
.post-cta-eyebrow {
  font-family: var(--mono); font-size: 0.68rem; letter-spacing: 0.18em;
  text-transform: uppercase; color: var(--accent-dim); display: block; margin-bottom: 0.55rem;
}
.post-cta-title {
  font-family: var(--display); font-weight: 700; font-size: 1.25rem; line-height: 1.25;
  margin: 0 0 0.4rem; color: var(--fg);
}
.post-cta-sub { color: var(--muted); font-size: 0.95rem; line-height: 1.55; margin: 0 0 1.2rem; }
/* .entry .post-cta-btn (specificity 0,2,0) overrides .entry a (0,1,1) so the
   button keeps black text on the accent fill instead of accent-on-accent. */
.entry .post-cta-btn {
  display: inline-flex; align-items: center; gap: 0.45rem;
  font-family: var(--body); font-weight: 600; font-size: 0.92rem;
  padding: 0.72rem 1.3rem; border-radius: 4px;
  background: var(--accent); color: #000; border: 1px solid var(--accent);
  cursor: none; transition: all 0.2s; text-decoration: none;
}
.entry .post-cta-btn:hover { background: transparent; color: var(--accent); text-decoration: none; }
@media (max-width: 600px) {
  .entry .post-cta { padding: 1.3rem 1.25rem; margin: 2rem 0; }
  .post-cta-title { font-size: 1.08rem; }
}

.pagination { display: flex; gap: 1rem; justify-content: center; margin-top: 4rem; font-family: var(--mono); font-size: 0.85rem; }
.pagination .page-numbers { padding: 0.5rem 0.9rem; border: 1px solid var(--line); border-radius: 4px; color: var(--muted); }
.pagination .page-numbers.current, .pagination .page-numbers:hover { border-color: var(--accent); color: var(--accent); }

.empty { color: var(--muted); font-size: 1.1rem; padding: 3rem 0; }
