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

:root {
  --color-bg: #faf9f6;
  --color-text: #3a3a3a;
  --color-accent: #7d6b5d;
  --color-accent-light: #a89585;
  --color-border: #d4cfc8;
  --color-white: #ffffff;
  --color-success: #5a7d5a;
  --color-error: #9d4444;
  --font-serif: "Georgia", "Times New Roman", serif;
  --font-sans: "Segoe UI", system-ui, -apple-system, sans-serif;
}

body {
  font-family: var(--font-sans);
  background: var(--color-bg);
  color: var(--color-text);
  line-height: 1.6;
  min-height: 100vh;
}

/* Links */

a {
  color: var(--color-accent);
  text-decoration: underline;
  text-decoration-color: var(--color-border);
  text-underline-offset: 0.15em;
  transition: text-decoration-color 0.2s;
}

a:hover {
  text-decoration-color: var(--color-accent);
}

/* Layout */

.page-wrapper {
  max-width: 720px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
}

header {
  text-align: center;
  padding: 3rem 0 2rem;
  border-bottom: 1px solid var(--color-border);
  margin-bottom: 2rem;
}

header h1 {
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: 2.5rem;
  letter-spacing: 0.05em;
  color: var(--color-accent);
}

header .date {
  font-size: 1.1rem;
  color: var(--color-accent-light);
  margin-top: 0.5rem;
}

nav {
  text-align: center;
  margin-bottom: 2rem;
}

nav a {
  color: var(--color-accent);
  text-decoration: none;
  margin: 0 1rem;
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

nav a:hover {
  text-decoration: underline;
}

/* Sections */

section {
  margin-bottom: 2.5rem;
}

section h2 {
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: 1.5rem;
  color: var(--color-accent);
  margin-bottom: 1rem;
  text-align: center;
}

section p {
  text-align: center;
  max-width: 540px;
  margin: 0 auto 1rem;
}

section ul {
  max-width: 540px;
  margin: 0 auto 1rem;
  list-style: none;
  padding: 0;
}

section ul li {
  padding: 0.3rem 0 0.3rem 1.2rem;
  position: relative;
}

section ul li::before {
  content: "\2022";
  color: var(--color-accent-light);
  position: absolute;
  left: 0;
}

/* Photos */

.photo {
  margin: 0 auto 1.5rem;
  text-align: center;
}

.photo img {
  max-width: 100%;
  height: auto;
  border-radius: 4px;
  border: 1px solid var(--color-border);
}

.photo figcaption {
  font-size: 0.85rem;
  color: var(--color-accent-light);
  margin-top: 0.5rem;
}

/* Schedule */

.schedule-list {
  list-style: none;
  max-width: 400px;
  margin: 0 auto;
}

.schedule-list li {
  display: flex;
  justify-content: space-between;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--color-border);
}

.schedule-list li:last-child {
  border-bottom: none;
}

.schedule-list .time {
  font-weight: 600;
  color: var(--color-accent);
  min-width: 100px;
}

/* Oggo animation */

.oggo-container {
  text-align: center;
  margin: 1.5rem 0;
  overflow: hidden;
}

.oggo {
  display: inline-block;
  width: 64px;
  height: 64px;
  background: url('/wedding/images/Oggo-Sheet.png') 0 0 no-repeat;
  background-size: 768px 64px;
  animation: oggo-walk 0.4s steps(1) infinite, oggo-run 8s linear infinite;
  image-rendering: pixelated;
}

@keyframes oggo-walk {
  0%     { background-position: 0 0; }
  33.33% { background-position: -64px 0; }
  66.67% { background-position: -128px 0; }
}

@keyframes oggo-run {
  0%      { transform: scaleX(1) translateX(-200%); }
  50%     { transform: scaleX(1) translateX(200%); }
  50.01%  { transform: scaleX(-1) translateX(-200%); }
  100%    { transform: scaleX(-1) translateX(200%); }
}

@media (prefers-reduced-motion: reduce) {
  .oggo {
    animation: none;
  }
}

/* Forms */

.form-container {
  max-width: 440px;
  margin: 0 auto;
}

.form-group {
  margin-bottom: 1.25rem;
}

label {
  display: block;
  margin-bottom: 0.35rem;
  font-size: 0.9rem;
  font-weight: 600;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
select,
textarea {
  width: 100%;
  padding: 0.6rem 0.75rem;
  border: 1px solid var(--color-border);
  border-radius: 4px;
  font-size: 1rem;
  font-family: inherit;
  background: var(--color-white);
  color: var(--color-text);
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus,
input[type="number"]:focus,
select:focus,
textarea:focus {
  border-color: var(--color-accent);
}

textarea {
  resize: vertical;
  min-height: 80px;
}

/* Radio group */

.radio-group {
  display: flex;
  gap: 1.5rem;
  margin-top: 0.25rem;
}

.radio-group label {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-weight: 400;
  cursor: pointer;
}

.radio-group input[type="radio"] {
  width: auto;
}

/* Form hints */

.form-hint {
  font-size: 0.85rem;
  color: var(--color-accent-light);
  margin-bottom: 0.5rem;
  text-align: left;
}

/* Buttons */

button, .btn {
  display: inline-block;
  padding: 0.65rem 2rem;
  background: var(--color-accent);
  color: var(--color-white);
  border: none;
  border-radius: 4px;
  font-size: 1rem;
  font-family: inherit;
  cursor: pointer;
  text-decoration: none;
  text-align: center;
  letter-spacing: 0.03em;
  transition: background 0.2s;
}

button:hover, .btn:hover {
  background: var(--color-accent-light);
}

button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.btn-block {
  display: block;
  width: 100%;
}

/* Messages */

.message {
  padding: 0.75rem 1rem;
  border-radius: 4px;
  margin-bottom: 1rem;
  text-align: center;
  display: none;
}

.message.success {
  background: #e8f0e8;
  color: var(--color-success);
  border: 1px solid var(--color-success);
}

.message.error {
  background: #f5e8e8;
  color: var(--color-error);
  border: 1px solid var(--color-error);
}

.message.visible {
  display: block;
}

/* Login page */

.login-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 2rem;
}

.login-box {
  text-align: center;
  max-width: 360px;
  width: 100%;
}

.login-box h1 {
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: 2rem;
  color: var(--color-accent);
  margin-bottom: 0.5rem;
}

.login-box p {
  color: var(--color-accent-light);
  margin-bottom: 1.5rem;
}

.login-box input[type="password"] {
  text-align: center;
  margin-bottom: 1rem;
}

/* Footer */

footer {
  text-align: center;
  padding: 2rem 0;
  border-top: 1px solid var(--color-border);
  margin-top: 2rem;
  font-size: 0.85rem;
  color: var(--color-accent-light);
}

/* Responsive */

@media (max-width: 600px) {
  header h1 {
    font-size: 1.8rem;
  }

  .page-wrapper {
    padding: 1.5rem 1rem;
  }

  nav a {
    margin: 0 0.5rem;
  }
}
