/* ============================================
   THE ECONOMIC WARDROBE — Main Stylesheet
   ============================================ */

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

:root {
  --cream: #f5f6f7;
  --black: #1a1a1a;
  --dark-gray: #333333;
  --mid-gray: #666666;
  --light-gray: #d8d4cc;
  --placeholder-bg: #e4e0d8;
  --rule-color: #c8c4bc;
  --red: #c0392b;
  --font-display: 'Playfair Display', Georgia, serif;
  --font-body: 'Source Serif 4', 'EB Garamond', Georgia, serif;
  --font-ui: 'Source Serif 4', Georgia, serif;
  --max-width: 1160px;
  --gutter: 24px;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  background-color: var(--cream);
  color: var(--black);
  font-family: var(--font-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  margin: 0;
  padding: 0;
}

a {
  color: inherit;
  text-decoration: none;
}

/* ============================================
   TOP BAR
   ============================================ */

.top-bar {
  background: var(--black);
  color: #aaa;
  font-family: var(--font-ui);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 7px var(--gutter);
}

.top-bar a {
  color: #fff;
  border-bottom: 1px solid #555;
}

/* ============================================
   SITE HEADER
   ============================================ */

.site-header {
  text-align: center;
  padding: 36px var(--gutter) 20px;
  border-bottom: 1px solid var(--rule-color);
}

.header-tagline {
  font-family: var(--font-body);
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--mid-gray);
  margin-bottom: 10px;
}

.site-title {
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 6vw, 4.4rem);
  font-weight: 900;
  letter-spacing: -0.01em;
  line-height: 1;
  color: var(--black);
}

.header-sub {
  font-family: var(--font-body);
  font-style: italic;
  font-size: 0.9rem;
  color: var(--mid-gray);
  margin-top: 8px;
  letter-spacing: 0.04em;
}

/* ============================================
   MAIN NAV
   ============================================ */

.main-nav {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0;
  border-bottom: 3px double var(--rule-color);
  padding: 0 var(--gutter);
  position: relative;
}

.main-nav ul {
  list-style: none;
  display: flex;
  gap: 0;
}

.main-nav ul li a {
  display: block;
  font-family: var(--font-ui);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--dark-gray);
  padding: 13px 18px;
  transition: color 0.15s;
}

.main-nav ul li a:hover {
  color: var(--black);
}

.main-nav ul li a.nav-subscribe {
  color: var(--red);
  font-weight: 600;
}

.nav-search {
  position: absolute;
  right: var(--gutter);
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1rem;
  color: var(--mid-gray);
  padding: 8px;
}

/* ============================================
   MAIN CONTENT WRAPPER
   ============================================ */

.site-main {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* ============================================
   IMAGE PLACEHOLDERS
   ============================================ */

.img-placeholder {
  background-color: var(--placeholder-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-ui);
  font-size: 0.65rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #999;
  border: 1px dashed #bbb;
}

.img-placeholder--hero {
  width: 100%;
  aspect-ratio: 16 / 10;
}

.img-placeholder--secondary {
  width: 100%;
  aspect-ratio: 3 / 2;
}

.img-placeholder--article-top {
  width: 100%;
  aspect-ratio: 21 / 9;
  margin-bottom: 10px;
}

.img-placeholder--article-mid {
  width: 100%;
  aspect-ratio: 16 / 9;
  margin-bottom: 6px;
}

/* ============================================
   SECTION RULES & LABELS
   ============================================ */

.section-rule {
  border: none;
  border-top: 1px solid var(--rule-color);
  margin: 32px 0;
}

.category-label {
  display: block;
  font-family: var(--font-ui);
  font-size: 0.65rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--red);
  margin-bottom: 8px;
}

.byline {
  font-family: var(--font-body);
  font-size: 0.82rem;
  color: var(--mid-gray);
  margin-bottom: 8px;
  font-style: italic;
}

.article-blurb {
  font-family: var(--font-body);
  font-size: 0.9rem;
  color: var(--dark-gray);
  line-height: 1.55;
}

/* ============================================
   ARTICLE TITLES
   ============================================ */

.article-title {
  font-family: var(--font-display);
  color: var(--black);
  line-height: 1.15;
}

.article-title--hero {
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  font-weight: 700;
  margin-bottom: 10px;
}

.article-title--secondary {
  font-size: clamp(1.1rem, 2vw, 1.45rem);
  font-weight: 700;
  margin-bottom: 8px;
}

.article-title--card {
  font-size: clamp(1rem, 1.8vw, 1.25rem);
  font-weight: 700;
  margin-bottom: 8px;
}

.article-title--latest {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 6px;
}

.article-link {
  display: block;
}

.article-link:hover .article-title {
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ============================================
   HERO SECTION
   ============================================ */

.hero-section {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 32px;
  padding: 36px 0 0;
}

.hero-main .img-placeholder--hero {
  margin-bottom: 16px;
}

.hero-main__text {
  padding-right: 8px;
}

.hero-sidebar {
  display: flex;
  flex-direction: column;
  gap: 0;
  border-left: 1px solid var(--rule-color);
  padding-left: 28px;
}

.hero-secondary {
  padding-bottom: 24px;
  margin-bottom: 24px;
  border-bottom: 1px solid var(--rule-color);
}

.hero-secondary:last-child {
  border-bottom: none;
  margin-bottom: 0;
}

.hero-secondary .img-placeholder--secondary {
  margin-bottom: 14px;
}

.hero-secondary--text-only {
  padding-top: 0;
}

/* ============================================
   SECONDARY CARDS ROW
   ============================================ */

.cards-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  padding: 8px 0;
}

.card {
  padding: 0 28px;
  border-right: 1px solid var(--rule-color);
}

.card:first-child {
  padding-left: 0;
}

.card:last-child {
  border-right: none;
  padding-right: 0;
}

/* ============================================
   THE LATEST SECTION
   ============================================ */

.latest-section {
  padding-bottom: 60px;
}

.section-heading {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 900;
  letter-spacing: -0.01em;
  text-align: center;
  margin-bottom: 28px;
}

.latest-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.latest-item {
  padding: 22px 0;
  border-bottom: 1px solid var(--rule-color);
}

.latest-item:last-child {
  border-bottom: none;
}

.latest-item__text {
  max-width: 680px;
}

/* ============================================
   SITE FOOTER
   ============================================ */

.site-footer {
  background: var(--black);
  color: #aaa;
  text-align: center;
  padding: 44px var(--gutter);
}

.footer-title {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 900;
  color: #fff;
  margin-bottom: 6px;
}

.footer-tagline {
  font-style: italic;
  font-size: 0.85rem;
  margin-bottom: 20px;
  color: #888;
}

.footer-nav {
  display: flex;
  justify-content: center;
  gap: 24px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.footer-nav a {
  font-family: var(--font-ui);
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #aaa;
}

.footer-nav a:hover {
  color: #fff;
}

.footer-copy {
  font-size: 0.75rem;
  color: #666;
}

/* ============================================
   ARTICLE PAGE
   ============================================ */

.article-header {
  text-align: center;
  padding: 52px var(--gutter) 36px;
  border-bottom: 1px solid var(--rule-color);
  max-width: 820px;
  margin: 0 auto;
}

.article-header .category-label {
  font-size: 0.7rem;
  margin-bottom: 16px;
}

.article-header .article-title--display {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 3.4rem);
  font-weight: 900;
  line-height: 1.1;
  margin-bottom: 18px;
}

.article-header .byline {
  font-size: 0.9rem;
  margin-bottom: 6px;
}

.article-date {
  font-family: var(--font-ui);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--mid-gray);
}

/* TOP IMAGE + CAPTION */
.article-top-image {
  max-width: var(--max-width);
  margin: 40px auto 0;
  padding: 0 var(--gutter);
}

.image-caption {
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-style: italic;
  color: var(--mid-gray);
  margin-top: 8px;
  text-align: center;
}

/* ARTICLE BODY */
.article-body {
  max-width: 680px;
  margin: 48px auto;
  padding: 0 var(--gutter);
}

.article-body p {
  font-family: var(--font-body);
  font-size: 1.05rem;
  line-height: 1.78;
  color: var(--dark-gray);
  margin-bottom: 1.6em;
}

/* Drop cap */
.article-body p:first-of-type::first-letter {
  font-family: var(--font-display);
  font-size: 4.5em;
  font-weight: 900;
  float: left;
  line-height: 0.82;
  margin-right: 8px;
  margin-top: 6px;
  color: var(--black);
}

/* Pull quote */
.pull-quote {
  border-top: 2px solid var(--black);
  border-bottom: 1px solid var(--rule-color);
  margin: 40px -60px;
  padding: 22px 0;
  text-align: center;
}

.pull-quote p {
  font-family: var(--font-display);
  font-size: clamp(1.3rem, 2.5vw, 1.75rem) !important;
  font-style: italic;
  font-weight: 400;
  line-height: 1.4 !important;
  color: var(--black) !important;
  margin-bottom: 0 !important;
}

/* Mid-article image */
.article-mid-image {
  margin: 40px 0;
}

.article-mid-image .image-caption {
  text-align: left;
}

/* ============================================
   MORE FROM SECTION
   ============================================ */

.more-from-wrap {
  position: relative;
  overflow: hidden;
  background: #111;
}

.more-from-wrap .bg-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.45;
  pointer-events: none;
  z-index: 0;
}

.more-from {
  position: relative;
  z-index: 1;
  border-top: 3px double rgba(255,255,255,0.2);
  padding: 48px var(--gutter) 60px;
  max-width: var(--max-width);
  margin: 0 auto;
}

.more-from .section-heading {
  font-size: 1.1rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 400;
  margin-bottom: 32px;
  color: rgba(255,255,255,0.75);
}

.more-from-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
}

.more-from-grid .card {
  padding: 0 28px;
  border-right: 1px solid rgba(255,255,255,0.15);
}

.more-from-wrap .article-title,
.more-from-wrap .article-title--card { color: rgba(255,255,255,0.9) !important; }
.more-from-wrap .byline { color: rgba(255,255,255,0.45) !important; }
.more-from-wrap .article-blurb { color: rgba(255,255,255,0.55) !important; }
.more-from-wrap .category-label { color: rgba(255,100,80,0.85) !important; }

.more-from-grid .card:first-child {
  padding-left: 0;
}

.more-from-grid .card:last-child {
  border-right: none;
  padding-right: 0;
}

/* Back link */
.article-back {
  display: block;
  position: fixed;
  top: 18px;
  left: 20px;
  z-index: 100;
  font-family: 'Inter', sans-serif;
  font-size: 1.2rem;
  color: rgba(255,255,255,0.6);
  text-decoration: none;
  line-height: 1;
  transition: color 0.2s;
}

.article-back:hover {
  color: #fff;
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 900px) {
  .hero-section {
    grid-template-columns: 1fr;
  }

  .hero-sidebar {
    border-left: none;
    padding-left: 0;
    border-top: 1px solid var(--rule-color);
    padding-top: 28px;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 24px;
  }

  .hero-secondary {
    flex: 1 1 260px;
    border-bottom: none;
    padding-bottom: 0;
    margin-bottom: 0;
  }

  .pull-quote {
    margin: 32px 0;
  }
}

@media (max-width: 700px) {
  .top-bar {
    flex-direction: column;
    gap: 4px;
    text-align: center;
  }

  .main-nav ul {
    flex-wrap: wrap;
    justify-content: center;
  }

  .main-nav ul li a {
    padding: 10px 12px;
  }

  .cards-row {
    grid-template-columns: 1fr;
  }

  .card {
    padding: 20px 0;
    border-right: none;
    border-bottom: 1px solid var(--rule-color);
  }

  .card:last-child {
    border-bottom: none;
  }

  .more-from-grid {
    grid-template-columns: 1fr;
  }

  .more-from-grid .card {
    padding: 16px 0;
    border-right: none;
    border-bottom: 1px solid var(--rule-color);
  }

  .article-body {
    padding: 0 16px;
  }

  .article-body p:first-of-type::first-letter {
    font-size: 3.5em;
  }
}

/* ============================================
   SUBSCRIBE MODAL
   ============================================ */

#subscribeModal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 1000;
  align-items: center;
  justify-content: center;
}

#subscribeModal.open {
  display: flex;
}

.sub-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(4px);
}

.sub-card {
  position: relative;
  background: #f5f0e8;
  width: 420px;
  max-width: 92vw;
  padding: 52px 44px 44px;
  text-align: center;
  box-shadow: 0 32px 80px rgba(0,0,0,0.45);
  border: 1px solid rgba(0,0,0,0.08);
  animation: subFadeIn 0.3s ease;
}

@keyframes subFadeIn {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: translateY(0); }
}

.sub-close {
  position: absolute;
  top: 16px; right: 20px;
  background: none;
  border: none;
  font-size: 1.4rem;
  color: #999;
  cursor: pointer;
  line-height: 1;
  transition: color 0.2s;
}

.sub-close:hover { color: #111; }

.sub-eyebrow {
  font-family: 'Inter', sans-serif;
  font-size: 0.58rem;
  font-weight: 400;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: #aaa;
  margin-bottom: 14px;
}

.sub-heading {
  font-family: 'Playfair Display', serif;
  font-size: 2.4rem;
  font-weight: 700;
  line-height: 1.15;
  color: #111;
  margin-bottom: 16px;
}

.sub-body {
  font-family: 'Playfair Display', serif;
  font-size: 0.85rem;
  line-height: 1.7;
  color: #555;
  margin-bottom: 28px;
}

.sub-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.sub-input {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid #ccc;
  background: #fff;
  font-family: 'Inter', sans-serif;
  font-size: 0.82rem;
  color: #111;
  outline: none;
  transition: border-color 0.2s;
}

.sub-input:focus { border-color: #111; }

.sub-btn {
  width: 100%;
  padding: 13px;
  background: #111;
  color: #f5f0e8;
  border: none;
  font-family: 'Inter', sans-serif;
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.2s;
}

.sub-btn:hover { background: #333; }

.sub-note {
  margin-top: 14px;
  font-family: 'Playfair Display', serif;
  font-style: italic;
  font-size: 0.82rem;
  color: #888;
  opacity: 0;
  transition: opacity 0.4s;
  min-height: 1.2em;
}
