/*
Theme Name: Cardigan Crochet
Theme URI: https://cardigancrochet.com/
Author: OpenAI
Description: A warm, lightweight WordPress theme for crochet cardigan patterns, tutorials, and inspiration.
Version: 1.1.0
Requires at least: 6.0
Requires PHP: 7.4
Text Domain: cardigan-crochet
*/

:root{
  --cc-burgundy:#3B0F1F;
  --cc-cream:#FAF9F2;
  --cc-yellow:#F3F9A7;
  --cc-pink:#E0A3B5;
  --cc-rose:#F1D7DC;
  --cc-footer:#F8E9EC;
  --cc-white:#FFFFFF;
  --cc-text:#2C2327;
  --cc-muted:#74666C;
  --cc-border:#E8D9DD;
  --cc-shadow:0 10px 30px rgba(59,15,31,.08);
  --cc-radius:22px;
  --cc-max:1180px;
}

*{box-sizing:border-box}
html{scroll-behavior:smooth}
body{
  margin:0;
  background:var(--cc-cream);
  color:var(--cc-text);
  font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
  line-height:1.7;
}
img{max-width:100%;height:auto;display:block}
a{color:var(--cc-burgundy);text-decoration:none}
a:hover{text-decoration:underline}
.container{width:min(calc(100% - 32px),var(--cc-max));margin-inline:auto}
.site-main{min-height:60vh}
.screen-reader-text{position:absolute;left:-9999px}

h1,h2,h3,h4,h5,h6{
  color:var(--cc-burgundy);
  font-family:Georgia,"Times New Roman",serif;
  line-height:1.18;
  margin-top:0;
}
h1{font-size:clamp(2.3rem,6vw,5.2rem)}
h2{font-size:clamp(1.8rem,4vw,3rem)}
h3{font-size:1.35rem}

.site-header{
  position:sticky;
  top:0;
  z-index:50;
  background:rgba(250,249,242,.94);
  backdrop-filter:blur(10px);
  border-bottom:1px solid var(--cc-border);
}
.header-inner{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:24px;
  min-height:78px;
}
.branding{display:flex;align-items:center;gap:14px;min-width:0}
.custom-logo{max-height:48px;width:auto}
.site-title{
  font-family:Georgia,"Times New Roman",serif;
  font-size:1.6rem;
  font-weight:700;
  white-space:nowrap;
}
.site-title a{text-decoration:none}
.site-description{font-size:.82rem;color:var(--cc-muted);margin:0}

.primary-nav ul{
  list-style:none;
  display:flex;
  gap:24px;
  margin:0;
  padding:0;
  align-items:center;
}
.primary-nav a{font-weight:650}
.menu-toggle{
  display:none;
  border:1px solid var(--cc-border);
  background:var(--cc-white);
  border-radius:12px;
  padding:10px 12px;
  color:var(--cc-burgundy);
  font-weight:700;
}

.hero{
  padding:72px 0 48px;
}
.hero-grid{
  display:grid;
  grid-template-columns:1.05fr .95fr;
  gap:46px;
  align-items:center;
}
.eyebrow{
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding:7px 12px;
  border-radius:999px;
  background:var(--cc-yellow);
  color:var(--cc-burgundy);
  font-weight:800;
  font-size:.85rem;
  margin-bottom:18px;
}
.hero p{
  font-size:1.12rem;
  color:var(--cc-muted);
  max-width:650px;
}
.hero-actions{display:flex;flex-wrap:wrap;gap:12px;margin-top:28px}
.button,.wp-block-button__link{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:13px 20px;
  border-radius:999px;
  background:var(--cc-pink);
  color:var(--cc-burgundy);
  font-weight:800;
  border:1px solid transparent;
  text-decoration:none !important;
  transition:.2s ease;
}
.button:hover,.wp-block-button__link:hover{
  background:var(--cc-burgundy);
  color:#fff;
  transform:translateY(-1px);
}
.button.secondary{
  background:transparent;
  border-color:var(--cc-burgundy);
}
.hero-card{
  background:linear-gradient(145deg,var(--cc-footer),#fff);
  border:1px solid var(--cc-border);
  border-radius:32px;
  padding:26px;
  box-shadow:var(--cc-shadow);
}
.hero-card .placeholder{
  min-height:420px;
  border-radius:22px;
  background:
    radial-gradient(circle at 25% 25%, rgba(243,249,167,.9), transparent 30%),
    radial-gradient(circle at 75% 30%, rgba(224,163,181,.65), transparent 32%),
    linear-gradient(135deg,#f7edf0,#fff9ef);
  display:grid;
  place-items:center;
  text-align:center;
  padding:28px;
  color:var(--cc-burgundy);
}
.hero-card .placeholder span{font-size:5rem;display:block;margin-bottom:8px}

.section{padding:54px 0}
.section.alt{background:#fff;border-block:1px solid var(--cc-border)}
.section-head{
  display:flex;
  justify-content:space-between;
  align-items:end;
  gap:24px;
  margin-bottom:26px;
}
.section-head p{margin:0;color:var(--cc-muted);max-width:620px}

.category-grid{
  display:grid;
  grid-template-columns:repeat(3,1fr);
  gap:18px;
}
.category-card{
  background:var(--cc-white);
  border:1px solid var(--cc-border);
  border-radius:var(--cc-radius);
  padding:24px;
  box-shadow:var(--cc-shadow);
  transition:.2s ease;
}
.category-card:hover{transform:translateY(-3px);text-decoration:none}
.category-icon{
  width:48px;height:48px;border-radius:14px;
  display:grid;place-items:center;
  background:var(--cc-yellow);
  margin-bottom:18px;
  font-size:1.35rem;
}
.category-card p{color:var(--cc-muted);margin-bottom:0}

.posts-grid{
  display:grid;
  grid-template-columns:repeat(3,1fr);
  gap:22px;
}
.post-card{
  background:var(--cc-white);
  border:1px solid var(--cc-border);
  border-radius:var(--cc-radius);
  overflow:hidden;
  box-shadow:var(--cc-shadow);
}
.post-card-thumb{
  aspect-ratio:4/3;
  background:var(--cc-footer);
  overflow:hidden;
}
.post-card-thumb img{width:100%;height:100%;object-fit:cover;transition:.3s ease}
.post-card:hover .post-card-thumb img{transform:scale(1.025)}
.post-card-body{padding:22px}
.post-card h3{margin-bottom:8px}
.post-card h3 a{text-decoration:none}
.meta{font-size:.82rem;color:var(--cc-muted);margin-bottom:8px}
.excerpt{color:var(--cc-muted);font-size:.95rem}

.newsletter{
  background:var(--cc-burgundy);
  color:#fff;
  border-radius:30px;
  padding:44px;
  display:grid;
  grid-template-columns:1fr auto;
  align-items:center;
  gap:28px;
}
.newsletter h2{color:#fff;margin-bottom:8px}
.newsletter p{margin:0;color:#f3dce4}
.newsletter .button{background:var(--cc-yellow)}

.content-wrap{
  display:grid;
  grid-template-columns:minmax(0,1fr) 300px;
  gap:36px;
  padding:50px 0;
}
.article{
  background:#fff;
  border:1px solid var(--cc-border);
  border-radius:var(--cc-radius);
  padding:clamp(22px,4vw,46px);
  box-shadow:var(--cc-shadow);
}
.article .featured{
  border-radius:18px;
  overflow:hidden;
  margin:20px 0 28px;
}
.article-content > *{max-width:780px}
.article-content img{border-radius:16px}
.article-content blockquote{
  border-left:4px solid var(--cc-pink);
  margin-left:0;
  padding:12px 18px;
  background:var(--cc-footer);
  border-radius:0 12px 12px 0;
}
.sidebar .widget{
  background:#fff;
  border:1px solid var(--cc-border);
  border-radius:18px;
  padding:20px;
  margin-bottom:18px;
}
.sidebar ul{padding-left:18px}

.site-footer{
  margin-top:60px;
  background:var(--cc-footer);
  border-top:1px solid var(--cc-border);
}
.footer-inner{
  display:grid;
  grid-template-columns:1.2fr .8fr .8fr;
  gap:28px;
  padding:44px 0 30px;
}
.footer-bottom{
  border-top:1px solid var(--cc-border);
  padding:18px 0;
  color:var(--cc-muted);
  font-size:.9rem;
}
.footer-menu ul{list-style:none;margin:0;padding:0}
.footer-menu li{margin:6px 0}

.archive-header{padding:56px 0 24px}
.pagination{margin-top:28px}

@media (max-width:900px){
  .hero-grid,.content-wrap,.footer-inner{grid-template-columns:1fr}
  .category-grid,.posts-grid{grid-template-columns:repeat(2,1fr)}
  .newsletter{grid-template-columns:1fr}
  .primary-nav{display:none;position:absolute;top:78px;left:0;right:0;background:var(--cc-cream);border-bottom:1px solid var(--cc-border);padding:18px 16px}
  .primary-nav.open{display:block}
  .primary-nav ul{flex-direction:column;align-items:flex-start}
  .menu-toggle{display:block}
}
@media (max-width:640px){
  .hero{padding-top:44px}
  .hero-card .placeholder{min-height:320px}
  .category-grid,.posts-grid{grid-template-columns:1fr}
  .section-head{display:block}
  .newsletter{padding:28px}
  .site-description{display:none}
}


/* AdSense-ready ad areas */
.cc-ad-wrap{
  width:100%;
  margin:28px auto;
  text-align:center;
  overflow:hidden;
}
.cc-ad-wrap--header{
  width:min(calc(100% - 32px),var(--cc-max));
  margin:18px auto 8px;
}
.cc-ad-wrap--article{
  margin:32px auto;
}
.cc-ad-wrap--after{
  margin:36px auto 4px;
}
.cc-ad-wrap--sidebar{
  background:var(--cc-white);
  border:1px solid var(--cc-border);
  border-radius:18px;
  padding:14px;
  margin-bottom:18px;
}
.cc-ad-wrap .adsbygoogle{
  display:block;
  min-width:0;
}
.cc-ad-label{
  display:block;
  margin-bottom:7px;
  color:var(--cc-muted);
  font-size:.68rem;
  letter-spacing:.08em;
  text-transform:uppercase;
}
