/*
Theme Name: Unity The Amaryllis Editorial
Theme URI: https://www.amaryllisdelhi.com/blog/
Description: Editorial blog theme for amaryllisdelhi.com built on a vertical rule and hairline grid, matched to the main site palette (Poppins, gold #a29472, ink #161616).
Author: Unity The Amaryllis
Version: 1.3
Requires at least: 6.0
Tested up to: 7.1
Requires PHP: 7.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: ame-blog
*/

/* ---------- Tokens ---------- */
:root {
  --ame-ink: #161616;
  --ame-charcoal: #3c3c3b;
  --ame-gold: #a29472;
  --ame-gold-deep: #786c4f;
  --ame-paper: #faf8f4;
  --ame-text: #26282a;
  --ame-quiet: #7a7d80;
  --ame-rule: #e4e0d7;
  --ame-shell: 1140px;
  --ame-measure: 68ch;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: "Poppins", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  font-size: 1.02rem;
  font-weight: 400;
  line-height: 1.75;
  color: var(--ame-text);
  background-color: #fff;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; border-style: none; }
figure { margin: 0; }

a { color: var(--ame-gold-deep); text-decoration: none; }
a:hover { color: var(--ame-ink); }

:focus-visible { outline: 2px solid var(--ame-gold); outline-offset: 3px; }

h1, h2, h3, h4 {
  margin: 0 0 0.6em;
  font-weight: 700;
  line-height: 1.14;
  letter-spacing: -0.02em;
  color: var(--ame-ink);
}

p { margin: 0 0 1.4rem; }

.ame-shell {
  width: 100%;
  max-width: var(--ame-shell);
  margin: 0 auto;
  padding: 0 24px;
}
@media (max-width: 767px) { .ame-shell { padding: 0 20px; } }

.screen-reader-text {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap; border: 0;
}

.ame-skip { position: absolute; left: -9999px; top: 0; background: var(--ame-gold); color: #fff; padding: 0.7rem 1.1rem; z-index: 9999; }
.ame-skip:focus { left: 0; color: #fff; }

/* ---------- Header ---------- */
.ame-head {
  position: sticky;
  top: 0;
  z-index: 900;
  background: var(--ame-ink);
}
.ame-head__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  min-height: 66px;
}
.ame-head__logo img { max-height: 54px; width: auto; }
@media (max-width: 991px) { .ame-head__logo img { max-height: 42px; } }

.ame-menu ul { display: flex; align-items: center; list-style: none; margin: 0; padding: 0; }
.ame-menu a {
  display: block;
  padding: 1.1rem 0.75rem;
  font-size: 0.78rem;
  font-weight: 400;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.82);
}
.ame-menu a:hover { color: var(--ame-gold); }
.ame-menu .current-menu-item > a,
.ame-menu .current_page_item > a,
.ame-menu li.is-here > a { color: var(--ame-gold); }

.ame-burger { display: none; background: none; border: 0; padding: 0.6rem; cursor: pointer; }
.ame-burger span { display: block; width: 24px; height: 1px; margin: 6px 0; background: #fff; }

@media (max-width: 991px) {
  .ame-burger { display: block; }
  .ame-menu {
    position: absolute; top: 100%; left: 0; right: 0;
    background: var(--ame-ink);
    display: none;
  }
  .ame-menu.is-open { display: block; }
  .ame-menu ul { flex-direction: column; align-items: stretch; }
  .ame-menu a { padding: 0.9rem 24px; border-top: 1px solid rgba(255, 255, 255, 0.1); }
}

/* ---------- Masthead ---------- */
.ame-masthead { padding: 4.5rem 0 0; }
@media (max-width: 767px) { .ame-masthead { padding-top: 2.75rem; } }

.ame-masthead h1 {
  font-size: clamp(2.1rem, 5vw, 3.4rem);
  max-width: 16ch;
  margin-bottom: 0.5rem;
}
.ame-masthead p {
  max-width: 54ch;
  color: var(--ame-quiet);
  margin-bottom: 2rem;
}
.ame-masthead__rule {
  height: 2px;
  background: var(--ame-gold);
  transform-origin: left center;
  animation: ame-draw 0.9s cubic-bezier(0.16, 1, 0.3, 1) both;
}
@keyframes ame-draw { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@media (prefers-reduced-motion: reduce) {
  .ame-masthead__rule { animation: none; }
  html { scroll-behavior: auto; }
}

/* ---------- Lead post ---------- */
.ame-lead {
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  gap: 3rem;
  align-items: center;
  padding: 3.25rem 0;
  border-bottom: 1px solid var(--ame-rule);
}
.ame-lead--noart { grid-template-columns: 1fr; }
.ame-lead--noart .ame-lead__text p { max-width: 68ch; }
@media (max-width: 899px) {
  .ame-lead { grid-template-columns: 1fr; gap: 1.5rem; padding: 2.25rem 0; }
  .ame-lead__art { order: -1; }
}
.ame-lead h2 { font-size: clamp(1.6rem, 3.4vw, 2.5rem); }
.ame-lead h2 a { color: var(--ame-ink); }
.ame-lead h2 a:hover { color: var(--ame-gold-deep); }
.ame-lead p { color: #4d5052; max-width: 46ch; }
.ame-lead__art img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }

/* ---------- Post rows ---------- */
.ame-rows { list-style: none; margin: 0; padding: 0; }
.ame-row {
  display: grid;
  grid-template-columns: 108px 1fr 200px;
  gap: 2.5rem;
  align-items: start;
  padding: 2.5rem 0;
  border-bottom: 1px solid var(--ame-rule);
}
/* Posts with no featured image give their space back to the text. */
.ame-row--noart { grid-template-columns: 108px 1fr; }
@media (max-width: 899px) {
  .ame-row { grid-template-columns: 1fr 120px; gap: 1.25rem; padding: 1.75rem 0; }
  .ame-row--noart { grid-template-columns: 1fr; }
  .ame-row__when { grid-column: 1 / -1; }
}
.ame-row__when {
  font-size: 0.82rem;
  line-height: 1.5;
  color: var(--ame-gold-deep);
  padding-top: 0.35rem;
}
.ame-row__when span { display: block; color: var(--ame-quiet); }
.ame-row h2 { font-size: 1.42rem; margin-bottom: 0.5rem; }
@media (max-width: 767px) { .ame-row h2 { font-size: 1.15rem; } }
.ame-row h2 a { color: var(--ame-ink); }
.ame-row h2 a:hover { color: var(--ame-gold-deep); box-shadow: inset 0 -1px 0 var(--ame-gold); }
.ame-row p { font-size: 0.96rem; color: #55585a; margin: 0; max-width: 62ch; }
.ame-row__art img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; }

/* ---------- Pagination ---------- */
.ame-pager { padding: 3rem 0; }
.ame-pager .nav-links { display: flex; flex-wrap: wrap; gap: 0.5rem; justify-content: center; }
.ame-pager .page-numbers {
  min-width: 2.6rem;
  padding: 0.5rem 0.85rem;
  text-align: center;
  font-size: 0.92rem;
  color: var(--ame-text);
  border-bottom: 2px solid transparent;
}
.ame-pager .page-numbers:hover { border-bottom-color: var(--ame-rule); }
.ame-pager .page-numbers.current { color: var(--ame-ink); font-weight: 700; border-bottom-color: var(--ame-gold); }

/* ---------- Single ---------- */
.ame-title { padding: 3.5rem 0 0; }
@media (max-width: 767px) { .ame-title { padding-top: 2.25rem; } }
.ame-title h1 {
  font-size: clamp(1.9rem, 4.4vw, 3rem);
  max-width: 22ch;
  margin-bottom: 1.25rem;
}
.ame-crumbs { font-size: 0.8rem; color: var(--ame-quiet); margin-bottom: 1.25rem; }
.ame-crumbs a { color: var(--ame-gold-deep); }
.ame-crumbs span + span::before { content: "/"; padding: 0 0.5rem; color: var(--ame-rule); }

.ame-byline {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 2.5rem;
  padding: 1.1rem 0;
  border-top: 1px solid var(--ame-rule);
  border-bottom: 2px solid var(--ame-gold);
  font-size: 0.85rem;
  color: var(--ame-quiet);
}
.ame-byline b { color: var(--ame-ink); font-weight: 700; }

.ame-hero { padding: 2rem 0 0; }
.ame-hero img { width: 100%; max-height: 620px; object-fit: cover; }

/* Body + rail: the vertical rule between them is the theme's spine. */
.ame-spread {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 296px;
  gap: 3.5rem;
  padding: 3rem 0 4rem;
}
@media (max-width: 991px) { .ame-spread { grid-template-columns: 1fr; gap: 2.5rem; padding-bottom: 2.5rem; } }

.ame-body { max-width: var(--ame-measure); font-size: 1.06rem; }
.ame-body > *:first-child { margin-top: 0; }
.ame-body h2 { font-size: 1.62rem; margin-top: 2.6rem; }
.ame-body h3 { font-size: 1.28rem; margin-top: 2rem; color: var(--ame-gold-deep); letter-spacing: -0.01em; }
.ame-body h4 { font-size: 1.1rem; margin-top: 1.6rem; }
.ame-body ul, .ame-body ol { padding-left: 1.2rem; margin: 0 0 1.4rem; }
.ame-body ul { list-style: square; }
.ame-body ol { list-style: decimal; }
.ame-body li { margin-bottom: 0.55rem; }
.ame-body li::marker { color: var(--ame-gold); }
.ame-body a { text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--ame-gold); }
.ame-body img { margin: 2rem 0; }
.ame-body figcaption { font-size: 0.85rem; color: var(--ame-quiet); padding-top: 0.6rem; }
.ame-body blockquote {
  margin: 2rem 0;
  padding: 0 0 0 1.6rem;
  border-left: 2px solid var(--ame-gold);
  font-size: 1.15rem;
  line-height: 1.6;
  color: var(--ame-ink);
}
.ame-body blockquote p:last-child { margin-bottom: 0; }

.ame-body table { width: 100%; border-collapse: collapse; margin: 0 0 1.75rem; font-size: 0.95rem; }
.ame-body table th, .ame-body table td { padding: 0.7rem 0.9rem; text-align: left; vertical-align: top; border-bottom: 1px solid var(--ame-rule); }
.ame-body table thead th { background: var(--ame-ink); color: #fff; border-bottom: 0; font-weight: 700; }
.ame-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; margin-bottom: 1.75rem; }
.ame-scroll > table { margin-bottom: 0; }

.ame-topics { margin-top: 2.5rem; font-size: 0.85rem; color: var(--ame-quiet); }
.ame-topics a { color: var(--ame-gold-deep); }
.ame-topics a:not(:last-child)::after { content: ","; color: var(--ame-quiet); }

/* ---------- Rail ---------- */
.ame-rail { font-size: 0.94rem; }
@media (min-width: 992px) {
  .ame-spread { position: relative; }
  .ame-rail {
    position: sticky;
    align-self: start;
    top: 92px;
    max-height: calc(100vh - 116px);
    overflow-y: auto;
    overscroll-behavior: contain;
    padding-left: 3.5rem;
    margin-left: -3.5rem;
    border-left: 1px solid var(--ame-rule);
    scrollbar-width: thin;
    scrollbar-color: var(--ame-gold) transparent;
  }
  .ame-rail::-webkit-scrollbar { width: 4px; }
  .ame-rail::-webkit-scrollbar-track { background: transparent; }
  .ame-rail::-webkit-scrollbar-thumb { background: var(--ame-gold); }
  body.admin-bar .ame-rail { top: 124px; max-height: calc(100vh - 148px); }
}

.ame-rail section { margin-bottom: 2.5rem; }
.ame-rail h2 {
  font-size: 0.98rem;
  padding-bottom: 0.6rem;
  margin-bottom: 0.9rem;
  border-bottom: 2px solid var(--ame-gold);
}
.ame-rail ul { list-style: none; margin: 0; padding: 0; }
.ame-rail li { padding: 0.65rem 0; border-bottom: 1px solid var(--ame-rule); line-height: 1.45; }
.ame-rail li:last-child { border-bottom: 0; }
.ame-rail a { color: var(--ame-text); }
.ame-rail a:hover { color: var(--ame-gold-deep); }

.ame-find { display: flex; gap: 0.5rem; }
.ame-find input[type="search"] {
  flex: 1 1 auto;
  min-width: 0;
  padding: 0.55rem 0.7rem;
  font: inherit;
  font-size: 0.92rem;
  color: var(--ame-text);
  background: #fff;
  border: 1px solid var(--ame-rule);
}
.ame-find input[type="search"]:focus { outline: 0; border-color: var(--ame-gold); }
.ame-find button { flex-shrink: 0; }

/* ---------- Buttons ---------- */
.ame-act {
  display: inline-block;
  padding: 0.7rem 1.6rem;
  font: inherit;
  font-size: 0.88rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: #fff;
  background: var(--ame-gold);
  border: 1px solid var(--ame-gold);
  cursor: pointer;
  transition: background-color 0.18s, border-color 0.18s;
}
.ame-act:hover { background: var(--ame-gold-deep); border-color: var(--ame-gold-deep); color: #fff; }
.ame-act--ghost { background: transparent; color: var(--ame-ink); border-color: var(--ame-ink); }
.ame-act--ghost:hover { background: var(--ame-ink); color: #fff; border-color: var(--ame-ink); }

/* ---------- Post navigation ---------- */
.ame-updown { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; padding: 2.5rem 0; border-top: 1px solid var(--ame-rule); }
@media (max-width: 767px) { .ame-updown { grid-template-columns: 1fr; gap: 1.5rem; } }
.ame-updown__side small { display: block; font-size: 0.78rem; color: var(--ame-quiet); margin-bottom: 0.4rem; }
.ame-updown__side a { font-size: 1.05rem; font-weight: 700; color: var(--ame-ink); line-height: 1.3; display: block; }
.ame-updown__side a:hover { color: var(--ame-gold-deep); }
.ame-updown__side--fwd { text-align: right; }
@media (max-width: 767px) { .ame-updown__side--fwd { text-align: left; } }

/* ---------- Related ---------- */
.ame-more { padding: 3rem 0 4rem; border-top: 1px solid var(--ame-rule); }
.ame-more > h2 { font-size: 1.35rem; margin-bottom: 1.75rem; }
.ame-more__set { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem; }
@media (max-width: 767px) { .ame-more__set { grid-template-columns: 1fr; gap: 1.5rem; } }
.ame-more__item img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; margin-bottom: 0.85rem; }
.ame-more__item h3 { font-size: 1.05rem; margin: 0; }
.ame-more__item h3 a { color: var(--ame-ink); }
.ame-more__item h3 a:hover { color: var(--ame-gold-deep); }
.ame-more__item time { display: block; font-size: 0.8rem; color: var(--ame-quiet); margin-top: 0.4rem; }

/* ---------- Author ---------- */
.ame-writer {
  display: grid;
  grid-template-columns: 132px minmax(0, 1fr);
  gap: 2rem;
  align-items: start;
}
@media (max-width: 599px) {
  .ame-writer { grid-template-columns: 84px minmax(0, 1fr); gap: 1.25rem; }
}
.ame-writer__face img {
  width: 132px;
  height: 132px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--ame-paper);
}
@media (max-width: 599px) {
  .ame-writer__face img { width: 84px; height: 84px; }
}
.ame-writer__text { max-width: 60ch; }
.ame-writer__text small { display: block; font-size: 0.8rem; color: var(--ame-quiet); margin-bottom: 0.35rem; }
.ame-writer__text h1 { font-size: clamp(1.9rem, 4.2vw, 2.9rem); margin-bottom: 0.4rem; }
.ame-writer__text h2 { font-size: 1.35rem; margin-bottom: 0.4rem; }
.ame-writer__text h2 a { color: var(--ame-ink); }
.ame-writer__text h2 a:hover { color: var(--ame-gold-deep); }
.ame-writer__text p { margin-bottom: 0.75rem; }
.ame-writer__count { font-size: 0.85rem; color: var(--ame-gold-deep); }
.ame-writer__link { font-size: 0.9rem; margin-bottom: 0; }
.ame-writer__link a { box-shadow: inset 0 -1px 0 var(--ame-gold); }
.ame-writer__link a:hover { box-shadow: inset 0 -2px 0 var(--ame-gold); }

/* Foot of an article, above the project band. */
.ame-writer--foot {
  padding: 2.25rem 0 0;
  margin-top: 2.5rem;
  border-top: 1px solid var(--ame-rule);
}

/* ---------- Comments ---------- */
.ame-talk { padding: 3rem 0; border-top: 1px solid var(--ame-rule); max-width: var(--ame-measure); }
.ame-talk h2, .ame-talk h3 { font-size: 1.3rem; }
.ame-talk .comment-list { list-style: none; margin: 0 0 2.5rem; padding: 0; }
.ame-talk .comment-list li { padding: 1.25rem 0; border-bottom: 1px solid var(--ame-rule); }
.ame-talk .comment-list .children { list-style: none; padding-left: 1.75rem; }
.ame-talk .comment-meta { font-size: 0.83rem; color: var(--ame-quiet); margin-bottom: 0.5rem; }
.ame-talk input[type="text"],
.ame-talk input[type="email"],
.ame-talk input[type="url"],
.ame-talk textarea {
  width: 100%;
  padding: 0.6rem 0.75rem;
  font: inherit;
  font-size: 0.95rem;
  border: 1px solid var(--ame-rule);
  background: #fff;
}
.ame-talk textarea { min-height: 150px; }
.ame-talk .comment-form p { margin-bottom: 1rem; }
.ame-talk label { display: block; font-size: 0.83rem; color: var(--ame-quiet); margin-bottom: 0.3rem; }
.ame-talk .submit { display: inline-block; padding: 0.7rem 1.6rem; font-weight: 700; color: #fff; background: var(--ame-gold); border: 1px solid var(--ame-gold); cursor: pointer; }
.ame-talk .submit:hover { background: var(--ame-gold-deep); border-color: var(--ame-gold-deep); }

/* ---------- Empty states ---------- */
.ame-none { padding: 3.5rem 0 4.5rem; max-width: 52ch; }
.ame-none p { color: var(--ame-quiet); }

/* ---------- Footer ---------- */
.ame-foot { background: var(--ame-charcoal); padding: 2.25rem 0; text-align: center; }
.ame-foot ul { list-style: none; margin: 0 0 0.5rem; padding: 0; }
.ame-foot li { display: inline-block; border-right: 1px solid var(--ame-gold); }
.ame-foot li:last-child { border-right: 0; }
.ame-foot li a { display: block; padding: 0 0.55rem; white-space: nowrap; font-size: 0.88rem; color: #fff; }
.ame-foot li a:hover { color: var(--ame-gold); }
.ame-foot__legal { color: rgba(255, 255, 255, 0.5); font-size: 0.85rem; line-height: 1.7; padding-top: 0.5rem; }
.ame-foot__legal a { color: rgba(255, 255, 255, 0.75); }
.ame-foot__legal a:hover { color: var(--ame-gold); }

/* ---------- WordPress core classes ---------- */
.alignleft { float: left; margin: 0.4rem 1.75rem 1.25rem 0; }
.alignright { float: right; margin: 0.4rem 0 1.25rem 1.75rem; }
.aligncenter { margin-left: auto; margin-right: auto; }
.alignwide, .alignfull { max-width: 100%; }
.wp-caption { max-width: 100%; }
.wp-caption-text { font-size: 0.85rem; color: var(--ame-quiet); padding-top: 0.5rem; }
.sticky, .gallery-caption, .bypostauthor { display: block; }
.wp-block-image { margin-bottom: 1.75rem; }