@font-face {
  font-family: "Playfair Display";
  src: url("../fonts/PlayfairDisplay.ttf") format("truetype");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Open Sans";
  src: url("../fonts/OpenSans.ttf") format("truetype");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #F9F7F2;
  --text: #2D2D2D;
  --heading: #1E3A34;
  --accent: #B85C38;
  --muted: #6B6B6B;
  --border: #E5E0D8;
  --font-heading: "Playfair Display", serif;
  --font-body: "Open Sans", sans-serif;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

img {
  max-width: 100%;
}

html {
  scroll-behavior: smooth;
  overflow-x: clip;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1.125rem;
  line-height: 1.8;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  overflow-x: clip;
}

.site-header {
  background: var(--heading);
  color: var(--bg);
  padding: 1rem 2rem;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  flex-wrap: wrap;
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: inherit;
}

.logo img {
  width: 50px;
  height: 50px;
  border-radius: 4px;
}

.logo span {
  font-family: var(--font-heading);
  font-size: 1.6rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  min-width: 0;
}

.header-notice {
  font-size: 0.8rem;
  opacity: 0.7;
  max-width: 250px;
  text-align: right;
  line-height: 1.4;
}

.article-wrapper {
  flex: 1 0 auto;
  width: 100%;
  min-width: 0;
}

.article-container {
  max-width: 760px;
  margin: 0 auto;
  padding: 3rem 20px;
  min-width: 0;
}

.article-header {
  text-align: center;
  margin-bottom: 3rem;
}

.category {
  display: inline-block;
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--accent);
  margin-bottom: 1rem;
}

.article-header h1 {
  font-family: var(--font-heading);
  font-size: clamp(2.5rem, 5vw, 3.5rem);
  line-height: 1.2;
  color: var(--heading);
  margin-bottom: 1.5rem;
}

.meta {
  color: var(--muted);
  font-size: 0.95rem;
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.featured-image {
  width: 100%;
  height: auto;
  border-radius: 4px;
  margin-bottom: 3rem;
  box-shadow: 0 10px 30px rgba(0,0,0,0.05);
}

.lead {
  font-size: 1.35rem;
  line-height: 1.7;
  color: var(--heading);
  font-weight: 500;
  margin-bottom: 2.5rem;
}

.toc {
  background: #F0EBE1;
  padding: 2rem;
  border-radius: 8px;
  margin-bottom: 3rem;
}

.toc h3 {
  font-family: var(--font-heading);
  font-size: 1.2rem;
  color: var(--heading);
  margin-bottom: 1rem;
}

.toc ul {
  list-style: none;
  padding-left: 0;
}

.toc li {
  margin-bottom: 0.5rem;
}

.toc a {
  color: var(--text);
  text-decoration: none;
  border-bottom: 1px dashed var(--border);
  transition: color 0.3s;
}

.toc a:hover {
  color: var(--accent);
}

.article-body h2 {
  font-family: var(--font-heading);
  font-size: 2rem;
  color: var(--heading);
  margin-top: 3.5rem;
  margin-bottom: 1.5rem;
  line-height: 1.3;
}

.article-body h3 {
  font-family: var(--font-heading);
  font-size: 1.4rem;
  color: var(--heading);
  margin-top: 2rem;
  margin-bottom: 1rem;
}

.article-body p {
  margin-bottom: 1.5rem;
}

.article-body figure {
  margin: 2.5rem 0;
}

.article-body img {
  width: 100%;
  height: auto;
  border-radius: 4px;
  display: block;
}

.article-body figcaption {
  text-align: center;
  font-size: 0.9rem;
  color: var(--muted);
  font-style: italic;
  margin-top: 1rem;
}

.mid-cta {
  text-align: center;
  margin: 3rem 0;
  padding: 2.5rem;
  background: #F0EBE1;
  border-radius: 8px;
}

.mid-cta p {
  font-size: 1.2rem;
  color: var(--heading);
  margin-bottom: 1.5rem;
  font-weight: 500;
}

blockquote {
  margin: 2.5rem 0;
  padding: 1.5rem 2rem;
  background: #F0EBE1;
  border-left: 4px solid var(--accent);
  font-style: italic;
  color: var(--heading);
  border-radius: 0 4px 4px 0;
}

blockquote p {
  margin-bottom: 1rem;
  font-size: 1.1rem;
  line-height: 1.6;
}

blockquote cite {
  display: block;
  font-style: normal;
  font-size: 0.95rem;
  color: var(--muted);
  font-weight: 600;
}

.author-box {
  display: flex;
  gap: 2rem;
  align-items: center;
  margin: 4rem 0;
  padding: 2.5rem;
  background: #F0EBE1;
  border-radius: 8px;
}

.author-text {
  order: 1;
}

.author-text h3 {
  font-family: var(--font-heading);
  margin: 0 0 0.5rem 0;
  color: var(--heading);
  font-size: 1.5rem;
}

.author-text p {
  margin: 0;
  font-size: 1rem;
  line-height: 1.6;
}

.author-image {
  width: 160px;
  height: 160px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  order: 2;
}

.contact-section {
  max-width: 760px;
  margin: 2rem auto 4rem;
  padding: 3rem 2.5rem;
  background: #EFEBE1;
  border-radius: 8px;
  text-align: center;
  min-width: 0;
}

.contact-section h2 {
  font-family: var(--font-heading);
  font-size: 2rem;
  color: var(--heading);
  margin-top: 0;
  margin-bottom: 1rem;
}

.contact-section > p {
  color: var(--muted);
  margin-bottom: 2rem;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  text-align: left;
  margin-top: 2rem;
}

.form-group.full-width {
  grid-column: 1 / -1;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--heading);
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  max-width: 100%;
  padding: 0.8rem 1rem;
  border: 1px solid var(--border);
  border-radius: 4px;
  font-family: var(--font-body);
  font-size: 1rem;
  background: #FFF;
  transition: border-color 0.3s;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--accent);
}

.checkbox-group {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
}

.checkbox-group input {
  width: auto;
  margin-top: 4px;
}

.checkbox-group label {
  font-size: 0.9rem;
  font-weight: 400;
  color: var(--muted);
  line-height: 1.5;
}

.btn-cta {
  display: inline-block;
  width: 100%;
  max-width: 100%;
  padding: 1rem 2.5rem;
  background: var(--accent);
  color: #FFF;
  text-decoration: none;
  border-radius: 4px;
  font-weight: 600;
  font-family: var(--font-body);
  border: none;
  cursor: pointer;
  font-size: 1.1rem;
  transition: background 0.3s;
}

.btn-cta:hover {
  background: #9A4D2E;
}

.site-footer {
  background: var(--heading);
  color: var(--bg);
  padding: 3rem 2rem 2rem;
  margin-top: auto;
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 3rem;
  margin-bottom: 2rem;
}

.footer-brand {
  display: flex;
  gap: 2rem;
  align-items: flex-start;
}

.footer-address {
  font-size: 0.95rem;
  line-height: 1.6;
  opacity: 0.9;
}

.footer-address p {
  margin: 0;
}

.footer-links {
  display: flex;
  gap: 2rem;
}

.footer-links a {
  color: var(--bg);
  text-decoration: none;
  font-size: 0.95rem;
  opacity: 0.8;
  transition: opacity 0.3s;
}

.footer-links a:hover {
  opacity: 1;
}

.footer-disclaimer {
  max-width: 1200px;
  margin: 0 auto 2rem;
  padding-top: 2rem;
  border-top: 1px solid rgba(255,255,255,0.1);
  font-size: 0.85rem;
  opacity: 0.7;
  line-height: 1.6;
}

.footer-copyright {
  max-width: 1200px;
  margin: 0 auto;
  text-align: center;
  font-size: 0.85rem;
  opacity: 0.6;
}

.thanks-wrapper {
  flex: 1 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 80vh;
  background: linear-gradient(135deg, #F0EBE1 0%, #E5E0D8 100%);
  padding: 3rem 20px;
}

.thanks-box {
  background: #FFF;
  padding: 3rem;
  border-radius: 12px;
  box-shadow: 0 15px 40px rgba(0,0,0,0.1);
  text-align: center;
  max-width: 600px;
  width: 100%;
  border: 1px solid var(--border);
}

.thanks-logo {
  margin-bottom: 1.5rem;
}

.thanks-box h1 {
  font-family: var(--font-heading);
  font-size: 2.2rem;
  color: var(--heading);
  margin-bottom: 1.5rem;
}

.thanks-box p {
  font-size: 1.2rem;
  color: var(--text);
  line-height: 1.7;
  margin-bottom: 1rem;
}

.thanks-box strong {
  color: var(--accent);
}

@media (max-width: 768px) {
  .header-inner {
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
  }
  
  .header-notice {
    width: 100%;
    text-align: center;
    max-width: 100%;
  }
  
  .article-container {
    padding: 2rem 15px;
  }
  
  .author-box {
    flex-direction: column;
    text-align: center;
  }
  
  .author-image {
    order: -1;
  }
  
  .form-grid {
    grid-template-columns: 1fr;
  }
  
  .footer-inner {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
  
  .footer-links {
    flex-wrap: wrap;
    justify-content: center;
  }
  
  .thanks-box {
    padding: 2rem 1.5rem;
  }
  
  .thanks-box h1 {
    font-size: 1.8rem;
  }
  
  .thanks-box p {
    font-size: 1.1rem;
  }
}

@media (max-width: 640px) {
  .logo {
    flex-direction: column;
  }

  .header-notice {
    word-break: break-all;
  }

  .logo span {
    word-break: break-all;
    min-width: 0;
    flex: 1;
  }

  .footer-address {
    word-break: break-all;
  }
}

@media (max-width: 480px) {
  .site-header {
    padding: 1rem 12px;
  }

  .article-container {
    padding: 1.5rem 12px;
  }

  .contact-section {
    padding: 2rem 1rem;
    margin: 1.5rem 12px 3rem;
  }

  .legal-wrapper {
    padding: 1.5rem 12px;
  }

  .legal-content {
    padding: 1.5rem 1rem;
  }

  .article-header h1 {
    font-size: clamp(1.75rem, 8vw, 2.5rem);
  }

  .article-body h2 {
    font-size: 1.5rem;
  }

  body {
    font-size: 1rem;
  }
}

.legal-wrapper {
  flex: 1 0 auto;
  width: 100%;
  min-width: 0;
  padding: 3rem 20px;
}

.legal-content {
  max-width: 800px;
  margin: 0 auto;
  background: #FFF;
  padding: 3rem;
  border-radius: 8px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.05);
  word-break: break-word;
}

.legal-content h1 {
  font-family: var(--font-heading);
  font-size: 2.5rem;
  color: var(--heading);
  margin-bottom: 2rem;
  text-align: center;
}

.legal-content h2 {
  font-family: var(--font-heading);
  font-size: 1.6rem;
  color: var(--heading);
  margin-top: 2.5rem;
  margin-bottom: 1rem;
}

.legal-content p {
  margin-bottom: 1.2rem;
  color: var(--text);
  line-height: 1.7;
}

.legal-content ul {
  margin: 1rem 0 1.5rem 1.5rem;
  list-style-type: disc;
}

.legal-content li {
  margin-bottom: 0.5rem;
  color: var(--text);
  line-height: 1.6;
}

.legal-content a {
  color: var(--accent);
  text-decoration: underline;
}

@media (max-width: 768px) {
  .legal-wrapper {
    padding: 2rem 15px;
  }
  .legal-content {
    padding: 2rem 1.5rem;
  }
  .legal-content h1 {
    font-size: 2rem;
  }
  .legal-content h2 {
    font-size: 1.4rem;
  }
}