/*
Theme Name: Petals and Pleats
Theme URI: https://example.com/petals-and-pleats
Author: Petals and Pleats
Author URI: https://example.com
Description: An editorial magazine theme for Petals and Pleats — a blush, rose and terracotta palette, an oversized serif for headlines, and a split-page layout built for photography-led writing.
Version: 1.0.0
Requires at least: 6.0
Requires PHP: 7.4
Tested up to: 6.6
License: GNU General Public License v2 or later
License URI: LICENSE
Text Domain: petals-and-pleats
Tags: blog, custom-menu, custom-logo, featured-images, translation-ready, editor-style
*/

/* =========================================================
   1. TOKENS
========================================================= */
:root{
  --blush:      #f3e3da;
  --blush-deep: #ecd4c6;
  --rose:       #e0a488;
  --terracotta: #c1603a;
  --terracotta-dark: #a34e2d;
  --teal:       #3d5b4f;
  --teal-deep:  #2c453b;
  --ink:        #221d1a;
  --cream:      #faf4ee;
  --tan:        #c99a6a;
  --line:       rgba(34,29,26,0.14);

  --font-display: 'Fraunces', Georgia, 'Times New Roman', serif;
  --font-body:    'Work Sans', -apple-system, Helvetica, Arial, sans-serif;

  --max-width: 1280px;
  --gutter: clamp(1.25rem, 3vw, 3rem);
}

/* =========================================================
   2. RESET / BASE
========================================================= */
*, *::before, *::after{ box-sizing: border-box; }
html{ scroll-behavior: smooth; }
body{
  margin: 0;
  background: var(--blush);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img{ max-width: 100%; display: block; height: auto; }
a{ color: inherit; text-decoration: none; }
ul{ margin: 0; padding: 0; list-style: none; }
h1,h2,h3,h4{ font-family: var(--font-display); font-weight: 600; line-height: 1.05; margin: 0 0 .5em; letter-spacing: -0.01em; }
p{ margin: 0 0 1.3em; }
figure{ margin: 0; }
button{ font-family: inherit; }
:focus-visible{ outline: 2px solid var(--terracotta); outline-offset: 3px; }
@media (prefers-reduced-motion: reduce){ *{ animation: none !important; transition: none !important; scroll-behavior: auto !important; } }

.container{ max-width: var(--max-width); margin: 0 auto; padding: 0 var(--gutter); }
.screen-reader-text{ position:absolute; clip:rect(1px,1px,1px,1px); overflow:hidden; height:1px; width:1px; }

/* =========================================================
   3. LAYOUT SHELL — the "spread"
========================================================= */
.site{
  position: relative;
  min-height: 100vh;
  padding-right: 56px; /* room for the rotated rail */
}
@media (max-width: 782px){ .site{ padding-right: 0; } }

/* rotated site rail, echoes the vertical "Biennale" tag in the spread */
.site-rail{
  position: fixed;
  top: 0; right: 0; bottom: 0;
  width: 56px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding-bottom: 3rem;
  border-left: 1px solid var(--line);
  background: var(--blush);
  z-index: 40;
}
.site-rail span{
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.5rem;
  letter-spacing: .02em;
}
@media (max-width: 782px){ .site-rail{ display: none; } }

/* =========================================================
   4. HEADER
========================================================= */
.site-header{
  position: sticky;
  top: 0;
  z-index: 30;
  background: var(--blush);
  border-bottom: 1px solid var(--line);
}
.site-header .container{
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 1.5rem;
  padding-bottom: 1.5rem;
  gap: 1.5rem;
max-width: 100%;
}
.site-branding{ display:flex; flex-direction: column; }
.site-title{
  margin: 0;
  font-size: 1.6rem;
  font-family: var(--font-display);
  font-style: italic;
  letter-spacing: .01em;
}
.site-title a{ display: block; }
.site-description{
  font-family: var(--font-body);
  font-size: .72rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--terracotta-dark);
  margin-top: .15rem;
}
.custom-logo{ max-height: 46px; width: auto; }

.primary-navigation ul{ display: flex; gap: 2rem; }
.primary-navigation a{
  font-size: .82rem;
  letter-spacing: .06em;
  text-transform: uppercase;
  position: relative;
  padding-bottom: 3px;
}
.primary-navigation a::after{
  content:"";
  position:absolute; left:0; right:100%; bottom:0;
  height:1px; background: var(--terracotta);
  transition: right .25s ease;
}
.primary-navigation a:hover::after,
.primary-navigation .current-menu-item a::after{ right: 0; }

.menu-toggle{
  display:none;
  background:none; border:1px solid var(--ink); border-radius: 999px;
  padding: .5rem 1rem; font-size: .78rem; letter-spacing: .06em; text-transform: uppercase; cursor: pointer;
}
@media (max-width: 700px){
  .menu-toggle{ display:inline-block; }
  .primary-navigation{ display:none; width: 100%; }
  .primary-navigation.is-open{ display:block; }
  .primary-navigation ul{ flex-direction: column; gap: 1rem; padding: 0 0 1.5rem; }
  .site-header .container{ flex-wrap: wrap; }
}

/* =========================================================
   5. HERO / FRONT PAGE SPREAD
========================================================= */
.hero-spread{
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  min-height: 82vh;
  border-bottom: 1px solid var(--line);
}
@media (max-width: 900px){ .hero-spread{ grid-template-columns: 1fr; min-height: auto; } }

.hero-spread .hero-left{
  background: var(--blush);
  padding: clamp(2rem,5vw,4.5rem) clamp(1.5rem,5vw,4rem);
  display:flex; flex-direction: column; justify-content: space-between;
  position: relative;
}
.hero-eyebrow{
  font-size: .78rem; letter-spacing: .1em; text-transform: uppercase; color: var(--terracotta-dark);
  margin-bottom: 1.25rem; display:block;
}
.hero-title{
  font-size: clamp(2.4rem, 5.2vw, 4.4rem);
  max-width: 12ch;
}
.hero-title a:hover{ color: var(--terracotta); }
.hero-media{
  margin-top: 2.5rem;
  max-width: 100%;
  overflow: hidden;
}
.hero-media img{ aspect-ratio: 4/5; object-fit: cover; }

.hero-index{
  align-self: flex-end;
  font-family: var(--font-display);
  font-size: clamp(5rem, 12vw, 9.5rem);
  line-height: .8;
  color: var(--ink);
  margin-top: 2rem;
}

.hero-right{
  background: var(--rose);
  padding: clamp(2rem,5vw,4.5rem) clamp(1.5rem,5vw,4rem);
  position: relative;
  display:flex; flex-direction: column;
}
.hero-right .hero-subtitle{
  font-size: clamp(1.6rem,3vw,2.4rem);
  color: var(--ink);
  max-width: 100%;;
  margin-bottom: 2rem;
}
.hero-side-list{ display:flex; flex-direction:column; gap: 1.5rem; margin-top: auto; }
.hero-side-list li{ display:flex; gap: 1rem; align-items:flex-start; }
.hero-side-thumb{ width: 64px; height: 64px; flex: none; overflow:hidden; border-radius: 3px; }
.hero-side-thumb img{ width:100%; height:100%; object-fit:cover; }
.hero-side-list h4{ font-size: 1rem; margin-bottom: .2rem; }
.hero-side-list p{ margin:0; font-size: .82rem; color: rgba(34,29,26,.7); }

.hero-feature-image{
  position:absolute; right: clamp(1.5rem,5vw,4rem); top: 50%; transform: translateY(-50%);
  width: min(46%, 380px);
  border-radius: 4px; overflow:hidden;
  box-shadow: 0 30px 60px -20px rgba(44,26,15,.35);
}
.hero-feature-image img{ aspect-ratio: 3/4; object-fit: cover; }
@media (max-width: 1150px){ .hero-feature-image{ position:static; transform:none; width:100%; margin-top:1.5rem; } }

/* =========================================================
   6. ARTICLE GRID (index.php / archive.php)
========================================================= */
.article-grid{
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--line);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
@media (max-width: 900px){ .article-grid{ grid-template-columns: repeat(2,1fr); } }
@media (max-width: 600px){ .article-grid{ grid-template-columns: 1fr; } }

.article-card{
  background: var(--cream);
  padding: 2rem clamp(1.25rem,3vw,2rem) 2.25rem;
  display:flex; flex-direction: column;
  transition: background-color .25s ease;
}
.article-card:hover{ background: var(--blush-deep); }
.article-card .card-thumb{ overflow:hidden; margin-bottom: 1.25rem; border-radius: 2px; }
.article-card .card-thumb img{ aspect-ratio: 5/4; object-fit: cover; transition: transform .5s ease; }
.article-card:hover .card-thumb img{ transform: scale(1.04); }
.card-eyebrow{
  font-size: .72rem; letter-spacing: .1em; text-transform: uppercase; color: var(--terracotta-dark);
  margin-bottom: .6rem;
}
.card-title{ font-size: 1.4rem; margin-bottom: .6rem; }
.card-excerpt{ font-size: .92rem; color: rgba(34,29,26,.72); margin-bottom: 1rem; }
.card-meta{ margin-top:auto; font-size: .78rem; color: rgba(34,29,26,.55); display:flex; gap:.6rem; align-items:center; }
.card-meta .dot{ width:3px; height:3px; border-radius:50%; background: currentColor; }

.section-heading{
  display:flex; align-items:baseline; justify-content:space-between;
  padding: 3rem var(--gutter) 1.5rem;
  border-bottom: 1px solid var(--line);
}
.section-heading h2{ font-size: 1.9rem; font-style: italic; }
.section-heading .see-all{ font-size:.8rem; letter-spacing:.06em; text-transform:uppercase; border-bottom:1px solid var(--ink); padding-bottom:2px; }

/* =========================================================
   7. SINGLE POST — split hero + article body
========================================================= */
.post-hero{
  display:grid; grid-template-columns: 1fr 1fr;
  border-bottom: 1px solid var(--line);
}
@media (max-width: 900px){ .post-hero{ grid-template-columns: 1fr; } }
.post-hero-text{
  background: var(--blush);
  padding: clamp(2.5rem,6vw,5rem) clamp(1.5rem,5vw,4rem);
  display:flex; flex-direction:column; justify-content:center;
}
.post-hero-media{ background: var(--rose); overflow:hidden; min-height: 320px; }
.post-hero-media img{ width:100%; height:100%; object-fit:cover; min-height: 320px; }
.post-category{
  font-size: .78rem; letter-spacing:.1em; text-transform:uppercase; color: var(--terracotta-dark);
  margin-bottom: 1.25rem;
}
.post-title{ font-size: clamp(2.1rem,4.4vw,3.6rem); max-width: 16ch; }
.post-meta{ margin-top: 1.75rem; font-size:.85rem; color: rgba(34,29,26,.65); display:flex; gap:.9rem; flex-wrap:wrap; align-items:center; }
.post-meta .dot{ width:3px; height:3px; border-radius:50%; background:currentColor; }

.post-content{
  max-width: 68ch;
  margin: 0 auto;
  padding: clamp(3rem,6vw,5rem) var(--gutter) 3rem;
  font-size: 1.08rem;
}
.post-content h2{ font-size: 1.7rem; margin-top: 2.2em; }
.post-content h3{ font-size: 1.3rem; margin-top: 1.8em; }
.post-content p{ margin-bottom: 1.4em; }
.post-content blockquote{
  font-family: var(--font-display); font-style: italic; font-size: 1.5rem;
  border-left: 3px solid var(--terracotta); margin: 2em 0; padding: .2em 0 .2em 1.5em; color: var(--teal-deep);
}
.post-content img{ border-radius: 3px; margin: 1.5em 0; }
.post-content a{ color: var(--terracotta); border-bottom: 1px solid currentColor; }
.post-content figcaption{ font-size: .82rem; color: rgba(34,29,26,.6); margin-top: .5em; }

.post-tags{ max-width: 68ch; margin: 0 auto; padding: 0 var(--gutter) 3rem; display:flex; gap:.6rem; flex-wrap:wrap; }
.post-tags a{
  font-size: .76rem; letter-spacing:.04em; text-transform:uppercase;
  border: 1px solid var(--line); border-radius: 999px; padding: .4rem .9rem;
}
.post-tags a:hover{ border-color: var(--terracotta); color: var(--terracotta); }

.post-nav{
  max-width: 68ch; margin: 0 auto; padding: 2rem var(--gutter) 4rem;
  display:flex; justify-content:space-between; gap: 2rem; border-top: 1px solid var(--line); padding-top: 2rem;
}
.post-nav > div{ max-width: 45%; }
.post-nav .nav-label{ font-size:.72rem; letter-spacing:.1em; text-transform:uppercase; color: var(--terracotta-dark); display:block; margin-bottom:.4rem; }
.post-nav .nav-next{ text-align: right; margin-left: auto; }
.post-nav a:hover{ color: var(--terracotta); }

/* Author box */
.author-box{
  max-width: 68ch; margin: 0 auto 3rem; padding: 0 var(--gutter);
  display:flex; gap:1.25rem; align-items:flex-start;
}
.author-box img{ border-radius: 50%; width: 64px; height:64px; object-fit:cover; }
.author-box h4{ font-size: 1.05rem; margin-bottom: .3rem; }
.author-box p{ font-size: .88rem; color: rgba(34,29,26,.68); margin: 0; }

/* =========================================================
   8. COMMENTS
========================================================= */
.comments-area{ max-width: 68ch; margin: 0 auto; padding: 2rem var(--gutter) 4rem; }
.comments-title, .comment-reply-title{ font-size: 1.5rem; font-style: italic; }
.comment-list{ margin-top: 1.5rem; }
.comment-list li{ padding: 1.5rem 0; border-top: 1px solid var(--line); }
.comment-author{ font-weight:600; font-size:.95rem; }
.comment-meta{ font-size: .78rem; color: rgba(34,29,26,.55); margin-bottom:.5rem; }
.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea{
  width:100%; padding: .7rem .9rem; border: 1px solid var(--line); border-radius: 3px;
  background: var(--cream); font-family: var(--font-body); font-size: .95rem; margin-bottom: 1rem;
}
.comment-form textarea{ min-height: 120px; }
.comment-form .form-submit input{
  background: var(--terracotta); color: var(--cream); border: none; padding: .8rem 1.8rem;
  border-radius: 999px; font-size: .82rem; letter-spacing: .06em; text-transform: uppercase; cursor:pointer;
}
.comment-form .form-submit input:hover{ background: var(--terracotta-dark); }

/* =========================================================
   9. SIDEBAR / WIDGETS
========================================================= */
.widget{ margin-bottom: 2.5rem; }
.widget-title{ font-size: 1.1rem; font-style: italic; margin-bottom: 1rem; font-family: var(--font-display); }
.widget ul li{ padding: .5rem 0; border-top: 1px solid var(--line); font-size: .92rem; }
.widget ul li:first-child{ border-top: none; }
.footer-widgets{
  background: var(--teal); color: var(--cream);
  padding: 3.5rem var(--gutter);
}
.footer-widgets .widget-title{ color: var(--cream); }
.footer-widgets ul li{ border-color: rgba(250,244,238,.18); }
.footer-widgets a:hover{ color: var(--rose); }
.footer-widgets-grid{ display:grid; grid-template-columns: repeat(3,1fr); gap: 2.5rem; max-width: var(--max-width); margin: 0 auto; }
@media (max-width: 700px){ .footer-widgets-grid{ grid-template-columns: 1fr; } }

/* =========================================================
   10. FOOTER
========================================================= */
.site-footer{ background: var(--teal-deep); color: rgba(250,244,238,.85); }
.site-footer .container{
  padding: 2rem var(--gutter);
  display:flex; justify-content: space-between; align-items:center; gap: 1rem; flex-wrap: wrap;
}
.site-footer .footer-title{ font-family: var(--font-display); font-style: italic; font-size: 1.1rem; color: var(--cream); }
.site-footer small{ font-size: .78rem; }
.footer-socials{ display:flex; gap: 1.25rem; }
.footer-socials a{ font-size: .78rem; letter-spacing: .06em; text-transform: uppercase; }
.footer-socials a:hover{ color: var(--rose); }

/* =========================================================
   11. PAGINATION / MISC
========================================================= */
.pagination{ display:flex; justify-content:center; gap: .75rem; padding: 3rem var(--gutter); }
.pagination a, .pagination span{
  min-width: 40px; height: 40px; display:flex; align-items:center; justify-content:center;
  border: 1px solid var(--line); border-radius: 50%; font-size: .85rem;
}
.pagination .current{ background: var(--terracotta); color: var(--cream); border-color: var(--terracotta); }
.pagination a:hover{ border-color: var(--terracotta); color: var(--terracotta); }

.back-pill{
  position: fixed; left: 1.5rem; bottom: 1.5rem; z-index: 30;
  background: var(--rose); color: var(--ink);
  padding: .7rem 1.4rem; border-radius: 999px; font-size: .78rem; letter-spacing:.06em; text-transform: uppercase;
  box-shadow: 0 10px 24px -8px rgba(44,26,15,.35);
}
.back-pill:hover{ background: var(--terracotta); color: var(--cream); }

.page-content{ max-width: 68ch; margin: 0 auto; padding: 4rem var(--gutter); }
.page-title{ font-size: clamp(2.2rem,4vw,3.2rem); margin-bottom: 1.5rem; }

.no-results{ padding: 6rem var(--gutter); text-align:center; }
.no-results h1{ font-size: 2.2rem; margin-bottom: 1rem; }

.archive-header{ padding: 3.5rem var(--gutter) 2rem; border-bottom: 1px solid var(--line); }
.archive-header .hero-eyebrow{ margin-bottom: .5rem; }
.archive-header h1{ font-size: clamp(2rem,4vw,3rem); font-style: italic; }

.search-form{ display:flex; gap: .5rem; }
.search-form input[type="search"]{
  flex:1; padding: .7rem 1rem; border:1px solid var(--line); border-radius: 999px;
  background: var(--cream); font-family: var(--font-body);
}
.search-form button{
  border: none; background: var(--terracotta); color: var(--cream); border-radius: 999px;
  padding: .7rem 1.4rem; font-size: .82rem; text-transform: uppercase; letter-spacing: .06em; cursor:pointer;
}
