html { min-width: 320px; min-height: 100%; }
button:focus-visible, input:focus-visible, a:focus-visible { outline: 3px solid #b45b6e; outline-offset: 4px; }

.access-page {
  display: flex;
  min-height: 100svh;
  flex-direction: column;
  padding: 0 clamp(1.25rem, 5vw, 5rem);
  color: #fff;
  background-image:
    linear-gradient(90deg, rgba(18, 31, 24, .64) 0%, rgba(18, 31, 24, .5) 46%, rgba(18, 31, 24, .32) 100%),
    linear-gradient(0deg, rgba(18, 31, 24, .2), rgba(18, 31, 24, .08)),
    url("/assets/calanque-en-vau.jpg");
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
  background-attachment: fixed;
}
.access-header,
.access-footer {
  display: flex;
  width: min(100%, 1120px);
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-inline: auto;
}
.access-header {
  min-height: 86px;
  border-bottom: 1px solid rgba(255, 255, 255, .3);
}
.access-header > p {
  margin: 0;
  color: rgba(255, 255, 255, .92);
  font: italic .95rem var(--serif);
  text-shadow: 0 1px 12px rgba(0, 0, 0, .2);
}
.access-mark {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  gap: .7rem;
  color: #fff;
  text-decoration: none;
}
.access-mark__monogram {
  color: var(--rose);
  font: 400 1.3rem var(--serif);
  letter-spacing: -.09em;
}
.access-mark__monogram span { color: rgba(255, 255, 255, .9); font-size: .9em; }
.access-mark__label { color: rgba(255, 255, 255, .92); font: italic 1rem var(--serif); }

.access-layout {
  display: grid;
  width: min(100%, 1040px);
  flex: 1;
  grid-template-columns: minmax(0, 1.1fr) minmax(330px, .9fr);
  align-items: center;
  gap: clamp(3rem, 8vw, 8rem);
  margin: 0 auto;
  padding: clamp(3rem, 8vh, 6rem) 0;
}
.access-story { min-width: 0; animation: access-rise .7s both; }
.access-story__eyebrow { display: flex; align-items: center; gap: .65rem; margin-bottom: 1.05rem; }
.access-eyebrow {
  margin: 0;
  color: #fff1dc;
  font: italic 1rem var(--serif);
  text-shadow: 0 1px 12px rgba(0, 0, 0, .25);
}
.access-flower {
  display: block;
  width: 72px;
  height: 72px;
  object-fit: contain;
  filter: drop-shadow(0 5px 10px rgba(82, 40, 41, .12));
  transform: rotate(7deg);
}
.access-story h1 {
  margin: 0;
  color: #fff;
  font: 400 clamp(3.6rem, 7vw, 6.5rem)/.98 var(--serif);
  letter-spacing: -.065em;
  text-shadow: 0 2px 30px rgba(0, 0, 0, .25);
}
.access-description {
  max-width: 430px;
  margin: 1.6rem 0 0;
  color: rgba(255, 255, 255, .93);
  font-size: 1rem;
  line-height: 1.8;
  text-shadow: 0 1px 16px rgba(0, 0, 0, .3);
}
.access-signature {
  margin: 2rem 0 0;
  color: rgba(255, 255, 255, .82);
  font: italic .98rem/1.7 var(--serif);
}
.access-signature span { color: var(--rose); }

.access-panel {
  min-width: 0;
  padding: clamp(1.8rem, 4vw, 2.7rem);
  border: 1px solid rgba(45, 70, 55, .1);
  border-radius: var(--radius);
  background: rgba(255, 254, 250, .8);
  box-shadow: 0 24px 70px rgba(45, 58, 45, .075);
  color: var(--ink);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  animation: access-rise .7s .08s both;
}
.access-panel__inner { width: min(100%, 420px); margin-inline: auto; }
.access-panel h2 {
  margin: 0;
  color: var(--green);
  font: 400 clamp(2.2rem, 4vw, 3rem)/1.08 var(--serif);
  letter-spacing: -.045em;
}
#guest-access-form,
#admin-access-form { display: grid; gap: .85rem; }
.access-field { display: grid; gap: .45rem; color: var(--green); font-size: .82rem; font-weight: 650; }
.access-field input {
  width: 100%;
  min-height: 52px;
  padding: .75rem .85rem;
  border: 1px solid rgba(45, 70, 55, .25);
  border-radius: var(--radius-control);
  background: rgba(255, 254, 250, .75);
  color: var(--ink);
  transition: border-color .18s ease, background .18s ease;
}
.access-field input:focus { outline: none; border-color: var(--wine); background: #fffefa; }
#invitation-code { font-size: 1rem; font-weight: 650; letter-spacing: .15em; text-transform: uppercase; }
.access-help { margin: -.25rem 0 .3rem; color: var(--muted); font-size: .78rem; line-height: 1.5; }
.access-submit {
  display: inline-flex;
  width: fit-content;
  min-width: 170px;
  min-height: 50px;
  align-items: center;
  justify-content: center;
  margin-top: .3rem;
  padding: .8rem 1.2rem;
  border: 1px solid var(--wine);
  border-radius: var(--radius-control);
  background: var(--wine);
  color: white;
  cursor: pointer;
  font-size: .88rem;
  font-weight: 650;
  transition: background .18s ease, border-color .18s ease;
}
.access-submit:hover { border-color: #762b3d; background: #762b3d; }
.access-submit:disabled { cursor: wait; opacity: .65; }
.access-status { min-height: 1.25rem; margin: .1rem 0 0; color: var(--green); font-size: .82rem; line-height: 1.5; }
.access-status[data-error="true"] { color: var(--wine); }
.access-admin { margin-top: 2rem; padding-top: 1.15rem; border-top: 1px solid var(--rule); }
.access-admin__toggle {
  display: grid;
  gap: .25rem;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: .8rem;
  text-align: left;
}
.access-admin__prompt { color: var(--muted); }
.access-admin__action { width: fit-content; color: var(--wine); text-decoration: underline; text-underline-offset: .2rem; }
.access-admin__toggle:hover .access-admin__action { color: var(--green); }
.access-admin__panel { margin-top: 1.6rem; }
.access-admin__panel h3 { margin: 0 0 1rem; color: var(--green); font: 400 1.8rem/1.1 var(--serif); }
.access-footer {
  min-height: 64px;
  border-top: 1px solid rgba(255, 255, 255, .3);
  color: rgba(255, 255, 255, .9);
  font-size: .73rem;
}
.access-photo-credit { margin: 0; color: rgba(255, 255, 255, .86); font-size: .66rem; line-height: 1.5; text-align: right; }
.access-photo-credit a { color: inherit; text-underline-offset: .16em; }
.access-photo-credit a:hover { color: #fff; }
@keyframes access-rise {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 900px) {
  .access-page { padding-inline: clamp(1rem, 5vw, 1.5rem); }
  .access-header {
    min-height: 0;
    flex-direction: column;
    justify-content: center;
    gap: .35rem;
    padding: 1rem 0;
    text-align: center;
  }
  .access-header > p { font-size: .9rem; }
  .access-layout {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 1.5rem;
    padding: 2rem 0 1.5rem;
  }
  .access-story { width: min(100%, 480px); text-align: center; }
  .access-story__eyebrow { justify-content: center; gap: .45rem; margin-bottom: .65rem; }
  .access-flower { width: 52px; height: 52px; }
  .access-story h1 { font-size: clamp(3rem, 11vw, 4.4rem); line-height: .98; }
  .access-description { max-width: 31ch; margin: .8rem auto 0; font-size: .92rem; line-height: 1.6; }
  .access-signature { display: none; }
  .access-panel { width: min(100%, 460px); padding: 1.4rem clamp(1rem, 5vw, 1.5rem); border-radius: var(--radius); background: rgba(255, 254, 250, .89); text-align: center; }
  .access-panel__inner { width: 100%; }
  .access-panel h2 { margin-bottom: 1rem; font-size: 2.1rem; }
  #guest-access-form,
  #admin-access-form { text-align: left; }
  .access-help { text-align: center; }
  .access-submit { width: 100%; }
  .access-admin { margin-top: 1.3rem; }
  .access-admin__toggle { width: 100%; justify-items: center; gap: .2rem; text-align: center; }
  .access-admin__action { width: auto; }
  .access-admin__panel { text-align: left; }
  .access-admin__panel h3 { text-align: center; }
  .access-page {
    background-image:
      linear-gradient(180deg, rgba(18, 31, 24, .49), rgba(18, 31, 24, .48)),
      url("/assets/calanque-en-vau.jpg");
    background-position: 28% center;
    background-attachment: scroll;
  }
  .access-footer {
    display: flex;
    min-height: 0;
    flex-direction: column;
    justify-content: center;
    gap: .2rem;
    padding: .35rem 0 .55rem;
    border-top: 0;
    text-align: center;
  }
  .access-photo-credit { font-size: .6rem; text-align: center; }
}
@media (min-width: 901px) and (max-height: 820px) {
  .access-header { min-height: 68px; }
  .access-layout { gap: clamp(2rem, 5vw, 5rem); padding-block: clamp(.6rem, 1.8vh, 1.2rem); }
  .access-story h1 { font-size: clamp(3.5rem, 6vw, 5.5rem); line-height: .92; }
  .access-description { margin-top: 1rem; line-height: 1.55; }
  .access-signature { margin-top: 1rem; }
  .access-panel { padding: clamp(1.25rem, 2.5vw, 2rem); }
  .access-panel h2 { font-size: clamp(2rem, 3.5vw, 2.6rem); }
  #guest-access-form,
  #admin-access-form { gap: .65rem; }
  .access-field input { min-height: 48px; }
  .access-submit { min-height: 46px; }
  .access-admin { margin-top: 1.1rem; padding-top: .85rem; }
  .access-admin__panel { margin-top: .95rem; }
  .access-admin__panel h3 { margin-bottom: .6rem; font-size: 1.5rem; }
  .access-footer { min-height: 48px; }
}
@media (max-width: 420px) {
  .access-header > p { font-size: .85rem; }
  .access-story h1 { font-size: clamp(2.8rem, 11vw, 3.5rem); }
  .access-description { max-width: 29ch; }
}
@media (max-width: 600px) {
  .access-page { padding-bottom: 0; }
  .access-header { gap: .25rem; padding-block: .65rem; }
  .access-mark { gap: .5rem; }
  .access-mark__monogram { font-size: 1.15rem; }
  .access-mark__label { font-size: .9rem; }
  .access-layout { gap: .75rem; padding: 1rem 0 .75rem; }
  .access-story__eyebrow { gap: .35rem; margin-bottom: .4rem; }
  .access-flower { width: 42px; height: 42px; }
  .access-story h1 { font-size: clamp(2.25rem, 9vw, 3rem); line-height: .94; }
  .access-description { margin-top: .5rem; font-size: .85rem; line-height: 1.4; }
  .access-panel { padding: .95rem 1rem; border-radius: var(--radius-control); }
  .access-panel h2 { margin-bottom: .65rem; font-size: 1.75rem; }
  #guest-access-form,
  #admin-access-form { gap: .5rem; }
  .access-field { gap: .3rem; font-size: .76rem; }
  .access-field input { min-height: 44px; padding: .55rem .7rem; }
  #invitation-code { font-size: .92rem; }
  .access-help { margin: -.2rem 0 .05rem; font-size: .72rem; }
  .access-submit { min-height: 44px; margin-top: 0; padding: .65rem .9rem; font-size: .84rem; }
  .access-status { min-height: 0; font-size: .76rem; }
  .access-status:empty { display: none; }
  .access-admin { margin-top: .8rem; padding-top: .7rem; }
  .access-admin__toggle { gap: .15rem; font-size: .74rem; }
  .access-admin__panel { margin-top: .8rem; }
  .access-admin__panel h3 { margin-bottom: .6rem; font-size: 1.5rem; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}
