:root {
  /* Cozy Cookbook Color Palette */
  --paper-color: #f5f0e6;
  --paper-dark: #e8d5b5;
  --wood-light: #d4a76a;
  --wood-medium: #8b7355;
  --wood-dark: #5d4037;
  --ink-dark: #3a2c1a;
  --ink-medium: #6b5b47;
  --ink-light: #9c8a7a;
  --stitching: #a67c52;

  /* Typography */
  --font-main: Georgia, "Times New Roman", Times, serif;
  --font-heading: Georgia, "Times New Roman", Times, serif;
  --font-monospace: "Courier New", Courier, monospace;

  /* Spacing & Sizing */
  --base-spacing: 1rem;
  --border-radius: 4px;
  --box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  --transition: all 0.3s ease;

  /* Skeuomorphic Effects - More subtle */
  --paper-texture: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0.05) 0%,
    rgba(0, 0, 0, 0.01) 50%,
    rgba(255, 255, 255, 0.05) 100%
  );
  --wood-grain: repeating-linear-gradient(
    45deg,
    var(--wood-medium),
    var(--wood-medium) 15px,
    var(--wood-dark) 15px,
    var(--wood-dark) 30px
  );
  --stitching-pattern: repeating-linear-gradient(
    to right,
    var(--stitching) 0,
    var(--stitching) 4px,
    transparent 4px,
    transparent 8px
  );
}

.highlight {
  color: var(--wood-medium);
  text-decoration: underline;
  text-decoration-style: wavy;
  text-decoration-color: var(--stitching);
}

/* Base Reset & Typography */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 16px;
  line-height: 1.6;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-main);
  color: var(--ink-dark);
  background-color: var(--paper-color);
  min-height: 100vh;
  position: relative;
  line-height: 1.7;
}

/* Base Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 0.5em;
  color: var(--ink-dark);
}

h1 {
  font-size: 2.2rem;
  margin-bottom: 0.8em;
}
h2 {
  font-size: 1.8rem;
  margin-bottom: 0.7em;
}
h3 {
  font-size: 1.5rem;
  margin-bottom: 0.6em;
}
h4 {
  font-size: 1.2rem;
  margin-bottom: 0.5em;
}

p {
  margin-bottom: 1.2em;
  font-size: 1.1rem;
  line-height: 1.8;
}

a {
  color: var(--wood-medium);
  text-decoration: none;
  transition: var(--transition);
}

a:hover {
  color: var(--wood-dark);
  text-decoration: underline;
}

code {
  font-family: var(--font-monospace);
  background-color: rgba(212, 167, 106, 0.2);
  padding: 0.2em 0.4em;
  border-radius: var(--border-radius);
  border: 1px dashed var(--stitching);
}

/* Utility Classes */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--base-spacing);
}

.btn {
  display: inline-block;
  padding: 0.6em 1.2em;
  background-color: var(--wood-light);
  background-image: repeating-linear-gradient(
    45deg,
    var(--wood-medium),
    var(--wood-medium) 20px,
    var(--wood-dark) 20px,
    var(--wood-dark) 40px
  );
  color: var(--paper-color);
  border: 2px solid var(--wood-dark);
  border-radius: var(--border-radius);
  font-family: var(--font-main);
  font-weight: 600;
  cursor: pointer;
  transition:
    transform 0.3s ease,
    box-shadow 0.3s ease,
    opacity 0.3s ease;
  box-shadow: var(--box-shadow);
  position: relative;
  background-size: 40px 40px;
  opacity: 0.95;
}

a.btn {
  color: var(--paper-color);
  text-decoration: none;
}

.btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 3px 6px rgba(0, 0, 0, 0.15);
  opacity: 1;
}

.btn:active {
  transform: translateY(0);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

/* Form Elements */
input[type="text"],
input[type="password"],
input[type="email"],
input[type="number"],
input[type="date"],
textarea,
select {
  width: 100%;
  padding: 0.8em;
  margin: 0.5em 0;
  border: 2px solid var(--wood-medium);
  border-radius: var(--border-radius);
  background-color: var(--paper-color);
  font-family: var(--font-main);
  font-size: 1em;
  transition: var(--transition);
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.05);
}

input:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: var(--wood-dark);
  box-shadow:
    inset 0 1px 3px rgba(0, 0, 0, 0.1),
    0 0 0 2px rgba(212, 167, 106, 0.3);
}

label {
  display: block;
  margin-bottom: 0.5em;
  font-weight: 600;
  color: var(--ink-dark);
}

/* Card/Container Styles */
.card {
  background-color: var(--paper-color);
  border: 1px solid var(--wood-medium);
  border-radius: var(--border-radius);
  padding: 1.8em;
  margin: 1.5em 0;
  box-shadow: var(--box-shadow);
  position: relative;
}

/* Date Reveal Functionality */
.date-reveal-container {
  position: relative;
}

.date-reveal-toggle {
  display: inline-block;
  padding: 0.4em 0.8em;
}

.date-reveal-content {
  display: none;
  margin-top: 1em;
  padding: 1em;
  background-color: rgba(245, 240, 230, 0.8);
  border: 1px dashed var(--stitching);
  border-radius: var(--border-radius);
}

.date-reveal-checkbox:checked + .date-reveal-content {
  display: block;
}

/* Animation Effects */
@keyframes subtlePulse {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.01);
  }
}

.pulse-subtle {
  animation: subtlePulse 8s ease-in-out infinite;
}

/* Responsive Design */
@media (max-width: 768px) {
  .container {
    padding: 0 0.75em;
  }

  h1 {
    font-size: 1.8rem;
  }
  h2 {
    font-size: 1.5rem;
  }
}

/* Print Styles */
@media print {
  body {
    background: white;
    color: black;
  }

  .no-print {
    display: none;
  }
}

/* Additional Utility Classes */
.text-center {
  text-align: center;
}

.mt-1 {
  margin-top: 0.5em;
}
.mt-2 {
  margin-top: 1em;
}
.mt-3 {
  margin-top: 1.5em;
}
.mt-4 {
  margin-top: 2em;
}

.mb-1 {
  margin-bottom: 0.5em;
}
.mb-2 {
  margin-bottom: 1em;
}
.mb-3 {
  margin-bottom: 1.5em;
}
.mb-4 {
  margin-bottom: 2em;
}

.p-1 {
  padding: 0.5em;
}
.p-2 {
  padding: 1em;
}
.p-3 {
  padding: 1.5em;
}
.p-4 {
  padding: 2em;
}

/* Flex Utilities */
.flex {
  display: flex;
}

.flex-wrap {
  flex-wrap: wrap;
}

.justify-center {
  justify-content: center;
}

.justify-between {
  justify-content: space-between;
}

.items-center {
  align-items: center;
}

.gap-1 {
  gap: 0.5em;
}
.gap-2 {
  gap: 1em;
}
.gap-3 {
  gap: 1.5em;
}
.gap-4 {
  gap: 2em;
}

/* Grid Utilities */
.grid {
  display: grid;
}

.grid-cols-2 {
  grid-template-columns: repeat(2, 1fr);
}

/* Animation for page transitions */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in {
  animation: fadeIn 0.3s ease-out;
}

/* Enhanced card styles with more skeuomorphic details */
.card-enhanced {
  background-color: var(--paper-color);
  border: 1px solid var(--wood-medium);
  border-radius: var(--border-radius);
  padding: 1.8em;
  margin: 1.5em 0;
  box-shadow: var(--box-shadow);
  position: relative;
}

.card-enhanced::after {
  content: "";
  position: absolute;
  top: 0;
  right: 10px;
  width: 25px;
  height: 25px;
  background: var(--paper-color);
  transform: rotate(-45deg);
  box-shadow: -1px -1px 2px rgba(0, 0, 0, 0.1);
  border-left: 1px solid var(--wood-medium);
  border-top: 1px solid var(--wood-medium);
  z-index: 1;
}

/* Recipe book specific elements */
.recipe-title {
  position: relative;
  padding-bottom: 0.5em;
  margin-bottom: 1em;
}

.recipe-title::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 60px;
  height: 2px;
  background: var(--wood-medium);
}

.ingredient-list {
  list-style: none;
  padding-left: 0;
}

.ingredient-list li {
  padding: 0.3em 0;
  position: relative;
  padding-left: 1.5em;
}

.ingredient-list li::before {
  content: "•";
  position: absolute;
  left: 0;
  color: var(--wood-medium);
}

/* Final touches for consistency */
body {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}
