:root {
  --navy:   #061c3c;
  --green:  #4e6f18;
  --gold:   #ffc72c;
  --cream:  #f6f3ed;
  --line:   rgba(6, 28, 60, 0.18);
  --shadow: 0 18px 55px rgba(8, 20, 45, 0.16);
  --nav-h:  60px;
  --serif:  Georgia, "Times New Roman", serif;
  --sans:   "Segoe UI", Arial, sans-serif;
}

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

html, body {
  height: 100%;
  font-family: var(--sans);
  background: #000;
  -webkit-text-size-adjust: 100%;
}

body { overflow: hidden; }

button, input, select, textarea { font: inherit; }

/* ── NAV ──────────────────────────────────────────────────────── */
.main-nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 300;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  background: var(--navy);
  border-bottom: 1px solid rgba(255,255,255,0.08);
  /* safe area for notched phones */
  padding-left: max(20px, env(safe-area-inset-left));
  padding-right: max(20px, env(safe-area-inset-right));
}

.nav__brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.nav__logo {
  flex-shrink: 0;
  height: 44px;
  width: auto;
  display: block;
  border-radius: 6px;
}

.nav__m {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--gold);
  color: var(--navy);
  font-weight: 900;
  font-size: 1.15rem;
}

.nav__title {
  color: white;
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.nav__title em {
  font-style: normal;
  color: rgba(255,255,255,0.45);
  font-weight: 400;
}

.nav__links {
  display: flex;
  align-items: center;
  list-style: none;
  gap: 2px;
  flex-shrink: 0;
}

.nav__item { position: relative; }

.nav__btn {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 8px 14px;
  background: none;
  border: none;
  color: rgba(255,255,255,0.75);
  font-size: 0.88rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  cursor: pointer;
  border-radius: 6px;
  transition: background 0.15s, color 0.15s;
  white-space: nowrap;
  /* touch-friendly minimum */
  min-height: 44px;
}

.nav__btn:hover,
.nav__item.is-open .nav__btn {
  background: rgba(255,255,255,0.1);
  color: white;
}

.nav__caret {
  font-size: 0.6rem;
  transition: transform 0.2s;
  display: inline-block;
}

.nav__item.is-open .nav__caret { transform: rotate(180deg); }

.dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 210px;
  list-style: none;
  padding: 6px 0;
  background: white;
  border-radius: 10px;
  box-shadow: 0 16px 48px rgba(8,20,45,0.22);
  z-index: 400;
}

.nav__item.is-open .dropdown { display: block; }

.dropdown li + li { border-top: 1px solid rgba(6,28,60,0.07); }

.dropdown__link {
  display: block;
  padding: 12px 20px;
  color: var(--navy);
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.1s, color 0.1s;
  /* touch-friendly */
  min-height: 44px;
  display: flex;
  align-items: center;
}

.dropdown__link:hover {
  background: var(--cream);
  color: var(--green);
}

/* ── LANDING PAGE ─────────────────────────────────────────────── */
.landing {
  position: fixed;
  inset: 0;
  z-index: 500;
  background: #000;
}

/* Image fills the full landing container */
.landing__img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center center;
  display: block;
}

/* Button overlaid inside the image, below the "Take the Questionnaire" circle */
.landing__btn {
  position: absolute;
  bottom: calc(7% - 1cm);
  left: 50%;
  transform: translateX(-50%);
  padding: 11px 38px;
  background: var(--green);
  color: #fff;
  font-size: 0.92rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border: none;
  border-radius: 50px;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(0,0,0,0.35);
  transition: background 0.18s, opacity 0.1s;
  white-space: nowrap;
  touch-action: manipulation;
}

.landing__btn:hover  { background: #3d5812; }
.landing__btn:active { opacity: 0.75; }

.landing.is-hidden { display: none; }

/* ── STORE SELECT HEADING (inside nav bar) ────────────────────── */
.store-select-heading {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  white-space: nowrap;
  font-size: clamp(0.8rem, 1.8vw, 1rem);
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #fff;
  pointer-events: none;
}

/* ── 4-QUADRANT GRID ──────────────────────────────────────────── */
.quad-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  /* fill the screen exactly — dvh accounts for mobile browser chrome */
  height: 100vh;
  height: 100dvh;
  padding-top: var(--nav-h);
  gap: 5px;
  background: #000;
}

.quad {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  overflow: hidden;
  /* no tap highlight on mobile */
  -webkit-tap-highlight-color: transparent;
}

/* restaurant photo — object-fit:contain shows full image, no cropping */
.quad__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center center;
  z-index: 0;
}

/* dark gradient overlay for text legibility */
.quad__overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(
    to top,
    rgba(6,28,60,0.92) 0%,
    rgba(6,28,60,0.45) 40%,
    rgba(6,28,60,0.12) 100%
  );
  transition: background 0.3s;
}

.quad:hover .quad__overlay,
.quad:focus-within .quad__overlay {
  background: linear-gradient(
    to top,
    rgba(6,28,60,0.96) 0%,
    rgba(6,28,60,0.6) 50%,
    rgba(6,28,60,0.22) 100%
  );
}

/* content block (eyebrow + name + select) — sits at the bottom left */
.quad__body {
  position: relative;
  z-index: 2;
  padding: 0 18px 60px 18px; /* bottom padding clears the Start Survey button */
}

.quad__eyebrow {
  display: block;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 4px;
}

.quad__name {
  font-family: var(--serif);
  font-size: clamp(1.5rem, 2.8vw, 3rem);
  font-weight: 700;
  line-height: 1;
  color: white;
  margin-bottom: 12px;
}

/* employee name dropdown */
.quad__select {
  width: 100%;
  max-width: 240px;
  padding: 9px 12px;
  border: 1px solid rgba(255,255,255,0.35);
  border-radius: 7px;
  background: rgba(4,18,40,0.65);
  color: white;
  font-size: 0.86rem;
  cursor: pointer;
  outline: none;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  /* custom arrow */
  -webkit-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23ffc72c' stroke-width='2' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  padding-right: 30px;
}

.quad__select option {
  background: var(--navy);
  color: white;
}

.quad__select:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(255,199,44,0.28);
}

/* Start Survey button — pinned to bottom-right, transparent/text-only */
.quad__start {
  position: absolute;
  bottom: 16px;
  right: 16px;
  z-index: 3;
  padding: 8px 4px;
  background: none;
  border: none;
  color: var(--gold);
  font-weight: 700;
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  white-space: nowrap;
  /* min touch target */
  min-height: 44px;
  display: flex;
  align-items: center;
  transition: color 0.15s;
}

.quad__start:hover { color: white; }
.quad__start:active { opacity: 0.7; }

/* ── MODAL SHARED ─────────────────────────────────────────────── */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 500;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(6,28,60,0.72);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.modal-backdrop[hidden] { display: none; }

.modal {
  position: relative;
  width: min(620px, 100%);
  max-height: calc(100dvh - 40px);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: clamp(20px, 4vw, 40px);
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 32px 80px rgba(8,20,45,0.35);
}

#modalBackdrop .modal {
  width: min(1120px, 100%);
  overflow-x: hidden;
}

.survey-form {
  position: relative;
  z-index: 2;
  width: min(660px, 100%);
  margin: 0 auto;
}

.modal-collage {
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  min-height: 1280px;
  z-index: 0;
  pointer-events: none;
  overflow: visible;
  border-radius: inherit;
}

.modal-collage::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 1280px;
  background: linear-gradient(90deg, rgba(255,255,255,0.16), rgba(255,255,255,0.82) 28%, rgba(255,255,255,0.82) 72%, rgba(255,255,255,0.16));
  z-index: 1;
}

.modal-collage__image {
  position: absolute;
  z-index: 2;
  width: clamp(208px, 21.1vw, 275px);
  height: auto;
  max-height: 243px;
  object-fit: contain;
  background: white;
  border: 8px solid white;
  border-radius: 8px;
  box-shadow: 0 22px 45px rgba(8,20,45,0.22);
  display: block;
  opacity: 0.34;
}

.modal-collage__image--school {
  right: clamp(8px, 2vw, 34px);
  top: 58px;
  transform: rotate(-5deg);
}

.modal-collage__image--restaurant {
  left: clamp(8px, 2vw, 34px);
  top: 350px;
  transform: rotate(4deg);
  box-shadow: 0 30px 55px rgba(8,20,45,0.28);
}

.modal-collage__image--restaurant-lower {
  right: clamp(8px, 2vw, 34px);
  top: 640px;
  transform: rotate(5deg);
  box-shadow: 0 26px 52px rgba(8,20,45,0.26);
}

.modal-collage__image--school-lower {
  left: clamp(8px, 2vw, 34px);
  top: 930px;
  transform: rotate(-4deg);
  box-shadow: 0 20px 42px rgba(8,20,45,0.21);
}

.modal--wide { width: min(860px, 100%); }

.modal__close {
  position: sticky;
  top: 0;
  float: right;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border: none;
  border-radius: 50%;
  background: #f0f0ec;
  color: var(--navy);
  font-size: 1rem;
  cursor: pointer;
  z-index: 3;
  margin: -6px -6px 8px 14px;
}

.modal__close:hover { background: #e2e2de; }

/* ── SURVEY FORM ──────────────────────────────────────────────── */
.step-label {
  display: block;
  margin: 0 0 14px;
  color: var(--green);
  font-size: 1.2rem;
  font-weight: 900;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

h2 {
  margin-bottom: 20px;
  color: var(--navy);
  font-family: var(--serif);
  font-size: clamp(1.7rem, 4vw, 2.6rem);
  line-height: 1.05;
}

.step { display: none; }
.step.is-active { display: block; }

.field {
  display: grid;
  gap: 7px;
  margin-bottom: 16px;
}

label, legend {
  color: var(--navy);
  font-weight: 800;
  font-size: 0.95rem;
}

select, input[type="date"], textarea {
  width: 100%;
  border: 1px solid rgba(6,28,60,0.25);
  border-radius: 8px;
  padding: 13px 14px;
  color: #111827;
  background: #fbfbf8;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
  /* iOS zoom fix — font-size must be >= 16px */
  font-size: 16px;
}

select:focus, input:focus, textarea:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 4px rgba(78,111,24,0.16);
}

textarea { resize: vertical; }

.primary-button,
.secondary-button {
  min-height: 52px;
  border: 0;
  border-radius: 8px;
  padding: 0 22px;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
  font-size: 0.9rem;
  transition: opacity 0.15s, transform 0.12s;
}

.primary-button {
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  color: white;
  background: linear-gradient(135deg, var(--green), #35510f);
  box-shadow: 0 8px 18px rgba(41,65,13,0.22);
}

.primary-button:hover { opacity: 0.9; }
.primary-button:active { transform: scale(0.98); }

.primary-button span {
  width: 28px;
  height: 28px;
  display: inline-grid;
  place-items: center;
  border-radius: 50%;
  background: white;
}

.primary-button span::before {
  content: "";
  width: 8px;
  height: 8px;
  border: solid var(--green);
  border-width: 2.5px 2.5px 0 0;
  transform: rotate(45deg);
}

.secondary-button {
  color: var(--navy);
  background: #ebece7;
}

.secondary-button:hover { background: #dfe0db; }

.check-list {
  display: grid;
  gap: 10px;
  margin: 0 0 18px;
  padding: 0;
  border: 0;
}

.check-list legend { margin-bottom: 8px; }

.check-list label {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  color: #172033;
  font-weight: 600;
  font-size: 0.95rem;
  /* larger touch target */
  min-height: 28px;
}

.check-list input[type="radio"] {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  margin-top: 1px;
  accent-color: var(--green);
  cursor: pointer;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.button-row {
  display: grid;
  grid-template-columns: 0.55fr 1.45fr;
  gap: 12px;
}

/* ── AVAILABILITY GRID ────────────────────────────────────────── */
.avail-section {
  margin-bottom: 20px;
}

.avail-label {
  color: var(--navy);
  font-weight: 800;
  font-size: 0.95rem;
  margin-bottom: 10px;
}

.avail-grid {
  border: 1px solid rgba(6,28,60,0.15);
  border-radius: 8px;
  overflow: hidden;
}

.avail-header,
.avail-row {
  display: grid;
  grid-template-columns: 110px 1fr 1fr;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
}

.avail-header {
  background: #f0f1ec;
  font-size: 0.75rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--navy);
  padding-block: 8px;
}

.avail-row + .avail-row {
  border-top: 1px solid rgba(6,28,60,0.08);
}

.avail-row:nth-child(odd) { background: #fafaf7; }

.avail-day {
  font-weight: 700;
  font-size: 0.88rem;
  color: var(--navy);
}

select.avail-time {
  padding: 8px 10px;
  border-radius: 5px;
  font-size: 16px;
}

.avail-label-note {
  font-weight: 600;
  font-size: 0.82rem;
  color: rgba(6,28,60,0.78);
  font-style: italic;
  letter-spacing: 0;
  text-transform: none;
}

.confirmation__heading {
  font-size: clamp(1.3rem, 3vw, 1.7rem);
  margin-bottom: 12px;
}

.loa-info {
  color: #1f2937;
  font-size: 0.95rem;
  line-height: 1.6;
  margin-bottom: 20px;
}

/* ── LEAVE OF ABSENCE LOCK ────────────────────────────────────── */
.step.is-loa-active .plan-label:not(.plan-label--loa),
.step.is-loa-active .form-grid,
.step.is-loa-active > .field,
.step.is-loa-active .avail-section {
  opacity: 0.3;
  pointer-events: none;
  user-select: none;
}

.confirmation p {
  color: #1f2937;
  font-size: 1.05rem;
  line-height: 1.55;
  margin-bottom: 24px;
}

/* ── RESPONSES MODAL ──────────────────────────────────────────── */
.responses-title {
  font-family: var(--serif);
  color: var(--navy);
  margin-bottom: 20px;
}

.response-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  margin-bottom: 12px;
  overflow: hidden;
}

.response-card__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 11px 16px;
  background: var(--cream);
  font-size: 0.92rem;
  color: var(--navy);
}

.response-card__date {
  font-size: 0.8rem;
  color: #6b7280;
  font-weight: 400;
}

.response-card__body {
  padding: 12px 16px;
  font-size: 0.9rem;
  line-height: 1.5;
}

.response-card__body p { margin: 0 0 5px; }
.response-card__body p:last-child { margin-bottom: 0; }

.no-responses {
  padding: 32px;
  text-align: center;
  color: #6b7280;
}

@media (max-width: 920px) {
  #modalBackdrop .modal {
    width: min(620px, 100%);
  }

  .modal-collage {
    display: none;
  }
}

/* ── TABLET (portrait) ────────────────────────────────────────── */
@media (max-width: 768px) {
  :root { --nav-h: 54px; }

  .nav__title em { display: none; }

  .quad__name { font-size: clamp(1.3rem, 4.5vw, 2.2rem); }
  .quad__body { padding-bottom: 56px; }

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

/* ── PHONE (portrait) ─────────────────────────────────────────── */
@media (max-width: 540px) {
  :root { --nav-h: 50px; }

  .nav__btn { padding: 6px 10px; font-size: 0.82rem; }
  .nav__title { font-size: 0.88rem; }

  .quad__body {
    padding: 0 12px 52px 12px;
  }

  .quad__name {
    font-size: clamp(1.1rem, 5vw, 1.8rem);
    margin-bottom: 8px;
  }

  .quad__eyebrow { font-size: 0.6rem; margin-bottom: 3px; }

  .quad__select {
    font-size: 14px;
    padding: 7px 28px 7px 9px;
    max-width: 100%;
  }

  .quad__start {
    bottom: 10px;
    right: 10px;
    padding: 8px 12px;
    font-size: 0.72rem;
    min-height: 38px;
  }

  /* modal slides up from bottom on phones */
  .modal-backdrop {
    padding: 0;
    align-items: flex-end;
  }

  .modal {
    width: 100%;
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
    max-height: 92dvh;
    padding: 20px 18px 28px;
  }

  .button-row { grid-template-columns: 1fr; }
}

/* ── VERY SMALL PHONES (SE, Galaxy A series) ──────────────────── */
@media (max-width: 375px) {
  .quad__name { font-size: 1rem; }
  .quad__select { font-size: 13px; }
  .quad__start { font-size: 0.68rem; padding: 7px 10px; }
}
