/* This file is based on the original static styles.css */

@import url("/fonts/fonts.css");

/* Reset and base styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Manrope", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu,
    Cantarell, "Noto Sans", sans-serif;
  line-height: 1.6;
  color: #333;
  background: #eeeeee;
  min-height: 100vh;
  overflow-y: auto;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
}

.site-header,
.footer,
.page,
.section,
.main-content {
  /* ensure links don’t turn blue/purple by default */
}

/* Global link color (keep consistent with site palette) */
a,
a:visited {
  color: inherit;
}
a:hover {
  color: inherit;
}

.container {
  max-width: 1000px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Header styles */
.site-header {
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: saturate(120%) blur(8px);
  -webkit-backdrop-filter: saturate(120%) blur(8px);
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.nav-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.nav-menu {
  display: flex;
  gap: 20px;
  list-style: none;
}

.nav-menu a {
  color: #333333;
  text-decoration: none;
  font-weight: 500;
  font-size: 14px;
  position: relative;
}

.nav-menu a:hover {
  color: #666666;
}

/* Animated underline */
.nav-menu a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -2px;
  height: 2px;
  width: 0;
  background: #333333;
  transition: width 180ms cubic-bezier(0.22, 0.61, 0.36, 1);
}
.nav-menu a:hover::after {
  width: 100%;
}

.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 0;
  background: transparent;
}

.logo-img {
  width: 140px;
}

/* Main content styles */
.main-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: center;
  padding: 96px 0 40px;
  position: relative;
  overflow: visible;
  min-height: 100vh;
}

/* Canvas for animated background stripes (limited to main-content) */
.animated-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  pointer-events: none;
}

.container {
  position: relative;
  z-index: 2;
}

.content-wrapper {
  display: grid;
  grid-template-columns: 3fr 2fr;
  gap: 60px;
  align-items: start;
  width: 100%;
  margin-top: 32px;
}

.main-title {
  font-family: "Dela Gothic One", "Manrope", sans-serif;
  font-size: 42px;
  font-weight: 700;
  color: #333333;
  margin-bottom: 20px;
  line-height: 1.1;
}

.main-description {
  font-size: 15px;
  color: #555555;
  margin-top: 10px;
  margin-bottom: 12px;
  line-height: 1.6;
}

/* CTA link */
.cta-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #333333;
  font-weight: 600;
  text-decoration: none;
}
.cta-link:hover {
  color: #000000;
  text-decoration: underline;
}

/* Hero columns */
.hero-left {
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.hero-right {
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: flex-start;
}
.hero-empty {
  min-height: 220px;
  display: flex;
  justify-content: center;
  align-items: center;
  flex: 1;
}

/* Character in hero */
.character {
  position: relative;
  width: 280px;
  height: 280px;
}

.character-body {
  width: 100%;
  height: 100%;
  display: block;
  transition: transform 160ms cubic-bezier(0.22, 0.61, 0.36, 1);
  transform-origin: 50% 50%;
}

.eye {
  position: absolute;
  width: 44px;
  height: 44px;
  background: #ffffff;
  border: 3px solid #000000;
  border-radius: 50%;
  overflow: hidden;
  display: flex;
  justify-content: center;
  align-items: center;
  transition: transform 140ms cubic-bezier(0.22, 0.61, 0.36, 1);
}

.eye-left {
  left: 92px;
  top: 96px;
}
.eye-right {
  right: 92px;
  top: 96px;
}

.pupil {
  width: 16px;
  height: 16px;
  background: #000000;
  border-radius: 50%;
  transform: translate(0, 0);
  transition: transform 140ms cubic-bezier(0.22, 0.61, 0.36, 1);
}

.mouth {
  position: absolute;
  left: 50%;
  top: 150px;
  width: 90px;
  height: 45px;
  transform: translateX(-50%);
  border-bottom: 8px solid #000000;
  border-radius: 0 0 90px 90px;
  transition: transform 160ms cubic-bezier(0.22, 0.61, 0.36, 1);
}

@media (max-width: 600px) {
  .character {
    width: 220px;
    height: 220px;
  }
  .eye {
    width: 36px;
    height: 36px;
    border-width: 3px;
  }
  .pupil {
    width: 14px;
    height: 14px;
  }
  .eye-left {
    left: 70px;
    top: 74px;
  }
  .eye-right {
    right: 70px;
    top: 74px;
  }
  .mouth {
    top: 120px;
    width: 74px;
    height: 38px;
    border-bottom-width: 7px;
  }
}

/* Markdown Content (Articles) */
.article-content img {
  max-width: 100% !important;
  height: auto !important;
  border-radius: 12px;
  display: block;
  margin: 1.5em auto;
  object-fit: contain;
}

.article-content iframe {
  max-width: 100% !important;
  border-radius: 12px;
  display: block;
  margin: 1.5em auto;
}

/* Beautiful Lists in Articles */
.article-content ul,
.article-content ol {
  margin: 1.5em 0;
  padding-left: 24px;
}

.article-content ul {
  list-style: none;
}

.article-content ul li {
  position: relative;
  margin-bottom: 12px;
  line-height: 1.6;
  color: #444;
}

.article-content ul li::before {
  content: "";
  position: absolute;
  left: -20px;
  top: 10px;
  width: 6px;
  height: 6px;
  background-color: #333;
  border-radius: 50%;
  opacity: 0.7;
}

.article-content ol li {
  margin-bottom: 12px;
  line-height: 1.6;
  color: #444;
  padding-left: 4px;
}

.article-content p {
  margin-bottom: 1.2em;
  line-height: 1.7;
}

.article-content h2,
.article-content h3,
.article-content h4 {
  margin-top: 1.5em;
  margin-bottom: 0.8em;
  color: #222;
  font-family: "Dela Gothic One", "Manrope", sans-serif;
}

/* Sections */
.section {
  padding: 60px 0;
}

.section-title {
  font-family: "Dela Gothic One", "Manrope", sans-serif;
  font-size: 32px;
  font-weight: 700;
  color: #333333;
  margin-bottom: 16px;
  line-height: 1.1;
}

/* Mission */
.mission-section {
  background: #ffffff;
}
.mission-grid {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 32px;
  align-items: start;
}
.mission-image {
  display: flex;
  justify-content: flex-start;
  align-items: flex-start;
}
.mission-illustration {
  width: 100%;
  max-width: 420px;
  height: auto;
  border-radius: 16px;
}
.mission-text {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-self: stretch;
}
.mission-text p {
  color: #333333;
  line-height: 1.6;
  margin-bottom: 12px;
}

@media (max-width: 768px) {
  .mission-grid {
    grid-template-columns: 1fr;
  }
  .mission-image {
    justify-content: center;
  }
  .mission-illustration {
    max-width: 80%;
  }
}

/* Help */
.help-intro p {
  color: #333333;
  line-height: 1.6;
}
.help-grid {
  margin-top: 20px;
  display: grid;
  grid-template-columns: repeat(4, minmax(220px, 1fr));
  gap: 20px;
}
.help-card {
  padding: 16px 0 20px;
  background: transparent;
  border: none;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
}
.help-card-icon {
  width: 64px;
  height: auto;
  display: block;
}
.help-card-title {
  font-family: "Manrope", sans-serif;
  font-size: 20px;
  font-weight: 700;
  color: #333333;
  margin: 0;
}
.help-card-desc {
  font-size: 14px;
  color: #555555;
  line-height: 1.5;
}

/* Blog */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(10, 1fr);
  gap: 20px;
  margin-top: 20px;
  grid-auto-flow: row;
  grid-auto-rows: auto;
}
.blog-card {
  padding: 0;
  border: 1px solid rgba(0, 0, 0, 0.12);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.7);
  position: relative;
  overflow: hidden;
}

.blog-card.large1 {
  grid-column: 1 / span 7;
  grid-row: 1;
}
.blog-card.small1 {
  grid-column: 8 / span 3;
  grid-row: 1;
}
.blog-card.small2 {
  grid-column: 1 / span 3;
  grid-row: 2;
}
.blog-card.large2 {
  grid-column: 4 / span 7;
  grid-row: 2;
}

.blog-image-wrap {
  width: 100%;
  aspect-ratio: 1 / 1;
  background: #ffffff;
  border-radius: 12px 12px 0 0;
  overflow: hidden;
}
.blog-card.featured .blog-image-wrap {
  aspect-ratio: 16 / 9;
}
.blog-image {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}
.blog-card-body {
  padding: 16px 24px 24px;
}
.blog-title {
  font-family: "Oswald", "Manrope", sans-serif;
  font-size: 20px;
  color: #333333;
  line-height: 1.2;
  margin-bottom: 8px;
  font-weight: 600;
}
.blog-excerpt {
  color: #555555;
  line-height: 1.4;
}
.blog-meta {
  font-size: 12px;
  color: #777777;
  margin-top: 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.blog-tags {
  list-style: none;
  margin: 0 0 6px 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.blog-tags li {
  font-size: 12px;
  color: #333333;
  background: rgba(0, 0, 0, 0.06);
  border: 1px solid rgba(0, 0, 0, 0.12);
  border-radius: 12px;
  padding: 4px 8px;
}
.blog-label {
  position: absolute;
  top: 12px;
  right: 12px;
  background: #333333;
  color: #ffffff;
  font-size: 12px;
  padding: 4px 10px;
  border-radius: 12px;
  line-height: 1;
}

@media (max-width: 768px) {
  .blog-grid {
    grid-template-columns: 1fr;
  }
  .blog-card.large1,
  .blog-card.small1,
  .blog-card.small2,
  .blog-card.large2 {
    grid-column: auto;
    grid-row: auto;
  }
  .blog-image-wrap {
    height: 200px;
    aspect-ratio: auto;
  }
}

/* Subscribe */
.subscribe-centered {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}
.subscribe-centered .section-title {
  margin-bottom: 8px;
}
.subscribe-text {
  color: #333333;
  line-height: 1.6;
  margin: 0 0 12px 0;
  max-width: 720px;
}
.subscribe-form {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 8px;
  flex-wrap: wrap;
  justify-content: center;
  width: 100%;
}
.subscribe-input {
  flex: 1;
  min-width: 220px;
  padding: 12px 14px;
  border: 1px solid #d0d0d0;
  border-radius: 10px;
  font-size: 14px;
  max-width: 420px;
  width: 100%;
}
.subscribe-button {
  background: #333333;
  color: #ffffff;
  border: none;
  padding: 12px 18px;
  font-size: 14px;
  font-weight: 600;
  border-radius: 10px;
  cursor: pointer;
}
.subscribe-button:hover {
  background: #000000;
}
.subscribe-note {
  font-size: 12px;
  color: #777777;
  margin: 0;
}
.subscribe-section {
  padding-bottom: 120px;
}

@media (max-width: 768px) {
  .subscribe-form {
    flex-direction: column;
    align-items: stretch;
  }
  .subscribe-button {
    width: 100%;
  }
  .subscribe-section {
    padding-bottom: 96px;
  }
}

/* Footer */
.footer {
  background: #0f0f10;
  border-top: 1px solid #2a2a2a;
  padding: 56px 0;
  margin-top: auto;
}
.footer-grid {
  display: grid;
  grid-template-columns: 0.5fr 1fr 2fr;
  gap: 32px;
  align-items: start;
}
.footer-logo-small {
  width: 32px;
  height: auto;
  opacity: 0.3;
}
.footer-menu-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 8px;
}
.footer-menu-list a {
  color: #eaeaea;
  text-decoration: none;
  font-weight: 600;
  font-size: 14px;
}
.footer-menu-list a:hover {
  color: #ffffff;
  text-decoration: underline;
}
.footer-heading {
  font-family: "Dela Gothic One", "Manrope", sans-serif;
  font-weight: 700;
  color: #f5f5f5;
  margin-bottom: 8px;
  font-size: 14px;
}
.footer-address p,
.footer-copy p {
  color: #cfcfcf;
  line-height: 1.5;
  font-size: 14px;
}
.footer-copy p {
  color: #b0b0b0;
}
.footer-bottom {
  border-top: 1px solid #2a2a2a;
  margin-top: 24px;
  padding-top: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.footer-bottom-left {
  color: #b0b0b0;
  font-size: 14px;
}
.scroll-top {
  margin-left: auto;
  height: 36px;
  padding: 8px 12px;
  width: auto;
  min-width: 36px;
  border-radius: 18px;
  border: 1px solid #3a3a3a;
  background: #1c1c1e;
  color: #ededed;
  cursor: pointer;
  font-size: 14px;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.scroll-top:hover {
  background: #2a2a2a;
}

@media (max-width: 768px) {
  .footer {
    padding: 40px 0;
  }
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 20px;
    justify-items: center;
    text-align: center;
  }
  .footer-menu-list {
    justify-items: center;
  }
  .footer-bottom {
    justify-content: center;
    flex-direction: column;
    gap: 10px;
    text-align: center;
  }
  .scroll-top {
    display: none;
  }
}

/* Generic pages (about/contact/privacy/articles) */
.page {
  padding: 120px 0 60px;
}
.page h1 {
  font-family: "Dela Gothic One", "Manrope", sans-serif;
  font-size: 34px;
  line-height: 1.15;
  margin-bottom: 14px;
}
.page h2 {
  font-family: "Oswald", "Manrope", sans-serif;
  font-size: 22px;
  margin: 22px 0 10px;
}
.page p,
.page li {
  color: #333333;
}
.page a {
  color: #333333;
  font-weight: 600;
}
.page a:hover {
  color: #000000;
  text-decoration: underline;
}
.page a:visited {
  color: #333333;
}

/* Recommended Card */
.recommended-card {
  transition: transform 0.2s ease;
}
.recommended-card:hover {
  transform: scale(1.03);
  text-decoration: none !important;
}
.recommended-card img {
  transition: transform 0.4s ease;
}
.recommended-card:hover img {
  transform: scale(1.05);
}

/* Partner Card */
.partner-card {
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.partner-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.06) !important;
  background: #ffffff !important;
}

.card {
  border: 1px solid rgba(0, 0, 0, 0.12);
  background: rgba(255, 255, 255, 0.7);
  border-radius: 12px;
  padding: 18px;
}

.form {
  display: grid;
  gap: 12px;
  margin-top: 14px;
}
.form label {
  font-weight: 600;
  font-size: 13px;
}
.form input,
.form textarea {
  width: 100%;
  border: 1px solid #d0d0d0;
  border-radius: 10px;
  font-size: 14px;
  padding: 12px 14px;
  font-family: inherit;
}

/* Admin UI */
.admin-bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 2000; /* above site header */
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px 0;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.admin-bar-left,
.admin-bar-right {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.admin-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid rgba(0, 0, 0, 0.12);
  border-radius: 10px;
  padding: 10px 14px;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  background: #ffffff;
  color: #222222;
}
.page a.admin-btn,
.page a.admin-btn:visited {
  color: #222222;
  text-decoration: none;
}
.admin-btn:hover {
  background: rgba(0, 0, 0, 0.04);
  text-decoration: none;
}
.admin-btn--primary {
  background: #111111;
  border-color: #111111;
  color: #ffffff;
}
.page a.admin-btn--primary,
.page a.admin-btn--primary:visited {
  color: #ffffff;
}
.admin-btn--primary:hover {
  background: #000000;
}
.admin-btn--danger {
  background: #7a2222;
  border-color: #7a2222;
  color: #ffffff;
}
.page a.admin-btn--danger,
.page a.admin-btn--danger:visited {
  color: #ffffff;
}
.admin-btn--danger:hover {
  background: #611a1a;
}
.admin-btn--ghost {
  background: transparent;
}

/* Contact page layout (ported from OLD Next.js) */
.contact-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}
@media (min-width: 768px) {
  .contact-layout {
    grid-template-columns: 65fr 35fr;
    align-items: start;
    gap: 3rem;
  }
}
.contact-right {
  padding: 1rem 0;
  font-size: 1.1rem;
}

/* Cookie banner (ported from OLD) */
.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
  padding: 16px 0;
  z-index: 9999;
  border-top: 1px solid rgba(0, 0, 0, 0.12);
}
.cookie-banner-inner {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}
.cookie-banner-text {
  flex: 1;
  min-width: 280px;
}
.cookie-banner-text p {
  margin: 0;
  font-size: 14px;
  color: #333;
}
.cookie-banner-text a {
  text-decoration: underline;
}
.cookie-banner-btn {
  white-space: nowrap;
  padding: 8px 24px;
  font-size: 14px;
  font-weight: 700;
  border-radius: 10px;
  border: 1px solid rgba(0, 0, 0, 0.12);
  background: #111;
  color: #fff;
  cursor: pointer;
}
.cookie-banner-btn:hover {
  background: #000;
}

/* Editor dock (admin edit) */
.editor-dock {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2500;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-top: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.05);
}
.editor-dock .container {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: flex-start;
  padding: 10px 20px;
}
.editor-dock-spacer {
  height: 64px; /* keep page content above fixed dock */
}

/* Article List Card */
.article-list-card {
  display: flex;
  gap: 24px;
  align-items: flex-start;
}
.article-list-img {
  flex-shrink: 0;
  width: 220px;
}
.article-list-img img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  border-radius: 12px;
  display: block;
}
.article-list-content {
  flex: 1;
}

@media (max-width: 640px) {
  .article-list-card {
    flex-direction: column;
  }
  .article-list-img {
    width: 100%;
  }
  .article-list-img img {
    height: auto;
    aspect-ratio: 1 / 1;
  }
}

.admin-grid {
  display: grid;
  gap: 12px;
}
.admin-grid--2 {
  grid-template-columns: 1fr 1fr;
}
@media (max-width: 880px) {
  .admin-grid--2 {
    grid-template-columns: 1fr;
  }
}

.admin-field {
  display: grid;
  gap: 6px;
}
.admin-field label {
  font-weight: 700;
  font-size: 13px;
}
.admin-field input,
.admin-field textarea {
  width: 100%;
  border: 1px solid #d0d0d0;
  border-radius: 10px;
  font-size: 14px;
  padding: 12px 14px;
  font-family: inherit;
  background: #ffffff;
}
.admin-field textarea {
  min-height: 90px;
  resize: vertical;
}

.admin-list {
  display: grid;
  gap: 12px;
}
.admin-item {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
.admin-item-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}
.admin-item-title {
  font-weight: 800;
}
.form textarea {
  min-height: 140px;
  resize: vertical;
}
.form button {
  background: #333333;
  color: #ffffff;
  border: none;
  padding: 12px 18px;
  font-size: 14px;
  font-weight: 600;
  border-radius: 10px;
  cursor: pointer;
  width: fit-content;
}
.form button:hover {
  background: #000000;
}

.note {
  font-size: 12px;
  color: #666666;
}

/* Smooth scrolling and anchor offset */
html {
  scroll-behavior: smooth;
}
.main-content,
.section,
.footer {
  scroll-margin-top: 96px;
}
@media (max-width: 768px) {
  .main-content,
  .section,
  .footer {
    scroll-margin-top: 120px;
  }
  .content-wrapper {
    grid-template-columns: 1fr;
    gap: 0;
    text-align: center;
    margin-top: 8px;
  }
  .hero-right {
    align-items: center;
  }
  .main-content > .container.hero-empty {
    order: -1;
  }
  .hero-empty {
    flex: 0 0 auto;
    margin-bottom: 20px;
  }
  .main-content {
    justify-content: center;
  }
  .help-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .section {
    padding: 40px 0;
  }
  .section-title {
    font-size: 28px;
  }
}
