/*
Theme Name: ExactFPS
Theme URI: https://exactfps.com
Author: ExactFPS
Description: Dark, HUD-style gaming theme for FPS calculators, guides and comparisons. Built for speed, AdSense-ready ad slots, no plugins required.
Version: 1.0.0
Requires at least: 6.0
Requires PHP: 7.4
License: GPL-2.0-or-later
Text Domain: exactfps
*/

:root {
  --ink: #120e1e;
  --panel: #1b1530;
  --panel-2: #251c42;
  --line: #3b2f5e;
  --text: #f1edff;
  --muted: #a79dc6;
  --pink: #ff4d8d;
  --ice: #4fd8ff;
  --ok: #5be38a;
  --warn: #ffc857;
  --bad: #ff5d6c;
  --display: "Bahnschrift", "DIN Alternate", "Roboto Condensed", "Arial Narrow", system-ui, sans-serif;
  --body: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", "Cascadia Mono", Consolas, monospace;
  --r: 10px;
  --wrap: 1160px;
}

*, *::before, *::after { box-sizing: border-box; }
html { color-scheme: dark; scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--ink); color: var(--text); font: 17px/1.65 var(--body); overflow-wrap: break-word; }
img, svg, video { max-width: 100%; height: auto; display: block; }
a { color: var(--ice); text-underline-offset: 3px; }
a:hover { color: #9be9ff; }
:focus-visible { outline: 2px solid var(--ice); outline-offset: 3px; border-radius: 4px; }
.screen-reader-text, .sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--pink); color: #1a0613; padding: .5rem 1rem; z-index: 100; border-radius: 6px; }
.skip:focus { left: 8px; }
.wrap { width: min(var(--wrap), 100% - 2.5rem); margin-inline: auto; }
.narrow { width: min(780px, 100% - 2.5rem); margin-inline: auto; }
.muted { color: var(--muted); }
.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }

h1, h2, h3, h4 { font-family: var(--display); line-height: 1.12; letter-spacing: -.01em; margin: 0 0 .5em; font-weight: 700; }
h1 { font-size: clamp(2.2rem, 5.2vw, 3.8rem); }
h2 { font-size: clamp(1.6rem, 3.2vw, 2.2rem); }
h3 { font-size: 1.3rem; }

/* HUD panel: the one signature element. Pink and ice corner brackets. */
.hud { position: relative; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); }
.hud::before {
  content: ""; position: absolute; inset: -1px; border-radius: inherit; pointer-events: none;
  background:
    linear-gradient(var(--pink), var(--pink)) 0 0 / 18px 2px no-repeat,
    linear-gradient(var(--pink), var(--pink)) 0 0 / 2px 18px no-repeat,
    linear-gradient(var(--ice), var(--ice)) 100% 100% / 18px 2px no-repeat,
    linear-gradient(var(--ice), var(--ice)) 100% 100% / 2px 18px no-repeat;
}

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; padding: .8rem 1.3rem; border-radius: 8px; border: 1px solid var(--pink); background: var(--pink); color: #1a0613; font: 700 1rem var(--display); text-decoration: none; cursor: pointer; }
.btn:hover { background: #ff6ea1; color: #1a0613; }
.btn.ghost { background: transparent; border-color: var(--line); color: var(--text); }
.btn.ghost:hover { border-color: var(--ice); color: var(--ice); }

/* Header */
.site-header { position: sticky; top: 0; z-index: 50; background: var(--ink); border-bottom: 1px solid var(--line); }
.bar { display: flex; align-items: center; gap: 1rem; min-height: 64px; position: relative; }
.brand a, .brand-mark { text-decoration: none; color: var(--text); }
.brand-mark { font: 400 1.5rem/1 var(--display); letter-spacing: -.02em; display: inline-flex; align-items: center; gap: .35rem; }
.brand-mark b { background: var(--pink); color: #1a0613; font-weight: 800; padding: .12em .4em .08em; border-radius: 5px; transform: skewX(-8deg); }
.custom-logo { max-height: 40px; width: auto; }
.nav-toggle { margin-left: auto; background: none; border: 1px solid var(--line); border-radius: 8px; width: 44px; height: 44px; color: var(--text); cursor: pointer; display: grid; place-items: center; }
.nav-toggle i, .nav-toggle i::before, .nav-toggle i::after { display: block; width: 20px; height: 2px; background: currentColor; content: ""; position: relative; }
.nav-toggle i::before { position: absolute; top: -6px; }
.nav-toggle i::after { position: absolute; top: 6px; }
.site-nav { display: none; }
.site-nav.open { display: block; position: absolute; top: 100%; left: 0; right: 0; background: var(--panel); border-bottom: 1px solid var(--line); padding: 1rem 1.25rem 1.25rem; }
.menu { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .15rem; }
.menu a { display: block; padding: .6rem 0; color: var(--muted); text-decoration: none; font-weight: 600; }
.menu a:hover, .menu .current-menu-item > a, .menu .current_page_item > a { color: var(--text); box-shadow: inset 0 -2px var(--pink); }
.search-form { display: flex; gap: .5rem; margin-top: .75rem; }
.search-form label { flex: 1; }
.search-field { width: 100%; background: var(--ink); border: 1px solid var(--line); color: var(--text); border-radius: 8px; padding: .55rem .8rem; font: inherit; }
.search-submit { background: var(--panel-2); border: 1px solid var(--line); color: var(--text); border-radius: 8px; padding: .55rem .9rem; font: 600 .95rem var(--body); cursor: pointer; }
@media (min-width: 860px) {
  .nav-toggle { display: none; }
  .site-nav, .site-nav.open { display: flex; align-items: center; gap: 1.5rem; position: static; background: none; border: 0; padding: 0; margin-left: auto; }
  .menu { flex-direction: row; gap: 1.5rem; }
  .menu a { padding: .4rem 0; }
  .search-form { margin: 0; }
  .search-field { width: 180px; }
}

/* Hero */
.hero { padding: clamp(2.5rem, 7vw, 5.5rem) 0 clamp(2rem, 5vw, 4rem); }
.hero-grid { display: grid; gap: 2.5rem; align-items: center; }
.hero-copy h1 { max-width: 14ch; }
.lede { font-size: 1.15rem; color: var(--muted); max-width: 46ch; margin: 0 0 1.5rem; }
.actions { display: flex; flex-wrap: wrap; gap: .75rem; margin: 0; }
@media (min-width: 900px) { .hero-grid { grid-template-columns: 1.1fr .9fr; } }

.overlay { margin: 0; padding: 1.25rem 1.4rem 1rem; font-family: var(--mono); }
.overlay-row { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; font-size: .82rem; color: var(--muted); }
.fps-big { font-size: clamp(3.5rem, 9vw, 5.5rem); line-height: 1; font-weight: 700; color: var(--ok); margin: .6rem 0 .2rem; font-variant-numeric: tabular-nums; }
.fps-big small { font-size: 1.1rem; color: var(--muted); margin-left: .5rem; font-weight: 400; }
.frametime { width: 100%; height: 90px; margin: .4rem 0 .8rem; }
.frametime polyline { fill: none; stroke: var(--ice); stroke-width: 2; vector-effect: non-scaling-stroke; stroke-dasharray: 1; stroke-dashoffset: 0; }
.overlay figcaption { margin-top: .75rem; padding-top: .6rem; border-top: 1px dashed var(--line); font: .8rem var(--body); color: var(--muted); }
@media (prefers-reduced-motion: no-preference) {
  .frametime polyline { stroke-dashoffset: 1; animation: draw 1.8s ease-out .2s forwards; }
  @keyframes draw { to { stroke-dashoffset: 0; } }
}

/* Sections */
.section { padding: clamp(2rem, 5vw, 3.5rem) 0; }
.section-head { margin-bottom: 1.5rem; }
.section-head p { margin: 0; color: var(--muted); }
.tools-grid, .cards { display: grid; gap: 1.25rem; grid-template-columns: 1fr; }
@media (min-width: 640px) { .cards { grid-template-columns: repeat(2, 1fr); } .tools-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 980px) { .cards { grid-template-columns: repeat(3, 1fr); } .tools-grid { grid-template-columns: repeat(3, 1fr); } .tools-grid .is-lead { grid-column: span 2; } }

.tool { display: flex; flex-direction: column; gap: .4rem; padding: 1.4rem; text-decoration: none; color: var(--text); min-height: 170px; }
.tool h3 { margin: 0; }
.tool p { margin: 0; color: var(--muted); font-size: .98rem; }
.tool-cta { margin-top: auto; padding-top: .8rem; color: var(--ice); font: 700 .98rem var(--display); }
.tool:hover { border-color: var(--ice); color: var(--text); }
.tool.is-lead { background: var(--panel-2); }
.tool.is-lead h3 { font-size: clamp(1.6rem, 3vw, 2.1rem); }
.tool.is-soon { opacity: .65; }
.tool.is-soon .tool-cta { color: var(--muted); }
.admin-note { margin-top: 1rem; font-size: .9rem; color: var(--warn); }

.card { display: flex; flex-direction: column; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.card:hover { border-color: var(--pink); }
.thumb { display: block; aspect-ratio: 16 / 9; background: var(--panel-2); overflow: hidden; }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb-ph { display: grid; place-items: center; height: 100%; font: 800 3.2rem var(--display); color: var(--line); }
.card-body { padding: 1.1rem 1.2rem 1.3rem; display: flex; flex-direction: column; gap: .5rem; flex: 1; }
.card-title { font-size: 1.2rem; margin: 0; }
.card-title a { color: var(--text); text-decoration: none; }
.card-title a:hover { color: var(--pink); }
.card-body p { margin: 0; color: var(--muted); font-size: .96rem; }
.card-meta { margin-top: auto; padding-top: .4rem; font-size: .85rem; color: var(--muted); }

.chips { display: flex; flex-wrap: wrap; gap: .6rem; list-style: none; margin: 0; padding: 0; }
.chips a { display: inline-block; padding: .4rem .95rem; border: 1px solid var(--line); border-radius: 999px; color: var(--text); text-decoration: none; font-weight: 600; font-size: .95rem; background: var(--panel); }
.chips a:hover { border-color: var(--pink); color: var(--pink); }

.principles { display: grid; gap: 1.25rem; }
@media (min-width: 780px) { .principles { grid-template-columns: repeat(3, 1fr); } }
.principles .hud { padding: 1.3rem 1.4rem; }
.principles h3 { font-size: 1.15rem; margin-bottom: .3rem; }
.principles p { margin: 0; color: var(--muted); font-size: .97rem; }

/* Posts and pages */
.entry-wrap { padding: 2rem 0 3rem; }
.crumbs { font-size: .9rem; color: var(--muted); margin-bottom: 1.2rem; }
.crumbs a { color: var(--muted); }
.entry-head h1 { font-size: clamp(2rem, 4.6vw, 3.1rem); }
.entry-meta { display: flex; flex-wrap: wrap; gap: .3rem 1.2rem; color: var(--muted); font-size: .92rem; margin-bottom: 1.5rem; }
.entry-thumb { margin: 0 0 1.75rem; border-radius: var(--r); overflow: hidden; }
.entry > * { max-width: 100%; }
.entry h2 { margin-top: 2.2rem; }
.entry h3 { margin-top: 1.8rem; }
.entry p, .entry li { max-width: 72ch; }
.entry ul, .entry ol { padding-left: 1.3rem; }
.entry li { margin-bottom: .3rem; }
.entry img { border-radius: 8px; }
.entry blockquote { margin: 1.5rem 0; padding: .4rem 1.2rem; border-left: 3px solid var(--pink); color: var(--muted); }
.entry code { font-family: var(--mono); background: var(--panel-2); padding: .1em .35em; border-radius: 4px; font-size: .92em; }
.entry pre { background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 1rem; overflow-x: auto; }
.entry table { display: block; overflow-x: auto; border-collapse: collapse; width: 100%; margin: 1.5rem 0; }
.entry th, .entry td { text-align: left; padding: .6rem .9rem; border-bottom: 1px solid var(--line); white-space: nowrap; }
.entry th { color: var(--muted); font-weight: 600; background: var(--panel); }
.entry .alignleft { float: left; margin: .3rem 1.2rem 1rem 0; }
.entry .alignright { float: right; margin: .3rem 0 1rem 1.2rem; }
.entry .aligncenter { margin-inline: auto; }
.wp-caption-text, figcaption { font-size: .88rem; color: var(--muted); }
.related { margin-top: 3rem; }

.ad-slot { margin: 1.75rem 0; text-align: center; overflow: hidden; }
.ad-slot::before { content: "Advertisement"; display: block; font-size: .72rem; color: var(--muted); margin-bottom: .3rem; }

.page-head { padding: 2.5rem 0 1rem; }
.page-head p { color: var(--muted); max-width: 60ch; margin: 0; }
.nav-links { display: flex; flex-wrap: wrap; gap: .5rem; justify-content: center; margin: 2.5rem 0 0; }
.nav-links a, .nav-links span { padding: .5rem .95rem; border: 1px solid var(--line); border-radius: 8px; text-decoration: none; color: var(--text); }
.nav-links .current { background: var(--pink); border-color: var(--pink); color: #1a0613; font-weight: 700; }

/* Calculator building blocks: paste into a Custom HTML block on a Tool Page */
.tool-shell { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: 1.4rem; margin: 1.5rem 0; position: relative; }
.fps-form { display: grid; gap: 1rem; grid-template-columns: 1fr; }
@media (min-width: 640px) { .fps-form { grid-template-columns: repeat(2, 1fr); } .fps-form .full { grid-column: 1 / -1; } }
.fps-form label { display: grid; gap: .35rem; font-weight: 600; font-size: .95rem; }
.fps-form select, .fps-form input { width: 100%; background: var(--ink); color: var(--text); border: 1px solid var(--line); border-radius: 8px; padding: .7rem .8rem; font: 1rem var(--body); }
.fps-form select:focus, .fps-form input:focus { border-color: var(--ice); }
.fps-result { margin-top: 1.25rem; padding: 1.1rem 1.25rem; border: 1px dashed var(--line); border-radius: 8px; font-family: var(--mono); }
.fps-result .num { font-size: 2.8rem; font-weight: 700; line-height: 1; }
.fps-result .note { display: block; margin-top: .5rem; font: .85rem var(--body); color: var(--muted); }
.tier-high .num { color: var(--ice); }
.tier-ok .num { color: var(--ok); }
.tier-mid .num { color: var(--warn); }
.tier-low .num { color: var(--bad); }
.meter { height: 8px; background: var(--ink); border-radius: 99px; overflow: hidden; margin-top: .8rem; }
.meter > i { display: block; height: 100%; background: var(--ok); }

/* Footer */
.site-footer { margin-top: 3rem; border-top: 1px solid var(--line); padding: 2.5rem 0 2rem; color: var(--muted); font-size: .95rem; }
.foot-grid { display: grid; gap: 1.5rem; }
@media (min-width: 780px) { .foot-grid { grid-template-columns: 1.4fr 1fr; align-items: start; } }
.site-footer .menu { flex-direction: row; flex-wrap: wrap; gap: .3rem 1.4rem; }
.site-footer .menu a { padding: .2rem 0; }
.site-footer p { margin: 0 0 .6rem; max-width: 60ch; }
.copy { margin-top: 1.5rem; font-size: .85rem; }
