:root {
  --bg: #111111;
  --text: #f5f2ed;
  --text-muted: rgba(245, 242, 237, 0.82);
  --overlay: rgba(0, 0, 0, 0.28);
  --frame-ratio: 1 / 1;
  --frame-max: 720px;
  --frame-inset: 12%;
  --frame-inset-ratio: 0.12;
  --frame-size: min(84vw, var(--frame-max), calc(100vh - 160px));
  --overlay-scale: calc(1 - (var(--frame-inset-ratio) * 2));
  --overlay-size: calc(var(--frame-size) * var(--overlay-scale));
  --frame-radius: 10%;
  --card: rgba(10, 10, 10, 0.92);
  --border: rgba(245, 242, 237, 0.18);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background-image: url("public/background.gif");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  color: var(--text);
  font-family: "Source Sans 3", "Noto Sans", sans-serif;
  overflow: hidden;
}

.legal-page {
  justify-content: flex-start;
  overflow: auto;
}

.site-header {
  position: fixed;
  top: clamp(16px, 3vw, 28px);
  left: 50%;
  transform: translateX(-50%);
  font-size: clamp(16px, 2.6vw, 22px);
  letter-spacing: 0.4em;
  text-transform: uppercase;
  color: var(--text);
  font-weight: 600;
  z-index: 2;
  text-align: center;
  pointer-events: auto;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.35);
}

.site-header a {
  color: inherit;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 10px;
}

.frame-container {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: var(--frame-size);
  aspect-ratio: var(--frame-ratio);
  max-height: var(--frame-size);
}

.frame-image {
  width: 100%;
  height: auto;
  display: block;
  pointer-events: none;
  user-select: none;
}

.image-mask {
  position: absolute;
  inset: var(--frame-inset);
  overflow: hidden;
  border-radius: var(--frame-radius);
  display: flex;
}

.inner-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.text-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: clamp(28px, 5vw, 48px);
  text-align: center;
  background: var(--overlay);
  backdrop-filter: blur(2px);
  gap: clamp(6px, 1.8vw, 12px);
}

.text-overlay h1 {
  margin: 0;
  font-size: clamp(20px, 3.2vw, 32px);
  font-weight: 700;
  color: var(--text);
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.35);
}

.text-overlay p {
  margin: 0;
  font-size: clamp(13px, 2.1vw, 17px);
  line-height: 1.5;
  color: var(--text-muted);
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.3);
}

.text-overlay .cta {
  font-weight: 600;
  color: var(--text);
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.35);
}

.contact-button {
  margin-top: 8px;
  padding: 12px 30px;
  border-radius: 999px;
  background: var(--text);
  color: #14110c;
  font-size: clamp(14px, 2.2vw, 18px);
  font-weight: 700;
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  box-shadow: 0 16px 30px rgba(0, 0, 0, 0.32);
}

.contact-button:hover,
.contact-button:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 20px 36px rgba(0, 0, 0, 0.4);
}

.recent-link {
  margin-top: 10px;
  font-size: clamp(12px, 1.9vw, 14px);
  letter-spacing: 0.08em;
  color: var(--text);
  text-decoration: none;
  text-underline-offset: 4px;
  opacity: 0.85;
  transition: opacity 0.2s ease, transform 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.recent-link:hover,
.recent-link:focus-visible {
  opacity: 1;
  text-decoration: underline;
  transform: translateY(-1px);
}

.site-footer {
  display: flex;
  justify-content: space-between;
  width: var(--frame-size);
  padding: 24px 0 28px;
  font-size: 14px;
  color: var(--text-muted);
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.35);
}

.site-footer.impact-footer {
  flex-direction: column;
  align-items: stretch;
  gap: 18px;
}

.footer-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.impact {
  display: grid;
  gap: 12px;
}

.impact-title {
  margin: 0;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.32em;
  color: var(--text);
}

.impact-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 16px;
}

.impact-item {
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 14px;
  background: rgba(12, 12, 12, 0.7);
  box-shadow: 0 18px 38px rgba(0, 0, 0, 0.35);
}

.impact-meta {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 12px;
}

.impact-date {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--text-muted);
}

.impact-description {
  font-size: 15px;
  color: var(--text);
}

.impact-carousel {
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
}

.impact-track {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: clamp(200px, 38vw, 320px);
  gap: 12px;
  padding-bottom: 4px;
}

.impact-track img {
  width: 100%;
  height: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  scroll-snap-align: start;
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.35);
}

.footer-right {
  color: inherit;
}

.site-footer a.footer-right {
  text-decoration: none;
  text-underline-offset: 4px;
}

.site-footer a.footer-right:hover,
.site-footer a.footer-right:focus-visible {
  text-decoration: underline;
}

.modal {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
  z-index: 4;
}

.modal:target {
  opacity: 1;
  pointer-events: auto;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
}

.modal-card {
  position: relative;
  width: min(92vw, 520px);
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: clamp(20px, 4vw, 32px);
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.45);
  z-index: 1;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.modal-header h2 {
  margin: 0;
  font-size: clamp(20px, 3vw, 26px);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.modal-close {
  font-size: 28px;
  text-decoration: none;
  color: var(--text);
  line-height: 1;
}

.contact-form {
  display: grid;
  gap: 14px;
}

.contact-form label {
  display: grid;
  gap: 6px;
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  padding: 10px 12px;
  font-size: 15px;
  font-family: inherit;
}

.contact-form textarea {
  resize: vertical;
}

.contact-form button {
  margin-top: 6px;
  padding: 12px 18px;
  border-radius: 999px;
  border: none;
  background: var(--text);
  color: #14110c;
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  cursor: pointer;
}

@media (max-width: 640px) {
  :root {
    --frame-size: min(92vw, calc(100vh - 140px));
  }

  .frame-container {
    width: var(--frame-size);
  }

  .site-footer {
    width: var(--frame-size);
  }
}

@media (max-width: 420px) {
  :root {
    --frame-size: min(94vw, var(--frame-max), calc(100vh - 120px));
    --frame-inset: 8%;
    --frame-inset-ratio: 0.08;
  }

  .text-overlay {
    gap: 4px;
    padding: 14px;
  }

  .text-overlay h1 {
    font-size: 18px;
  }

  .text-overlay p {
    font-size: 11px;
    line-height: 1.3;
  }

  .text-overlay .cta {
    font-size: 11px;
  }

  .contact-button {
    padding: 9px 18px;
    font-size: 12px;
    letter-spacing: 0.12em;
  }

  .recent-link {
    font-size: 11px;
    margin-top: 6px;
  }
}

@media (max-height: 760px) {
  .text-overlay {
    padding: clamp(20px, 4vw, 32px);
  }

  .text-overlay h1 {
    font-size: clamp(18px, 3vw, 28px);
  }

  .text-overlay p {
    font-size: clamp(12px, 2vw, 16px);
    line-height: 1.4;
  }

  .contact-button {
    padding: 10px 24px;
    font-size: clamp(13px, 2vw, 16px);
    letter-spacing: 0.16em;
  }
}

@media (max-height: 720px) {
  .recent-page .carousel-viewport {
    min-height: 130px;
  }

  .recent-page .carousel-slide img {
    aspect-ratio: auto;
    height: 100%;
  }
}

@media (max-width: 360px), (max-height: 600px) {
  :root {
    --frame-size: min(96vw, var(--frame-max), calc(100vh - 110px));
    --frame-inset: 8%;
    --frame-inset-ratio: 0.08;
  }

  .site-header {
    letter-spacing: 0.28em;
    font-size: 14px;
  }

  .text-overlay {
    gap: 2px;
    padding: 12px;
  }

  .text-overlay h1 {
    font-size: 15px;
  }

  .text-overlay p {
    font-size: 10px;
    line-height: 1.2;
  }

  .text-overlay .cta {
    font-size: 10px;
  }

  .contact-button {
    margin-top: 4px;
    padding: 7px 14px;
    font-size: 10px;
    letter-spacing: 0.08em;
  }

  .recent-link {
    margin-top: 6px;
    font-size: 10px;
  }

  .recent-content {
    gap: 12px;
  }

  .recent-entry {
    gap: 12px;
  }

  .recent-meta h2 {
    font-size: 12px;
    letter-spacing: 0.1em;
  }

  .recent-page .carousel-viewport {
    min-height: 110px;
  }

  .recent-page .carousel-slide img {
    aspect-ratio: auto;
    height: 100%;
  }

  .recent-page .content {
    padding: 14px;
  }

  .site-footer {
    font-size: 11px;
    padding: 12px 0 16px;
  }
}

.bg {
  position: fixed;
  inset: 0;
  background-image: url("public/background.gif");
  background-size: cover;
  background-position: center;
  filter: blur(2px) saturate(0.85);
  transform: scale(1.02);
  z-index: -2;
}

.page {
  position: relative;
  min-height: 100vh;
  width: min(92vw, 960px);
  margin: 0 auto;
  padding: clamp(28px, 6vw, 48px) 0 clamp(44px, 10vw, 84px);
  z-index: 0;
}

.page .site-footer {
  width: 100%;
}

.site-title {
  margin: 0 0 12px;
  text-align: center;
  letter-spacing: 0.4em;
  text-transform: uppercase;
  font-size: clamp(16px, 2.6vw, 22px);
  color: var(--text);
  text-decoration: none;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.35);
}

.content {
  background: rgba(12, 12, 12, 0.82);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: clamp(22px, 5vw, 40px);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
  line-height: 1.6;
  margin-bottom: clamp(18px, 5vw, 32px);
}

.content h1 {
  margin-top: 0;
  text-transform: uppercase;
  letter-spacing: 0.18em;
}

.content p {
  color: var(--text-muted);
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.25);
}

.recent-content {
  display: flex;
  flex-direction: column;
  gap: 16px;
  height: 100%;
}

.recent-page {
  justify-content: center;
  overflow: hidden;
}

.recent-page .page {
  width: var(--frame-size);
  min-height: auto;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

.recent-page .content {
  width: var(--overlay-size);
  height: var(--overlay-size);
  margin-bottom: 0;
  padding: clamp(28px, 5vw, 48px);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.recent-entry {
  display: flex;
  flex-direction: column;
  gap: 16px;
  flex: 1;
  min-height: 0;
}

.recent-meta {
  display: grid;
  gap: 6px;
}

.recent-meta h2 {
  margin: 0;
  font-size: clamp(16px, 2.4vw, 20px);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text);
}

.recent-meta p {
  margin: 0;
  color: var(--text-muted);
}

.recent-carousel {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  flex: 1;
  min-height: 0;
}

.carousel-viewport {
  width: 100%;
  flex: 1;
  min-height: 160px;
  overflow: hidden;
  border-radius: 28px;
  background: rgba(0, 0, 0, 0.25);
  box-shadow: 0 24px 50px rgba(0, 0, 0, 0.4);
}

.carousel-track {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 100%;
  transition: transform 0.35s ease;
  height: 100%;
}

.carousel-slide {
  margin: 0;
  height: 100%;
}

.carousel-slide img {
  width: 100%;
  height: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  display: block;
}

.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(10, 10, 10, 0.7);
  color: var(--text);
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: transform 0.2s ease, background 0.2s ease;
}

.carousel-btn:hover,
.carousel-btn:focus-visible {
  transform: translateY(-50%) scale(1.04);
  background: rgba(10, 10, 10, 0.85);
}

.carousel-btn.prev {
  left: 12px;
}

.carousel-btn.next {
  right: 12px;
}

.carousel-dots {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.carousel-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  border: none;
  background: rgba(245, 242, 237, 0.35);
  cursor: pointer;
  padding: 0;
}

.carousel-dot.is-active {
  background: var(--text);
}

.content strong {
  color: var(--text);
}

.footer-link {
  color: var(--text);
  text-decoration: none;
}

@media (max-height: 520px) {
  :root {
    --frame-size: min(94vw, var(--frame-max), calc(100vh - 80px));
    --frame-inset: 8%;
    --frame-inset-ratio: 0.08;
  }

  .site-header {
    top: 10px;
    font-size: 14px;
    letter-spacing: 0.28em;
  }

  .text-overlay {
    padding: 14px;
    gap: 4px;
  }

  .text-overlay h1 {
    font-size: 16px;
  }

  .text-overlay p {
    font-size: 11px;
    line-height: 1.3;
  }

  .contact-button {
    padding: 8px 18px;
    font-size: 11px;
    letter-spacing: 0.12em;
  }

  .recent-link {
    font-size: 11px;
  }

  .site-footer {
    padding: 12px 0 16px;
    font-size: 11px;
  }

  .recent-page .content {
    padding: 16px;
  }

  .recent-meta h2 {
    font-size: 13px;
    letter-spacing: 0.12em;
  }

  .carousel-viewport {
    border-radius: 18px;
  }

  .carousel-btn {
    width: 36px;
    height: 36px;
    font-size: 20px;
  }
}

@media (max-width: 720px) {
  .page {
    width: min(92vw, 720px);
    padding: clamp(20px, 6vw, 36px) 0;
  }

  .content {
    border-radius: 18px;
    padding: clamp(18px, 5vw, 28px);
  }

  .content h1 {
    font-size: clamp(20px, 6vw, 28px);
    letter-spacing: 0.12em;
  }

  .site-footer {
    flex-direction: column;
    align-items: center;
    gap: 8px;
  }

  .site-footer.impact-footer {
    align-items: stretch;
    gap: 16px;
  }

  .footer-meta {
    flex-direction: column;
  }
}
