/* File: styles.css
   Purpose: Memorial and celebration of life services
   Tone: Calm, Respectful, Quiet
   Updated: Refined hierarchy and spacing
*/

/* -------------------------------------------------------------------------
   RESET & BASE
------------------------------------------------------------------------- */

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

html {
  font-size: 100%;
  -webkit-text-size-adjust: 100%;
}

body {
  background-color: #fcfbf9; /* Warm, off-white parchment */
  color: #2e2e2e; /* Soft charcoal */
  font-family: Georgia, "Times New Roman", Times, serif;
  font-weight: 400;
  line-height: 1.6;
  font-size: 1.125rem; /* 18px for readability */
  padding: 0 1.5rem;
}

/* -------------------------------------------------------------------------
   TYPOGRAPHY
------------------------------------------------------------------------- */

h1, h2, h3 {
  font-weight: 400; /* Regular weight for calmness */
  color: #1a1a1a;
  margin-bottom: 1rem;
  line-height: 1.3;
}

h1 {
  font-size: 1.9rem;
  margin-top: 3rem;
  margin-bottom: 1.5rem;
  letter-spacing: 0.005em;
}

h2 {
  font-size: 1.5rem;
  margin-top: 2.5rem;
  margin-bottom: 1rem;
  border-bottom: 1px solid #ebe9e4;
  padding-bottom: 0.5rem;
}

h3 {
  font-size: 1.25rem;
  margin-top: 2rem;
  font-style: normal;
  color: #4a4a4a;
}

p {
  margin-bottom: 1.5rem;
  max-width: 40em; /* Extended for reflective reading flow */
}

strong {
  font-weight: 600;
  color: #1a1a1a;
}

em {
  font-style: italic;
}

/* -------------------------------------------------------------------------
   LAYOUT
------------------------------------------------------------------------- */

/* Center content with a comfortable maximum width */
header,
main,
footer {
  max-width: 42rem;
  margin: 0 auto;
  width: 100%;
}

/* -------------------------------------------------------------------------
   HEADER & NAVIGATION
------------------------------------------------------------------------- */

header {
  padding-top: 3rem;
  padding-bottom: 2rem;
  text-align: center;
}

.site-title {
  font-size: 1.1rem;
  font-weight: 400;
  color: #1a1a1a;
  margin: 0;
  letter-spacing: 0.02em;
}

.site-title a {
  color: inherit;
  text-decoration: none;
}

nav {
  margin-top: 1.5rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.5rem;
}

nav a {
  text-decoration: none;
  color: #5c5c5c;
  font-size: 1rem;
  border-bottom: 1px solid transparent;
}

nav a:hover,
nav a.active {
  color: #1a1a1a;
  border-bottom-color: #1a1a1a;
}

/* -------------------------------------------------------------------------
   MAIN CONTENT
------------------------------------------------------------------------- */

main {
  padding-top: 1rem;
  padding-bottom: 3rem;
}

.intro {
  font-size: 1.15rem;
  margin-bottom: 2rem;
}

.section-divider {
  border: none;
  border-top: 1px solid #ebe9e4;
  margin: 2.5rem 0;
}

/* -------------------------------------------------------------------------
   SECTIONS & SPACING
------------------------------------------------------------------------- */

section {
  margin-bottom: 3rem;
}

/* -------------------------------------------------------------------------
   LINKS (GENERAL)
------------------------------------------------------------------------- */

a {
  color: #4a4a4a;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  transition: none;
}

a:hover {
  color: #1a1a1a;
  text-decoration-thickness: 1px;
}

/* -------------------------------------------------------------------------
   CTA / CONTACT BLOCKS
------------------------------------------------------------------------- */

.contact-section {
  background-color: #f4f1eb;
  padding: 2rem;
  margin: 2rem 0;
  border-radius: 2px;
}

.contact-section h2 {
  margin-top: 0;
  border-bottom: none;
  padding-bottom: 0;
}

.contact-section p:last-child {
  margin-bottom: 0;
}

.contact-link {
  color: #4a4a4a;
  font-size: 1rem;
}

/* -------------------------------------------------------------------------
   FAQ STYLES
------------------------------------------------------------------------- */

.faq-item {
  margin-bottom: 2rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid #ebe9e4;
}

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

.faq-question {
  font-weight: 400;
  font-style: italic;
  color: #1a1a1a;
  margin-bottom: 0.75rem;
  margin-top: 0;
  border-bottom: none;
  padding-bottom: 0;
}

.faq-answer {
  color: #2e2e2e;
}

/* -------------------------------------------------------------------------
   FORMS
------------------------------------------------------------------------- */

.form-guidance {
  font-size: 1rem;
  color: #5c5c5c;
  font-style: italic;
  margin-bottom: 2rem;
}

#contact-form {
  margin-top: 1.5rem;
}

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

.form-group label {
  display: block;
  font-size: 1rem;
  color: #1a1a1a;
  margin-bottom: 0.5rem;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 0.75rem;
  font-family: Georgia, "Times New Roman", Times, serif;
  font-size: 1rem;
  color: #2e2e2e;
  background-color: #ffffff;
  border: 1px solid #d4d0c8;
  border-radius: 2px;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: #4a4a4a;
}

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

.form-group select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%235c5c5c' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  padding-right: 2.5rem;
}

.form-row {
  display: flex;
  gap: 1rem;
}

.form-group.half {
  flex: 1;
}

.required {
  color: #8b6b61;
}

.optional {
  color: #888888;
  font-weight: normal;
  font-size: 0.9em;
}

fieldset {
  border: none;
  padding: 0;
  margin: 0 0 1.75rem 0;
}

fieldset legend {
  font-size: 1rem;
  color: #1a1a1a;
  margin-bottom: 0.5rem;
  padding: 0;
}

fieldset .field-note {
  margin-bottom: 1rem;
}

fieldset .form-group {
  margin-bottom: 1rem;
}

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

.radio-label {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  cursor: pointer;
  font-size: 1rem;
  color: #2e2e2e;
}

.radio-label input[type="radio"] {
  width: auto;
  margin: 0;
}

.field-note {
  font-size: 0.9rem;
  color: #666666;
  margin-top: 0.35rem;
  margin-bottom: 0;
}

.submit-btn {
  display: inline-block;
  padding: 0.85rem 2rem;
  font-family: Georgia, "Times New Roman", Times, serif;
  font-size: 1rem;
  color: #ffffff;
  background-color: #5c5c5c;
  border: none;
  border-radius: 2px;
  cursor: pointer;
  margin-top: 1rem;
}

.submit-btn:hover {
  background-color: #1a1a1a;
}

/* Contact alternate (phone) */

.contact-alt {
  background-color: #f4f1eb;
  padding: 2rem;
  margin-top: 3rem;
  border-radius: 2px;
  text-align: center;
}

.contact-alt h2 {
  margin-top: 0;
  font-size: 1.25rem;
  border-bottom: none;
  padding-bottom: 0;
}

.phone-display {
  font-size: 1.3rem;
  margin: 1rem 0;
}

.phone-display a {
  color: #4a4a4a;
  text-decoration: none;
}

.phone-display a:hover {
  color: #1a1a1a;
}

/* Form success/error messages */

.form-message {
  padding: 1.25rem;
  border-radius: 2px;
  margin-bottom: 2rem;
}

.form-message.success {
  background-color: #f0f4ee;
  color: #3d5a3d;
  border: 1px solid #c8d4c4;
}

.form-message.error {
  background-color: #f9f2f1;
  color: #6b4a4a;
  border: 1px solid #d4c4c4;
}

@media (max-width: 500px) {
  .form-row {
    flex-direction: column;
    gap: 0;
  }

  .form-group.half {
    flex: none;
  }
}

/* -------------------------------------------------------------------------
   FOOTER
------------------------------------------------------------------------- */

footer {
  margin-top: 5rem;
  padding-bottom: 3rem;
  border-top: 1px solid #ebe9e4;
  padding-top: 2rem;
  text-align: center;
  font-size: 0.9rem;
  color: #666666;
}

footer p {
  margin-bottom: 0.5rem;
}

/* -------------------------------------------------------------------------
   PRINT STYLES
------------------------------------------------------------------------- */

@media print {
  body {
    background-color: #ffffff;
    color: #000000;
    font-size: 12pt;
    padding: 0;
  }

  header,
  nav,
  footer {
    display: none;
  }

  main {
    max-width: 100%;
    margin: 0;
  }

  a {
    text-decoration: none;
    color: #000000;
  }

  /* Reveal URLs for print */
  a[href]:after {
    content: " (" attr(href) ")";
    font-size: 0.9em;
  }

  .contact-section,
  .contact-alt {
    background-color: transparent;
    border: 1px solid #ccc;
    color: #000000;
  }

  h1, h2, h3 {
    color: #000000;
    page-break-after: avoid;
  }

  p, li {
    page-break-inside: avoid;
    orphans: 3;
    widows: 3;
  }
}
