/*
Theme Name: Curee 33
Theme URI: https://curee33.com
Author: Curee 33 Studio
Author URI: https://curee33.com
Description: A refined editorial WordPress theme for Curee 33 — a craft writing studio built for brands, founders and thinkers who refuse to settle for ordinary language.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 8.0
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: curee33
Tags: blog, custom-colors, custom-logo, custom-menu, editor-style, featured-images, full-width-template, post-formats, rtl-language-support, sticky-post, threaded-comments, translation-ready
*/

/* =============================================
   CUREE 33 — THEME STYLESHEET
   ============================================= */

:root {
  --parchment:       #c8b99a;
  --parchment-light: #d4c4a8;
  --parchment-dark:  #b8a688;
  --parchment-bg:    #cec0a4;
  --ink:             #2c1f14;
  --ink-mid:         #4a3728;
  --ink-soft:        #6b5040;
  --gold:            #8a6e4a;
  --gold-light:      #a8865e;
  --border:          rgba(74, 55, 40, 0.22);
  --white:           #faf7f2;

  --font-display: 'Cormorant Garamond', Georgia, serif;
  --font-body:    'EB Garamond', Georgia, serif;

  --max-width:    1200px;
  --content-width: 760px;
}

/* ── Reset & Base ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; font-size: 18px; }

body {
  background-color: var(--parchment-bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.75;
  overflow-x: hidden;
}

/* Grain overlay */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='300' height='300' filter='url(%23n)' opacity='0.07'/%3E%3C/svg%3E");
  opacity: 0.5;
}

/* ── Typography ── */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 400;
  line-height: 1.2;
  color: var(--ink);
}

h1 { font-size: clamp(2.4rem, 5vw, 4.5rem); font-style: italic; }
h2 { font-size: clamp(1.8rem, 3.5vw, 3rem); font-style: italic; }
h3 { font-size: clamp(1.3rem, 2vw, 1.9rem); }
h4 { font-size: 1.2rem; }

p { margin-bottom: 1.4rem; }
p:last-child { margin-bottom: 0; }

a { color: var(--ink); text-decoration: none; transition: color 0.3s; }
a:hover { color: var(--gold); }

em { font-style: italic; }
strong { font-weight: 600; }

blockquote {
  border-left: 2px solid var(--gold);
  padding: 1rem 2rem;
  margin: 2rem 0;
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.3rem;
  color: var(--ink-mid);
  line-height: 1.5;
}

blockquote cite {
  display: block;
  font-size: 0.75rem;
  font-style: normal;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--gold);
  margin-top: 0.8rem;
}

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

ul, ol {
  padding-left: 1.5rem;
  margin-bottom: 1.4rem;
}

li { margin-bottom: 0.4rem; }

hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 3rem 0;
}

/* ── Layout Utilities ── */
.site-wrapper { position: relative; z-index: 1; }
.container { max-width: var(--max-width); margin: 0 auto; padding: 0 2.5rem; }
.container--narrow { max-width: var(--content-width); margin: 0 auto; padding: 0 2.5rem; }

.section { padding: 6rem 0; }
.section--dark { background: var(--ink); color: var(--parchment-light); }
.section--muted { background: var(--parchment-dark); }

/* ── Rule / Ornament ── */
.ornament-rule {
  display: flex;
  align-items: center;
  gap: 1.2rem;
  margin: 2rem 0;
}
.ornament-rule::before, .ornament-rule::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}
.ornament-rule span {
  width: 6px;
  height: 6px;
  background: var(--gold);
  transform: rotate(45deg);
  flex-shrink: 0;
}

.section-label {
  font-family: var(--font-display);
  font-size: 0.72rem;
  letter-spacing: 0.5em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 2.5rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}
.section-label::after {
  content: '';
  flex: 0 0 36px;
  height: 1px;
  background: var(--gold);
  opacity: 0.5;
}

/* ── SITE HEADER ── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--parchment-bg);
  border-bottom: 1px solid var(--border);
  padding: 1.2rem 0;
  backdrop-filter: blur(8px);
}

.site-header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.site-logo {
  display: flex;
  align-items: center;
  gap: 1rem;
  text-decoration: none;
}

.site-logo img {
  width: 48px;
  height: 48px;
  object-fit: contain;
}

.site-logo__text {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-style: italic;
  color: var(--ink);
  letter-spacing: 0.05em;
}

.site-logo__sub {
  font-family: var(--font-display);
  font-size: 0.65rem;
  letter-spacing: 0.35em;
  text-transform: uppercase;
  color: var(--gold);
  display: block;
  line-height: 1;
  margin-top: 2px;
}

/* ── Navigation ── */
.main-nav ul {
  display: flex;
  list-style: none;
  gap: 2.5rem;
  padding: 0;
  margin: 0;
}

.main-nav a {
  font-family: var(--font-display);
  font-size: 0.78rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-soft);
  transition: color 0.3s;
}
.main-nav a:hover,
.main-nav .current-menu-item a { color: var(--ink); }

.menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  color: var(--ink);
}

/* ── HERO ── */
.hero {
  min-height: 92vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 6rem 2rem;
  border-bottom: 1px solid var(--border);
  position: relative;
}

.hero__eyebrow {
  font-family: var(--font-display);
  font-size: 0.75rem;
  letter-spacing: 0.5em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 3rem;
  animation: fadeSlideDown 1s ease both;
}

.hero__logo-circle {
  position: relative;
  width: 160px;
  height: 160px;
  margin: 0 auto 3rem;
  animation: fadeIn 1.2s ease 0.2s both;
}

.hero__logo-ring {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  animation: spin 60s linear infinite;
}

.hero__logo-img {
  position: absolute;
  inset: 12px;
  width: calc(100% - 24px);
  height: calc(100% - 24px);
  object-fit: contain;
  border-radius: 50%;
}

.hero__title {
  font-family: var(--font-display);
  font-size: clamp(3rem, 6.5vw, 6rem);
  font-style: italic;
  font-weight: 300;
  line-height: 1.05;
  color: var(--ink);
  margin-bottom: 1.5rem;
  animation: fadeIn 1.2s ease 0.4s both;
}

.hero__subtitle {
  font-family: var(--font-body);
  font-size: 1.05rem;
  font-style: italic;
  color: var(--ink-soft);
  max-width: 42ch;
  margin: 0 auto 3rem;
  line-height: 1.85;
  animation: fadeIn 1.2s ease 0.6s both;
}

.btn {
  display: inline-block;
  padding: 0.85rem 2.6rem;
  border: 1px solid currentColor;
  font-family: var(--font-display);
  font-size: 0.78rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--ink);
  text-decoration: none;
  transition: background 0.35s, color 0.35s;
}
.btn:hover { background: var(--ink); color: var(--parchment); }

.btn--light {
  color: var(--parchment-light);
  border-color: var(--parchment-dark);
}
.btn--light:hover { background: var(--parchment); color: var(--ink); }

/* ── BLOG / POSTS ── */
.posts-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  border: 1px solid var(--border);
}

.post-card {
  padding: 3rem 2.5rem;
  border-right: 1px solid var(--border);
  position: relative;
  transition: background 0.4s;
}
.post-card:last-child { border-right: none; }
.post-card:hover { background: rgba(44, 31, 20, 0.04); }

.post-card__category {
  font-family: var(--font-display);
  font-size: 0.65rem;
  letter-spacing: 0.4em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 1rem;
  display: block;
}

.post-card__title {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-style: italic;
  line-height: 1.3;
  margin-bottom: 1rem;
  color: var(--ink);
}

.post-card__title a { color: inherit; }
.post-card__title a:hover { color: var(--gold); }

.post-card__excerpt {
  font-size: 0.88rem;
  color: var(--ink-soft);
  line-height: 1.85;
  margin-bottom: 1.5rem;
}

.post-card__meta {
  font-family: var(--font-display);
  font-size: 0.68rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold);
  opacity: 0.7;
}

.post-card__thumbnail {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  margin-bottom: 2rem;
  filter: sepia(20%) contrast(0.95);
}

/* ── SINGLE POST ── */
.single-post {
  padding: 5rem 0 7rem;
}

.single-post__header {
  text-align: center;
  padding-bottom: 4rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 4rem;
}

.single-post__category {
  font-family: var(--font-display);
  font-size: 0.72rem;
  letter-spacing: 0.5em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 2rem;
  display: block;
}

.single-post__title {
  font-size: clamp(2rem, 4.5vw, 4rem);
  margin-bottom: 1.5rem;
}

.single-post__meta {
  font-family: var(--font-display);
  font-size: 0.75rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.single-post__thumbnail {
  width: 100%;
  max-height: 520px;
  object-fit: cover;
  margin-bottom: 4rem;
  filter: sepia(15%) contrast(0.95);
}

.single-post__content {
  font-size: 1.05rem;
  line-height: 1.9;
  color: var(--ink-mid);
}

.single-post__content p,
.single-post__content ul,
.single-post__content ol { margin-bottom: 1.6rem; }

.single-post__content h2,
.single-post__content h3 { margin: 2.5rem 0 1rem; }

/* ── PAGE ── */
.page-content {
  padding: 5rem 0;
}

.page-header {
  text-align: center;
  padding-bottom: 3rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 4rem;
}

/* ── FOOTER ── */
.site-footer {
  background: var(--ink);
  color: var(--parchment);
  padding: 5rem 0 3rem;
  border-top: 1px solid rgba(200,185,154,0.15);
}

.site-footer .container {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 4rem;
  padding-bottom: 4rem;
  border-bottom: 1px solid rgba(200,185,154,0.1);
  margin-bottom: 3rem;
}

.footer-brand__logo {
  width: 60px;
  margin-bottom: 1.5rem;
  opacity: 0.85;
}

.footer-brand__name {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-style: italic;
  color: var(--parchment-light);
  margin-bottom: 0.3rem;
}

.footer-brand__tagline {
  font-family: var(--font-display);
  font-size: 0.7rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--gold-light);
  margin-bottom: 1.5rem;
}

.footer-brand__desc {
  font-size: 0.85rem;
  color: rgba(200,185,154,0.6);
  line-height: 1.8;
}

.footer-col__title {
  font-family: var(--font-display);
  font-size: 0.7rem;
  letter-spacing: 0.4em;
  text-transform: uppercase;
  color: var(--gold-light);
  margin-bottom: 1.5rem;
}

.footer-col ul {
  list-style: none;
  padding: 0;
}

.footer-col li { margin-bottom: 0.75rem; }

.footer-col a {
  font-family: var(--font-display);
  font-size: 0.88rem;
  color: rgba(200,185,154,0.65);
  text-decoration: none;
  transition: color 0.3s;
}
.footer-col a:hover { color: var(--parchment); }

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.footer-bottom__copy {
  font-family: var(--font-display);
  font-size: 0.72rem;
  letter-spacing: 0.2em;
  color: rgba(200,185,154,0.4);
}

/* ── SIDEBAR ── */
.sidebar-widget {
  margin-bottom: 3rem;
  padding-bottom: 3rem;
  border-bottom: 1px solid var(--border);
}

.sidebar-widget:last-child {
  border-bottom: none;
}

.widget-title {
  font-family: var(--font-display);
  font-size: 0.72rem;
  letter-spacing: 0.4em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 1.5rem;
}

.widget ul {
  list-style: none;
  padding: 0;
}

.widget li {
  padding: 0.6rem 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.9rem;
}

/* ── PAGINATION ── */
.pagination {
  display: flex;
  gap: 0.5rem;
  justify-content: center;
  margin-top: 4rem;
}

.pagination a,
.pagination span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: 1px solid var(--border);
  font-family: var(--font-display);
  font-size: 0.85rem;
  color: var(--ink-soft);
  transition: all 0.3s;
}

.pagination a:hover,
.pagination .current {
  background: var(--ink);
  color: var(--parchment);
  border-color: var(--ink);
}

/* ── COMMENTS ── */
.comments-section {
  margin-top: 5rem;
  padding-top: 4rem;
  border-top: 1px solid var(--border);
}

.comments-title {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-style: italic;
  margin-bottom: 3rem;
}

.comment-form label {
  font-family: var(--font-display);
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold);
  display: block;
  margin-bottom: 0.5rem;
}

.comment-form input,
.comment-form textarea {
  width: 100%;
  background: transparent;
  border: 1px solid var(--border);
  padding: 0.8rem 1rem;
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: var(--ink);
  margin-bottom: 1.5rem;
  transition: border-color 0.3s;
}

.comment-form input:focus,
.comment-form textarea:focus {
  outline: none;
  border-color: var(--gold);
}

.comment-form textarea { min-height: 160px; resize: vertical; }

/* ── SEARCH FORM ── */
.search-form {
  display: flex;
  border: 1px solid var(--border);
}

.search-form input {
  flex: 1;
  background: transparent;
  border: none;
  padding: 0.75rem 1rem;
  font-family: var(--font-body);
  font-size: 0.9rem;
  color: var(--ink);
}

.search-form input:focus { outline: none; }

.search-form button {
  background: var(--ink);
  color: var(--parchment);
  border: none;
  padding: 0.75rem 1.2rem;
  cursor: pointer;
  font-family: var(--font-display);
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  transition: background 0.3s;
}
.search-form button:hover { background: var(--ink-mid); }

/* ── ANIMATIONS ── */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes fadeSlideDown {
  from { opacity: 0; transform: translateY(-12px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.85s ease, transform 0.85s ease;
}
.reveal.visible { opacity: 1; transform: translateY(0); }

/* ── RESPONSIVE ── */
@media (max-width: 1024px) {
  .posts-grid { grid-template-columns: 1fr 1fr; }
  .post-card:nth-child(2) { border-right: none; }
  .post-card:nth-child(n+3) { border-top: 1px solid var(--border); }
  .site-footer .container { grid-template-columns: 1fr 1fr; gap: 3rem; }
}

@media (max-width: 768px) {
  html { font-size: 16px; }
  .container, .container--narrow { padding: 0 1.5rem; }
  .section { padding: 4rem 0; }

  .menu-toggle { display: block; }

  .main-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--parchment-bg);
    border-bottom: 1px solid var(--border);
    padding: 1.5rem;
  }
  .main-nav.is-open { display: block; }
  .main-nav ul { flex-direction: column; gap: 1rem; }

  .posts-grid { grid-template-columns: 1fr; }
  .post-card { border-right: none; border-bottom: 1px solid var(--border); }
  .post-card:last-child { border-bottom: none; }

  .site-footer .container { grid-template-columns: 1fr; gap: 2.5rem; }
  .footer-bottom { flex-direction: column; gap: 1rem; text-align: center; }
}
