/* =========================
   Reset / Base
========================= */

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  color: #1A1A1A;
  -webkit-font-smoothing: antialiased;

  /* Soft multi-tone backdrop with subtle texture */
  background:
    radial-gradient(40% 40% at 20% 18%, rgba(255, 205, 227, 0.45), transparent 60%),
    radial-gradient(32% 32% at 82% 12%, rgba(189, 224, 255, 0.38), transparent 60%),
    radial-gradient(36% 36% at 78% 78%, rgba(199, 255, 219, 0.32), transparent 60%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.78) 0%, rgba(247, 248, 246, 0.92) 40%, rgba(243, 244, 242, 0.98) 100%);
  background-color: #f5f6f3;
}

main {
  flex: 1;
}

/* =========================
   Global width & alignment
========================= */

.site-header,
.categories-wrapper,
.intro,
.items,
.item-detail,
.contact-wrapper {
  max-width: 1100px;
  margin-left: 0;          /* 🔑 left aligned */
  margin-right: auto;     /* 🔑 no centering */
  padding: 24px 48px;
  text-align: left;
}

/* =========================
   Header
========================= */

.site-header {
  padding-top: 32px;
}

.header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}

.logo-image {
  height: 36px;
  width: auto;
  display: block;
}

/* =========================
   Hamburger
========================= */

#menu-toggle {
  display: none;
}

.menu-icon {
  display: none;
  font-size: 1.6rem;
  cursor: pointer;
  user-select: none;
}

/* Force hamburger to the far right */
.header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.menu-icon {
  margin-left: auto;
}


/* =========================
   Categories (desktop)
========================= */

.categories-wrapper {
  padding-top: 0;
}

.categories {
  display: flex;
  gap: 24px;
  padding-bottom: 48px;
}

.categories a {
  text-decoration: none;
  font-size: 0.95rem;
  color: #6E6E6E;
  padding: 8px 10px;
  border-radius: 8px;
  background: none;
  background-repeat: no-repeat;
  transition: color 150ms ease, background-size 220ms ease, box-shadow 170ms ease, transform 140ms ease;
}

.categories a.active {
  color: #1A1A1A;
  background-image: linear-gradient(120deg, rgba(255, 99, 146, 0.3), rgba(41, 101, 255, 0.3));
  background-size: 100% 3px;
  background-position: 0 100%;
  box-shadow: none;
}

.categories a:hover,
.categories a:focus-visible {
  color: #fff;
  background-image: linear-gradient(120deg, rgba(255, 99, 146, 0.28), rgba(41, 101, 255, 0.28));
  background-size: 100% 100%;
  background-position: 0 0;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.06);
  transform: translateY(-1px);
}

.categories a.active {
  color: #1A1A1A;
  background-image: linear-gradient(120deg, rgba(255, 99, 146, 0.3), rgba(41, 101, 255, 0.3));
  background-size: 100% 3px;
  background-position: 0 100%;
  box-shadow: none;
}

/* =========================
   Intro
========================= */

.intro {
  padding-top: 64px;
  padding-bottom: 48px;
}

.intro p {
  margin: 0;
  font-size: 1.7rem;
  line-height: 1.35;
  max-width: 44ch;
}

/* =========================
   Index grid (desktop)
========================= */

.items {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 260px));
  gap: 42px;
  align-items: start;
  justify-content: start;
}

.item-thumbnail {
  display: block;
  margin-bottom: 36px;
  width: 100%;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-radius: 8px;
  cursor: pointer;
}

.item > .item-thumbnail {
  margin-bottom: 36px !important;
}

.item-thumbnail img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  border-radius: 8px;
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.item-thumbnail img:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.12);
}


.item h2 {
  font-size: 1.15rem;
  font-weight: 600;
  margin: 12px 0 4px !important;
}

.item p,
.item .description {
  margin: 0 !important;
}

.item {
  row-gap: 8px;
}

.item h2 a {
  text-decoration: none;
  color: inherit;
}

.item h2 a:hover {
  text-decoration: underline;
}

.item .description {
  font-size: 0.95rem;
  line-height: 1.55;
  color: #6E6E6E;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.item .description a,
.item .description a:visited,
.item .description a:hover,
.item .description a:active,
.item-summary a,
.item-summary a:visited,
.item-summary a:hover,
.item-summary a:active {
  color: #0f172a;
  text-decoration: none;
  background: linear-gradient(120deg, rgba(255, 99, 146, 0.35), rgba(41, 101, 255, 0.35));
  background-repeat: no-repeat;
  background-size: 100% 2px;
  background-position: 0 100%;
  padding: 1px 3px 2px;
  border-radius: 4px;
  transition: color 160ms ease, background-size 180ms ease, box-shadow 180ms ease;
}

.item .description a:visited,
.item-summary a:visited {
  color: #2f3541;
  background: linear-gradient(120deg, rgba(41, 101, 255, 0.22), rgba(15, 23, 42, 0.18));
}

.item .description a:hover,
.item .description a:focus-visible,
.item-summary a:hover,
.item-summary a:focus-visible {
  color: #fff;
  background-size: 100% 90%;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.08);
}

/* =========================
   Footer
========================= */

.site-footer {
  padding-bottom: 32px;
  padding-left: 48px;
  font-size: 0.8rem;
  color: #6E6E6E;
  text-align: left;   /* ← add ONLY this */
}

/* =========================
   Item detail
========================= */

.item-detail {
  padding-top: 72px;
}

.item-header {
  margin-bottom: 40px;
}

.item-header h1 {
  margin: 0 0 6px;
  font-size: 2rem;
  font-weight: 500;
}

.item-summary {
  max-width: 720px;
  font-size: 1.02rem;
  line-height: 1.6;
  color: #555;
  margin-top: 0;
  margin-bottom: 12px;
}

/* =========================
   Item gallery
========================= */

.item-gallery {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 18px;
  align-items: flex-start;
}

.gallery-thumb {
  border: none;
  padding: 0;
  background: none;
  cursor: zoom-in;
  max-width: 220px;
  overflow: hidden;
  border-radius: 10px;
}

.gallery-thumb img {
  display: block;
  height: 160px;
  width: auto;
  object-fit: contain;
  border-radius: 10px;
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.gallery-thumb img:hover {
  transform: translateY(-2px) scale(1.03);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.16);
}

.lightbox.active #lightbox-image {
  transform: scale(1.0);
}

#lightbox-image {
  transition: transform 180ms ease;
}

/* Contact page */
.contact-card {
  background: transparent;
  padding: 0;
}

.contact-wrapper {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 24px 48px 32px;
}

.contact-frame {
  border: 1px solid rgba(0,0,0,0.04);
  border-radius: 14px;
  padding: 14px 16px;
  max-width: 640px;
  width: 100%;
  margin-left: 0;
  margin-right: auto;
  background: linear-gradient(135deg, rgba(255, 99, 146, 0.08), rgba(41, 101, 255, 0.08));
  box-shadow: 0 12px 28px rgba(0,0,0,0.03);
}

.contact-copy {
  margin: 0 0 14px;
  font-size: 1rem;
  color: #2c2c2c;
  max-width: 680px;
}

.contact-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.contact-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px 0;
}

.contact-text .label {
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #7a7a7a;
  margin: 0 0 4px;
}

.contact-text a,
.contact-text .address {
  color: #0f172a;
  text-decoration: none;
  font-size: 1rem;
  line-height: 1.5;
}

.contact-text a:hover {
  color: #000;
}

.contact-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 6px;
  background: transparent;
  color: #0f172a;
  padding: 0;
  box-shadow: none;
}

/* Ensure consistent thumbnail-to-title spacing on index cards */
.items .item-thumbnail {
  margin-bottom: 0 !important;
}

/* =========================
   Lightbox
========================= */

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
}

.lightbox.active {
  display: flex;
}

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

#lightbox-image {
  position: relative;
  max-width: 90vw;
  max-height: 90vh;
  width: auto;
  height: auto;
  z-index: 1;
  cursor: zoom-out;
}

/* =========================
   TABLET (≤1023px)
========================= */

@media (max-width: 1023px) {

  .logo-image {
    height: 32px;
  }

  .items {
    grid-template-columns: repeat(2, 1fr);
    gap: 32px;
  }

  .gallery-thumb img {
    height: 160px;
  }
}

/* =========================
   MOBILE (≤640px)
========================= */

@media (max-width: 640px) {

  .site-header,
  .categories-wrapper,
  .intro,
  .items,
  .site-footer,
  .item-detail,
  .contact-wrapper,
  .contact-card {
    padding: 20px;
  }

  /* Logo */
  .logo-image {
    height: 34px;
  }

  /* Hamburger visible */
  .menu-icon {
    display: block;
  }

  /* Categories dropdown */
  .categories {
    display: none;
    flex-direction: column;
    gap: 16px;
    padding: 16px 0;
  }

  /* 🔑 checkbox → categories */
  #menu-toggle:checked + .categories-wrapper .categories {
    display: flex;
  }

  /* Intro */
  .intro {
    padding-top: 26px;
    padding-bottom: 20px;
  }

  .intro p {
    font-size: 1.35rem;
    line-height: 1.42;
    max-width: 24ch;
  }

  /* Index */
  .items {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .item h2 {
    font-size: 1.25rem;
  }

  .item .description {
    font-size: 1rem;
  }

  /* Gallery */
  .item-gallery {
    flex-direction: column;
  }

  .gallery-thumb img {
    width: 100%;
    height: auto;
  }
}

/* Categories – shared spacing (keeps mobile toggle hidden until checked) */
.categories {
  gap: 24px;
  padding-bottom: 48px;
  flex-wrap: wrap;
}

@media (max-width: 640px) {
  .categories {
    align-items: flex-start;
  }
}

.site-footer {
  width: 100%;              /* 🔑 THIS was missing */
  max-width: 1100px;
  margin-left: 0;
  margin-right: auto;

  padding: 24px 48px 32px;

  display: flex;
  justify-content: space-between;
  align-items: center;

  font-size: 0.8rem;
  color: #6E6E6E;
  text-align: left;
}

.site-footer a {
  color: inherit;          /* same grey as footer text */
  text-decoration: none;
  font-weight: normal;
}

.site-footer a:hover {
  text-decoration: underline;
}

@media (max-width: 640px) {

  .intro {
    padding-top: 32px;   /* was too low */
    padding-bottom: 40px;
  }

  .intro p {
    font-size: 1.45rem;  /* bigger, but still elegant */
    line-height: 1.45;
  }

}

@media (max-width: 640px) {

  .site-footer {
    padding-left: 20px;   /* match mobile content edge */
    padding-right: 20px;
  }

}
