:root {
  --red:   #9B1C35;
  --cream: #FBF3E4;
  --green: #A8C256;
}

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

body {
  background-color: var(--cream);
  color: var(--red);
  font-family: Georgia, serif;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

header {
  background-color: var(--red);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75em 2.5em;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 20px rgba(155, 28, 53, 0.22);
}

.logo { display: flex; align-items: center; gap: 0.625em; }

.logo span {
  color: var(--cream);
  font-size: 1rem;
  font-weight: bold;
  letter-spacing: 0.0625em;
}

nav { display: flex; align-items: center; gap: 1.5em; }

nav a { color: var(--cream); text-decoration: none; font-size: 1rem; }
nav a:hover { color: var(--green); }

nav span { color: var(--cream); font-size: 0.9rem; }

nav a button {
  background-color: var(--green);
  color: var(--cream);
  border: none;
  padding: 0.5em 1.25em;
  border-radius: 1.875em;
  font-size: 1rem;
  cursor: pointer;
}
nav a button:hover { background-color: #8faa3e; }

main {
  flex: 1;
  max-width: 42em;
  width: 100%;
  margin: 2.5em auto;
  padding: 0 1.5em;
}

main h1 {
  font-size: 2rem;
  color: var(--red);
  margin-bottom: 0.5em;
}

main > p { 
  font-size: 0.9rem; 
  color: var(--red); 
  margin-bottom: 1.5em; 
}

main > p[style] {
  font-size: 1.05rem;
  font-weight: bold;
  padding: 0.75em 1.25em;
  border-radius: 0.375em;
  border: 0.125em solid currentColor;
  background-color: rgba(155, 28, 53, 0.08);
  margin-bottom: 1.25em;
}

fieldset {
  border: 0.09375em solid var(--red);
  border-radius: 0.375em;
  padding: 1.25em 1.5em;
  margin-bottom: 1.25em;
}

legend {
  font-weight: bold;
  color: var(--red);
  padding: 0 0.5em;
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

label {
  font-size: 0.9rem;
  color: var(--red);
  display: block;
  margin-bottom: 0.25em;
}

input[type="text"],
input[type="number"],
input[type="email"],
input[type="tel"],
input[type="password"],
textarea {
  width: 100%;
  padding: 0.6em 0.875em;
  border: 0.09375em solid var(--red);
  border-radius: 0.25em;
  font-size: 1rem;
  font-family: Georgia, serif;
  color: var(--red);
  background: #fff;
  outline: none;
  margin-bottom: 0.75em;
}

input:focus, textarea:focus { 
  border-color: var(--green); 
}

input[type="file"] {
  font-size: 0.9rem;
  color: var(--red);
  margin-bottom: 0.75em;
}

button[type="submit"] {
  background-color: var(--green);
  color: var(--cream);
  border: none;
  padding: 0.75em 2.5em;
  border-radius: 1.875em;
  font-size: 1rem;
  font-family: Georgia, serif;
  font-weight: bold;
  cursor: pointer;
  margin-bottom: 1em;
}
button[type="submit"]:hover { background-color: #8faa3e; }

main > p:last-child { 
  font-size: 0.9rem; 
}
main > p:last-child a { 
  color: var(--green); 
  text-decoration: none; 
}
main > p:last-child a:hover { 
  text-decoration: underline; 
}

footer {
  background-color: var(--red);
  color: var(--cream);
  padding: 1.25em 2.5em;
  display: flex;
  flex-direction: column;
  gap: 0.5em;
  margin-top: auto;
}
footer a {
  color: #ffb7c5;
  text-decoration: none;
}
footer a:hover {
  text-decoration: underline;
}
footer div {
  display: flex;
  gap: 1.25em;
}

.nav-toggle { display: none; }

@media (max-width: 640px) {
  header {
    padding: 0.75em 1em;
    position: sticky;
  }
  .nav-toggle {
    display: flex;
    align-items: center;
    background: none;
    border: none;
    color: var(--cream);
    font-size: 1.6rem;
    cursor: pointer;
    padding: 0.1em 0.3em;
    line-height: 1;
  }
  nav {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 100%;
    right: 0;
    width: auto;
    min-width: 11em;
    background: var(--red);
    padding: 1em 1.5em 1.25em;
    gap: 0.85em;
    z-index: 300;
    box-shadow: -4px 4px 16px rgba(0,0,0,0.18);
    border-radius: 0 0 0 0.75em;
    visibility: hidden;
    pointer-events: none;
    transform: translateX(20px);
    opacity: 0;
    transition: transform 0.22s ease, opacity 0.22s ease, visibility 0.22s;
  }
  nav.open {
    visibility: visible;
    pointer-events: auto;
    transform: translateX(0);
    opacity: 1;
  }
  nav a { font-size: 1rem; }
  nav a button { width: 100%; }

  main {
    padding: 0 1em;
    margin: 1.5em auto;
  }

  footer { padding: 1.25em 1em; }
}
