/*
Theme Name: Shang Town Premium
Theme URI: https://shang.town/
Author: OpenAI Codex
Author URI: https://openai.com/
Description: A lightweight premium theme for production services, built for faster loading and a more professional editorial presence.
Version: 1.0.2
Requires at least: 6.4
Tested up to: 6.8
Requires PHP: 7.4
Text Domain: shang-town-premium
*/

:root {
  --st-bg: #f4f1ea;
  --st-surface: rgba(255, 255, 255, 0.74);
  --st-surface-strong: #fbfaf7;
  --st-line: rgba(20, 27, 32, 0.12);
  --st-line-strong: rgba(20, 27, 32, 0.22);
  --st-text: #172129;
  --st-text-soft: #53616d;
  --st-accent: #aa6b2b;
  --st-accent-strong: #82511f;
  --st-accent-soft: #efe1d2;
  --st-ink: #10161b;
  --st-shadow: 0 24px 70px rgba(20, 27, 32, 0.11);
  --st-radius-lg: 30px;
  --st-radius-md: 20px;
  --st-radius-sm: 14px;
  --st-shell: 1180px;
  --st-display: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", Georgia, serif;
  --st-sans: "Avenir Next", Aptos, "Segoe UI", sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--st-text);
  font-family: var(--st-sans);
  line-height: 1.6;
  background:
    radial-gradient(circle at top left, rgba(170, 107, 43, 0.08), transparent 34%),
    radial-gradient(circle at top right, rgba(16, 22, 27, 0.06), transparent 28%),
    linear-gradient(180deg, #f8f5ee 0%, #f4f1ea 46%, #ece8de 100%);
}

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

a {
  color: inherit;
  text-decoration-color: rgba(170, 107, 43, 0.4);
  text-underline-offset: 0.18em;
}

a:hover,
a:focus-visible {
  text-decoration-color: currentColor;
}

button,
input,
textarea,
select {
  font: inherit;
}

.screen-reader-text {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

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

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

.site-main {
  padding-bottom: 4rem;
}

.st-header {
  position: sticky;
  top: 0;
  z-index: 30;
  backdrop-filter: blur(14px);
  background: rgba(244, 241, 234, 0.84);
  border-bottom: 1px solid rgba(20, 27, 32, 0.08);
}

.st-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  min-height: 86px;
}

.st-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.95rem;
  font-weight: 700;
}

.st-brand__mark,
.st-brand__logo {
  width: 52px;
  height: 52px;
  border-radius: 18px;
  flex-shrink: 0;
}

.st-brand__mark {
  display: grid;
  place-items: center;
  background: linear-gradient(160deg, #171f27 0%, #2b3945 56%, #aa6b2b 100%);
  color: #fff8f0;
  font-family: var(--st-display);
  font-size: 1.1rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  box-shadow: 0 16px 30px rgba(16, 22, 27, 0.18);
}

.st-brand__logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.st-brand__logo .custom-logo-link {
  display: block;
  line-height: 0;
}

.st-brand__mark,
.st-brand__text {
  color: inherit;
  text-decoration: none;
}

.st-brand__text {
  display: grid;
  gap: 0.1rem;
}

.st-brand__eyebrow {
  color: var(--st-text-soft);
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.st-brand__title {
  font-size: 1rem;
  letter-spacing: 0.02em;
}

.st-nav {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.st-nav__list {
  display: flex;
  align-items: center;
  gap: 1.4rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.st-nav__list li {
  margin: 0;
}

.st-nav__list a {
  color: var(--st-text-soft);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 600;
}

.st-nav__list .current-menu-item > a,
.st-nav__list a:hover,
.st-nav__list a:focus-visible {
  color: var(--st-text);
}

.st-nav__cta {
  white-space: nowrap;
}

.st-nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  padding: 0;
  border: 1px solid var(--st-line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.52);
  color: var(--st-text);
}

.st-nav-toggle__bars,
.st-nav-toggle__bars::before,
.st-nav-toggle__bars::after {
  display: block;
  width: 18px;
  height: 2px;
  border-radius: 99px;
  background: currentColor;
  transition: transform 0.25s ease, opacity 0.25s ease;
  content: "";
}

.st-nav-toggle__bars::before {
  transform: translateY(-6px);
}

.st-nav-toggle__bars::after {
  transform: translateY(4px);
}

body.nav-open .st-nav-toggle__bars {
  background: transparent;
}

body.nav-open .st-nav-toggle__bars::before {
  transform: translateY(0) rotate(45deg);
}

body.nav-open .st-nav-toggle__bars::after {
  transform: translateY(-2px) rotate(-45deg);
}

.st-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 50px;
  padding: 0.9rem 1.25rem;
  border-radius: 999px;
  border: 1px solid transparent;
  font-size: 0.95rem;
  font-weight: 700;
  text-decoration: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease, border-color 0.2s ease;
}

.st-button:hover,
.st-button:focus-visible {
  transform: translateY(-1px);
}

.st-button--primary {
  color: #fffaf3;
  background: linear-gradient(135deg, var(--st-accent) 0%, #c48a4b 100%);
  box-shadow: 0 16px 34px rgba(170, 107, 43, 0.26);
}

.st-button--secondary {
  color: var(--st-text);
  background: rgba(255, 255, 255, 0.55);
  border-color: rgba(20, 27, 32, 0.08);
}

.st-button--ghost {
  color: var(--st-text);
  background: transparent;
  border-color: var(--st-line-strong);
}

.st-section {
  padding: 1.15rem 0;
}

.st-section--spacious {
  padding: 2rem 0;
}

.st-panel {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: var(--st-radius-lg);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.8) 0%, rgba(251, 250, 247, 0.72) 100%);
  box-shadow: var(--st-shadow);
}

.st-kicker {
  display: inline-block;
  margin-bottom: 1rem;
  color: var(--st-accent-strong);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.st-section-heading {
  display: grid;
  gap: 0.75rem;
  max-width: 760px;
  margin-bottom: 1.25rem;
}

.st-section-heading h2,
.st-hero__copy h1,
.st-page-hero h1,
.st-article__title {
  margin: 0;
  color: var(--st-ink);
  font-family: var(--st-display);
  font-weight: 700;
  line-height: 1.04;
  text-wrap: balance;
}

.st-hero {
  padding: 1.4rem 0 0.5rem;
}

.st-hero__panel {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(300px, 0.8fr);
  gap: 2rem;
  padding: clamp(1.6rem, 2vw, 2.2rem);
}

.st-hero__copy {
  display: grid;
  align-content: start;
  gap: 1.1rem;
  padding: 0.4rem 0;
}

.st-hero__copy h1 {
  font-size: clamp(2.7rem, 5.4vw, 5.6rem);
}

.st-hero__copy p {
  max-width: 62ch;
  margin: 0;
  color: var(--st-text-soft);
  font-size: clamp(1rem, 1.2vw, 1.08rem);
}

.st-hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  padding-top: 0.5rem;
}

.st-hero__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.2rem;
  padding-top: 0.3rem;
  color: var(--st-text-soft);
  font-size: 0.92rem;
}

.st-hero__meta strong {
  color: var(--st-text);
}

.st-hero__visual {
  display: grid;
  gap: 1rem;
}

.st-showcase {
  padding: 1.15rem;
  border-radius: 26px;
  min-height: 100%;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.24), rgba(255, 255, 255, 0) 45%),
    linear-gradient(140deg, #162029 0%, #24323d 45%, #9b6932 100%);
  color: #f7f1e9;
}

.st-showcase__top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.3rem;
}

.st-showcase__label {
  color: rgba(247, 241, 233, 0.72);
  font-size: 0.74rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.st-showcase__badge {
  padding: 0.42rem 0.8rem;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 999px;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.st-showcase__cards {
  display: grid;
  gap: 0.9rem;
}

.st-showcase__card {
  display: grid;
  gap: 0.4rem;
  padding: 1rem 1.05rem;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.st-showcase__card strong {
  font-size: 1.02rem;
}

.st-showcase__card span {
  color: rgba(247, 241, 233, 0.76);
  font-size: 0.92rem;
}

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

.st-metric {
  padding: 1.25rem 1.3rem;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.56);
  border: 1px solid var(--st-line);
}

.st-metric strong {
  display: block;
  margin-bottom: 0.4rem;
  color: var(--st-ink);
  font-family: var(--st-display);
  font-size: clamp(1.7rem, 3vw, 2.35rem);
  line-height: 1;
}

.st-metric span {
  color: var(--st-text-soft);
  font-size: 0.92rem;
}

.st-grid {
  display: grid;
  gap: 1rem;
}

.st-grid--services {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.st-card {
  padding: 1.4rem;
  border-radius: 24px;
  border: 1px solid var(--st-line);
  background: rgba(255, 255, 255, 0.58);
}

.st-card__index {
  display: inline-grid;
  place-items: center;
  width: 2.2rem;
  height: 2.2rem;
  margin-bottom: 1rem;
  border-radius: 999px;
  background: var(--st-accent-soft);
  color: var(--st-accent-strong);
  font-size: 0.82rem;
  font-weight: 700;
}

.st-card h3,
.st-post-card__title,
.st-page-content h2,
.st-page-content h3,
.st-page-content h4 {
  margin: 0 0 0.55rem;
  color: var(--st-ink);
  font-family: var(--st-display);
}

.st-card p,
.st-page-content p,
.st-page-content li {
  margin: 0;
  color: var(--st-text-soft);
}

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

.st-process__step {
  position: relative;
  padding: 1.5rem 1.4rem 1.35rem;
  border-radius: 24px;
  border: 1px solid var(--st-line);
  background: rgba(16, 22, 27, 0.92);
  color: rgba(247, 241, 233, 0.78);
}

.st-process__step::after {
  content: "";
  position: absolute;
  inset: auto 1.4rem 0;
  height: 3px;
  background: linear-gradient(90deg, var(--st-accent) 0%, transparent 100%);
}

.st-process__step strong {
  display: block;
  margin-bottom: 0.7rem;
  color: #fff;
  font-size: 1.05rem;
}

.st-coverage {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.st-chip {
  padding: 0.72rem 0.95rem;
  border-radius: 999px;
  border: 1px solid var(--st-line);
  background: rgba(255, 255, 255, 0.58);
  color: var(--st-text);
  font-size: 0.92rem;
  font-weight: 600;
}

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

.st-post-card {
  display: grid;
  overflow: hidden;
  border-radius: 26px;
  border: 1px solid var(--st-line);
  background: rgba(255, 255, 255, 0.72);
  box-shadow: 0 12px 34px rgba(20, 27, 32, 0.08);
}

.st-post-card__media {
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background:
    linear-gradient(160deg, rgba(16, 22, 27, 0.14), rgba(170, 107, 43, 0.28)),
    linear-gradient(135deg, #d8d2c7, #f7f3ec);
}

.st-post-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.st-post-card__body {
  display: grid;
  gap: 0.8rem;
  padding: 1.4rem;
}

.st-post-card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem 0.9rem;
  color: var(--st-text-soft);
  font-size: 0.84rem;
}

.st-post-card__title {
  font-size: 1.28rem;
  line-height: 1.18;
}

.st-post-card__excerpt {
  margin: 0;
  color: var(--st-text-soft);
}

.st-post-card__link {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  color: var(--st-accent-strong);
  font-weight: 700;
  text-decoration: none;
}

.st-page-hero {
  padding: 1.4rem 0 0.5rem;
}

.st-page-hero__panel {
  padding: clamp(1.6rem, 2vw, 2.1rem);
}

.st-page-hero h1 {
  font-size: clamp(2.4rem, 4vw, 4.2rem);
}

.st-page-hero__meta,
.st-article__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem 1rem;
  margin-top: 1rem;
  color: var(--st-text-soft);
  font-size: 0.9rem;
}

.st-page-content,
.st-article__body,
.st-empty {
  padding: clamp(1.5rem, 2vw, 2rem);
}

.st-prose {
  border-radius: var(--st-radius-lg);
}

.st-page-content > *:first-child,
.st-article__body > *:first-child {
  margin-top: 0;
}

.st-page-content > *:last-child,
.st-article__body > *:last-child {
  margin-bottom: 0;
}

.st-page-content ul,
.st-page-content ol,
.st-article__body ul,
.st-article__body ol {
  padding-left: 1.2rem;
}

.st-page-content blockquote,
.st-article__body blockquote {
  margin: 1.4rem 0;
  padding: 0.2rem 0 0.2rem 1.1rem;
  border-left: 3px solid var(--st-accent);
  color: var(--st-text);
  font-family: var(--st-display);
  font-size: 1.15rem;
}

.st-article__body a,
.st-page-content a {
  color: var(--st-accent-strong);
}

.st-footer {
  padding: 0 0 2rem;
}

.st-footer__cta {
  padding: 1.5rem;
}

.st-footer__cta-inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 1.4rem;
  align-items: center;
}

.st-footer__cta h2 {
  margin: 0 0 0.5rem;
  font-family: var(--st-display);
  font-size: clamp(2rem, 3vw, 3rem);
  line-height: 1.05;
}

.st-footer__cta p,
.st-footer__base p {
  margin: 0;
  color: var(--st-text-soft);
}

.st-footer__base {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-top: 1.5rem;
}

.st-footer__nav {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.st-footer__nav a {
  color: var(--st-text-soft);
  text-decoration: none;
}

.st-search {
  display: flex;
  gap: 0.7rem;
}

.st-search input[type="search"] {
  width: min(420px, 100%);
  min-height: 52px;
  padding: 0.9rem 1rem;
  border: 1px solid var(--st-line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.8);
}

.st-empty {
  display: grid;
  gap: 1rem;
}

body.js-ready [data-reveal] {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.45s ease, transform 0.45s ease;
}

body.js-ready [data-reveal].is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 1080px) {
  .st-grid--services,
  .st-process,
  .st-post-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .st-hero__panel,
  .st-footer__cta-inner {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 820px) {
  .st-header__inner {
    min-height: 78px;
  }

  .st-nav-toggle {
    display: inline-flex;
  }

  .st-nav {
    position: fixed;
    inset: 78px 1rem auto;
    display: grid;
    gap: 1.2rem;
    padding: 1.2rem;
    border: 1px solid var(--st-line);
    border-radius: 24px;
    background: rgba(250, 248, 243, 0.96);
    box-shadow: var(--st-shadow);
    transform: translateY(-12px);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s ease;
  }

  body.nav-open .st-nav {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
  }

  .st-nav__list,
  .st-footer__base {
    flex-direction: column;
    align-items: flex-start;
  }

  .st-nav__cta {
    width: 100%;
  }

  .st-nav__cta .st-button {
    width: 100%;
  }

  .st-metrics,
  .st-grid--services,
  .st-process,
  .st-post-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .st-shell {
    width: min(calc(100% - 1.2rem), var(--st-shell));
  }

  .st-hero__copy h1,
  .st-page-hero h1 {
    text-wrap: initial;
  }

  .st-button {
    width: 100%;
  }

  .st-hero__actions {
    display: grid;
    grid-template-columns: 1fr;
  }
}
