/*
Theme Name: EastSideThrilla Plain
Theme URI: https://eastsidethrilla.com
Author: EastSideThrilla Team
Description: Minimal, professional, neutral base theme for WordPress + IONOS. Classic theme with Customizer controls (logo/colors/fonts) while fully supporting the block editor for content. Includes an optional Light/Dark toggle (mobile-friendly).
Version: 0.2.1
Requires at least: 6.0
Tested up to: 6.9
Requires PHP: 7.4
Text Domain: eastsidethrilla-plain
Tags: custom-logo, custom-colors, editor-style, featured-images, one-column
*/

/* =========================
   Defaults = "Neutral (slightly dark)"
   ========================= */
:root{
  --est-bg: #14161a;        /* slightly dark */
  --est-surface: #1b1f25;   /* cards */
  --est-text: #f2f4f8;      /* soft white */
  --est-muted: #aab2c0;     /* muted */
  --est-link: #78a6ff;      /* calm blue */
  --est-accent: #22c55e;    /* accent */
  --est-border: rgba(255,255,255,0.12);

  --est-font-body: system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
  --est-font-headings: var(--est-font-body);

  --est-radius: 14px;
  --est-max: 1100px;
}

/* Light mode overrides */
body.est-light{
  --est-bg: #f6f7f9;
  --est-surface: #ffffff;
  --est-text: #0f172a;
  --est-muted: #475569;
  --est-link: #2563eb;
  --est-accent: #16a34a;
  --est-border: rgba(15, 23, 42, 0.12);
}

/* Dark mode override (a touch deeper than neutral) */
body.est-dark{
  --est-bg: #0b0b0d;
  --est-surface: #121216;
  --est-text: #f2f3f5;
  --est-muted: #b5b9c3;
  --est-link: #60a5fa;
  --est-accent: #22c55e;
  --est-border: rgba(255,255,255,0.12);
}

*{ box-sizing:border-box; }
html, body{ height: 100%; }
body{
  margin:0;
  font-family: var(--est-font-body);
  color: var(--est-text);
  background: var(--est-bg);
  line-height: 1.6;
}

a{ color: var(--est-link); text-decoration-thickness: .12em; text-underline-offset: .18em; }
a:hover{ text-decoration-thickness: .18em; }

img{ max-width:100%; height:auto; }

.est-wrap{
  max-width: var(--est-max);
  margin: 0 auto;
  padding: 0 1.1rem;
}

/* Header (sticky as requested) */
.site-header{
  border-bottom: 1px solid var(--est-border);
  background: rgba(20,22,26,.82); /* keeps the "slightly dark" feel */
}
body.est-light .site-header{ background: rgba(246,247,249,.82); }
body.est-dark .site-header{ background: rgba(11,11,13,.82); }

.site-header{
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(8px);
}
.site-header-inner{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 1rem;
  padding: .9rem 0;
}
.brand{
  display:flex;
  align-items:center;
  gap:.75rem;
  min-width: 220px;
}
.brand a{ color: var(--est-text); text-decoration:none; }
.brand .site-title{
  font-weight: 800;
  letter-spacing: .2px;
  line-height: 1.1;
}
.brand .site-tagline{
  color: var(--est-muted);
  font-size: .92rem;
  margin-top: .15rem;
}
.brand-logo img{
  width: 44px;
  height: 44px;
  border-radius: 10px;
  object-fit: cover;
  border: 1px solid var(--est-border);
  background: var(--est-surface);
}

/* Nav */
.primary-nav{
  display:flex;
  align-items:center;
  gap: .9rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.primary-nav a{
  color: var(--est-text);
  text-decoration:none;
  font-weight: 600;
  opacity: .92;
}
.primary-nav a:hover{ opacity: 1; }
.primary-nav .current-menu-item > a{ color: var(--est-link); }

/* Mobile nav wrap: let it drop under brand if needed */
@media (max-width: 720px){
  .site-header-inner{ flex-wrap: wrap; }
  .primary-nav{ width: 100%; justify-content: flex-start; }
}

/* Theme toggle button */
.est-toggle{
  border: 1px solid var(--est-border);
  background: var(--est-surface);
  color: var(--est-text);
  border-radius: 999px;
  padding: .45rem .7rem;
  font-weight: 800;
  cursor: pointer;
}

/* Main */
.site-main{ padding: 1.6rem 0 2.4rem; }

.content-card{
  background: var(--est-surface);
  border: 1px solid var(--est-border);
  border-radius: var(--est-radius);
  padding: 1.25rem;
}

/* Post lists */
.post-list{
  display:grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}
@media (min-width: 900px){
  .post-list{ grid-template-columns: 1fr 1fr; }
}

.post-item{
  background: var(--est-surface);
  border: 1px solid var(--est-border);
  border-radius: var(--est-radius);
  padding: 1rem;
}
.post-item h2{
  font-family: var(--est-font-headings);
  margin: .2rem 0 .4rem;
  line-height: 1.2;
}
.post-meta{
  color: var(--est-muted);
  font-size: .9rem;
}

/* Featured image */
.post-thumb{
  border-radius: calc(var(--est-radius) - 4px);
  overflow: hidden;
  border: 1px solid var(--est-border);
  margin: .75rem 0;
}

/* Embeds */
.wp-block-embed iframe,
.wp-block-embed video,
iframe{ max-width: 100%; }

/* Footer (minimal) */
.site-footer{
  border-top: 1px solid var(--est-border);
  padding: 1.5rem 0;
  color: var(--est-muted);
}
.footer-inner{
  display:flex;
  flex-wrap: wrap;
  align-items:center;
  justify-content:space-between;
  gap: .75rem;
}
.footer-nav a{
  color: var(--est-muted);
  text-decoration:none;
  font-weight: 600;
}
.footer-nav a:hover{ color: var(--est-text); }

/* Gutenberg content tweaks */
.entry-content > *:first-child{ margin-top: 0; }
.entry-content > *:last-child{ margin-bottom: 0; }
