/*
Theme Name: Amalytico
Theme URI: https://www.amalytico.com/
Description: Amalytico Seller Studio - the 2016 look (navy, orange, sky blue, Montserrat) on a modern, responsive build.
Version: 3.0
Author: Dune Scientific
Author URI: https://www.dunescientific.com/
Requires PHP: 8.1
Text Domain: amalytico
*/

/* ============ Fonts (self-hosted, from the 2016 theme; SIL Open Font License) ============ */
@font-face { font-family: 'Montserrat'; font-weight: 300; font-display: swap; src: url('fonts/montserrat-light-webfont.woff2') format('woff2'); }
@font-face { font-family: 'Montserrat'; font-weight: 400; font-display: swap; src: url('fonts/montserrat-regular-webfont.woff2') format('woff2'); }
@font-face { font-family: 'Montserrat'; font-weight: 600; font-display: swap; src: url('fonts/montserrat-semibold-webfont.woff2') format('woff2'); }
@font-face { font-family: 'Montserrat'; font-weight: 700; font-display: swap; src: url('fonts/montserrat-bold-webfont.woff2') format('woff2'); }
@font-face { font-family: 'Open Sans'; font-weight: 400; font-display: swap; src: url('fonts/opensans-regular-webfont.woff2') format('woff2'); }
@font-face { font-family: 'Open Sans'; font-weight: 600; font-display: swap; src: url('fonts/opensans-semibold-webfont.woff2') format('woff2'); }

/* ============ Tokens (2016 palette) ============ */
:root {
	--navy: #263b5c;
	--navy-deep: #1d2e49;
	--orange: #ef8000;
	--orange-deep: #d56f00;
	--blue: #1288cc;
	--blue-deep: #006fb1;
	--sky: #dcedf6;
	--cyan: #0aaeea;
	--mist: #e6ecf0;
	--gold: #ffc425;
	--ink: #2d2d2d;
	--ink-soft: #4a4a4a;
	--ink-faint: #767676;
	--rule: #e5e5e5;
	--rule-strong: #d6d6d6;
	--select: #f9d77e;
	--positive: #079444;
	--error: #c0392b;

	--display: 'Montserrat', 'Segoe UI', Arial, sans-serif;
	--text: 'Open Sans', 'Segoe UI', Arial, sans-serif;

	--wide: 1120px;
	--measure: 68ch;
	--gutter: clamp(16px, 4vw, 40px);
	--radius: 10px;
}

/* ============ Base ============ */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
html, body { margin: 0; padding: 0; }
body {
	background: #fff;
	color: var(--ink);
	font-family: var(--text);
	font-size: 1rem;
	line-height: 1.65;
	-webkit-font-smoothing: antialiased;
	overflow-x: hidden;
}
img { max-width: 100%; height: auto; }
a { color: var(--blue); text-underline-offset: 0.18em; }
a:hover { color: var(--blue-deep); }
:focus-visible { outline: 3px solid var(--orange); outline-offset: 2px; border-radius: 2px; }

h1, h2, h3, h4 {
	font-family: var(--display);
	font-weight: 600;
	color: var(--ink);
	line-height: 1.2;
	margin: 0 0 0.5em;
	text-wrap: balance;
}
h1 { font-size: clamp(2rem, 4.2vw, 2.8rem); }
h2 { font-size: clamp(1.6rem, 3vw, 2.25rem); font-weight: 400; }
h3 { font-size: 1.2rem; }
p { margin: 0 0 1em; }

.skip-link {
	position: absolute; left: -9999px; top: 0;
	background: var(--orange); color: #fff; padding: 8px 14px; z-index: 100;
}
.skip-link:focus { left: 16px; top: 16px; }

.wrap { max-width: var(--wide); margin: 0 auto; padding: 0 var(--gutter); }

/* ============ Header ============ */
.site-header {
	background: var(--navy);
	border-bottom: 4px solid var(--orange);
	position: relative;
}
.header-inner {
	display: flex; align-items: center; justify-content: space-between;
	gap: 24px; min-height: 70px;
}
.brand {
	display: inline-flex; align-items: center; gap: 10px;
	text-decoration: none; line-height: 1;
}
.brand-mark { width: 48px; height: 48px; flex: none; }
.brand-text { display: flex; flex-direction: column; }
.brand-name {
	font: 700 1.65rem/1 var(--display); color: #fff;
	text-transform: uppercase; letter-spacing: 0.03em;
}
.brand-name sup { font-size: 0.4em; font-weight: 600; vertical-align: top; margin-left: 2px; color: var(--gold); }
.brand-sub {
	margin-top: 5px;
	font: 600 0.8rem/1 var(--display); color: var(--gold);
	text-transform: uppercase; letter-spacing: 0.43em; /* spans the width of AMALYTICO */
}
.brand:hover .brand-name { color: #fff; }
.brand:hover .brand-sub { color: #ffd65c; }

.site-nav ul { list-style: none; margin: 0; padding: 0; display: flex; align-items: center; }
.site-nav li + li { border-left: 1px solid rgba(255, 255, 255, 0.28); }
.site-nav a {
	display: block; padding: 4px 20px;
	color: #fff; text-decoration: none;
	font-family: var(--display); font-weight: 300; font-size: 1rem;
}
.site-nav li:last-child a { padding-right: 0; }
.site-nav a:hover { color: var(--gold); }
.site-nav .current-menu-item > a,
.site-nav .current_page_item > a { color: var(--gold); }

.menu-toggle {
	display: none;
	font: 400 1rem var(--display); color: #fff;
	background: none; border: 1px solid rgba(255, 255, 255, 0.5); border-radius: 6px;
	padding: 6px 14px; cursor: pointer;
}

@media (max-width: 760px) {
	.brand-mark { width: 40px; height: 40px; }
	.brand-name { font-size: 1.35rem; }
	.brand-sub { font-size: 0.68rem; letter-spacing: 0.39em; }
	.menu-toggle { display: block; }
	.site-nav ul {
		display: none;
		position: absolute; left: 0; right: 0; top: calc(100% + 4px);
		flex-direction: column; align-items: stretch;
		background: var(--navy); border-bottom: 4px solid var(--orange);
		padding: 4px var(--gutter) 12px; z-index: 20;
	}
	.site-nav li + li { border-left: 0; border-top: 1px solid rgba(255, 255, 255, 0.15); }
	.site-nav a, .site-nav li:last-child a { padding: 12px 0; }
	.site-nav.is-open ul { display: flex; }
}

/* ============ Buttons ============ */
.button, .wp-block-button__link {
	display: inline-block;
	font-family: var(--display); font-weight: 700; font-size: 1.05rem;
	padding: 13px 26px; border-radius: var(--radius);
	background: var(--orange); color: #fff;
	text-decoration: none; border: 2px solid var(--orange);
	text-align: center;
}
.button:hover, .wp-block-button__link:hover { background: var(--orange-deep); border-color: var(--orange-deep); color: #fff; }
.button--quiet { background: #fff; color: var(--blue); border-color: #fff; }
.button--quiet:hover { background: #fff; color: var(--blue-deep); border-color: var(--blue); }

/* ============ Front page: hero ============ */
.hero {
	background: var(--sky);
	padding: clamp(44px, 7vw, 90px) 0 clamp(48px, 7vw, 90px);
	position: relative;
	overflow: hidden;
}
/* The faded pie chart from the 2016 banner, behind the headline */
.hero::before {
	content: ""; position: absolute;
	left: max(-60px, calc(50% - 640px)); top: -30px;
	width: 380px; height: 380px;
	background: url('images/dose.png') no-repeat center / contain;
	opacity: 0.85; pointer-events: none;
}
.hero-inner {
	position: relative;
	display: grid;
	grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
	gap: clamp(28px, 5vw, 64px);
	align-items: center;
}
.hero h1 {
	font-weight: 600; text-transform: uppercase;
	font-size: clamp(2rem, 4.1vw, 2.9rem); line-height: 1.12;
	color: var(--orange); margin-bottom: 0.4em;
}
.hero h1 .lead { display: block; color: var(--blue); }
.hero-lede { font-size: 1.15rem; line-height: 1.55; color: var(--ink); max-width: 34ch; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 26px; }
.hero-actions .button { font-size: 1rem; padding: 12px 22px; }
.hero-status { margin-top: 22px; font-size: 0.875rem; color: var(--ink-soft); max-width: 44ch; }

/* App window: the ledger dressed as the 2016 "Amalytico Seller Studio" screenshot frame */
.ledger {
	margin: 0;
	background: var(--navy);
	border: 3px solid #e9a52a;
	border-radius: 22px;
	padding: 16px 18px 20px;
	box-shadow: 0 24px 48px -28px rgba(38, 59, 92, 0.6);
}
.ledger-title {
	margin: 0 0 10px; padding: 0 4px;
	font-family: var(--display); font-weight: 700; color: var(--gold);
	font-size: clamp(1.3rem, 2.4vw, 1.75rem); line-height: 1.15;
}
.ledger-title small { display: block; font-size: 0.55em; font-weight: 600; color: var(--gold); opacity: 0.9; }
.ledger-window { background: #fff; border-radius: 4px; overflow: hidden; border: 1px solid #9fb5cc; }
.ledger-bar {
	display: flex; justify-content: space-between; align-items: baseline; gap: 12px;
	padding: 6px 12px;
	font-size: 0.8125rem; color: var(--ink-soft);
	background: linear-gradient(#f4f8fb, #dfe8f0); border-bottom: 1px solid #b9c9d8;
}
.ledger-bar strong { color: var(--ink); font-weight: 600; }
.ledger-scroll { overflow-x: auto; }
.ledger table {
	width: 100%; border-collapse: collapse;
	font-size: 0.8rem; font-variant-numeric: tabular-nums;
}
.ledger th, .ledger td { padding: 7px 9px; text-align: left; white-space: nowrap; }
.ledger th {
	font-weight: 600; color: var(--ink-soft); background: #f3f5f7;
	border-bottom: 1px solid var(--rule-strong);
}
.ledger td { border-bottom: 1px solid #edf0f2; }
.ledger tr:last-child td { border-bottom: 0; }
.ledger .num { text-align: right; }
.ledger .id { color: var(--ink-faint); }
.ledger tr.is-repeat td { background: var(--select); color: #3d2f00; }
.ledger tr.is-repeat .id { color: #3d2f00; }
.ledger tfoot th, .ledger tfoot td {
	font-weight: 600; color: var(--ink); background: #f3f5f7;
	border-top: 1px solid var(--rule-strong); border-bottom: 0;
}
.ledger .tag {
	display: inline-block; margin-left: 6px; padding: 0 7px;
	background: var(--orange); color: #fff; border-radius: 4px;
	font-size: 0.72rem; font-weight: 600; line-height: 1.6;
}
.ledger-note {
	margin: 12px 4px 0;
	font-size: 0.8125rem; color: #c9d6e6;
}

@media (max-width: 900px) {
	.hero-inner { grid-template-columns: minmax(0, 1fr); }
	.hero::before { width: 260px; height: 260px; left: -40px; }
}
@media (min-width: 901px) and (max-width: 1100px) {
	.ledger .col-id { display: none; }
}
@media (max-width: 560px) {
	.ledger { padding: 12px 10px 14px; border-radius: 16px; }
	.ledger .col-id, .ledger .col-date { display: none; }
	.ledger th, .ledger td { padding: 7px 9px; }
}

/* ============ Front page: bands ============ */
.band { padding: clamp(44px, 6vw, 80px) 0; }
.band--white { background: #fff; }
.band--blue {
	background: var(--cyan) url('images/blue.png') no-repeat right center / cover;
	color: #fff;
}
.band--blue h2, .band--blue h3 { color: #fff; }
.band--blue a:not(.button) { color: #fff; }

.band-head { max-width: var(--measure); margin-bottom: 32px; }
.band-head .quote {
	font-family: var(--display); font-weight: 600; font-size: clamp(1.15rem, 2vw, 1.4rem);
	color: var(--ink); margin: 0 0 0.4em;
}
.band-head p { color: var(--ink-soft); font-size: 1.05rem; }

.facts {
	list-style: none; margin: 0; padding: 0;
	display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 36px 48px;
}
.facts li { border-top: 3px solid var(--orange); padding-top: 16px; }
.facts h3 { color: var(--blue); margin: 0 0 6px; }
.facts p { margin: 0; color: var(--ink-soft); }
@media (max-width: 700px) { .facts { grid-template-columns: minmax(0, 1fr); gap: 28px; } }

.status-panel {
	display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
	gap: 24px 48px; align-items: center;
}
.status-panel p { max-width: 56ch; font-size: 1.05rem; }
.status-panel .older { margin-top: 16px; font-size: 0.95rem; }
@media (max-width: 800px) { .status-panel { grid-template-columns: minmax(0, 1fr); } }

/* ============ Pages & posts ============ */
.page-head {
	background: var(--mist);
	padding: clamp(44px, 7vw, 84px) 0;
	text-align: center;
}
.page-head h1 { color: var(--blue); margin: 0 auto; max-width: 24ch; }
.page-head .meta { margin: 10px 0 0; color: var(--ink-soft); font-size: 0.875rem; }

.entry { padding-top: 40px; padding-bottom: 72px; }
.entry > * { max-width: var(--measure); margin-left: auto; margin-right: auto; }
.entry > .alignwide, .entry > .wp-block-table, .entry > .wp-block-columns { max-width: 880px; }
.entry h2 { margin-top: 1.5em; font-size: 1.5rem; font-weight: 600; color: var(--navy); }
.entry h3 { margin-top: 1.4em; color: var(--navy); }
.entry ul, .entry ol { padding-left: 1.3em; }
.entry li { margin-bottom: 0.35em; }
.entry table { border-collapse: collapse; width: 100%; font-variant-numeric: tabular-nums; }
.entry th, .entry td { text-align: left; vertical-align: top; padding: 10px 16px 10px 0; border-bottom: 1px solid var(--rule); }
.entry td:not(:last-child), .entry th:not(:last-child) { white-space: nowrap; }
.entry td:last-child, .entry th:last-child { padding-right: 0; }
.entry .wp-block-table table, .entry .wp-block-table thead,
.entry .wp-block-table th, .entry .wp-block-table td { border-left: 0; border-right: 0; border-top: 0; }
.entry .wp-block-table thead { border-bottom: 2px solid var(--orange); }
.entry .wp-block-table td { border-bottom: 1px solid var(--rule); }
.entry .wp-block-table th { font-family: var(--display); font-weight: 600; color: var(--navy); }
.entry code { background: #f2f2f2; padding: 0.1em 0.35em; border-radius: 3px; font-size: 0.92em; }
.entry blockquote { margin: 1.5em 0; padding-left: 18px; border-left: 3px solid var(--orange); color: var(--ink-soft); }

.post-list { list-style: none; margin: 0 auto; padding: 24px 0 72px; max-width: var(--measure); }
.post-list li { padding: 20px 0; border-bottom: 1px solid var(--rule); }
.post-list h2 { font-size: 1.25rem; font-weight: 600; margin: 0 0 4px; }
.post-list h2 a { color: var(--navy); text-decoration: none; }
.post-list h2 a:hover { color: var(--blue); text-decoration: underline; }
.post-list .meta { color: var(--ink-faint); font-size: 0.875rem; margin: 0 0 6px; }
.post-list p { margin: 0; color: var(--ink-soft); }
.pagination { padding-bottom: 64px; display: flex; gap: 16px; justify-content: center; }

/* ============ Contact form (Contact Form 7) ============ */
.entry > .wpcf7 { max-width: var(--measure); margin-top: 8px; margin-bottom: 28px; }
.wpcf7 form { max-width: 34rem; }
.wpcf7 form > p, .wpcf7 .cf-choices { margin: 0 0 18px; }
.wpcf7 form > p > br { display: none; }
.wpcf7 label { display: block; font-weight: 600; margin-bottom: 4px; }
.wpcf7 .optional { font-weight: 400; color: var(--ink-faint); }
.wpcf7 input[type="text"], .wpcf7 input[type="email"], .wpcf7 select, .wpcf7 textarea {
	width: 100%; font: inherit; color: var(--ink);
	background: #fff; border: 1px solid #c4ccd3; border-radius: 6px;
	padding: 10px 12px;
}
.wpcf7 textarea { min-height: 7.5em; resize: vertical; }
.wpcf7 input:focus-visible, .wpcf7 select:focus-visible, .wpcf7 textarea:focus-visible { outline: 3px solid var(--blue); outline-offset: 1px; }
.wpcf7 .cf-choices { border: 0; padding: 0; }
.wpcf7 .cf-choices legend { font-weight: 600; padding: 0; margin-bottom: 6px; }
.wpcf7 .wpcf7-list-item { display: block; margin: 0 0 6px; }
.wpcf7 .wpcf7-list-item label { display: inline-flex; gap: 8px; align-items: center; font-weight: 400; margin: 0; }
.wpcf7 input[type="checkbox"] { width: 18px; height: 18px; accent-color: var(--orange); }
.wpcf7 input[type="submit"] {
	font-family: var(--display); font-weight: 700; font-size: 1.05rem; cursor: pointer;
	padding: 12px 36px; border-radius: var(--radius);
	background: var(--orange); color: #fff; border: 0;
}
.wpcf7 input[type="submit"]:hover { background: var(--orange-deep); }
.wpcf7 .wpcf7-spinner { vertical-align: middle; }
.wpcf7-not-valid-tip { color: var(--error); font-size: 0.875rem; margin-top: 4px; }
.wpcf7 .wpcf7-not-valid { border-color: var(--error); }
.wpcf7 form .wpcf7-response-output { margin: 8px 0 0; padding: 10px 14px; border-radius: 6px; border-width: 1px; }
.wpcf7 form.sent .wpcf7-response-output { border-color: var(--positive); background: #eaf6ef; }
.wpcf7 form.invalid .wpcf7-response-output, .wpcf7 form.failed .wpcf7-response-output { border-color: var(--error); background: #fbeceb; }

/* Contact form honeypot (see functions.php) */
.wpcf7 .hp-field { display: none; }

/* ============ Footer ============ */
.site-footer {
	background: var(--navy);
	color: #fff;
	padding: 44px 0;
	font-family: var(--display); font-weight: 300;
}
.footer-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px 32px; }
.footer-links { list-style: none; margin: 0 0 8px; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 20px; }
.footer-links a { color: #fff; text-decoration: none; }
.footer-links a:hover { color: var(--gold); text-decoration: underline; }
.footer-inner p { margin: 0; font-size: 0.95rem; }
.footer-inner p a { color: #fff; }
.footer-inner .disclaimer { margin-top: 4px; font-size: 0.8125rem; color: #b8c4d6; }

/* ============ WordPress bits ============ */
.screen-reader-text {
	position: absolute !important; width: 1px; height: 1px; overflow: hidden;
	clip: rect(1px, 1px, 1px, 1px); white-space: nowrap;
}
.aligncenter { margin-left: auto; margin-right: auto; display: block; }
.wp-caption-text, figcaption { font-size: 0.875rem; color: var(--ink-faint); }
