:root {
  --accent-color: #d7a947;
  --accent-soft: rgba(215, 169, 71, 0.13);
  --accent-bright: #f1d58a;
  --rose: #c97868;
  --moss: #8fa66d;

  --bg-color: #0c0905;
  --bg-gradient:
    radial-gradient(circle at 18% 8%, rgba(215, 169, 71, 0.22), transparent 34%),
    radial-gradient(circle at 86% 14%, rgba(201, 120, 104, 0.16), transparent 30%),
    linear-gradient(145deg, #130e08 0%, #070504 58%, #020202 100%);
  --text-color: #f4ecd8;
  --muted-text: rgba(244, 236, 216, 0.72);

  --surface: rgba(24, 18, 11, 0.76);
  --surface-strong: rgba(35, 26, 16, 0.82);
  --card-border: rgba(255, 220, 150, 0.14);
  --selection-bg: rgba(215, 169, 71, 0.36);
  --selection-text: #fff6dc;

  --border-radius: 18px;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.54);

  --font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text",
                 "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

@media (prefers-color-scheme: light) {
  :root {
    --bg-color: #f7efde;
    --bg-gradient:
      radial-gradient(circle at 16% 8%, rgba(215, 169, 71, 0.24), transparent 32%),
      radial-gradient(circle at 82% 12%, rgba(201, 120, 104, 0.18), transparent 30%),
      linear-gradient(145deg, #fffaf0 0%, #f4ead5 54%, #e7d7b6 100%);
    --text-color: #1d160a;
    --muted-text: rgba(29, 22, 10, 0.68);

    --surface: rgba(255, 252, 244, 0.76);
    --surface-strong: rgba(255, 249, 236, 0.9);
    --card-border: rgba(120, 90, 30, 0.12);
    --selection-bg: rgba(215, 169, 71, 0.32);
    --selection-text: #1d160a;

    --shadow: 0 15px 40px rgba(120, 90, 30, 0.18);
  }
}

html,
body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  font-family: var(--font-family);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  background: var(--bg-gradient);
  color: var(--text-color);
}

::selection {
  background: var(--selection-bg);
  color: var(--selection-text);
}

body {
  padding: 0;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 220, 150, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 220, 150, 0.04) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.75), transparent 68%);
}

.container {
  max-width: 760px;
  width: 100%;
  margin: 1.5rem auto;
  padding: 1.5rem 1.5rem 2.4rem;
  background: var(--surface);
  border: 1px solid var(--card-border);
  border-radius: 18px;
  box-shadow: var(--shadow);
  box-sizing: border-box;
  animation: fadeInUp 0.55s ease-out;
}

.home .container {
  max-width: 1040px;
  margin: 0 auto;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.subpage .container {
  max-width: 1040px;
  margin: 0 auto;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.subpage .header,
.subpage section,
.subpage .container > p,
.subpage .container > ul,
.subpage .container > ol,
.subpage .container > h2,
.subpage footer {
  max-width: 760px;
  margin-left: auto;
  margin-right: auto;
}

.subpage .container > p:first-of-type,
.subpage section:first-of-type {
  margin-top: 2rem;
}

.subpage section {
  padding: 1.2rem 0;
  border-top: 1px solid var(--card-border);
}

.subpage section:first-of-type {
  border-top: 0;
  padding-top: 0;
}

.subpage .container > h2 {
  padding-top: 1.35rem;
  border-top: 1px solid var(--card-border);
}

@media (max-width: 600px) {
  .container {
    padding: 1rem 1rem 1.6rem;
  }
}

.header {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  min-height: 68px;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--card-border);
}

.app-icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  box-shadow:
    0 0 0 1px rgba(255, 220, 150, 0.15),
    0 10px 24px rgba(0, 0, 0, 0.55);
  -webkit-user-drag: none;
}

h1 {
  font-size: 1.55rem;
  line-height: 1.2;
  margin: 0;
  color: var(--text-color);
  letter-spacing: 0;
}

.tagline {
  margin: 0.2rem 0 0;
  font-size: 1rem;
  color: var(--muted-text);
}

.underline-accent {
  display: none;
}

.hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(280px, 0.95fr);
  gap: 2rem;
  align-items: center;
  min-height: 54vh;
  padding: 3.5rem 0 2.7rem;
}

.hero-archive {
  min-height: 360px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.9rem;
  padding: 1.2rem;
  border: 1px solid var(--card-border);
  border-radius: 18px;
  box-shadow: var(--shadow);
  background:
    linear-gradient(90deg, transparent 49%, rgba(215, 169, 71, 0.36) 49% 51%, transparent 51%),
    linear-gradient(rgba(244, 236, 216, 0.06) 1px, transparent 1px),
    radial-gradient(circle at 50% 18%, rgba(241, 213, 138, 0.28), transparent 24%),
    var(--surface-strong);
  background-size: auto, 100% 34px, auto, auto;
}

.archive-card {
  display: grid;
  gap: 0.25rem;
  padding: 1rem;
  border: 1px solid var(--card-border);
  border-radius: 14px;
  background: rgba(10, 7, 4, 0.34);
  backdrop-filter: blur(12px);
}

.archive-card.primary {
  border-color: rgba(241, 213, 138, 0.34);
  background: rgba(215, 169, 71, 0.13);
}

.archive-date {
  color: var(--rose);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.archive-title {
  color: var(--text-color);
  font-size: 1.05rem;
  font-weight: 700;
}

.archive-meta {
  color: var(--muted-text);
  font-size: 0.88rem;
}

.hero-title {
  margin: 0 0 1rem;
  font-size: clamp(3.1rem, 8vw, 6.6rem);
  line-height: 0.92;
  color: var(--text-color);
  letter-spacing: 0;
}

.hero-kicker {
  margin: 0 0 0.8rem;
  color: var(--accent-bright);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hero p {
  max-width: 620px;
  font-size: 1.08rem;
}

@media (max-width: 780px) {
  .hero {
    grid-template-columns: 1fr;
    min-height: auto;
    padding: 2.4rem 0 2rem;
  }

  .hero-archive {
    min-height: 220px;
  }
}

h2 {
  margin-top: 2rem;
  margin-bottom: 0.65rem;
  font-size: 1.25rem;
  color: var(--text-color);
  letter-spacing: 0;
}

h3 {
  margin: 1.05rem 0 0.35rem;
  font-size: 1rem;
  color: var(--accent-bright);
  letter-spacing: 0;
}

p {
  line-height: 1.6;
  margin: 0.45rem 0;
  font-size: 0.98rem;
  color: var(--muted-text);
}

ul,
ol {
  padding-left: 1.3rem;
  margin: 0.45rem 0 0.3rem;
}

li {
  line-height: 1.6;
  margin-bottom: 0.2rem;
  color: var(--muted-text);
}

a {
  color: var(--accent-bright);
  text-decoration: none;
  word-break: break-word;
  transition: color 0.2s ease, text-shadow 0.2s ease;
}

a:hover {
  text-decoration: underline;
  text-shadow: 0 0 6px rgba(200, 155, 60, 0.5);
}

footer {
  margin-top: 2.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--card-border);
  text-align: center;
  font-size: 0.9rem;
  opacity: 0.9;
}

.no-select {
  user-select: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
}

.callout {
  padding: 0.9rem 1rem;
  border-radius: 10px;
  background: var(--accent-soft);
  border: 1px solid rgba(200, 155, 60, 0.35);
  font-size: 0.93rem;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.85rem;
  margin: 1rem 0 0.5rem;
}

@media (max-width: 900px) {
  .feature-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 560px) {
  .feature-grid {
    grid-template-columns: 1fr;
  }
}

.feature-card {
  min-height: 132px;
  padding: 1rem;
  border-radius: 14px;
  background: linear-gradient(180deg, var(--surface-strong), var(--surface));
  border: 1px solid var(--card-border);
  box-shadow: 0 16px 38px rgba(0, 0, 0, 0.18);
}

.feature-card h3 {
  margin: 0 0 0.25rem;
  font-size: 0.98rem;
  color: var(--text-color);
  letter-spacing: 0;
}

.feature-card p {
  margin: 0;
  font-size: 0.9rem;
  opacity: 0.92;
}

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

@keyframes slideIn {
  to {
    transform: translateX(0);
  }
}
