:root{
  --sage: #c9cba3ff;
  --peach-yellow: #ffe1a8ff;
  --bittersweet: #e26d5cff;
  --wine: #723d46ff;
  --van-dyke: #472d30ff;
  --panel: rgba(71, 45, 48, 0.9);
  --text: #c9cba3ff;
  --muted: #ffe1a8ff;
  --accent: #e26d5cff;
  --heading: #ffe1a8ff;
  --link: #e26d5cff;
  --link-hover: #ffe1a8ff;
  --card-bg: rgba(71, 45, 48, 0.8);
}

*{box-sizing:border-box}
html,body{
  height:100%;
  min-height: 100vh;
  -webkit-text-size-adjust: 100%;
  -ms-text-size-adjust: 100%;
}

body{
  margin:0;
  color:var(--text);
  font-family: 'Libre Baskerville', serif;
  line-height:1.75;
  background: #000 url('/images/rookery_room.jpg') center/cover no-repeat;
  background-attachment: scroll;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  min-height: 100vh;
  width: 100%;
  overflow-x: hidden;
  /* Typography.js will enhance these properties */
  font-feature-settings: "kern" 1, "liga" 1, "calt" 1;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.overlay{
  min-height:100%;
  background: rgba(0, 0, 0, 0.6);
  width: 80%;
  margin: 0 auto;
  border-radius: 20px;
  box-shadow: 0 20px 60px rgba(71, 45, 48, 0.8);
}

.container{
  max-width: 100%;
  margin: 0 auto;
  padding: 28px 22px 40px;
}

.card{ 
  padding-top:18px; 
  margin-top:18px; 
  margin-bottom: 24px;
  max-width: 70%;
  margin-left: auto;
  margin-right: auto;
}

h1, h2, h3, h4, h5, h6{ 
  font-family: 'Libre Baskerville', serif;
  color:var(--heading); 
  margin:28px 0 10px; 
  text-align: center;
}

h1{ font-size:3.5rem; font-weight:400; margin:0 0 16px 0; }
h2{ font-size:26px; font-weight:400; }
h3{ font-size:20px; font-weight:400; margin:18px 0 8px; }
h4{ font-size:1.1rem; font-weight:400; margin:0 0 8px 0; }

strong,b,label{ font-weight:700 }
a{ color:var(--link); text-decoration:none; }
a:hover{ color:var(--link-hover); }
ul{ padding-left:20px; }
.section{ scroll-margin-top:80px; }
.toplink{ display:block; margin:16px 0 0; text-align:right; color:var(--muted) }

.card-divider {
  text-align: center;
  font-size: 24px;
  margin: 40px 0;
  letter-spacing: 20px;
  padding-left: 20px;
  height: 30px;
  line-height: 30px;
}

.suit {
  display: inline-block;
}

.suit.spade {
  color: #8a8f7a;
}

.suit.heart {
  color: #e26d5c;
}

.suit.club {
  color: #8a8f7a;
}

.suit.diamond {
  color: #e26d5c;
}

.hero {
  text-align: center;
  padding: 40px 20px;
  margin-bottom: 32px;
  margin-top: 8rem;
}

.hero h1 {
  font-family: 'Libre Baskerville', serif;
  font-size: 3.5rem;
  font-weight: 700;
  letter-spacing: 2px;
  margin: 0 0 16px 0;
  color: var(--heading);
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.hero h1 .welcome-text {
  font-size: 1.75rem;
  font-weight: 400;
  color: var(--accent);
  letter-spacing: 1px;
}

.hero h1 .rookery-text {
  font-size: 3.5rem;
  font-weight: 700;
  color: var(--heading);
  letter-spacing: 2px;
}

.hero .tagline {
  font-family: 'Libre Baskerville', serif;
  font-size: 1.4rem;
  color: var(--accent);
  font-weight: 400;
  font-style: italic;
  margin-bottom: 24px;
}

.hero .description {
  font-size: 1.1rem;
  color: var(--muted);
  max-width: 600px;
  margin: 0 auto 32px auto;
  line-height: 1.6;
}

.cta-button {
  display: inline-block;
  background: var(--accent);
  color: var(--van-dyke);
  padding: 16px 32px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 700;
  font-size: 1.1rem;
  transition: all 0.3s ease;
  border: 2px solid var(--accent);
  position: relative;
  overflow: hidden;
}

.cta-button:hover {
  background: transparent;
  color: var(--accent);
  transform: translateY(-2px);
}

.ripple {
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  transform: scale(0);
  animation: ripple-animation 0.6s linear;
  pointer-events: none;
}

@keyframes ripple-animation {
  to {
    transform: scale(4);
    opacity: 0;
  }
}

.scroll-arrow {
  margin-top: 32px;
  text-align: center;
}

.scroll-arrow i {
  font-size: 2rem;
  color: var(--accent);
  cursor: pointer;
  transition: all 0.3s ease;
}

.scroll-arrow i:hover {
  color: var(--link-hover);
  transform: scale(1.2);
}

@keyframes bounce {
  0%, 20%, 50%, 80%, 100% {
    transform: translateY(0);
  }
  40% {
    transform: translateY(-10px);
  }
  60% {
    transform: translateY(-5px);
  }
}

/* Fade-in animation classes */
.fade-in {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.8s ease-out;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Staggered animations for different elements */
.fade-in-delay-1 {
  transition-delay: 0.1s;
}

.fade-in-delay-2 {
  transition-delay: 0.2s;
}

.fade-in-delay-3 {
  transition-delay: 0.3s;
}

.menu-section {
  padding: 32px 0;
  margin: 32px 0;
  text-align: center;
}

.menu-list {
  max-width: 600px;
  margin: 0 auto;
  text-align: center;
}

.menu-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 12px;
  border-bottom: 1px solid rgba(201, 203, 163, 0.1);
  transition: all 0.3s ease;
  cursor: pointer;
  border-radius: 8px;
  margin: 4px 0;
}

.menu-item:hover {
  transform: translateY(-2px);
  background: rgba(201, 203, 163, 0.05);
  box-shadow: 0 4px 12px rgba(71, 45, 48, 0.15);
}

.menu-item:last-child {
  border-bottom: none;
}

.menu-name {
  font-weight: 700;
  color: var(--accent);
  text-align: left;
  flex: 1;
  transition: color 0.3s ease;
}

.menu-item:hover .menu-name {
  color: var(--link-hover);
}

.menu-description {
  color: var(--muted);
  text-align: center;
  flex: 2;
  font-style: italic;
}

.menu-price {
  font-weight: 700;
  color: var(--heading);
  text-align: right;
  flex: 1;
  transition: all 0.3s ease;
}

.menu-item:hover .menu-price {
  transform: scale(1.1);
  color: var(--accent);
}

.hours-section {
  padding: 32px 0;
  margin: 32px 0;
  text-align: center;
}

.hours-section p {
  text-align: center;
  margin: 0 auto 1em auto;
}

.hours-list {
  max-width: 400px;
  margin: 24px auto;
  text-align: center;
}

.hour-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid rgba(201, 203, 163, 0.1);
}

.hour-item:last-child {
  border-bottom: none;
}

.day {
  font-weight: 700;
  color: var(--heading);
  text-align: center;
  flex: 1;
}

.time {
  color: var(--muted);
  text-align: center;
  flex: 1;
}

.contact-section {
  padding: 32px 0;
  margin: 32px 0;
  text-align: center;
  max-width: 70%;
  margin-left: auto;
  margin-right: auto;
}

.social-links {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-top: 24px;
}

.social-link {
  display: inline-block;
  width: 50px;
  height: 50px;
  color: var(--sage);
  text-align: center;
  line-height: 50px;
  font-size: 1.5rem;
  transition: all 0.3s ease;
}

.social-link i {
  line-height: 50px;
  font-size: 1.5rem;
}

.social-link:hover {
  color: var(--accent);
  transform: scale(1.1) rotate(360deg);
}

.contact-info {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  margin: 24px 0;
}

.contact-item {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 1.1rem;
  color: var(--sage);
  transition: all 0.3s ease;
}

.contact-item i {
  font-size: 1.2rem;
  color: var(--accent);
  width: 20px;
  text-align: center;
}

.contact-item a {
  color: var(--sage);
  text-decoration: none;
  transition: color 0.3s ease;
}

.contact-item a:hover {
  color: var(--accent);
}

.contact-item:hover {
  transform: translateY(-2px);
}

.footer{ 
  margin:40px 0 10px; 
  text-align:center; 
  color:var(--muted); 
  font-size:12px;
  padding-top: 32px;
  border-top: 1px solid rgba(201, 203, 163, 0.1);
}

@media (max-width: 900px) {
  .overlay{ width:100%; border-radius:0; box-shadow:none; }
  .hero h1 { font-size: 2.5rem; }
  .hero .tagline { font-size: 1.2rem; }
  .hero { margin-top: 6rem; }
  
  /* Tablet background image optimization */
  body {
    background-attachment: scroll;
    background-size: cover;
    background-position: center;
  }
}

/* Mobile-specific styling for smaller screens */
@media (max-width: 768px) {
  /* Mobile background image optimization */
  body {
    background-attachment: scroll;
    background-size: cover;
    background-position: center;
    -webkit-background-size: cover;
    -moz-background-size: cover;
    -o-background-size: cover;
  }
  
  .card p {
    text-align: center;
    margin: 0 auto 16px auto;
    max-width: 100%;
  }
  
  .card {
    max-width: 90%;
    padding: 16px;
  }
  
  .hero {
    margin-top: 3rem;
    padding: 24px 16px;
  }
  
  .hero h1 {
    font-size: 2.2rem;
  }
  
  .hero .tagline {
    font-size: 1.1rem;
  }
  
  .hero .description {
    font-size: 1rem;
    padding: 0 8px;
  }
  
  /* Hours section mobile centering */
  .hours-section p {
    text-align: center;
    margin: 0 auto 1em auto;
  }
  
  .hours-list {
    max-width: 100%;
    margin: 24px auto;
  }
  
  .hour-item {
    flex-direction: column;
    text-align: center;
    gap: 8px;
  }
  
  .day, .time {
    text-align: center;
    width: 100%;
  }
  
  /* Contact section mobile centering */
  .contact-section {
    max-width: 90%;
  }
  
  .contact-section p {
    text-align: center;
  }
}

/* Mailing List Link Styles */
.mailing-list-link {
  display: block;
  color: var(--heading);
  text-decoration: underline;
  font-family: 'Libre Baskerville', serif;
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 20px;
  transition: all 0.3s ease;
  text-align: center;
}

.mailing-list-link:hover {
  color: var(--accent);
  text-decoration-color: var(--accent);
  transform: translateY(-1px);
}

/* Mailing List Styles */
.mailing-list-section {
  padding: 32px 0;
  margin: 32px 0;
  text-align: center;
  max-width: 70%;
  margin-left: auto;
  margin-right: auto;
}

.mailing-list-form {
  max-width: 500px;
  margin: 0 auto;
  padding: 24px;
  background: rgba(71, 45, 48, 0.3);
  border-radius: 12px;
  border: 1px solid rgba(201, 203, 163, 0.2);
}

.form-group {
  margin-bottom: 20px;
  text-align: left;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  color: var(--heading);
  font-weight: 600;
  font-size: 0.95rem;
}

.form-group input {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid rgba(201, 203, 163, 0.3);
  border-radius: 8px;
  background: rgba(71, 45, 48, 0.5);
  color: var(--text);
  font-family: 'Libre Baskerville', serif;
  font-size: 1rem;
  transition: all 0.3s ease;
  box-sizing: border-box;
}

.form-group input:focus {
  outline: none;
  border-color: var(--accent);
  background: rgba(71, 45, 48, 0.7);
  box-shadow: 0 0 0 3px rgba(226, 109, 92, 0.1);
}

.form-group input.error {
  border-color: #e26d5c;
  background: rgba(226, 109, 92, 0.1);
}

.field-error {
  color: #e26d5c;
  font-size: 0.85rem;
  margin-top: 6px;
  font-style: italic;
}

.mailing-list-submit {
  background: var(--accent);
  color: var(--van-dyke);
  padding: 14px 28px;
  border: none;
  border-radius: 8px;
  font-family: 'Libre Baskerville', serif;
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.3s ease;
  width: 100%;
  margin-top: 8px;
}

.mailing-list-submit:hover:not(:disabled) {
  background: var(--link-hover);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(226, 109, 92, 0.3);
}

.mailing-list-submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.message {
  margin-top: 16px;
  padding: 12px 16px;
  border-radius: 8px;
  font-weight: 600;
  display: none;
}

.message.success {
  background: rgba(34, 197, 94, 0.2);
  color: #22c55e;
  border: 1px solid rgba(34, 197, 94, 0.3);
}

.message.error {
  background: rgba(239, 68, 68, 0.2);
  color: #ef4444;
  border: 1px solid rgba(239, 68, 68, 0.3);
}

/* Mobile responsive mailing list */
@media (max-width: 768px) {
  .mailing-list-section {
    max-width: 90%;
    padding: 24px 0;
  }
  
  .mailing-list-form {
    padding: 20px;
    margin: 0 16px;
  }
  
  .form-group input {
    font-size: 16px; /* Prevents zoom on iOS */
  }
}

/* Popup Modal Styles */
.popup-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 1000;
  backdrop-filter: blur(5px);
}

.popup-overlay.active {
  display: flex;
  animation: fadeIn 0.3s ease-out;
}

.popup-content {
  background: var(--van-dyke);
  border: 2px solid var(--sage);
  border-radius: 20px;
  padding: 2rem;
  max-width: 500px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  animation: slideUp 0.3s ease-out;
}

.popup-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: none;
  border: none;
  color: var(--sage);
  font-size: 2rem;
  cursor: pointer;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all 0.3s ease;
}

.popup-close:hover {
  background: rgba(201, 203, 163, 0.1);
  color: var(--text);
}

.popup-header {
  text-align: center;
  margin-bottom: 2rem;
}

.popup-header h2 {
  color: var(--heading);
  margin-bottom: 0.5rem;
  font-size: 1.8rem;
}

.popup-header p {
  color: var(--muted);
  font-size: 1rem;
  margin: 0;
}

.popup-form {
  transition: all 0.3s ease;
}

.popup-form {
  opacity: 1;
  transform: translateX(0);
  display: block;
}

.popup-submit {
  background: var(--accent);
  color: var(--van-dyke);
  padding: 14px 28px;
  border: none;
  border-radius: 8px;
  font-family: 'Libre Baskerville', serif;
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.3s ease;
  width: 100%;
  margin-top: 16px;
}

.popup-submit:hover:not(:disabled) {
  background: var(--link-hover);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(226, 109, 92, 0.3);
}

.popup-submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

/* Popup animations */
@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(30px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* Mobile responsive popup */
@media (max-width: 768px) {
  .popup-content {
    padding: 1.5rem;
    margin: 1rem;
    width: calc(100% - 2rem);
  }
  
  .popup-header h2 {
    font-size: 1.5rem;
  }
  
  .popup-close {
    top: 0.5rem;
    right: 0.5rem;
    width: 35px;
    height: 35px;
    font-size: 1.5rem;
  }
  
  .contact-info {
    margin: 16px 0;
  }
  
  .contact-item {
    font-size: 1rem;
  }
}

/* Extra small mobile devices */
@media (max-width: 480px) {
  body {
    background-size: cover;
    background-position: center;
    background-attachment: scroll;
    -webkit-background-size: cover;
    -moz-background-size: cover;
    -o-background-size: cover;
  }
  
  .hero {
    margin-top: 2rem;
    padding: 20px 12px;
  }
  
  .overlay {
    width: 95%;
    margin: 0 2.5%;
    padding: 16px;
  }
  
  .container {
    padding: 20px 16px 32px;
  }
  
  .card {
    max-width: 95%;
    padding: 12px;
  }
}
