/* ===========================================================================
 * Edition Category — section-by-section stylesheet
 * Loaded only on body.is-edition via functions.php
 *
 * Sections:
 *   1. Tokens & full-bleed wrapper
 *   2. HERO
 * ========================================================================= */


/* ---------------------------------------------------------------------------
 * 1. Tokens & full-bleed wrapper
 * ------------------------------------------------------------------------- */

/* Design tokens — namespaced with --ed-* to avoid colliding with SmartMag.
   Scoped to the body class so they only exist on edition layout pages.
   The .is-edition class is added by functions.php for the parent + every
   descendant category, so this works for any monthly edition slug. */
body.is-edition {
	--ed-teal:      #12aecf;
	--ed-teal-dark: #0d8aaa;
	--ed-ink:       #111111;
	--ed-ink-soft:  #333333;
	--ed-ink-light: #666666;
	--ed-white:     #ffffff;
	--ed-border:    rgba(17, 17, 17, 0.1);
}


/* ---------------------------------------------------------------------------
 * 2. HERO
 * ------------------------------------------------------------------------- */

/* Full-bleed: break out of whatever container SmartMag wraps us in. */
.hero {
	position: relative;
	width: 100vw;
	margin-left: calc(50% - 50vw);
	margin-right: calc(50% - 50vw);
	background: linear-gradient(160deg, #1e2428 0%, #171c20 50%, #12181c 100%);
	overflow: hidden;
}

/* Scoped reset — only touches things inside .hero. */
.hero,
.hero *,
.hero *::before,
.hero *::after {
	box-sizing: border-box;
}
.hero h1,
.hero h2,
.hero h3,
.hero h4,
.hero h5,
.hero h6,
.hero p,
.hero ul,
.hero ol,
.hero li,
.hero figure {
	margin: 0;
	padding: 0;
}

.hero-inner {
	max-width: 1440px;
	margin: 0 auto;
	display: grid;
	grid-template-columns: 1fr 1fr;
	min-height: 88vh;
}

/* --- Left column ------------------------------------------------------- */

.hero-left {
	order: 2;
	padding: 4rem 3rem 4rem 3.5rem;
	display: flex;
	flex-direction: column;
	justify-content: center;
	position: relative;
	overflow: hidden;
}
.hero-left::before {
	content: '';
	position: absolute;
	top: -150px;
	left: -150px;
	width: 700px;
	height: 700px;
	background: radial-gradient(circle, rgba(18, 174, 207, 0.08) 0%, transparent 65%);
	pointer-events: none;
}

.issue-badge {
	display: inline-flex;
	align-items: center;
	gap: 0.75rem;
	margin-bottom: 2rem;
}
.issue-pill {
	background: var(--ed-teal);
	color: var(--ed-white);
	font-family: 'Barlow', sans-serif;
	font-size: 0.62rem;
	letter-spacing: 0.2em;
	text-transform: uppercase;
	font-weight: 800;
	padding: 5px 14px;
	border-radius: 2px;
}
.issue-date {
	font-family: 'Barlow', sans-serif;
	font-size: 0.72rem;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: rgba(255, 255, 255, 0.45);
}

.hero-tagline {
	font-family: 'Barlow', sans-serif;
	font-size: 0.68rem;
	letter-spacing: 0.2em;
	text-transform: uppercase;
	color: var(--ed-teal);
	font-weight: 600;
	margin-bottom: 0.9rem;
}
.hero-headline {
	font-family: 'Barlow Condensed', sans-serif;
	font-size: clamp(2.6rem, 4.5vw, 4rem);
	font-weight: 800;
	color: var(--ed-white);
	line-height: 1.05;
	text-transform: uppercase;
	letter-spacing: -0.01em;
	margin-bottom: 0.75rem;
}
.hero-sub {
	font-family: 'Playfair Display', serif;
	font-size: 1rem;
	font-style: italic;
	color: rgba(255, 255, 255, 0.6);
	margin-bottom: 2rem;
	line-height: 1.65;
	max-width: 480px;
}

.hero-read-btn {
	display: inline-flex;
	align-items: center;
	gap: 0.6rem;
	background: var(--ed-teal);
	color: var(--ed-white);
	font-family: 'Barlow', sans-serif;
	font-size: 0.72rem;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	font-weight: 700;
	padding: 12px 24px;
	text-decoration: none;
	border-radius: 2px;
	align-self: flex-start;
	margin-bottom: 2.5rem;
	transition: background 0.2s, transform 0.2s;
}
.hero-read-btn:hover {
	background: var(--ed-teal-dark);
	transform: translateY(-2px);
	color: var(--ed-white);
}

.hero-articles {
	border-top: 1px solid rgba(255, 255, 255, 0.12);
	padding-top: 1.8rem;
}
.hero-articles-label {
	font-family: 'Barlow', sans-serif;
	font-size: 0.6rem;
	letter-spacing: 0.2em;
	text-transform: uppercase;
	color: rgba(255, 255, 255, 0.35);
	margin-bottom: 0.9rem;
	font-weight: 700;
}
.hero-article-links {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 0;
}
.hero-article-link {
	display: flex;
	align-items: flex-start;
	padding: 0.8rem 0.7rem 0.8rem 0;
	border-bottom: 1px solid rgba(255, 255, 255, 0.08);
	border-right: 1px solid rgba(255, 255, 255, 0.08);
	text-decoration: none;
	transition: background 0.2s;
}
.hero-article-link:nth-child(2n) {
	padding-left: 0.7rem;
	border-right: none;
}
.hero-article-link:hover {
	background: rgba(255, 255, 255, 0.04);
}
.hero-article-link:nth-last-child(-n+2) {
	border-bottom: none;
}
.hal-tag {
	font-family: 'Barlow', sans-serif;
	font-size: 0.57rem;
	letter-spacing: 0.15em;
	text-transform: uppercase;
	color: var(--ed-teal);
	font-weight: 700;
	display: block;
	margin-bottom: 0.2rem;
}
.hal-title {
	font-family: 'Barlow', sans-serif;
	font-size: 0.8rem;
	color: rgba(255, 255, 255, 0.8);
	font-weight: 500;
	line-height: 1.4;
}

/* --- Right column (magazine cover) ----------------------------------- */

.hero-right {
	order: 1;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 28px;
	background: transparent;
}
.mag-cover-wrap {
	width: 95%;
	height: auto;
	border-radius: 3px;
	overflow: hidden;
	margin: auto;
	box-shadow:
		0 24px 60px rgba(0, 0, 0, 0.45),
		0 0 0 1px rgba(255, 255, 255, 0.08);
}
.mag-cover-wrap img {
	display: block;
	width: 100%;
	height: auto;
	object-fit: contain;
	object-position: center center;
}

/* --- Animations ------------------------------------------------------- */

@keyframes edFadeUp {
	from { opacity: 0; transform: translateY(22px); }
	to   { opacity: 1; transform: translateY(0); }
}
.hero-left > * {
	animation: edFadeUp 0.9s cubic-bezier(0.16, 1, 0.3, 1) both;
}
.hero-left > *:nth-child(1) { animation-delay: 0.10s; }
.hero-left > *:nth-child(2) { animation-delay: 0.20s; }
.hero-left > *:nth-child(3) { animation-delay: 0.30s; }
.hero-left > *:nth-child(4) { animation-delay: 0.35s; }
.hero-left > *:nth-child(5) { animation-delay: 0.40s; }
.hero-left > *:nth-child(6) { animation-delay: 0.50s; }
.mag-cover-wrap {
	animation: edFadeUp 1s 0.2s cubic-bezier(0.16, 1, 0.3, 1) both;
}

/* --- Responsive ------------------------------------------------------- */

@media (max-width: 1024px) {
	.hero-inner { grid-template-columns: 1fr 45%; }
}
@media (max-width: 800px) {
	.hero-inner   { grid-template-columns: 1fr; min-height: auto; }
	.hero-right   { min-height: 70vw; }
	.hero-article-links { grid-template-columns: 1fr; }
	.hero-article-link:nth-child(2n) { padding-left: 0; }
	.hero-article-link { border-right: none; }
}


/* ---------------------------------------------------------------------------
 * 3. ARTICLES
 * ------------------------------------------------------------------------- */

/* Full-bleed section so the .wrap inside can center itself with its own
   max-width, ignoring whatever container SmartMag wraps the archive in. */
.articles-section {
	position: relative;
	width: 100vw;
	margin-left: calc(50% - 50vw);
	margin-right: calc(50% - 50vw);
	background: var(--ed-white);
	padding: 1rem 0 2.5rem;
}
.articles-section .wrap {
	max-width: 1280px;
	margin: 0 auto;
	padding: 0 2rem;
}

.articles-section .sec-head {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	padding-top: 3rem;
	margin-bottom: 2rem;
}
.articles-section .sec-eyebrow {
	font-family: 'Barlow', sans-serif;
	font-size: 0.6rem;
	letter-spacing: 0.22em;
	text-transform: uppercase;
	color: var(--ed-teal);
	font-weight: 700;
	margin-bottom: 0.2rem;
}
.articles-section .sec-title {
	font-family: 'Barlow Condensed', sans-serif;
	font-size: 2rem;
	font-weight: 800;
	text-transform: uppercase;
	letter-spacing: 0.02em;
	color: var(--ed-ink);
	margin: 0;
	line-height: 1.1;
}
.articles-section .see-all {
	font-family: 'Barlow', sans-serif;
	font-size: 0.68rem;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--ed-teal);
	text-decoration: none;
	font-weight: 700;
	border-bottom: 1px solid var(--ed-teal);
	padding-bottom: 2px;
	transition: color 0.2s, border-color 0.2s;
}
.articles-section .see-all:hover {
	color: var(--ed-ink);
	border-color: var(--ed-ink);
}

.article-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 1.5rem;
	margin-bottom: 3rem;
}

.article-card {
	background: var(--ed-white);
	border: 1px solid var(--ed-border);
	overflow: hidden;
	transition: transform 0.3s, box-shadow 0.3s;
}
.article-card:hover {
	transform: translateY(-4px);
	box-shadow: 0 16px 40px rgba(17, 17, 17, 0.1);
}

/* Whole-card link wrapper: invisible to design, makes the card a real link. */
.article-card .card-link {
	display: block;
	color: inherit;
	text-decoration: none;
}
.article-card .card-link:hover,
.article-card .card-link:focus {
	color: inherit;
	text-decoration: none;
}

.card-img-wrap {
	overflow: hidden;
	aspect-ratio: 16 / 10;
	background: #f2f2f2;
}
.card-img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.5s;
	display: block;
}
.article-card:hover .card-img {
	transform: scale(1.05);
}

.card-body {
	padding: 1.3rem 1.4rem 1.4rem;
}
.card-tag {
	font-family: 'Barlow', sans-serif;
	font-size: 0.6rem;
	letter-spacing: 0.18em;
	text-transform: uppercase;
	font-weight: 700;
	color: var(--ed-teal);
	display: block;
	margin-bottom: 0.5rem;
}
.card-title {
	font-family: 'Barlow Condensed', sans-serif;
	font-size: 1.22rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.02em;
	color: var(--ed-ink);
	line-height: 1.25;
	margin: 0 0 0.6rem;
}
.card-excerpt {
	font-family: 'Barlow', sans-serif;
	font-size: 0.83rem;
	line-height: 1.7;
	color: var(--ed-ink-light);
	font-weight: 400;
	margin: 0 0 1rem;
}
.card-footer {
	display: flex;
	justify-content: space-between;
	align-items: center;
	border-top: 1px solid var(--ed-border);
	padding-top: 0.8rem;
}
.card-author {
	font-family: 'Barlow', sans-serif;
	font-size: 0.73rem;
	font-weight: 600;
	color: var(--ed-ink-soft);
}
.card-time {
	font-family: 'Barlow', sans-serif;
	font-size: 0.65rem;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--ed-ink-light);
}

/* --- Articles responsive (matches source mockup) ---------------------- */

@media (max-width: 1024px) {
	.article-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
	.article-grid { grid-template-columns: 1fr; }
	.articles-section .sec-head { flex-direction: column; gap: 1rem; align-items: flex-start; }
}


/* ---------------------------------------------------------------------------
 * 4. PROMO BANNER
 * ------------------------------------------------------------------------- */

.promo-banner {
	position: relative;
	width: 100vw;
	margin-left: calc(50% - 50vw);
	margin-right: calc(50% - 50vw);
	background: #111820;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	overflow: hidden;
	padding: 4rem 2rem;
	text-decoration: none;
}
.promo-banner::before {
	content: '';
	position: absolute;
	inset: 0;
	background: radial-gradient(ellipse 60% 80% at 50% 50%, rgba(18, 174, 207, 0.08) 0%, transparent 70%);
	pointer-events: none;
}
.promo-banner::after {
	content: '';
	position: absolute;
	inset: 0;
	background-image: radial-gradient(circle, rgba(18, 174, 207, 0.15) 1px, transparent 1px);
	background-size: 22px 22px;
	opacity: 0.2;
	pointer-events: none;
}
.promo-banner-inner {
	position: relative;
	z-index: 2;
	text-align: center;
	padding: 0;
	width: 100%;
	max-width: 860px;
	background: transparent;
}
.promo-overline {
	font-family: 'Barlow', sans-serif;
	font-size: 0.72rem;
	letter-spacing: 0.28em;
	text-transform: uppercase;
	color: var(--ed-teal);
	font-weight: 700;
	margin-bottom: 1rem;
	display: block;
}
.promo-heading {
	font-family: 'Barlow Condensed', sans-serif;
	font-size: clamp(3rem, 7vw, 5.5rem);
	font-weight: 800;
	text-transform: uppercase;
	color: var(--ed-white);
	letter-spacing: 0.03em;
	line-height: 1;
	text-shadow: 0 2px 24px rgba(0, 0, 0, 0.4);
	margin: 0 0 1.25rem;
}
.promo-sub {
	font-family: 'Barlow', sans-serif;
	font-size: clamp(1.05rem, 2vw, 1.4rem);
	color: rgba(255, 255, 255, 0.75);
	letter-spacing: 0.04em;
	margin: 0 0 2.5rem;
	font-weight: 400;
	line-height: 1.5;
}
.promo-big-btn {
	display: inline-block;
	margin-top: 0;
	background: var(--ed-teal);
	color: var(--ed-white);
	font-family: 'Barlow', sans-serif;
	font-size: 1.1rem;
	letter-spacing: 0.15em;
	text-transform: uppercase;
	font-weight: 800;
	padding: 22px 64px;
	border-radius: 3px;
	text-decoration: none;
	transition: background 0.2s, transform 0.2s;
	border: none;
	cursor: pointer;
}
.promo-big-btn:hover {
	background: var(--ed-teal-dark);
	transform: translateY(-3px);
	color: var(--ed-white);
}


/* ---------------------------------------------------------------------------
 * 5. OPINION
 * ------------------------------------------------------------------------- */

.opinion-section {
	position: relative;
	width: 100vw;
	margin-left: calc(50% - 50vw);
	margin-right: calc(50% - 50vw);
	background: var(--ed-white);
	padding: 1rem 0 3rem;
}
.opinion-section .wrap {
	max-width: 1280px;
	margin: 0 auto;
	padding: 0 2rem;
}
.opinion-section .sec-head {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	padding-top: 3rem;
	margin-bottom: 2rem;
}
.opinion-section .sec-eyebrow {
	font-family: 'Barlow', sans-serif;
	font-size: 0.6rem;
	letter-spacing: 0.22em;
	text-transform: uppercase;
	color: var(--ed-teal);
	font-weight: 700;
	margin: 0 0 0.2rem;
}
.opinion-section .sec-title {
	font-family: 'Barlow Condensed', sans-serif;
	font-size: 2rem;
	font-weight: 800;
	text-transform: uppercase;
	letter-spacing: 0.02em;
	color: var(--ed-ink);
	line-height: 1.1;
	margin: 0;
}

.opinion-full {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 1.25rem;
	margin-bottom: 4rem;
}
.opinion-card-link {
	display: block;
	color: inherit;
	text-decoration: none;
}
.opinion-card-link:hover,
.opinion-card-link:focus {
	color: inherit;
	text-decoration: none;
}
.opinion-card {
	background: var(--ed-white);
	padding: 1.4rem 1.4rem 1.4rem 1.6rem;
	border: 1px solid var(--ed-border);
	border-left: 3px solid var(--ed-teal);
	transition: transform 0.2s, box-shadow 0.2s;
	height: 100%;
}
.opinion-card-link:hover .opinion-card {
	transform: translateX(4px);
	box-shadow: 4px 0 20px rgba(18, 174, 207, 0.08);
}
.opinion-card blockquote {
	font-family: 'Playfair Display', serif;
	font-size: 1rem;
	font-style: italic;
	color: var(--ed-ink);
	line-height: 1.6;
	margin: 0 0 0.6rem;
	quotes: "\201C" "\201D";
}
.opinion-card blockquote::before { content: open-quote; }
.opinion-card blockquote::after  { content: close-quote; }
.opinion-byline {
	font-family: 'Barlow', sans-serif;
	font-size: 0.68rem;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: var(--ed-teal);
	font-weight: 700;
	margin: 0;
}

/* --- Opinion responsive (matches source mockup) ----------------------- */

@media (max-width: 1024px) {
	.opinion-full { grid-template-columns: 1fr; }
}


/* ---------------------------------------------------------------------------
 * 6. NEWSLETTER
 * ------------------------------------------------------------------------- */

.newsletter {
	position: relative;
	width: 100vw;
	margin-left: calc(50% - 50vw);
	margin-right: calc(50% - 50vw);
	background: linear-gradient(135deg, #1a1a1a 0%, #0a2a35 100%);
	padding: 5rem 2rem;
	text-align: center;
	overflow: hidden;
}
.newsletter::before {
	content: '';
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	width: 700px;
	height: 700px;
	background: radial-gradient(circle, rgba(18, 174, 207, 0.12) 0%, transparent 70%);
	pointer-events: none;
}
.newsletter-inner {
	position: relative;
	max-width: 560px;
	margin: 0 auto;
}
.nl-eyebrow {
	font-family: 'Barlow', sans-serif;
	font-size: 0.62rem;
	letter-spacing: 0.22em;
	text-transform: uppercase;
	color: var(--ed-teal);
	font-weight: 700;
	margin: 0 0 1rem;
}
.nl-title {
	font-family: 'Playfair Display', serif;
	font-size: clamp(1.8rem, 4vw, 2.8rem);
	font-weight: 900;
	color: var(--ed-white);
	line-height: 1.15;
	margin: 0 0 0.7rem;
	letter-spacing: -0.01em;
}
.nl-title em {
	color: var(--ed-teal);
	font-style: italic;
}
.nl-sub {
	font-family: 'Barlow', sans-serif;
	font-size: 0.92rem;
	color: rgba(255, 255, 255, 0.55);
	line-height: 1.7;
	font-weight: 300;
	margin: 0 0 2rem;
}
.nl-form {
	display: flex;
	max-width: 440px;
	margin: 0 auto 1rem;
}
.nl-input {
	flex: 1;
	padding: 13px 16px;
	border: 1px solid rgba(255, 255, 255, 0.15);
	border-right: none;
	background: rgba(255, 255, 255, 0.07);
	color: var(--ed-white);
	font-family: 'Barlow', sans-serif;
	font-size: 0.88rem;
	outline: none;
	border-radius: 2px 0 0 2px;
}
.nl-input::placeholder {
	color: rgba(255, 255, 255, 0.3);
}
.nl-input:focus {
	background: rgba(255, 255, 255, 0.12);
	border-color: var(--ed-teal);
}
.nl-btn {
	background: var(--ed-teal);
	color: var(--ed-white);
	border: none;
	padding: 13px 20px;
	font-family: 'Barlow', sans-serif;
	font-size: 0.72rem;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	font-weight: 700;
	cursor: pointer;
	border-radius: 0 2px 2px 0;
	transition: background 0.2s;
	white-space: nowrap;
}
.nl-btn:hover {
	background: var(--ed-teal-dark);
}
.nl-fine {
	font-family: 'Barlow', sans-serif;
	font-size: 0.65rem;
	color: rgba(255, 255, 255, 0.3);
	margin: 0;
}

/* --- Newsletter responsive (matches source mockup) -------------------- */

@media (max-width: 640px) {
	.nl-form { flex-direction: column; }
	.nl-input {
		border-right: 1px solid rgba(255, 255, 255, 0.15);
		border-bottom: none;
		border-radius: 2px 2px 0 0;
	}
	.nl-btn { border-radius: 0 0 2px 2px; }
}
