/**
 * ND Companion 1.1.0 — module presentation styles.
 *
 * Consumes the design tokens declared by the child theme's style.css
 * (--nd-* custom properties). If the child theme is not active, this
 * file falls back to sensible defaults so nothing breaks visually.
 */

/* ============= Fallback tokens ============= */
:root {
	--nd-paper:      var(--nd-paper, #fbf9f4);
	--nd-ivory:      var(--nd-ivory, #f6f2ea);
	--nd-champagne:  var(--nd-champagne, #e8dfce);
	--nd-line:       var(--nd-line, #d9d1c2);
	--nd-ink:        var(--nd-ink, #1a1817);
	--nd-charcoal:   var(--nd-charcoal, #262322);
	--nd-muted:      var(--nd-muted, #6b6459);
	--nd-brand:      var(--nd-brand, #8a6a3b);
	--nd-olive:      var(--nd-olive, #6b7a4b);
	--nd-serif:      var(--nd-serif, "Cormorant Garamond", ui-serif, Georgia, serif);
	--nd-sans:       var(--nd-sans, "Inter", ui-sans-serif, system-ui, sans-serif);
}

/* ============= Utility ============= */
.nd-kicker {
	display: inline-block;
	font-family: var(--nd-sans);
	font-size: 11px;
	letter-spacing: 0.22em;
	text-transform: uppercase;
	color: var(--nd-muted);
	font-weight: 600;
	margin-bottom: 12px;
}
.nd-editorial-dek {
	font-family: var(--nd-serif);
	font-size: clamp(17px, 1.5vw, 21px);
	line-height: 1.5;
	color: var(--nd-charcoal);
	max-width: 62ch;
}
.nd-editorial-label {
	display: inline-block;
	font-family: var(--nd-sans);
	font-size: 10px;
	letter-spacing: 0.22em;
	text-transform: uppercase;
	color: var(--nd-brand);
	font-weight: 700;
	margin-bottom: 6px;
}
.nd-button {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 12px 20px;
	background: var(--nd-ink);
	color: var(--nd-paper);
	border: 1px solid var(--nd-ink);
	font-family: var(--nd-sans);
	font-size: 12px;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	font-weight: 600;
	text-decoration: none;
	transition: all 0.18s ease;
	border-radius: 0;
	cursor: pointer;
}
.nd-button:hover {
	background: transparent;
	color: var(--nd-ink);
}
.nd-button--ghost {
	background: transparent;
	color: var(--nd-ink);
}
.nd-button--ghost:hover {
	background: var(--nd-ink);
	color: var(--nd-paper);
}

/* ============= Content Flow ============= */
.nd-content-flow { margin: 48px 0; }
.nd-flow { margin: 32px 0; padding: 32px; background: var(--nd-ivory); border: 1px solid var(--nd-line); }
.nd-flow--l3 { background: var(--nd-paper); border-color: var(--nd-champagne); border-left: 3px solid var(--nd-brand); }
.nd-flow__head { margin-bottom: 20px; }
.nd-flow__title { font-family: var(--nd-serif); font-weight: 500; font-size: clamp(22px, 2.4vw, 32px); line-height: 1.1; margin: 4px 0 0; color: var(--nd-ink); }
.nd-flow__actions { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 12px; }
.nd-flow__action { display: inline-flex; align-items: center; gap: 8px; padding: 12px 18px; background: #fff; border: 1px solid var(--nd-line); text-decoration: none; color: var(--nd-ink); font-family: var(--nd-sans); font-size: 13px; transition: all 0.18s ease; }
.nd-flow__action:hover { background: var(--nd-ink); color: var(--nd-paper); border-color: var(--nd-ink); }
.nd-flow__action--l3 { background: var(--nd-brand); color: #fff; border-color: var(--nd-brand); }
.nd-flow__action--l3:hover { background: var(--nd-ink); border-color: var(--nd-ink); }
.nd-flow__icon { width: 16px; height: 16px; flex-shrink: 0; }
.nd-flow--l1 { display: grid; grid-template-columns: 5fr 4fr; gap: 32px; padding: 0; background: transparent; border: none; }
.nd-flow__frame { aspect-ratio: 16/10; overflow: hidden; background: var(--nd-ivory); }
.nd-flow-l1__image { width: 100%; height: 100%; object-fit: cover; }
.nd-flow-l1__body { padding: 24px 0; }
.nd-flow-l1__title { font-family: var(--nd-serif); font-weight: 500; font-size: clamp(28px, 3.2vw, 44px); line-height: 1.02; letter-spacing: -0.01em; color: var(--nd-ink); margin: 0 0 12px; }

/* ============= World hero + topics ============= */
.nd-world-hero { display: grid; grid-template-columns: 5fr 4fr; gap: 40px; padding: 64px 8vw; align-items: center; background: var(--nd-paper); border-bottom: 1px solid var(--nd-line); }
.nd-world-hero__image { aspect-ratio: 4/3; background-size: cover; background-position: center; background-color: var(--nd-ivory); }
.nd-world-hero__image--placeholder { background-color: var(--nd-champagne); }
.nd-world-hero__headline { font-family: var(--nd-serif); font-weight: 500; font-size: clamp(38px, 5vw, 62px); line-height: 1.02; letter-spacing: -0.01em; color: var(--nd-ink); margin: 8px 0 16px; }

.nd-world-topics { padding: 64px 8vw; }
.nd-world-topics__grid { list-style: none; padding: 0; margin: 20px 0 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 20px; }
.nd-world-topics__link { display: block; text-decoration: none; color: var(--nd-ink); transition: transform 0.18s ease; }
.nd-world-topics__link:hover { transform: translateY(-2px); }
.nd-world-topics__image { display: block; aspect-ratio: 4/3; background-size: cover; background-position: center; background-color: var(--nd-ivory); margin-bottom: 12px; }
.nd-world-topics__image--placeholder { background-color: var(--nd-champagne); }
.nd-world-topics__label { font-family: var(--nd-serif); font-weight: 500; font-size: 18px; line-height: 1.2; }

.nd-world-block { padding: 48px 8vw; border-top: 1px solid var(--nd-line); }
.nd-world-block--creators { background: var(--nd-ivory); }

/* ============= Sponsored Slots ============= */
.nd-slot { margin: 28px 0; padding: 20px; background: #fff; border: 1px solid var(--nd-line); border-left: 3px solid var(--nd-brand); }
.nd-slot__label { font-family: var(--nd-sans); font-size: 10px; letter-spacing: 0.22em; text-transform: uppercase; color: var(--nd-brand); font-weight: 700; margin-bottom: 12px; display: flex; align-items: center; gap: 8px; }
.nd-slot__dot { width: 6px; height: 6px; border-radius: 50%; background: var(--nd-brand); }
.nd-slot__sponsor { color: var(--nd-muted); font-weight: 500; letter-spacing: 0.14em; }
.nd-slot__body { display: grid; grid-template-columns: 220px 1fr; gap: 20px; text-decoration: none; color: var(--nd-ink); align-items: center; }
.nd-slot__image { display: block; aspect-ratio: 4/3; background-size: cover; background-position: center; background-color: var(--nd-ivory); }
.nd-slot__text { display: block; }
.nd-slot__title { display: block; font-family: var(--nd-serif); font-weight: 500; font-size: 22px; line-height: 1.2; margin-bottom: 6px; }
.nd-slot__desc { display: block; font-family: var(--nd-serif); font-size: 15px; line-height: 1.4; color: var(--nd-charcoal); margin-bottom: 10px; }
.nd-slot__cta { font-family: var(--nd-sans); font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase; font-weight: 600; color: var(--nd-brand); }

/* ============= Provide gateway ============= */
.nd-provide { padding: 80px 8vw; }
.nd-provide__head { max-width: 62ch; margin: 0 auto 48px; text-align: center; }
.nd-provide__headline { font-family: var(--nd-serif); font-weight: 500; font-size: clamp(38px, 5vw, 62px); line-height: 1.02; letter-spacing: -0.01em; color: var(--nd-ink); margin: 8px 0 16px; }
.nd-provide__grid { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 20px; }
.nd-provide__link { display: block; padding: 32px 28px; background: #fff; border: 1px solid var(--nd-line); text-decoration: none; color: var(--nd-ink); transition: all 0.18s ease; position: relative; height: 100%; }
.nd-provide__link:hover { background: var(--nd-ivory); border-color: var(--nd-brand); }
.nd-provide__kicker { display: block; margin-bottom: 12px; color: var(--nd-brand); }
.nd-provide__label { display: block; font-family: var(--nd-serif); font-weight: 500; font-size: 26px; line-height: 1.1; margin-bottom: 10px; }
.nd-provide__dek { display: block; font-family: var(--nd-serif); font-size: 15px; line-height: 1.5; color: var(--nd-charcoal); }
.nd-provide__arrow { position: absolute; top: 20px; right: 20px; font-size: 18px; color: var(--nd-brand); }

/* ============= Partner With ND ============= */
.nd-partner { padding: 80px 8vw; background: var(--nd-paper); }
.nd-partner__head { max-width: 66ch; margin: 0 auto 48px; text-align: center; }
.nd-partner__headline { font-family: var(--nd-serif); font-weight: 500; font-size: clamp(36px, 4.6vw, 58px); line-height: 1.02; letter-spacing: -0.01em; margin: 8px 0 16px; }
.nd-partner__grid { list-style: none; padding: 0; margin: 0 0 64px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.nd-partner__link { display: block; padding: 22px; background: var(--nd-ivory); border: 1px solid var(--nd-line); text-decoration: none; color: var(--nd-ink); transition: all 0.18s ease; }
.nd-partner__link:hover { background: #fff; border-color: var(--nd-brand); }
.nd-partner__label { display: block; font-family: var(--nd-serif); font-weight: 500; font-size: 18px; line-height: 1.3; margin-top: 6px; }

/* ============= Forms ============= */
.nd-form { padding: 48px 24px; background: var(--nd-ivory); border: 1px solid var(--nd-line); max-width: 720px; margin: 40px auto; }
.nd-form__headline { font-family: var(--nd-serif); font-weight: 500; font-size: clamp(24px, 2.4vw, 32px); line-height: 1.1; margin: 8px 0 24px; }
.nd-form__success { padding: 14px 20px; background: #ecf3e5; border-left: 3px solid var(--nd-olive); color: var(--nd-olive); font-family: var(--nd-serif); font-size: 16px; margin-bottom: 24px; }
.nd-field { margin: 0 0 16px; }
.nd-field label { display: block; font-family: var(--nd-sans); font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; font-weight: 600; color: var(--nd-charcoal); margin-bottom: 6px; }
.nd-field input[type="text"],
.nd-field input[type="email"],
.nd-field input[type="url"],
.nd-field input[type="file"],
.nd-field select,
.nd-field textarea { width: 100%; padding: 10px 14px; font-family: var(--nd-serif); font-size: 16px; border: 1px solid var(--nd-line); background: #fff; color: var(--nd-ink); border-radius: 0; }
.nd-field textarea { min-height: 120px; resize: vertical; }
.nd-field--check label { display: flex; align-items: center; gap: 10px; text-transform: none; letter-spacing: 0; font-family: var(--nd-serif); font-size: 15px; color: var(--nd-ink); }
.nd-field__hint { display: block; margin-top: 6px; font-family: var(--nd-serif); font-size: 14px; }
.nd-form__disclaimer { font-family: var(--nd-serif); font-style: italic; font-size: 13.5px; line-height: 1.5; color: var(--nd-muted); margin: 20px 0; padding: 14px 18px; background: #fff; border-left: 2px solid var(--nd-champagne); }
.nd-form__submit { margin-top: 24px; }

/* ============= Advertise & Grow ============= */
.nd-advertise { padding: 80px 8vw; }
.nd-advertise__head { max-width: 64ch; margin: 0 auto 48px; text-align: center; }
.nd-advertise__headline { font-family: var(--nd-serif); font-weight: 500; font-size: clamp(36px, 4.6vw, 56px); line-height: 1.02; letter-spacing: -0.01em; margin: 8px 0 16px; }
.nd-advertise__grid { list-style: none; padding: 0; margin: 0 0 48px; display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 20px; }
.nd-advertise__pkg { padding: 32px 28px; background: #fff; border: 1px solid var(--nd-line); }
.nd-advertise__pkg-name { font-family: var(--nd-serif); font-weight: 500; font-size: 28px; line-height: 1.1; margin: 6px 0 12px; }
.nd-advertise__pkg-body { font-family: var(--nd-serif); font-size: 15.5px; line-height: 1.5; color: var(--nd-charcoal); margin: 0 0 18px; }
.nd-advertise__foot { text-align: center; padding-top: 32px; border-top: 1px solid var(--nd-line); }
.nd-advertise__foot p { font-family: var(--nd-serif); font-style: italic; font-size: 15px; color: var(--nd-muted); max-width: 60ch; margin: 0 auto 20px; }

/* ============= Central Shop / Services / Directory / Community / Ranking ============= */
.nd-central-shop, .nd-central-services, .nd-directory, .nd-community-feed, .nd-ranking { padding: 48px 8vw; }
.nd-central-shop__head, .nd-central-services__head, .nd-directory__head, .nd-community-feed__head, .nd-ranking__head { margin-bottom: 24px; max-width: 66ch; }
.nd-central-shop__headline, .nd-central-services__headline, .nd-directory__headline, .nd-community-feed__headline, .nd-ranking__headline { font-family: var(--nd-serif); font-weight: 500; font-size: clamp(24px, 2.8vw, 38px); line-height: 1.1; letter-spacing: -0.01em; margin: 4px 0 0; }

.nd-central-shop__grid, .nd-central-services__grid, .nd-directory__grid { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 24px; }
.nd-central-shop__link, .nd-central-services__link, .nd-directory__link { display: block; text-decoration: none; color: var(--nd-ink); transition: transform 0.18s ease; }
.nd-central-shop__link:hover, .nd-central-services__link:hover, .nd-directory__link:hover { transform: translateY(-2px); }
.nd-central-shop__image, .nd-central-services__image, .nd-directory__image { display: block; aspect-ratio: 4/3; background-color: var(--nd-ivory); background-size: cover; background-position: center; margin-bottom: 12px; overflow: hidden; }
.nd-directory__image--placeholder { background-color: var(--nd-champagne); }
.nd-central-shop__img, .nd-central-services__img { width: 100%; height: 100%; object-fit: cover; display: block; }
.nd-central-shop__title, .nd-central-services__title, .nd-directory__title { display: block; font-family: var(--nd-serif); font-weight: 500; font-size: 18px; line-height: 1.2; margin-bottom: 4px; }
.nd-central-shop__price, .nd-central-services__excerpt, .nd-directory__sub { display: block; font-family: var(--nd-sans); font-size: 13px; color: var(--nd-muted); }

.nd-directory__filters { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.nd-directory__chip { display: inline-flex; padding: 6px 14px; background: #fff; border: 1px solid var(--nd-line); font-family: var(--nd-sans); font-size: 12px; letter-spacing: 0.06em; text-transform: uppercase; font-weight: 600; text-decoration: none; color: var(--nd-charcoal); transition: all 0.18s ease; }
.nd-directory__chip:hover, .nd-directory__chip.is-active { background: var(--nd-ink); color: var(--nd-paper); border-color: var(--nd-ink); }

.nd-community-feed__grid { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 24px; }
.nd-community-post { background: #fff; border: 1px solid var(--nd-line); overflow: hidden; }
.nd-community-post__image { aspect-ratio: 1/1; background-size: cover; background-position: center; background-color: var(--nd-ivory); }
.nd-community-post__body { padding: 16px 18px; }
.nd-community-post__author { display: flex; align-items: center; gap: 10px; font-family: var(--nd-sans); font-size: 13px; font-weight: 600; color: var(--nd-charcoal); margin-bottom: 8px; }
.nd-community-post__avatar { border-radius: 50%; }
.nd-community-post__caption { font-family: var(--nd-serif); font-size: 15.5px; line-height: 1.5; color: var(--nd-ink); }
.nd-community-submit__login { text-align: center; padding: 32px; background: var(--nd-ivory); font-family: var(--nd-serif); font-size: 16px; }
.nd-community-submit__login a { color: var(--nd-brand); }

.nd-ranking__list { list-style: none; padding: 0; margin: 0; counter-reset: rank; display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; }
.nd-ranking__link { display: grid; grid-template-columns: 40px 80px 1fr; gap: 14px; align-items: center; text-decoration: none; color: var(--nd-ink); padding: 12px; background: #fff; border: 1px solid var(--nd-line); transition: all 0.18s ease; }
.nd-ranking__link:hover { background: var(--nd-ivory); }
.nd-ranking__n { font-family: var(--nd-serif); font-size: 32px; font-weight: 500; color: var(--nd-champagne); line-height: 1; }
.nd-ranking__image { display: block; aspect-ratio: 1/1; background-color: var(--nd-ivory); background-size: cover; background-position: center; }
.nd-ranking__image--placeholder { background-color: var(--nd-champagne); }
.nd-ranking__title { font-family: var(--nd-serif); font-weight: 500; font-size: 16px; line-height: 1.25; }

/* ============= Responsive ============= */
@media (max-width: 900px) {
	.nd-world-hero, .nd-flow--l1 { grid-template-columns: 1fr; padding-left: 5vw; padding-right: 5vw; }
	.nd-partner__grid { grid-template-columns: 1fr 1fr; }
	.nd-provide, .nd-partner, .nd-advertise, .nd-central-shop, .nd-central-services, .nd-directory, .nd-community-feed, .nd-ranking, .nd-world-topics, .nd-world-block { padding-left: 5vw; padding-right: 5vw; }
	.nd-slot__body { grid-template-columns: 1fr; }
	.nd-slot__image { aspect-ratio: 16/9; }
}
@media (max-width: 600px) {
	.nd-partner__grid { grid-template-columns: 1fr; }
	.nd-flow__actions { flex-direction: column; align-items: stretch; }
	.nd-flow__action { justify-content: flex-start; }
}
