/*
Theme Name: AI English Teacher
Theme URI: https://facebook.com/AIEnglishTeacher
Author: AI English Teacher
Description: A custom WordPress theme built for the AI English Teacher Facebook page — showcase and sell free and premium English-learning eBooks, with PayPal/card checkout and a Facebook follow flow built in.
Version: 1.0.0
Requires at least: 5.9
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: aet
*/

:root{
  --paper:#F6F3EA;
  --paper-raised:#FFFDF8;
  --ink:#212A34;
  --ink-soft:#5B6472;
  --rule:#D9D2C1;
  --pen:#C6412E;
  --pen-ink:#FFFFFF;
  --gold:#E8AC1F;
  --gold-ink:#2A2110;
  --focus:#2E6E62;
  --shadow: 0 1px 0 rgba(33,42,52,0.06);
}
@media (prefers-color-scheme: dark){
  :root:not([data-theme="light"]){
    --paper:#171A16;
    --paper-raised:#20241F;
    --ink:#EDE7D9;
    --ink-soft:#A9A296;
    --rule:#3A3D34;
    --pen:#FF7A62;
    --pen-ink:#20120E;
    --gold:#F0C34D;
    --gold-ink:#2A2110;
    --focus:#6FCBB8;
    --shadow: 0 1px 0 rgba(0,0,0,0.4);
  }
}

*{box-sizing:border-box;}
html{scroll-behavior:smooth;}
body{
  margin:0;
  background:var(--paper);
  color:var(--ink);
  font-family:"Public Sans", -apple-system, "Segoe UI", sans-serif;
  padding-inline:20px;
  -webkit-font-smoothing:antialiased;
}
img{max-width:100%;}
a{color:inherit;}
h1,h2,h3{
  font-family:"Fraunces", Georgia, "Times New Roman", serif;
  text-wrap:balance;
  margin:0;
  line-height:1.08;
}
.label{
  font-family:"IBM Plex Mono", ui-monospace, monospace;
  text-transform:uppercase;
  letter-spacing:0.08em;
  font-size:0.72rem;
  font-weight:600;
}
.wrap{max-width:1120px;margin-inline:auto;}
.rule{
  border:none;
  border-top:1.5px dashed var(--rule);
  margin:0;
}
:focus-visible{outline:2.5px solid var(--focus);outline-offset:3px;}

/* ---------- header ---------- */
header{
  position:sticky; top:0; z-index:20;
  background:var(--paper);
  border-bottom:1.5px solid var(--rule);
  padding-block:14px;
}
header .wrap{display:flex;align-items:center;justify-content:space-between;gap:16px;}
.brand{display:flex;align-items:center;gap:10px;text-decoration:none;color:var(--ink);}
.brand-mark{
  width:38px;height:38px;border-radius:50%;
  background:var(--ink);color:var(--paper);
  display:flex;align-items:center;justify-content:center;
  font-family:"Fraunces",serif;font-weight:700;font-size:1.1rem;
  flex-shrink:0;
}
.brand-name{font-family:"Fraunces",serif;font-weight:600;font-size:1.15rem;}
nav{display:flex;align-items:center;gap:22px;}
nav a{
  text-decoration:none;color:var(--ink-soft);font-weight:600;font-size:0.92rem;
  padding-block:4px;border-bottom:2px solid transparent;
}
nav a:hover{color:var(--ink);border-color:var(--rule);}
.fb-btn{
  display:inline-flex;align-items:center;gap:8px;
  background:var(--ink);color:var(--paper);
  border-radius:999px;padding:9px 16px;
  text-decoration:none;font-weight:600;font-size:0.85rem;
  flex-shrink:0;
}
.fb-btn svg{width:15px;height:15px;flex-shrink:0;}
.nav-links{display:flex;gap:22px;}
@media (max-width:720px){
  .nav-links{display:none;}
}

/* ---------- hero ---------- */
.hero{padding-block:64px 56px;}
.hero .wrap{
  display:grid;grid-template-columns:1.15fr 1fr;gap:48px;align-items:center;
}
@media (max-width:860px){
  .hero .wrap{grid-template-columns:1fr;}
}
.stamp-badge{
  display:inline-flex;align-items:center;gap:8px;
  border:1.5px dashed var(--rule);
  border-radius:999px;padding:6px 14px 6px 10px;
  margin-bottom:22px;
  background:var(--paper-raised);
}
.stamp-dot{width:8px;height:8px;border-radius:50%;background:var(--focus);}
.hero h1{font-size:clamp(2.1rem,4.4vw,3.4rem);letter-spacing:-0.01em;}
.hero p.lede{
  font-size:1.08rem;color:var(--ink-soft);max-width:46ch;
  margin-top:18px;line-height:1.6;
}
.cta-row{display:flex;gap:14px;flex-wrap:wrap;margin-top:30px;}
.btn{
  display:inline-flex;align-items:center;gap:8px;
  font-weight:700;font-size:0.95rem;
  padding:13px 22px;border-radius:8px;
  text-decoration:none;cursor:pointer;border:1.5px solid transparent;
  font-family:inherit;
}
.btn-primary{background:var(--ink);color:var(--paper);}
.btn-primary:hover{opacity:0.9;}
.btn-outline{background:transparent;color:var(--ink);border-color:var(--ink);}
.btn-outline:hover{background:var(--paper-raised);}
.btn-pen{background:var(--pen);color:var(--pen-ink);}
.btn-pen:hover{opacity:0.92;}

/* fanned book stack in hero */
.stack{position:relative;height:300px;}
.cover{
  position:absolute;width:190px;height:264px;border-radius:6px;
  box-shadow:0 14px 30px -12px rgba(20,20,15,0.35);
  padding:18px;display:flex;flex-direction:column;justify-content:space-between;
  color:#fff;
}
.cover .spine{position:absolute;left:0;top:0;bottom:0;width:7px;background:rgba(0,0,0,0.22);border-radius:6px 0 0 6px;}
.cover .ai-chip{
  align-self:flex-end;
  width:26px;height:26px;border-radius:50%;
  background:rgba(255,255,255,0.22);
  display:flex;align-items:center;justify-content:center;
  font-family:"IBM Plex Mono",monospace;font-size:0.62rem;font-weight:700;
  backdrop-filter:blur(2px);
}
.cover .cover-title{font-family:"Fraunces",serif;font-weight:600;font-size:1.18rem;line-height:1.2;}
.cover .cover-sub{font-family:"IBM Plex Mono",monospace;font-size:0.62rem;text-transform:uppercase;letter-spacing:0.08em;opacity:0.85;margin-top:8px;}
.c1{background:linear-gradient(155deg,#2E6E62,#1B4A40);left:0;top:14px;transform:rotate(-9deg);z-index:1;}
.c2{background:linear-gradient(155deg,#3D4A6B,#212A44);left:90px;top:0;transform:rotate(-1deg);z-index:2;}
.c3{background:linear-gradient(155deg,#C6412E,#8E2A1B);left:180px;top:20px;transform:rotate(8deg);z-index:1;}
@media (max-width:860px){ .stack{height:250px;} }
@media (max-width:460px){
  .stack{transform:scale(0.85);transform-origin:left center;}
}

/* ---------- sections ---------- */
section{padding-block:56px;}
.section-head{display:flex;align-items:baseline;justify-content:space-between;gap:16px;flex-wrap:wrap;margin-bottom:30px;}
.section-head h2{font-size:clamp(1.5rem,2.6vw,2.1rem);}
.section-note{color:var(--ink-soft);max-width:52ch;margin-top:8px;font-size:0.98rem;line-height:1.55;}

.grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(255px,1fr));gap:22px;}

.book-card{
  background:var(--paper-raised);
  border:1.5px solid var(--rule);
  border-radius:12px;overflow:hidden;
  display:flex;flex-direction:column;
  box-shadow:var(--shadow);
}
.book-cover{
  height:150px;position:relative;color:#fff;
  padding:16px;display:flex;flex-direction:column;justify-content:space-between;
}
.book-cover .spine{position:absolute;left:0;top:0;bottom:0;width:6px;background:rgba(0,0,0,0.22);}
.book-cover .ai-chip{
  align-self:flex-end;width:24px;height:24px;border-radius:50%;
  background:rgba(255,255,255,0.22);display:flex;align-items:center;justify-content:center;
  font-family:"IBM Plex Mono",monospace;font-size:0.58rem;font-weight:700;
}
.book-cover .cover-title{font-family:"Fraunces",serif;font-weight:600;font-size:1.02rem;line-height:1.22;}
.book-body{padding:18px;display:flex;flex-direction:column;gap:12px;flex:1;}
.book-body .tagline{font-weight:700;font-size:0.98rem;}
.book-body .desc{color:var(--ink-soft);font-size:0.9rem;line-height:1.5;flex:1;}
.book-foot{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-top:4px;}
.stamp{
  font-family:"IBM Plex Mono",monospace;font-weight:700;font-size:0.78rem;
  padding:6px 12px;border-radius:999px;border:1.5px dashed rgba(0,0,0,0.25);
  transform:rotate(-4deg);white-space:nowrap;
}
.stamp-free{background:var(--gold);color:var(--gold-ink);}
.stamp-price{background:var(--pen);color:var(--pen-ink);border-color:rgba(255,255,255,0.35);}
.book-btn{
  font-family:"IBM Plex Mono",monospace;font-weight:600;font-size:0.78rem;
  text-transform:uppercase;letter-spacing:0.04em;
  padding:9px 14px;border-radius:7px;text-decoration:none;text-align:center;
}
.book-btn-free{background:var(--ink);color:var(--paper);}
.book-btn-free:hover{opacity:0.88;}
.book-btn-buy{background:transparent;color:var(--ink);border:1.5px solid var(--ink);}
.book-btn-buy:hover{background:var(--paper);}

/* ---------- why ---------- */
.why-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:28px;}
.why-item .why-icon{
  width:44px;height:44px;border-radius:10px;background:var(--paper-raised);
  border:1.5px solid var(--rule);
  display:flex;align-items:center;justify-content:center;margin-bottom:14px;
  font-size:1.15rem;
}
.why-item h3{font-size:1.08rem;margin-bottom:8px;}
.why-item p{color:var(--ink-soft);font-size:0.92rem;line-height:1.6;margin:0;}

/* ---------- facebook cta ---------- */
.fb-cta{
  background:var(--ink);color:var(--paper);
  border-radius:16px;padding:44px 36px;
  display:flex;align-items:center;justify-content:space-between;gap:24px;flex-wrap:wrap;
}
.fb-cta h2{color:var(--paper);font-size:clamp(1.4rem,2.6vw,1.9rem);}
.fb-cta p{color:#C9C4B6;margin-top:8px;max-width:44ch;line-height:1.55;}
.fb-cta .btn-pen{flex-shrink:0;}

/* ---------- footer ---------- */
footer{padding-block:44px 60px;color:var(--ink-soft);}
.foot-grid{display:flex;justify-content:space-between;gap:24px;flex-wrap:wrap;padding-bottom:26px;}
.foot-brand .brand-name{font-size:1.05rem;}
.foot-brand p{max-width:36ch;font-size:0.88rem;line-height:1.55;margin-top:10px;}
.foot-links{display:flex;gap:48px;flex-wrap:wrap;}
.foot-col h4{font-family:"IBM Plex Mono",monospace;font-size:0.72rem;text-transform:uppercase;letter-spacing:0.08em;color:var(--ink-soft);margin:0 0 12px;}
.foot-col a{display:block;text-decoration:none;font-size:0.9rem;color:var(--ink);margin-bottom:9px;}
.foot-col a:hover{color:var(--pen);}
.copyright{font-size:0.8rem;padding-top:22px;border-top:1.5px solid var(--rule);}

/* ---------- single ebook page ---------- */
.single-ebook-wrap{max-width:720px;padding-block:56px;}
