/* --- Font declarations --- */
@font-face {
  font-family: "Geist Mono";
  src: url("../assets/fonts/GeistMono-Regular.woff2") format("woff2");
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Geist Mono";
  src: url("../assets/fonts/GeistMono-Italic.woff2") format("woff2");
  font-weight: normal;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "Instrument Serif";
  src: url("../assets/fonts/InstrumentSerif-Regular.woff2") format("woff2");
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

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

.d-none {
  opacity: 0 !important;
  pointer-events: none;
  transition: all 0.5s ease-in;
}

.soldier-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 1000;
  background-color: rgba(0, 0, 0, 0.5);
  display: flex;
  justify-content: center;
  align-items: center;
  transition: all 0.3s ease;
}

.inner-soldier-container {
  max-width: 20%;
  max-height: 20%;
  display: flex;
  justify-content: center;
  align-items: center;
}

.inner-soldier-container img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: 8px;
}

html,
body {
  min-height: 100vh;
  background-color: #e9e3dc;
  color: #000;
  font-family: "Geist Mono", monospace;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.image-fluid {
  width: 100%;
  height: auto;
}

a {
  color: #000;
  text-decoration: none;
  transition: opacity 0.2s ease;
}

a:hover {
  opacity: 0.6;
}

.underline {
  text-decoration: underline;
  text-decoration-color: rgba(0, 0, 0, 0.5);
  text-decoration-thickness: 1px;
  text-underline-offset: 2.5px;
  transition: all 0.2s ease;
}

.underline:hover {
  text-decoration-color: rgba(0, 0, 0, 0.4);
}

/* --- Layout --- */
body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

header {
  padding: 2rem 2rem 1rem;
  text-align: center;
}

nav {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 2rem;
  flex-wrap: wrap;
  position: relative;
}

.back-arrow {
  position: absolute;
  left: 0;
  font-size: 1.5rem;
  text-decoration: none;
  transition: opacity 0.2s ease;
}

.back-arrow:hover {
  opacity: 0.6;
}

.language-switch {
  display: flex;
  align-items: center;
  justify-content: center;
}

nav a {
  font-size: 0.875rem;
  letter-spacing: 0.02em;
  position: relative;
}

nav a.active::after {
  content: "";
  position: absolute;
  bottom: -4px;
  left: 0;
  right: 0;
  height: 1px;
  background: #000;
}

main {
  flex: 1;
  max-width: 680px;
  margin: 0 auto;
  padding: 1.5rem 2rem;
  width: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

h1 {
  font-family: "Instrument Serif", serif;
  font-size: 1.75rem;
  font-weight: 500;
  line-height: 1.5;
  margin-bottom: 1.25rem;
  letter-spacing: -0.02em;
}

h2 {
  font-family: "Instrument Serif", serif;
  font-size: 1.25rem;
  font-weight: 600;
  line-height: 1.3;
  margin: 2rem 0 1.5rem;
  letter-spacing: -0.01em;
}

p,
li {
  font-size: 0.85rem;
  line-height: 1.6;
  margin-bottom: 1.5rem;
  color: rgba(0, 0, 0, 0.9);
}

code {
  font-family: "Geist Mono", monospace;
  font-size: 0.9em;
}

.newsletter {
  margin-top: auto;
  padding: 1.5rem;
  border: 1px solid rgba(0, 0, 0, 0.15);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.03);
}

.newsletter h2 {
  font-size: 1.5rem;
  margin: 0 0 1rem 0;
}

.newsletter p {
  margin-bottom: 1rem;
  font-size: 0.9rem;
  color: rgba(0, 0, 0, 0.75);
  line-height: 1.5;
}

.newsletter-form {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.newsletter-form input[type="email"] {
  flex: 1;
  min-width: 250px;
  padding: 0.75rem 1rem;
  background: rgba(255, 255, 255, 0.5);
  border: 1px solid rgba(0, 0, 0, 0.2);
  border-radius: 6px;
  color: #000;
  font-family: "Geist Mono", monospace;
  font-size: 0.875rem;
  transition: all 0.2s ease;
}

.newsletter-form input[type="email"]:focus {
  outline: none;
  border-color: rgba(0, 0, 0, 0.4);
  background: rgba(255, 255, 255, 0.8);
}

.newsletter-form input[type="email"]::placeholder {
  color: rgba(0, 0, 0, 0.4);
}

.newsletter-form button {
  padding: 0.75rem 2rem;
  background: #000;
  color: #e9e3dc;
  border: none;
  border-radius: 6px;
  font-family: "Geist Mono", monospace;
  font-size: 0.875rem;
  cursor: pointer;
  transition: all 0.2s ease;
  font-weight: 500;
}

.newsletter-form button:hover {
  background: rgba(0, 0, 0, 0.85);
  transform: translateY(-1px);
}

.newsletter-form button:active {
  transform: translateY(0);
}

.intro {
  font-size: 1rem;
  line-height: 1.6;
  margin-bottom: 1.5rem;
  color: rgba(0, 0, 0, 0.85);
}

.thoughts-list {
  margin-top: 2rem;
}

.thought-item {
  margin-bottom: 1.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
  display: flex;
  align-items: baseline;
  gap: 1rem;
}

.thought-item:last-child {
  border-bottom: none;
}

.thought-item a {
  font-family: "Instrument Serif", serif;
  font-size: 1.25rem;
  color: #000;
  text-decoration: underline;
  text-decoration-color: rgba(0, 0, 0, 0.5);
  text-decoration-thickness: 1px;
  text-underline-offset: 2.5px;
  transition: all 0.2s ease;
}

.thought-item a:hover {
  text-decoration-color: rgba(0, 0, 0, 0.4);
}

.thought-item time {
  font-size: 0.85rem;
  color: rgba(0, 0, 0, 0.5);
  font-family: "Geist Mono", monospace;
  white-space: nowrap;
  flex-shrink: 0;
}

/* Article page styles */
main.article {
  overflow-y: auto;
  max-height: none;
}

main.article article {
  margin-bottom: 2rem;
}

main.article h1 {
  margin-bottom: 0.5rem;
}

main.article time {
  display: block;
  font-size: 0.85rem;
  color: rgba(0, 0, 0, 0.5);
  font-family: "Geist Mono", monospace;
  margin-bottom: 2rem;
}

.article-content {
  margin-top: 2rem;
}

.article-content p {
  margin-bottom: 1.5rem;
}

.back-link {
  display: inline-block;
  margin-top: 2rem;
  font-family: "Geist Mono", monospace;
  font-size: 0.9rem;
  color: rgba(0, 0, 0, 0.6);
  text-decoration: none;
  transition: opacity 0.2s ease;
}

.back-link:hover {
  opacity: 0.5;
}

footer {
  text-align: center;
  padding: 1.5rem 2rem;
  border-top: 1px solid rgba(0, 0, 0, 0.1);
  font-size: 0.8rem;
  color: rgba(0, 0, 0, 0.5);
}

/* Toast notification */
.toast {
  position: fixed;
  top: 2rem;
  right: 2rem;
  background: rgba(0, 0, 0, 0.9);
  color: #e9e3dc;
  padding: 1rem 1.5rem;
  border-radius: 8px;
  font-family: "Geist Mono", monospace;
  font-size: 0.875rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  transform: translateX(400px);
  opacity: 0;
  transition: all 0.3s ease;
  z-index: 1000;
  max-width: 301px;
}

.toast.show {
  transform: translateX(0);
  opacity: 1;
}

.toast.toast-error {
  background: rgba(200, 50, 50, 0.95);
  color: #fff;
}

.newsletter-form button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.newsletter-form input:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* Language switcher styles */
.language-switch {
  display: flex;
  gap: 1rem;
  justify-content: center;
}
.language-switch a img {
  width: 24px;
  height: auto;
  transition: opacity 0.2s ease;
}
.language-switch a:hover img {
  opacity: 0.6;
}

/* --- Responsive tweaks --- */
@media (max-width: 768px) {
  header {
    padding: 2rem 1.5rem 1.5rem;
  }

  nav {
    gap: 1.5rem;
  }

  nav a {
    font-size: 0.8rem;
  }

  main {
    padding: 1.5rem 1.5rem 3rem;
  }

  h1 {
    font-size: 2.25rem;
    margin-bottom: 2rem;
  }

  h2 {
    font-size: 1.5rem;
    font-weight: 600;
  }

  p {
    font-size: 0.95rem;
  }

  .intro {
    font-size: 1rem;
  }

  .newsletter {
    padding: 1.5rem;
  }

  .newsletter-form {
    flex-direction: column;
  }

  .newsletter-form input[type="email"],
  .newsletter-form button {
    width: 100%;
  }

  .thought-item a {
    font-size: 1.1rem;
  }

  .thought-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }

  .thought-item time {
    font-size: 0.8rem;
  }

  .back-arrow {
    font-size: 1.25rem;
  }

  .back-link {
    font-size: 0.85rem;
  }
}

@media (max-width: 480px) {
  nav {
    gap: 1rem;
    padding: 0 1rem;
  }

  nav a {
    font-size: 0.75rem;
  }

  h1 {
    font-size: 1.5rem;
  }

  h2 {
    font-size: 1.25rem;
    font-weight: 600;
  }

  .thought-item a {
    font-size: 1rem;
  }

  .thought-item time {
    font-size: 0.75rem;
  }

  .back-arrow {
    font-size: 1rem;
    left: 1rem;
  }

  .language-switch {
    font-size: 0.8rem;
  }

  .back-link {
    font-size: 0.8rem;
  }
}

/* --- Story page styles --- */
.story-page {
  max-width: 720px;
}

.story-page h1 {
  font-size: 2.5rem;
  margin-bottom: 1.5rem;
}

.story-hero {
  font-family: "Instrument Serif", serif;
  font-size: 1.15rem;
  line-height: 1.7;
  color: rgba(0, 0, 0, 0.85);
  margin-bottom: 0.75rem;
}

.story-hero-sub {
  font-size: 0.95rem;
  color: rgba(0, 0, 0, 0.5);
  font-style: italic;
  margin-bottom: 3rem;
}

.story-subtitle {
  font-size: 1rem;
  color: rgba(0, 0, 0, 0.6);
  font-style: italic;
  margin-bottom: 2rem;
}

.story-quote {
  font-family: "Instrument Serif", serif;
  font-size: 1.15rem;
  font-style: italic;
  color: rgba(0, 0, 0, 0.7);
  border-left: 3px solid rgba(0, 0, 0, 0.3);
  padding-left: 1.5rem;
  margin: 2rem 0;
  line-height: 1.6;
}

.story-highlight {
  background: rgba(0, 0, 0, 0.04);
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 8px;
  padding: 1.5rem;
  margin: 2rem 0;
}

.story-highlight p {
  margin-bottom: 1rem;
}

.story-highlight p:last-child {
  margin-bottom: 0;
}

.story-timeline {
  margin: 2rem 0;
  border-left: 2px solid rgba(0, 0, 0, 0.15);
  padding-left: 1.5rem;
}

.timeline-entry {
  margin-bottom: 2rem;
  position: relative;
}

.timeline-entry::before {
  content: "";
  position: absolute;
  left: -1.75rem;
  top: 0.5rem;
  width: 10px;
  height: 10px;
  background: #e9e3dc;
  border: 2px solid rgba(0, 0, 0, 0.4);
  border-radius: 50%;
}

.timeline-entry:last-child {
  margin-bottom: 0;
}

.timeline-date {
  font-size: 0.75rem;
  letter-spacing: 0.05em;
  color: rgba(0, 0, 0, 0.5);
  text-transform: uppercase;
  display: block;
  margin-bottom: 0.25rem;
}

.timeline-entry h3 {
  font-family: "Instrument Serif", serif;
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.timeline-entry p {
  font-size: 0.85rem;
  margin-bottom: 0.75rem;
}

.timeline-tag {
  display: inline-block;
  font-size: 0.75rem;
  background: rgba(0, 0, 0, 0.08);
  padding: 0.25rem 0.75rem;
  border-radius: 4px;
  color: rgba(0, 0, 0, 0.7);
}

.story-box {
  border-radius: 8px;
  padding: 1.5rem;
  margin: 1.5rem 0;
}

.story-box p {
  margin-bottom: 1rem;
}

.story-box p:last-child {
  margin-bottom: 0;
}

.story-box-label {
  display: block;
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 0.75rem;
  font-weight: 600;
}

.story-box--error {
  background: rgba(200, 80, 80, 0.08);
  border: 1px solid rgba(200, 80, 80, 0.2);
}

.story-box--error .story-box-label {
  color: rgba(180, 60, 60, 0.9);
}

.story-box--lesson {
  background: rgba(80, 160, 100, 0.08);
  border: 1px solid rgba(80, 160, 100, 0.2);
}

.story-box--lesson .story-box-label {
  color: rgba(60, 130, 80, 0.9);
}

.story-principles {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.25rem;
  margin: 2rem 0;
}

.principle-card {
  padding: 1.25rem;
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 8px;
  transition: all 0.2s ease;
}

.principle-card:hover {
  border-color: rgba(0, 0, 0, 0.25);
  transform: translateY(-2px);
}

.principle-number {
  font-family: "Instrument Serif", serif;
  font-size: 1.75rem;
  font-weight: 600;
  color: rgba(0, 0, 0, 0.15);
  line-height: 1;
  margin-bottom: 0.5rem;
}

.principle-card h3 {
  font-family: "Instrument Serif", serif;
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.principle-card p {
  font-size: 0.8rem;
  color: rgba(0, 0, 0, 0.7);
  margin-bottom: 0;
}

.story-closing {
  text-align: center;
  margin: 3rem 0 2rem;
  padding: 2rem 0;
  border-top: 1px solid rgba(0, 0, 0, 0.1);
}

.closing-statement {
  font-family: "Instrument Serif", serif;
  font-size: 1.25rem;
  line-height: 1.6;
  margin-bottom: 1.5rem;
}

.closing-quote {
  font-style: italic;
  color: rgba(0, 0, 0, 0.6);
  font-size: 0.9rem;
}

.story-links {
  display: flex;
  justify-content: center;
  gap: 2rem;
  margin-top: 2rem;
  padding-bottom: 2rem;
}

.story-links a {
  font-size: 0.85rem;
  color: rgba(0, 0, 0, 0.6);
  transition: color 0.2s ease;
}

.story-links a:hover {
  color: rgba(0, 0, 0, 0.9);
}

@media (max-width: 768px) {
  .story-principles {
    grid-template-columns: 1fr;
  }

  .story-links {
    gap: 1.5rem;
  }
}

.image-container {
  text-align: center;
  margin-bottom: 20px;
  margin-top: 50px;
}

.image-container img {
  width: 75%;
}

/* Language selection page styles */
.language-selection {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
}

.language-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 2rem;
  border: 1px solid rgba(0, 0, 0, 0.15);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.3);
  text-decoration: none;
  color: #000;
  transition: all 0.3s ease;
}

.language-card:hover {
  background: rgba(255, 255, 255, 0.5);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.language-card img {
  width: 48px;
  height: 32px;
  margin-bottom: 1rem;
  border-radius: 4px;
}

.language-card h2 {
  font-family: "Instrument Serif", serif;
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
  text-align: center;
}

.language-card p {
  font-size: 0.9rem;
  color: rgba(0, 0, 0, 0.7);
  text-align: center;
  margin-bottom: 0;
}

.language-option {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  border-radius: 6px;
  transition: background-color 0.2s ease;
}

.language-option:hover {
  background: rgba(0, 0, 0, 0.05);
}

.language-option img {
  width: 20px;
  height: 14px;
}

.language-option span {
  font-size: 0.875rem;
}
