/**
 * LawNest features — row articles + scoped UI mockups.
 */

.lawnest-features {
	--lawnest-radius-lg: 22px;
	--lawnest-success: #6bbf8a;
	--lawnest-danger: #d9614c;
	--lawnest-surface-2: #1f2d33;
	--lawnest-petrol-500: #46595f;
	--lawnest-petrol-900: #131f22;
	--lawnest-amber-500: #dda85c;
	--lawnest-shadow-md: 0 18px 50px -20px rgba(0, 0, 0, 0.65);
	--lawnest-glow-amber: 0 0 0 1px rgba(221, 168, 92, 0.22), 0 24px 60px -24px rgba(221, 168, 92, 0.35);
	position: relative;
	padding-block: var(--lawnest-section, clamp(72px, 11vw, 150px));
	padding-inline: max(
		var(--lawnest-gutter, clamp(20px, 5vw, 64px)),
		calc((100% - 1240px) / 2 + var(--lawnest-gutter, clamp(20px, 5vw, 64px)))
	) !important;
	box-sizing: border-box;
}

/* Section head: 760px, same left edge as the articles inside the 1240 container */
.lawnest-features > .lawnest-section-head {
	max-width: 760px;
	text-align: left;
	margin-left: 0 !important;
	margin-right: auto !important;
	margin-bottom: clamp(40px, 6vw, 72px);
}

.lawnest-features > .lawnest-section-head .wp-block-heading {
	font-size: 52px;
	line-height: 1.1;
	letter-spacing: -0.02em;
	white-space: nowrap;
	text-wrap: nowrap;
	text-align: left;
}

.lawnest-features > .lawnest-section-head .lawnest-lead {
	font-weight: 400;
	max-width: 60ch;
}

/* --- Feature rows --- */
.lawnest-features .lawnest-feature {
	display: grid;
	grid-template-columns: 1.05fr 0.95fr;
	gap: clamp(32px, 5vw, 80px);
	align-items: center;
	padding-block: clamp(40px, 6vw, 70px);
}

.lawnest-features .lawnest-feature + .lawnest-feature {
	border-top: 1px solid var(--lawnest-border, rgba(143, 160, 166, 0.16));
}

/* section-head is child 1 → first article is even → media left (matches HubSpot) */
.lawnest-features .lawnest-feature:nth-child(even) .lawnest-feature__media {
	order: -1;
}

.lawnest-features .lawnest-feature__text > p.lawnest-feature__num {
	font-family: var(--wp--preset--font-family--fraunces, "Fraunces", Georgia, serif);
	font-size: 0.95rem;
	color: var(--lawnest-accent, #dda85c);
	letter-spacing: 0.05em;
}

.lawnest-features .lawnest-feature h3 {
	margin: 0.8rem 0 0;
	font-family: var(--wp--preset--font-family--fraunces, "Fraunces", Georgia, serif);
	font-weight: 600;
	font-size: clamp(1.5rem, 2.6vw, 2.1rem); /* ~33.6px at desktop */
	line-height: 1.2;
	color: var(--lawnest-text, #f5f0e6);
}

.lawnest-features .lawnest-feature__text > p {
	margin: 0.9rem 0 0;
	max-width: 46ch;
	font-size: 17px;
	font-weight: 400;
	line-height: 1.55;
	color: var(--lawnest-text-soft, #e2ddd2);
}

.lawnest-features .lawnest-feature__list {
	list-style: none;
	margin: 1.3rem 0 0;
	padding: 0;
	display: grid;
	gap: 0.6rem;
}

.lawnest-features .lawnest-feature__list li {
	display: flex;
	gap: 0.65rem;
	align-items: flex-start;
	font-size: 0.95rem;
	color: var(--lawnest-text-muted, #9aa8ae);
}

.lawnest-features .lawnest-feature__list li::before {
	content: "\2713";
	color: var(--lawnest-accent, #dda85c);
	flex: 0 0 auto;
	margin-top: 2px;
}

@media (max-width: 820px) {
	.lawnest-features > .lawnest-section-head .wp-block-heading {
		font-size: clamp(1.75rem, 6vw, 2.5rem);
		white-space: normal;
		text-wrap: balance;
	}

	.lawnest-features .lawnest-feature {
		grid-template-columns: 1fr;
		gap: 28px;
	}

	.lawnest-features .lawnest-feature:nth-child(even) .lawnest-feature__media {
		order: 0;
	}
}

/* --- App-window mockup shell --- */
.lawnest-features .mock {
	border-radius: var(--lawnest-radius-lg);
	border: 1px solid var(--lawnest-border-strong, rgba(143, 160, 166, 0.3));
	background: linear-gradient(180deg, var(--lawnest-surface-2), var(--lawnest-petrol-900));
	box-shadow: var(--lawnest-shadow-md);
	overflow: hidden;
	position: relative;
}

.lawnest-features .mock__bar {
	display: flex;
	align-items: center;
	gap: 0.45rem;
	padding: 0.7rem 0.9rem;
	border-bottom: 1px solid var(--lawnest-border, rgba(143, 160, 166, 0.16));
	background: rgba(0, 0, 0, 0.18);
}

.lawnest-features .mock__bar .tl {
	width: 10px;
	height: 10px;
	border-radius: 50%;
	background: var(--lawnest-petrol-500);
}

.lawnest-features .mock__bar .tl:nth-child(1) {
	background: #d9614c;
}

.lawnest-features .mock__bar .tl:nth-child(2) {
	background: var(--lawnest-amber-500);
}

.lawnest-features .mock__bar .tl:nth-child(3) {
	background: var(--lawnest-success);
}

.lawnest-features .mock__bar .ttl {
	margin-left: 0.6rem;
	font-size: 0.78rem;
	color: var(--lawnest-text-muted, #9aa8ae);
	font-family: var(--wp--preset--font-family--inter, "Inter", system-ui, sans-serif);
}

.lawnest-features .mock__body {
	padding: clamp(16px, 2.4vw, 26px);
	min-height: 280px;
}

/* --- Chat --- */
.lawnest-features .chat {
	display: grid;
	gap: 0.7rem;
}

.lawnest-features .bubble {
	max-width: 82%;
	padding: 0.7rem 0.9rem;
	border-radius: 14px;
	font-size: 0.82rem;
	line-height: 1.45;
}

.lawnest-features .bubble.user {
	justify-self: end;
	background: linear-gradient(180deg, var(--lawnest-amber-400, #e6bb7a), var(--lawnest-amber-600, #c58e45));
	color: var(--lawnest-on-accent, #0e1719);
	border-bottom-right-radius: 4px;
}

.lawnest-features .bubble.ai {
	justify-self: start;
	background: var(--lawnest-surface, #18272b);
	border: 1px solid var(--lawnest-border, rgba(143, 160, 166, 0.16));
	color: var(--lawnest-text-soft, #e2ddd2);
	border-bottom-left-radius: 4px;
}

.lawnest-features .typing {
	display: inline-flex;
	gap: 4px;
}

.lawnest-features .typing i {
	width: 6px;
	height: 6px;
	border-radius: 50%;
	background: var(--lawnest-text-muted, #9aa8ae);
	animation: lawnest-typing-blink 1.2s infinite;
}

.lawnest-features .typing i:nth-child(2) {
	animation-delay: 0.2s;
}

.lawnest-features .typing i:nth-child(3) {
	animation-delay: 0.4s;
}

@keyframes lawnest-typing-blink {
	0%,
	100% {
		opacity: 0.25;
	}

	50% {
		opacity: 1;
	}
}

@media (prefers-reduced-motion: reduce) {
	.lawnest-features .typing i {
		animation: none;
		opacity: 0.7;
	}
}

.lawnest-features .cite {
	margin-top: 0.5rem;
	display: inline-flex;
	align-items: center;
	gap: 0.4rem;
	font-size: 0.7rem;
	color: var(--lawnest-accent, #dda85c);
	border: 1px dashed rgba(221, 168, 92, 0.4);
	border-radius: var(--lawnest-radius-pill, 999px);
	padding: 0.2rem 0.6rem;
}

/* --- Summary --- */
.lawnest-features .sum-grid {
	display: grid;
	grid-template-columns: 1.4fr 1fr;
	gap: 0.8rem;
}

.lawnest-features .sum-card {
	background: var(--lawnest-surface, #18272b);
	border: 1px solid var(--lawnest-border, rgba(143, 160, 166, 0.16));
	border-radius: 12px;
	padding: 0.9rem;
}

.lawnest-features .sum-card .k {
	font-size: 0.68rem;
	text-transform: uppercase;
	letter-spacing: 0.1em;
	color: var(--lawnest-text-muted, #9aa8ae);
}

.lawnest-features .sum-card .v {
	font-family: var(--wp--preset--font-family--fraunces, "Fraunces", Georgia, serif);
	font-size: 1.5rem;
	color: var(--lawnest-text, #f5f0e6);
	margin-top: 0.25rem;
}

.lawnest-features .sum-card .v small {
	font-size: 0.8rem;
	color: var(--lawnest-accent, #dda85c);
}

.lawnest-features .bar-row {
	display: flex;
	align-items: flex-end;
	gap: 6px;
	height: 60px;
	margin-top: 0.6rem;
}

.lawnest-features .bar-row span {
	flex: 1;
	background: linear-gradient(180deg, var(--lawnest-amber-500), rgba(221, 168, 92, 0.2));
	border-radius: 4px 4px 0 0;
	transform-origin: bottom;
	animation: lawnest-bar-grow 1s var(--lawnest-ease, cubic-bezier(0.22, 1, 0.36, 1)) backwards;
}

.lawnest-features .bar-row span:nth-child(2) { animation-delay: 0.08s; }
.lawnest-features .bar-row span:nth-child(3) { animation-delay: 0.16s; }
.lawnest-features .bar-row span:nth-child(4) { animation-delay: 0.24s; }
.lawnest-features .bar-row span:nth-child(5) { animation-delay: 0.32s; }
.lawnest-features .bar-row span:nth-child(6) { animation-delay: 0.4s; }
.lawnest-features .bar-row span:nth-child(7) { animation-delay: 0.48s; }

@keyframes lawnest-bar-grow {
	from { transform: scaleY(0); }
}

/* --- Validation --- */
.lawnest-features .val-row {
	display: flex;
	align-items: center;
	gap: 0.7rem;
	padding: 0.6rem 0.8rem;
	border-radius: 10px;
	background: var(--lawnest-surface, #18272b);
	border: 1px solid var(--lawnest-border, rgba(143, 160, 166, 0.16));
}

.lawnest-features .val-row + .val-row {
	margin-top: 0.55rem;
}

.lawnest-features .val-row .ico {
	flex: 0 0 auto;
	width: 22px;
	height: 22px;
	border-radius: 50%;
	display: grid;
	place-items: center;
	background: rgba(107, 191, 138, 0.15);
	color: var(--lawnest-success);
}

.lawnest-features .val-row .ico svg {
	width: 13px;
	height: 13px;
}

.lawnest-features .val-row .ico.warn {
	background: rgba(221, 168, 92, 0.16);
	color: var(--lawnest-accent, #dda85c);
}

.lawnest-features .val-row .lbl {
	flex: 1;
	font-size: 0.84rem;
	color: var(--lawnest-text-soft, #e2ddd2);
}

/* --- Upload --- */
.lawnest-features .drop {
	border: 1.5px dashed var(--lawnest-border-strong, rgba(143, 160, 166, 0.3));
	border-radius: 14px;
	padding: 1.6rem;
	text-align: center;
	background: rgba(245, 240, 230, 0.02);
}

.lawnest-features .drop .ic {
	color: var(--lawnest-accent, #dda85c);
	margin: 0 auto 0.6rem;
	width: 38px;
	height: 38px;
}

.lawnest-features .drop .t {
	font-size: 0.9rem;
	color: var(--lawnest-text-soft, #e2ddd2);
}

.lawnest-features .drop .s {
	font-size: 0.75rem;
	color: var(--lawnest-text-muted, #9aa8ae);
	margin-top: 0.2rem;
}

.lawnest-features .file-chip {
	display: flex;
	align-items: center;
	gap: 0.6rem;
	margin-top: 0.7rem;
	padding: 0.55rem 0.75rem;
	border-radius: 10px;
	background: var(--lawnest-surface, #18272b);
	border: 1px solid var(--lawnest-border, rgba(143, 160, 166, 0.16));
	font-size: 0.8rem;
	color: var(--lawnest-text-soft, #e2ddd2);
}

.lawnest-features .file-chip .pg {
	margin-left: auto;
	height: 5px;
	width: 70px;
	border-radius: 4px;
	background: rgba(245, 240, 230, 0.12);
	overflow: hidden;
}

.lawnest-features .file-chip .pg::after {
	content: "";
	display: block;
	height: 100%;
	width: 70%;
	background: var(--lawnest-accent, #dda85c);
	border-radius: 4px;
	animation: lawnest-file-load 2.4s var(--lawnest-ease, cubic-bezier(0.22, 1, 0.36, 1)) infinite;
}

@keyframes lawnest-file-load {
	0% { width: 8%; }
	90%,
	100% { width: 100%; }
}

/* --- Draft (static) --- */
.lawnest-features .doc {
	font-family: var(--wp--preset--font-family--fraunces, "Fraunces", Georgia, serif);
}

.lawnest-features .doc__status {
	display: inline-flex;
	align-items: center;
	gap: 0.45rem;
	margin-bottom: 0.9rem;
	padding: 0.24rem 0.62rem;
	font-family: var(--wp--preset--font-family--inter, "Inter", system-ui, sans-serif);
	font-size: 0.72rem;
	letter-spacing: 0.03em;
	color: var(--lawnest-accent, #dda85c);
	background: rgba(221, 168, 92, 0.1);
	border: 1px solid rgba(221, 168, 92, 0.28);
	border-radius: var(--lawnest-radius-pill, 999px);
}

.lawnest-features .doc__dots {
	display: inline-flex;
	gap: 3px;
}

.lawnest-features .doc__dots i {
	width: 4px;
	height: 4px;
	border-radius: 50%;
	background: var(--lawnest-accent, #dda85c);
	animation: lawnest-typing-blink 1.2s infinite;
}

.lawnest-features .doc__dots i:nth-child(2) { animation-delay: 0.2s; }
.lawnest-features .doc__dots i:nth-child(3) { animation-delay: 0.4s; }

.lawnest-features .doc__caret {
	display: inline-block;
	width: 2px;
	height: 1.05em;
	margin-left: 1px;
	vertical-align: -0.16em;
	background: var(--lawnest-accent, #dda85c);
	animation: lawnest-caret-blink 1s steps(1) infinite;
}

@keyframes lawnest-caret-blink {
	0%,
	49% { opacity: 1; }
	50%,
	100% { opacity: 0; }
}

.lawnest-features .doc__text {
	margin: 0;
	min-height: 238px;
	font-size: 0.9rem;
	line-height: 1.62;
	color: var(--lawnest-text-soft, #e2ddd2);
}

.lawnest-features .doc__out {
	white-space: pre-wrap;
	word-break: break-word;
}

.lawnest-features .doc__out b {
	color: var(--lawnest-text, #f5f0e6);
	font-weight: 600;
}

.lawnest-features .doc.is-static .doc__dots i {
	animation: none;
}

.lawnest-features .doc.is-static .doc__caret {
	display: none;
}

@media (prefers-reduced-motion: reduce) {
	.lawnest-features .bar-row span,
	.lawnest-features .file-chip .pg::after,
	.lawnest-features .doc__dots i,
	.lawnest-features .doc__caret {
		animation: none;
	}
}

/* --- Persona --- */
.lawnest-features .persona-row {
	display: flex;
	gap: 0.7rem;
	flex-wrap: wrap;
}

.lawnest-features .persona {
	flex: 1 1 100px;
	border-radius: 12px;
	border: 1px solid var(--lawnest-border, rgba(143, 160, 166, 0.16));
	background: var(--lawnest-surface, #18272b);
	padding: 0.9rem;
	text-align: center;
}

.lawnest-features .persona .av {
	width: 40px;
	height: 40px;
	border-radius: 50%;
	margin: 0 auto 0.5rem;
	background: linear-gradient(135deg, var(--lawnest-amber-400, #e6bb7a), var(--lawnest-petrol-500));
	display: grid;
	place-items: center;
	color: var(--lawnest-on-accent, #0e1719);
	font-weight: 700;
}

.lawnest-features .persona .nm {
	font-size: 0.82rem;
	color: var(--lawnest-text, #f5f0e6);
}

.lawnest-features .persona .rl {
	font-size: 0.68rem;
	color: var(--lawnest-text-muted, #9aa8ae);
}

.lawnest-features .persona.active {
	border-color: var(--lawnest-accent, #dda85c);
	box-shadow: var(--lawnest-glow-amber);
}

/* --- Diff --- */
.lawnest-features .diff-line {
	display: flex;
	gap: 0.5rem;
	align-items: center;
	padding: 0.4rem 0.55rem;
	border-radius: 8px;
	font-size: 0.78rem;
	font-family: var(--wp--preset--font-family--inter, "Inter", system-ui, sans-serif);
	margin-bottom: 0.4rem;
}

.lawnest-features .diff-line .mk {
	width: 16px;
	text-align: center;
	font-weight: 700;
}

.lawnest-features .diff-line.del {
	background: rgba(217, 97, 76, 0.1);
	color: #e89685;
	text-decoration: line-through;
}

.lawnest-features .diff-line.del .mk {
	color: var(--lawnest-danger);
}

.lawnest-features .diff-line.add {
	background: rgba(107, 191, 138, 0.1);
	color: #9bd8b3;
}

.lawnest-features .diff-line.add .mk {
	color: var(--lawnest-success);
}

.lawnest-features .diff-line.neu {
	background: var(--lawnest-surface, #18272b);
	color: var(--lawnest-text-muted, #9aa8ae);
}

.lawnest-features .risk-tag {
	display: inline-flex;
	align-items: center;
	gap: 0.4rem;
	font-size: 0.72rem;
	padding: 0.25rem 0.6rem;
	border-radius: var(--lawnest-radius-pill, 999px);
	background: rgba(221, 168, 92, 0.14);
	color: var(--lawnest-accent, #dda85c);
	margin-top: 0.4rem;
}
