/* Quiet House Notes — Editorial Styles */

:root {
  --bg: #f7f5f0;
  --text: #252525;
  --text-secondary: #68635c;
  --accent: #7f927e;
  --accent-dark: #465347;
  --border: rgba(40, 40, 40, 0.12);
  --panel: rgba(255, 255, 255, 0.74);
  --panel-strong: rgba(255, 255, 255, 0.88);
  --shadow: 0 18px 50px rgba(20, 20, 20, 0.07);
  --font-serif: Georgia, "Times New Roman", serif;
  --font-sans: Arial, Helvetica, sans-serif;
  --max-article: 760px;
  --max-wide: 1120px;
  --header-h: 4.25rem;
  --focus: #465347;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  min-height: 100%;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

body {
  margin: 0;
  min-height: 100%;
  font-family: var(--font-serif);
  font-size: 1.125rem;
  line-height: 1.75;
  color: var(--text);
  background:
    linear-gradient(rgba(247, 245, 240, 0.84), rgba(247, 245, 240, 0.84)),
    url("../images/background_florida_home.jpg");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: fixed;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background: url("../images/background_paper_texture.jpg");
  background-size: 500px 500px;
  opacity: 0.035;
  pointer-events: none;
  z-index: 0;
}

/* Mobile/tablet: fixed pseudo-element instead of background-attachment */
@media (max-width: 900px), (hover: none) {
  body {
    background-attachment: scroll;
    background-image: none;
    background-color: var(--bg);
  }

  body::after {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -2;
    background:
      linear-gradient(rgba(247, 245, 240, 0.86), rgba(247, 245, 240, 0.86)),
      url("../images/background_florida_home.jpg");
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    pointer-events: none;
  }

  body::before {
    z-index: -1;
  }
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--accent-dark);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
  transition: color 0.2s ease, opacity 0.2s ease;
}

a:hover {
  color: var(--accent);
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 3px;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -100px;
  z-index: 1000;
  padding: 0.75rem 1rem;
  background: var(--accent-dark);
  color: #fff;
  font-family: var(--font-sans);
  font-size: 0.9rem;
  text-decoration: none;
}

.skip-link:focus {
  top: 1rem;
}

.site-wrap {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.container {
  width: min(100% - 2.5rem, var(--max-wide));
  margin-inline: auto;
}

.container--narrow {
  width: min(100% - 2.5rem, var(--max-article));
}

/* Editorial surfaces */
.editorial-panel {
  background: var(--panel);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.55);
  box-shadow: var(--shadow);
}

.editorial-panel--strong {
  background: var(--panel-strong);
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(247, 245, 240, 0.78);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  min-height: var(--header-h);
  padding-block: 0.65rem;
}

.logo {
  font-family: var(--font-serif);
  font-size: 1.35rem;
  font-weight: 400;
  letter-spacing: 0.02em;
  color: var(--text);
  text-decoration: none;
  line-height: 1.2;
}

.logo span {
  display: block;
  font-family: var(--font-sans);
  font-size: 0.65rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-secondary);
  margin-top: 0.15rem;
}

.nav-toggle {
  display: none;
  width: 2.75rem;
  height: 2.75rem;
  padding: 0;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.55);
  cursor: pointer;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
}

.nav-toggle__bar {
  display: block;
  width: 1.15rem;
  height: 1.5px;
  background: var(--text);
  transition: transform 0.25s ease, opacity 0.25s ease;
}

.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(1) {
  transform: translateY(6.5px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(2) {
  opacity: 0;
}

.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(3) {
  transform: translateY(-6.5px) rotate(-45deg);
}

.site-nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.15rem 1.35rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-nav a {
  font-family: var(--font-sans);
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--text-secondary);
}

.site-nav a:hover,
.site-nav a[aria-current="page"] {
  color: var(--accent-dark);
}

.site-nav a[aria-current="page"] {
  border-bottom: 1px solid var(--accent);
  padding-bottom: 0.1rem;
}

@media (max-width: 860px) {
  .nav-toggle {
    display: flex;
  }

  .site-nav {
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    background: rgba(247, 245, 240, 0.96);
    border-bottom: 1px solid var(--border);
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-height 0.35s ease, opacity 0.25s ease;
  }

  .site-nav.is-open {
    max-height: 28rem;
    opacity: 1;
  }

  .site-nav ul {
    flex-direction: column;
    gap: 0;
    padding: 0.5rem 1.25rem 1.25rem;
  }

  .site-nav a {
    display: block;
    padding: 0.85rem 0;
    border-bottom: 1px solid var(--border);
  }
}

/* Reading progress */
.reading-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 2px;
  width: 0%;
  background: var(--accent-dark);
  z-index: 110;
  pointer-events: none;
}

/* Hero */
.hero {
  padding: clamp(3rem, 8vw, 6.5rem) 0 clamp(2.5rem, 5vw, 4rem);
}

.hero__panel {
  padding: clamp(2rem, 5vw, 3.75rem);
  position: relative;
}

.editorial-label {
  font-family: var(--font-sans);
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent-dark);
  margin: 0 0 1.25rem;
}

.hero h1,
.page-hero h1,
.article-header h1 {
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: clamp(3rem, 7vw, 6.5rem);
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin: 0 0 1.5rem;
  max-width: 18ch;
}

.hero__intro {
  max-width: 38rem;
  font-size: 1.15rem;
  line-height: 1.8;
  color: var(--text);
  margin: 0 0 2rem;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 1.75rem;
  align-items: center;
}

.btn {
  display: inline-block;
  font-family: var(--font-sans);
  font-size: 0.82rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 0.95rem 1.5rem;
  border: 1px solid var(--accent-dark);
  background: var(--accent-dark);
  color: #f7f5f0;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.btn:hover {
  background: transparent;
  color: var(--accent-dark);
}

.btn--ghost {
  background: transparent;
  color: var(--accent-dark);
  border-color: rgba(70, 83, 71, 0.45);
  padding-inline: 0;
  border: none;
  border-bottom: 1px solid rgba(70, 83, 71, 0.45);
  border-radius: 0;
  padding: 0.35rem 0;
}

.btn--ghost:hover {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

.annotation {
  font-family: var(--font-sans);
  font-style: italic;
  font-size: 0.85rem;
  color: var(--text-secondary);
  transform: rotate(-1.2deg);
  display: inline-block;
  margin-top: 1.5rem;
}

/* Sections */
.section {
  padding: clamp(2.5rem, 6vw, 5rem) 0;
}

.section__panel {
  padding: clamp(1.75rem, 4vw, 3rem);
}

.section h2 {
  font-size: clamp(1.85rem, 3.5vw, 2.85rem);
  font-weight: 400;
  line-height: 1.2;
  margin: 0 0 1.5rem;
  letter-spacing: -0.015em;
  max-width: 18ch;
}

.prose {
  max-width: var(--max-article);
}

.prose p {
  margin: 0 0 1.35rem;
}

.prose p:last-child {
  margin-bottom: 0;
}

.rule {
  border: 0;
  border-top: 1px solid var(--border);
  margin: 2.5rem 0;
}

.pull-quote {
  font-size: clamp(1.45rem, 2.8vw, 2rem);
  line-height: 1.4;
  font-style: italic;
  color: var(--accent-dark);
  max-width: 22ch;
  margin: 2.5rem 0 2.5rem auto;
  padding-left: 1.25rem;
  border-left: 2px solid var(--accent);
}

.page-meta {
  font-family: var(--font-sans);
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-secondary);
  margin-bottom: 0.75rem;
}

.page-number {
  font-family: var(--font-sans);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  color: var(--text-secondary);
  margin-top: 2rem;
}

/* Asymmetric layouts */
.layout-asymmetric {
  display: grid;
  gap: 2rem;
}

@media (min-width: 900px) {
  .layout-asymmetric {
    grid-template-columns: 1fr 1.35fr;
    align-items: start;
    gap: 3rem;
  }

  .layout-asymmetric--reverse {
    grid-template-columns: 1.35fr 1fr;
  }

  .layout-asymmetric .aside-note {
    position: sticky;
    top: calc(var(--header-h) + 1.5rem);
  }
}

.aside-note {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.65;
  padding-top: 0.5rem;
}

.aside-note em {
  display: block;
  font-style: italic;
  margin-top: 1rem;
  color: var(--accent-dark);
}

/* Journal preview / featured */
.journal-preview {
  display: grid;
  gap: 1.5rem;
}

@media (min-width: 800px) {
  .journal-preview {
    grid-template-columns: 1.4fr 1fr;
    grid-template-rows: auto auto auto;
  }

  .preview-item--featured {
    grid-row: span 2;
  }
}

.preview-item {
  display: block;
  text-decoration: none;
  color: inherit;
  padding: 1.5rem 1.6rem;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.55);
  transition: background 0.25s ease, transform 0.25s ease, border-color 0.25s ease;
  height: 100%;
}

.preview-item:hover {
  background: rgba(255, 255, 255, 0.82);
  border-color: rgba(70, 83, 71, 0.28);
  transform: translateY(-2px);
}

.preview-item__meta {
  font-family: var(--font-sans);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-secondary);
  margin-bottom: 0.75rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
}

.preview-item h3 {
  font-size: clamp(1.25rem, 2vw, 1.75rem);
  font-weight: 400;
  margin: 0 0 0.75rem;
  line-height: 1.25;
}

.preview-item--featured h3 {
  font-size: clamp(1.6rem, 2.8vw, 2.35rem);
}

.preview-item p {
  margin: 0 0 1rem;
  color: var(--text-secondary);
  font-size: 1rem;
  line-height: 1.65;
}

.preview-item__link {
  font-family: var(--font-sans);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent-dark);
  border-bottom: 1px solid rgba(70, 83, 71, 0.35);
  padding-bottom: 0.1rem;
}

/* Journal dashboard */
.journal-grid {
  display: grid;
  gap: 1.25rem;
}

@media (min-width: 700px) {
  .journal-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (min-width: 1000px) {
  .journal-grid {
    grid-template-columns: 1fr 1fr 1fr;
  }

  .journal-card:nth-child(1) {
    grid-column: span 2;
  }
}

.journal-card {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
  padding: 1.6rem 1.5rem;
  min-height: 100%;
  border-top: 2px solid var(--accent);
  transition: background 0.25s ease, transform 0.25s ease;
}

.journal-card:hover {
  background: rgba(255, 255, 255, 0.9);
  transform: translateY(-2px);
}

.journal-card h2 {
  font-size: clamp(1.35rem, 2.2vw, 1.85rem);
  max-width: none;
  margin-bottom: 0.85rem;
}

.journal-card p {
  color: var(--text-secondary);
  font-size: 1rem;
  flex: 1;
  margin: 0 0 1.25rem;
}

/* Page hero */
.page-hero {
  padding: clamp(2.5rem, 6vw, 4.5rem) 0 1.5rem;
}

.page-hero .editorial-panel {
  padding: clamp(1.75rem, 4vw, 3rem);
}

.page-hero .subtitle {
  max-width: 36rem;
  color: var(--text-secondary);
  font-size: 1.15rem;
  margin: 0;
}

/* Article */
.article-layout {
  padding: 2rem 0 4rem;
}

.breadcrumb {
  font-family: var(--font-sans);
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
}

.breadcrumb ol {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.breadcrumb li:not(:last-child)::after {
  content: "/";
  margin-left: 0.35rem;
  opacity: 0.5;
}

.breadcrumb a {
  text-decoration: none;
  color: var(--text-secondary);
}

.breadcrumb a:hover {
  color: var(--accent-dark);
}

.article-header {
  margin-bottom: 2.5rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--border);
}

.article-header h1 {
  max-width: 16ch;
  font-size: clamp(2.4rem, 5.5vw, 4.5rem);
}

.article-dek {
  font-style: italic;
  font-size: 1.2rem;
  line-height: 1.7;
  color: var(--text-secondary);
  max-width: 38rem;
  margin: 0;
}

.article-body {
  max-width: var(--max-article);
}

.article-body h2 {
  font-size: clamp(1.45rem, 2.5vw, 1.9rem);
  font-weight: 400;
  margin: 2.75rem 0 1rem;
  max-width: none;
}

.article-body p {
  margin: 0 0 1.4rem;
  line-height: 1.8;
}

.article-nav {
  display: grid;
  gap: 1rem;
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
}

@media (min-width: 700px) {
  .article-nav {
    grid-template-columns: 1fr 1fr;
  }
}

.article-nav a {
  text-decoration: none;
  padding: 1.25rem;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.5);
  color: inherit;
  display: block;
  transition: background 0.2s ease;
}

.article-nav a:hover {
  background: rgba(255, 255, 255, 0.85);
}

.article-nav__label {
  font-family: var(--font-sans);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-secondary);
  display: block;
  margin-bottom: 0.4rem;
}

.related {
  margin-top: 3rem;
  padding: 1.75rem;
}

.related h2 {
  font-size: 1.35rem;
  margin: 0 0 1.25rem;
  max-width: none;
}

.related ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.85rem;
}

.related a {
  text-decoration: none;
  font-size: 1.05rem;
}

.back-journal {
  display: inline-block;
  margin-top: 2rem;
  font-family: var(--font-sans);
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--accent-dark);
  border-bottom: 1px solid rgba(70, 83, 71, 0.35);
  padding-bottom: 0.15rem;
}

/* Contact */
.contact-grid {
  display: grid;
  gap: 2rem;
}

@media (min-width: 800px) {
  .contact-grid {
    grid-template-columns: 0.9fr 1.2fr;
    gap: 2.5rem;
  }
}

.contact-details address {
  font-style: normal;
  line-height: 1.7;
  margin: 1rem 0 0;
}

.contact-form {
  display: grid;
  gap: 1.15rem;
}

.form-field {
  display: grid;
  gap: 0.4rem;
}

.form-field label {
  font-family: var(--font-sans);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-secondary);
}

.form-field input,
.form-field textarea {
  width: 100%;
  font-family: var(--font-serif);
  font-size: 1.05rem;
  padding: 0.85rem 1rem;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.7);
  color: var(--text);
  resize: vertical;
}

.form-field textarea {
  min-height: 10rem;
}

.form-note {
  font-size: 0.95rem;
  color: var(--text-secondary);
  margin: 0.5rem 0 0;
}

.form-status {
  display: none;
  margin-top: 1rem;
  padding: 1rem;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.65);
  font-size: 0.98rem;
}

.form-status.is-visible {
  display: block;
}

/* Privacy */
.policy h2 {
  font-size: 1.45rem;
  margin: 2.25rem 0 0.85rem;
  max-width: none;
}

.policy ul {
  margin: 0 0 1.25rem;
  padding-left: 1.25rem;
}

.policy li {
  margin-bottom: 0.45rem;
}

/* Footer */
.site-footer {
  margin-top: auto;
  padding: 3rem 0 2.5rem;
  border-top: 1px solid var(--border);
  background: rgba(247, 245, 240, 0.55);
}

.footer-inner {
  display: grid;
  gap: 2rem;
}

@media (min-width: 800px) {
  .footer-inner {
    grid-template-columns: 1.4fr 1fr 1fr;
  }
}

.footer-brand h2 {
  font-size: 1.35rem;
  margin: 0 0 0.65rem;
  max-width: none;
}

.footer-brand p {
  margin: 0;
  color: var(--text-secondary);
  font-size: 1rem;
  max-width: 28ch;
}

.footer-nav h3,
.footer-contact h3 {
  font-family: var(--font-sans);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-secondary);
  margin: 0 0 0.85rem;
  font-weight: 400;
}

.footer-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.45rem;
}

.footer-nav a {
  text-decoration: none;
  color: var(--text);
  font-size: 1rem;
}

.footer-contact p {
  margin: 0 0 0.5rem;
  font-size: 1rem;
}

.footer-bottom {
  margin-top: 2.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border);
  font-family: var(--font-sans);
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  color: var(--text-secondary);
}

/* Reveal animations */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* Utilities */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.text-secondary {
  color: var(--text-secondary);
}
