/* Shelfmark — Letterboxd-inspired social reading diary (mobile-first) */

:root {
	--canvas: #14181c;
	--poster-well: #12161a;
	--surface: #283038;
	--panel: #445566;
	--divider: #2c3440;
	--inset: #202830;

	--green: #00e054;
	--green-cta: #00ac1c;
	--green-hover: #00c030;
	--green-active: #009926;

	--orange: #ff8000;
	--like: #ff9933;
	--blue: #40bcf4;
	--link: #ddeeff;
	--link-hover: #40bcf4;
	--link-active: #209ce4;

	--ink: #ffffff;
	--ink-high: #d8e0e8;
	--ink-strong: #aabbcc;
	--ink-body: #99aabb;
	--ink-meta: #667788;
	--ink-low: #556677;

	--font-chrome: "DM Sans", "Helvetica Neue", Helvetica, Arial, sans-serif;
	--font-display: "Literata", Georgia, "Times New Roman", serif;
	--font-review: "Literata", Georgia, serif;

	--radius-control: 3px;
	--radius-btn: 4px;
	--radius-panel: 0.5rem;
	--radius-pill: 15px;

	--container: 1100px;
	--gap: 10px;
	--header-h: 56px;
	--ease-out: cubic-bezier(0.19, 1, 0.22, 1);
}

*,
*::before,
*::after {
	box-sizing: border-box;
}

html {
	scroll-behavior: smooth;
	-webkit-text-size-adjust: 100%;
}

body {
	margin: 0;
	font-family: var(--font-chrome);
	font-size: 15px;
	line-height: 1.55;
	color: var(--ink-body);
	background: var(--canvas);
	-webkit-font-smoothing: antialiased;
}

img {
	max-width: 100%;
	height: auto;
	display: block;
}

a {
	color: var(--link);
	text-decoration: none;
	transition: color 0.15s ease;
}

a:hover {
	color: var(--link-hover);
}

a:active {
	color: var(--link-active);
}

h1, h2, h3, h4 {
	color: var(--ink);
	font-weight: 700;
	line-height: 1.25;
	margin: 0 0 0.5em;
}

p {
	margin: 0 0 1em;
}

ul, ol {
	margin: 0;
	padding: 0;
	list-style: none;
}

button,
input,
textarea {
	font: inherit;
	color: inherit;
}

.screen-reader-text {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	border: 0;
}

.container {
	width: min(100% - 2rem, var(--container));
	margin-inline: auto;
}

.container.narrow {
	width: min(100% - 2rem, 720px);
}

/* Header — sticky uppercase chrome */
.site-header {
	position: sticky;
	top: 0;
	z-index: 100;
	background: rgba(20, 24, 28, 0.94);
	backdrop-filter: blur(10px);
	border-bottom: 1px solid transparent;
	transition: border-color 0.2s ease, background 0.2s ease;
}

.site-header.is-scrolled {
	border-bottom-color: var(--divider);
	background: rgba(20, 24, 28, 0.98);
}

.header-bar {
	display: flex;
	align-items: center;
	gap: 12px;
	min-height: var(--header-h);
	padding-block: 8px;
}

.brand-link {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	color: var(--ink);
	flex-shrink: 0;
}

.brand-link:hover {
	color: var(--ink);
}

.brand-dots {
	display: inline-flex;
	gap: 3px;
	align-items: center;
}

.brand-dots .dot {
	width: 8px;
	height: 8px;
	border-radius: 50%;
}

.dot-green { background: var(--green); }
.dot-orange { background: var(--orange); }
.dot-blue { background: var(--blue); }

.brand-name {
	font-size: 1.15rem;
	font-weight: 700;
	letter-spacing: -0.02em;
	text-transform: lowercase;
}

.custom-logo-link img {
	max-height: 28px;
	width: auto;
}

.main-navigation {
	display: none;
	flex: 1;
}

.primary-menu {
	display: flex;
	flex-wrap: wrap;
	gap: 4px 16px;
	align-items: center;
}

.primary-menu a {
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--ink-strong);
}

.primary-menu a:hover,
.primary-menu .current-menu-item > a {
	color: var(--ink);
}

.header-actions {
	display: flex;
	align-items: center;
	gap: 10px;
	margin-left: auto;
}

.header-search {
	display: none;
}

.header-search input {
	width: 180px;
	height: 30px;
	padding: 0 14px;
	border: 0;
	border-radius: var(--radius-pill);
	background: var(--surface);
	color: var(--ink-high);
	font-size: 13px;
	outline: none;
}

.header-search input::placeholder {
	color: var(--ink-meta);
}

.header-search input:focus {
	box-shadow: 0 0 0 1px var(--green);
}

.header-link {
	display: none;
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--ink-strong);
}

.header-cta {
	display: none;
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	color: var(--green);
}

.header-cta:hover {
	color: var(--green-hover);
}

.nav-toggle {
	width: 40px;
	height: 40px;
	border: 0;
	background: transparent;
	display: inline-flex;
	flex-direction: column;
	justify-content: center;
	align-items: center;
	gap: 5px;
	cursor: pointer;
	padding: 0;
}

.nav-toggle span {
	display: block;
	width: 18px;
	height: 2px;
	background: var(--ink-strong);
	border-radius: 1px;
	transition: transform 0.2s var(--ease-out), opacity 0.2s ease;
}

.nav-toggle.is-active span:nth-child(1) {
	transform: translateY(7px) rotate(45deg);
}

.nav-toggle.is-active span:nth-child(2) {
	opacity: 0;
}

.nav-toggle.is-active span:nth-child(3) {
	transform: translateY(-7px) rotate(-45deg);
}

body.nav-open .main-navigation {
	display: block;
	position: absolute;
	left: 0;
	right: 0;
	top: var(--header-h);
	background: var(--inset);
	border-bottom: 1px solid var(--divider);
	padding: 16px 1rem 20px;
}

body.nav-open .primary-menu {
	flex-direction: column;
	align-items: flex-start;
	gap: 14px;
}

body.nav-open .primary-menu a {
	font-size: 14px;
}

/* Buttons */
.btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	min-height: 40px;
	padding: 0 18px;
	border-radius: var(--radius-btn);
	border: 0;
	font-size: 14px;
	font-weight: 700;
	cursor: pointer;
	transition: background 0.15s ease, color 0.15s ease, transform 0.15s ease;
}

.btn-green {
	background: var(--green-cta);
	color: #fff;
}

.btn-green:hover {
	background: var(--green-hover);
	color: #fff;
}

.btn-green:active {
	background: var(--green-active);
	color: #fff;
}

.btn-ghost {
	background: transparent;
	color: var(--ink-high);
	border: 1px solid var(--divider);
}

.btn-ghost:hover {
	border-color: var(--ink-meta);
	color: var(--ink);
}

.btn-block {
	width: 100%;
}

/* Hero — full-bleed with dark gradient */
.hero-section {
	position: relative;
	min-height: 68vh;
	display: flex;
	align-items: flex-end;
	overflow: hidden;
}

.hero-media {
	position: absolute;
	inset: 0;
	margin: 0;
}

.hero-media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center 30%;
}

.hero-shade {
	position: absolute;
	inset: 0;
	background:
		linear-gradient(180deg, rgba(20, 24, 28, 0.35) 0%, rgba(20, 24, 28, 0.55) 35%, rgba(20, 24, 28, 0.96) 100%),
		linear-gradient(90deg, rgba(20, 24, 28, 0.75) 0%, rgba(20, 24, 28, 0.2) 55%, rgba(20, 24, 28, 0.55) 100%);
}

.hero-copy {
	position: relative;
	z-index: 1;
	padding: 3.5rem 0 2.75rem;
	max-width: 640px;
	margin-left: max(1rem, calc((100% - var(--container)) / 2));
	margin-right: auto;
	width: min(100% - 2rem, 640px);
	animation: heroIn 0.85s var(--ease-out) both;
}

.brand-hero {
	font-family: var(--font-chrome);
	font-size: 13px;
	font-weight: 700;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--green);
	margin: 0 0 12px;
}

.hero-title {
	font-family: var(--font-display);
	font-size: clamp(1.85rem, 6vw, 2.35rem);
	font-weight: 700;
	line-height: 1.15;
	color: var(--ink);
	margin: 0 0 12px;
	max-width: 14ch;
}

.hero-lead {
	font-size: 15px;
	line-height: 1.55;
	color: var(--ink-high);
	max-width: 38ch;
	margin: 0 0 22px;
}

.hero-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
}

@keyframes heroIn {
	from {
		opacity: 0;
		transform: translateY(18px);
	}
	to {
		opacity: 1;
		transform: none;
	}
}

/* Sections */
.section {
	padding: 2.25rem 0;
}

.section-head {
	margin-bottom: 1rem;
}

.row-head {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 12px;
}

.section-title {
	font-family: var(--font-chrome);
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--ink-meta);
	margin: 0;
}

.section-more {
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	color: var(--ink-strong);
	white-space: nowrap;
}

.section-more:hover {
	color: var(--green);
}

/* Cover rail — horizontal poster strip */
.cover-rail {
	display: grid;
	grid-auto-flow: column;
	grid-auto-columns: minmax(110px, 28vw);
	gap: 8px;
	overflow-x: auto;
	padding-bottom: 8px;
	scroll-snap-type: x mandatory;
	-webkit-overflow-scrolling: touch;
	scrollbar-width: thin;
	scrollbar-color: var(--surface) transparent;
}

.cover-rail::-webkit-scrollbar {
	height: 6px;
}

.cover-rail::-webkit-scrollbar-thumb {
	background: var(--surface);
	border-radius: 3px;
}

.cover-card {
	scroll-snap-align: start;
}

.cover-link {
	display: block;
	color: inherit;
}

.cover-link:hover {
	color: inherit;
}

.cover-well {
	position: relative;
	margin: 0 0 8px;
	background: var(--poster-well);
	border-radius: var(--radius-control);
	overflow: hidden;
	aspect-ratio: 2 / 3;
	box-shadow: 0 1px 0 rgba(0, 0, 0, 0.35);
}

.cover-well img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.35s var(--ease-out);
}

.cover-overlay {
	position: absolute;
	inset: 0;
	border: 2px solid transparent;
	border-radius: var(--radius-control);
	pointer-events: none;
	transition: border-color 0.15s ease, background 0.15s ease;
}

.cover-link:hover .cover-well img,
.cover-link:focus-visible .cover-well img {
	transform: scale(1.03);
}

.cover-link:hover .cover-overlay,
.cover-link:focus-visible .cover-overlay {
	border-color: var(--green);
	background: rgba(0, 224, 84, 0.06);
}

.cover-title {
	font-size: 13px;
	font-weight: 700;
	color: var(--ink-high);
	margin: 0 0 2px;
	line-height: 1.3;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.cover-meta {
	font-size: 11px;
	color: var(--ink-meta);
	margin: 0 0 4px;
}

/* Stars */
.star-rating {
	display: inline-flex;
	gap: 1px;
	align-items: center;
	height: 12px;
}

.star {
	width: 10px;
	height: 10px;
	display: inline-block;
	background: var(--green);
	clip-path: polygon(50% 0%, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%);
}

.star-empty {
	background: var(--ink-low);
	opacity: 0.45;
}

.star-half {
	background: linear-gradient(90deg, var(--green) 50%, var(--ink-low) 50%);
	opacity: 0.9;
}

/* Reviews */
.reviews-layout {
	display: grid;
	gap: 2rem;
}

.review-feed {
	display: flex;
	flex-direction: column;
	gap: 0;
}

.review-row {
	display: grid;
	grid-template-columns: 56px 1fr;
	gap: 12px;
	padding: 18px 0;
	border-top: 1px solid var(--divider);
}

.review-row:last-child {
	border-bottom: 1px solid var(--divider);
}

.review-cover {
	display: block;
	border-radius: var(--radius-control);
	overflow: hidden;
	background: var(--poster-well);
	align-self: start;
}

.review-cover img {
	width: 56px;
	height: 84px;
	object-fit: cover;
}

.review-head {
	display: flex;
	gap: 10px;
	align-items: flex-start;
	margin-bottom: 8px;
}

.review-avatar {
	width: 36px;
	height: 36px;
	border-radius: 50%;
	object-fit: cover;
	flex-shrink: 0;
	background: var(--surface);
}

.review-by {
	margin: 0;
	font-size: 13px;
	color: var(--ink-body);
	line-height: 1.4;
}

.review-by a {
	font-weight: 700;
	color: var(--link);
}

.review-by strong {
	color: var(--ink-high);
	font-weight: 700;
}

.review-meta-line {
	display: flex;
	align-items: center;
	gap: 10px;
	margin-top: 4px;
}

.review-when {
	font-size: 11px;
	color: var(--ink-meta);
}

.review-text {
	font-family: var(--font-review);
	font-size: 15px;
	line-height: 1.65;
	color: var(--ink-high);
	margin: 0 0 10px;
}

.review-likes {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	font-size: 12px;
	color: var(--ink-meta);
	margin: 0;
}

.like-icon {
	width: 12px;
	height: 12px;
	background: var(--like);
	clip-path: path("M6 11.2L5.15 10.4C2.1 7.55 0 5.6 0 3.25 0 1.45 1.35 0 3.05 0c1 0 1.95.5 2.55 1.3C6.2.5 7.15 0 8.15 0 9.85 0 11.2 1.45 11.2 3.25c0 2.35-2.1 4.3-5.15 7.2L6 11.2z");
	transform: scale(0.85);
}

/* Lists sidebar */
.side-panel {
	background: transparent;
}

.list-card {
	padding: 14px 0;
	border-top: 1px solid var(--divider);
}

.list-card:last-child {
	border-bottom: 1px solid var(--divider);
}

.list-stack {
	display: flex;
	gap: 3px;
	margin-bottom: 10px;
}

.list-stack img {
	width: 42px;
	height: 63px;
	object-fit: cover;
	border-radius: 2px;
	background: var(--poster-well);
}

.list-card h3 {
	font-size: 14px;
	margin: 0 0 4px;
	color: var(--ink-high);
}

.list-meta {
	font-size: 12px;
	color: var(--ink-meta);
	margin: 0;
}

/* Journal */
.journal-grid {
	display: grid;
	gap: 1.25rem;
}

.journal-card {
	background: transparent;
}

.journal-card figure {
	margin: 0 0 10px;
	border-radius: var(--radius-control);
	overflow: hidden;
	background: var(--poster-well);
	aspect-ratio: 16 / 9;
}

.journal-card figure img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.4s var(--ease-out);
}

.journal-card:hover figure img {
	transform: scale(1.04);
}

.journal-meta {
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--ink-meta);
	margin: 0 0 6px;
}

.journal-card h3 {
	font-family: var(--font-display);
	font-size: 1.1rem;
	margin: 0 0 6px;
}

.journal-body p:last-child {
	font-size: 14px;
	color: var(--ink-body);
	margin: 0;
}

/* Articles */
.articles-grid {
	display: grid;
	gap: 1.25rem;
}

.article-card-image {
	display: block;
	border-radius: var(--radius-control);
	overflow: hidden;
	background: var(--poster-well);
	aspect-ratio: 16 / 10;
	margin-bottom: 10px;
}

.article-card-image img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.article-card-body time,
.article-card-body .posted-on {
	font-size: 11px;
	color: var(--ink-meta);
	text-transform: uppercase;
	letter-spacing: 0.04em;
}

.article-card-body h2,
.article-card-body h3 {
	font-family: var(--font-display);
	font-size: 1.05rem;
	margin: 6px 0;
}

.article-card-body h2 a,
.article-card-body h3 a {
	color: var(--ink);
}

.article-card-body h2 a:hover,
.article-card-body h3 a:hover {
	color: var(--green);
}

.article-excerpt {
	font-size: 14px;
	color: var(--ink-body);
	margin: 0 0 8px;
}

.read-more {
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	color: var(--ink-strong);
}

.read-more:hover {
	color: var(--green);
}

.demo-note {
	font-size: 12px;
	color: var(--ink-meta);
	margin-top: 1rem;
}

/* Contact */
.contact-section {
	border-top: 1px solid var(--divider);
}

.contact-grid {
	display: grid;
	gap: 1.75rem;
}

.contact-copy h2 {
	font-family: var(--font-display);
	font-size: 1.5rem;
}

.contact-email a {
	font-weight: 600;
}

.contact-form {
	display: grid;
	gap: 10px;
}

.contact-form input,
.contact-form textarea {
	width: 100%;
	padding: 12px 14px;
	border: 1px solid var(--divider);
	border-radius: var(--radius-control);
	background: var(--inset);
	color: var(--ink-high);
	outline: none;
}

.contact-form input:focus,
.contact-form textarea:focus {
	border-color: var(--green);
}

.form-feedback {
	min-height: 1.2em;
	font-size: 13px;
	margin: 0;
}

.form-feedback.is-success {
	color: var(--green);
}

.form-feedback.is-error {
	color: #ec1200;
}

/* Footer */
.site-footer {
	border-top: 1px solid var(--divider);
	background: #0e1114;
	margin-top: 1rem;
}

.footer-top {
	padding: 2rem 0 1.5rem;
}

.footer-grid {
	display: grid;
	gap: 1.5rem;
}

.footer-brand p {
	font-size: 13px;
	color: var(--ink-meta);
	max-width: 36ch;
	margin: 10px 0 0;
}

.footer-menu {
	display: flex;
	flex-wrap: wrap;
	gap: 10px 16px;
}

.footer-menu a {
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--ink-strong);
}

.footer-col p {
	margin: 0 0 6px;
	font-size: 13px;
}

/* Horizontal friend links — no label */
.footer-links-bar {
	border-top: 1px solid var(--divider);
	padding: 14px 0;
}

.footer-links-row {
	display: flex;
	flex-wrap: wrap;
	gap: 8px 18px;
	align-items: center;
	justify-content: flex-start;
}

.footer-links-row a {
	font-size: 12px;
	color: var(--ink-meta);
	white-space: nowrap;
}

.footer-links-row a:hover {
	color: var(--green);
}

.footer-bottom {
	border-top: 1px solid var(--divider);
	padding: 14px 0 20px;
}

.footer-bottom p {
	margin: 0;
	font-size: 12px;
	color: var(--ink-low);
}

/* Inner pages */
.page-header {
	margin-bottom: 1.5rem;
}

.page-title {
	font-family: var(--font-display);
	font-size: clamp(1.5rem, 4vw, 2rem);
}

.archive-section,
.content-section {
	padding-top: 2rem;
}

.entry-title {
	font-family: var(--font-display);
}

.entry-meta {
	font-size: 12px;
	color: var(--ink-meta);
	margin-bottom: 1rem;
}

.entry-thumb {
	margin: 0 0 1.25rem;
	border-radius: var(--radius-control);
	overflow: hidden;
}

.entry-content {
	font-family: var(--font-review);
	font-size: 16px;
	line-height: 1.7;
	color: var(--ink-high);
}

.entry-content a {
	text-decoration: underline;
	text-underline-offset: 2px;
}

.search-form {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-bottom: 1.5rem;
}

.search-form .search-field {
	flex: 1;
	min-width: 180px;
	height: 40px;
	padding: 0 14px;
	border: 0;
	border-radius: var(--radius-pill);
	background: var(--surface);
	color: var(--ink-high);
}

.comments-area {
	margin-top: 2.5rem;
	padding-top: 1.5rem;
	border-top: 1px solid var(--divider);
}

.comment-list {
	margin: 1rem 0;
}

.comment-list .comment {
	padding: 12px 0;
	border-bottom: 1px solid var(--divider);
}

.pagination,
.nav-links {
	display: flex;
	gap: 8px;
	margin-top: 1.5rem;
	flex-wrap: wrap;
}

.pagination a,
.pagination span,
.nav-links a,
.nav-links span {
	padding: 6px 10px;
	border-radius: var(--radius-control);
	background: var(--surface);
	color: var(--ink-strong);
	font-size: 13px;
}

/* Reveal motion */
.reveal {
	opacity: 0;
	transform: translateY(14px);
	transition: opacity 0.55s var(--ease-out), transform 0.55s var(--ease-out);
	transition-delay: var(--reveal-delay, 0ms);
}

.reveal.is-visible {
	opacity: 1;
	transform: none;
}

@media (prefers-reduced-motion: reduce) {
	.reveal,
	.hero-copy,
	.cover-well img,
	.journal-card figure img {
		transition: none !important;
		animation: none !important;
		opacity: 1 !important;
		transform: none !important;
	}
}

/* Tablet+ */
@media (min-width: 640px) {
	.cover-rail {
		grid-auto-columns: minmax(130px, 1fr);
		grid-template-columns: repeat(4, 1fr);
		grid-auto-flow: row;
		overflow: visible;
	}

	.journal-grid {
		grid-template-columns: repeat(3, 1fr);
		gap: 1rem;
	}

	.articles-grid {
		grid-template-columns: repeat(2, 1fr);
	}

	.footer-grid {
		grid-template-columns: 1.4fr 1fr 1fr;
	}

	.contact-grid {
		grid-template-columns: 1fr 1.1fr;
		align-items: start;
	}

	.review-row {
		grid-template-columns: 70px 1fr;
	}

	.review-cover img {
		width: 70px;
		height: 105px;
	}
}

/* Desktop */
@media (min-width: 900px) {
	:root {
		--header-h: 60px;
	}

	.nav-toggle {
		display: none;
	}

	.main-navigation {
		display: block;
		margin-left: 20px;
	}

	.header-search,
	.header-link,
	.header-cta {
		display: inline-flex;
		align-items: center;
	}

	.hero-section {
		min-height: 420px;
		max-height: 520px;
	}

	.hero-title {
		font-size: 36px;
		line-height: 48px;
		max-width: 16ch;
	}

	.hero-lead {
		font-size: 16px;
		max-width: 42ch;
	}

	.cover-rail {
		grid-template-columns: repeat(8, 1fr);
		gap: 10px;
	}

	.reviews-layout {
		grid-template-columns: minmax(0, 1.55fr) minmax(240px, 0.7fr);
		gap: 2.5rem;
		align-items: start;
	}

	.articles-grid {
		grid-template-columns: repeat(4, 1fr);
	}

	.section {
		padding: 2.75rem 0;
	}
}

@media (min-width: 1100px) {
	.header-search input {
		width: 220px;
	}
}
