/*
Theme Name: ThinkOvi
Template: twentytwentyfive
Description: ThinkOvi Solutions theme. E-paper dot-matrix brand: graphite on warm paper with a signal-red accent, built on the original thinkovi.com dotted-T logo.
Version: 3.0.0
Text Domain: thinkovi
*/

/* =========================================================
   Tokens
   E-paper: graphite text on warm paper and surface bands.
   Signal red (#c8102e) for dots, buttons (white text), markers and big
   numbers; deep red (#a50d26) for small red text.
   ========================================================= */
:root {
	--tv-ink: var(--wp--preset--color--ink);
	--tv-ink-2: var(--wp--preset--color--ink-2);
	--tv-surface: var(--wp--preset--color--surface);
	--tv-paper: var(--wp--preset--color--paper);
	--tv-accent: var(--wp--preset--color--accent);
	--tv-accent-ink: var(--wp--preset--color--accent-ink);
	--tv-muted: var(--wp--preset--color--muted);
	--tv-muted-dark: var(--wp--preset--color--muted-dark);
	--tv-line: var(--wp--preset--color--line);
	--tv-focus: var(--tv-ink);
	--tv-dots: url("assets/dots.svg");
	--tv-ease: cubic-bezier(.2, .7, .2, 1);
}

/* E-paper surfaces: hero, page headers, client board, footer (class names kept from the dark era) */
.tv-dark,
.tv-page-head,
.tv-footer {
	background-color: var(--tv-surface);
	background-image: var(--tv-dots);
	color: var(--tv-ink);
}
.tv-dark :is(h1, h2, h3, h4),
.tv-page-head :is(h1, h2, h3),
.tv-footer :is(h2, h3) { color: var(--tv-ink); }

/* =========================================================
   Focus, hover, active (one system for every interactive element)
   ========================================================= */
:where(a, button, .wp-element-button, input, textarea, select, summary):focus-visible {
	outline: 3px solid var(--tv-focus);
	outline-offset: 3px;
	border-radius: 4px;
}
.wp-element-button:focus-visible,
.wp-block-button__link:focus-visible { border-radius: 999px; outline-color: var(--tv-focus) !important; }

/* Text links on light surfaces */
a:where(:not(.wp-element-button)) {
	text-underline-offset: .2em;
	text-decoration-thickness: 1px;
	transition: color .15s, text-decoration-color .15s, text-decoration-thickness .15s;
}
a:where(:not(.wp-element-button)):hover {
	color: var(--tv-accent-ink);
	text-decoration-thickness: 2px;
}
a:where(:not(.wp-element-button)):active { color: var(--tv-ink); }

/* Text links on dark surfaces */
:is(.tv-dark, .tv-page-head, .tv-footer) a:where(:not(.wp-element-button)) { color: var(--tv-ink); }
:is(.tv-dark, .tv-page-head, .tv-footer) a:where(:not(.wp-element-button)):hover { color: var(--tv-accent-ink); }

/* Buttons: signal red with white text; hover turns graphite */
.wp-block-button__link { transition: background-color .15s, color .15s, border-color .15s, transform .15s; }
.wp-block-button__link:active { transform: translateY(1px); }
.wp-block-button.is-style-outline .wp-block-button__link {
	background: transparent;
	color: currentColor;
	border: 2px solid currentColor;
	padding: .75rem 1.4rem;
}
.wp-block-button.is-style-outline .wp-block-button__link:hover {
	background: var(--tv-ink);
	border-color: var(--tv-ink);
	color: var(--tv-paper);
}

/* Arrow affordances. The glyphs are hidden from screen readers via the alt-text syntax. */
.tv-arrow::after,
.wp-block-button__link.tv-go::after,
.wp-block-latest-posts__post-title::after,
.wp-block-post-title a::after {
	content: "→" / "";
	display: inline-block;
	margin-left: .35em;
	transition: transform .18s var(--tv-ease);
}
.tv-arrow:hover::after,
.wp-block-button__link.tv-go:hover::after,
.wp-block-latest-posts__post-title:hover::after,
.wp-block-post-title a:hover::after { transform: translateX(4px); }

/* External links get a ↗ marker (.tv-ext is added server-side by comparing hosts). */
a.tv-ext::after {
	content: "↗" / "";
	font-size: .8em;
	margin-left: .15em;
	display: inline-block;
	transition: transform .18s var(--tv-ease);
}
a.tv-ext:hover::after { transform: translate(2px, -2px); }

/* =========================================================
   Labels: the coral "| " marker from the 2016 site, now signal red
   ========================================================= */
.tv-eyebrow {
	font-family: var(--wp--preset--font-family--fira-code);
	font-size: .85rem;
	letter-spacing: .03em;
	text-transform: lowercase;
	color: var(--tv-muted);
	margin-bottom: .4rem !important;
}
.tv-eyebrow::before { content: "| " / ""; color: var(--tv-accent-ink); font-weight: 700; }
:is(.tv-dark, .tv-page-head) .tv-eyebrow { color: var(--tv-muted); }
:is(.tv-dark, .tv-page-head) .tv-eyebrow::before { color: var(--tv-accent); }
.tv-accent { color: var(--tv-accent); }

/* =========================================================
   Header
   ========================================================= */
.tv-header { border-bottom: 1px solid var(--tv-line); }
.tv-header .wp-block-site-title a { text-decoration: none; font-weight: 800; letter-spacing: -.02em; }
.tv-logo { display: inline-flex; border-radius: 50%; }
.tv-logo img { width: 40px; height: 40px; display: block; transition: transform .3s var(--tv-ease); }
.tv-logo:hover img { transform: rotate(-8deg) scale(1.05); }
.tv-header .wp-block-navigation-item__content {
	text-decoration: none;
	padding: .35rem .1rem;
	border-bottom: 2px solid transparent;
	transition: border-color .15s, color .15s;
}
.tv-header .wp-block-navigation-item__content:hover { color: var(--tv-ink); border-bottom-color: var(--tv-ink); }
.tv-header .current-menu-item > .wp-block-navigation-item__content,
.tv-header [aria-current="page"] { border-bottom-color: var(--tv-ink); font-weight: 700; }

/* Mobile menu overlay: e-paper surface, large type, red current item */
.wp-block-navigation__responsive-container.is-menu-open {
	background: var(--tv-surface) !important;
	color: var(--tv-ink) !important;
}
.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item__content {
	font-size: 1.8rem;
	font-weight: 800;
	color: var(--tv-ink);
}
.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item__content:hover { color: var(--tv-accent-ink); border-bottom-color: var(--tv-accent); }

/* =========================================================
   Hero (home)
   ========================================================= */
.tv-hero { overflow: hidden; }
.tv-hero h1 { font-size: clamp(2.6rem, 6vw, 4.6rem); line-height: 1.02; letter-spacing: -.035em; }
.tv-hero .tv-lede { font-size: clamp(1.15rem, 2vw, 1.4rem); color: #3d4046; max-width: 34ch; }
.tv-hero .tv-meta { font-family: var(--wp--preset--font-family--fira-code); font-size: .85rem; color: var(--tv-muted); }
.tv-hero-mark img { width: 100%; max-width: 360px; margin-left: auto; display: block; }
.tv-stat .tv-num { font-size: clamp(2rem, 4vw, 2.8rem); font-weight: 800; letter-spacing: -.03em; line-height: 1; color: var(--tv-accent); margin-bottom: .3rem; }
.tv-stat p:last-child { color: var(--tv-muted); font-size: .98rem; }

/* =========================================================
   Page header band (inner pages, posts, writing)
   ========================================================= */
.tv-page-head .wp-block-post-title,
.tv-page-head .wp-block-query-title,
.tv-page-head h1 { color: var(--tv-ink); margin: 0; }
.tv-page-head .wp-block-post-title::before,
.tv-page-head h1.tv-marked::before { content: "| " / ""; color: var(--tv-accent); font-weight: 400; }
.tv-page-head .wp-block-post-excerpt__excerpt { font-size: clamp(1.1rem, 1.8vw, 1.3rem); color: #3d4046; max-width: 46ch; margin-top: 1rem; }
.tv-page-head .wp-block-post-date,
.tv-page-head .tv-meta { font-family: var(--wp--preset--font-family--fira-code); font-size: .85rem; color: var(--tv-muted); }

/* =========================================================
   Cards: the whole card is the link; the icon tile "lights up"
   ========================================================= */
.tv-card {
	position: relative;
	border: 1px solid #8f8b81; /* 3.3:1 on white */
	border-radius: 14px;
	background: var(--wp--preset--color--white);
	height: 100%;
	transition: transform .18s var(--tv-ease), box-shadow .18s, border-color .18s;
}
.tv-card h3 { margin-top: .7rem; }
.tv-card h3 a { text-decoration: none; color: inherit; }
.tv-card h3 a::before { content: ""; position: absolute; inset: 0; border-radius: 14px; } /* stretched link */
.tv-card h3 a::after { content: "→" / ""; display: inline-block; margin-left: .35em; color: var(--tv-accent-ink); transition: transform .18s var(--tv-ease); }
.tv-card:is(:hover, :focus-within):not(.tv-card--static) {
	transform: translateY(-3px);
	border-color: var(--tv-ink);
	box-shadow: 0 14px 34px -20px rgba(20, 21, 26, .55);
}
.tv-card:is(:hover, :focus-within) h3 a::after { transform: translateX(5px); }
.tv-card:is(:hover, :focus-within) h3 a { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: .2em; }
.tv-card h3 a:focus-visible { outline: none; }
.tv-card:has(h3 a:focus-visible) { outline: 3px solid var(--tv-ink); outline-offset: 3px; }
.tv-icon img { width: 56px; height: 56px; border-radius: 12px; display: block; transition: box-shadow .2s; }
.tv-card:is(:hover, :focus-within):not(.tv-card--static) .tv-icon img { box-shadow: 0 0 0 3px var(--tv-paper), 0 0 0 5px var(--tv-accent); }
.tv-card--static { background: transparent; border-style: dashed; }
.tv-tags { font-family: var(--wp--preset--font-family--fira-code); font-size: .8rem; color: var(--tv-muted); }

/* =========================================================
   Writing: index list and single posts
   ========================================================= */
.tv-post-list .wp-block-post { padding: 1.6rem 0; border-bottom: 1px solid var(--tv-line); }
.tv-post-list .wp-block-post-title { font-size: clamp(1.3rem, 2.4vw, 1.7rem); margin: .2rem 0 .5rem; }
.tv-post-list .wp-block-post-title a { text-decoration: none; }
.tv-post-list .wp-block-post-title a:hover { color: var(--tv-accent-ink); }
.tv-post-list .wp-block-post-date { font-family: var(--wp--preset--font-family--fira-code); font-size: .82rem; color: var(--tv-muted); }
.wp-block-latest-posts li { padding: 1.2rem 0; border-bottom: 1px solid var(--tv-line); }
.wp-block-latest-posts__post-title { font-weight: 800; font-size: 1.25rem; text-decoration: none; }
.wp-block-latest-posts__post-date { font-family: var(--wp--preset--font-family--fira-code); font-size: .82rem; color: var(--tv-muted); }
.tv-back { font-family: var(--wp--preset--font-family--fira-code); font-size: .9rem; }

/* Lists in content: amber dot bullets (decorative) */
.wp-block-post-content ul.wp-block-list { list-style: none; padding-left: 1.3em; }
.wp-block-post-content ul.wp-block-list > li { position: relative; margin-bottom: .5em; }
.wp-block-post-content ul.wp-block-list > li::before {
	content: ""; position: absolute; left: -1.15em; top: .6em;
	width: .45em; height: .45em; border-radius: 50%; background: var(--tv-accent);
}

/* =========================================================
   Footer: dark, with a call to action
   ========================================================= */
.tv-footer h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); }
.tv-footer p { color: var(--tv-muted); }
.tv-footer .tv-footer-links a { display: inline-block; padding: .35rem .2rem; text-decoration: none; }
.tv-footer .tv-footer-links a:hover { text-decoration: underline; }
.tv-footer .tv-rule { border-top: 1px dotted var(--tv-line); }

/* =========================================================
   Responsive and motion
   ========================================================= */
.tv-eyebrow, .tv-meta { overflow-wrap: anywhere; }
@media (max-width: 781px) {
	.tv-hero { padding-top: 3.5rem !important; padding-bottom: 3.5rem !important; }
	.tv-hero-mark { display: none; }
	.tv-stats { margin-top: 2.5rem !important; display: grid !important; grid-template-columns: 1fr 1fr; gap: 1.5rem 1rem; }
	.tv-stat .tv-num { font-size: 2rem; }
}
@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after { transition: none !important; animation: none !important; }
	.tv-card:hover, .tv-card:focus-within { transform: none !important; }
}

/* =========================================================
   Company sections
   ========================================================= */
/* Clients and partners strip: typographic wordmarks (no third-party logos) */
.tv-clients:not(.tv-dark) { background: var(--wp--preset--color--white); border-top: 1px solid var(--tv-line); border-bottom: 1px solid var(--tv-line); }
.tv-client-list {
	list-style: none !important; padding: 0 !important; margin: 1rem 0 0;
	display: flex; flex-wrap: wrap; gap: 1rem 3rem; align-items: baseline;
}
.tv-client-list li { font-size: clamp(1.1rem, 2vw, 1.45rem); font-weight: 800; letter-spacing: -.02em; color: var(--tv-ink); margin: 0 !important; }
.tv-client-list li::before { display: none !important; }
.tv-client-list li span { font-family: var(--wp--preset--font-family--fira-code); font-size: .75rem; font-weight: 400; color: var(--tv-muted); margin-left: .4em; letter-spacing: 0; }

/* How we work */
.tv-step-num {
	font-family: var(--wp--preset--font-family--fira-code); font-size: .9rem; font-weight: 700;
	color: var(--tv-accent-ink); border-top: 2px solid var(--tv-ink); padding-top: .8rem; margin-bottom: .2rem !important;
}
.tv-steps h3 { margin-top: .2rem; }

/* Services page sections */
.tv-service { padding: 2.5rem 0; border-bottom: 1px solid var(--tv-line); scroll-margin-top: 1.5rem; }
.tv-service:first-of-type { padding-top: .5rem; }
.tv-service h2 { margin-top: .8rem; }
.tv-service .tv-icon img { width: 48px; height: 48px; }

/* Founder line on About */
.tv-founder { font-family: var(--wp--preset--font-family--fira-code); font-size: .9rem; color: var(--tv-muted); border-top: 1px dotted var(--tv-line); padding-top: 1.2rem; }

/* =========================================================
   Round-2 fixes
   ========================================================= */
/* Hover keeps (and thickens) the underline: parent theme.json removed it */
a:where(:not(.wp-element-button)):hover { text-decoration-line: underline !important; }
.tv-header .wp-block-navigation-item__content:hover,
.tv-card h3 a:hover, .tv-footer .tv-footer-links a { text-decoration-line: none !important; }
.tv-footer .tv-footer-links a:hover { text-decoration-line: underline !important; }
/* Post titles: smaller in the header band */
.tv-page-head .tv-post-h1 { font-size: clamp(1.9rem, 3.6vw, 2.6rem); line-height: 1.15; max-width: 22ch; }
/* Latest-posts: titles already link, so drop the duplicate "Read more" */
.wp-block-latest-posts__post-excerpt a { display: none; }
/* Back link on case studies */
.tv-back a { text-decoration: none; }
.tv-back a:hover { text-decoration-line: underline !important; }
/* Mobile footer: CTA button aligns left with the text */
@media (max-width: 781px) {
	.tv-footer .wp-block-buttons { justify-content: flex-start !important; }
}

/* LED client board and case-study banners (our own dot-matrix artwork, not client logos) */
.tv-led-clients { list-style: none; margin: 1.2rem 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 1.6rem 3rem; align-items: center; }
.tv-led-clients img { height: 30px; width: auto; display: block; opacity: .92; transition: opacity .15s; }
.tv-led-clients li:hover img { opacity: 1; }
.tv-banner { margin: 0 0 2.5rem; }
.tv-banner img { width: 100%; height: auto; display: block; border-radius: 14px; }
@media (max-width: 781px) { .tv-led-clients img { height: 22px; } }

/* =========================================================
   Brand page
   ========================================================= */
.tv-brand-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1rem; margin: 1.5rem 0; }
.tv-brand-tile { margin: 0; border-radius: 14px; padding: 2rem 1rem 1rem; display: flex; flex-direction: column; align-items: center; justify-content: space-between; gap: 1rem; min-height: 240px; border: 1px solid var(--tv-line); }
.tv-brand-tile--light { background: var(--wp--preset--color--white); }
.tv-brand-tile--dark { background: var(--tv-surface); color: var(--tv-muted); }
.tv-brand-tile figcaption { font-family: var(--wp--preset--font-family--fira-code); font-size: .78rem; text-align: center; }
.tv-brand-lockup span { display: flex; align-items: center; gap: .7rem; font-weight: 800; font-size: 1.9rem; letter-spacing: -.02em; margin: auto 0; }
.tv-swatches { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 1rem; margin: 1.5rem 0; }
.tv-swatch { display: flex; flex-direction: column; gap: .2rem; font-size: .9rem; }
.tv-swatch span { display: block; height: 84px; border-radius: 12px; margin-bottom: .5rem; }
.tv-swatch code { font-family: var(--wp--preset--font-family--fira-code); font-size: .82rem; }
.tv-swatch small { color: var(--tv-muted); line-height: 1.4; }
.tv-type-specimen { background: var(--tv-surface); color: var(--tv-ink); border-radius: 14px; padding: 2rem; margin: 1.5rem 0; }
.tv-type-display { font-size: clamp(1.8rem, 4vw, 2.8rem); font-weight: 800; letter-spacing: -.035em; line-height: 1.05; margin: 0 0 1rem; }
.tv-type-display span { color: var(--tv-accent); }
.tv-type-meta { color: #3d4046; }
.tv-type-specimen .tv-eyebrow { color: var(--tv-muted); }
.tv-type-specimen .tv-eyebrow::before { color: var(--tv-accent); }
.tv-icon-row { display: flex; flex-wrap: wrap; gap: .8rem; margin: 1.5rem 0; }
.tv-icon-row img { border-radius: 12px; }
.tv-downloads { font-family: var(--wp--preset--font-family--fira-code); font-size: .88rem; }

/* =========================================================
   Projects and topics
   ========================================================= */
.tv-type-section { padding-top: 3.5rem; }
.tv-type-section:first-child { padding-top: 0; }
.tv-type-section h2 { margin: .2rem 0 .3rem; }
.tv-type-desc { color: var(--tv-muted); margin-bottom: 1.5rem; }
.tv-project-section .wp-block-post-template { gap: 1.5rem; }
.tv-card .tv-icon { margin: 0; }
.tv-card .tv-icon img { border-radius: 12px; }
.tv-card .tv-card-title, .tv-card .wp-block-post-title { font-size: 1.25rem; margin: .7rem 0 .4rem; }
.tv-card .wp-block-post-title a { text-decoration: none; color: inherit; }
.tv-card .wp-block-post-title a::before { content: ""; position: absolute; inset: 0; border-radius: 14px; }
.tv-card .wp-block-post-title a::after { color: var(--tv-accent-ink); }
.tv-card .wp-block-post-excerpt { font-size: 1rem; }
.tv-card .tv-tags a { position: relative; z-index: 1; color: var(--tv-muted); }
/* Project type label in the header band */
.tv-page-head .tv-eyebrow-terms a { color: var(--tv-muted); text-decoration: none; }
.tv-page-head .tv-eyebrow-terms a:hover { color: var(--tv-accent-ink); text-decoration-line: underline !important; }
.tv-page-head .wp-block-term-description { color: #3d4046; font-size: 1.15rem; max-width: 46ch; margin-top: .8rem; }
/* Topic chips */
.tv-chips { list-style: none; padding: 0; margin: 0 0 1.5rem; display: flex; flex-wrap: wrap; gap: .5rem; }
.tv-chips li { margin: 0; }
.tv-chips li::before { display: none !important; }
.tv-chips a {
	display: inline-block; padding: .4rem .9rem; border: 1px solid var(--tv-ink); border-radius: 999px;
	font-family: var(--wp--preset--font-family--fira-code); font-size: .82rem; text-decoration: none; color: var(--tv-ink);
}
.tv-chips a:hover { background: var(--tv-ink); color: var(--tv-paper); text-decoration-line: none !important; }
.tv-chips .current-cat a { background: var(--tv-accent); border-color: var(--tv-accent); color: #fff; }
@media (max-width: 781px) { .tv-project-section .wp-block-post-template { grid-template-columns: 1fr !important; } }
