/*
Theme Name: Her Daily
Theme URI: https://herdaily.net
Author: Rizalhadizan
Description: An editorial, magazine-style WordPress theme for herdaily.net — a daily lifestyle and hair-care companion for women 40-60+. Warm, elegant, highly readable.
Version: 1.2.3
Requires at least: 6.0
Requires PHP: 7.4
Text Domain: herdaily
*/

/* ==========================================================================
   Design tokens
   ========================================================================== */
:root {
  --hd-parchment: #FAF4EE;
  --hd-card: #FFFFFF;
  --hd-ink: #2E2420;
  --hd-ink-soft: #5A4F49;
  --hd-wine: #6E2A3B;
  --hd-wine-deep: #531F2C;
  --hd-rose: #E3B8B0;
  --hd-rose-tint: #F3E0DC;
  --hd-sage: #8A9A7E;
  --hd-sage-tint: #E6EAE1;
  --hd-brass: #B08D57;
  --hd-brass-tint: #EFE3CE;
  --hd-border: #E6DACE;

  --hd-font-display: 'Fraunces', Georgia, 'Times New Roman', serif;
  --hd-font-body: 'Public Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  --hd-max: 1180px;
  --hd-radius: 6px;
}

/* ==========================================================================
   Reset & base
   ========================================================================== */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--hd-parchment);
  color: var(--hd-ink);
  font-family: var(--hd-font-body);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; margin: 0; padding: 0; }
button, input { font-family: inherit; font-size: inherit; }

h1, h2, h3, h4 {
  font-family: var(--hd-font-display);
  font-weight: 600;
  line-height: 1.15;
  margin: 0 0 0.4em;
  color: var(--hd-ink);
}

.container {
  max-width: var(--hd-max);
  margin: 0 auto;
  padding: 0 24px;
}

a:focus-visible, button:focus-visible, input:focus-visible {
  outline: 2px solid var(--hd-wine);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

/* ==========================================================================
   Site header
   ========================================================================== */
.site-header {
  border-bottom: 1px solid var(--hd-border);
  background: var(--hd-parchment);
  position: sticky;
  top: 0;
  z-index: 50;
}
.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 18px 0;
}
.site-wordmark {
  font-family: var(--hd-font-display);
  font-size: 28px;
  letter-spacing: -0.01em;
  color: var(--hd-wine);
  display: flex;
  align-items: baseline;
  gap: 2px;
}
.site-wordmark em { font-style: italic; font-weight: 400; color: var(--hd-ink); }
.site-wordmark .hd-dot { color: var(--hd-brass); font-style: normal; margin-left: 2px; }

.primary-nav ul { display: flex; gap: 28px; }
.primary-nav a {
  font-size: 15px;
  font-weight: 500;
  color: var(--hd-ink-soft);
  padding: 6px 0;
  border-bottom: 2px solid transparent;
}
.primary-nav a:hover, .primary-nav a:focus-visible { color: var(--hd-wine); border-bottom-color: var(--hd-brass); }

.header-actions { display: flex; align-items: center; gap: 16px; }
.header-search-toggle {
  background: none; border: 1px solid var(--hd-border); border-radius: 50%;
  width: 38px; height: 38px; display: flex; align-items: center; justify-content: center;
  color: var(--hd-ink); cursor: pointer;
}
.header-search-toggle:hover { border-color: var(--hd-wine); color: var(--hd-wine); }
.header-search-form { display: none; padding: 0 0 16px; }
.header-search-form.is-open { display: block; }
.header-search-form input[type="search"] {
  width: 100%; padding: 10px 14px; border: 1px solid var(--hd-border);
  border-radius: var(--hd-radius); background: var(--hd-card);
}
.menu-toggle {
  display: none; background: none; border: none; font-size: 24px; cursor: pointer; color: var(--hd-ink);
}

/* ==========================================================================
   Hero
   ========================================================================== */
.hero {
  padding: 48px 0 56px;
}
.hero__grid {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: 48px;
  align-items: center;
}
.hero__eyebrow {
  font-size: 14px; font-weight: 600; color: var(--hd-wine);
  margin-bottom: 14px; display: inline-block;
}
.hero__title {
  font-size: 46px;
  margin-bottom: 18px;
}
.hero__title a:hover { text-decoration: underline; text-decoration-color: var(--hd-brass); }
.hero__excerpt {
  color: var(--hd-ink-soft);
  font-size: 18px;
  margin-bottom: 20px;
  max-width: 46ch;
}
.hero__meta { font-size: 14px; color: var(--hd-ink-soft); }
.hero__image {
  border-radius: var(--hd-radius);
  overflow: hidden;
  aspect-ratio: 4 / 3;
}
.hero__image img { width: 100%; height: 100%; object-fit: cover; }

/* ==========================================================================
   Section heading
   ========================================================================== */
.section { padding: 44px 0; }
.section__head {
  display: flex; align-items: baseline; justify-content: space-between;
  margin-bottom: 28px; gap: 16px; flex-wrap: wrap;
}
.section__title { font-size: 30px; }
.section__link { font-size: 14px; font-weight: 600; color: var(--hd-wine); white-space: nowrap; }
.section__link:hover { text-decoration: underline; }

/* ==========================================================================
   Today's edit (asymmetric grid)
   ========================================================================== */
.edit-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 24px;
}
.edit-grid__side { display: grid; gap: 24px; }

.edit-card { display: block; }
.edit-card__image { border-radius: var(--hd-radius); overflow: hidden; margin-bottom: 14px; background: var(--hd-rose-tint); }
.edit-card__image img { width: 100%; object-fit: cover; }
.edit-card--main .edit-card__image { aspect-ratio: 5 / 4; }
.edit-card--side .edit-card__image { aspect-ratio: 16 / 9; }
.edit-card__cat { font-size: 13px; font-weight: 600; color: var(--hd-wine); display: block; margin-bottom: 6px; }
.edit-card--main .edit-card__title { font-size: 26px; }
.edit-card--side .edit-card__title { font-size: 19px; }
.edit-card__title a:hover { text-decoration: underline; text-decoration-color: var(--hd-brass); }
.edit-card__excerpt { color: var(--hd-ink-soft); font-size: 15px; margin-top: 8px; }

/* Placeholder tile (no featured image) */
.hd-placeholder {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--hd-font-display);
  font-size: 15px;
  color: var(--hd-ink);
}

/* ==========================================================================
   Category tiles
   ========================================================================== */
.category-tiles {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}
.category-tile {
  border-radius: var(--hd-radius);
  padding: 28px 22px;
  min-height: 140px;
  display: flex; flex-direction: column; justify-content: space-between;
}
.category-tile__name { font-family: var(--hd-font-display); font-size: 22px; }
.category-tile__count { font-size: 13px; opacity: 0.75; margin-top: 10px; }
.category-tile--wine  { background: var(--hd-wine); color: #fff; }
.category-tile--sage  { background: var(--hd-sage-tint); color: var(--hd-ink); }
.category-tile--rose  { background: var(--hd-rose-tint); color: var(--hd-ink); }
.category-tile--brass { background: var(--hd-brass-tint); color: var(--hd-ink); }
.category-tile:hover { opacity: 0.92; }

/* ==========================================================================
   Latest feed (alternating editorial rows)
   ========================================================================== */
.feed-list { display: grid; gap: 28px; }
.feed-row {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 26px;
  align-items: start;
  padding-bottom: 28px;
  border-bottom: 1px solid var(--hd-border);
}
.feed-row:last-child { border-bottom: none; padding-bottom: 0; }
.feed-row:nth-child(even) { grid-template-columns: 1fr 240px; }
.feed-row:nth-child(even) .feed-row__image { order: 2; }
.feed-row__image { border-radius: var(--hd-radius); overflow: hidden; aspect-ratio: 4 / 3; background: var(--hd-sage-tint); }
.feed-row__image img { width: 100%; height: 100%; object-fit: cover; }
.feed-row__cat { font-size: 13px; font-weight: 600; color: var(--hd-wine); }
.feed-row__title { font-size: 23px; margin: 8px 0; }
.feed-row__title a:hover { text-decoration: underline; text-decoration-color: var(--hd-brass); }
.feed-row__excerpt { color: var(--hd-ink-soft); font-size: 15.5px; }
.feed-row__meta { font-size: 13px; color: var(--hd-ink-soft); margin-top: 10px; }

.pagination { display: flex; gap: 10px; margin-top: 36px; justify-content: center; }
.pagination a, .pagination span {
  padding: 8px 14px; border: 1px solid var(--hd-border); border-radius: var(--hd-radius); font-size: 14px;
}
.pagination .current { background: var(--hd-wine); color: #fff; border-color: var(--hd-wine); }
.pagination a:hover { border-color: var(--hd-wine); color: var(--hd-wine); }

/* ==========================================================================
   Newsletter band
   ========================================================================== */
.newsletter {
  background: var(--hd-wine);
  color: #fff;
  padding: 54px 0;
  text-align: left;
}
.newsletter__inner { display: flex; align-items: center; justify-content: space-between; gap: 32px; flex-wrap: wrap; }
.newsletter__copy h2 { color: #fff; font-size: 28px; margin-bottom: 8px; }
.newsletter__copy p { color: #EBD9D3; margin: 0; max-width: 42ch; }
.newsletter__form { display: flex; gap: 10px; flex-wrap: wrap; }
.newsletter__form input[type="email"] {
  padding: 12px 16px; border-radius: var(--hd-radius); border: none; min-width: 260px;
}
.newsletter__form button {
  padding: 12px 22px; border-radius: var(--hd-radius); border: none;
  background: var(--hd-brass); color: var(--hd-ink); font-weight: 600; cursor: pointer;
}
.newsletter__form button:hover { background: #C7A46B; }
/* NOTE: form is presentational only — wire the action="" up to your ESP (Mailchimp/ConvertKit/Brevo) embed */

/* ==========================================================================
   Single post
   ========================================================================== */
.single-header { padding: 40px 0 0; }
.single-cat { font-size: 14px; font-weight: 600; color: var(--hd-wine); }
.single-title { font-size: 42px; margin: 14px 0 18px; max-width: 26ch; }
.single-meta { font-size: 14.5px; color: var(--hd-ink-soft); margin-bottom: 28px; display: flex; align-items: center; gap: 10px; }
.single-meta__avatar { border-radius: 50%; width: 32px; height: 32px; object-fit: cover; }
/* Same width as the paragraph column below it (.entry-content is 42em @ 21px = 882px); full image shown, not cropped */
.single-feature-image {
  border-radius: var(--hd-radius); overflow: hidden; margin: 0 0 40px;
  max-width: 882px;
}
.single-feature-image img { width: 100%; height: auto; display: block; }

/* Medium-style reading column: large serif body, generous rhythm, ~40ch measure */
.entry-content { max-width: 42em; font-size: 21px; line-height: 1.68; color: var(--hd-ink); }
.entry-content p { margin: 0 0 1.6em; }
.entry-content h2 {
  font-size: 30px; margin: 2em 0 0.6em; line-height: 1.25;
}
.entry-content h2::before {
  content: ""; display: block; width: 56px; height: 2px;
  background: var(--hd-brass); margin-bottom: 1em;
}
.entry-content h3 { font-size: 23px; margin: 1.5em 0 0.5em; line-height: 1.3; }
.entry-content img { border-radius: var(--hd-radius); margin: 1.6em 0; }
.entry-content a { color: var(--hd-wine); text-decoration: underline; text-decoration-color: var(--hd-rose); text-underline-offset: 2px; }
.entry-content ul, .entry-content ol { margin: 0 0 1.6em; padding-left: 1.4em; }
.entry-content li { margin-bottom: 0.5em; }
.entry-content blockquote {
  margin: 1.8em 0; padding: 2px 0 2px 24px; border-left: 3px solid var(--hd-brass);
  font-family: var(--hd-font-display); font-style: italic; font-size: 24px; line-height: 1.45; color: var(--hd-ink-soft);
}
@media (max-width: 680px) {
  .entry-content { font-size: 19px; }
}

.author-box {
  display: flex; gap: 16px; align-items: center;
  background: var(--hd-card); border: 1px solid var(--hd-border); border-radius: var(--hd-radius);
  padding: 22px; margin: 44px 0; max-width: 74ch;
}
.author-box img { border-radius: 50%; width: 56px; height: 56px; object-fit: cover; }
.author-box__name { font-family: var(--hd-font-display); font-size: 17px; }
.author-box__bio { font-size: 14px; color: var(--hd-ink-soft); margin-top: 4px; }

.related-posts { margin-top: 56px; }

/* ==========================================================================
   Archive / page
   ========================================================================== */
.archive-header { padding: 44px 0 8px; }
.archive-header h1 { font-size: 34px; }
.archive-header p { color: var(--hd-ink-soft); }
.page-content { max-width: 74ch; padding: 40px 0; font-size: 18px; line-height: 1.75; }

/* HerDaily Toolkit contact form (rendered via [herdaily_contact_form]) */
.hd-contact-form { max-width: 480px; margin-top: 24px; }
.hd-contact-form label { font-weight: 600; font-size: 14px; color: var(--hd-ink); }
.hd-input {
  width: 100%; margin-top: 6px; padding: 11px 14px;
  border: 1px solid var(--hd-border); border-radius: var(--hd-radius);
  background: var(--hd-card); font-family: var(--hd-font-body); font-size: 16px;
}
.hd-input:focus { outline: 2px solid var(--hd-wine); outline-offset: 1px; border-color: var(--hd-wine); }
.hd-submit {
  padding: 12px 26px; border: none; border-radius: var(--hd-radius);
  background: var(--hd-wine); color: #fff; font-weight: 600; cursor: pointer;
}
.hd-submit:hover { background: var(--hd-wine-deep); }
.hd-form-notice { padding: 12px 16px; border-radius: var(--hd-radius); font-size: 15px; margin-bottom: 18px; }
.hd-form-notice--success { background: var(--hd-sage-tint); color: #33442b; }
.hd-form-notice--error { background: var(--hd-rose-tint); color: var(--hd-wine-deep); }

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer {
  background: var(--hd-ink);
  color: #E9E1DA;
  margin-top: 60px;
  padding: 56px 0 28px;
}
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 32px; margin-bottom: 40px; }
.footer-brand .site-wordmark { color: #fff; }
.footer-brand .site-wordmark em { color: var(--hd-rose); }
.footer-tagline { color: #B7AAA2; font-size: 14.5px; margin-top: 10px; max-width: 32ch; }
.footer-col h4 { color: #fff; font-size: 15px; margin-bottom: 14px; }
.footer-col ul { display: grid; gap: 9px; }
.footer-col a { color: #C9BEB6; font-size: 14.5px; }
.footer-col a:hover { color: #fff; }
.footer-bottom {
  border-top: 1px solid #45392f; padding-top: 22px;
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px;
  font-size: 13px; color: #9C8F86;
}

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 960px) {
  .hero__grid { grid-template-columns: 1fr; gap: 24px; }
  .hero__title { font-size: 34px; }
  .edit-grid { grid-template-columns: 1fr; }
  .category-tiles { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .feed-row, .feed-row:nth-child(even) { grid-template-columns: 1fr; }
  .feed-row__image, .feed-row:nth-child(even) .feed-row__image { order: 0; aspect-ratio: 16/9; }
}
@media (max-width: 680px) {
  .primary-nav, .header-actions .header-search-toggle { display: none; }
  .menu-toggle { display: block; }
  .site-header.nav-open .primary-nav { display: block; }
  .site-header.nav-open .primary-nav ul { flex-direction: column; gap: 4px; padding: 16px 0; }
  .hero__title { font-size: 28px; }
  .single-title { font-size: 30px; }
  .footer-grid { grid-template-columns: 1fr; }
  .newsletter__inner { flex-direction: column; align-items: flex-start; }
}
