/* --- Design Tokens --- */
:root {
  /* Colors */
  --bg-gradient: radial-gradient(circle at top, #2e3b2f, #0f140f 70%);
  --header-gradient: linear-gradient(to bottom, rgba(0,0,0,0.6), rgba(0,0,0,0));
  --text-primary: #e6e1c5;
  --text-secondary: #c9c39a;
  --text-muted: #aaa47a;
  --accent-gold: #d4af37;
  --border-color: #6b6a4f;

  /* Fonts */
  --font-heading: 'Cinzel', serif;
  --font-body: 'Libre Baskerville', serif;

  /* Layout */
  --max-width: 900px;
}

/* --- Global Styles --- */
body {
  margin: 0;
  font-family: var(--font-body);
  background: var(--bg-gradient);
  background-attachment: fixed; /* Keeps gradient still while scrolling */
  color: var(--text-primary);
  line-height: 1.6;
}

header {
  text-align: center;
  padding: 5rem 1rem 3rem;
  background: var(--header-gradient);
}

header h1 {
  font-family: var(--font-heading);
  font-size: 3rem;
  letter-spacing: 0.15em;
  margin-bottom: 0.5rem;
}

header p {
  font-style: italic;
  color: var(--text-secondary);
}

/* --- Navigation --- */
nav {
  display: flex;
  justify-content: center;
  gap: 2rem;
  padding: 1.5rem;
  border-top: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
  background: rgba(0, 0, 0, 0.2); /* Subtle contrast for the nav bar */
}

nav a {
  text-decoration: none;
  color: var(--text-primary);
  font-family: var(--font-heading);
  letter-spacing: 0.1em;
  transition: color 0.3s ease;
}

nav a:hover {
  color: var(--accent-gold);
}

/* --- Content Sections --- */
section {
  max-width: var(--max-width);
  margin: 4rem auto;
  padding: 0 1.5rem;
}

section h2 {
  font-family: var(--font-heading);
  font-size: 2rem;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 0.5rem;
  margin-bottom: 1.5rem;
}

.accent-link {
  font-family: var(--font-heading);
  color: var(--accent-gold);
  text-decoration: none;
}

/* --- Footer --- */
footer {
  text-align: center;
  padding: 3rem 1rem;
  font-size: 0.9rem;
  color: var(--text-muted);
}

/* --- Project Gallery Grid --- */
.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

.project-card {
  background: rgba(255, 255, 255, 0.03); /* Very subtle parchment-like overlay */
  border: 1px solid var(--border-color);
  padding: 1.5rem;
  transition: transform 0.3s ease, border-color 0.3s ease;
  display: flex;
  flex-direction: column;
}

.project-card:hover {
  transform: translateY(-5px);
  border-color: var(--accent-gold);
}

.project-card h3 {
  font-family: var(--font-heading);
  color: var(--accent-gold);
  margin-top: 0;
  font-size: 1.4rem;
}

.project-card p {
  font-size: 0.95rem;
  color: var(--text-secondary);
  flex-grow: 1; /* Pushes the link to the bottom */
}

.project-card .quest-link {
  margin-top: 1rem;
  font-family: var(--font-heading);
  text-decoration: none;
  color: var(--text-primary);
  font-size: 0.8rem;
  letter-spacing: 1px;
  text-transform: uppercase;
  border-bottom: 1px solid transparent;
  width: fit-content;
}

.project-card:hover .quest-link {
  border-bottom: 1px solid var(--accent-gold);
}

/* --- Parchment Contact Form --- */
.parchment-form {
  background-color: #f4e4bc; /* Aged paper color */
  background-image: url("https://www.transparenttextures.com/patterns/paper-fibers.png"); /* Subtle paper texture */
  color: #2c1e0f; /* Dark ink color */
  padding: 3rem;
  border-radius: 2px;
  box-shadow: 5px 5px 15px rgba(0,0,0,0.5), 0 0 40px rgba(0,0,0,0.1) inset;
  border: 1px solid #d2b48c;
  position: relative;
  max-width: 600px;
  margin: 2rem auto;
  transform: rotate(-0.5deg); /* Slight tilt for a hand-placed look */
}

.parchment-form h2 {
  color: #4a3728;
  border-bottom: 1px solid #bda27e;
  text-align: center;
  margin-top: 0;
}

.form-group {
  margin-bottom: 1.5rem;
  display: flex;
  flex-direction: column;
}

.form-group label {
  font-family: var(--font-heading);
  font-size: 0.9rem;
  margin-bottom: 0.5rem;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.form-group input, 
.form-group textarea {
  background: transparent;
  border: none;
  border-bottom: 1px solid #bda27e;
  font-family: 'Libre Baskerville', serif;
  font-size: 1rem;
  padding: 0.5rem 0;
  color: #2c1e0f;
  outline: none;
}

.form-group input:focus, 
.form-group textarea:focus {
  border-bottom: 2px solid #4a3728;
}

.seal-button {
  background: #8b0000; /* Wax seal red */
  color: white;
  font-family: var(--font-heading);
  padding: 1rem 2rem;
  border: none;
  cursor: pointer;
  display: block;
  margin: 2rem auto 0;
  border-radius: 50%; /* Round like a seal */
  width: 100px;
  height: 100px;
  box-shadow: 2px 2px 5px rgba(0,0,0,0.3);
  transition: transform 0.2s ease;
  font-size: 0.8rem;
  text-align: center;
  line-height: 1.2;
}

.seal-button:hover {
  transform: scale(1.05);
  background: #a00000;
}

/* Styling for the Return link on the contact page */
nav a[href="index.html"] {
  border: 1px solid var(--accent-gold);
  padding: 0.2rem 0.8rem;
  border-radius: 4px;
}