/*
Theme Name: Offer Calc Site
Description: Marketing site for the Offer Calc plugin.
Version: 1.0.0
Author: DevriX
License: GPLv2 or later
*/

:root {
	--ink: #0b1b2b;
	--ink-2: #1d2f44;
	--muted: #5b6b7d;
	--line: #e3e8ee;
	--bg: #fbfbf8;
	--card: #ffffff;
	--soft: #f1f5f2;
	--accent: #10b981;
	--accent-ink: #047857;
	--accent-soft: #d1fae5;
	--radius: 14px;
	--shadow: 0 1px 2px rgba(11, 27, 43, .06), 0 12px 32px -12px rgba(11, 27, 43, .18);
	--sans: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
	--mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
body {
	margin: 0;
	font-family: var(--sans);
	font-size: 17px;
	line-height: 1.6;
	color: var(--ink);
	background: var(--bg);
	-webkit-font-smoothing: antialiased;
	text-rendering: optimizeLegibility;
}
img { max-width: 100%; height: auto; }
a { color: var(--accent-ink); }
h1, h2, h3 { line-height: 1.12; letter-spacing: -0.025em; margin: 0 0 .5em; }
h1 { font-size: clamp(2.4rem, 5.2vw, 3.9rem); font-weight: 800; }
h2 { font-size: clamp(1.8rem, 3.4vw, 2.6rem); font-weight: 800; }
h3 { font-size: 1.12rem; font-weight: 700; letter-spacing: -0.01em; }
p { margin: 0 0 1em; }

.wrap { width: 100%; max-width: 1160px; margin: 0 auto; padding: 0 24px; }
.wrap.narrow { max-width: 760px; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 16px; z-index: 100; background: #fff; padding: 8px 12px; }

.eyebrow {
	font-size: .78rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
	color: var(--accent-ink); margin-bottom: .9rem;
}
.lede { font-size: 1.18rem; color: var(--muted); max-width: 34em; }

/* Buttons */
.btn {
	display: inline-flex; align-items: center; justify-content: center; gap: .5em;
	font: 600 .95rem/1 var(--sans); text-decoration: none; white-space: nowrap;
	padding: .8em 1.2em; border-radius: 10px; border: 1px solid transparent;
	transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-lg { font-size: 1rem; padding: 1em 1.45em; }
.btn-sm { font-size: .88rem; padding: .62em 1em; }
.btn-primary { background: var(--ink); color: #fff; box-shadow: 0 6px 18px -8px rgba(11, 27, 43, .6); }
.btn-primary:hover { background: var(--ink-2); }
.btn-ghost { background: transparent; color: var(--ink); border-color: #cfd7e0; }
.btn-ghost:hover { background: #fff; }
.btn-ghost-light { color: #fff; border-color: rgba(255, 255, 255, .3); }
.btn-ghost-light:hover { background: rgba(255, 255, 255, .08); }

/* Header */
.site-header {
	position: sticky; top: 0; z-index: 50;
	background: rgba(251, 251, 248, .85); backdrop-filter: saturate(160%) blur(10px);
	-webkit-backdrop-filter: saturate(160%) blur(10px);
	border-bottom: 1px solid rgba(227, 232, 238, .7);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 68px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-weight: 800; letter-spacing: -0.02em; font-size: 1.08rem; }
.site-nav { display: flex; align-items: center; gap: 28px; }
.site-nav a:not(.btn) { color: var(--ink-2); text-decoration: none; font-size: .94rem; font-weight: 500; }
.site-nav a:not(.btn):hover { color: var(--accent-ink); }
.nav-toggle { display: none; background: none; border: 0; padding: 10px; cursor: pointer; }
.nav-toggle span { display: block; width: 22px; height: 2px; background: var(--ink); margin: 5px 0; transition: transform .2s; }

/* Hero */
.hero { padding: 72px 0 88px; position: relative; overflow: hidden; }
.hero::before {
	content: ""; position: absolute; inset: -40% -10% auto auto; width: 720px; height: 720px;
	background: radial-gradient(closest-side, rgba(16, 185, 129, .16), transparent 70%);
	pointer-events: none;
}
.hero-grid { display: grid; grid-template-columns: 1.05fr 1fr; gap: 56px; align-items: center; position: relative; }
.badge {
	display: inline-flex; align-items: center; gap: 8px; font-size: .84rem; font-weight: 500; color: var(--ink-2);
	background: #fff; border: 1px solid var(--line); padding: 6px 12px; border-radius: 999px; margin-bottom: 22px;
}
.badge .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 30px 0 26px; }
.hero-facts { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px 22px; color: var(--muted); font-size: .92rem; }
.hero-facts li::before { content: "\2713"; color: var(--accent); font-weight: 700; margin-right: 7px; }

.mock { background: var(--card); border-radius: 18px; box-shadow: var(--shadow), 0 0 0 1px var(--line); overflow: hidden; transform: rotate(1deg); }
.mock-bar { display: flex; align-items: center; gap: 6px; padding: 12px 16px; background: #f5f7f9; border-bottom: 1px solid var(--line); }
.mock-bar span { width: 10px; height: 10px; border-radius: 50%; background: #d7dde4; }
.mock-bar em { font-style: normal; font-size: .78rem; color: var(--muted); margin-left: 12px; font-family: var(--mono); }
.mock-body { padding: 22px 22px 18px; }
.mock-title { font-weight: 700; margin-bottom: 12px; }
.mock-row {
	display: grid; grid-template-columns: 1fr 60px 44px 74px; gap: 10px; align-items: center;
	padding: 11px 0; border-bottom: 1px dashed var(--line); font-size: .9rem;
}
.mock-row b { font-weight: 500; }
.mock-row i, .mock-row s { font-style: normal; text-decoration: none; font-family: var(--mono); text-align: right; }
.mock-row i { color: var(--muted); }
.mock-row u { text-decoration: none; text-align: center; border: 1px solid var(--line); border-radius: 6px; padding: 2px 0; font-family: var(--mono); }
.mock-row s { font-weight: 600; }
.mock-total { display: flex; justify-content: space-between; align-items: baseline; margin-top: 16px; padding: 14px 16px; background: var(--ink); color: #fff; border-radius: 12px; }
.mock-total strong { font-family: var(--mono); font-size: 1.5rem; color: #6ee7b7; }

/* Sections */
section { padding: 96px 0; }
.steps { background: #fff; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.step-grid { list-style: none; padding: 0; margin: 44px 0 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.step-grid li { background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; }
.step-n {
	display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 10px;
	background: var(--ink); color: #6ee7b7; font: 600 .95rem var(--mono); margin-bottom: 16px;
}
.step-grid p { color: var(--muted); margin: 0; }
.code-chip { margin-top: 16px; display: flex; align-items: center; gap: 8px; background: var(--ink); border-radius: 10px; padding: 8px 8px 8px 14px; }
.code-chip code { font: 500 .78rem var(--mono); color: #d1fae5; overflow-x: auto; white-space: nowrap; flex: 1; min-width: 0; }
.code-chip button { font: 600 .75rem var(--sans); background: rgba(255, 255, 255, .1); color: #fff; border: 0; border-radius: 6px; padding: 6px 10px; cursor: pointer; }
.code-chip button:hover { background: rgba(255, 255, 255, .2); }

.demo-grid { display: grid; grid-template-columns: .85fr 1.15fr; gap: 56px; align-items: start; }
.demo-copy { position: sticky; top: 110px; }
.demo-copy > p { color: var(--muted); }
.checks { list-style: none; padding: 0; margin: 24px 0 0; }
.checks li { padding: 7px 0 7px 30px; position: relative; }
.checks li::before {
	content: "\2713"; position: absolute; left: 0; top: 9px; width: 20px; height: 20px; border-radius: 50%;
	background: var(--accent-soft); color: var(--accent-ink); font-size: .72rem; font-weight: 800; display: grid; place-items: center;
}
.demo-card { background: var(--card); border-radius: 18px; box-shadow: var(--shadow), 0 0 0 1px var(--line); overflow: hidden; }
.demo-card-head { display: flex; justify-content: space-between; align-items: center; padding: 18px 24px; border-bottom: 1px solid var(--line); font-weight: 700; }
.demo-card-head em { font-style: normal; font: 600 .72rem var(--mono); color: var(--accent-ink); background: var(--accent-soft); padding: 4px 8px; border-radius: 6px; text-transform: uppercase; letter-spacing: .06em; }

/* The plugin's own calculator markup, restyled. Class names are the plugin's;
   the extra div.offercalc_wrapper qualifier outranks its own selectors. */
.demo-card div.offercalc_wrapper { padding: 6px 24px 24px; }
.demo-card .offer-form { margin: 0; }
.demo-card div.offercalc_wrapper .offer_calc_wrapper {
	display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 2fr); gap: 16px; align-items: end;
	float: none; width: auto; padding: 16px 0; margin: 0; border-bottom: 1px solid var(--line); background: none;
}
.demo-card div.offercalc_wrapper .offer_calc_wrapper > .clr,
.demo-card div.offercalc_wrapper .offer_calc_service > p,
.demo-card div.offercalc_wrapper .offer_calc_display_img:empty { display: none; }
.demo-card div.offercalc_wrapper .offer_calc_order { float: none; width: auto; margin: 0; padding: 0; border: 0; background: none; min-height: 0; }
.demo-card div.offercalc_wrapper .offer_calc_service { align-self: center; }
.demo-card div.offercalc_wrapper .offer_calc_ordertitle_service { float: none; width: auto; margin: 0; padding: 0; }
.demo-card .offer_calc_service_name { font-weight: 600; font-size: .98rem; line-height: 1.35; color: var(--ink); display: block; }
.demo-card div.offercalc_wrapper .offer_calc_service-click { display: grid; grid-template-columns: .9fr 1fr 1.1fr; gap: 10px; }
.demo-card div.offercalc_wrapper .offer_calc_service-next { display: flex; flex-direction: column; gap: 6px; }
.demo-card div.offercalc_wrapper .offer_calc_ordertitle,
.demo-card div.offercalc_wrapper .offer_calc_ordertitle label {
	font-size: .68rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--muted);
	margin: 0; padding: 0; background: none; border: 0; text-align: left; width: auto; float: none; line-height: 1.2;
}
/* Column labels once, on the first row only, like a table header. */
.demo-card div.offercalc_wrapper .offer_calc_wrapper:not(:first-of-type) .offer_calc_ordertitle { display: none; }
.demo-card .offer_calc_currency { font: 500 .95rem var(--mono); color: var(--ink-2); line-height: 40px; white-space: nowrap; }
.demo-card div.offercalc_wrapper .offer_calc_orderlist { margin: 0; padding: 0; width: auto; float: none; }
.demo-card div.offercalc_wrapper select, .demo-card div.offercalc_wrapper .offer-sum {
	width: 100%; height: 40px; margin: 0; font: 500 .95rem var(--mono); color: var(--ink);
	border: 1px solid #cfd7e0; border-radius: 9px; background-color: #fff; padding: 0 10px; box-shadow: none;
}
.demo-card div.offercalc_wrapper select {
	appearance: none; -webkit-appearance: none; cursor: pointer;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%235b6b7d' stroke-width='1.6'/%3E%3C/svg%3E");
	background-repeat: no-repeat; background-position: right 10px center; padding-right: 28px;
}
.demo-card div.offercalc_wrapper select:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: var(--accent); }
.demo-card div.offercalc_wrapper .offer-sum { background: var(--soft); border-color: transparent; font-weight: 600; text-align: right; }
.demo-card div.offercalc_wrapper div.total_offercalc_sum {
	display: flex; justify-content: flex-start; align-items: center; float: none; width: auto;
	margin: 22px 0 0; padding: 18px 20px; border-radius: 12px; border: 0;
	background: var(--ink); color: #c8d3df; font-size: .82rem; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; text-align: left;
}
.demo-card div.offercalc_wrapper div.total_offercalc_sum > span {
	font: 600 1.9rem/1 var(--mono); color: #6ee7b7; letter-spacing: -0.02em; text-transform: none; float: none; margin: 0; padding: 0; background: none;
}
.ocs-total { display: inline-block; }
.ocs-total.pulse { animation: ocs-pulse .45s ease; }
@keyframes ocs-pulse { 0% { transform: scale(1); } 40% { transform: scale(1.08); } 100% { transform: scale(1); } }
.demo-card div.offercalc_wrapper div.total_offercalc_sum > .ocs-cur { margin-left: auto; }
.demo-card .error { color: #b91c1c; font-size: .9rem; margin-top: 10px; }

.features { background: #fff; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.feature-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; margin-top: 44px; }
.feature-grid article { padding: 28px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg); transition: border-color .2s, transform .2s; }
.feature-grid article:hover { border-color: #b7e4cf; transform: translateY(-2px); }
.feature-grid p { color: var(--muted); margin: 0; font-size: .97rem; }
.ico {
	display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 11px; margin-bottom: 18px;
	background: var(--accent-soft); color: var(--accent-ink); font: 700 1rem var(--mono);
}

.use-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-top: 40px; }
.use-grid div { display: flex; flex-direction: column; padding: 20px 22px; border-radius: 12px; background: #fff; border: 1px solid var(--line); }
.use-grid strong { font-weight: 700; }
.use-grid span { color: var(--muted); font: 500 .85rem var(--mono); margin-top: 2px; }

.faq { background: #fff; border-top: 1px solid var(--line); }
.faq h2 { margin-bottom: 30px; }
.faq details { border-bottom: 1px solid var(--line); padding: 4px 0; }
.faq summary {
	cursor: pointer; list-style: none; font-weight: 600; font-size: 1.06rem; padding: 18px 36px 18px 0; position: relative;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 4px; top: 50%; transform: translateY(-50%); font: 400 1.5rem var(--mono); color: var(--muted); }
.faq details[open] summary::after { content: "\2212"; }
.faq details p { color: var(--muted); margin: 0 0 20px; }

.cta-band { background: var(--ink); color: #fff; padding: 80px 0; position: relative; overflow: hidden; }
.cta-band::before {
	content: ""; position: absolute; right: -120px; top: -200px; width: 560px; height: 560px;
	background: radial-gradient(closest-side, rgba(52, 211, 153, .28), transparent 70%);
}
.cta-inner { display: flex; justify-content: space-between; align-items: center; gap: 32px; position: relative; flex-wrap: wrap; }
.cta-band h2 { color: #fff; margin-bottom: .3em; }
.cta-band p { color: #a9b8c8; margin: 0; }
.cta-band .btn-primary { background: #34d399; color: var(--ink); box-shadow: none; }
.cta-band .btn-primary:hover { background: #6ee7b7; }
.cta-actions { display: flex; gap: 12px; flex-wrap: wrap; }

.site-footer { background: var(--ink); color: #8fa1b4; border-top: 1px solid rgba(255, 255, 255, .08); padding: 40px 0; font-size: .92rem; }
.footer-inner { display: flex; justify-content: space-between; align-items: center; gap: 24px; flex-wrap: wrap; }
.site-footer .brand { color: #fff; font-size: 1rem; }
.footer-brand p { margin: 8px 0 0; }
.footer-nav { display: flex; gap: 24px; flex-wrap: wrap; }
.footer-nav a { color: #c8d3df; text-decoration: none; }
.footer-nav a:hover { color: #6ee7b7; }

/* Inner pages */
.page-hero { padding: 80px 0 40px; }
.page-hero h1 { font-size: clamp(2.2rem, 4.5vw, 3.2rem); }
.page-body { padding: 0 0 96px; }
.prose { font-size: 1.04rem; }
.prose h2 { font-size: 1.6rem; margin: 2.2em 0 .6em; padding-top: .4em; }
.prose h2:first-child { margin-top: 0; }
.prose h3 { margin: 1.8em 0 .5em; }
.prose p, .prose li { color: #2c3e52; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li { margin: .35em 0; }
.prose code { overflow-wrap: anywhere; font: 500 .88em var(--mono); background: var(--soft); padding: .15em .4em; border-radius: 5px; color: var(--accent-ink); }
.prose pre { background: var(--ink); color: #d1fae5; padding: 18px 20px; border-radius: 12px; overflow-x: auto; font: 500 .85rem/1.6 var(--mono); }
.prose pre code { background: none; color: inherit; padding: 0; font-size: inherit; overflow-wrap: normal; }
.prose .note { background: var(--accent-soft); border-radius: 12px; padding: 16px 20px; color: #064e3b; }
.prose .release { border-left: 3px solid var(--line); padding-left: 22px; margin: 0 0 34px; }
.prose .release h2 { margin: 0 0 .2em; padding: 0; font-size: 1.35rem; display: flex; align-items: baseline; gap: 12px; }
.prose .release h2 small { font: 500 .8rem var(--mono); color: var(--muted); letter-spacing: 0; }
.prose .release.latest { border-left-color: var(--accent); }

/* Responsive */
@media (max-width: 960px) {
	.hero-grid, .demo-grid { grid-template-columns: 1fr; gap: 44px; }
	.demo-copy { position: static; }
	.step-grid, .feature-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.mock { transform: none; }
}
@media (max-width: 760px) {
	body { font-size: 16px; }
	.wrap { padding: 0 16px; }
	section { padding: 68px 0; }
	.hero { padding: 44px 0 64px; }
	.nav-toggle { display: block; }
	.site-nav {
		position: fixed; top: 68px; left: 0; right: 0; flex-direction: column; align-items: stretch; gap: 0;
		background: var(--bg); border-bottom: 1px solid var(--line); padding: 8px 16px 18px;
		transform: translateY(-8px); opacity: 0; pointer-events: none; transition: opacity .18s, transform .18s;
	}
	.site-nav a:not(.btn) { padding: 13px 0; border-bottom: 1px solid var(--line); }
	.site-nav .btn { margin-top: 14px; }
	.nav-open .site-nav { transform: none; opacity: 1; pointer-events: auto; }
	.nav-open .nav-toggle span:first-child { transform: translateY(3.5px) rotate(45deg); }
	.nav-open .nav-toggle span:last-child { transform: translateY(-3.5px) rotate(-45deg); }
	.step-grid, .feature-grid, .use-grid { grid-template-columns: minmax(0, 1fr); }
	.hero-actions .btn { flex: 1 1 100%; }
	.mock-row { grid-template-columns: 1fr 52px 36px 66px; font-size: .82rem; gap: 6px; }
	.demo-card div.offercalc_wrapper { padding: 4px 16px 18px; }
	.demo-card-head { padding: 16px; }
	.demo-card div.offercalc_wrapper .offer_calc_wrapper { grid-template-columns: 1fr; gap: 10px; }
	.demo-card div.offercalc_wrapper .offer_calc_service-click { gap: 8px; }
	.cta-actions .btn { flex: 1 1 100%; }
}
