:root {
  --sky: #c0e8e6;
  --cream: #f8f6db;
  --cream-pressed: #ede9c8;
  --brown: #9b603f;
  --sheet: #fffdf0;
}

* { box-sizing: border-box; }

html { background: var(--sky); }

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  background: var(--sky);
  color: var(--brown);
  font-family: "Inclusive Sans", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}

body.sheet-open { overflow: hidden; }

.page-shell {
  min-height: 100vh;
  display: flex;
  justify-content: center;
  background: var(--sky);
}

.invite {
  width: min(100%, 760px);
  margin: 0 auto;
}

.invite-card {
  width: 100%;
  height: auto;
  display: block;
  animation: card-in .8s cubic-bezier(.22,1,.36,1) both;
}

.calendar-area {
  padding: 38px 20px max(48px, env(safe-area-inset-bottom));
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 15px;
}

.reveal {
  animation: rise-in .7s .12s cubic-bezier(.22,1,.36,1) both;
}

.calendar-button {
  border: 0;
  font: inherit;
  cursor: pointer;
  width: min(100%, 320px);
  min-height: 72px;
  padding: 0 28px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 11px;
  background: var(--cream);
  color: var(--brown);
  text-decoration: none;
  font-size: clamp(24px, 5.6vw, 28px);
  font-weight: 400;
  line-height: 1;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
  transition: transform .16s ease, box-shadow .16s ease, background-color .16s ease;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

.calendar-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.14);
}

.calendar-button:active {
  transform: scale(.97);
  background: var(--cream-pressed);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.10);
}

.calendar-button:focus-visible,
.sheet-close:focus-visible,
.calendar-option:focus-visible {
  outline: 3px solid rgba(155, 96, 63, .48);
  outline-offset: 4px;
}

.calendar-icon { display: inline-flex; flex: 0 0 auto; }

.calendar-note {
  margin: 0;
  font-size: 15px;
  letter-spacing: .01em;
  opacity: .78;
  text-align: center;
}

.sheet-backdrop {
  position: fixed;
  inset: 0;
  z-index: 50;
  background: rgba(56, 72, 67, .26);
  opacity: 0;
  backdrop-filter: blur(2px);
  transition: opacity .22s ease;
}

.sheet-backdrop.is-open { opacity: 1; }

.calendar-sheet {
  position: fixed;
  z-index: 60;
  left: 50%;
  bottom: 0;
  width: min(100%, 560px);
  padding: 11px 20px max(26px, env(safe-area-inset-bottom));
  border-radius: 28px 28px 0 0;
  background: var(--sheet);
  box-shadow: 0 -18px 60px rgba(54, 68, 62, .18);
  transform: translate(-50%, 105%);
  opacity: 0;
  transition: transform .3s cubic-bezier(.22,1,.36,1), opacity .18s ease;
}

.calendar-sheet.is-open {
  transform: translate(-50%, 0);
  opacity: 1;
}

.sheet-handle {
  width: 42px;
  height: 5px;
  margin: 2px auto 15px;
  border-radius: 999px;
  background: rgba(155, 96, 63, .22);
}

.sheet-close {
  position: absolute;
  top: 17px;
  right: 17px;
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 50%;
  background: rgba(155, 96, 63, .08);
  color: var(--brown);
  font: 400 28px/1 Arial, sans-serif;
  cursor: pointer;
}

.sheet-copy {
  padding: 0 38px 17px 2px;
}

.sheet-eyebrow {
  margin: 0 0 7px;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: .18em;
}

.sheet-copy h2 {
  margin: 0;
  max-width: 410px;
  font-size: clamp(24px, 6vw, 31px);
  line-height: 1.05;
  font-weight: 500;
  letter-spacing: -.025em;
}

.sheet-copy > p:last-child {
  margin: 11px 0 0;
  font-size: 15px;
  line-height: 1.45;
  opacity: .78;
}

.calendar-options {
  display: grid;
  gap: 10px;
}

.calendar-option {
  min-height: 74px;
  padding: 12px 14px;
  border: 1px solid rgba(155, 96, 63, .13);
  border-radius: 20px;
  display: grid;
  grid-template-columns: 44px 1fr 20px;
  align-items: center;
  gap: 12px;
  color: var(--brown);
  background: rgba(255,255,255,.45);
  text-decoration: none;
  transition: transform .15s ease, background-color .15s ease, border-color .15s ease;
  -webkit-tap-highlight-color: transparent;
}

.calendar-option:hover {
  transform: translateY(-1px);
  background: rgba(255,255,255,.8);
  border-color: rgba(155, 96, 63, .22);
}

.calendar-option:active { transform: scale(.985); }

.option-icon {
  width: 44px;
  height: 44px;
  border-radius: 13px;
  display: grid;
  place-items: center;
  background: var(--cream);
  font-size: 20px;
  font-weight: 500;
}

.apple-icon { font-family: -apple-system, BlinkMacSystemFont, sans-serif; font-size: 24px; }
.outlook-icon { font-size: 18px; }

.calendar-option strong,
.calendar-option small {
  display: block;
}

.calendar-option strong {
  font-size: 17px;
  font-weight: 500;
  line-height: 1.2;
}

.calendar-option small {
  margin-top: 3px;
  font-size: 13px;
  opacity: .7;
  line-height: 1.2;
}

.option-arrow {
  font-size: 28px;
  opacity: .45;
  transform: translateY(-1px);
}

@keyframes card-in {
  from { opacity: 0; transform: translateY(10px) scale(.995); }
  to { opacity: 1; transform: none; }
}

@keyframes rise-in {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: none; }
}

@media (min-width: 700px) {
  .calendar-sheet {
    bottom: 30px;
    border-radius: 28px;
    padding: 14px 22px 24px;
  }
}

@media (min-width: 900px) {
  body {
    background:
      radial-gradient(circle at 15% 15%, rgba(255,255,255,.23), transparent 26%),
      radial-gradient(circle at 85% 80%, rgba(255,255,255,.18), transparent 24%),
      var(--sky);
  }

  .invite {
    margin: 40px auto;
    overflow: hidden;
    border-radius: 30px;
    box-shadow: 0 22px 70px rgba(68, 105, 103, .18);
    background: var(--sky);
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
}
