/*
Theme Name: Verdict
Theme URI: https://example.com/verdict
Author: Built with Claude
Description: A Trustpilot-style review platform theme for WordPress. Business listings, star-rated reviews, an auto-calculated TrustScore, front-end review submission with moderation, and browse/search. Self-contained — the review engine lives in the theme.
Version: 1.0.2
Requires at least: 6.0
Requires PHP: 7.4
License: GNU General Public License v2 or later
Text Domain: verdict
*/

/* =========================================================
   DESIGN TOKENS
   Aesthetic: warm editorial-trust. Cream paper, forest-green
   brand, amber stars. Fraunces display + Manrope body.
   ========================================================= */
:root {
	--paper:      #FAF6EE;
	--paper-2:    #F2ECDF;
	--ink:        #16170F;
	--ink-soft:   #4A4B3F;
	--line:       #E3DBC9;
	--brand:      #0E5C45;
	--brand-2:    #0A4636;
	--brand-tint: #E4EFE9;
	--star:       #E0A526;
	--bad:        #B5462E;
	--white:      #FFFFFF;
	--radius:     14px;
	--radius-sm:  9px;
	--shadow:     0 1px 2px rgba(22,23,15,.05), 0 8px 28px -14px rgba(22,23,15,.22);
	--shadow-lg:  0 24px 60px -24px rgba(14,92,69,.35);
	--maxw:       1140px;
	--display:    "Fraunces", Georgia, serif;
	--body:       "Manrope", -apple-system, sans-serif;
}

* { box-sizing: border-box; }

body {
	margin: 0;
	font-family: var(--body);
	color: var(--ink);
	background: var(--paper);
	background-image: radial-gradient(circle at 1px 1px, rgba(22,23,15,.035) 1px, transparent 0);
	background-size: 22px 22px;
	line-height: 1.6;
	font-size: 17px;
	-webkit-font-smoothing: antialiased;
}

a { color: var(--brand); text-decoration: none; }
a:hover { color: var(--brand-2); }
img { max-width: 100%; height: auto; }

h1, h2, h3, h4 { font-family: var(--display); font-weight: 600; line-height: 1.1; color: var(--ink); margin: 0 0 .5em; letter-spacing: -.01em; }
h1 { font-size: clamp(2.1rem, 5vw, 3.4rem); }
h2 { font-size: clamp(1.6rem, 3vw, 2.3rem); }

.v-wrap { max-width: var(--maxw); margin-inline: auto; padding-inline: 24px; }
.v-section { padding: 64px 0; }

/* =========================================================
   HEADER
   ========================================================= */
.v-header {
	position: sticky; top: 0; z-index: 50;
	background: rgba(250,246,238,.85);
	backdrop-filter: blur(10px);
	border-bottom: 1px solid var(--line);
}
.v-header-inner { display: flex; align-items: center; gap: 28px; height: 72px; }
.v-logo { font-family: var(--display); font-weight: 700; font-size: 1.45rem; color: var(--ink); display: flex; align-items: center; gap: 9px; }
.v-logo .v-mark { width: 30px; height: 30px; color: var(--brand); }
.v-logo:hover { color: var(--ink); }
.v-nav { display: flex; gap: 26px; margin-left: auto; align-items: center; }
.v-nav a { color: var(--ink-soft); font-weight: 600; font-size: .95rem; }
.v-nav a:hover { color: var(--brand); }
.v-btn {
	display: inline-flex; align-items: center; gap: 8px;
	background: var(--brand); color: #fff; padding: 11px 20px;
	border-radius: 100px; font-weight: 700; font-size: .95rem;
	border: 0; cursor: pointer; transition: transform .15s ease, background .15s ease;
}
.v-btn:hover { background: var(--brand-2); color: #fff; transform: translateY(-1px); }
.v-btn--ghost { background: transparent; color: var(--brand); border: 1.5px solid var(--brand); }
.v-btn--ghost:hover { background: var(--brand-tint); color: var(--brand-2); }

/* =========================================================
   STARS
   ========================================================= */
.v-stars { display: inline-flex; gap: 3px; vertical-align: middle; }
.v-star { width: var(--star-size, 22px); height: var(--star-size, 22px); display: inline-block; position: relative; }
.v-star-svg { width: 100%; height: 100%; display: block; }
.v-star--full  .v-star-svg path { fill: var(--star); }
.v-star--empty .v-star-svg path { fill: #DcD3BF; }
.v-star--half  .v-star-svg path { fill: #DcD3BF; }
.v-star--half::before {
	content: ""; position: absolute; inset: 0; width: 50%; overflow: hidden;
	background: linear-gradient(var(--star), var(--star));
	-webkit-mask: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M12 2l2.9 6.6 7.1.6-5.4 4.7 1.6 7L12 17.8 5.8 21.5l1.6-7L2 9.8l7.1-.6z'/%3E%3C/svg%3E") no-repeat;
	mask: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M12 2l2.9 6.6 7.1.6-5.4 4.7 1.6 7L12 17.8 5.8 21.5l1.6-7L2 9.8l7.1-.6z'/%3E%3C/svg%3E") no-repeat;
}

.v-score-pill { display: inline-flex; align-items: center; gap: 10px; }
.v-score-num { font-family: var(--display); font-weight: 700; font-size: 1.3rem; }
.v-score-label { font-weight: 700; font-size: .9rem; color: var(--brand); text-transform: uppercase; letter-spacing: .04em; }

/* =========================================================
   HERO + SEARCH
   ========================================================= */
.v-hero { padding: 78px 0 56px; text-align: center; position: relative; overflow: hidden; }
.v-hero::after {
	content: ""; position: absolute; left: 50%; top: -40%; transform: translateX(-50%);
	width: 780px; height: 780px; border-radius: 50%;
	background: radial-gradient(circle, rgba(14,92,69,.10), transparent 62%); z-index: -1;
}
.v-hero h1 { max-width: 16ch; margin-inline: auto; }
.v-hero p { font-size: 1.18rem; color: var(--ink-soft); max-width: 52ch; margin: 18px auto 34px; }
.v-search { display: flex; gap: 8px; max-width: 600px; margin: 0 auto; background: #fff; padding: 8px; border-radius: 100px; box-shadow: var(--shadow); border: 1px solid var(--line); }
.v-search input { flex: 1; border: 0; background: transparent; padding: 0 18px; font-family: var(--body); font-size: 1.02rem; color: var(--ink); outline: none; }
.v-search button { white-space: nowrap; }
.v-hero-meta { margin-top: 22px; color: var(--ink-soft); font-size: .92rem; font-weight: 600; }
.v-hero-meta .v-stars { margin-right: 6px; }

/* =========================================================
   CARDS / GRID
   ========================================================= */
.v-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 22px; }
.v-section-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 28px; gap: 16px; flex-wrap: wrap; }
.v-section-head h2 { margin: 0; }
.v-eyebrow { text-transform: uppercase; letter-spacing: .14em; font-size: .78rem; font-weight: 800; color: var(--brand); margin-bottom: 8px; }

.v-card {
	background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
	padding: 24px; transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
	display: flex; flex-direction: column; gap: 12px;
}
.v-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); border-color: var(--brand-tint); }
.v-card-top { display: flex; align-items: center; gap: 14px; }
.v-card-logo { width: 52px; height: 52px; border-radius: 12px; object-fit: cover; background: var(--paper-2); border: 1px solid var(--line); display: grid; place-items: center; font-family: var(--display); font-weight: 700; font-size: 1.3rem; color: var(--brand); flex-shrink: 0; }
.v-card h3 { font-size: 1.15rem; margin: 0; }
.v-card h3 a { color: var(--ink); }
.v-card h3 a:hover { color: var(--brand); }
.v-card .v-verified { color: var(--brand); font-size: .8rem; font-weight: 700; display: inline-flex; align-items: center; gap: 4px; }
.v-card-score { display: flex; align-items: center; gap: 10px; }
.v-card-score b { font-family: var(--display); font-size: 1.05rem; }
.v-card-count { color: var(--ink-soft); font-size: .86rem; }
.v-card-excerpt { color: var(--ink-soft); font-size: .94rem; margin: 0; }
.v-tag { display: inline-block; background: var(--paper-2); color: var(--ink-soft); font-size: .76rem; font-weight: 700; padding: 4px 11px; border-radius: 100px; letter-spacing: .02em; }

/* Category navigation pills */
.v-catnav { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 22px; }
.v-tag--pill {
	font-size: .92rem; padding: 9px 16px; border: 1.5px solid var(--line); background: #fff;
	color: var(--ink); transition: all .15s ease; cursor: pointer; line-height: 1;
}
.v-tag--pill:hover { border-color: var(--brand); color: var(--brand); }
.v-tag--pill.is-active { background: var(--brand); border-color: var(--brand); color: #fff; }
.v-tag-count { opacity: .55; font-weight: 600; margin-left: 3px; }
.v-tag--pill.is-active .v-tag-count { opacity: .8; }

/* "Can't find a company?" CTA bar */
.v-browse-cta {
	display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
	background: var(--brand-tint); border: 1px solid #cfe2da; border-radius: var(--radius);
	padding: 16px 22px; margin-bottom: 30px;
}
.v-browse-cta span { font-weight: 600; color: var(--brand-2); }

/* =========================================================
   SINGLE BUSINESS
   ========================================================= */
.v-business-head { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 32px; margin-top: 40px; display: grid; grid-template-columns: auto 1fr auto; gap: 24px; align-items: center; box-shadow: var(--shadow); }
.v-business-head .v-card-logo { width: 84px; height: 84px; font-size: 2rem; }
.v-business-title h1 { font-size: 2rem; margin: 0 0 6px; }
.v-business-title .v-meta-row { color: var(--ink-soft); font-size: .95rem; display: flex; gap: 16px; flex-wrap: wrap; align-items: center; }
.v-business-title a { font-weight: 600; }
.v-bigscore { text-align: center; padding-left: 24px; border-left: 1px solid var(--line); }
.v-bigscore .num { font-family: var(--display); font-weight: 700; font-size: 3rem; line-height: 1; color: var(--ink); }
.v-bigscore .lbl { color: var(--brand); font-weight: 800; text-transform: uppercase; letter-spacing: .05em; font-size: .82rem; margin-top: 4px; }
.v-bigscore .cnt { color: var(--ink-soft); font-size: .85rem; margin-top: 6px; }

.v-layout { display: grid; grid-template-columns: 1fr 340px; gap: 32px; margin-top: 32px; align-items: start; }

.v-breakdown { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.v-bar-row { display: grid; grid-template-columns: 64px 1fr 40px; gap: 10px; align-items: center; margin-bottom: 10px; font-size: .88rem; }
.v-bar { height: 9px; background: var(--paper-2); border-radius: 100px; overflow: hidden; }
.v-bar span { display: block; height: 100%; background: var(--star); border-radius: 100px; }

.v-review { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; margin-bottom: 18px; }
.v-review-head { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.v-review-avatar { width: 42px; height: 42px; border-radius: 50%; background: var(--brand-tint); color: var(--brand); display: grid; place-items: center; font-weight: 800; }
.v-review-name { font-weight: 700; }
.v-review-date { color: var(--ink-soft); font-size: .84rem; }
.v-review h4 { font-family: var(--body); font-weight: 800; font-size: 1.08rem; margin: 12px 0 6px; }
.v-review p { margin: 0; color: var(--ink-soft); }
.v-review-exp { margin-top: 12px; font-size: .82rem; color: var(--ink-soft); }

/* Review form */
.v-form-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; position: sticky; top: 92px; }
.v-form-card h3 { font-size: 1.3rem; }
.v-field { margin-bottom: 16px; }
.v-field label { display: block; font-weight: 700; font-size: .9rem; margin-bottom: 6px; }
.v-field input[type=text], .v-field input[type=email], .v-field input[type=date], .v-field textarea {
	width: 100%; padding: 12px 14px; border: 1.5px solid var(--line); border-radius: var(--radius-sm);
	font-family: var(--body); font-size: .98rem; background: var(--paper); color: var(--ink); outline: none; transition: border-color .15s;
}
.v-field input:focus, .v-field textarea:focus { border-color: var(--brand); }
.v-field textarea { min-height: 110px; resize: vertical; }

/* Star rating input */
.v-rate { display: inline-flex; flex-direction: row-reverse; gap: 4px; }
.v-rate input { position: absolute; opacity: 0; }
.v-rate label { cursor: pointer; width: 34px; height: 34px; color: #DcD3BF; margin: 0; }
.v-rate label svg { width: 100%; height: 100%; fill: currentColor; transition: color .12s; }
.v-rate input:checked ~ label,
.v-rate label:hover, .v-rate label:hover ~ label { color: var(--star); }

.v-notice { padding: 14px 18px; border-radius: var(--radius-sm); font-weight: 600; margin-bottom: 20px; }
.v-notice--ok { background: var(--brand-tint); color: var(--brand-2); }
.v-notice--err { background: #F7E2DC; color: var(--bad); }

/* =========================================================
   FOOTER
   ========================================================= */
.v-footer { background: var(--ink); color: #CFCFC4; margin-top: 72px; padding: 56px 0 36px; }
.v-footer a { color: #CFCFC4; }
.v-footer a:hover { color: #fff; }
.v-footer-grid { display: grid; grid-template-columns: 1.5fr repeat(3, 1fr); gap: 32px; margin-bottom: 40px; }
.v-footer h4 { color: #fff; font-family: var(--body); font-weight: 800; font-size: .85rem; text-transform: uppercase; letter-spacing: .08em; margin-bottom: 14px; }
.v-footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 9px; font-size: .92rem; }
.v-footer .v-logo { color: #fff; margin-bottom: 12px; }
.v-footer .v-logo .v-mark { color: var(--star); }
.v-footer-bottom { border-top: 1px solid rgba(255,255,255,.12); padding-top: 22px; font-size: .85rem; color: #9C9C90; }

/* =========================================================
   RESPONSIVE
   ========================================================= */
@media (max-width: 900px) {
	.v-layout { grid-template-columns: 1fr; }
	.v-form-card { position: static; }
	.v-business-head { grid-template-columns: 1fr; text-align: center; }
	.v-business-head .v-card-logo { margin: 0 auto; }
	.v-bigscore { border-left: 0; border-top: 1px solid var(--line); padding: 20px 0 0; }
	.v-footer-grid { grid-template-columns: 1fr 1fr; }
	.v-nav { display: none; }
}
@media (max-width: 560px) {
	.v-footer-grid { grid-template-columns: 1fr; }
	.v-search { flex-direction: column; border-radius: var(--radius); }
	.v-search button { width: 100%; justify-content: center; }
}
