
/*
Theme Name: ByteBuzz
Theme URI: https://bytebuzz.cl/
Author: ByteBuzz
Description: Tema editorial propio para ByteBuzz.
Version: 1.1.0
Requires at least: 6.0
Tested up to: 7.1
Requires PHP: 7.4
License: GPL-2.0-or-later
Text Domain: bytebuzz
*/

:root{
  --bb-purple:#6F3CFF;
  --bb-purple-dark:#5630D8;
  --bb-black:#101014;
  --bb-ink:#17171C;
  --bb-muted:#777984;
  --bb-line:#D9D9DE;
  --bb-soft:#F1F2F6;
  --bb-white:#FFFFFF;
  --bb-max:1320px;
}

*{box-sizing:border-box}
html{scroll-behavior:smooth}
body{
  margin:0;
  background:var(--bb-white);
  color:var(--bb-black);
  font-family:Arial,Helvetica,sans-serif;
  line-height:1.5;
  -webkit-font-smoothing:antialiased;
}
img{max-width:100%;height:auto;display:block}
a{color:inherit;text-decoration:none}
a:hover{color:var(--bb-purple)}
button,input{font:inherit}
.site-wrap{min-height:100vh}

/* Header */
.site-header{
  background:#fff;
  border-bottom:1px solid var(--bb-line);
  position:sticky;
  top:0;
  z-index:50;
}
.header-inner{
  max-width:var(--bb-max);
  min-height:82px;
  margin:0 auto;
  padding:0 28px;
  display:grid;
  grid-template-columns:1fr auto 1fr;
  align-items:center;
  gap:28px;
}
.site-brand{
  display:inline-flex;
  align-items:center;
  justify-self:start;
  gap:10px;
  color:var(--bb-black);
}
.brand-mark{
  width:39px;
  height:39px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  border-radius:11px;
  background:var(--bb-black);
  color:#fff;
  font-size:16px;
  font-weight:900;
  letter-spacing:-1px;
  line-height:1;
}
.brand-word{
  font-size:25px;
  font-weight:950;
  letter-spacing:-1.6px;
  line-height:1;
}
.primary-nav{
  justify-self:center;
  font-size:13px;
  font-weight:800;
}
.primary-nav ul{
  list-style:none;
  margin:0;
  padding:0;
  display:flex;
  align-items:center;
  gap:27px;
}
.primary-nav li{margin:0}
.primary-nav a{transition:color .15s ease}
.header-search{
  justify-self:end;
  width:220px;
  height:43px;
  display:flex;
  align-items:center;
  border:1px solid var(--bb-line);
  border-radius:24px;
  padding:0 14px 0 17px;
  background:#fff;
}
.header-search:focus-within{
  border-color:var(--bb-purple);
  box-shadow:0 0 0 3px rgba(111,60,255,.10);
}
.header-search input{
  width:100%;
  border:0;
  outline:0;
  background:transparent;
  color:var(--bb-black);
  font-size:14px;
}
.header-search button{
  border:0;
  background:none;
  color:var(--bb-black);
  padding:0 0 1px 10px;
  cursor:pointer;
  font-weight:900;
}

/* Layout */
.container{max-width:var(--bb-max);margin:0 auto;padding:0 28px}
.main{padding:40px 0 80px}

/* Hero */
.hero{
  position:relative;
  min-height:610px;
  margin-bottom:54px;
  overflow:hidden;
  border-radius:18px;
  background:#E8EAF0;
}
.hero-media,.hero-media img{
  position:absolute;
  inset:0;
  width:100%;
  height:100%;
  object-fit:cover;
}
.hero::after{
  content:"";
  position:absolute;
  inset:30% 0 0;
  background:linear-gradient(to bottom,rgba(16,16,20,0),rgba(16,16,20,.95));
  z-index:1;
}
.hero-placeholder{
  position:absolute;
  inset:0;
  display:flex;
  align-items:center;
  justify-content:center;
  background:
    radial-gradient(circle at 50% 35%,rgba(111,60,255,.13),transparent 34%),
    linear-gradient(145deg,#EEF0F6,#D2D6E0);
  color:#A5A8B1;
  font-weight:950;
  font-size:74px;
  letter-spacing:-5px;
}
.hero-content{
  position:absolute;
  z-index:2;
  left:52px;
  right:52px;
  bottom:43px;
  color:#fff;
}
.eyebrow,.card-category{
  text-transform:uppercase;
  letter-spacing:1.5px;
  font-size:11px;
  font-weight:950;
}
.hero .eyebrow{color:#fff;margin-bottom:10px}
.hero h1{
  max-width:1000px;
  margin:0;
  font-size:clamp(46px,5.8vw,82px);
  line-height:.98;
  letter-spacing:-4.1px;
  font-weight:950;
}
.hero h1 a:hover{color:#fff}
.hero-excerpt{
  max-width:820px;
  margin-top:16px;
  color:#F0F0F3;
  font-size:18px;
  line-height:1.45;
}

/* Editorial sections */
.section{margin-top:54px}
.section-head{
  border-top:3px solid var(--bb-black);
  padding-top:13px;
  margin-bottom:27px;
  display:flex;
  align-items:baseline;
  justify-content:space-between;
  gap:20px;
}
.section-head h2{
  margin:0;
  font-size:31px;
  line-height:1;
  letter-spacing:-1.6px;
  font-weight:950;
}
.section-link{
  color:var(--bb-purple);
  font-size:14px;
  font-weight:900;
  white-space:nowrap;
}
.section-link span{font-size:18px;margin-left:3px}

/* Latest: more like a news site, less like generic cards */
.latest-list{
  display:grid;
  grid-template-columns:repeat(3,1fr);
  gap:28px;
}
.latest-card{
  min-width:0;
}
.latest-thumb{
  display:block;
  aspect-ratio:16/9;
  overflow:hidden;
  border-radius:13px;
  background:var(--bb-soft);
  margin-bottom:16px;
}
.latest-thumb img,.post-thumb img{
  width:100%;
  height:100%;
  object-fit:cover;
  transition:transform .25s ease;
}
.latest-card:hover .latest-thumb img,.post-card:hover .post-thumb img{
  transform:scale(1.025);
}
.latest-info h3{
  margin:6px 0 7px;
  font-size:23px;
  line-height:1.12;
  letter-spacing:-.9px;
  font-weight:900;
}
.card-category{color:var(--bb-purple)}
.post-date{
  color:var(--bb-muted);
  font-size:13px;
}

/* Placeholder */
.post-thumb-placeholder{
  width:100%;
  height:100%;
  min-height:100%;
  display:flex;
  align-items:flex-end;
  padding:18px;
  background:
    radial-gradient(circle at 50% 35%,rgba(111,60,255,.09),transparent 32%),
    linear-gradient(145deg,#F0F1F5,#DCE0E8);
  color:#A5A8B1;
  font-weight:950;
  font-size:22px;
}

/* Category grids */
.category-section{
  padding-top:6px;
}
.post-grid{
  display:grid;
  grid-template-columns:repeat(3,1fr);
  gap:30px;
}
.post-card{min-width:0}
.post-thumb{
  display:block;
  aspect-ratio:16/10;
  overflow:hidden;
  border-radius:12px;
  background:var(--bb-soft);
  margin-bottom:15px;
}
.post-card h3{
  margin:6px 0 7px;
  font-size:22px;
  line-height:1.12;
  letter-spacing:-.8px;
  font-weight:900;
}

/* Article */
.single-header{max-width:920px;margin:34px auto 38px}
.single-header h1{
  margin:10px 0 17px;
  font-size:clamp(44px,6vw,78px);
  line-height:.98;
  letter-spacing:-4px;
  font-weight:950;
}
.single-meta{color:var(--bb-muted);font-size:14px}
.single-featured{max-width:1120px;margin:0 auto 42px;border-radius:15px;overflow:hidden}
.entry-content{max-width:760px;margin:auto;font-size:18px}
.entry-content h2,.entry-content h3{
  line-height:1.1;
  letter-spacing:-1px;
  font-weight:900;
}
.entry-content a{
  color:var(--bb-purple);
  text-decoration:underline;
  text-underline-offset:3px;
}
.entry-content blockquote{
  border-left:4px solid var(--bb-purple);
  margin:32px 0;
  padding:5px 24px;
  font-size:22px;
  font-weight:800;
}

/* Archives */
.archive-header{
  padding:30px 0 34px;
  border-bottom:3px solid var(--bb-black);
  margin-bottom:32px;
}
.archive-header h1{
  margin:0;
  font-size:50px;
  line-height:1;
  letter-spacing:-2.5px;
  font-weight:950;
}

/* Footer */
.site-footer{
  margin-top:80px;
  background:var(--bb-black);
  color:#fff;
  padding:52px 0;
}
.footer-inner{
  max-width:var(--bb-max);
  margin:auto;
  padding:0 28px;
  display:flex;
  align-items:flex-end;
  justify-content:space-between;
  gap:30px;
}
.footer-brand{
  display:flex;
  align-items:center;
  gap:10px;
  font-size:26px;
  font-weight:950;
  letter-spacing:-1.5px;
}
.footer-brand .dot{color:var(--bb-purple)}
.footer-copy{color:#A9AAB1;font-size:13px}

/* WordPress */
.pagination{margin-top:40px;display:flex;gap:10px}
.pagination a,.pagination span{
  border:1px solid var(--bb-line);
  padding:9px 13px;
  border-radius:8px;
}
.pagination .current{
  background:var(--bb-purple);
  color:#fff;
  border-color:var(--bb-purple);
}
.screen-reader-text{
  border:0;
  clip:rect(1px,1px,1px,1px);
  clip-path:inset(50%);
  height:1px;
  margin:-1px;
  overflow:hidden;
  padding:0;
  position:absolute;
  width:1px;
}
.alignwide{max-width:1100px;margin-left:auto;margin-right:auto}
.wp-block-image img{border-radius:10px}
.wp-caption{max-width:100%}
.wp-caption-text{font-size:12px;color:var(--bb-muted);margin-top:7px}

@media (max-width:1000px){
  .header-inner{
    grid-template-columns:auto 1fr auto;
    gap:18px;
  }
  .primary-nav{display:none}
  .header-search{width:200px}
  .hero{min-height:540px}
  .latest-list,.post-grid{grid-template-columns:repeat(2,1fr)}
}
@media (max-width:640px){
  .container{padding:0 16px}
  .header-inner{
    min-height:70px;
    padding:0 16px;
    grid-template-columns:auto 1fr;
  }
  .brand-mark{width:35px;height:35px;font-size:15px}
  .brand-word{font-size:22px}
  .header-search{width:150px;height:39px}
  .main{padding-top:20px}
  .hero{
    min-height:470px;
    border-radius:13px;
    margin-bottom:42px;
  }
  .hero-content{
    left:24px;
    right:24px;
    bottom:27px;
  }
  .hero h1{
    font-size:43px;
    letter-spacing:-2.4px;
  }
  .hero-excerpt{font-size:15px}
  .section{margin-top:42px}
  .section-head{margin-bottom:20px}
  .section-head h2{font-size:27px}
  .latest-list,.post-grid{grid-template-columns:1fr}
  .latest-info h3,.post-card h3{font-size:21px}
  .single-header h1{font-size:46px;letter-spacing:-2.4px}
  .footer-inner{
    display:block;
    padding:0 16px;
  }
  .footer-copy{margin-top:16px}
}
