/*--- Foundation ---*/

@font-face {
  font-family: 'Cabin';
  src: url('assets/fonts/Cabin-Regular.woff2') format('woff2');
  font-weight: normal;
  font-style: normal;
}

@font-face {
  font-family: 'Cabin';
  src: url('assets/fonts/Cabin-Italic.woff2') format('woff2');
  font-weight: normal;
  font-style: italic;
}

* {
  box-sizing: border-box;
}



html, body {
  width: 100%;
}

html{
  scroll-behavior: smooth;
  scroll-padding-top: 5rem;
}

main {
  min-height: calc(100vh - 100px); /* Adjust based on your footer height */
}

:root {
  --box-shadow: 0 0 6px 1px rgba(44, 44, 44, 0.3);
  --scale: 1.02;
  --background-color: #FAF7F4;
  --text-color: #1A1418;
  --accent-color: #A84060;
  --hover-background: #F0E4E8;
}

body {
  margin: 0;
  font-family: 'Source Serif 4', serif;
  font-size: 1.2rem;
  line-height: 1.75;
  background-color: var(--background-color);
  color: var(--text-color);
  transition: background-color 0.3s ease, color 0.3s ease;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

h1, h2, h3 {
  font-family: 'Raleway', sans-serif;
  font-weight: 300;
  letter-spacing: 0.04em;
  margin-bottom: 1.25rem;
}

.gallery-intro {
  font-size: clamp(0.95rem, 2vw, 1.1rem);
  line-height: 1.75;
  max-width: 600px;
  margin: 0 0 2rem;
  opacity: 0.8;
}

.page-label {
  font-family: 'Raleway', sans-serif;
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent-color);
  margin: 0.6rem 0 0.5rem;
  display: block;
  opacity: 0.7;
  font-weight: 300;
}





/*--- Header and Footer ---*/

header, footer {
  width: 100%;
  max-width: none;
  padding: 0.5rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background-color: var(--background-color);
  font-size: 1rem;
  transition: background-color 0.3s ease, color 0.3s ease;
}

header {
  top: 0;
  z-index: 100;
  color: var(--accent-color);
  position: relative;
}

.sitetitle {
  font-size: 1.25rem;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 1.4em;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.8em;
}

/* Hamburger button — hidden on desktop */
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.3rem;
  color: var(--accent-color);
}

.ham-line {
  display: block;
  width: 20px;
  height: 1.5px;
  background: currentColor;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.hamburger.open .ham-line:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.hamburger.open .ham-line:nth-child(2) { opacity: 0; }
.hamburger.open .ham-line:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

footer {
  padding: 1.2rem 2rem;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
}

footer p {
  margin: 0;
}

nav {
  width: auto;
  display: flex;
  flex-direction: row;
  gap: 1.4em;
  justify-content: flex-end;
  align-items: center;
  font-size: 1.15rem;
}

.icon-group {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  gap: .8em;
  justify-content: space-between;
  align-items: center;
}

/*-----  Main  -----*/

main {
  padding: 0 2rem;
  overflow: visible;
  flex: 1;
}

html.gallery-page main {
  padding: 0 0.75rem;
}

html.full-bleed-page main {
  padding: 0;
  max-width: 100%;
  min-height: auto;
}

main h1,
main h2 {
  font-size: 1.4rem;
  margin: 1.5rem 0 1rem 0;
}

.gallery-selector {
  position: relative;
  /*overflow: hidden;*/
  width: auto;
  height: auto;
}

.gallery-selector img {
  border-radius: 8px;
  object-fit: cover;
  aspect-ratio: 1/1;
  overflow: hidden;
}

.gallery-selector:hover img{
  transform: scale(var(--scale));
  box-shadow: var(--drop-shadow);
  transition: transform .15s ease-in, box-shadow .15s ease-in;
}

.gallery-selector h2 {
  font-size: 1.1rem;
  margin: 1vh 0vh 1vh 0vh;
  text-align: left;
  color: var(--accent-color);
  display: inline-block;
  white-space: nowrap;
}

/*----- Gallery Pages  -----*/

.gallery{
  columns:2 250px;
  column-gap: 15px;
  overflow: visible;
}

.gallery img{
  border-radius: 5px;
  width: 100%;
  height: auto;
  cursor: pointer;
}

.gallery img:focus,
.gallery .lightbox-trigger:focus {
  outline: 3px solid var(--accent-color);
  outline-offset: -3px;
  border-radius: 5px;
  display: block;
  position: relative;
  z-index: 1;
}

/* Ensure touch events work on mobile */
@media (hover: none) and (pointer: coarse) {
  .gallery img:focus,
  .gallery .lightbox-trigger:focus {
    outline: none;
  }
  
  .gallery img:focus-visible,
  .gallery .lightbox-trigger:focus-visible {
    outline: 3px solid var(--accent-color);
    outline-offset: -3px;
    border-radius: 5px;
  }
}

.image-container {
  position: relative;
  cursor: pointer;
  padding-bottom: 20px;
  margin-top: 0;
  break-inside: avoid;
}

.gallery .lightbox-trigger {
  display: block;
  width: 100%;
  height: 100%;
  overflow: hidden;
  position: relative;
}

/* Remove the blocking pseudo-element */
/* .image-container::after {
  content: "";
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: transparent;
  z-index: 2;
} */

#lightbox {
  position: fixed;
  z-index: 1000;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: #000000aa;
  display: none;
}

#lightbox.active {
  display: flex;
  justify-content: center;
  align-items: center;
}

#lightbox img {
  max-width: 90%;
  max-height: 80%;
}

/* Update focus styles to not interfere with clicks */
.gallery img:focus-visible,
.gallery .lightbox-trigger:focus-visible {
  outline: 3px solid var(--accent-color);
  outline-offset: -3px;
  border-radius: 5px;
  display: block;
  position: relative;
  z-index: 1;
}

/* Remove the mobile-specific focus styles that might interfere with clicks */
@media (hover: none) and (pointer: coarse) {
  .gallery img:focus,
  .gallery .lightbox-trigger:focus {
    outline: none;
  }
}

/*----- Hire Page -----*/

.hire-hero {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin: 2rem 0;
}

.carousel-column {
  position: relative;
  overflow: hidden;
  border-radius: 8px;
  aspect-ratio: 2/3;
  background-color: var(--hover-background);
}

.carousel-column img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.8s ease-in-out;
}

.carousel-column img.active {
  opacity: 1;
}

.hire-values {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  margin: 3rem 0;
  text-align: center;
}

.hire-value {
  border: 1px solid rgba(128, 128, 128, 0.3);
  border-radius: 12px;
  padding: 1.5rem 1rem;
}

.hire-value h3 {
  color: var(--accent-color);
  font-size: 1.2rem;
  margin-bottom: 0.5rem;
}

.testimonials {
  margin: 4rem 0;
}

.testimonial {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  margin-bottom: 5rem;
  padding-bottom: 3rem;
  position: relative;
}

.testimonial::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 1px;
  background-color: var(--text-color);
  opacity: 0.15;
}

.testimonial:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.testimonial-text blockquote {
  font-style: italic;
  font-size: 1.1rem;
  line-height: 1.8;
  margin-bottom: 1rem;
  padding-left: 0;
}

.testimonial-text cite {
  font-style: normal;
  font-weight: bold;
  color: var(--accent-color);
  font-size: 0.95rem;
}

.testimonial-images {
  position: relative;
  height: 400px;
  overflow: hidden;
  border-radius: 8px;
}

.testimonial-carousel {
  display: flex;
  position: absolute;
  left: 0;
  height: 100%;
  animation: scroll-testimonial 20s linear infinite;
}

.testimonial-carousel img {
  height: 100%;
  width: auto;
  object-fit: cover;
  margin-right: 2rem;
  border-radius: 8px;
  box-shadow: var(--box-shadow);
}

@keyframes scroll-testimonial {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-50%);
  }
}

.hire-form {
  margin: 0;
  max-width: 640px;
}

.hire-form h2 {
  color: var(--accent-color);
  margin-bottom: 2rem;
}

.form-group {
  margin-bottom: 2rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.3rem;
  color: var(--text-color);
  font-size: 1rem;
}

.hire-form hr {
  border: none;
  border-top: 1px solid var(--text-color);
  margin: 2rem 0;
  opacity: 0.15;
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 0.75rem 0;
  border: none;
  border-bottom: 1px solid var(--text-color);
  background-color: transparent;
  color: var(--text-color);
  font-size: 1rem;
  transition: border-color 0.3s ease;
}

.form-group textarea {
  min-height: 120px;
  resize: vertical;
  border: 1px solid var(--text-color);
  padding: 0.75rem;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  outline: 2px solid var(--accent-color);
  outline-offset: 2px;
  border-color: var(--accent-color);
}

.form-group select {
  cursor: pointer;
}

.submit-btn {
  background-color: transparent;
  color: var(--accent-color);
  padding: 0.75rem 2rem;
  border: 2px solid var(--accent-color);
  font-size: 1rem;
  font-family: 'Raleway', sans-serif;
  cursor: pointer;
  transition: background-color 0.3s ease, color 0.3s ease;
  margin-top: 1rem;
}

.submit-btn:hover {
  background-color: var(--accent-color);
  color: var(--background-color);
}

.submit-btn:focus {
  outline: 2px solid var(--accent-color);
  outline-offset: 3px;
}

.portfolio-section {
  margin-top: 4rem;
}

.portfolio-section h2 {
  font-size: 1.8rem;
  color: var(--accent-color);
  margin-bottom: 2rem;
  text-align: center;
}

/*----- Contact Page -----*/

.contact-hero {
  margin: 3rem 0;
}

.contact-info {
  margin: 3rem 0;
}

.contact-info a {
  color: var(--accent-color);
  text-decoration: underline;
  font-weight: bold;
}

.social-links {
  display: flex;
  gap: 2rem;
  justify-content: center;
  margin: 2rem 0;
}

.social-links a {
  color: var(--accent-color);
  text-decoration: none;
  font-size: 1.1rem;
  transition: transform 0.2s ease;
  display: inline-block;
}

.social-links a:hover {
  transform: scale(1.1);
}

/*----- About Page -----*/

section {
  margin-bottom: 2rem;
}

p {
  padding-bottom: 0.4rem;
  font-size: 1rem;
  line-height: 1.7rem;
}

.about-page section + section {
  border-top: 1px solid currentColor;
  padding-top: 2rem;
  margin-top: 1rem;
}

.about-page #photo-credits,
.about-page #bonus-collection {
  border-top: none;
  padding-top: 0;
  margin-top: 0;
}

.about-page #newsletter {
  border-top: none;
  padding-top: 0;
  margin-top: 0;
}

.exhibitions-list {
  margin: 0;
  padding: 0;
  max-width: 680px;
}

.exhibition-entry {
  display: grid;
  grid-template-columns: 10rem 1fr;
  gap: 0.25rem 1.5rem;
  padding: 1rem 0;
  border-bottom: 1px solid rgba(128, 128, 128, 0.25);
}

.exhibition-entry:first-child {
  padding-top: 0;
}

.exhibitions-list dt {
  font-family: 'Raleway', sans-serif;
  font-size: 0.8rem;
  letter-spacing: 0.07em;
  opacity: 0.6;
  padding-top: 0.2rem;
  padding-bottom: 0;
}

.exhibitions-list dd {
  margin: 0;
  padding-bottom: 0;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.exhibition-title {
  font-size: 1rem;
}

.exhibition-detail {
  font-size: 0.875rem;
  opacity: 0.6;
}

.about-page a {
  color: var(--accent-color);
  font-weight: 400;
  text-decoration: underline;
}

.small-text {
  font-size: .85rem;
}

.footer-links {
  display: flex;
  gap: 1.5rem;
  opacity: 0.5;
  font-family: 'Raleway', sans-serif;
}

.footer-links a {
  color: inherit;
  text-decoration: none;
}

.footer-links a:hover {
  opacity: 0.8;
}

.footer-social {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
}

.footer-social-link {
  display: flex;
  align-items: center;
  color: inherit;
  opacity: 0.5;
  text-decoration: none;
  transition: opacity 0.2s ease;
}
.footer-social-link:hover { opacity: 0.9; }

.footer-links {
  justify-self: end;
}

ul {
  padding-left: 2rem;
  font-size: 1rem;
}

ul li{
  list-style: circle;
}

/* Two-column layout */
.about-content-wrapper {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 1rem;
  align-items: start;
}

/* Text content styles */
.about-text-content {
  grid-column: 1;
}

.polaroid-stack-col{
  grid-column: 2;
}

/* Image content styles */
.about-image-content {
  display: flex;  /* Add flex container */
  justify-content: center;  /* Center horizontally */
  align-items: center;  /* Center vertically */
}

.about-image-content img {
  padding: 1rem 1rem 3rem 1rem;
  background: white;
  box-shadow: 0 8px 16px rgba(0,0,0,0.12);
  max-height: 335px;
}

/* Special styling for about-me section */
#about-me .about-text-content {
  display: flex;
  flex-direction: column;
  height: 100%;
}

#about-me .about-text-content .small-text {
  margin-top: auto;
}

#about-me .about-image-content {
  position: relative;
  min-height: 400px;
  perspective: 1000px;
  width: 100%;
  overflow:visible;  /* Add overflow hidden */
}

#about-me .about-image-content img {
  object-fit: cover;
  max-height: 300px;
  position: absolute;
  width: auto;
  min-width: 50%;
  max-width: 70%;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  transform-origin: center;
  cursor: pointer;
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1), 
              box-shadow 0.4s cubic-bezier(0.4, 0, 0.2, 1),
              filter 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  will-change: transform;
}

#about-me .about-image-content img.top {
  transform: translate(-50%, -50%) rotate(0deg);
  box-shadow: 0 12px 24px rgba(0,0,0,0.15);
  z-index: 7;
  filter: none !important;
}

#about-me .about-image-content img.upper-middle {
  transform: translate(-50%, -50%) rotate(3deg);
  z-index: 6;
}

#about-me .about-image-content img.middle {
  transform: translate(-50%, -50%) rotate(-7deg);
  z-index: 5;
}

#about-me .about-image-content img.lower-middle {
  transform: translate(-50%, -50%) rotate(5deg);
  z-index: 4;
}

#about-me .about-image-content img.bottom {
  transform: translate(-50%, -50%) rotate(-2deg);
  z-index: 3;
}

#about-me .about-image-content img.back {
  transform: translate(-50%, -50%) rotate(7deg);
  z-index: 2;
}

#about-me .about-image-content img.moving-right {
  transform: translate(85%, -50%) rotate(7deg);
  box-shadow: 0 16px 32px rgba(0,0,0,0.18);
  z-index: 10;
  filter: none;
}

#about-me .about-image-content img.moving-back {
  transform: translate(-50%, -50%) rotate(7deg);
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  z-index: 1;
  filter: brightness(0.95) contrast(1.05);
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1), 
              box-shadow 0.4s cubic-bezier(0.4, 0, 0.2, 1),
              filter 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

#about-me .about-image-content img:hover {
  box-shadow: 0 16px 32px rgba(0,0,0,0.18);
}

/* Polaroid Stack*/

.top-image-button {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  min-width: 44px;
  min-height: 44px;
  cursor: pointer;
  display: inline-block;
  z-index: 10;
}

.top-image-button:focus {
  outline: 3px solid var(--accent-color);
  outline-offset: 3px;
}

.top-image-button img {
  display: block;
  width: auto;
  max-width: 70%;
  max-height: 300px;
  border-radius: 4px;
}


/* Bonus collection gallery */
.about-image-gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

.about-image-gallery img {
  width: 100%;
  height: auto;
  display: block;
}

/* Photo credits section */
.about-photo-credits {
  grid-column: 1 / -1;
  margin-top: 2rem;
  font-size: 0.9em;
}


/*----- Responseive Styles -----*/

@media (max-width: 768px) {
  .about-content-wrapper {
      grid-template-columns: 1fr;
  }

  .about-text-content, .polaroid-stack-col {
      grid-column: 1;
  }

  .about-image-gallery {
      grid-template-columns: 1fr;
  }

  #about-me
 .about-image-content {
      min-height: 450px;
      margin-bottom: 1rem;
  }

  #about-me
 .about-image-content img {
      max-height: 350px;
      min-width: 60%;
      max-width: 80%;
  }

  .hire-hero {
    grid-template-columns: 1fr;
  }

  .hire-hero #carousel-2,
  .hire-hero #carousel-3 {
    display: none;
  }

  .hire-values {
    grid-template-columns: 1fr;
  }

  .testimonial-images {
    height: 300px;
  }
}

/* iPad / Tablet breakpoint - show 2 columns */
@media (max-width: 1024px) and (min-width: 769px) {
  .hire-hero {
    grid-template-columns: repeat(2, 1fr);
  }

  .hire-hero #carousel-3 {
    display: none;
  }
} 


@media (max-width: 639px) {
  header {
    align-items: center;
    padding-left: 1rem;
    padding-right: 1rem;
  }

  /* Show hamburger on mobile */
  .hamburger {
    display: flex;
  }

  /* Nav collapses; shown as dropdown when open */
  nav.navigation {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: flex-end;
    gap: 1rem;
    padding: 1.2rem 1rem 1.5rem;
    background: var(--background-color);
    border-bottom: 1px solid color-mix(in srgb, var(--text-color) 10%, transparent);
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    z-index: 99;
  }

  nav.navigation.open {
    display: flex;
  }

  /* Gallery: single column on mobile */
  .gallery {
    columns: 1;
  }

  /* Reduce border radius on small screens */
  .hire-value { border-radius: 4px; }
  .carousel-column { border-radius: 4px; }
  .gallery-selector img { border-radius: 4px; }

  /* Trip previews: stack full width */
  .trip-previews {
    grid-template-columns: 1fr;
  }

  main {
    padding: 0 1rem;
  }

}


/* Global focus styles */
:focus-visible {
  outline: 3px solid var(--accent-color);
  outline-offset: 2px;
}

/* Instagram specific focus styles */
.insta a:focus-visible {
  outline: 3px solid var(--accent-color);
  outline-offset: 2px;
  display: block;
}

.insta a:focus-visible svg {
  outline: none;
}

.top-image-button {
  pointer-events: none;
}

.top-image-button img {
  pointer-events: auto;
}


/*----- Travel Section -----*/

/* Travel index: list of trips */
.trip-list {
  display: flex;
  flex-direction: column;
  margin-top: 1rem;
}

.trip-card {
  padding: 1.5rem 0;
  position: relative;
}

.trip-card::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 1px;
  background-color: var(--text-color);
  opacity: 0.15;
}

.trip-card:last-child::after {
  display: none;
}

.trip-card a {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  text-decoration: none;
  color: inherit;
}

.trip-card:hover .trip-header h2 {
  color: var(--accent-color);
}

.trip-header {
  display: flex;
  align-items: baseline;
  gap: 1rem;
  flex-wrap: wrap;
}

.trip-header h2 {
  font-size: 1.3rem;
  margin: 0;
  color: var(--text-color);
  transition: color 0.15s ease;
  white-space: nowrap;
}

.trip-dates {
  font-size: 0.9rem;
  color: var(--text-color);
  opacity: 0.6;
}

.trip-previews {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.trip-previews img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 5px;
}

.trip-empty {
  margin-top: 2rem;
  opacity: 0.6;
  font-style: italic;
}

/* Travel post: individual trip page */
.trip-breadcrumb {
  display: block;
  margin: 1rem 0 0.5rem;
  font-size: 0.9rem;
  color: var(--accent-color);
}

.trip-breadcrumb a {
  color: var(--accent-color);
}

.trip-post-dates {
  margin: 0 0 2rem;
  opacity: 0.6;
  font-size: 0.95rem;
}

.trip-section {
  margin-top: 3rem;
}

.trip-section h2 {
  color: var(--accent-color);
  font-size: 1.2rem;
  margin-bottom: 0.75rem;
}

.trip-section p {
  line-height: 1.75;
  max-width: 65ch;
  margin-bottom: 1.5rem;
}

/* ── Film Strip Gallery ─────────────────────────────────────────────────── */

html.filmstrip-page { max-width: 100%; }
html.filmstrip-page main   { max-width: 100%; padding: 0; min-height: auto; }
html.filmstrip-page header { padding: 0.5rem 2rem; }

.fs-viewer {
  display: flex;
  flex-direction: column;
  background: var(--background-color);
  overflow: hidden;
}

.fs-stage {
  flex: 1;
  position: relative;
  overflow: hidden;
  min-height: 0;
  background: var(--background-color);
}

.fs-main {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.fs-stage-gradient {
  display: none;
}

/* Header row — gallery title + back link */
.fs-header {
  flex-shrink: 0;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 0.6rem 2rem 0.9rem;
  background: var(--background-color);
}

.fs-header-text {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.fs-title {
  font-family: 'Raleway', sans-serif;
  font-weight: 400;
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent-color);
  display: flex;
  align-items: baseline;
}

.fs-title-back {
  color: var(--accent-color);
  text-decoration: none;
  transition: opacity 0.15s ease;
}

.fs-title-back:hover { opacity: 0.7; }

.fs-title-sep {
  opacity: 0.35;
  padding: 0 0.25em;
}

.fs-title-current {
  opacity: 1;
}

.fs-description {
  font-family: 'Source Serif 4', serif;
  font-size: 0.9rem;
  font-style: normal;
  color: color-mix(in srgb, var(--text-color) 85%, transparent);
  line-height: 1.5;
}

.fs-back {
  font-family: 'Raleway', sans-serif;
  font-size: 0.65rem;
  letter-spacing: 0.14em;
  text-transform: lowercase;
  color: color-mix(in srgb, var(--text-color) 70%, transparent);
  text-decoration: none;
  transition: color 0.18s ease;
  flex-shrink: 0;
}
.fs-back:hover { color: var(--accent-color); }

/* Meta row — location left, counter right */
.fs-meta {
  flex-shrink: 0;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding: 0.15rem 1.6rem 0.35rem;
  background: var(--background-color);
}

.fs-location {
  font-family: 'Raleway', sans-serif;
  font-size: 0.62rem;
  letter-spacing: 0.12em;
  text-transform: lowercase;
  color: color-mix(in srgb, var(--text-color) 75%, transparent);
  font-style: normal;
  min-height: 1em;
}

.fs-counter {
  font-family: 'Raleway', sans-serif;
  font-size: 0.62rem;
  letter-spacing: 0.14em;
  color: color-mix(in srgb, var(--text-color) 75%, transparent);
}

.fs-intro {
  display: none;
}

.fs-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: color-mix(in srgb, var(--text-color) 28%, transparent);
  font-size: 1.8rem;
  cursor: pointer;
  padding: 1.2rem;
  transition: color 0.18s ease;
  line-height: 1;
  z-index: 5;
}
.fs-btn:hover  { color: color-mix(in srgb, var(--text-color) 82%, transparent); }
.fs-btn:focus-visible { color: color-mix(in srgb, var(--text-color) 82%, transparent); outline: 2px solid rgba(255,255,255,0.7); outline-offset: 3px; border-radius: 4px; }
.fs-prev { left:  0.25rem; }
.fs-next { right: 0.25rem; }

.fs-strip-wrapper {
  flex-shrink: 0;
  height: 72px;
  overflow-x: auto;
  overflow-y: hidden;
  background: var(--hover-background);
  border-top: 1px solid color-mix(in srgb, var(--text-color) 8%, transparent);
  scrollbar-width: none;
}
.fs-strip-wrapper::-webkit-scrollbar { display: none; }

.fs-strip {
  display: flex;
  gap: 8px;
  padding: 7px;
  height: 100%;
  align-items: center;
}

.fs-frame {
  flex: 0 0 auto;
  width: 88px;
  height: 58px;
  overflow: hidden;
  opacity: 0.45;
  cursor: pointer;
  border: 2px solid transparent;
  padding: 0;
  background: none;
  transition: opacity 0.18s ease, border-color 0.18s ease;
}
.fs-frame:hover { opacity: 0.75; }
.fs-frame.active {
  opacity: 1;
  border-color: var(--accent-color);
}

.fs-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

@media (max-width: 640px) {
  .fs-btn   { font-size: 1.3rem; padding: 0.85rem; }
  .fs-strip-wrapper { height: 58px; }
  .fs-frame { width: 68px; height: 44px; }
}


/* ── Postcards page ──────────────────────────────────────────────────────── */

.postcards-page {
  padding: 0 2rem;
}

.postcards-page .page-label {
  display: block;
  margin-bottom: 2rem;
}

.post-empty {
  font-family: 'Source Serif 4', serif;
  font-style: italic;
  color: color-mix(in srgb, var(--text-color) 45%, transparent);
}

.post-breadcrumb {
  display: flex;
  align-items: baseline;
  justify-content: flex-start;
  margin: 0.6rem 0 1rem;
  font-family: 'Raleway', sans-serif;
  font-size: 0.75rem;
  font-weight: 400;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.post-breadcrumb a {
  color: var(--accent-color);
  text-decoration: none;
  transition: opacity 0.15s ease;
}

.post-breadcrumb a:hover { opacity: 0.7; }

.post-breadcrumb-sep {
  color: var(--accent-color);
  opacity: 0.35;
  padding: 0 0.25em;
}

.post-breadcrumb-current {
  color: var(--accent-color);
  opacity: 0.6;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ── Postcard archive grid ───────────────────────────────────────────────── */

.postcard-archive-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-auto-flow: row dense;
  gap: 1.25rem;
  align-items: start;
}

.postcard-archive-card {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  border-radius: 3px;
  overflow: hidden;
  background: #eae4d6;
  padding: 5px;
  box-sizing: border-box;
  box-shadow: 0 4px 16px rgba(0,0,0,0.12), inset 0 0 8px rgba(0,0,0,0.12);
  aspect-ratio: 3 / 2;
  grid-column: span 1;
  position: relative;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.postcard-archive-card:hover {
  transform: translateY(-3px) rotate(0.4deg);
  box-shadow: 0 10px 32px rgba(0,0,0,0.18);
}


.postcard-archive-card.is-portrait {
  grid-row: span 2;
  aspect-ratio: unset;
  align-self: stretch;
}

@media (min-width: 1025px) {
  /* Featured horizontal: fills a 2-col × 2-row block */
  .postcard-archive-card.is-featured:not(.is-portrait) {
    grid-column: 1 / span 2;
    grid-row: 1 / span 2;
    aspect-ratio: unset;
    align-self: stretch;
  }

  /* Featured vertical: fills a 1-col × 2-row block */
  .postcard-archive-card.is-featured.is-portrait {
    grid-column: 1;
    grid-row: 1 / span 2;
    aspect-ratio: unset;
    align-self: stretch;
  }

  /* Second card + newsletter: col 3 when featured is horizontal */
  .postcard-archive-grid:has(.is-featured:not(.is-portrait)) .postcard-archive-card.is-second {
    grid-column: 3;
    grid-row: 1;
  }
  .postcard-archive-grid:has(.is-featured:not(.is-portrait)) .newsletter-postcard {
    grid-column: 3;
    grid-row: 2;
  }

  /* No second card: newsletter fills col 3, rows 1–2 */
  .postcard-archive-grid:has(.is-featured:not(.is-portrait)):not(:has(.is-second)) .newsletter-postcard {
    grid-column: 3;
    grid-row: 1 / span 2;
  }

  /* Second card + newsletter: col 2 when featured is vertical */
  .postcard-archive-grid:has(.is-featured.is-portrait) .postcard-archive-card.is-second {
    grid-column: 2;
    grid-row: 1;
  }
  .postcard-archive-grid:has(.is-featured.is-portrait) .newsletter-postcard {
    grid-column: 2;
    grid-row: 2;
  }
}

.postcard-archive-front {
  flex: 1;
  min-height: 0;
  position: relative;
}

.postcard-archive-front img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.postcard-archive-front::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at center, transparent 42%, rgba(38, 22, 4, 0.28) 100%);
  z-index: 1;
  pointer-events: none;
}

.postcard-archive-front::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.68' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='300' height='300' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 200px 200px;
  opacity: 0.06;
  mix-blend-mode: overlay;
  pointer-events: none;
  z-index: 2;
}

.postcard-archive-label {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  padding: 1.4rem 1.2rem 1rem;
  background: linear-gradient(to top, rgba(0,0,0,0.7) 0%, transparent 100%);
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  z-index: 3;
}

.postcard-archive-label .postcard-destination {
  font-size: clamp(0.9rem, 2.5vw, 1.2rem);
}

.postcard-archive-meta {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.postcard-archive-location {
  font-family: 'Raleway', sans-serif;
  font-size: 0.58rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.55);
}

.postcard-archive-date {
  font-family: 'Raleway', sans-serif;
  font-size: 0.6rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.5);
}

/* Newsletter postcard (top of right column) */

.newsletter-postcard {
  --background-color: #f5f0e8;
  --text-color: #2a2018;
  --accent-color: #225b95;
  aspect-ratio: 3 / 2;
  background: #eae4d6;
  padding: 5px;
  box-sizing: border-box;
  border-radius: 3px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.12), inset 0 0 8px rgba(0,0,0,0.12);
  display: flex;
  overflow: hidden;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  container-type: inline-size;
}

.newsletter-postcard:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 32px rgba(0,0,0,0.18), inset 0 0 10px rgba(0,0,0,0.10);
}

.newsletter-postcard-inner {
  flex: 1;
  background: var(--background-color);
  color: var(--text-color);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.newsletter-postcard-header {
  display: flex;
  align-items: center;
  padding: clamp(0.4rem, 1.6cqi, 0.7rem) clamp(0.5rem, 2cqi, 1rem);
  border-bottom: 1px solid color-mix(in srgb, var(--text-color) 10%, transparent);
}

.newsletter-postcard-label {
  font-family: 'Raleway', sans-serif;
  font-size: clamp(0.42rem, 1.1cqi, 0.55rem);
  line-height: 1;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--accent-color);
}

.newsletter-postcard-columns {
  flex: 1;
  min-height: 0;
  display: flex;
}

.newsletter-postcard-message {
  flex: 1;
  min-width: 0;
  min-height: 0;
  height: 100%;
  box-sizing: border-box;
  padding: 0 clamp(0.5rem, 2cqi, 1rem) clamp(0.3rem, 1.2cqi, 0.5rem);
  border-right: 1px solid color-mix(in srgb, var(--text-color) 10%, transparent);
  display: flex;
  flex-direction: column;
}

.newsletter-postcard-spacer {
  display: block;
  flex: 1;
  min-height: 0;
}

.newsletter-postcard-message > .newsletter-postcard-spacer:first-child {
  flex: 4;
  min-height: 0;
}

.newsletter-postcard-form-group {
  display: flex;
  flex-direction: column;
  gap: clamp(0.25rem, 1.2cqi, 0.5rem);
}

.newsletter-postcard-address {
  flex: 0 0 39%;
  padding: clamp(0.45rem, 2cqi, 1rem) clamp(0.4rem, 1.6cqi, 0.8rem);
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: clamp(0.3rem, 1.4cqi, 0.7rem);
}

.newsletter-postcard-stamp {
  height: clamp(4.5rem, 16cqi, 7.5rem);
  width: auto;
  object-fit: contain;
}

.newsletter-postcard-lines {
  width: 100%;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-evenly;
}

.newsletter-postcard-lines span {
  display: block;
  height: 1px;
  background: color-mix(in srgb, var(--text-color) 12%, transparent);
}

.newsletter-postcard-series-title {
  font-family: 'Source Serif 4', serif;
  font-size: clamp(0.55rem, 3cqi, 1.1rem);
  font-style: italic;
  letter-spacing: 0.02em;
  margin: 0 0 0.25em;
  opacity: 0.75;
}

.newsletter-postcard-heading {
  font-family: 'Source Serif 4', serif;
  font-size: clamp(0.7rem, 4.6cqi, 1.85rem);
  line-height: 1.2;
  margin: 0;
}

.newsletter-postcard-form {
  display: flex;
  flex-direction: column;
  gap: clamp(0.4rem, 1.8cqi, 0.7rem);
}

.newsletter-postcard-form input[type="email"] {
  font-family: 'Raleway', sans-serif;
  font-size: clamp(0.65rem, 2cqi, 0.82rem);
  padding: clamp(0.28rem, 1.1cqi, 0.48rem) clamp(0.3rem, 1.2cqi, 0.55rem);
  border: 1px solid color-mix(in srgb, var(--text-color) 20%, transparent);
  border-radius: 2px;
  background: var(--background-color);
  color: var(--text-color);
  width: 100%;
  box-sizing: border-box;
}

.newsletter-postcard-form input[type="email"]:focus {
  outline: 2px solid var(--accent-color);
  outline-offset: 2px;
  border-color: color-mix(in srgb, var(--text-color) 45%, transparent);
}

.newsletter-postcard-form input[type="submit"] {
  font-family: 'Raleway', sans-serif;
  font-size: clamp(0.65rem, 2cqi, 0.82rem);
  letter-spacing: 0.06em;
  padding: clamp(0.28rem, 1.1cqi, 0.48rem) clamp(0.3rem, 1.2cqi, 0.55rem);
  background: var(--text-color);
  color: var(--background-color);
  border: none;
  border-radius: 2px;
  cursor: pointer;
  transition: opacity 0.18s ease;
  text-align: center;
}

.newsletter-postcard-form input[type="submit"]:hover {
  opacity: 0.75;
}

.newsletter-postcard-privacy {
  font-family: 'Raleway', sans-serif;
  font-size: clamp(0.48rem, 1.4cqi, 0.6rem);
  line-height: 1;
  color: color-mix(in srgb, var(--text-color) 40%, transparent);
  font-style: italic;
  margin: 0;
}

.newsletter-postcard-powered {
  padding: clamp(0.4rem, 1.6cqi, 0.7rem) clamp(0.5rem, 2cqi, 1rem);
  border-top: 1px solid color-mix(in srgb, var(--text-color) 10%, transparent);
  font-family: 'Raleway', sans-serif;
  font-size: clamp(0.42rem, 1.1cqi, 0.55rem);
  line-height: 1;
  color: var(--accent-color);
  margin: 0;
}

.newsletter-postcard-powered a {
  color: inherit;
  text-decoration: none;
}

/* ── Postcard post page ──────────────────────────────────────────────────── */

.postcard-page {
  max-width: 860px;
  margin: 0 auto;
}

.postcard-wrapper {
  width: 100%;
  aspect-ratio: 7 / 5;
  position: relative;
}

.postcard-wrapper.is-portrait {
  aspect-ratio: 2 / 3;
  max-width: 540px;
  margin: 0 auto;
}

.postcard-inner {
  width: 100%;
  height: 100%;
  position: relative;
  perspective: 1000px;
}

.postcard-face {
  position: absolute;
  inset: 0;
  border-radius: 3px;
  overflow: hidden;
  box-shadow: 0 8px 40px rgba(0,0,0,0.18);
}


/* Front */
.postcard-front {
  cursor: pointer;
  padding: 10px;
  background: #eae4d6;
  box-sizing: border-box;
  box-shadow: 0 8px 40px rgba(0,0,0,0.18), inset 0 0 10px rgba(0,0,0,0.14);
}

.postcard-front img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.postcard-front::before {
  content: '';
  position: absolute;
  inset: 10px;
  background: radial-gradient(ellipse at center, transparent 38%, rgba(38, 22, 4, 0.32) 100%);
  z-index: 1;
  pointer-events: none;
}

.postcard-front::after {
  content: '';
  position: absolute;
  inset: 10px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.68' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='300' height='300' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 200px 200px;
  opacity: 0.07;
  mix-blend-mode: overlay;
  pointer-events: none;
  z-index: 2;
}

.postcard-front-label {
  position: absolute;
  bottom: 10px; left: 10px; right: 10px;
  padding: 2.5rem 1.6rem 1.2rem;
  background: linear-gradient(to top, rgba(0,0,0,0.72) 0%, transparent 100%);
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  z-index: 3;
}

.postcard-destination {
  font-family: 'Raleway', sans-serif;
  font-weight: 300;
  font-size: clamp(1.2rem, 3vw, 2.2rem);
  color: #fff;
  letter-spacing: 0.06em;
  line-height: 1.1;
}

.postcard-front-meta {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}

.postcard-meta-left {
  font-family: 'Raleway', sans-serif;
  font-size: 0.6rem;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.5);
}

.postcard-flip-hint {
  display: none;
}

.postcard-flip-cue {
  font-family: 'Raleway', sans-serif;
  font-size: 0.65rem;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  opacity: 0.45;
  text-align: center;
  margin-top: 0.75rem;
}

/* Back — hidden by default; JS makes it visible when the card is flipped */
.postcard-back {
  visibility: hidden;
  background: var(--background-color);
  border: 1px solid color-mix(in srgb, var(--text-color) 10%, transparent);
}

.postcard-back-inner {
  height: 100%;
  display: flex;
  flex-direction: column;
  padding: 1.4rem 1.6rem 1.2rem;
  box-sizing: border-box;
}

.postcard-back-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid color-mix(in srgb, var(--text-color) 10%, transparent);
  padding-bottom: 0.55rem;
  margin-bottom: 0.9rem;
  flex-shrink: 0;
}

.postcard-back-label {
  font-family: 'Raleway', sans-serif;
  letter-spacing: 0.25em;
  font-size: 0.6rem;
  text-transform: uppercase;
  opacity: 0.35;
}

.postcard-postmark {
  font-family: 'Raleway', sans-serif;
  font-size: 0.6rem;
  letter-spacing: 0.1em;
  opacity: 0.35;
}

.postcard-back-body {
  flex: 1;
  display: grid;
  grid-template-columns: 1fr 1px 130px;
  gap: 0 1.2rem;
  min-height: 0;
}

.postcard-back-body::before {
  content: '';
  grid-column: 2;
  background: color-mix(in srgb, var(--text-color) 10%, transparent);
  grid-row: 1;
}

.postcard-message {
  overflow-y: auto;
  padding-right: 0.4rem;
  grid-column: 1;
  grid-row: 1;
}

.postcard-title {
  font-family: 'Source Serif 4', serif;
  font-size: 0.95rem;
  font-weight: 600;
  margin: 0 0 0.6rem;
  line-height: 1.3;
}

.postcard-text {
  font-family: 'Source Serif 4', serif;
  font-size: 0.8rem;
  line-height: 1.7;
  color: color-mix(in srgb, var(--text-color) 85%, transparent);
}

.postcard-text p { margin: 0 0 0.9em; }
.postcard-text p:last-child { margin-bottom: 0; }

.postcard-address-col {
  grid-column: 3;
  grid-row: 1;
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  padding-left: 0.4rem;
}

.postcard-stamp {
  border: 1.5px solid color-mix(in srgb, var(--text-color) 18%, transparent);
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 4px;
  box-sizing: border-box;
}

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

.postcard-stamp span {
  font-family: 'Raleway', sans-serif;
  font-size: 0.5rem;
  letter-spacing: 0.12em;
  text-align: center;
  text-transform: uppercase;
  line-height: 1.6;
  opacity: 0.4;
}

.postcard-address-lines {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  font-family: 'Raleway', sans-serif;
  font-size: 0.58rem;
  opacity: 0.35;
  letter-spacing: 0.04em;
  line-height: 1.5;
}

.postcard-sent-from-label {
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 0.1rem;
}

.postcard-flip-back {
  position: absolute;
  bottom: 1.2rem;
  right: 1.6rem;
  background: none;
  border: none;
  cursor: pointer;
  font-family: 'Raleway', sans-serif;
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  padding: 0;
  color: var(--accent-color);
  transition: opacity 0.18s ease;
}

.postcard-flip-back:hover { opacity: 0.7; }

.postcard-notes {
  margin: 1.4rem auto 0;
  max-width: 860px;
  padding: 1rem 0.5rem 0;
  border-top: 1px solid color-mix(in srgb, var(--text-color) 8%, transparent);
  font-family: 'Source Serif 4', serif;
  font-size: 0.82rem;
  color: color-mix(in srgb, var(--text-color) 55%, transparent);
  line-height: 1.65;
}

.postcard-notes p { margin: 0 0 0.6em; }
.postcard-notes p:last-child { margin-bottom: 0; }
.postcard-notes a { color: var(--themeblue, #4a8fc1); text-decoration: underline; }

.gallery-newsletter-wrap {
  padding: 3rem 2rem;
  display: flex;
  justify-content: center;
}

.newsletter-postcard--standalone {
  max-width: 480px;
  margin: 2.5rem auto 3rem;
  width: 100%;
  aspect-ratio: unset !important;
  height: auto !important;
  display: block !important;
  overflow: visible !important;
}
.newsletter-postcard--standalone .newsletter-postcard-inner {
  flex: unset !important;
  display: block !important;
  height: auto !important;
  min-height: 0 !important;
  overflow: visible !important;
}
.newsletter-postcard--standalone .newsletter-postcard-columns {
  flex: unset !important;
  display: flex;
  align-items: flex-start;
  height: auto !important;
  min-height: 0 !important;
}
.newsletter-postcard--standalone .newsletter-postcard-message {
  flex: 1;
  height: auto !important;
  min-height: 0 !important;
  overflow: visible !important;
}
.newsletter-postcard--standalone .newsletter-postcard-spacer {
  display: none !important;
}
.newsletter-postcard--standalone .newsletter-postcard-lines {
  flex: 0 0 auto;
  height: 4rem;
}

.newsletter-postcard--standalone:hover {
  transform: none;
  box-shadow: 0 4px 16px rgba(0,0,0,0.12), inset 0 0 8px rgba(0,0,0,0.12);
}

.postcard-pagination {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  max-width: 860px;
  margin: 2rem auto 0;
  padding-top: 1rem;
  border-top: 1px solid color-mix(in srgb, var(--text-color) 8%, transparent);
}

.postcard-pagination-link {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  text-decoration: none;
  transition: opacity 0.15s ease;
  max-width: 45%;
}

.postcard-pagination-link:hover { opacity: 0.7; }

.postcard-pagination-dir {
  font-family: 'Raleway', sans-serif;
  font-size: 0.65rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent-color);
  opacity: 0.7;
}

.postcard-pagination-title {
  font-family: 'Source Serif 4', serif;
  font-size: 0.88rem;
  color: var(--text-color);
  line-height: 1.3;
}

.postcard-pagination-meta {
  font-family: 'Raleway', sans-serif;
  font-size: 0.62rem;
  letter-spacing: 0.08em;
  color: var(--text-color);
  opacity: 0.45;
}

.postcard-pagination-older {
  text-align: right;
  margin-left: auto;
}

@media (max-width: 1024px) {
  .postcard-archive-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.9rem;
  }

  /* Reset explicit placements on mobile — fall back to auto with dense packing */
  .postcard-archive-grid :is(.postcard-archive-card, .newsletter-postcard) {
    grid-column: auto;
    grid-row: auto;
    align-self: start;
  }

  .postcard-archive-card.is-featured {
    grid-column: span 2;
    aspect-ratio: 3 / 2;
    align-self: start;
  }

  .postcard-archive-card.is-portrait {
    grid-row: span 2;
    aspect-ratio: unset;
    align-self: stretch;
  }

  /* Featured portrait: 1 col × 2 rows, not full-width */
  .postcard-archive-card.is-featured.is-portrait {
    grid-column: auto;
  }

  /* Newsletter slots in right after the featured card */
  .newsletter-postcard { order: 1; }
  .postcard-archive-card:not(.is-featured) { order: 2; }

  .postcard-back-body {
    grid-template-columns: 1fr 1px 90px;
    gap: 0 0.8rem;
  }

  .postcard-address-lines { display: none; }

  .postcard-stamp { max-width: 60px; }
}

@media (max-width: 640px) {
  .postcard-archive-grid {
    grid-template-columns: 1fr;
  }

  /* Featured no longer needs to span 2 in a 1-column grid */
  .postcard-archive-card.is-featured {
    grid-column: auto;
  }

  /* Portrait cards take their own single row */
  .postcard-archive-card.is-portrait {
    grid-row: auto;
    aspect-ratio: 2 / 3;
    align-self: start;
  }
}

@media (max-width: 768px) {
  /* Landscape postcards: start at 7:5 height, expand to portrait-like when flipped */
  .postcard-wrapper:not(.is-portrait) {
    aspect-ratio: unset;
    height: 65vw;
    transition: height 0.35s ease;
  }
  .postcard-wrapper:not(.is-portrait).is-flipped {
    height: 130vw;
  }
}

@media (max-width: 480px) {
  .postcard-back-body {
    grid-template-columns: 1fr;
  }
  .postcard-back-body::before { display: none; }
  .postcard-address-col { display: none; }
  .postcard-message { padding-right: 0; }
}


/* ── Newsletter block ────────────────────────────────────────────────────── */

.hp-newsletter {
  padding: 4rem;
  background: var(--background-color);
}

.newsletter-block {
  max-width: 420px;
}

.newsletter-eyebrow {
  font-family: 'Raleway', sans-serif;
  font-size: 0.65rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent-color);
  opacity: 0.6;
  display: block;
  margin-bottom: 0.6rem;
}

.newsletter-heading {
  font-family: 'Raleway', sans-serif;
  font-weight: 300;
  font-size: 1.5rem;
  line-height: 1.2;
  margin: 0 0 0.3rem;
  letter-spacing: 0.02em;
  color: var(--text-color);
}

.newsletter-sub {
  font-family: 'Source Serif 4', serif;
  font-style: italic;
  font-size: 0.85rem;
  color: color-mix(in srgb, var(--text-color) 50%, transparent);
  margin: 0 0 1.4rem;
  line-height: 1.5;
}

.embeddable-buttondown-form {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  align-items: flex-start;
}

.embeddable-buttondown-form label {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
}

.embeddable-buttondown-form input[type="email"] {
  width: 100%;
  border: 1px solid color-mix(in srgb, var(--text-color) 22%, transparent);
  background: var(--background-color);
  color: var(--text-color);
  padding: 0.55rem 0.9rem;
  font-family: 'Raleway', sans-serif;
  font-size: 0.8rem;
  letter-spacing: 0.04em;
  border-radius: 2px;
  outline: none;
  transition: border-color 0.18s ease;
  box-sizing: border-box;
}

.embeddable-buttondown-form input[type="email"]::placeholder {
  color: color-mix(in srgb, var(--text-color) 30%, transparent);
}

.embeddable-buttondown-form input[type="email"]:focus {
  border-color: var(--accent-color);
}

.embeddable-buttondown-form input[type="submit"] {
  background: var(--accent-color);
  color: var(--background-color);
  border: none;
  padding: 0.55rem 1.4rem;
  font-family: 'Raleway', sans-serif;
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: lowercase;
  cursor: pointer;
  border-radius: 2px;
  transition: opacity 0.18s ease;
}

.embeddable-buttondown-form input[type="submit"]:hover {
  opacity: 0.78;
}

.embeddable-buttondown-form p {
  font-family: 'Raleway', sans-serif;
  font-size: 0.6rem;
  letter-spacing: 0.08em;
  color: color-mix(in srgb, var(--text-color) 25%, transparent);
  margin: 0.2rem 0 0;
}

.embeddable-buttondown-form p a {
  color: inherit;
  text-decoration: none;
}

.embeddable-buttondown-form p a:hover {
  color: color-mix(in srgb, var(--text-color) 50%, transparent);
}