/* ==========================================================================
   ParrotOS theme — design tokens lifted from the original Next.js build
   ========================================================================== */

:root {
	--bg:            #06043E;
	--surface:       #19174B;
	--surface-2:     #221F5C;
	--line:          rgba(255, 255, 255, .12);
	--text:          #ffffff;
	--muted:         #B9B7D8;
	--accent:        #05EEFF;
	--accent-2:      #00FFF0;
	--accent-ink:    #03232E;
	--radius:        24px;
	--radius-sm:     12px;
	--pill:          85px;
	--wrap:          1044px;
	--wrap-wide:     1240px;
	--gap:           32px;
	--font-body:     "Roboto", "Nimbus Sans", "Helvetica Neue", Arial, "Liberation Sans", sans-serif;
	--font-head:     "Poppins", "Museo Sans", "Roboto", "Helvetica Neue", Arial, sans-serif;
	--shadow:        0 18px 60px rgba(0, 0, 0, .35);
}

*, *::before, *::after { box-sizing: border-box; }

html {
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
	-webkit-text-size-adjust: 100%;
	scroll-behavior: smooth;
}

body {
	margin: 0;
	background-color: var(--bg);
	color: var(--text);
	font-family: var(--font-body);
	font-size: 16px;
	line-height: 1.5;
	overflow-x: hidden;
}

img, svg, video { max-width: 100%; height: auto; }
a { color: var(--accent); text-decoration: underline; text-decoration-color: rgba(5, 238, 255, .4); }
a:hover { text-decoration-color: currentColor; }
strong, b { font-weight: 700; }

h1, h2, h3, h4, h5, h6 {
	font-family: var(--font-head);
	font-weight: 800;
	line-height: 1.15;
	margin: 0 0 .5em;
	letter-spacing: -.01em;
}
h1 { font-size: clamp(2.25rem, 5.2vw, 4rem); font-weight: 900; }
h2 { font-size: clamp(1.9rem, 4vw, 3.1rem); font-weight: 900; }
h3 { font-size: clamp(1.35rem, 2.2vw, 1.85rem); }
h4 { font-size: 1.2rem; }

p { margin: 0 0 1.1em; }
code, kbd, pre, samp { font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
code { background: rgba(255, 255, 255, .08); padding: .12em .4em; border-radius: 6px; font-size: .9em; }
pre {
	background: #0A0833;
	border: 1px solid var(--line);
	border-radius: var(--radius-sm);
	padding: 18px 20px;
	overflow-x: auto;
	font-size: .92rem;
	line-height: 1.55;
}
pre code { background: none; padding: 0; }
blockquote {
	margin: 0 0 1.2em;
	padding: 4px 0 4px 20px;
	border-left: 3px solid var(--accent);
	color: var(--muted);
}
hr { border: 0; border-top: 1px solid var(--line); margin: 2.5rem 0; }
table { width: 100%; border-collapse: collapse; margin: 0 0 1.4em; font-size: .95rem; }
th, td { border: 1px solid var(--line); padding: 10px 12px; text-align: left; vertical-align: top; }
th { background: rgba(255, 255, 255, .05); font-weight: 700; }

/* --------------------------------------------------------------- layout */
.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: 20px; }
.wrap--wide { max-width: var(--wrap-wide); }
.section { padding-block: 64px; }
.section--tight { padding-block: 40px; }
.center { text-align: center; }
.muted { color: var(--muted); }
.lead { font-size: 1.05rem; color: var(--muted); max-width: 62ch; }
.center .lead { margin-inline: auto; }
.stack > * + * { margin-top: 1rem; }

.card {
	background: var(--surface);
	border-radius: var(--radius);
	padding: var(--gap);
}
.card--pad-lg { padding: 56px clamp(20px, 4vw, 56px); }

.grid { display: grid; gap: 24px; }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }

.skip-link {
	position: absolute; left: -9999px; top: 0; z-index: 999;
	background: var(--accent); color: var(--accent-ink); padding: 10px 16px; border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

/* --------------------------------------------------------------- buttons */
.btn {
	display: inline-flex; align-items: center; justify-content: center; gap: 8px;
	min-width: 165px;
	padding: 11px 22px;
	border-radius: var(--pill);
	font-size: 14px;
	font-weight: 700;
	font-family: var(--font-body);
	text-decoration: none;
	border: 1px solid transparent;
	cursor: pointer;
	transition: transform .15s ease, box-shadow .2s ease, background-color .2s ease;
}
.btn:hover { transform: translateY(-1px); text-decoration: none; }
.btn--primary {
	background-image: linear-gradient(90deg, var(--accent) 24%, var(--accent-2) 82%);
	color: var(--accent-ink);
	box-shadow: 0 6px 24px rgba(5, 238, 255, .22);
}
.btn--primary:hover { box-shadow: 0 10px 30px rgba(5, 238, 255, .34); }
.btn--ghost { background: transparent; color: #fff; border-color: #fff; }
.btn--ghost:hover { background: rgba(255, 255, 255, .1); }
.btn--light { background: #fff; color: #101041; }
.btn--sm { min-width: 0; padding: 9px 18px; font-size: 13px; }
.btn-row { display: flex; flex-wrap: wrap; gap: 16px; }
.center .btn-row { justify-content: center; }

/* --------------------------------------------------------------- header */
.site-header {
	position: relative;
	z-index: 20;
	background: transparent;
}
.site-header__inner {
	max-width: var(--wrap-wide);
	margin-inline: auto;
	padding: 14px 20px;
	display: flex;
	align-items: center;
	gap: 24px;
	min-height: 64px;
}
.site-brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: #fff; }
.site-brand img, .site-brand svg { width: 50px; height: 50px; display: block; }
.site-brand__text { font-family: var(--font-head); font-weight: 800; font-size: 1.05rem; letter-spacing: .02em; }
.site-brand__text span { color: var(--accent); }

.nav { margin-left: auto; }
.nav ul { display: flex; align-items: center; gap: 6px; list-style: none; margin: 0; padding: 0; }
.nav a {
	display: block; padding: 8px 14px; color: #fff; text-decoration: none;
	font-size: 15px; border-radius: 8px; transition: background-color .15s ease, color .15s ease;
}
.nav a:hover, .nav .current-menu-item > a { background: rgba(255, 255, 255, .09); color: #fff; }
.nav li.menu-item-has-children { position: relative; }
.nav .sub-menu {
	display: none; position: absolute; top: 100%; left: 0; min-width: 220px;
	background: var(--surface-2); border: 1px solid var(--line);
	border-radius: var(--radius-sm); padding: 8px; flex-direction: column; gap: 2px;
	box-shadow: var(--shadow);
}
.nav li:hover > .sub-menu, .nav li:focus-within > .sub-menu { display: flex; }

.header-cta { margin-left: 8px; }

.nav-toggle {
	display: none; margin-left: auto; background: transparent; border: 1px solid var(--line);
	color: #fff; border-radius: 10px; padding: 8px 10px; line-height: 0; cursor: pointer;
}
.nav-toggle svg { width: 22px; height: 22px; }

/* --------------------------------------------------------------- hero */
.hero { position: relative; padding-block: 40px 96px; overflow: hidden; }
.hero__bg {
	position: absolute; inset: 0; z-index: -1; opacity: .35;
	background-image: linear-gradient(rgba(255, 255, 255, 0), var(--bg)),
		var(--hero-image, url(../img/hero-parrot.webp));
	background-size: cover;
	background-position: center;
}
.hero__eyebrow {
	font-family: var(--font-head); font-weight: 800; letter-spacing: .18em;
	text-transform: uppercase; font-size: .82rem; color: #fff; margin-bottom: 18px;
}
.hero__eyebrow span { color: var(--accent); }
.hero h1 { max-width: 16ch; margin-inline: auto; }
.hero h1 .accent { color: var(--accent); }
.hero__caret {
	display: inline-block; width: 3px; height: .9em; background: var(--accent);
	margin-left: 4px; vertical-align: -.08em; animation: parrot-caret 1s steps(1) infinite;
}
@keyframes parrot-caret { 50% { opacity: 0; } }
.hero__sub { color: var(--muted); font-size: 1.05rem; margin: 10px auto 32px; max-width: 54ch; }
.hero__note {
	display: inline-flex; align-items: center; gap: 10px; margin-top: 28px;
	background: var(--surface); border: 1px solid var(--line);
	border-radius: var(--pill); padding: 12px 26px; color: #fff;
	text-decoration: none; font-size: .92rem; font-weight: 500;
}
.hero__note:hover { background: var(--surface-2); }
.hero__note .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }

@media (prefers-reduced-motion: reduce) {
	.hero__caret { animation: none; }
	html { scroll-behavior: auto; }
	.btn:hover { transform: none; }
}

/* --------------------------------------------------------------- feature cards */
.feature { display: flex; flex-direction: column; }
.feature__icon {
	width: 44px; height: 44px; border-radius: 10px; background: #fff;
	display: grid; place-items: center; margin-bottom: 20px;
}
.feature__icon svg { width: 22px; height: 22px; color: #101041; }
.feature h3 { margin-bottom: .5rem; }
.feature p { color: var(--muted); font-size: .95rem; margin: 0; }

/* --------------------------------------------------------------- carousel */
.carousel { position: relative; }
.carousel__track {
	display: flex; overflow-x: auto; scroll-snap-type: x mandatory;
	gap: 16px; scrollbar-width: none; border-radius: var(--radius-sm);
}
.carousel__track::-webkit-scrollbar { display: none; }
.carousel__track > figure {
	flex: 0 0 100%; scroll-snap-align: center; margin: 0;
}
.carousel__track img { width: 100%; border-radius: var(--radius-sm); display: block; }
.carousel__nav { display: flex; align-items: center; justify-content: center; gap: 10px; margin-top: 18px; }
.carousel__dot {
	width: 9px; height: 9px; border-radius: 50%; border: 0; padding: 0; cursor: pointer;
	background: rgba(255, 255, 255, .3);
}
.carousel__dot[aria-current="true"] { background: #fff; }
.carousel__arrow {
	width: 32px; height: 32px; border-radius: 50%; border: 1px solid var(--line);
	background: var(--surface-2); color: #fff; cursor: pointer; line-height: 0;
	display: grid; place-items: center;
}

/* --------------------------------------------------------------- partners / logos */
.logo-row {
	display: flex; flex-wrap: wrap; align-items: center; justify-content: center;
	gap: clamp(24px, 6vw, 72px);
}
.logo-row img { max-height: 34px; width: auto; opacity: .95; }

/* --------------------------------------------------------------- stats */
.stat + .stat { margin-top: 34px; }
.stat h3 { margin-bottom: .35rem; font-size: clamp(1.2rem, 2vw, 1.6rem); }
.stat p { color: var(--muted); font-size: .92rem; margin: 0; }

/* --------------------------------------------------------------- editions */
.edition { display: flex; flex-direction: column; height: 100%; }
.edition__icon {
	width: 46px; height: 46px; border-radius: 10px; display: grid; place-items: center;
	margin-bottom: 20px; color: #fff;
}
.edition__icon svg { width: 24px; height: 24px; }
.edition h3 { margin-bottom: .6rem; }
.edition p { color: var(--muted); font-size: .95rem; }
.edition .btn { margin-top: auto; align-self: flex-start; }

/* --------------------------------------------------------------- blog */
.page-head { padding-block: 72px 28px; text-align: center; position: relative; }
.page-head h1 { margin-bottom: .25rem; }
.page-head p { color: var(--muted); }

.post-card {
	background: var(--surface);
	border-radius: var(--radius);
	overflow: hidden;
	display: flex;
	flex-direction: column;
	transition: transform .18s ease, box-shadow .2s ease;
}
.post-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.post-card__thumb { display: block; aspect-ratio: 16 / 9; overflow: hidden; background: var(--surface-2); }
.post-card__thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.post-card__body { padding: 24px; display: flex; flex-direction: column; flex: 1; }
.post-card h2 { font-size: 1.3rem; margin-bottom: .5rem; line-height: 1.25; }
.post-card h2 a { color: #fff; text-decoration: none; }
.post-card h2 a:hover { color: var(--accent); }
.post-card p { color: var(--muted); font-size: .92rem; }
.post-card__meta {
	margin-top: auto; padding-top: 18px; display: flex; justify-content: space-between;
	align-items: center; gap: 12px; font-size: .84rem; color: var(--muted);
}
.post-card__meta .author { color: var(--accent); }

.pagination { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; margin-top: 48px; }
.pagination .page-numbers {
	display: grid; place-items: center; min-width: 40px; height: 40px; padding: 0 12px;
	border-radius: 10px; background: var(--surface); color: #fff; text-decoration: none;
}
.pagination .page-numbers.current, .pagination .page-numbers:hover { background: var(--accent); color: var(--accent-ink); }

/* --------------------------------------------------------------- single */
.entry { max-width: 760px; margin-inline: auto; }
.entry-header { text-align: center; padding-block: 64px 24px; }
.entry-header h1 { margin-bottom: .4rem; }
.entry-meta { color: var(--muted); font-size: .9rem; display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.entry-meta .author { color: var(--accent); }
.entry-thumb { margin: 0 0 36px; }
.entry-thumb img { width: 100%; border-radius: var(--radius); display: block; }
.entry-content { font-size: 1.03rem; line-height: 1.72; }
.entry-content h2 { font-size: 1.75rem; margin-top: 2.2em; }
.entry-content h3 { font-size: 1.3rem; margin-top: 1.8em; }
.entry-content ul, .entry-content ol { padding-left: 1.25em; margin-bottom: 1.2em; }
.entry-content li { margin-bottom: .45em; }
.entry-content figure { margin: 1.8em 0; }
.entry-content figure img { border-radius: var(--radius-sm); display: block; margin-inline: auto; }
.entry-content a { color: var(--accent); }
.entry-footer { margin-top: 56px; padding-top: 28px; border-top: 1px solid var(--line); }

.post-nav { display: grid; gap: 16px; grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: 24px; }
.post-nav a {
	display: block; background: var(--surface); border-radius: var(--radius-sm); padding: 18px 20px;
	color: #fff; text-decoration: none;
}
.post-nav a:hover { background: var(--surface-2); }
.post-nav span { display: block; font-size: .78rem; color: var(--muted); text-transform: uppercase; letter-spacing: .1em; margin-bottom: 6px; }
.post-nav .next { text-align: right; }

/* --------------------------------------------------------------- docs */
.docs-layout {
	display: grid;
	grid-template-columns: 280px minmax(0, 1fr);
	gap: 48px;
	align-items: start;
	padding-block: 48px 80px;
}
.docs-sidebar {
	position: sticky; top: 24px;
	background: var(--surface); border-radius: var(--radius); padding: 24px;
	max-height: calc(100vh - 48px); overflow-y: auto;
}
.docs-sidebar > summary {
	list-style: none; cursor: default;
}
.docs-sidebar > summary::-webkit-details-marker { display: none; }
.docs-sidebar h2 {
	font-size: .8rem; text-transform: uppercase; letter-spacing: .12em;
	color: var(--muted); margin: 0 0 14px;
}
.docs-sidebar ul { list-style: none; margin: 0 0 22px; padding: 0; }
.docs-sidebar > ul:last-child { margin-bottom: 0; }
.docs-sidebar .docs-section > span {
	display: block; font-family: var(--font-head); font-weight: 700; font-size: .95rem;
	margin: 18px 0 8px; color: #fff;
}
.docs-sidebar .docs-section:first-child > span { margin-top: 0; }
.docs-sidebar li a {
	display: block; padding: 6px 10px; border-radius: 8px; color: var(--muted);
	text-decoration: none; font-size: .9rem;
}
.docs-sidebar li a:hover { background: rgba(255, 255, 255, .07); color: #fff; }
.docs-sidebar li a[aria-current="page"] { background: var(--accent); color: var(--accent-ink); font-weight: 600; }
.doc-index { list-style: none; padding: 0; }
.doc-index li { margin-bottom: .5em; }

.breadcrumbs { font-size: .85rem; color: var(--muted); margin-bottom: 18px; }
.breadcrumbs a { color: var(--muted); }
.breadcrumbs a:hover { color: var(--accent); }

.docs-toc {
	background: var(--surface); border-radius: var(--radius-sm); padding: 18px 22px; margin-bottom: 32px;
}
.docs-toc strong { display: block; font-size: .8rem; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); margin-bottom: 8px; }
.docs-toc ul { list-style: none; margin: 0; padding: 0; columns: 2; column-gap: 24px; }
.docs-toc li { margin-bottom: 4px; break-inside: avoid; }
.docs-toc a { font-size: .9rem; }

/* --------------------------------------------------------------- footer */
.site-footer { padding-block: 40px 64px; }
.site-footer__card {
	background: var(--surface); border-radius: var(--radius);
	padding: clamp(28px, 4vw, 48px);
}
.footer-grid { display: grid; grid-template-columns: 1.4fr repeat(4, 1fr); gap: 32px; }
.footer-brand__logo { width: 40px; height: 40px; margin-bottom: 16px; display: block; }
.footer-brand .name { font-family: var(--font-head); font-weight: 800; margin-bottom: 12px; }
.footer-brand .name span { color: var(--accent); }
.footer-brand p { color: var(--muted); font-size: .9rem; max-width: 22ch; }
.footer-col h2 { font-family: var(--font-head); font-size: .95rem; font-weight: 700; margin-bottom: 14px; }
.footer-col ul { list-style: none; margin: 0; padding: 0; }
.footer-col li { margin-bottom: 10px; }
.footer-col a { color: var(--muted); text-decoration: none; font-size: .9rem; }
.footer-col a:hover { color: var(--accent); }
.footer-bottom {
	margin-top: 40px; padding-top: 24px; border-top: 1px solid var(--line);
	display: flex; flex-wrap: wrap; gap: 16px; align-items: center; justify-content: space-between;
	color: var(--muted); font-size: .84rem;
}
.footer-bottom nav { display: flex; gap: 18px; }
.footer-bottom a { color: var(--muted); text-decoration: none; }
.footer-bottom a:hover { color: var(--accent); }
.badge {
	display: inline-flex; align-items: center; gap: 6px; background: #fff; color: #101041;
	border-radius: var(--pill); padding: 6px 14px; font-size: .76rem; font-weight: 700;
}
.badge--green { background: #17C964; color: #04240F; }

/* --------------------------------------------------------------- misc */
.search-form { display: flex; gap: 10px; max-width: 440px; }
.search-form input[type="search"] {
	flex: 1; background: var(--surface); border: 1px solid var(--line); color: #fff;
	border-radius: var(--pill); padding: 11px 20px; font: inherit; font-size: 15px;
}
.search-form input[type="search"]::placeholder { color: var(--muted); }
.center .search-form { margin-inline: auto; }

.alignwide { max-width: var(--wrap-wide); }
.alignfull { max-width: none; }
.screen-reader-text {
	border: 0; clip: rect(1px, 1px, 1px, 1px); clip-path: inset(50%); height: 1px;
	margin: -1px; overflow: hidden; padding: 0; position: absolute; width: 1px; word-wrap: normal !important;
}
.wp-caption-text, figcaption { color: var(--muted); font-size: .85rem; text-align: center; margin-top: .6em; }

/* --------------------------------------------------------------- responsive */
@media (max-width: 1024px) {
	.footer-grid { grid-template-columns: 1fr 1fr 1fr; }
	.docs-layout { grid-template-columns: 1fr; gap: 28px; }
	.docs-sidebar { position: static; max-height: none; }
}

@media (max-width: 900px) {
	.grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 1024px) {
	/* The docs index is long: collapse it above the article on narrow screens. */
	.docs-sidebar > summary { cursor: pointer; display: flex; align-items: center; gap: 10px; }
	.docs-sidebar > summary h2 { margin: 0; }
	.docs-sidebar > summary::after {
		content: ""; width: 8px; height: 8px; margin-left: auto;
		border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted);
		transform: rotate(45deg); transition: transform .15s ease;
	}
	.docs-sidebar[open] > summary::after { transform: rotate(-135deg); }
	.docs-sidebar[open] > nav { margin-top: 16px; }
}

@media (max-width: 780px) {
	.nav-toggle { display: block; }
	.nav {
		display: none; position: absolute; top: 100%; left: 0; right: 0;
		background: var(--surface); border-top: 1px solid var(--line); padding: 12px 20px 20px;
	}
	.nav.is-open { display: block; }
	.nav ul { flex-direction: column; align-items: stretch; gap: 2px; }
	.nav .sub-menu { display: flex; position: static; border: 0; background: transparent; box-shadow: none; padding-left: 12px; }
	.site-header__inner { position: relative; flex-wrap: nowrap; gap: 12px; }
	.site-brand { margin-right: auto; }
	.nav-toggle { margin-left: 0; order: 2; }
	.header-cta { order: 1; margin-left: 0; }
}

@media (max-width: 700px) {
	.grid-3, .grid-2 { grid-template-columns: minmax(0, 1fr); }
	.footer-grid { grid-template-columns: 1fr 1fr; }
	.post-nav { grid-template-columns: minmax(0, 1fr); }
	.post-nav .next { text-align: left; }
	.docs-toc ul { columns: 1; }
	.section { padding-block: 44px; }
	.btn-row { flex-direction: column; }
	.btn-row .btn { width: 100%; min-width: 0; }
	.hero__note { width: 100%; }
}

@media (max-width: 460px) {
	.footer-grid { grid-template-columns: 1fr; }
}

.partner-name {
	font-family: var(--font-head);
	font-weight: 800;
	font-size: 1.15rem;
	letter-spacing: .02em;
	color: rgba(255, 255, 255, .82);
}

.footer-legal-menu {
	display: flex; gap: 18px; flex-wrap: wrap; list-style: none; margin: 0; padding: 0;
}
