:root {
  --ink: #0d1820;
  --muted: #5a6874;
  --soft: #edf5f8;
  --panel: rgba(255, 255, 255, 0.72);
  --panel-strong: rgba(255, 255, 255, 0.88);
  --line: rgba(97, 121, 138, 0.2);
  --shadow: 0 24px 70px rgba(14, 32, 44, 0.16);
  --blue: #1c77ff;
  --green: #1f9f72;
  --green-bg: rgba(31, 159, 114, 0.14);
  --yellow: #cc8a00;
  --yellow-bg: rgba(255, 188, 45, 0.18);
  --red: #d64b38;
  --red-bg: rgba(214, 75, 56, 0.14);
  --grey: #7b8791;
  --grey-bg: rgba(123, 135, 145, 0.12);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background:
    radial-gradient(circle at 12% 8%, rgba(105, 174, 235, 0.22), transparent 30%),
    radial-gradient(circle at 86% 0%, rgba(95, 203, 168, 0.18), transparent 32%),
    linear-gradient(180deg, #f4f9fb 0%, #e9f2f5 48%, #f9fbfb 100%);
  letter-spacing: 0;
}

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

.masthead {
  min-height: 54vh;
  position: relative;
  overflow: hidden;
  background: #0b1822;
}

.masthead::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 32%;
  background: linear-gradient(180deg, transparent, rgba(244, 249, 251, 0.92));
  pointer-events: none;
}

.hero-image {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(90deg, rgba(5, 16, 25, 0.74), rgba(9, 25, 36, 0.24) 55%, rgba(9, 25, 36, 0.1)),
    url("/assets/oliveto-hero.png");
  background-size: cover;
  background-position: center 58%;
  filter: saturate(1.05) contrast(1.02);
}

.topbar {
  position: relative;
  z-index: 2;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 20px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand-mark {
  color: rgba(255, 255, 255, 0.92);
  text-decoration: none;
  font-weight: 800;
  font-size: 1.02rem;
}

.language-toggle {
  border: 1px solid rgba(255, 255, 255, 0.34);
  border-radius: 999px;
  color: #fff;
  background: rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(18px);
  padding: 9px 14px;
  font-weight: 800;
  cursor: pointer;
}

.hero-content {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(270px, 380px);
  gap: 28px;
  align-items: end;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 82px 0 58px;
  color: #fff;
}

.eyebrow {
  margin: 0 0 12px;
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.82rem;
  font-weight: 800;
}

h1 {
  margin: 0;
  font-size: clamp(4.2rem, 10vw, 8.4rem);
  line-height: 0.88;
  font-weight: 760;
  letter-spacing: 0;
}

.intro {
  max-width: 620px;
  margin: 20px 0 0;
  color: rgba(255, 255, 255, 0.86);
  font-size: clamp(1.05rem, 2vw, 1.35rem);
  line-height: 1.42;
}

.today-panel {
  align-self: end;
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.16);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.18);
  backdrop-filter: blur(22px);
  display: grid;
  gap: 8px;
}

.panel-kicker {
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.74rem;
  font-weight: 900;
  text-transform: uppercase;
}

.today-panel strong { font-size: 1.2rem; }
.today-panel span:last-child { color: rgba(255, 255, 255, 0.82); line-height: 1.4; }

main {
  width: min(1180px, calc(100% - 32px));
  margin: -22px auto 0;
  padding: 0 0 72px;
  position: relative;
  z-index: 2;
}

.toolbar {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--panel);
  box-shadow: var(--shadow);
  backdrop-filter: blur(22px);
}

.toolbar h2 {
  margin: 0 0 6px;
  font-size: clamp(1.45rem, 2.6vw, 2.15rem);
}

.toolbar p {
  max-width: 760px;
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.legend span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 34px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.62);
  color: var(--muted);
  font-size: 0.84rem;
}

.legend b { font-weight: 800; }

.dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  display: inline-block;
}

.dot.green { background: var(--green); }
.dot.yellow { background: var(--yellow); }
.dot.red { background: var(--red); }
.dot.estimate { background: linear-gradient(135deg, var(--blue), #78d6bd); }

.calendar-stack {
  display: grid;
  gap: 26px;
}

.month {
  border: 1px solid var(--line);
  border-radius: 18px;
  overflow: clip;
  background: var(--panel);
  box-shadow: var(--shadow);
  backdrop-filter: blur(22px);
}

.month-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px;
  border-bottom: 1px solid var(--line);
}

.month-title {
  margin: 0;
  font-size: 1.26rem;
}

.month-note {
  color: var(--muted);
  font-size: 0.88rem;
}

.weekdays,
.month-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
}

.weekdays span {
  padding: 10px 12px;
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 900;
  text-transform: uppercase;
  border-bottom: 1px solid var(--line);
}

.day {
  min-height: 126px;
  border: 0;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  color: var(--ink);
  padding: 10px;
  text-align: left;
  display: grid;
  grid-template-rows: auto 1fr auto auto;
  gap: 7px;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.58);
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.day:nth-child(7n) { border-right: 0; }

.day:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 34px rgba(13, 24, 32, 0.13);
  z-index: 2;
}

.day.blank {
  cursor: default;
  background: rgba(255, 255, 255, 0.22);
  box-shadow: none;
  transform: none;
}

.comfort-green { background: linear-gradient(180deg, rgba(255,255,255,0.78), var(--green-bg)); }
.comfort-yellow { background: linear-gradient(180deg, rgba(255,255,255,0.78), var(--yellow-bg)); }
.comfort-red { background: linear-gradient(180deg, rgba(255,255,255,0.78), var(--red-bg)); }
.comfort-grey { background: linear-gradient(180deg, rgba(255,255,255,0.78), var(--grey-bg)); }

.comfort-green .comfort-label { color: var(--green); }
.comfort-yellow .comfort-label { color: var(--yellow); }
.comfort-red .comfort-label { color: var(--red); }
.comfort-grey .comfort-label { color: var(--grey); }

.day-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

.date-number {
  font-size: 1.12rem;
  font-weight: 850;
}

.comfort-label {
  min-width: 54px;
  text-align: right;
  font-size: 0.72rem;
  font-weight: 950;
  text-transform: uppercase;
}

.day-weather {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.main-weather {
  min-width: 0;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--ink);
  font-size: 0.85rem;
  font-weight: 800;
}

.main-weather svg,
.quick-metrics svg,
.guest-strip svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex: 0 0 auto;
}

.main-weather span {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.forecast-badge {
  flex: 0 0 auto;
  border-radius: 999px;
  width: 18px;
  height: 18px;
  display: inline-grid;
  place-items: center;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.72);
  font-size: 0.72rem;
  font-weight: 900;
}

.estimated .forecast-badge {
  color: #0f5d84;
  background: rgba(52, 152, 219, 0.16);
}

.quick-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
}

.quick-metrics span {
  min-width: 0;
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  border: 1px solid rgba(255, 255, 255, 0.58);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.55);
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 850;
  white-space: nowrap;
}

.quick-metrics svg {
  width: 15px;
  height: 15px;
}

.guest-strip {
  min-width: 0;
  min-height: 14px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 800;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.guest-strip.empty {
  min-height: 0;
}

.guest-strip svg {
  width: 14px;
  height: 14px;
}

.day-dialog {
  width: min(570px, calc(100% - 22px));
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 0;
  background: rgba(250, 253, 255, 0.92);
  color: var(--ink);
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(24px);
}

.day-dialog::backdrop { background: rgba(9, 18, 25, 0.5); }

.dialog-shell {
  position: relative;
  padding: 22px;
}

.icon-button {
  width: 36px;
  height: 36px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.82);
  display: inline-grid;
  place-items: center;
  cursor: pointer;
}

.icon-button svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
}

.close {
  position: absolute;
  top: 14px;
  right: 14px;
}

.dialog-date {
  margin: 0 42px 8px 0;
  font-size: 1.55rem;
}

.dialog-summary {
  margin: 0 0 18px;
  color: var(--muted);
  line-height: 1.4;
}

.inline-estimate {
  display: inline-block;
  margin-left: 6px;
  padding: 2px 7px;
  border-radius: 999px;
  background: rgba(52, 152, 219, 0.16);
  color: #0f5d84;
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
}

.detail-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 18px;
}

.detail {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px;
  background: rgba(255, 255, 255, 0.68);
}

.detail span {
  display: block;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
}

.detail strong {
  display: block;
  margin-top: 6px;
}

.rsvp-list {
  display: grid;
  gap: 8px;
  margin: 0 0 18px;
  padding: 0;
  list-style: none;
}

.rsvp-list li {
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.68);
}

.rsvp-list strong { display: block; }
.rsvp-list span { display: block; margin-top: 4px; color: var(--muted); }

.rsvp-form {
  display: grid;
  gap: 10px;
}

.rsvp-form label {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.rsvp-form input,
.rsvp-form textarea,
.rsvp-form select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.74);
  color: var(--ink);
  padding: 11px 12px;
}

.rsvp-form textarea {
  min-height: 72px;
  resize: vertical;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 130px;
  gap: 10px;
}

.submit {
  border: 0;
  border-radius: 11px;
  background: var(--blue);
  color: #fff;
  padding: 12px 14px;
  font-weight: 900;
  cursor: pointer;
}

.submit:hover { filter: brightness(0.94); }

@media (max-width: 920px) {
  .hero-content {
    grid-template-columns: 1fr;
    padding-top: 54px;
  }

  .toolbar {
    display: grid;
    align-items: start;
  }

  .legend { justify-content: start; }
}

@media (max-width: 760px) {
  .weekdays { display: none; }
  .month-grid { grid-template-columns: 1fr; }
  .day,
  .day:nth-child(7n) {
    min-height: 104px;
    border-right: 0;
  }
  .day.blank { display: none; }
  .month-header { display: grid; gap: 5px; }
}

@media (max-width: 480px) {
  main,
  .topbar,
  .hero-content {
    width: min(100% - 20px, 1180px);
  }

  h1 { font-size: clamp(3.6rem, 20vw, 5rem); }
  .detail-grid,
  .form-row { grid-template-columns: 1fr; }
  .quick-metrics span { font-size: 0.7rem; }
}
