/* Josie's Sweet Cakes — editorial layout, bright aquamarine-blue palette */

:root {
  /* Bright aquamarine blue — no green/teal cast */
  --aqua: #1EC8E6;
  --aqua-mid: #00BFE0;
  --aqua-light: #7FE3F5;
  --navy: #0B1F3A;
  --navy-deep: #0B2545;
  --bg: #E8F9FD;
  --bg-soft: #D6F3FA;
  --text: #0B1F3A;
  --text-muted: #3A5878;
  --text-on-dark: #F4FCFF;
  --white: #ffffff;
  --link: #017A96;
  --line: rgba(0, 191, 224, 0.35);
  --line-strong: rgba(30, 200, 230, 0.7);
  --header-h: 4.5rem;
  --font: "Montserrat", "Segoe UI", system-ui, -apple-system, sans-serif;
  --max: 70rem;
  --form-max: 42rem;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.65;
  color: var(--text);
  background-color: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--link);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}

a:hover {
  color: var(--navy-deep);
}

:focus-visible {
  outline: 2px solid var(--aqua);
  outline-offset: 3px;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 1000;
  background: var(--aqua);
  color: var(--navy);
  padding: 0.6rem 1rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
}

.skip-link:focus {
  top: 1rem;
}

/* Header */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--navy-deep);
  border-bottom: 1px solid rgba(127, 227, 245, 0.25);
}

.header-inner {
  width: min(var(--max), calc(100% - 2rem));
  margin: 0 auto;
  min-height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.header-end {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.ig-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--text-on-dark);
  width: 1.7rem;
  height: 1.7rem;
  flex-shrink: 0;
  text-decoration: none;
}

.ig-link svg {
  width: 100%;
  height: 100%;
  display: block;
}

.ig-link:hover,
.ig-link:focus-visible {
  color: var(--aqua-light);
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  color: var(--text-on-dark);
  text-decoration: none;
  min-width: 0;
}

.logo:hover {
  color: var(--aqua-light);
}

.logo-mark {
  width: 2.1rem;
  height: 2.1rem;
  flex-shrink: 0;
}

.logo-name {
  font-weight: 300;
  font-size: 0.92rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.nav-toggle {
  display: none;
  width: 2.75rem;
  height: 2.75rem;
  border: 2px solid var(--aqua-mid);
  background: transparent;
  cursor: pointer;
  padding: 0;
  align-items: center;
  justify-content: center;
}

.nav-toggle-bars,
.nav-toggle-bars::before,
.nav-toggle-bars::after {
  display: block;
  width: 1.15rem;
  height: 2px;
  background: var(--aqua);
  position: relative;
}

.nav-toggle-bars::before,
.nav-toggle-bars::after {
  content: "";
  position: absolute;
  left: 0;
}

.nav-toggle-bars::before { top: -6px; }
.nav-toggle-bars::after { top: 6px; }

.nav-toggle[aria-expanded="true"] .nav-toggle-bars {
  background: transparent;
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bars::before {
  top: 0;
  transform: rotate(45deg);
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bars::after {
  top: 0;
  transform: rotate(-45deg);
}

.site-nav ul {
  display: flex;
  gap: 0.15rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-nav a {
  display: inline-block;
  color: var(--text-on-dark);
  text-decoration: none;
  font-weight: 300;
  font-size: 0.82rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  padding: 0.7rem 0.85rem;
  border-bottom: 2px solid transparent;
}

.site-nav a:hover,
.site-nav a[aria-current="true"],
.site-nav a[aria-current="page"] {
  color: var(--aqua-light);
  border-bottom-color: var(--aqua-light);
}

/* Hero */

.hero {
  padding: 4.25rem 0 4.5rem;
  text-align: center;
}

.hero-inner,
.section-inner {
  width: min(var(--max), calc(100% - 2rem));
  margin: 0 auto;
}

.rule-title {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.35rem;
  margin: 0 0 1.5rem;
}

.rule-title::before,
.rule-title::after {
  content: "";
  height: 2px;
  flex: 1 1 3rem;
  max-width: 11rem;
  background: var(--aqua);
}

.hero h1,
.rule-title h1,
.rule-title h2 {
  margin: 0;
  font-weight: 600;
  letter-spacing: 0.04em;
  line-height: 1.15;
}

.hero h1 {
  font-size: clamp(2rem, 5vw, 3.15rem);
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--navy);
}

.hero-tagline {
  max-width: 36rem;
  margin: 0 auto 2rem;
  color: var(--text-muted);
  font-size: 1.05rem;
  font-weight: 300;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.85rem;
  margin-bottom: 2.5rem;
}

.hero-photo {
  margin: 2.25rem auto 0;
  max-width: 22rem;
  background: var(--white);
  text-align: center;
}

.hero-photo a {
  display: block;
  text-decoration: none;
  color: inherit;
}

.hero-photo img {
  width: 100%;
  height: auto;
  display: block;
}

.hero-photo figcaption {
  margin: 0;
  padding: 0.75rem 0.9rem 1rem;
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* Buttons */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  text-decoration: none;
  line-height: 1.2;
  border: 2px solid var(--aqua-mid);
  border-radius: 0;
  padding: 0.9rem 1.35rem;
  cursor: pointer;
}

.btn-primary {
  background: var(--aqua);
  color: var(--navy);
}

.btn-primary:hover {
  background: var(--aqua-light);
  border-color: var(--aqua-light);
  color: var(--navy);
}

.btn-secondary {
  background: transparent;
  color: var(--navy);
  border-color: var(--aqua);
}

.btn-secondary:hover {
  background: var(--aqua);
  color: var(--navy);
}

/* Sections */

.section {
  padding: 4.25rem 0;
  scroll-margin-top: calc(var(--header-h) + 0.75rem);
}

.hero,
.gallery,
.page-gallery {
  background: var(--bg);
}

.about,
.order {
  background: var(--bg-soft);
}

.section-kicker {
  margin: 0 0 0.35rem;
  text-align: center;
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--aqua-mid);
}

.section h1,
.section h2,
.rule-title h1 {
  font-size: clamp(1.7rem, 3.2vw, 2.25rem);
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--navy);
}

.hero .rule-title h1,
.hero h1 {
  font-size: clamp(2rem, 5vw, 3.15rem);
}

.lead,
.about-copy p,
.contact-aside p {
  color: var(--text-muted);
}

.lead {
  text-align: center;
  max-width: 38rem;
  margin: 0 auto 2.25rem;
  font-weight: 300;
}

.about-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 3rem;
  align-items: start;
  max-width: 56rem;
  margin: 0 auto;
}

.about-copy p {
  margin: 0 0 1rem;
}

.about-copy p:last-child {
  margin-bottom: 0;
}

.about-card {
  border: 1px solid var(--line);
  padding: 1.5rem 1.5rem 1.35rem;
}

.about-card h3 {
  margin: 0 0 0.6rem;
  font-size: 1.15rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--navy);
}

.about-card p {
  margin: 0;
  color: var(--text-muted);
}

/* Gallery */

.gallery-grid {
  column-count: 3;
  column-gap: 1.1rem;
}

.gallery-item {
  margin: 0 0 1.1rem;
  background: var(--white);
  border: 0;
  display: flex;
  flex-direction: column;
  break-inside: avoid;
  -webkit-column-break-inside: avoid;
  page-break-inside: avoid;
}

.gallery-item button {
  appearance: none;
  border: 0;
  padding: 0;
  margin: 0;
  background: none;
  cursor: pointer;
  display: block;
  width: 100%;
  text-align: left;
  color: inherit;
  font: inherit;
}

.gallery-item button:focus-visible {
  outline: 2px solid var(--aqua);
  outline-offset: 2px;
}

.gallery-item img {
  width: 100%;
  height: auto;
  display: block;
  transition: opacity 0.4s ease;
}

.gallery-item button:hover img {
  opacity: 0.92;
}

.gallery-item figcaption {
  padding: 0.85rem 0.9rem 1rem;
  font-size: 0.82rem;
  font-weight: 400;
  letter-spacing: 0.04em;
  color: var(--navy);
  line-height: 1.4;
  background: var(--white);
}

.cookie-note {
  margin: 1.75rem auto 0;
  max-width: 50rem;
  border: 1px dashed var(--line-strong);
  padding: 1.2rem 1.4rem;
  text-align: center;
}

.cookie-note p {
  margin: 0;
  color: var(--text-muted);
}

.gallery-soon {
  background: transparent;
}

.gallery-soon-tile {
  min-height: 16rem;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 1.25rem;
  border: 1px dashed var(--line-strong);
  background: var(--white);
  color: var(--navy);
  flex: 1;
}

.gallery-soon-tile p {
  margin: 0;
  font-weight: 500;
  font-size: 0.85rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  line-height: 1.5;
}

.gallery-actions {
  display: flex;
  justify-content: center;
  margin: 1.75rem 0 0;
}

.cookie-note strong {
  color: var(--link);
  font-weight: 600;
}

/* Order */

.order-intro {
  text-align: center;
  max-width: 40rem;
  margin: 0 auto 2.5rem;
}

.order-intro p {
  color: var(--text-muted);
  font-weight: 300;
}

.form-disclaimer {
  margin: 0 0 1.5rem;
  padding: 1rem 1.1rem;
  border: 1px solid var(--line);
  background: var(--white);
  color: var(--text);
  font-weight: 400;
}

.size-guide {
  margin: 0 0 1.6rem;
  padding: 1.15rem 1.2rem 1rem;
  border: 1px solid var(--line);
  background: var(--white);
}

.size-guide h3 {
  margin: 0 0 0.7rem;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--aqua);
}

.size-guide p {
  margin: 0 0 0.7rem;
  color: var(--text-muted);
  font-weight: 300;
}

.size-guide p:last-child {
  margin-bottom: 0;
}

.date-warning {
  margin: 0.45rem 0 0;
  color: #0B4F6B;
  font-weight: 500;
  font-size: 0.92rem;
}

.date-warning[hidden] {
  display: none;
}

.contact-line {
  margin: 0 0 0;
}

.email-link {
  color: var(--link);
  font-weight: 500;
  letter-spacing: 0.04em;
  text-decoration: none;
  border-bottom: 1px solid var(--link);
  padding-bottom: 0.05rem;
}

.email-link:hover {
  color: var(--navy-deep);
  border-bottom-color: var(--navy-deep);
}

.serving {
  margin: 0.85rem 0 0;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-size: 0.82rem;
  color: var(--text);
}

.order-form {
  width: min(var(--form-max), 100%);
  margin: 0 auto;
  text-align: left;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.1rem;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  margin-bottom: 1.15rem;
}

label,
.field-label {
  font-weight: 500;
  font-size: 0.98rem;
  color: var(--text);
}

.req {
  color: var(--link);
  font-weight: 500;
  font-size: 0.8rem;
}

.optional {
  font-weight: 400;
  color: var(--text-muted);
  font-size: 0.85rem;
}

input[type="text"],
input[type="email"],
input[type="tel"],
input[type="date"],
input[type="number"],
select,
textarea {
  font: inherit;
  color: var(--navy);
  background: var(--white);
  border: 1px solid #8ab8c4;
  border-radius: 2px;
  padding: 0.7rem 0.85rem;
  width: 100%;
}

input:hover,
select:hover,
textarea:hover {
  border-color: var(--aqua-mid);
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--aqua-mid);
  box-shadow: 0 0 0 3px rgba(30, 200, 230, 0.35);
  outline: none;
}

textarea {
  min-height: 8.5rem;
  resize: vertical;
}

.form-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.9rem 1.2rem;
  margin-top: 0.4rem;
}

.form-hint {
  margin: 0;
  font-size: 0.88rem;
  color: var(--text-muted);
  font-weight: 300;
}

.form-status {
  margin: 0.9rem 0 0;
  font-weight: 500;
  color: var(--aqua);
  min-height: 1.3em;
}

.form-status:empty {
  display: none;
}

/* Footer */

.site-footer {
  background: var(--navy-deep);
  color: #C5D4E0;
  padding: 2.25rem 0;
  border-top: 1px solid rgba(127, 227, 245, 0.25);
  font-size: 0.9rem;
}

.footer-inner {
  width: min(var(--max), calc(100% - 2rem));
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.75rem 1.5rem;
}

.site-footer p {
  margin: 0;
}

.site-footer a {
  color: var(--aqua-light);
}

.site-footer a:hover {
  color: var(--white);
}

/* Lightbox */

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 300;
  background: rgba(11, 37, 69, 0.96);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 3.5rem 3.5rem 4.5rem;
}

.lightbox.is-open {
  display: flex;
}

.lightbox img {
  max-width: min(100%, 52rem);
  max-height: calc(100vh - 8rem);
  width: auto;
  height: auto;
  object-fit: contain;
  box-shadow: 0 16px 50px rgba(0, 0, 0, 0.45);
}

.lightbox-caption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 1rem;
  text-align: center;
  color: var(--text-on-dark);
  font-size: 0.95rem;
  font-weight: 300;
  letter-spacing: 0.04em;
  padding: 0 1rem;
}

.lightbox-close,
.lightbox-prev,
.lightbox-next {
  position: absolute;
  appearance: none;
  border: 2px solid var(--aqua-mid);
  background: transparent;
  color: var(--aqua);
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 0;
  cursor: pointer;
  font-size: 1.4rem;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox-close:hover,
.lightbox-prev:hover,
.lightbox-next:hover {
  background: var(--aqua-mid);
  color: var(--navy);
}

.lightbox-close {
  top: 1rem;
  right: 1rem;
  font-size: 1.7rem;
}

.lightbox-prev { left: 0.75rem; }
.lightbox-next { right: 0.75rem; }

body.lightbox-open {
  overflow: hidden;
}


/* Flavor, filling, flowers, photos, agreements */

.flavor-sections {
  display: grid;
  gap: 1.35rem;
  margin: 0 0 1.25rem;
}

.choice-set,
.agree-set {
  margin: 0 0 1.25rem;
  padding: 1rem 1.05rem 0.85rem;
  border: 1px solid var(--line);
  background: var(--white);
  min-width: 0;
}

.flavor-sections .choice-set {
  margin-bottom: 0;
}

.choice-set legend,
.agree-set legend {
  font-weight: 500;
  font-size: 0.98rem;
  color: var(--text);
  padding: 0 0.35rem;
}

.choice {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  margin: 0 0 0.45rem;
  padding: 0.45rem 0.55rem;
  border: 1px solid transparent;
  cursor: pointer;
}

.choice:last-child {
  margin-bottom: 0;
}

.choice:hover {
  background: var(--bg);
  border-color: var(--line);
}

.choice input {
  margin-top: 0.3rem;
  accent-color: var(--aqua-mid);
  flex-shrink: 0;
}

.choice-body {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.2rem 0.5rem;
}

.choice-name {
  color: var(--navy);
  font-weight: 500;
}

.choice-note {
  color: var(--text-muted);
  font-size: 0.86rem;
  font-weight: 400;
}

.check-line {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  margin: 0.35rem 0 0;
  cursor: pointer;
  color: var(--navy);
}

.check-line input {
  margin-top: 0.2rem;
  accent-color: var(--aqua-mid);
}

.allergen-notice {
  margin: 0 0 1.25rem;
  padding: 1rem 1.1rem;
  border: 1px solid var(--line);
  background: var(--white);
}

.allergen-notice p {
  margin: 0 0 0.75rem;
  color: var(--text);
}

.photo-previews {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  list-style: none;
  margin: 0.75rem 0 0;
  padding: 0;
}

.photo-previews li {
  width: 6.5rem;
  margin: 0;
}

.photo-previews img {
  width: 6.5rem;
  height: 6.5rem;
  object-fit: cover;
  border: 1px solid var(--line);
  background: var(--white);
}

.photo-previews span {
  display: block;
  margin-top: 0.3rem;
  font-size: 0.75rem;
  color: var(--text-muted);
  word-break: break-all;
}

.photo-error {
  margin: 0.45rem 0 0;
  color: #C8102E;
  font-weight: 500;
  font-size: 0.92rem;
}

.photo-error[hidden] {
  display: none;
}

input[type="file"] {
  font: inherit;
  color: var(--navy);
  max-width: 100%;
}

.important-note {
  margin: 1rem 0 0.75rem;
  padding: 0.95rem 1.05rem;
  background: #FFF7F8;
  border: 1px solid #F0B3BC;
  color: #C8102E;
  font-weight: 700;
  line-height: 1.55;
}

.important-note .important-label {
  display: block;
  margin: 0 0 0.35rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.82rem;
}

.important-note p {
  margin: 0;
  font-weight: 700;
}

.footer-social a {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  text-decoration: none;
}

.footer-social svg {
  width: 1.15rem;
  height: 1.15rem;
}


.field-hint {
  margin: 0.25rem 0 0;
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 400;
}

.policy {
  margin: 1.5rem 0 1rem;
  padding: 1.15rem 1.2rem 1rem;
  border: 1px solid var(--line);
  background: var(--white);
  scroll-margin-top: calc(var(--header-h) + 0.75rem);
}

.policy h3 {
  margin: 0 0 0.7rem;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--link);
}

.policy p {
  margin: 0 0 0.7rem;
  color: var(--text);
  font-weight: 400;
}

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

.check-line a {
  color: var(--link);
}

/* Responsive */

@media (max-width: 900px) {
  .about-grid {
    grid-template-columns: 1fr;
    gap: 1.75rem;
  }

  .hero {
    padding: 2.75rem 0 3rem;
  }

  .hero-photo {
    max-width: 16rem;
  }

  .gallery-grid {
    column-count: 2;
    column-gap: 0.75rem;
  }

  .form-row {
    grid-template-columns: 1fr;
    gap: 0;
  }
}

@media (max-width: 720px) {
  .nav-toggle {
    display: inline-flex;
  }

  .site-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--navy-deep);
    border-bottom: 1px solid rgba(127, 227, 245, 0.25);
    padding: 0.5rem 1rem 1rem;
  }

  .site-nav.is-open {
    display: block;
  }

  .site-nav ul {
    flex-direction: column;
  }

  .site-nav a {
    display: block;
    padding: 0.85rem 0.4rem;
  }

  .logo-name {
    font-size: 0.78rem;
    letter-spacing: 0.12em;
  }

  .rule-title::before,
  .rule-title::after {
    display: none;
  }
}

@media (max-width: 520px) {
  .gallery-grid {
    column-count: 2;
    column-gap: 0.6rem;
  }

  .gallery-item figcaption {
    font-size: 0.75rem;
    padding: 0.55rem 0.6rem 0.7rem;
  }

  .section {
    padding: 3rem 0;
  }

  .hero-actions {
    flex-direction: column;
    align-items: stretch;
    padding: 0 0.5rem;
  }

  .lightbox {
    padding: 4rem 0.75rem 4.5rem;
  }

  .lightbox-prev { left: 0.25rem; }
  .lightbox-next { right: 0.25rem; }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}
