@import url("https://fonts.googleapis.com/css?family=Source+Sans+Pro:300,900");
@import url("https://fonts.googleapis.com/css2?family=Roboto:wght@700&display=swap");

@font-face {
  font-family: gfont;
  src: url("../webfonts/Colours\\ Personal\\ Use.ttf");
}
@font-face {
  font-family: "AuthorHand";
  src: url("../webfonts/author_handwriting/Author Handwriting.otf")
    format("opentype");
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "ThereBrat";
  src: url("../webfonts/There Brat.otf") format("opentype");
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: "AuthorHand", cursive;
  background-color: #ffffff;
  color: #000000;
  min-height: 100vh;
}

.logo-icesco {
  position: fixed;
  top: 20px;
  left: 20px;
  z-index: 20;
}

.logo-icesco img {
  width: 80px;
  filter: drop-shadow(0 6px 16px rgba(0, 0, 0, 0.5));
}

.hamburger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  background-color: rgba(255, 255, 255, 0.9);
  border: 1px solid #a5a5a5;
  border-radius: 50%;
  cursor: pointer;
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 30;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.15);
}

.hamburger:focus-visible {
  outline: 2px solid #1c1c1c;
  outline-offset: 3px;
}

.burger {
  width: 40px;
}

.menu-panel {
  position: fixed;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.75rem;
  padding: 3rem 1.5rem;
  background: rgba(255, 255, 255, 0.45);
  backdrop-filter: blur(22px) saturate(140%);
  -webkit-backdrop-filter: blur(22px) saturate(140%);
  border: 1px solid rgba(255, 255, 255, 0.4);
  opacity: 0;
  pointer-events: none;
  transform: scale(1.02);
  transition: opacity 0.3s ease, transform 0.35s ease;
  z-index: 25;
}

.menu-panel.show {
  opacity: 1;
  pointer-events: auto;
  transform: scale(1);
}

.menu-panel .menu-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem;
}

.menu-panel .menu-link img {
  width: clamp(140px, 24vw, 260px);
  max-width: 100%;
  filter: drop-shadow(0 8px 20px rgba(0, 0, 0, 0.25));
  transition: transform 0.3s ease, filter 0.3s ease;
}

.menu-panel .menu-link:hover img,
.menu-panel .menu-link:focus-visible img {
  transform: translateY(-4px) scale(1.03);
  filter: drop-shadow(0 14px 30px rgba(0, 0, 0, 0.35));
}

.gallery-hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding-top: 6rem;
  padding-bottom: 3rem;
}

.gallery-wordmark {
  width: min(480px, 80vw);
}

.gallery-intro {
  font-family: "Roboto", sans-serif;
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.7);
  margin-top: 1rem;
  max-width: 640px;
}

.polaroid-wall {
  position: relative;
  width: min(1200px, 95vw);
  margin: 0 auto 6rem;
  min-height: 600px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 3rem;
  padding-bottom: 6rem;
}

.polaroid {
  width: 100%;
  max-width: 310px;
  aspect-ratio: 31 / 36;
  margin: 0 auto;
  background: #fff;
  border-radius: 2px;
  border: 1px solid rgba(0, 0, 0, 0.25);
  box-shadow: 0 28px 38px rgba(0, 0, 0, 0.55);
  padding: 18px 15px 70px;
  position: relative;
  transform-origin: center;
  transition: transform 0.35s ease, box-shadow 0.35s ease;
}

.polaroid-modal {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 40;
  padding: 2rem;
  overflow-y: auto;
  overflow-x: hidden;
}

.polaroid-modal.show {
  display: flex;
}

.modal-overlay {
  position: absolute;
  inset: 0;
  background: rgba(7, 12, 25, 0.75);
  backdrop-filter: blur(14px);
}

.modal-content {
  position: relative;
  max-width: 920px;
  width: 95%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
}


.modal-polaroid {
  max-width: 620px;
  width: 100%;
  aspect-ratio: 31 / 36;
  padding: 30px 28px 110px;
  transform: rotate(-1deg);
}

.modal-close {
  position: absolute;
  top: -10px;
  right: -10px;
  background: rgba(255, 255, 255, 0.85);
  border: none;
  border-radius: 50%;
  width: 42px;
  height: 42px;
  font-size: 1.5rem;
  cursor: pointer;
  z-index: 2;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.4);
  color: #333;
}

.modal-close:hover {
  background: rgba(255, 255, 255, 1);
}

.modal-nav {
  border: none;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  font-size: 1.5rem;
  cursor: pointer;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.4);
  z-index: 2;
  background: rgba(255, 255, 255, 0.9);
}

.modal-controls {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.modal-controls button {
  opacity: 0.85;
}

.modal-nav:focus-visible,
.modal-close:focus-visible {
  outline: 2px solid #000;
  outline-offset: 4px;
}

.polaroid::after {
  content: "";
  position: absolute;
  inset: 0;
  border: 1px solid rgba(255, 255, 255, 0.3);
  pointer-events: none;
}

.polaroid:hover {
  transform: translateY(-15px) rotate(1deg);
  box-shadow: 0 35px 60px rgba(0, 0, 0, 0.7);
}

.tilt-right {
  transform: rotate(8deg);
}

.tilt-left {
  transform: rotate(-8deg);
}

.polaroid-img {
  position: absolute;
  top: 18px;
  left: 15px;
  right: 15px;
  bottom: 70px;
  overflow: hidden;
  background: #e8e8e8;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.08);
}

.polaroid-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  filter: saturate(120%);
  transform: scale(1.02);
  display: block;
}

.gloss {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
      120deg,
      rgba(255, 255, 255, 0.58),
      transparent 55%,
      rgba(0, 0, 0, 0.3)
    ),
    linear-gradient(
      90deg,
      rgba(255, 255, 255, 0.2) 0%,
      rgba(255, 255, 255, 0) 40%
    );
  pointer-events: none;
  mix-blend-mode: screen;
}

.polaroid figcaption {
  position: absolute;
  bottom: 18px;
  left: 0;
  width: 100%;
  padding: 0 24px;
  font-size: 2rem;
  letter-spacing: 0.08em;
  text-transform: none;
  color: #1c3f91;
  text-align: center;
  font-family: "ThereBrat", cursive;
  font-weight: 600;
}

.polaroid figcaption .caption-subtitle {
  font-family: "AuthorHand", cursive;
  font-size: 0.40em;
  font-weight: 400;
  letter-spacing: 0.05em;
  opacity: 0.85;
  display: block;
  margin-top: 0.2em;
}

.modal-polaroid figcaption {
  font-size: 2.4rem;
  letter-spacing: 0.18em;
  bottom: 30px;
  font-weight: 700;
  font-family: "ThereBrat", cursive;
}

@media (max-width: 900px) {
  .polaroid {
    max-width: 280px;
  }

  .polaroid-wall {
    gap: 2rem;
  }

  .tilt-left,
  .tilt-right {
    transform: rotate(0deg);
  }

  .modal-content {
    flex-direction: column;
    gap: 1rem;
  }

  .modal-controls {
    flex-direction: row;
    gap: 1rem;
  }

  .modal-polaroid {
    max-width: 500px;
    transform: none;
  }
}

@media (max-width: 600px) {
  body {
    font-size: 0.9rem;
  }

  .gallery-hero {
    padding-top: 4rem;
  }

  .polaroid {
    max-width: 240px;
  }

  .polaroid-img img {
    transform: scale(1);
  }

  .modal-content {
    width: 100%;
    padding: 0 1rem;
  }

  .modal-polaroid {
    max-width: 100%;
    padding: 30px 24px 110px;
  }
  .modal-controls .modal-nav {
    width: 54px;
    height: 54px;
  }

  .menu-panel {
    padding: 2.5rem 1rem;
    gap: 1.2rem;
  }

  .menu-panel .menu-link img {
    width: clamp(160px, 48vw, 240px);
  }
}

/* Form Modal Styles - Polaroid Inspired */
.modal-content.form-modal {
  background: #ffffff;
  border-radius: 16px;
  border: 1px solid rgba(0, 0, 0, 0.25);
  box-shadow: 0 28px 38px rgba(0, 0, 0, 0.55);
  padding: 30px 28px 40px;
  max-width: 500px;
  width: 90%;
  max-height: calc(90vh - 4rem);
  min-height: fit-content;
  overflow-y: auto;
  overflow-x: hidden;
  position: relative;
  transform: rotate(-1deg);
  display: flex;
  flex-direction: column;
  margin: auto;
}

.modal-content.form-modal::after {
  content: "";
  position: absolute;
  inset: 0;
  border: 1px solid rgba(255, 255, 255, 0.3);
  pointer-events: none;
}

.order-form {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  width: 100%;
  min-height: 0;
  flex: 1;
  padding-bottom: 1rem;
}

.form-title {
  font-family: "Source Sans Pro", sans-serif;
  font-size: 2.2rem;
  color: #000;
  margin-bottom: 1rem;
  margin-top: 0;
  text-align: center;
  letter-spacing: 0.08em;
  font-weight: 600;
  flex-shrink: 0;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.form-group label {
  font-family: "Source Sans Pro", sans-serif;
  font-size: 1.1rem;
  color: #000;
  font-weight: 600;
  letter-spacing: 0.05em;
}

.form-group input,
.form-group select,
.form-group textarea {
  font-family: "Source Sans Pro", sans-serif;
  font-size: 1rem;
  padding: 0.85rem;
  border: 1px solid rgba(0, 0, 0, 0.2);
  border-radius: 2px;
  background: #fafafa;
  color: #333;
  transition: all 0.3s ease;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.05);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: #000;
  background: #ffffff;
  box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.1), inset 0 1px 2px rgba(0, 0, 0, 0.05);
}

.form-group select:disabled {
  background: #f0f0f0;
  cursor: not-allowed;
  opacity: 0.7;
  color: #999;
}

.form-group textarea {
  resize: vertical;
  min-height: 120px;
  font-family: "Source Sans Pro", sans-serif;
}

.submit-btn {
  font-family: "Source Sans Pro", sans-serif;
  font-size: 1.2rem;
  font-weight: 600;
  padding: 1rem 2.5rem;
  background: #000;
  color: #ffffff;
  border: 1px solid rgba(0, 0, 0, 0.15);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
  margin-top: 0.75rem;
  margin-bottom: 0.5rem;
  letter-spacing: 0.05em;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  flex-shrink: 0;
}

.submit-btn:hover:not(:disabled) {
  background: #333;
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4);
}

.submit-btn:active:not(:disabled) {
  transform: translateY(0);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.submit-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

@media (max-width: 600px) {
  .modal-content.form-modal {
    padding: 24px 20px 35px;
    transform: rotate(0deg);
  }

  .form-title {
    font-size: 1.8rem;
  }

  .form-group label {
    font-size: 1rem;
  }

  .form-group input,
  .form-group select,
  .form-group textarea {
    padding: 0.75rem;
    font-size: 0.95rem;
  }

  .submit-btn {
    font-size: 1.1rem;
    padding: 0.9rem 2rem;
  }
}
