/*
 * Dyana — a modern journal on love and relationships.
 *
 * Design direction: editorial magazine, warm cream palette, all-serif
 * typography (Fraunces for display, Newsreader for body). Layouts
 * favour asymmetry, generous margins, and a small set of curated
 * photographic moments over decorative UI.
 *
 * The Dyana brand shares production infrastructure with dearjane.me
 * but is visually independent — no shared tokens with the AllSugar/
 * DearJane CSS, so nothing here should be reused across brands.
 */

/* ── Tokens ──────────────────────────────────────────────────── */

:root {
  --paper:      #F5EFE7;
  --paper-2:    #EDE4D6;
  --paper-3:    #E4D8C6;
  --ink:        #14100D;
  --ink-soft:   #2A231D;
  --muted:      #6E6157;
  --rose:       #9B3D50;
  --rose-soft:  #E2C5C7;
  --gold:       #B08947;
  --line:       rgba(20, 16, 13, 0.12);

  --font-display: "Fraunces", "Times New Roman", serif;
  --font-body:    "Newsreader", "Iowan Old Style", Georgia, serif;

  --measure: 68ch;
  --shadow-1: 0 1px 2px rgba(20, 16, 13, 0.05), 0 8px 24px rgba(20, 16, 13, 0.06);
  --shadow-2: 0 6px 16px rgba(20, 16, 13, 0.08), 0 20px 60px rgba(20, 16, 13, 0.12);
}

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

html, body {
  margin: 0;
  padding: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 18px;
  line-height: 1.65;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; display: block; }

a { color: inherit; text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: var(--rose); }

::selection { background: rgba(155, 61, 80, 0.18); color: var(--ink); }

/* ── Type scale ──────────────────────────────────────────────── */

.d-display,
h1.d-display,
.d-hero__title {
  font-family: var(--font-display);
  font-weight: 400;
  font-variation-settings: "opsz" 144, "SOFT" 100;
  letter-spacing: -0.015em;
  line-height: 1.02;
  margin: 0;
}
.d-hero__title  { font-size: clamp(2.6rem, 6.5vw, 5.2rem); }
h1.d-display    { font-size: clamp(2.2rem, 4.8vw, 3.8rem); }
h2.d-display    { font-size: clamp(1.75rem, 3.4vw, 2.6rem); font-family: var(--font-display); font-weight: 500; line-height: 1.15; margin: 0; }
h3.d-display    { font-size: clamp(1.35rem, 2.4vw, 1.8rem);  font-family: var(--font-display); font-weight: 500; line-height: 1.25; margin: 0; }

.d-eyebrow {
  font-family: var(--font-body);
  font-size: 0.72rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--rose);
  font-weight: 600;
}

.d-kicker {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 400;
  color: var(--muted);
  font-size: 1.05rem;
}

.d-lede {
  font-family: var(--font-body);
  font-size: 1.2rem;
  line-height: 1.55;
  color: var(--ink-soft);
  max-width: var(--measure);
}

/* ── Layout primitives ───────────────────────────────────────── */

.d-container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}
.d-container--narrow {
  max-width: 760px;
}
.d-container--wide {
  max-width: 1400px;
}

.d-section {
  padding: 96px 0;
}
.d-section--tight { padding: 56px 0; }
.d-section--flush { padding-top: 0; }
.d-section--sep  { border-top: 1px solid var(--line); }

.d-grid {
  display: grid;
  gap: 40px;
}
@media (min-width: 720px) { .d-grid--2 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 900px) { .d-grid--3 { grid-template-columns: repeat(3, 1fr); } }

/* ── Nav ─────────────────────────────────────────────────────── */

.d-nav {
  position: sticky;
  top: 0;
  z-index: 30;
  background: color-mix(in oklab, var(--paper) 92%, transparent);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.d-nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 24px;
  max-width: 1400px;
  margin: 0 auto;
}
.d-nav__logo {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 1.5rem;
  letter-spacing: 0.02em;
  text-decoration: none;
  color: var(--ink);
}
.d-nav__logo span { color: var(--rose); }
.d-nav__links {
  display: flex;
  gap: 28px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.d-nav__links a {
  text-decoration: none;
  color: var(--ink);
  font-size: 0.95rem;
  font-family: var(--font-body);
  position: relative;
  padding: 4px 0;
}
.d-nav__links a::after {
  content: "";
  position: absolute;
  left: 0; right: 100%;
  bottom: -2px;
  height: 1px;
  background: var(--rose);
  transition: right 240ms ease;
}
.d-nav__links a:hover { color: var(--rose); }
.d-nav__links a:hover::after,
.d-nav__links a[aria-current="page"]::after { right: 0; }

.d-nav__toggle {
  display: none;
  border: 0;
  background: transparent;
  padding: 6px 10px;
  cursor: pointer;
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: var(--ink);
}

@media (max-width: 640px) {
  .d-nav__links { display: none; position: absolute; top: 100%; left: 0; right: 0; background: var(--paper); flex-direction: column; padding: 12px 24px 20px; gap: 14px; border-bottom: 1px solid var(--line); }
  .d-nav[data-open="true"] .d-nav__links { display: flex; }
  .d-nav__toggle { display: inline-block; }
}

/* ── Hero ────────────────────────────────────────────────────── */

.d-hero {
  position: relative;
  min-height: min(88vh, 780px);
  color: #F5EFE7;
  overflow: hidden;
  isolation: isolate;
}
.d-hero__media {
  position: absolute;
  inset: 0;
  z-index: -2;
}
.d-hero__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.03);
  animation: dHeroPan 20s ease-in-out infinite alternate;
}
@keyframes dHeroPan {
  from { transform: scale(1.03) translate(0, 0); }
  to   { transform: scale(1.08) translate(-1.5%, -1%); }
}
.d-hero::after {
  content: "";
  position: absolute; inset: 0;
  background:
    linear-gradient(180deg, rgba(20, 16, 13, 0.20) 0%, rgba(20, 16, 13, 0.05) 40%, rgba(20, 16, 13, 0.72) 100%);
  z-index: -1;
}
.d-hero__inner {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-height: inherit;
  padding: 120px 32px 64px;
  max-width: 1400px;
  margin: 0 auto;
}
.d-hero__eyebrow {
  color: rgba(245, 239, 231, 0.85);
  border-left: 2px solid var(--rose-soft);
  padding-left: 12px;
  font-size: 0.72rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  margin-bottom: 24px;
  max-width: 32ch;
}
.d-hero__lede {
  font-family: var(--font-body);
  font-size: clamp(1.05rem, 1.5vw, 1.3rem);
  line-height: 1.5;
  color: rgba(245, 239, 231, 0.86);
  max-width: 46ch;
  margin: 20px 0 32px;
}
.d-hero__cta {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  background: var(--paper);
  color: var(--ink);
  padding: 14px 26px;
  border-radius: 999px;
  font-family: var(--font-body);
  font-size: 0.98rem;
  font-weight: 500;
  text-decoration: none;
  transition: transform 200ms ease, box-shadow 200ms ease, background 200ms ease;
  box-shadow: var(--shadow-1);
}
.d-hero__cta:hover {
  transform: translateY(-2px);
  background: #FFFFFF;
  color: var(--ink);
  box-shadow: var(--shadow-2);
}
.d-hero__cta svg { width: 16px; height: 16px; }

/* ── Article card ────────────────────────────────────────────── */

.d-card {
  display: flex;
  flex-direction: column;
  gap: 14px;
  color: var(--ink);
  text-decoration: none;
  padding-bottom: 4px;
  transition: transform 220ms ease;
}
.d-card:hover { color: var(--ink); }
.d-card:hover .d-card__title { text-decoration: underline; text-underline-offset: 4px; text-decoration-color: var(--rose); }
.d-card__media {
  aspect-ratio: 4 / 5;
  overflow: hidden;
  border-radius: 2px;
  background: var(--paper-3);
}
.d-card__media img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 400ms ease;
}
.d-card:hover .d-card__media img { transform: scale(1.03); }
.d-card__meta {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 500;
}
.d-card__cat { color: var(--rose); font-weight: 600; }
.d-card__title {
  font-family: var(--font-display);
  font-weight: 500;
  line-height: 1.15;
  font-size: clamp(1.25rem, 2vw, 1.65rem);
  margin: 0;
  color: var(--ink);
}
.d-card__dek {
  color: var(--ink-soft);
  font-size: 1rem;
  line-height: 1.55;
  margin: 0;
  max-width: 40ch;
}

/* Larger featured card variant */
.d-feature {
  display: grid;
  gap: 40px;
  align-items: center;
}
@media (min-width: 900px) {
  .d-feature { grid-template-columns: 1.15fr 1fr; gap: 64px; }
  .d-feature--reverse { direction: rtl; }
  .d-feature--reverse > * { direction: ltr; }
}
.d-feature__media {
  aspect-ratio: 4 / 3;
  overflow: hidden;
}
.d-feature__media img { width: 100%; height: 100%; object-fit: cover; }
.d-feature__meta {
  display: flex; gap: 16px; align-items: center;
  font-size: 0.78rem; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--muted); margin-bottom: 20px;
}
.d-feature__title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(2rem, 4vw, 3.4rem);
  line-height: 1.06;
  margin: 0 0 20px;
  letter-spacing: -0.01em;
}
.d-feature__dek {
  font-size: 1.15rem;
  line-height: 1.6;
  color: var(--ink-soft);
  max-width: 52ch;
  margin: 0 0 28px;
}
.d-feature__link {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--font-display); font-style: italic;
  color: var(--rose);
  text-decoration: none;
  font-size: 1.05rem;
  border-bottom: 1px solid rgba(155, 61, 80, 0.3);
  padding-bottom: 3px;
  transition: border-color 200ms ease;
}
.d-feature__link:hover { border-color: var(--rose); color: var(--rose); }

/* ── Section headers ─────────────────────────────────────────── */

.d-section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 32px;
  margin-bottom: 48px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line);
}
.d-section-head__title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(1.6rem, 2.6vw, 2.4rem);
  margin: 0;
  line-height: 1.15;
}
.d-section-head__title em { font-style: italic; color: var(--rose); font-weight: 500; }
.d-section-head__aside {
  font-family: var(--font-display);
  font-style: italic;
  color: var(--muted);
  font-size: 1rem;
  white-space: nowrap;
}
@media (max-width: 640px) {
  .d-section-head { flex-direction: column; align-items: flex-start; }
  .d-section-head__aside { display: none; }
}

/* ── Article typography (long-form) ──────────────────────────── */

.d-article {
  padding: 80px 0 40px;
}
.d-article__lead {
  padding: 24px 0 56px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 56px;
}
.d-article__cat {
  display: inline-block;
  font-size: 0.72rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--rose);
  font-weight: 600;
  margin-bottom: 20px;
}
.d-article__title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(2.2rem, 5.4vw, 4.4rem);
  line-height: 1.02;
  letter-spacing: -0.015em;
  margin: 0 0 24px;
}
.d-article__dek {
  font-family: var(--font-body);
  font-size: 1.25rem;
  line-height: 1.55;
  color: var(--ink-soft);
  margin: 0 0 32px;
  max-width: 55ch;
}
.d-article__byline {
  display: flex;
  align-items: center;
  gap: 16px;
  color: var(--muted);
  font-size: 0.88rem;
  letter-spacing: 0.06em;
}
.d-article__byline strong { color: var(--ink); font-weight: 600; letter-spacing: 0.02em; }
.d-article__byline .dot { width: 4px; height: 4px; background: currentColor; border-radius: 999px; opacity: 0.4; }

.d-article__hero {
  margin: 0 0 56px;
  aspect-ratio: 3 / 2;
  overflow: hidden;
}
.d-article__hero img { width: 100%; height: 100%; object-fit: cover; }

.d-prose {
  font-size: 1.15rem;
  line-height: 1.75;
  color: var(--ink);
  max-width: var(--measure);
  margin: 0 auto;
}
.d-prose > * + * { margin-top: 1.4em; }
.d-prose p:first-of-type::first-letter {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 4.2em;
  float: left;
  line-height: 0.86;
  padding: 0.05em 0.12em 0 0;
  color: var(--rose);
}
.d-prose h2 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 1.75rem;
  line-height: 1.2;
  letter-spacing: -0.005em;
  margin: 2.2em 0 0.6em;
  color: var(--ink);
}
.d-prose h3 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 1.35rem;
  margin: 1.8em 0 0.5em;
  color: var(--ink);
}
.d-prose blockquote {
  margin: 2em -20px;
  padding: 4px 24px;
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 400;
  font-size: 1.6rem;
  line-height: 1.35;
  color: var(--ink);
  border-left: 2px solid var(--rose);
  position: relative;
}
.d-prose blockquote::before {
  content: "“";
  position: absolute;
  left: -34px;
  top: -12px;
  font-size: 4rem;
  color: var(--rose-soft);
  font-family: var(--font-display);
  line-height: 1;
}
@media (max-width: 640px) {
  .d-prose blockquote { margin-left: 0; margin-right: 0; }
  .d-prose blockquote::before { display: none; }
}
.d-prose a {
  color: var(--rose);
  text-decoration: underline;
  text-decoration-color: rgba(155, 61, 80, 0.35);
  text-underline-offset: 4px;
}
.d-prose a:hover { text-decoration-color: var(--rose); }
.d-prose ul, .d-prose ol { padding-left: 1.4em; }
.d-prose ul li, .d-prose ol li { margin: 0.4em 0; }
.d-prose figure { margin: 2.4em 0; }
.d-prose figure img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; }
.d-prose figcaption {
  margin-top: 12px;
  font-family: var(--font-display);
  font-style: italic;
  font-size: 0.9rem;
  color: var(--muted);
  text-align: center;
}
.d-prose hr {
  border: 0;
  height: 1px;
  background: var(--line);
  margin: 3em auto;
  width: 60%;
}
.d-prose .pull {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 1.9rem;
  line-height: 1.2;
  color: var(--rose);
  padding: 32px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  margin: 2em 0;
  letter-spacing: -0.01em;
}

/* Reader byline footer */
.d-article__foot {
  max-width: var(--measure);
  margin: 72px auto 0;
  padding-top: 40px;
  border-top: 1px solid var(--line);
  display: flex;
  gap: 24px;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  font-family: var(--font-display);
  font-style: italic;
  color: var(--muted);
}
.d-article__foot a { color: var(--rose); text-decoration: none; border-bottom: 1px solid rgba(155, 61, 80, 0.3); }

/* ── Newsletter ──────────────────────────────────────────────── */

.d-newsletter {
  background: var(--paper-2);
  padding: 80px 32px;
  border-radius: 2px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.d-newsletter::before,
.d-newsletter::after {
  content: "";
  position: absolute;
  width: 220px; height: 220px;
  border-radius: 50%;
  filter: blur(60px);
  opacity: 0.55;
  z-index: 0;
}
.d-newsletter::before { background: var(--rose-soft); top: -80px; left: -80px; }
.d-newsletter::after  { background: #EAD9BA; bottom: -80px; right: -80px; }
.d-newsletter > * { position: relative; z-index: 1; }
.d-newsletter__eyebrow { color: var(--rose); }
.d-newsletter__title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(1.8rem, 3.4vw, 2.6rem);
  margin: 12px auto 12px;
  max-width: 22ch;
  line-height: 1.1;
}
.d-newsletter__dek {
  color: var(--ink-soft);
  max-width: 42ch;
  margin: 0 auto 32px;
  font-size: 1.05rem;
}
.d-newsletter__form {
  display: flex;
  gap: 10px;
  max-width: 440px;
  margin: 0 auto;
}
.d-newsletter__input {
  flex: 1;
  padding: 14px 18px;
  border: 1px solid var(--line);
  background: var(--paper);
  border-radius: 999px;
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--ink);
}
.d-newsletter__input:focus {
  outline: none;
  border-color: var(--rose);
  box-shadow: 0 0 0 3px rgba(155, 61, 80, 0.15);
}
.d-newsletter__btn {
  padding: 14px 24px;
  background: var(--ink);
  color: var(--paper);
  border: 0;
  border-radius: 999px;
  font-family: var(--font-body);
  font-size: 1rem;
  cursor: pointer;
  transition: background 200ms ease, transform 200ms ease;
}
.d-newsletter__btn:hover { background: var(--rose); transform: translateY(-1px); }
.d-newsletter__note {
  margin-top: 18px;
  font-family: var(--font-display);
  font-style: italic;
  color: var(--muted);
  font-size: 0.9rem;
}
.d-newsletter__ok {
  margin-top: 14px;
  color: var(--rose);
  font-family: var(--font-display);
  font-style: italic;
}

/* ── Pull-quote block (standalone section) ───────────────────── */

.d-quote {
  padding: 96px 24px;
  text-align: center;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.d-quote__mark {
  font-family: var(--font-display);
  font-size: 5rem;
  line-height: 0;
  color: var(--rose-soft);
  display: block;
  margin-bottom: 24px;
  height: 1.2em;
}
.d-quote__text {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(1.5rem, 3vw, 2.2rem);
  line-height: 1.28;
  max-width: 24ch;
  margin: 0 auto 28px;
}
.d-quote__cite {
  font-family: var(--font-body);
  font-size: 0.86rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ── Footer ──────────────────────────────────────────────────── */

.d-foot {
  background: var(--ink);
  color: #E9DFCE;
  padding: 72px 24px 32px;
}
.d-foot__inner {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  gap: 48px;
}
@media (min-width: 720px) {
  .d-foot__inner { grid-template-columns: 1.4fr 1fr 1fr; align-items: flex-start; }
}
.d-foot__brand {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 500;
  margin: 0 0 12px;
}
.d-foot__brand span { color: var(--rose-soft); }
.d-foot__tag {
  font-family: var(--font-display);
  font-style: italic;
  color: rgba(233, 223, 206, 0.7);
  max-width: 38ch;
  margin: 0 0 24px;
  font-size: 1.05rem;
}
.d-foot__head {
  font-family: var(--font-body);
  font-size: 0.75rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(233, 223, 206, 0.55);
  margin: 0 0 18px;
  font-weight: 600;
}
.d-foot__links {
  list-style: none;
  padding: 0; margin: 0;
  display: flex; flex-direction: column; gap: 10px;
}
.d-foot__links a {
  color: rgba(233, 223, 206, 0.85);
  text-decoration: none;
  font-size: 0.95rem;
}
.d-foot__links a:hover { color: #FFF; }
.d-foot__partner {
  margin-top: 24px;
  padding: 20px;
  border: 1px solid rgba(233, 223, 206, 0.15);
  border-radius: 2px;
  font-family: var(--font-display);
  font-style: italic;
  color: rgba(233, 223, 206, 0.85);
  font-size: 0.95rem;
}
.d-foot__partner a { color: var(--rose-soft); text-decoration: none; border-bottom: 1px solid rgba(226, 197, 199, 0.35); }
.d-foot__partner a:hover { color: #FFF; border-color: #FFF; }
.d-foot__legal {
  margin-top: 48px;
  padding-top: 24px;
  border-top: 1px solid rgba(233, 223, 206, 0.14);
  font-family: var(--font-body);
  font-size: 0.82rem;
  color: rgba(233, 223, 206, 0.5);
  max-width: 1200px;
  margin-left: auto; margin-right: auto;
  text-align: center;
}

/* ── Utility ─────────────────────────────────────────────────── */

.d-eyebrow-line {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-size: 0.72rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--rose);
  font-weight: 600;
  margin-bottom: 20px;
}
.d-eyebrow-line::before {
  content: ""; width: 28px; height: 1px; background: var(--rose);
}

.d-tag {
  display: inline-block;
  padding: 4px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  text-decoration: none;
  transition: border-color 180ms ease, color 180ms ease;
}
.d-tag:hover { border-color: var(--rose); color: var(--rose); }

.d-back {
  display: inline-flex; align-items: center; gap: 8px;
  color: var(--muted); text-decoration: none;
  font-family: var(--font-display); font-style: italic;
  margin-bottom: 20px;
}
.d-back:hover { color: var(--rose); }

/* Reveal-on-scroll (JS toggles .is-in) */
.d-reveal { opacity: 0; transform: translateY(18px); transition: opacity 700ms ease, transform 700ms ease; }
.d-reveal.is-in { opacity: 1; transform: translateY(0); }

/* Prefers-reduced-motion */
@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
  .d-hero__media img { animation: none; }
}
