/* phpGrid homepage */

:root {
	--ink-950: #12141b;
	--ink-900: #181b24;
	--ink-800: #1f2230;
	--ink-700: #2a2e3d;
	--ink-600: #4a4f5e;
	--ink-500: #6b7080;
	--ink-300: #b4b8c4;
	--line: #e7e6e0;
	--line-soft: #efeee9;
	--paper: #f9f9f6;
	--hero-top: #d5d7ee;
	--hero-bottom: #e2e3f0;
	--deep-top: #23265e;
	--deep-bottom: #14162b;
	--white: #ffffff;

	--indigo: #4a4fc4;
	--indigo-600: #3f44b0;
	--indigo-300: #a9acf2;
	--indigo-50: #ededfc;
	--indigo-ink: #2c2f8a;
	--amber: #f5b13d;
	--amber-50: #fff8ea;
	--amber-line: #f6deb0;
	--rust: #8a3a0c;
	--green: #3f8f4f;
	--green-50: #e6f4e8;

	--font-display: "Bricolage Grotesque", "IBM Plex Sans", system-ui, sans-serif;
	--font-sans: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
	--font-mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

	--text-sm: 0.875rem;
	--text-base: 1rem;
	--text-lg: clamp(1.0625rem, 1rem + 0.3vw, 1.1875rem);
	--text-h3: 1.375rem;
	--text-h2: clamp(2rem, 1.3rem + 2.4vw, 3rem);
	--text-hero: clamp(2.75rem, 1.6rem + 4.2vw, 4.5rem);

	--space-section: clamp(4rem, 3rem + 4vw, 7rem);
	--gutter: clamp(1rem, 0.4rem + 2.5vw, 2rem);
	--radius-sm: 6px;
	--radius-md: 10px;
	--radius-lg: 16px;

	--surface-tint: #f5f4fb;
	--icon-check: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3 8.5l3 3L13 4.5' fill='none' stroke='%233f8f4f' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");

	--shadow-card: 0 1px 2px rgba(18, 20, 27, .05);
	--shadow-float: 0 1px 2px rgba(18, 20, 27, .06), 0 30px 60px -30px rgba(18, 20, 27, .35);

	--duration-fast: 150ms;
	--duration-normal: 250ms;
	--ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
	margin: 0; background: var(--paper); color: var(--ink-950);
	font-family: var(--font-sans); font-size: var(--text-base); line-height: 1.6;
	-webkit-font-smoothing: antialiased;
}
h1, h2, h3, p, ul, ol, figure, blockquote, pre { margin: 0; padding: 0; }
ul, ol { list-style: none; }
img, svg { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--indigo); outline-offset: 3px; border-radius: 4px; }

.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip-link { position: absolute; left: 1rem; top: -4rem; z-index: 100; background: var(--ink-950); color: var(--white); padding: .6rem 1rem; border-radius: var(--radius-sm); }
.skip-link:focus { top: 1rem; }

.wrap { width: 100%; max-width: calc(1240px + 2 * var(--gutter)); margin: 0 auto; padding: 0 var(--gutter); }
.ico { width: 1.25em; height: 1.25em; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.mono, code, .code { font-family: var(--font-mono); }

/* Type */
.display, .h2, .h3 { font-family: var(--font-display); font-weight: 800; letter-spacing: -0.035em; line-height: 1.02; }
.display { font-size: var(--text-hero); }
.h2 { font-size: var(--text-h2); line-height: 1.06; }
.h3 { font-size: clamp(1.5rem, 1.3rem + .6vw, 1.75rem); letter-spacing: -0.025em; line-height: 1.15; }
.eyebrow { font-family: var(--font-mono); font-size: .8125rem; font-weight: 500; letter-spacing: .08em; text-transform: uppercase; color: var(--indigo); margin-bottom: 1rem; }
.eyebrow--light { color: var(--indigo-300); }
.lede { font-size: var(--text-lg); color: var(--ink-600); margin-top: 1.25rem; max-width: 42rem; }

.text-link { font-weight: 600; color: var(--indigo); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1.5px; white-space: nowrap; }
.text-link span { display: inline-block; transition: transform var(--duration-normal) var(--ease-out-expo); }
.text-link:hover span { transform: translateX(3px); }
.text-link--light { color: var(--indigo-300); }

/* Pills, tags, buttons */
.pill { display: inline-flex; align-items: center; gap: .35rem; padding: .3rem .75rem; border-radius: 999px; font-size: .8125rem; font-weight: 600; line-height: 1.3; }
.pill .ico { width: 1rem; height: 1rem; }
.pill--amber { background: var(--amber); color: var(--ink-950); }
.pill--indigo { background: var(--indigo-50); color: var(--indigo-ink); }
.pill--mono { font-family: var(--font-mono); font-weight: 500; background: var(--white); border: 1px solid var(--line); }

.tag { display: inline-block; padding: .15rem .55rem; border-radius: 999px; font-size: .75rem; font-weight: 600; }
.tag--critical { background: var(--rust); color: var(--white); }
.tag--indigo { background: var(--indigo-50); color: var(--indigo-ink); }
.tag--dark { background: var(--ink-700); color: #d9dbe3; }

.btn {
	display: inline-flex; align-items: center; justify-content: center; gap: .55rem;
	min-height: 2.75rem; padding: .6rem 1.1rem; border-radius: var(--radius-sm); border: 1px solid transparent;
	font-weight: 600; font-size: 1rem; line-height: 1.2; text-decoration: none; white-space: nowrap;
	transition: background-color var(--duration-fast), border-color var(--duration-fast), color var(--duration-fast), transform var(--duration-normal) var(--ease-out-expo), box-shadow var(--duration-normal);
}
.btn:active { transform: translateY(1px); }
.btn--lg { min-height: 3.6rem; padding: .9rem 1.5rem; font-size: 1.0625rem; }
.btn--primary { background: var(--indigo); color: var(--white); box-shadow: 0 1px 0 rgba(255,255,255,.15) inset, 0 6px 16px -8px rgba(74, 79, 196, .7); }
.btn--primary:hover { background: var(--indigo-600); }
.btn--outline { background: var(--white); border-color: var(--line); color: var(--ink-950); }
.btn--outline:hover { border-color: var(--ink-300); }
.btn--white { background: var(--white); color: var(--indigo-ink); }
.btn--white:hover { background: var(--indigo-50); }
.btn--ghost { border-color: rgba(255, 255, 255, .5); color: var(--white); }
.btn--ghost:hover { background: rgba(255, 255, 255, .1); border-color: var(--white); }

/* Security bar */
.alert-bar { background: var(--ink-950); color: #e6e7ec; font-size: var(--text-sm); }
.alert-bar__inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: .4rem 1rem; padding-top: .55rem; padding-bottom: .55rem; text-align: center; }
.alert-bar__link { color: var(--white); font-weight: 600; text-underline-offset: 3px; white-space: nowrap; }

/* Header: shared styles live in site.css. At the top of the homepage the
   header shares the hero tint so the two read as one block. */
.site-header:not(.is-scrolled) { background: var(--hero-top); border-bottom-color: transparent; }

/* Hero */
.hero {
	position: relative; isolation: isolate; overflow: hidden;
	padding: clamp(2.5rem, 1.5rem + 3vw, 4.5rem) 0 clamp(3.5rem, 2rem + 4vw, 5.5rem);
	background:
		radial-gradient(52rem 34rem at 78% 42%, rgba(74, 79, 196, .2), transparent 70%),
		radial-gradient(36rem 24rem at 0% 100%, rgba(245, 177, 61, .1), transparent 70%),
		linear-gradient(180deg, var(--hero-top) 0%, var(--hero-bottom) 100%);
}
/* Dot texture behind the demo */
.hero::before {
	content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
	background-image: radial-gradient(rgba(44, 47, 138, .22) 1px, transparent 1.5px);
	background-size: 22px 22px; background-position: 11px 11px;
	-webkit-mask-image: radial-gradient(ellipse 60% 75% at 75% 50%, #000 20%, transparent 78%);
	mask-image: radial-gradient(ellipse 60% 75% at 75% 50%, #000 20%, transparent 78%);
}
.hero__grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 3.5rem; align-items: center; }
@media (min-width: 1024px) { .hero__grid { grid-template-columns: minmax(0, 50fr) minmax(0, 64fr); gap: 4.5rem; } }
.hero__badges { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 1.75rem; }
.hero .display { max-width: 14ch; }
.hero__lede { margin-top: 2rem; font-size: clamp(1.0625rem, 1rem + .4vw, 1.25rem); line-height: 1.55; color: var(--ink-600); max-width: 33rem; }
.hero__actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 2rem; }
.checks { display: flex; flex-wrap: wrap; gap: .5rem 1.4rem; margin-top: 1.5rem; font-size: .9375rem; color: var(--ink-600); }
.checks li { display: flex; align-items: center; gap: .45rem; }
.checks li::before { content: ""; width: .9rem; height: .9rem; flex: none; background: var(--icon-check) center/contain no-repeat; }

/* Hero stage: the live-looking demo */
.hero__stage { position: relative; }

.hero__demo { margin: 0; border-radius: 20px; overflow: hidden; background: var(--white); border: 1px solid var(--line); box-shadow: var(--shadow-float); }
.code-window { background: var(--ink-950); color: #e8e9ee; padding-bottom: 1.1rem; }
.code-window__bar { display: flex; align-items: center; gap: 6px; padding: 1.1rem 1.6rem .55rem; }
.code-window__bar span { width: 10px; height: 10px; border-radius: 50%; background: #3a3e4c; }
.code-window__bar b { margin-left: .9rem; font: 400 .8125rem var(--font-mono); color: #9a9eab; }
.code-window__note { margin-left: auto; font: 400 .8125rem var(--font-mono); color: var(--indigo-300); white-space: nowrap; }
.code { font-size: .875rem; line-height: 1.8; white-space: pre-wrap; word-break: break-word; }
.code-lines { counter-reset: line; padding: 0 1.4rem; font: 400 clamp(.75rem, .55rem + .32vw, .875rem)/1.75 var(--font-mono); overflow-x: auto; scrollbar-width: none; }
.code-lines::-webkit-scrollbar { display: none; }
.code-lines li { counter-increment: line; display: flex; gap: .9rem; white-space: pre; }
.code-lines li::before { content: counter(line); color: #5d6273; min-width: .6rem; text-align: right; user-select: none; }
.c-mute { color: #8a8f9e; }
.c-var { color: var(--indigo-300); }
.c-key { color: var(--amber); }
.c-str { color: #b8e0a5; }
.c-sel { color: var(--indigo-300); }
.c-prop { color: var(--amber); }

.demo-grid__toolbar { display: flex; align-items: center; gap: .6rem; padding: 1.1rem 1.4rem; border-bottom: 1px solid var(--line-soft); }
.view-tabs { display: inline-flex; flex: none; gap: .2rem; padding: .25rem; background: #f0f0f6; border-radius: 10px; }
.view-tabs button { border: 0; background: none; padding: .45rem .8rem; border-radius: 7px; font-size: .9375rem; font-weight: 600; color: var(--ink-600); cursor: pointer; transition: background-color var(--duration-fast), color var(--duration-fast), box-shadow var(--duration-fast); }
.view-tabs button:hover { color: var(--ink-950); }
.view-tabs button[aria-selected="true"] { background: var(--white); color: var(--ink-950); box-shadow: 0 1px 2px rgba(18, 20, 27, .12); }
.search { flex: 1; display: flex; align-items: center; gap: .5rem; min-width: 0; padding: 0 .85rem; height: 2.75rem; border: 1px solid var(--line); border-radius: 9px; color: var(--ink-500); font-size: .9375rem; white-space: nowrap; overflow: hidden; }
.search .ico { width: 1rem; height: 1rem; }
.mini-btn { display: inline-flex; align-items: center; padding: 0 1rem; height: 2.75rem; border: 1px solid var(--line); border-radius: 9px; background: var(--white); font-size: .9375rem; font-weight: 600; white-space: nowrap; }
.mini-btn--primary { background: #5145e5; border-color: #5145e5; color: var(--white); }
.mini-btn--sm { height: 2.1rem; padding: 0 .7rem; font-size: .875rem; border-radius: 7px; }

.demo-table { width: 100%; border-collapse: collapse; font-size: .9375rem; }
.demo-table th { text-align: left; font: 500 .75rem var(--font-sans); letter-spacing: .08em; text-transform: uppercase; color: var(--ink-600); padding: .85rem .75rem; border-bottom: 1px solid var(--line-soft); }
.demo-table td { padding: .85rem .75rem; border-bottom: 1px solid var(--line-soft); white-space: nowrap; }
.demo-table th:first-child, .demo-table td:first-child { padding-left: 1.6rem; }
.demo-table td.mono { color: var(--ink-600); font-weight: 500; }
.demo-table tbody tr { transition: background-color var(--duration-fast); }
.demo-table tbody tr:hover { background: #fafaf7; }
.status { display: inline-block; padding: .15rem .65rem; border-radius: 999px; font-size: .8125rem; font-weight: 600; }
.status--progress { background: var(--indigo-50); color: var(--indigo-ink); }
.status--ok { background: var(--green-50); color: #22663a; }
.status--hold { background: #fdeed3; color: var(--rust); }
.status--alt { display: none; }

/* Inline-edit row (table view) */
.demo-table tr.is-editing td { background: #f5f4fe; padding-block: .6rem; }
.demo-table tr.is-editing td:first-child { box-shadow: inset 3px 0 0 #5145e5; }
.cell-edit { display: block; padding: .45rem .9rem; border: 1.5px solid #5145e5; border-radius: 8px; background: var(--white); box-shadow: 0 0 0 3px rgba(81, 69, 229, .12); }
.cell-edit::after { content: ""; display: inline-block; width: 1.5px; height: 1.05em; margin-left: 1px; vertical-align: -.15em; background: var(--ink-950); animation: caret 1.1s steps(1) infinite; }
@keyframes caret { 50% { opacity: 0; } }
.row-actions { display: inline-flex; gap: .4rem; }

.demo-grid__foot { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .9rem 1.4rem .9rem 1.6rem; font-size: .875rem; color: var(--ink-600); }
.pager { display: inline-flex; gap: .65rem; font-size: .9375rem; color: var(--ink-600); }
.pager b { color: var(--ink-950); font-weight: 600; }

/* Excel edit view: same rows as a spreadsheet */
.hero__demo[data-view="excel"] .demo-table { counter-reset: xrow; font-size: .875rem; }
.hero__demo[data-view="excel"] .demo-table th,
.hero__demo[data-view="excel"] .demo-table td { border: 1px solid #e3e4e8; padding: .55rem .7rem; }
.hero__demo[data-view="excel"] .demo-table th { background: #f4f5f7; text-transform: none; letter-spacing: 0; font-weight: 600; font-size: .8125rem; color: var(--ink-950); }
.hero__demo[data-view="excel"] .demo-table tr::before { display: table-cell; width: 2.4rem; text-align: center; background: #f4f5f7; border: 1px solid #e3e4e8; color: var(--ink-500); font-size: .75rem; vertical-align: middle; }
.hero__demo[data-view="excel"] .demo-table thead tr::before { content: ""; }
.hero__demo[data-view="excel"] .demo-table tbody tr { counter-increment: xrow; }
.hero__demo[data-view="excel"] .demo-table tbody tr::before { content: counter(xrow); }
.hero__demo[data-view="excel"] .demo-table th:first-child,
.hero__demo[data-view="excel"] .demo-table td:first-child { padding-left: .7rem; text-align: right; }
.hero__demo[data-view="excel"] .status { background: none; padding: 0; font-weight: 400; font-size: inherit; color: var(--ink-950); }
.hero__demo[data-view="excel"] tr.is-editing td { background: none; padding-block: .55rem; box-shadow: none; }
.hero__demo[data-view="excel"] tr.is-editing td:nth-child(2) { outline: 2px solid #1e7e45; outline-offset: -2px; background: #f0f8f3; }
.hero__demo[data-view="excel"] tr.is-editing td:first-child { box-shadow: none; }
.hero__demo[data-view="excel"] .cell-edit { padding: 0; border: 0; box-shadow: none; background: none; }
.hero__demo[data-view="excel"] .row-actions { display: none; }
.hero__demo[data-view="excel"] .status--alt { display: inline; }
.hero__demo[data-view="excel"] .view-tabs button[aria-selected="true"] { color: #1e7e45; }

/* Cards view: same rows as cards */
.hero__demo[data-view="cards"] .demo-table,
.hero__demo[data-view="cards"] .demo-table tbody { display: block; }
.hero__demo[data-view="cards"] .demo-table thead { display: none; }
.hero__demo[data-view="cards"] .demo-table tbody { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .75rem; padding: 1rem 1.4rem; }
.hero__demo[data-view="cards"] .demo-table tr {
	display: grid; grid-template-columns: 1fr auto; grid-template-areas: "order status" "customer customer" "date date";
	gap: .3rem .5rem; padding: .9rem 1rem; border: 1px solid var(--line); border-radius: 12px; background: var(--white);
}
.hero__demo[data-view="cards"] .demo-table tr:hover { background: #fafaf7; }
.hero__demo[data-view="cards"] .demo-table td { display: block; padding: 0; border: 0; white-space: normal; background: none; box-shadow: none; }
.hero__demo[data-view="cards"] .demo-table td:nth-child(1) { grid-area: order; padding: 0; font-size: .8125rem; }
.hero__demo[data-view="cards"] .demo-table td:nth-child(2) { grid-area: customer; font-weight: 600; }
.hero__demo[data-view="cards"] .demo-table td:nth-child(3) { grid-area: date; font-size: .8125rem; color: var(--ink-500); }
.hero__demo[data-view="cards"] .demo-table td:nth-child(4) { grid-area: status; justify-self: end; }
.hero__demo[data-view="cards"] .demo-table tr.is-editing td:first-child { box-shadow: none; }
.hero__demo[data-view="cards"] .cell-edit { padding: 0; border: 0; box-shadow: none; background: none; }
.hero__demo[data-view="cards"] .cell-edit::after { display: none; }
.hero__demo[data-view="cards"] .row-actions { display: none; }
.hero__demo[data-view="cards"] .status--alt { display: inline-block; }

@media (max-width: 640px) {
	.code-window__note { display: none; }
	.code-lines li { white-space: pre-wrap; word-break: break-word; }
	.view-tabs button { padding: .45rem .5rem; font-size: .875rem; white-space: nowrap; }
	.status { white-space: nowrap; }
	.demo-grid__toolbar { flex-wrap: wrap; padding: .9rem 1rem; }
	.view-tabs { order: -1; flex-basis: 100%; }
	.view-tabs button { flex: 1; }
	.search { flex-basis: 0; }
	.demo-table th:nth-child(3), .demo-table td:nth-child(3) { display: none; }
	.demo-table td, .demo-table th { padding-inline: .5rem; }
	.demo-table th:first-child, .demo-table td:first-child { padding-left: 1rem; }
	.demo-table { font-size: .875rem; }
	.demo-table td { white-space: normal; }
	.row-actions .mini-btn:last-child { display: none; }
	.hero__demo[data-view="cards"] .demo-table tbody { grid-template-columns: minmax(0, 1fr); padding: .9rem 1rem; }
	.hero__demo[data-view="cards"] .demo-table td:nth-child(3) { display: block; }
	.demo-grid__foot { padding-inline: 1rem; font-size: .8125rem; }
	.pager { display: none; }
}

/* Logo strip */
.logo-strip { background: var(--white); border-block: 1px solid var(--line); }
.logo-strip__inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1.25rem 2.5rem; padding-top: 1.6rem; padding-bottom: 1.6rem; }
.logo-strip p { font-weight: 500; color: var(--ink-600); font-size: .9375rem; }
.logo-strip ul { display: flex; flex-wrap: wrap; align-items: center; gap: 1.5rem 2.75rem; }
.logo-strip img, .logo-grid img { width: auto; filter: grayscale(1); opacity: .6; mix-blend-mode: multiply; transition: filter var(--duration-normal), opacity var(--duration-normal); }
.logo-strip img { max-height: 34px; max-width: 130px; }
.logo-strip li:hover img, .logo-grid li:hover img { filter: none; opacity: 1; }

/* Sections */
.section { padding: var(--space-section) 0; }
.section--tight-top { padding-top: 0; }
.section--white { background: var(--white); border-top: 1px solid var(--line); }
.section--rule { border-top: 1px solid var(--line); }
.section--dark { background: var(--ink-950); color: var(--white); }
.section--dark .lede { color: #c4c7d2; }
.section--deep {
	background:
		radial-gradient(60rem 30rem at 85% 0%, rgba(124, 129, 240, .22), transparent 70%),
		linear-gradient(180deg, var(--deep-top) 0%, var(--deep-bottom) 100%);
	color: var(--white);
}
.section--deep .lede { color: #c9cbe6; }
.section--deep .shot { border-color: transparent; box-shadow: 0 1px 2px rgba(0, 0, 0, .25), 0 18px 40px -24px rgba(0, 0, 0, .6); }
.section--deep .shot:hover { border-color: transparent; box-shadow: 0 2px 4px rgba(0, 0, 0, .3), 0 30px 60px -28px rgba(0, 0, 0, .75); }
.section-head { margin-bottom: clamp(2.25rem, 1.75rem + 1.5vw, 3rem); max-width: 44rem; }
.section-head--wide { max-width: none; }
.section-head--split { max-width: none; display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 1.25rem 3rem; }
.section-head--split > div { max-width: 44rem; }

/* What's new */
.news { display: grid; gap: 1.25rem; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 900px) { .news { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.news-card { display: flex; flex-direction: column; align-items: flex-start; padding: 1.9rem; border-radius: var(--radius-lg); background: var(--white); border: 1px solid var(--line); }
.news-card__icon { display: grid; place-items: center; width: 3rem; height: 3rem; border-radius: var(--radius-md); background: var(--indigo-50); color: var(--indigo); margin-bottom: 1.25rem; }
.news-card__icon--mono { font: 500 1rem var(--font-mono); }
.news-card__tags { display: flex; align-items: center; gap: .55rem; margin-bottom: .75rem; }
.news-card__tags code { font-size: .8125rem; color: var(--ink-600); }
.news-card h3 { font-family: var(--font-display); font-size: var(--text-h3); font-weight: 800; letter-spacing: -0.025em; line-height: 1.15; margin-bottom: 1.1rem; }
.news-card p { color: var(--ink-600); margin-bottom: 1.6rem; }
.news-card .text-link { margin-top: auto; white-space: normal; }
.news-card--warn { background: var(--amber-50); border-color: var(--amber-line); }
.news-card--warn .news-card__icon { background: var(--amber); color: var(--ink-950); }
.news-card--warn p { color: #4d3a20; }
.news-card--warn .text-link { color: var(--rust); }
.news-card--dark { background: var(--ink-950); border-color: var(--ink-950); color: var(--white); }
.news-card--dark .news-card__icon { background: var(--ink-700); color: var(--indigo-300); }
.news-card--dark p { color: #c4c7d2; }
.news-card--dark .text-link { color: var(--indigo-300); }

/* Themes */
.themes { display: grid; grid-template-columns: minmax(0, 1fr); gap: 3rem; align-items: start; }
@media (min-width: 1024px) { .themes { grid-template-columns: minmax(0, 470px) minmax(0, 1fr); gap: 3.5rem; } }
.themes .lede { margin-bottom: 1.75rem; }
.code--block { background: var(--ink-950); color: #e8e9ee; border-radius: var(--radius-lg); padding: 1.4rem 1.25rem; font-size: .875rem; line-height: 1.75; }
.fineprint { margin-top: 1.25rem; font-size: .8125rem; color: var(--ink-500); }

.tabs { display: inline-flex; flex-wrap: wrap; gap: .25rem; padding: .35rem; margin-bottom: 1rem; background: #efeee8; border-radius: var(--radius-md); }
.tabs button { border: 0; background: none; padding: .6rem 1rem; border-radius: 7px; font-weight: 600; font-size: .9375rem; color: var(--ink-600); cursor: pointer; transition: background-color var(--duration-fast), color var(--duration-fast), box-shadow var(--duration-fast); }
.tabs button:hover { color: var(--ink-950); }
.tabs button[aria-selected="true"] { background: var(--white); color: var(--ink-950); box-shadow: 0 1px 2px rgba(18, 20, 27, .1); }

/* Framework preview — each tab only changes these tokens */
.pg-preview {
	--pg-accent: #0d6efd; --pg-accent-ink: #fff; --pg-radius: 6px; --pg-font: var(--font-sans);
	--pg-head-bg: #f6f7f9; --pg-stripe: #f8f9fb; --pg-border: #e3e5e9; --pg-surface: #fff;
	background: var(--pg-surface); border: 1px solid var(--pg-border); border-radius: var(--pg-radius);
	font-family: var(--pg-font); overflow: hidden;
	transition: border-radius var(--duration-normal) var(--ease-out-expo), background-color var(--duration-normal);
}
.pg-preview[data-fw="material"] { --pg-accent: #6750a4; --pg-radius: 20px; --pg-head-bg: #f3edf7; --pg-stripe: #fbf8fd; --pg-border: #e7e0ec; --pg-surface: #fffbfe; }
.pg-preview[data-fw="tailwind"] { --pg-accent: #4f46e5; --pg-radius: 12px; --pg-head-bg: #f8fafc; --pg-stripe: #f8fafc; --pg-border: #e2e8f0; }
.pg-preview[data-fw="plain"] { --pg-accent: #333; --pg-radius: 0; --pg-head-bg: #eee; --pg-stripe: #f7f7f7; --pg-border: #ccc; --pg-font: Georgia, "Times New Roman", serif; }
.pg-preview__head { display: flex; align-items: center; gap: .6rem; padding: 1rem 1.15rem; }
.pg-preview__head b { margin-right: auto; font-weight: 600; font-size: 1.0625rem; }
.pg-btn { display: inline-flex; align-items: center; height: 2.4rem; padding: 0 .9rem; border-radius: calc(var(--pg-radius) * .7); font-size: .875rem; font-weight: 600; border: 1px solid var(--pg-accent); transition: all var(--duration-normal); }
.pg-btn--outline { color: var(--pg-accent); }
.pg-btn--solid { background: var(--pg-accent); color: var(--pg-accent-ink); }
.pg-preview[data-fw="material"] .pg-btn { border-radius: 999px; }
.pg-preview table { width: 100%; border-collapse: collapse; font-size: .9375rem; }
.pg-preview th { text-align: left; font-weight: 600; background: var(--pg-head-bg); padding: .7rem 1.15rem; border-block: 1px solid var(--pg-border); transition: background-color var(--duration-normal); }
.pg-preview td { padding: .7rem 1.15rem; border-bottom: 1px solid var(--pg-border); }
.pg-preview tbody tr:nth-child(even) td { background: var(--pg-stripe); }
.pg-preview tbody td:first-child { font-weight: 500; }
.pg-preview__foot { display: flex; align-items: center; justify-content: space-between; padding: .75rem 1.15rem; font-size: .875rem; color: var(--ink-600); }
.pg-page { display: grid; place-items: center; width: 1.9rem; height: 1.9rem; border-radius: calc(var(--pg-radius) * .6); background: var(--pg-accent); color: var(--pg-accent-ink); font-weight: 600; transition: all var(--duration-normal); }
@media (max-width: 640px) {
	.pg-preview th:nth-child(2), .pg-preview td:nth-child(2) { display: none; }
	.pg-preview th, .pg-preview td { padding-inline: .75rem; }
	.pg-preview__head b { flex-basis: 100%; }
	.pg-preview__head { flex-wrap: wrap; }
}

/* Gallery: alternating rows of 2 wide + 3 regular shots on a 6-col grid */
.gallery { display: grid; gap: 1.25rem; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 640px) { .gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1024px) {
	.gallery { grid-template-columns: repeat(6, minmax(0, 1fr)); }
	.gallery__item { grid-column: span 2; }
	.gallery__item--wide { grid-column: span 3; }
}
.shot { display: flex; flex-direction: column; height: 100%; text-decoration: none; border-radius: var(--radius-lg); background: var(--white); border: 1px solid var(--line); overflow: hidden; transition: transform var(--duration-normal) var(--ease-out-expo), box-shadow var(--duration-normal) var(--ease-out-expo), border-color var(--duration-fast); }
.shot:hover { transform: translateY(-3px); box-shadow: var(--shadow-float); border-color: #d9d8d0; }
.shot__frame { display: block; position: relative; flex: none; min-height: 0; aspect-ratio: 16 / 10; overflow: hidden; background: #f3f3ef; border-bottom: 1px solid var(--line); }
.gallery__item--wide .shot__frame { aspect-ratio: 16 / 9; }
.shot__frame img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: left top; transition: transform 700ms var(--ease-out-expo); }
.shot:hover .shot__frame img { transform: scale(1.04); }
.shot__frame::after {
	content: ""; position: absolute; right: .75rem; bottom: .75rem; width: 2.25rem; height: 2.25rem; border-radius: 50%;
	background: rgba(18, 20, 27, .78) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M15 4h5v5M9 20H4v-5M20 4l-6 6M4 20l6-6'/%3E%3C/svg%3E") center/1rem no-repeat;
	opacity: 0; transform: scale(.85); transition: opacity var(--duration-fast), transform var(--duration-normal) var(--ease-out-expo);
}
.shot:hover .shot__frame::after, .shot:focus-visible .shot__frame::after { opacity: 1; transform: scale(1); }
.shot__text { display: flex; flex-direction: column; gap: .2rem; padding: 1rem 1.2rem 1.15rem; }
.shot__text b { font-family: var(--font-display); font-size: 1.125rem; font-weight: 700; letter-spacing: -0.02em; color: var(--ink-950); }
.shot__text span { font-size: .9375rem; color: var(--ink-600); }

/* Lightbox */
.lightbox { width: min(96vw, 1400px); max-width: none; max-height: 94vh; padding: 0; border: 0; border-radius: var(--radius-lg); background: var(--ink-950); color: #e6e7ec; overflow: visible; }
.lightbox::backdrop { background: rgba(10, 11, 16, .82); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
.lightbox[open] { animation: lightbox-in var(--duration-normal) var(--ease-out-expo); }
@keyframes lightbox-in { from { opacity: 0; transform: scale(.97); } to { opacity: 1; transform: none; } }
.lightbox__figure { display: flex; flex-direction: column; max-height: 94vh; }
.lightbox__img { width: 100%; max-height: calc(94vh - 4.5rem); object-fit: contain; background: var(--white); border-radius: var(--radius-lg) var(--radius-lg) 0 0; }
.lightbox figcaption { display: flex; flex-wrap: wrap; align-items: baseline; gap: .25rem 1rem; padding: 1rem 1.25rem; font-size: .9375rem; }
.lightbox figcaption b { font-family: var(--font-display); font-size: 1.125rem; color: var(--white); }
.lightbox__count { margin-left: auto; font-family: var(--font-mono); font-size: .8125rem; color: var(--ink-300); }
.lightbox__btn { position: absolute; display: grid; place-items: center; width: 2.75rem; height: 2.75rem; border-radius: 50%; border: 1px solid rgba(255,255,255,.18); background: rgba(18, 20, 27, .85); color: var(--white); cursor: pointer; transition: background-color var(--duration-fast); }
.lightbox__btn:hover { background: var(--indigo); }
.lightbox__close { top: .75rem; right: .75rem; }
.lightbox__prev, .lightbox__next { top: calc(50% - 2.25rem); }
.lightbox__prev { left: .75rem; }
.lightbox__next { right: .75rem; }
@media (min-width: 1500px) { .lightbox__prev { left: -4rem; } .lightbox__next { right: -4rem; } }

/* Feature lists */
.section--tint { background: var(--surface-tint); border-top: 1px solid var(--line); }
.feature-lists { display: grid; grid-template-columns: minmax(0, 1fr); gap: 2rem 2.5rem; padding-top: clamp(1.75rem, 1.4rem + 1vw, 2.25rem); border-top: 1px solid var(--line); }
@media (min-width: 640px) { .feature-lists { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1024px) { .feature-lists { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.feature-lists h3 { font: 500 .8125rem/1.4 var(--font-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--indigo); margin-bottom: .9rem; }
.feature-lists ul { display: grid; gap: .55rem; }
.feature-lists li a { display: inline-flex; align-items: center; gap: .6rem; color: var(--ink-950); font-size: 1rem; text-decoration: none; text-underline-offset: 3px; transition: color var(--duration-fast); }
.feature-lists li a::before { content: ""; width: 1rem; height: 1rem; flex: none; background: var(--icon-check) center/contain no-repeat; }
.feature-lists li a:hover { color: var(--indigo); text-decoration: underline; }

/* Compatibility */
.compat { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1.5rem; }
@media (min-width: 900px) { .compat { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.compat-card { padding: 2.25rem 2rem; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-lg); }
.compat-card p { margin: 1.4rem 0 1.25rem; color: var(--ink-600); }
.logo-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(6.25rem, 1fr)); gap: .6rem; }
@media (min-width: 900px) { .logo-tiles { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.logo-tiles li {
	display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .55rem;
	min-height: 6rem; padding: .9rem .5rem .75rem; border: 1px solid var(--line); border-radius: 12px; background: var(--white);
	font-size: .8125rem; font-weight: 600; text-align: center; line-height: 1.2;
	transition: border-color var(--duration-fast), transform var(--duration-normal) var(--ease-out-expo), box-shadow var(--duration-normal);
}
.logo-tiles li:hover { border-color: #d6d5cd; transform: translateY(-2px); box-shadow: 0 10px 24px -14px rgba(18, 20, 27, .3); }
.logo-tiles img { width: 2.5rem; height: 2.5rem; object-fit: contain; }
.logo-tiles img.is-wide { width: 4.75rem; }

/* Showcase */
.apps { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 13rem), 1fr)); }
@media (min-width: 1100px) { .apps { grid-template-columns: repeat(5, minmax(0, 1fr)); } }
.app {
	position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 1rem; height: 100%; min-height: 14.25rem;
	padding: 1.5rem; border-radius: var(--radius-lg); background: var(--ink-800); border: 1px solid var(--ink-700);
	color: var(--white); text-decoration: none;
	transition: transform var(--duration-normal) var(--ease-out-expo), border-color var(--duration-fast), background-color var(--duration-fast);
}
a.app:hover { transform: translateY(-3px); border-color: #3b4052; background: #232738; }
.app > .ico { width: 1.6rem; height: 1.6rem; color: var(--indigo-300); }
.app h3 { font-family: var(--font-display); font-size: 1.25rem; font-weight: 700; letter-spacing: -0.02em; line-height: 1.2; }
.app__more { margin-top: auto; font-size: .9375rem; font-weight: 600; color: var(--indigo-300); }
.app__more::after { content: " \2192"; display: inline-block; transition: transform var(--duration-normal) var(--ease-out-expo); }
a.app:hover .app__more::after { transform: translateX(3px); }
.app--featured { background: var(--indigo); border-color: var(--indigo); }
a.app--featured:hover { background: var(--indigo-600); border-color: var(--indigo-600); }
.app--featured > .ico, .app--featured .app__more { color: var(--white); }
.app--soon { background: transparent; border-style: dashed; color: #c4c7d2; }
.app--soon > .ico { color: var(--ink-500); }
.app__note { margin-top: auto; font-size: .875rem; color: var(--ink-500); }
.badge-new { position: absolute; top: 1.4rem; right: 1.4rem; padding: .15rem .6rem; border-radius: 999px; background: var(--amber); color: var(--ink-950); font-size: .75rem; font-weight: 700; letter-spacing: .03em; text-transform: uppercase; }

@media (max-width: 559px) {
	.apps { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .75rem; }
	.app { min-height: 11rem; padding: 1.1rem; gap: .75rem; }
	.app h3 { font-size: 1.0625rem; }
	.badge-new { top: 1rem; right: 1rem; }
}

/* Testimonials */
/* Testimonial carousel: native scroll-snap; JS only drives the buttons and status */
.carousel { --per-view: 1.1; --gap: 1rem; margin-bottom: 3rem; }
@media (min-width: 700px) { .carousel { --per-view: 2; --gap: 1.25rem; } }
@media (min-width: 1024px) { .carousel { --per-view: 3; } }
.carousel__track {
	display: grid; grid-auto-flow: column; gap: var(--gap);
	grid-auto-columns: calc((100% - (var(--per-view) - 1) * var(--gap)) / var(--per-view));
	overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x mandatory; scroll-behavior: smooth;
	scrollbar-width: none;
}
.carousel__track::-webkit-scrollbar { display: none; }
.carousel__slide { scroll-snap-align: start; display: flex; }
.carousel__controls { display: flex; align-items: center; gap: .6rem; }
.carousel__status { font: 500 .875rem var(--font-mono); color: var(--ink-500); margin-right: .4rem; font-variant-numeric: tabular-nums; }
.carousel__btn {
	display: grid; place-items: center; width: 3rem; height: 3rem; border-radius: 50%;
	background: var(--white); border: 1px solid var(--line); color: var(--ink-950); cursor: pointer;
	transition: background-color var(--duration-fast), border-color var(--duration-fast), color var(--duration-fast), transform var(--duration-normal) var(--ease-out-expo);
}
.carousel__btn:hover:not(:disabled) { background: var(--indigo); border-color: var(--indigo); color: var(--white); }
.carousel__btn:active:not(:disabled) { transform: scale(.94); }
.carousel__btn:disabled { opacity: .4; cursor: default; }
.carousel__btn--toggle { width: 2.5rem; height: 2.5rem; }
.carousel__btn--toggle .ico { width: 1rem; height: 1rem; }
.carousel__btn--toggle .ico--play { display: none; }
.carousel__btn--toggle[aria-pressed="true"] .ico--pause { display: none; }
.carousel__btn--toggle[aria-pressed="true"] .ico--play { display: block; }
@media (max-width: 699px) { .carousel__status { display: none; } }

.quote { flex: 1; display: flex; flex-direction: column; padding: 2rem 1.9rem 1.75rem; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-lg); }
.quote__mark { width: 1.7rem; height: auto; fill: var(--indigo); margin-bottom: 1.6rem; }
.quote blockquote { flex: 1; font-size: 1.0625rem; line-height: 1.6; color: var(--ink-950); padding-bottom: 1.6rem; }
.quote figcaption { display: flex; align-items: center; gap: .9rem; padding-top: 1.25rem; border-top: 1px solid var(--line-soft); font-size: .9375rem; color: var(--ink-600); }
.quote figcaption img { width: 52px; height: 52px; border-radius: 50%; object-fit: cover; }
.quote figcaption span { display: flex; flex-direction: column; line-height: 1.45; }
.quote figcaption b { color: var(--ink-950); font-weight: 600; }
.quote__initials { display: grid; place-items: center; width: 52px; height: 52px; flex: none; border-radius: 50%; background: var(--indigo-50); color: var(--indigo-ink); font: 600 1rem var(--font-sans); }

.logo-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; }
/* 10 logos: 2 x 5 on phones, 5 x 2 from tablet up — always full rows */
@media (min-width: 640px) { .logo-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); } }
.logo-grid li { display: grid; place-items: center; min-height: 160px; padding: 1.5rem; background: var(--white); }
.logo-grid img { max-height: 62px; max-width: 80%; }

/* CTA */
.cta { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 2rem 3rem; padding: clamp(2.25rem, 1.5rem + 3vw, 4.25rem) clamp(1.5rem, 1rem + 3vw, 3.5rem); border-radius: 20px; background: var(--indigo); color: var(--white); }
.cta > div:first-child { flex: 1 1 28rem; }
.cta p { margin-top: 1rem; font-size: var(--text-lg); color: #e1e2fb; max-width: 44rem; }
.cta__actions { display: flex; flex-wrap: wrap; gap: .75rem; }

@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	*, *::before, *::after { transition: none !important; animation: none !important; }
}
