/* ============================================
   Jess & Conner's Wedding Site
   Shared styles layered on top of 98.css
   ============================================ */

/* --- Swap this if/when you drop in your own font file ---
   @font-face {
     font-family: 'MS W98 UI';
     src: url('fonts/msw98ui.woff2') format('woff2');
   }
   Then change the --font-ui variable below to 'MS W98 UI', 'Pixelated MS Sans Serif', sans-serif;
*/
:root {
  --font-ui: 'Pixelated MS Sans Serif', Arial, sans-serif;

  /* Desktop palette, pulled from the Figma wireframe */
  --nav-bg: #A1B9D0;
  --desktop-bg: #D7E1DF;
  --active-tab: #B9B031;

  /* Accessibility-driven type scale: bigger than 98.css's tiny defaults */
  --font-size-base: 20px;
  --font-size-large: 28px;
  --font-size-hero: 56px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-padding-top: env(safe-area-inset-top, 0px);
}

body {
  font-family: var(--font-ui);
  font-size: var(--font-size-base);
  line-height: 1.5;
  margin: 0;
  background: var(--desktop-bg);
  color: #000;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  padding-top: env(safe-area-inset-top, 0px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}

/* ---------- Top Nav ("Frame 631429528") ---------- */

.top-nav {
  background: var(--nav-bg);
  padding: 1.25rem 1rem;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 1.25rem;
}

.top-nav .home-link {
  font-size: 2rem;
  line-height: 1;
  text-decoration: none;
  margin-right: auto;
  padding: 0.25rem 0.5rem;
}

.top-nav .nav-buttons {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.25rem;
  margin-left: auto;
}

.top-nav .btn {
  font-family: var(--font-ui);
  font-size: 1.1rem;
  text-decoration: underline;
  padding: 0.75rem 1.5rem;
  min-width: 110px;
  min-height: 48px; /* comfortable tap target */
  cursor: pointer;
}

/* Highlight whichever page is currently active, taskbar-style */
.top-nav .btn[aria-current="page"] {
  background: var(--active-tab);
}

/* ---------- Page content area ---------- */

main {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem 1rem;
  text-align: center;
}

.hero-title {
  font-size: clamp(2rem, 6vw, var(--font-size-hero));
  margin: 0 0 1rem;
  line-height: 1.2;
}

.hero-detail {
  font-size: clamp(1.5rem, 4vw, var(--font-size-large));
  margin: 0.5rem 0;
  white-space: nowrap; /* keeps "November 13, 2027" from wrapping awkwardly */
}

/* ---------- Reusable "window" component ---------- */
/* Static (non-draggable) window, used for RSVP, Event, Stay, Registry, FAQ */

.window {
  max-width: 40rem;
  width: 100%;
  margin: 2rem auto;
  text-align: left;
}

.window .title-bar-text {
  font-size: 1.1rem;
}

.window .window-body {
  font-size: var(--font-size-base);
  line-height: 1.6;
}

.window .window-body button,
.window .window-body input,
.window .window-body select {
  font-size: 1rem;
  min-height: 44px;
}

/* ---------- Sound toggle button (muted by default) ---------- */

.sound-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 1rem;
  font-size: 1rem;
  padding: 0.5rem 1rem;
  min-height: 44px;
}

/* ---------- Bottom taskbar ---------- */

.taskbar {
  background: #C3C3C3;
  box-shadow: inset 0 1px 0 #F0F0F0;
  padding: 0.5rem 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: sticky;
  bottom: 0;
  padding-bottom: calc(0.5rem + env(safe-area-inset-bottom, 0px));
}

.taskbar .clock {
  font-family: var(--font-ui);
  font-size: 1rem;
  padding: 0.4rem 0.75rem;
}

/* ---------- Password gate ---------- */
/* While locked, hide everything except the gate dialog itself */
html.gate-locked body > *:not(#password-gate) {
  display: none;
}

#password-gate .window-body input {
  font-family: var(--font-ui);
}

/* ---------- RSVP form ---------- */

.rsvp-window .field-group {
  margin-bottom: 1.5rem;
}

.rsvp-window label {
  display: block;
  margin-bottom: 0.5rem;
  font-size: 1rem;
}

.rsvp-window input[type="text"],
.rsvp-window input[type="email"],
.rsvp-window input[type="number"] {
  width: 100%;
  font-size: 1.1rem;
  padding: 0.6rem;
  min-height: 44px;
  font-family: var(--font-ui);
}

.rsvp-window fieldset {
  border: none;
  padding: 0;
  margin: 0;
}

.rsvp-window .radio-option {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0.5rem 0;
  min-height: 44px;
}

.rsvp-window .radio-option input {
  width: 1.5rem;
  height: 1.5rem;
}

#rsvp-status {
  margin-top: 1rem;
  font-size: 1.1rem;
}

/* ---------- Clippy helper ---------- */

.clippy {
  position: fixed;
  right: 1.5rem;
  bottom: 5rem;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.5rem;
  z-index: 10;
}

.clippy-bubble {
  background: #fff;
  border: 1px solid #000;
  padding: 0.5rem 1rem;
  font-size: 1rem;
  max-width: 16rem;
  cursor: pointer;
}

.clippy-face {
  font-size: 3rem;
  line-height: 1;
  background: none;
  border: none;
  cursor: pointer;
}

.clippy-tip {
  display: none;
  background: #fff;
  border: 1px solid #000;
  padding: 0.75rem 1rem;
  font-size: 0.95rem;
  max-width: 18rem;
  margin-bottom: 0.5rem;
}

.clippy-tip.visible {
  display: block;
}

/* ---------- Event page layout ---------- */

.event-layout {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  justify-content: center;
  align-items: flex-start;
  padding: 2rem 1rem;
  width: 100%;
}

.event-layout .window {
  text-align: left;
  margin: 0;
}

#schedule-window {
  flex: 2 1 420px;
  max-width: 560px;
  order: 1;
}

#manor-window {
  flex: 1 1 280px;
  max-width: 380px;
  order: 2;
}

#countdown-window {
  flex: 1 1 280px;
  max-width: 380px;
  order: 3;
}

/* Decorative "File Edit View Help" menu strip, matches the Win95 chrome look */
.window-menu {
  display: flex;
  gap: 1rem;
  padding: 0.35rem 0.6rem;
  font-size: 0.95rem;
  background: #C3C3C3;
  border-bottom: 1px solid #808080;
}

.schedule-day {
  font-size: 1.3rem;
  margin: 1.25rem 0 0.5rem;
}

.schedule-day:first-child {
  margin-top: 0;
}

.schedule-list {
  list-style: none;
  margin: 0 0 0.5rem;
  padding: 0;
  font-size: 1.05rem;
  line-height: 1.7;
}

.venue-name {
  font-size: 1.4rem;
  margin: 0 0 0.75rem;
}

.venue-address {
  font-style: normal;
  font-size: 1.05rem;
  line-height: 1.6;
}

.venue-address a {
  display: inline-block;
  margin-top: 0.5rem;
}

/* Calculator-styled countdown, buttons are decorative only */
.countdown-display {
  width: 100%;
  text-align: right;
  font-size: 1.5rem;
  padding: 0.5rem;
  background: #fff;
  border: 2px inset #808080;
  margin-bottom: 0.5rem;
  font-family: var(--font-ui);
}

.countdown-label {
  font-size: 0.9rem;
  margin: 0 0 0.5rem;
  text-align: center;
}

.calculator-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 0.3rem;
}

.calculator-grid button {
  font-size: 0.85rem;
  padding: 0.4rem 0.2rem;
  min-height: 36px;
}

/* ---------- Respect reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    transition: none !important;
  }
}

/* ---------- Keep focus visible for keyboard users ---------- */

a:focus-visible,
button:focus-visible {
  outline: 3px solid #000EA3;
  outline-offset: 2px;
}
