/*
Theme Name: Keystone Classic
Theme URI: https://example.com/keystone-classic
Author: Keystone
Author URI: https://example.com
Description: Lightweight classic WordPress theme with premium styling and Gutenberg support.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.6
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: keystone-classic
Tags: one-column, two-columns, custom-logo, custom-menu, featured-images, threaded-comments, translation-ready
*/

:root {
  --ks-bg: #1a1c24;
  --ks-bg-soft: #232633;
  --ks-panel: #2b2f3d;
  --ks-panel-2: #343949;
  --ks-text: #ece3d0;
  --ks-text-muted: #bdb7aa;
  --ks-gold: #c2a465;
  --ks-gold-deep: #8d7341;
  --ks-border: rgba(194, 164, 101, 0.16);
  --ks-max: 1240px;
  --ks-content: 860px;
  --ks-radius: 14px;
}

* { box-sizing: border-box; }

html, body { margin: 0; padding: 0; }

body {
  background:
    radial-gradient(circle at 15% -12%, rgba(194, 164, 101, 0.07), rgba(26, 28, 36, 0) 34%),
    linear-gradient(180deg, #272c3a 0%, #1a1c24 100%);
  color: var(--ks-text);
  font-family: "Instrument Sans", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  font-size: 17px;
  line-height: 1.7;
}

a { color: var(--ks-gold); text-decoration: none; }
a:hover { color: #dbc99d; }

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

.site-wrap { min-height: 100vh; }

.container {
  width: min(var(--ks-max), calc(100% - 2rem));
  margin: 0 auto;
}

.site-header {
  padding: 1rem 0;
}

.header-shell,
.footer-shell,
.hero-shell {
  border: 1px solid var(--ks-border);
  border-radius: 18px;
  background:
    linear-gradient(145deg, rgba(194, 164, 101, 0.05), rgba(194, 164, 101, 0) 42%),
    rgba(38, 43, 57, 0.82);
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.16);
  backdrop-filter: blur(2px);
}

.header-shell {
  padding: 0.75rem 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  min-width: 0;
}

.custom-logo-link {
  display: inline-flex;
  align-items: center;
}

.custom-logo-link img,
.custom-logo {
  width: auto;
  height: auto;
  max-height: 62px;
  max-width: 100%;
  object-fit: contain;
}

.site-title {
  margin: 0;
  font-family: "Cormorant Garamond", Garamond, serif;
  font-size: 1.6rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  line-height: 1;
}

.site-title a { color: var(--ks-text); }

.nav-primary ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 1.25rem;
}

.nav-primary a {
  color: #e7dcc4;
  font-size: 0.92rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.nav-primary .current-menu-item > a,
.nav-primary a:hover {
  color: var(--ks-gold);
}

.header-cta .button {
  padding: 0.58rem 1rem;
  font-size: 0.88rem;
  white-space: nowrap;
}

.button {
  display: inline-block;
  border: 1px solid var(--ks-gold);
  border-radius: 8px;
  padding: 0.75rem 1.1rem;
  font-weight: 600;
  color: #14151b;
  background: var(--ks-gold);
}

.button:hover { background: #d1b57b; color: #12131a; }

.button-outline {
  background: transparent;
  color: var(--ks-text);
}

.button-outline:hover {
  background: rgba(194, 164, 101, 0.1);
  color: var(--ks-text);
}

.site-main { padding: 1.8rem 0 3rem; }

.content-wrap {
  width: 100%;
}

.hero-shell {
  padding: 2rem;
  margin-bottom: 1.7rem;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 1.5rem;
  align-items: center;
}

.kicker {
  color: var(--ks-gold);
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 0.6rem;
}

.hero-title,
h1, h2, h3, h4 {
  font-family: "Cormorant Garamond", Garamond, serif;
  line-height: 1.12;
  color: var(--ks-text);
}

.hero-title {
  margin: 0 0 0.9rem;
  font-size: clamp(2.2rem, 5vw, 4.1rem);
}

.hero-lead {
  margin: 0 0 1.2rem;
  font-size: 1.18rem;
  color: #ded4be;
}

.hero-media img {
  border-radius: var(--ks-radius);
  border: 1px solid var(--ks-border);
  min-height: 420px;
  object-fit: cover;
}

.section-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.card {
  border: 1px solid var(--ks-border);
  border-radius: var(--ks-radius);
  background:
    linear-gradient(160deg, rgba(194, 164, 101, 0.1), rgba(26, 28, 36, 0) 50%),
    linear-gradient(180deg, rgba(41, 46, 60, 0.96), rgba(30, 33, 44, 0.96));
  padding: 1.1rem;
}

.page-shell {
  width: 100%;
  margin: 0 auto;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
}

.entry-title { margin-top: 0; font-size: clamp(2rem, 4vw, 3rem); }
.entry-content > *:first-child { margin-top: 0; }
.entry-content > * {
  width: min(var(--ks-max), calc(100% - 2rem));
  margin-left: auto;
  margin-right: auto;
}
.entry-content > .alignwide {
  width: min(var(--ks-max), calc(100% - 2rem));
}
.entry-content > .alignfull {
  width: 100vw;
  max-width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
}

.front-page-shell {
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
}

.ks-shell {
  border: 1px solid var(--ks-border);
  border-radius: 18px;
  background:
    linear-gradient(145deg, rgba(194, 164, 101, 0.04), rgba(194, 164, 101, 0) 45%),
    rgba(42, 47, 63, 0.7);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.12);
  padding: 1.4rem;
}

.ks-grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.ks-grid-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.ks-stack {
  display: grid;
  gap: 0.9rem;
}

.ks-card {
  border: 1px solid var(--ks-border);
  border-radius: var(--ks-radius);
  background:
    linear-gradient(160deg, rgba(194, 164, 101, 0.04), rgba(36, 40, 52, 0) 52%),
    linear-gradient(180deg, rgba(56, 62, 80, 0.82), rgba(48, 54, 70, 0.82));
  padding: 1rem;
}

.ks-step {
  border-left: 2px solid rgba(194, 164, 101, 0.75);
  padding-left: 0.8rem;
}

.footer-shell {
  padding: 1.5rem;
  margin-top: 2rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  gap: 1rem;
}

.footer-menu,
.footer-social { list-style: none; margin: 0; padding: 0; }
.footer-menu li,
.footer-social li { margin-bottom: 0.45rem; }

small, .muted { color: var(--ks-text-muted); }

.wp-block-group,
.wp-block-columns,
.wp-block-column { max-width: 100%; }

.alignwide { width: min(var(--ks-max), calc(100% - 2rem)); margin-left: auto; margin-right: auto; }
.alignfull {
  width: 100vw;
  max-width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
}

@media (max-width: 980px) {
  .hero-grid,
  .section-grid,
  .footer-grid,
  .ks-grid-2,
  .ks-grid-3 {
    grid-template-columns: 1fr;
  }

  .hero-media { order: -1; }
  .hero-media img { min-height: 280px; }

  .header-shell {
    flex-wrap: wrap;
  }

  .nav-primary ul {
    flex-wrap: wrap;
    gap: 0.75rem 1rem;
  }
}

@media (max-width: 640px) {
  body { font-size: 16px; }
  .container { width: calc(100% - 1.2rem); }
  .hero-shell { padding: 1.2rem; }
  .ks-shell { padding: 1rem; }

  .custom-logo-link img,
  .custom-logo { max-height: 50px; }
}
