/*
Theme Name: Open Into
Theme URI: https://openinto.ai
Author: Open Into
Description: Custom theme for Back Deck and Park Bench — two journals by Open Into.
Version: 1.2.0
License: GNU General Public License v2 or later
Text Domain: openinto
*/

/* ============================================================
   VARIABLES & RESET
   ============================================================ */

:root {
  --bg:            #fdfaf5;
  --fg:            #48341a;
  --word2:         #d89b5b;
  --btn-bg:        #d89b5b;
  --btn-text:      #48341a;
  --hamburger:     #d89b5b;
  --tagline:       #fdfaf5;
  --description:   #d89b5b;
  --footer-note:   #d89b5b;
  --footer-copy:   #48341a;
  --muted:         #8a8075;
  --border:        #dfdad3;
  --sprout:        #a86548;
  --content-max:   38rem;
  --page-pad:      1.5rem;
}

/* Back Deck uses a slightly darker amber for buttons/hamburger */
.page-template-page-back-deck-php {
  --btn-bg:    #a67d58;
  --hamburger: #a67d58;
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--fg);
  font-family: 'Raleway', -apple-system, BlinkMacSystemFont, sans-serif;
  font-weight: 300;
  font-size: 16px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

img { display: block; max-width: 100%; }

a {
  color: inherit;
  text-decoration: none;
  transition: opacity 0.2s ease;
}
a:hover { opacity: 0.7; }

h1, h2, h3, h4 { font-weight: 300; line-height: 1.2; }

/* ============================================================
   HAMBURGER MENU
   ============================================================ */

.hamburger-btn {
  position: fixed;
  top: 1.75rem;
  right: 2rem;
  z-index: 100;
  background: none;
  border: none;
  cursor: pointer;
  color: #d89b5b;
  padding: 0.5rem;
  transition: opacity 0.2s ease;
  line-height: 0;
}
.hamburger-btn:hover { opacity: 0.7; }

/* Back Deck uses slightly darker amber */
.page-template-page-back-deck-php .hamburger-btn { color: #a67d58; }

.hamburger-btn .icon-close { display: none; }
.hamburger-btn.is-open .icon-menu  { display: none; }
.hamburger-btn.is-open .icon-close { display: block; }

.nav-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 50;
  background: rgba(253, 250, 245, 0.97);
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2rem;
}
.nav-overlay.is-open { display: flex; }

.nav-overlay a,
.nav-overlay button {
  font-family: 'Raleway', sans-serif;
  font-size: 1.125rem;
  font-weight: 300;
  letter-spacing: 0.05em;
  color: var(--fg);
  background: none;
  border: none;
  cursor: pointer;
  transition: opacity 0.2s ease;
}
.nav-overlay a:hover,
.nav-overlay button:hover { opacity: 0.7; }

.nav-overlay .nav-word2 { color: var(--word2); }

.nav-overlay .nav-muted { color: var(--muted); }

/* ============================================================
   PAGE WRAPPER
   ============================================================ */

.site-wrap {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.site-content { flex: 1; }

/* ============================================================
   PAGE HEADER (landing pages)
   ============================================================ */

.page-header {
  padding: 10rem var(--page-pad) 1.5rem;
  max-width: var(--content-max);
  margin: 0 auto;
  width: 100%;
}

@media (min-width: 768px) {
  .page-header { padding-top: 12rem; }
}

.page-title {
  font-size: 3rem;
  font-weight: 300;
  letter-spacing: -0.02em;
}

@media (min-width: 768px) {
  .page-title { font-size: 3.75rem; }
}

.page-title .word1 { color: var(--fg); }
.page-title .word2 { color: var(--word2); }

.read-btn-wrap {
  display: flex;
  justify-content: flex-end;
  margin-top: 0.5rem;
}

.read-btn {
  display: inline-block;
  background: #d89b5b;
  color: #48341a;
  font-size: 0.875rem;
  font-family: 'Raleway', -apple-system, sans-serif;
  font-weight: 300;
  padding: 0.4rem 1.5rem;
  border-radius: 9999px;
  text-decoration: none;
  transition: opacity 0.2s ease;
  white-space: nowrap;
}
.read-btn:hover { opacity: 0.7; color: #48341a; }

.page-template-page-back-deck-php .read-btn {
  background: #a67d58;
}

.read-posts-wrap {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 2rem var(--page-pad) 1.5rem;
  width: 100%;
}

.read-posts-btn {
  display: inline-block;
  background: #d89b5b;
  color: #48341a;
  font-size: 0.875rem;
  font-family: 'Raleway', -apple-system, sans-serif;
  font-weight: 300;
  padding: 0.4rem 1.5rem;
  border-radius: 9999px;
  text-decoration: none;
  transition: opacity 0.2s ease;
  white-space: nowrap;
}
.read-posts-btn:hover { opacity: 0.7; color: #48341a; }

.page-template-page-back-deck-php .read-posts-btn {
  background: #a67d58;
}

/* ============================================================
   HERO IMAGE
   ============================================================ */

.hero {
  position: relative;
  width: 100%;
  overflow: visible;
}

.hero img {
  width: 100%;
  height: auto !important;
  max-height: none !important;
  display: block;
  object-fit: unset !important;
}

.hero-tagline {
  position: absolute;
  bottom: 1.75rem;
  left: var(--page-pad);
  font-size: 0.875rem;
  font-style: italic;
  color: var(--tagline);
  font-weight: 300;
}

/* ============================================================
   PAGE DESCRIPTION
   ============================================================ */

.page-description {
  padding: 2rem var(--page-pad) 0.5rem;
  max-width: var(--content-max);
  margin: 0 auto;
  width: 100%;
}

.page-description p {
  color: var(--description);
  font-size: 1rem;
}

/* ============================================================
   POST CARDS (landing page recent posts)
   ============================================================ */

.post-list {
  padding: 0 var(--page-pad) 4rem;
  max-width: var(--content-max);
  margin: 0 auto;
  width: 100%;
}

.post-list .post-card + .post-card {
  margin-top: 3rem;
}

.post-card { display: block; }

.post-card time {
  display: block;
  font-size: 0.75rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.post-card h2 {
  font-size: 1.25rem;
  font-weight: 300;
  color: var(--fg);
  margin-top: 0.25rem;
}

.post-card .post-thumb {
  display: block;
  max-width: 28rem;
  width: 100%;
  height: auto !important;
  max-height: none !important;
  object-fit: unset !important;
  border-radius: 2px;
  margin-top: 0.75rem;
  margin-left: auto;
  margin-right: auto;
}

.post-card .post-excerpt {
  font-size: 0.9375rem;
  color: var(--muted);
  margin-top: 0.75rem;
  line-height: 1.6;
}

/* ============================================================
   ARCHIVE HEADER
   ============================================================ */

.archive-header {
  padding: 4rem var(--page-pad) 2rem;
  max-width: var(--content-max);
  margin: 0 auto;
  width: 100%;
}

@media (min-width: 768px) {
  .archive-header { padding-top: 6rem; }
}

.archive-header h1 {
  font-size: 2rem;
  font-weight: 300;
  letter-spacing: -0.01em;
}

.archive-header .word1 { color: var(--fg); }
.archive-header .word2 { color: var(--primary); }

.back-link {
  display: inline-block;
  font-size: 0.8125rem;
  color: var(--muted);
  margin-top: 0.75rem;
  transition: color 0.2s ease;
}
.back-link:hover { color: var(--primary); opacity: 1; }

.archive-list {
  padding: 0 var(--page-pad) 4rem;
  max-width: var(--content-max);
  margin: 0 auto;
  width: 100%;
}

.archive-list .post-card + .post-card {
  margin-top: 3rem;
  padding-top: 3rem;
  border-top: 1px solid var(--border);
}

/* ============================================================
   PAGINATION
   ============================================================ */

.pagination {
  padding: 2rem var(--page-pad) 3rem;
  max-width: var(--content-max);
  margin: 0 auto;
  width: 100%;
  display: flex;
  gap: 1rem;
  align-items: center;
}

.pagination a,
.pagination span {
  font-size: 0.875rem;
  color: var(--muted);
}

.pagination a { color: var(--primary); }
.pagination .current { color: var(--fg); font-weight: 400; }

/* ============================================================
   SINGLE POST
   ============================================================ */

.single-wrap {
  padding: 4rem var(--page-pad) 4rem;
  max-width: var(--content-max);
  margin: 0 auto;
  width: 100%;
}

@media (min-width: 768px) {
  .single-wrap { padding-top: 6rem; }
}

.single-wrap .back-link {
  margin-bottom: 2rem;
}

.single-wrap time {
  display: block;
  font-size: 0.75rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-top: 2rem;
}

.single-wrap h1 {
  font-size: 1.875rem;
  font-weight: 300;
  color: var(--fg);
  margin-top: 0.5rem;
  margin-bottom: 1.5rem;
}

@media (min-width: 768px) {
  .single-wrap h1 { font-size: 2.25rem; }
}

.single-wrap .single-thumb {
  display: block;
  max-width: 28rem;
  width: 100%;
  height: auto !important;
  max-height: none !important;
  object-fit: unset !important;
  border-radius: 2px;
  margin: 0 auto 2rem;
}

.post-content {
  color: var(--fg);
  font-size: 1rem;
  line-height: 1.8;
}

.post-content p + p   { margin-top: 1.25rem; }
.post-content h2      { font-size: 1.375rem; margin-top: 2rem; margin-bottom: 0.5rem; }
.post-content h3      { font-size: 1.125rem; margin-top: 1.5rem; margin-bottom: 0.5rem; }
.post-content ul,
.post-content ol      { padding-left: 1.5rem; margin-top: 1rem; }
.post-content li      { margin-top: 0.25rem; }
.post-content blockquote {
  border-left: 2px solid var(--border);
  padding-left: 1rem;
  color: var(--muted);
  font-style: italic;
  margin: 1.5rem 0;
}
.post-content a { color: var(--primary); }
.post-content a:hover { opacity: 0.7; }
.post-content img {
  width: 100%;
  border-radius: 2px;
  margin: 1.5rem 0;
}

/* ============================================================
   FOOTER
   ============================================================ */

.site-footer {
  padding: 1.5rem var(--page-pad) 2.5rem;
  text-align: center;
}

.site-footer .footer-note {
  font-size: 0.75rem;
  color: var(--footer-note);
  font-style: italic;
}

.site-footer .footer-copy {
  font-size: 0.75rem;
  color: var(--footer-copy);
  margin-top: 0.25rem;
}

.site-footer .footer-copy a {
  color: var(--footer-copy);
  transition: color 0.2s ease;
}
.site-footer .footer-copy a:hover { color: var(--sprout); opacity: 1; }

.contact-area { margin-top: 1.5rem; display: none; }
.contact-area.is-open { display: block; }

.contact-form {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  max-width: 20rem;
  margin: 0 auto;
}

.contact-input {
  flex: 1;
  background: transparent;
  border: none;
  border-bottom: 1px solid rgba(192, 140, 89, 0.3);
  color: var(--primary);
  font-family: 'Raleway', sans-serif;
  font-size: 0.875rem;
  font-weight: 300;
  padding: 0.375rem 0.25rem;
  outline: none;
  transition: border-color 0.2s ease;
}
.contact-input::placeholder { color: rgba(192, 140, 89, 0.35); }
.contact-input:focus { border-bottom-color: var(--primary); }

.contact-submit {
  background: none;
  border: none;
  cursor: pointer;
  color: rgba(192, 140, 89, 0.6);
  line-height: 0;
  padding: 0.25rem;
  transition: color 0.2s ease;
}
.contact-submit:hover { color: var(--primary); }

.contact-thanks {
  font-size: 0.75rem;
  color: rgba(192, 140, 89, 0.65);
  font-style: italic;
  font-weight: 300;
  margin-top: 0.75rem;
  display: none;
}
.contact-thanks.is-visible { display: block; }

.sprout-link {
  display: inline-block;
  margin-top: 0.75rem;
  line-height: 0;
  transition: opacity 0.2s ease, transform 0.2s ease;
}
.sprout-link:hover { opacity: 0.7; transform: scale(1.1); }

/* ============================================================
   404
   ============================================================ */

.not-found-wrap {
  padding: 6rem var(--page-pad) 4rem;
  max-width: var(--content-max);
  margin: 0 auto;
  text-align: center;
}

.not-found-wrap h1 {
  font-size: 1.5rem;
  color: var(--fg);
  margin-bottom: 1rem;
}

.not-found-wrap p {
  color: var(--muted);
  font-size: 0.9375rem;
}

.not-found-wrap .home-links {
  display: flex;
  justify-content: center;
  gap: 2rem;
  margin-top: 2rem;
}

.not-found-wrap .home-links a {
  font-size: 1rem;
  font-weight: 300;
  color: var(--fg);
}
.not-found-wrap .home-links .word2 { color: var(--primary); }

/* ============================================================
   NO POSTS STATE
   ============================================================ */

.no-posts {
  color: var(--muted);
  font-size: 0.9375rem;
  padding: 1rem 0;
}
