/*
Theme Name: Animal Memory
Theme URI: https://animalmemory.org/
Author: Global Animal Memorial
Description: Lightweight archive and memorial theme for Global Animal Memorial.
Version: 0.1.0
Text Domain: animal-memory
*/

:root {
  --am-bg: #f2f6f5;
  --am-panel: #ffffff;
  --am-panel-soft: #e9f4f1;
  --am-text: #20292b;
  --am-muted: #5d6c70;
  --am-heading: #173b40;
  --am-accent: #21656a;
  --am-accent-soft: #dcebea;
  --am-border: #cddcdd;
  --am-warm: #b45f5a;
  --am-radius: 8px;
  --am-shadow: 0 10px 30px rgba(20, 28, 30, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--am-bg);
  color: var(--am-text);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.6;
}

a {
  color: var(--am-accent);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.am-container {
  width: min(1160px, calc(100% - 32px));
  margin: 0 auto;
}

body.home main .am-container {
  width: min(980px, calc(100% - 32px));
}

.am-site-header {
  border-bottom: 1px solid var(--am-border);
  background: rgba(255, 255, 255, 0.88);
}

.am-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  min-height: 92px;
  padding-top: 14px;
  padding-bottom: 14px;
}

.am-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  color: var(--am-heading);
  font-weight: 780;
  line-height: 1.15;
}

.am-logo-mark {
  display: grid;
  flex: 0 0 40px;
  width: 40px;
  height: 40px;
  place-items: center;
  border: 1px solid var(--am-border);
  border-radius: 50%;
  background: var(--am-panel-soft);
  color: var(--am-accent);
  font-size: 12px;
  font-weight: 850;
  letter-spacing: 0;
  line-height: 1;
  text-decoration: none;
}

.am-brand-name {
  min-width: 0;
  overflow-wrap: anywhere;
}

.am-header-navs {
  display: grid;
  gap: 10px;
  justify-items: end;
  align-content: center;
}

.am-language-nav,
.am-main-nav {
  display: flex;
  flex-wrap: wrap;
  row-gap: 8px;
  column-gap: 8px;
  justify-content: flex-end;
}

.am-language-nav a,
.am-main-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 11px;
  border-radius: 7px;
  color: #33565b;
  font-size: 14px;
  line-height: 1.2;
}

.am-language-nav a {
  min-height: 30px;
  padding: 0 9px;
  font-size: 12px;
}

.am-language-nav a.is-active {
  background: var(--am-accent);
  color: #f7ffff;
}

.am-language-nav a:hover,
.am-main-nav a:hover {
  background: var(--am-accent-soft);
  text-decoration: none;
}

.am-language-nav a.is-active:hover {
  background: var(--am-accent);
}

.am-hero {
  padding: 40px 0 30px;
}

.am-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.02fr) minmax(320px, 0.98fr);
  gap: 28px;
  align-items: center;
}

.am-hero-centered {
  display: grid;
  justify-items: center;
  text-align: center;
}

.am-hero-content {
  display: grid;
  justify-items: center;
  width: min(980px, 100%);
}

.am-eyebrow {
  margin: 0 0 10px;
  color: #2f8c83;
  font-size: 13px;
  font-weight: 750;
}

.am-hero h1 {
  margin: 0 0 14px;
  color: var(--am-heading);
  font-size: clamp(34px, 5vw, 64px);
  line-height: 1.05;
  letter-spacing: 0;
}

.am-hero-copy {
  max-width: 650px;
  margin: 0 0 22px;
  color: var(--am-muted);
  font-size: 17px;
}

.am-hero-centered .am-hero-copy {
  max-width: 720px;
  margin: 0 auto 18px;
}

.am-home-banner {
  width: min(980px, 100%);
  margin: 0 0 18px;
  overflow: hidden;
  border: 1px solid var(--am-border);
  border-radius: var(--am-radius);
  background: #f7faf9;
  box-shadow: 0 12px 28px rgba(20, 28, 30, 0.08);
}

.am-home-banner img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 7.2;
  object-fit: contain;
  object-position: center;
}

.am-search {
  width: 100%;
  max-width: none;
}

.am-search-row {
  display: flex;
  min-height: 50px;
  overflow: hidden;
  border: 1px solid var(--am-border);
  border-radius: var(--am-radius);
  background: var(--am-panel);
}

.am-search-row input {
  flex: 1;
  min-width: 0;
  border: 0;
  padding: 0 15px;
  color: var(--am-text);
  font: inherit;
  outline: 0;
}

.am-search-row button,
.am-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0 14px;
  border: 0;
  border-radius: 7px;
  background: var(--am-accent);
  color: #f7ffff;
  cursor: pointer;
  font: inherit;
  font-weight: 720;
}

.am-button:disabled,
button:disabled {
  cursor: not-allowed;
  opacity: 0.56;
}

.am-search-row button {
  width: 98px;
  padding: 0;
  border-radius: 0;
}

.am-search-note {
  margin: 8px 0 0;
  color: var(--am-muted);
  font-size: 12px;
}

.am-notice {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  width: 100%;
  max-width: none;
  margin-top: 16px;
  padding: 12px 13px;
  border-left: 3px solid #2f8c83;
  border-radius: 6px;
  background: var(--am-panel-soft);
  color: #33565b;
  font-size: 13px;
  line-height: 1.65;
  text-align: left;
}

.am-notice strong {
  display: block;
  color: var(--am-heading);
  margin-bottom: 2px;
}

.am-notice a {
  flex: 0 0 auto;
  white-space: nowrap;
}

.am-hero-art {
  min-height: 360px;
  border: 1px solid var(--am-border);
  border-radius: var(--am-radius);
  background:
    radial-gradient(circle at 72% 64%, rgba(180, 95, 90, 0.18), transparent 8%),
    radial-gradient(circle at 70% 68%, rgba(255, 255, 255, 0.95), transparent 12%),
    radial-gradient(circle at 58% 66%, rgba(255, 255, 255, 0.92), transparent 10%),
    radial-gradient(circle at 82% 70%, rgba(155, 102, 70, 0.24), transparent 9%),
    linear-gradient(145deg, #f8fbfa 0%, #dcebea 100%);
  box-shadow: var(--am-shadow);
  position: relative;
  overflow: hidden;
}

.am-hero-art::before {
  content: "";
  position: absolute;
  inset: 10%;
  border: 1px solid rgba(23, 59, 64, 0.08);
  border-radius: 50%;
}

.am-hero-art::after {
  content: "A quiet archive garden for every remembered life";
  position: absolute;
  right: 22px;
  bottom: 20px;
  max-width: 230px;
  color: rgba(23, 59, 64, 0.48);
  font-size: 13px;
}

.media-frame {
  position: relative;
  margin: 18px 0 22px;
  overflow: hidden;
  border: 1px solid var(--am-border);
  border-radius: var(--am-radius);
  background: #f7faf9;
}

.am-featured-media {
  display: grid;
  justify-items: center;
  margin: 18px 0 22px;
  overflow: hidden;
  border: 1px solid var(--am-border);
  border-radius: var(--am-radius);
  background: #f7faf9;
}

.am-featured-media img,
.am-content figure img,
.am-content img {
  display: block;
  width: auto;
  max-width: 100%;
  height: auto;
  margin: 0 auto;
  object-fit: contain;
}

.media-frame img {
  display: block;
  width: auto;
  max-width: 100%;
  height: auto;
  max-height: 720px;
  margin: 0 auto;
  object-fit: contain;
}

.media-frame figcaption {
  margin: 0;
  padding: 10px 12px;
  color: var(--am-muted);
  font-size: 12px;
  background: #fbfdfc;
}

.media-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin: 16px 0 24px;
}

.media-grid .media-frame {
  margin: 0;
}

.media-grid .media-frame img {
  max-height: none;
}

.sensitive-media {
  position: relative;
  overflow: hidden;
}

.sensitive-thumb img,
.sensitive-frame:not(.is-revealed) img {
  filter: blur(14px);
}

.sensitive-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  gap: 12px;
  padding: 24px;
  background: rgba(23, 59, 64, 0.42);
  color: #fff;
  text-align: center;
}

.sensitive-overlay p {
  max-width: 520px;
  margin: 0 auto;
  color: #fff;
  font-size: 14px;
}

.sensitive-overlay button {
  justify-self: center;
  min-height: 34px;
  padding: 0 13px;
  border: 1px solid rgba(255, 255, 255, 0.78);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.94);
  color: var(--am-heading);
  font: inherit;
  font-weight: 720;
}

.sensitive-frame.is-revealed .sensitive-overlay {
  display: none;
}

.am-entry-links {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 24px;
}

.am-entry-card,
.am-card,
.am-section {
  border: 1px solid var(--am-border);
  border-radius: var(--am-radius);
  background: var(--am-panel);
}

.am-entry-card {
  display: grid;
  grid-template-rows: auto 1fr auto;
  justify-items: center;
  min-height: 172px;
  padding: 18px;
}

.am-entry-card h2,
.am-section h2,
.am-card h2 {
  margin: 0 0 8px;
  color: var(--am-heading);
  letter-spacing: 0;
}

.am-entry-card p,
.am-card p {
  color: var(--am-muted);
}

.am-entry-card .am-button {
  min-height: 38px;
  align-self: end;
}

.am-section {
  margin: 24px 0;
  padding: 22px;
}

.am-latest-columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  align-items: start;
}

.am-latest-columns .am-section {
  margin: 24px 0;
  min-height: 0;
}

.am-section-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.am-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.am-latest-columns .am-grid {
  grid-template-columns: 1fr;
}

.am-card {
  overflow: hidden;
}

.am-latest-columns .am-card {
  display: grid;
  grid-template-columns: minmax(150px, 38%) minmax(0, 1fr);
  min-height: 178px;
}

.am-thumb {
  display: block;
  aspect-ratio: 16 / 9;
  background:
    linear-gradient(135deg, rgba(33, 101, 106, 0.1), rgba(180, 95, 90, 0.08)),
    #eef5f4;
  overflow: hidden;
}

.am-latest-columns .am-thumb {
  height: 100%;
  min-height: 178px;
  aspect-ratio: auto;
}

.am-thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.am-card-body {
  padding: 14px;
}

.am-meta,
.am-card-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--am-muted);
  font-size: 12px;
}

.am-card h2 {
  font-size: 17px;
}

.am-muted-note {
  margin: 0;
  color: var(--am-muted);
}

.am-interaction-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 18px;
  color: var(--am-muted);
  font-size: 14px;
}

.am-flower-box,
.am-comment-box,
.am-comment-list,
.am-filter-panel {
  margin-top: 16px;
  padding: 16px;
  border: 1px solid var(--am-border);
  border-radius: var(--am-radius);
  background: #fbfdfc;
}

.am-comment-box label {
  display: block;
  margin-bottom: 4px;
  color: var(--am-heading);
  font-weight: 650;
}

.am-comment-box input,
.am-comment-box textarea {
  width: 100%;
  border: 1px solid var(--am-border);
  border-radius: 7px;
  padding: 10px;
  color: var(--am-text);
  font: inherit;
}

.am-comment-box small {
  display: block;
  margin-top: 5px;
  color: var(--am-muted);
}

.am-form-status {
  min-height: 22px;
  margin: 10px 0 0;
  color: var(--am-accent);
  font-size: 14px;
}

.am-honeypot {
  position: absolute !important;
  left: -10000px !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
}

.am-comment {
  padding: 14px 0;
  border-top: 1px solid var(--am-border);
}

.am-comment:first-of-type {
  border-top: 0;
}

.am-comment header {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: baseline;
  color: var(--am-muted);
  font-size: 13px;
}

.am-comment header strong {
  color: var(--am-heading);
  font-size: 15px;
}

.am-comment header span {
  padding: 1px 6px;
  border-radius: 5px;
  background: var(--am-soft);
  color: var(--am-accent);
  font-size: 12px;
}

.am-comment-attachments {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 180px));
  gap: 10px;
  margin: 12px 0;
}

.am-comment-attachments figure {
  margin: 0;
}

.am-comment-attachments img {
  display: block;
  width: auto;
  max-width: 100%;
  height: auto;
  max-height: 220px;
  margin: 0 auto;
  object-fit: contain;
  border-radius: 7px;
  border: 1px solid var(--am-border);
  background: #f7faf9;
}

.am-comment-attachments .am-sensitive-media img {
  filter: blur(12px);
}

.am-comment footer {
  display: flex;
  gap: 8px;
}

.am-comment footer button {
  min-height: 30px;
  border: 1px solid var(--am-border);
  border-radius: 6px;
  background: #fff;
  color: var(--am-heading);
  font: inherit;
  font-size: 13px;
}

.am-tax-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.am-chip {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid var(--am-border);
  border-radius: 999px;
  background: #fff;
  color: #33565b;
  font-size: 14px;
}

.am-footer {
  margin-top: 48px;
  padding: 34px 0;
  border-top: 1px solid var(--am-border);
  background: #fff;
}

.am-footer-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}

.am-footer h2 {
  margin: 0 0 10px;
  color: var(--am-heading);
  font-size: 15px;
}

.am-footer a {
  display: block;
  margin: 6px 0;
  color: var(--am-muted);
  font-size: 14px;
}

@media (max-width: 860px) {
  .am-header-inner,
  .am-notice {
    align-items: flex-start;
    flex-direction: column;
  }

  .am-main-nav {
    justify-content: flex-start;
  }

  .am-hero-grid,
  .am-entry-links,
  .am-latest-columns,
  .am-grid,
  .media-grid,
  .am-footer-grid {
    grid-template-columns: 1fr;
  }

  .am-header-navs {
    justify-items: start;
  }

  .am-latest-columns .am-card {
    grid-template-columns: 1fr;
  }

  .am-latest-columns .am-thumb {
    min-height: 0;
    aspect-ratio: 16 / 9;
  }

  .am-hero-art {
    min-height: 320px;
  }

  .am-home-banner img {
    aspect-ratio: 16 / 10;
  }
}
