/* 詩說 ShiShuo — Official Site Styles */

:root {
  --bg-cream: #faf7f2;
  --bg-warm: #f3ebe0;
  --gold-light: #e8d5b5;
  --gold: #c9a96e;
  --gold-deep: #a8844a;
  --orange-warm: #e8934a;
  --orange-soft: #f4b87a;
  --brown-primary: #5d4037;
  --brown-muted: #8d6e63;
  --text-primary: #3e2723;
  --text-secondary: #6d4c41;
  --text-muted: #a1887f;
  --surface: #ffffff;
  --surface-tint: rgba(232, 213, 181, 0.35);
  --shadow: 0 4px 24px rgba(93, 64, 55, 0.08);
  --shadow-lg: 0 12px 40px rgba(93, 64, 55, 0.12);
  --radius: 16px;
  --radius-lg: 24px;
  --max-width: 960px;
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang TC",
    "Microsoft JhengHei", "Noto Sans TC", sans-serif;
  --font-serif: "Songti TC", "STSong", "Noto Serif TC", Georgia, serif;
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-sans);
  background: var(--bg-cream);
  color: var(--text-primary);
  line-height: 1.7;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ── Header ── */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(250, 247, 242, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(201, 169, 110, 0.2);
}

.header-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 14px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.logo-link {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: inherit;
}

.logo-placeholder {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--gold-light), var(--orange-soft));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  box-shadow: var(--shadow);
  flex-shrink: 0;
}

.logo-text {
  font-weight: 700;
  font-size: 1.125rem;
  color: var(--brown-primary);
  letter-spacing: 0.02em;
}

.logo-sub {
  font-size: 0.7rem;
  color: var(--text-muted);
  font-weight: 400;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.nav-links {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.nav-links a {
  text-decoration: none;
  color: var(--text-secondary);
  font-size: 0.875rem;
  padding: 8px 14px;
  border-radius: 20px;
  transition: background 0.2s, color 0.2s;
}

.nav-links a:hover,
.nav-links a.active {
  background: var(--surface-tint);
  color: var(--brown-primary);
}

/* ── Hero ── */

.hero {
  background: linear-gradient(
    135deg,
    #efe4d4 0%,
    #f5ebe0 40%,
    #fdecd8 100%
  );
  padding: 64px 20px 72px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(
    ellipse at 30% 20%,
    rgba(232, 147, 74, 0.12) 0%,
    transparent 60%
  );
  pointer-events: none;
}

.hero-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  position: relative;
}

.hero-logo {
  width: 88px;
  height: 88px;
  margin: 0 auto 24px;
  border-radius: 22px;
  background: linear-gradient(145deg, var(--gold-light), var(--orange-warm));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 42px;
  box-shadow: var(--shadow-lg);
}

.hero h1 {
  font-family: var(--font-serif);
  font-size: clamp(2.5rem, 8vw, 3.5rem);
  font-weight: 700;
  color: var(--brown-primary);
  letter-spacing: 0.12em;
  margin-bottom: 8px;
}

.hero .en-name {
  font-family: var(--font-sans);
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--gold-deep);
  letter-spacing: 0.25em;
  text-transform: uppercase;
  margin-bottom: 20px;
}

.hero-tagline {
  font-size: clamp(1rem, 3.5vw, 1.25rem);
  color: var(--text-secondary);
  max-width: 520px;
  margin: 0 auto 36px;
  line-height: 1.8;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
}

/* ── Buttons ── */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: var(--radius);
  font-size: 0.9375rem;
  font-weight: 600;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s, opacity 0.15s;
}

.btn:active {
  transform: scale(0.98);
}

.btn-primary {
  background: linear-gradient(135deg, var(--brown-primary), #4e342e);
  color: #fff;
  box-shadow: 0 4px 16px rgba(93, 64, 55, 0.25);
}

.btn-primary:hover:not(:disabled) {
  box-shadow: 0 6px 24px rgba(93, 64, 55, 0.35);
}

.btn-primary:disabled,
.btn-disabled {
  background: linear-gradient(135deg, #bcaaa4, #a1887f);
  color: rgba(255, 255, 255, 0.85);
  cursor: not-allowed;
  box-shadow: none;
  opacity: 0.75;
}

.btn-outline {
  background: var(--surface);
  color: var(--brown-primary);
  border: 1.5px solid var(--gold-light);
  box-shadow: var(--shadow);
}

.btn-outline:hover {
  background: var(--surface-tint);
  border-color: var(--gold);
}

/* ── Main content ── */

main {
  flex: 1;
}

.section {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 56px 20px;
}

.section-title {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  color: var(--brown-primary);
  text-align: center;
  margin-bottom: 36px;
  letter-spacing: 0.06em;
}

.section-title::after {
  content: "";
  display: block;
  width: 40px;
  height: 3px;
  background: linear-gradient(90deg, var(--gold), var(--orange-warm));
  margin: 12px auto 0;
  border-radius: 2px;
}

/* ── Features ── */

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

.feature-card {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
  border: 1px solid rgba(201, 169, 110, 0.15);
  display: flex;
  align-items: flex-start;
  gap: 14px;
  transition: transform 0.2s, box-shadow 0.2s;
}

.feature-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.feature-icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: var(--surface-tint);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  flex-shrink: 0;
  color: var(--orange-warm);
}

.feature-card h3 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--brown-primary);
  margin-bottom: 4px;
}

.feature-card p {
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.6;
}

/* ── Legal pages ── */

.page-hero {
  background: linear-gradient(135deg, #efe4d4, #f5ebe0);
  padding: 48px 20px 40px;
  text-align: center;
  border-bottom: 1px solid rgba(201, 169, 110, 0.2);
}

.page-hero h1 {
  font-family: var(--font-serif);
  font-size: clamp(1.75rem, 5vw, 2.25rem);
  color: var(--brown-primary);
  letter-spacing: 0.06em;
}

.page-hero .updated {
  margin-top: 12px;
  font-size: 0.8125rem;
  color: var(--text-muted);
}

.legal-content {
  max-width: 720px;
  margin: 0 auto;
  padding: 48px 20px 64px;
}

.legal-content h2 {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  color: var(--brown-primary);
  margin: 36px 0 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--gold-light);
}

.legal-content h2:first-child {
  margin-top: 0;
}

.legal-content h3 {
  font-size: 1rem;
  color: var(--text-secondary);
  margin: 20px 0 8px;
}

.legal-content p,
.legal-content li {
  font-size: 0.9375rem;
  color: var(--text-secondary);
  margin-bottom: 12px;
}

.legal-content ul {
  padding-left: 1.25rem;
  margin-bottom: 16px;
}

.legal-content li {
  margin-bottom: 6px;
}

.legal-content a {
  color: var(--gold-deep);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.legal-content a:hover {
  color: var(--orange-warm);
}

.highlight-box {
  background: var(--surface-tint);
  border-left: 4px solid var(--orange-warm);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 16px 20px;
  margin: 20px 0;
}

.highlight-box p {
  margin-bottom: 0;
  font-weight: 500;
  color: var(--brown-primary);
}

/* ── Footer ── */

.site-footer {
  background: var(--brown-primary);
  color: rgba(255, 255, 255, 0.85);
  padding: 40px 20px;
  margin-top: auto;
}

.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  text-align: center;
}

.footer-brand {
  font-family: var(--font-serif);
  font-size: 1.125rem;
  color: var(--gold-light);
  letter-spacing: 0.1em;
}

.footer-dev {
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.65);
}

.footer-dev strong {
  color: #fff;
  font-weight: 600;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  justify-content: center;
}

.footer-links a {
  color: var(--gold-light);
  text-decoration: none;
  font-size: 0.8125rem;
  transition: color 0.2s;
}

.footer-links a:hover {
  color: #fff;
}

.footer-copy {
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.45);
}

/* ── Responsive ── */

@media (max-width: 600px) {
  .header-inner {
    flex-direction: column;
    align-items: flex-start;
  }

  .nav-links {
    width: 100%;
    justify-content: flex-start;
  }

  .hero {
    padding: 48px 20px 56px;
  }

  .hero-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .btn {
    width: 100%;
  }

  .section {
    padding: 40px 20px;
  }
}
