/*
Theme Name: Your Write Guide
Theme URI: https://yourwriteguide.com/
Author: Your Write Guide
Description: A simple, clean blog theme for Your Write Guide: practical AI writing tips for content writers and copywriters.
Version: 1.0.1
Requires at least: 6.0
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: yourwriteguide
*/

:root{
  --cream:#ffffff;
  --ink:#111;
  --soft:#555;
  --orange:#fa5a3c;
  --orange-dark:#e2462a;
  --lav:#ece8fb;
  --yellow:#fdf3d4;
  --pink:#fbe4dc;
  --line:#11111120;
  --display:"Inter Tight", Arial, sans-serif;
  --sans:"Inter", Arial, sans-serif;
}
*{box-sizing:border-box}
body{margin:0;background:var(--cream);color:var(--ink);font:400 17px/1.6 var(--sans);-webkit-font-smoothing:antialiased}
a{color:inherit;text-decoration:none}
img{max-width:100%;height:auto}
.wrap{max-width:1080px;margin:0 auto;padding:0 clamp(16px,3vw,32px)}
h1,h2,h3,h4{font-family:var(--display);letter-spacing:-.04em;margin:0}
.screen-reader-text{position:absolute!important;width:1px;height:1px;overflow:hidden;clip:rect(1px,1px,1px,1px);white-space:nowrap}
.skip-link:focus{position:fixed;top:8px;left:8px;width:auto;height:auto;clip:auto;background:#fff;padding:10px 14px;z-index:100;border-radius:6px}

/* Buttons */
.btn,.wp-block-button__link,input[type=submit],button[type=submit]{display:inline-block;background:var(--orange);color:#fff;font:600 15px/1 var(--sans);padding:16px 24px;border-radius:10px;border:0;cursor:pointer;transition:background .2s}
.btn:hover,.wp-block-button__link:hover,input[type=submit]:hover,button[type=submit]:hover{background:var(--orange-dark);color:#fff}

/* Header */
.nav{display:flex;justify-content:space-between;align-items:center;min-height:76px;border-bottom:1.5px solid var(--ink);gap:20px}
.logo{display:flex;align-items:center;gap:10px;font:800 22px/1 var(--display);letter-spacing:-.04em}
.logo svg{display:block;flex:none}
.logo .custom-logo{max-height:44px;width:auto}
.right{display:flex;align-items:center;gap:28px}
.menu{display:flex;gap:28px;font-size:15px;font-weight:500;list-style:none;margin:0;padding:0}
.menu a:hover,.menu .current-menu-item>a{color:var(--orange)}
.menu ul{display:none}
.search{display:flex;align-items:center;gap:8px;background:#fff;border:1px solid var(--line);border-radius:999px;padding:8px 14px;width:200px;margin:0;transition:border-color .2s}
.search:focus-within{border-color:var(--ink)}
.search svg{width:16px;height:16px;flex:none;fill:none;stroke:var(--soft);stroke-width:2;stroke-linecap:round}
.search input{border:0;outline:none;background:transparent;font:400 14px var(--sans);width:100%;color:var(--ink);padding:0}
.search input::-webkit-search-cancel-button{display:none}

/* Hero */
.hero{padding:clamp(56px,9vw,104px) 0 clamp(48px,7vw,80px);max-width:760px}
.hero h1{font-size:clamp(44px,7vw,80px);font-weight:800;line-height:.95;letter-spacing:-.055em}
.hero h1 span{color:var(--orange)}
.hero p{font-size:clamp(18px,2vw,20px);color:#2b2b2b;margin:24px 0 32px;max-width:32em}

/* Sections */
.section{padding-bottom:clamp(56px,7vw,80px)}
.head{display:flex;justify-content:space-between;align-items:end;gap:16px;margin-bottom:20px}
.head h2{font-size:clamp(30px,3.6vw,40px);font-weight:800}
.head a{color:var(--orange);font-weight:600;font-size:15px}

/* Topics */
.cats{display:grid;grid-template-columns:repeat(4,1fr);gap:12px}
.cat{padding:24px 22px;border-radius:8px;transition:transform .2s}
.cat:hover{transform:translateY(-3px)}
.cat h3{font-size:20px;font-weight:700;letter-spacing:-.025em;margin-bottom:6px}
.cat p{margin:0;color:var(--soft);font-size:15px;line-height:1.4}
.bg-0{background:var(--lav)}.bg-1{background:var(--yellow)}.bg-2{background:var(--pink)}.bg-3{background:var(--lav)}

/* Post cards */
.posts{display:grid;grid-template-columns:repeat(3,1fr);gap:20px}
.post-card{background:#fff;border:1px solid var(--line);border-radius:8px;overflow:hidden;display:flex;flex-direction:column}
.post-card:hover h3{color:var(--orange)}
.post-card .img{aspect-ratio:16/10;display:block;overflow:hidden}
.post-card .img img{width:100%;height:100%;object-fit:cover;display:block}
.post-card .img.placeholder{display:grid;place-items:center;font:800 22px/1 var(--display);letter-spacing:-.03em;color:#0003}
.post-body{padding:20px 22px 22px;display:flex;flex-direction:column;flex:1}
.tag{font:600 11px/1 var(--sans);letter-spacing:.14em;text-transform:uppercase;color:var(--orange)}
.post-card h3{font-size:21px;font-weight:700;letter-spacing:-.03em;line-height:1.2;margin:10px 0 16px;transition:color .2s}
.date{margin-top:auto;font-size:13px;color:#888}
.empty{background:#fff;border:1px dashed var(--line);border-radius:8px;padding:32px;color:var(--soft)}

/* Archive header + pagination */
.archive-head{padding:clamp(48px,7vw,80px) 0 32px}
.archive-head h1{font-size:clamp(36px,5vw,56px);font-weight:800;line-height:1;letter-spacing:-.05em}
.archive-head h1 span{color:var(--orange)}
.archive-head p{color:var(--soft);margin:12px 0 0;max-width:36em}
.pagination{margin-top:40px}
.pagination .nav-links{display:flex;gap:8px;flex-wrap:wrap}
.pagination .page-numbers{padding:10px 16px;border:1px solid var(--line);border-radius:8px;background:#fff;font-weight:600;font-size:15px}
.pagination .page-numbers.current,.pagination a.page-numbers:hover{background:var(--ink);color:#fff;border-color:var(--ink)}

/* Single post / page */
.entry{padding:clamp(48px,7vw,80px) 0 clamp(48px,6vw,72px);max-width:740px;margin:0 auto}
.entry-header .tag{display:inline-block;margin-bottom:16px}
.entry-title{font-size:clamp(36px,5vw,56px);font-weight:800;line-height:1.02;letter-spacing:-.05em}
.entry-title span{color:var(--orange)}
.entry-meta{margin-top:16px;font-size:14px;color:#888}
.entry-thumb{margin:32px 0 0;border-radius:8px;overflow:hidden}
.entry-thumb img{display:block;width:100%}
.entry-content{margin-top:32px;font-size:18px;line-height:1.75;color:#222}
.entry-content>*{margin:0 0 1.2em}
.entry-content h2{font-size:30px;font-weight:800;line-height:1.15;margin:1.6em 0 .5em}
.entry-content h3{font-size:23px;font-weight:700;line-height:1.25;margin:1.4em 0 .4em}
.entry-content a{color:var(--orange);text-decoration:underline;text-underline-offset:3px}
.entry-content blockquote{margin:1.6em 0;padding:4px 0 4px 22px;border-left:3px solid var(--orange);font-size:20px;color:#333}
.entry-content pre,.entry-content code{background:#fff;border:1px solid var(--line);border-radius:6px;font-size:15px}
.entry-content code{padding:2px 6px}
.entry-content pre{padding:18px;overflow:auto}
.entry-content pre code{border:0;padding:0}
.entry-content ul,.entry-content ol{padding-left:1.3em}
.entry-content li{margin-bottom:.4em}
.entry-content img{border-radius:8px}
.entry-content figcaption{font-size:14px;color:#888;text-align:center;margin-top:8px}
.entry-content .alignwide{margin-left:-80px;margin-right:-80px;max-width:none}
.entry-content .alignfull{width:100vw;margin-left:calc(50% - 50vw);max-width:none}
.entry-tags{margin-top:36px;display:flex;flex-wrap:wrap;gap:8px}
.entry-tags a{background:#fff;border:1px solid var(--line);border-radius:999px;padding:6px 12px;font-size:14px}
.entry-tags a:hover{border-color:var(--ink)}
.post-nav{display:grid;grid-template-columns:1fr 1fr;gap:16px;margin-top:48px;border-top:1px solid var(--line);padding-top:24px}
.post-nav a{font-weight:600}
.post-nav a:hover{color:var(--orange)}
.post-nav small{display:block;color:#888;font-weight:400;font-size:13px}
.post-nav .next{text-align:right}

/* Forms (contact page, comments, plugins) */
.entry-content input[type=text],.entry-content input[type=email],.entry-content input[type=url],.entry-content input[type=tel],.entry-content textarea,.entry-content select,
.comment-form input[type=text],.comment-form input[type=email],.comment-form input[type=url],.comment-form textarea{width:100%;border:1px solid var(--line);border-radius:10px;padding:14px 16px;font:400 16px var(--sans);background:#fff;outline:none}
.entry-content input:focus,.entry-content textarea:focus,.comment-form input:focus,.comment-form textarea:focus{border-color:var(--ink)}
.entry-content label,.comment-form label{font-size:14px;font-weight:600}

/* Comments */
.comments{max-width:740px;margin:0 auto clamp(48px,6vw,72px)}
.comments h2{font-size:26px;font-weight:800;margin-bottom:20px}
.comment-list{list-style:none;padding:0;margin:0 0 32px}
.comment-list .comment{background:#fff;border:1px solid var(--line);border-radius:8px;padding:18px 20px;margin-bottom:12px}
.comment-list .children{list-style:none;padding-left:24px;margin-top:12px}
.comment-meta{font-size:14px;color:#888}
.comment-author{font-weight:600;color:var(--ink)}
.comment-author img{border-radius:50%;vertical-align:middle;margin-right:8px}

/* Newsletter bar */
.newsletter{background:var(--ink);color:#fff;border-radius:12px;padding:32px clamp(24px,4vw,40px);display:flex;justify-content:space-between;align-items:center;gap:24px;flex-wrap:wrap}
.newsletter h2{font-size:clamp(24px,2.6vw,30px);font-weight:800}
.newsletter p{margin:6px 0 0;color:#bdbdbd;font-size:15px}
.nl-form{flex:1;max-width:440px;min-width:260px}
.nl-form form{display:flex;gap:8px;margin:0}
.nl-form p{margin:0!important;color:inherit}
.nl-form input[type=email],.nl-form input[type=text]{flex:1;width:100%;min-width:0;border:0;border-radius:10px;padding:14px 16px;font:400 15px var(--sans);outline:none;background:#fff;color:var(--ink)}
.nl-form button,.nl-form input[type=submit]{white-space:nowrap}
.nl-form .wp-block-jetpack-subscriptions__container,.nl-form #subscribe-email{flex:1}
.nl-form .jetpack_subscription_widget{margin:0}
.nl-form label{position:absolute;left:-9999px}

/* Footer */
.site-footer .wrap{display:flex;justify-content:space-between;align-items:center;gap:16px;flex-wrap:wrap;border-top:1.5px solid var(--ink);padding-top:24px;padding-bottom:32px;font-size:14px;color:var(--soft)}
.site-footer ul{display:flex;gap:24px;list-style:none;margin:0;padding:0}
.site-footer a:hover{color:var(--orange)}

/* 404 */
.notfound{padding:clamp(64px,10vw,120px) 0;max-width:620px}
.notfound h1{font-size:clamp(44px,7vw,80px);font-weight:800;line-height:.95;letter-spacing:-.055em}
.notfound h1 span{color:var(--orange)}
.notfound p{color:var(--soft);margin:20px 0 28px}
.notfound .search{width:100%;max-width:420px;padding:12px 16px}

@media (max-width:860px){
  .cats{grid-template-columns:1fr 1fr}
  .posts{grid-template-columns:1fr 1fr}
  .nav{padding:16px 0;flex-wrap:wrap;gap:14px}
  .right{width:100%;justify-content:space-between;gap:16px}
  .entry-content .alignwide{margin-left:0;margin-right:0}
}
@media (max-width:560px){
  .right{flex-direction:column;align-items:stretch}
  .menu{justify-content:space-between;gap:12px}
  .search{width:100%}
  .cats,.posts{grid-template-columns:1fr}
  .nl-form form{flex-direction:column}
  .post-nav{grid-template-columns:1fr}
  .post-nav .next{text-align:left}
}
