/* ============================================================
   Sayounara SEO — Global Stylesheet
   Japanese-inspired minimalist design
   ============================================================ */

/* --- Google Fonts --- */
@import url('https://fonts.googleapis.com/css2?family=Noto+Serif+JP:wght@400;600;700&family=Inter:wght@400;500;600&display=swap');

/* --- CSS Custom Properties --- */
:root {
  --red:        #BC002D;
  --red-hover:  #9a0025;
  --charcoal:   #1a1a1a;
  --mid-grey:   #555555;
  --light-grey: #f5f5f5;
  --border:     #e0e0e0;
  --white:      #ffffff;

  --font-heading: 'Noto Serif JP', 'Times New Roman', serif;
  --font-body:    'Inter', system-ui, sans-serif;

  --max-width:  720px;
  --nav-height: 60px;
}

/* --- Reset & Base --- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

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

body {
  font-family: var(--font-body);
  color: var(--charcoal);
  background: var(--white);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

a {
  color: var(--red);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover,
a:focus {
  color: var(--red-hover);
  text-decoration: underline;
}

/* --- Skip Link --- */
.skip-link {
  position: absolute;
  top: -40px;
  left: 0;
  background: var(--red);
  color: var(--white);
  padding: 8px 16px;
  z-index: 1000;
  font-size: 0.875rem;
  border-radius: 0 0 4px 0;
  transition: top 0.2s;
}

.skip-link:focus {
  top: 0;
  text-decoration: none;
}

/* --- Navigation --- */
header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--white);
  border-bottom: 2px solid var(--red);
  height: var(--nav-height);
}

.nav-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.site-logo {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--charcoal);
  white-space: nowrap;
  letter-spacing: -0.01em;
  flex-shrink: 0;
}

.site-logo span {
  color: var(--red);
}

.site-logo:hover {
  color: var(--charcoal);
  text-decoration: none;
}

nav ul {
  list-style: none;
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

nav a {
  color: var(--charcoal);
  font-size: 0.8125rem;
  font-weight: 500;
  padding: 6px 10px;
  border-radius: 3px;
  white-space: nowrap;
  transition: background 0.15s ease, color 0.15s ease;
}

nav a:hover,
nav a:focus {
  background: var(--red);
  color: var(--white);
  text-decoration: none;
}

nav a[aria-current="page"] {
  background: var(--light-grey);
  color: var(--red);
  font-weight: 600;
}

/* --- Hero / Page Hero --- */
.page-hero {
  background: var(--light-grey);
  border-bottom: 1px solid var(--border);
  padding: 56px 24px 48px;
  text-align: center;
}

.page-hero .hero-tag {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--red);
  margin-bottom: 16px;
}

.page-hero h1 {
  font-family: var(--font-heading);
  font-size: clamp(1.6rem, 4vw, 2.6rem);
  font-weight: 700;
  line-height: 1.25;
  color: var(--charcoal);
  max-width: 760px;
  margin: 0 auto 20px;
  letter-spacing: -0.02em;
}

.page-hero .hero-meta {
  font-size: 0.875rem;
  color: var(--mid-grey);
}

/* --- Main Content --- */
main {
  padding: 56px 24px 80px;
}

.content-wrap {
  max-width: var(--max-width);
  margin: 0 auto;
}

/* --- Typography --- */
h2 {
  font-family: var(--font-heading);
  font-size: clamp(1.2rem, 2.5vw, 1.5rem);
  font-weight: 700;
  color: var(--charcoal);
  margin-top: 48px;
  margin-bottom: 16px;
  line-height: 1.3;
  letter-spacing: -0.015em;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}

h3 {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--charcoal);
  margin-top: 32px;
  margin-bottom: 12px;
  line-height: 1.4;
}

p {
  margin-bottom: 20px;
  font-size: 1rem;
  color: var(--charcoal);
}

p:last-child {
  margin-bottom: 0;
}

ul, ol {
  margin-bottom: 20px;
  padding-left: 24px;
}

li {
  margin-bottom: 8px;
  line-height: 1.7;
}

strong {
  font-weight: 600;
  color: var(--charcoal);
}

/* --- Callout Box --- */
.callout {
  background: #fff5f7;
  border-left: 4px solid var(--red);
  border-radius: 0 4px 4px 0;
  padding: 20px 24px;
  margin: 32px 0;
}

.callout p {
  margin: 0;
  font-size: 0.9375rem;
  color: var(--charcoal);
}

/* --- Key Points / Card Grid --- */
.key-points {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  margin: 32px 0;
}

.key-point-card {
  background: var(--light-grey);
  border-radius: 6px;
  padding: 20px 22px;
}

.key-point-card h3 {
  margin-top: 0;
  font-size: 0.9375rem;
  margin-bottom: 8px;
}

.key-point-card p {
  margin: 0;
  font-size: 0.875rem;
  color: var(--mid-grey);
}

@media (min-width: 540px) {
  .key-points {
    grid-template-columns: 1fr 1fr;
  }
}

/* --- Related Articles --- */
.related-articles {
  margin-top: 64px;
  padding-top: 32px;
  border-top: 1px solid var(--border);
}

.related-articles h2 {
  font-size: 1.1rem;
  margin-top: 0;
  border-bottom: none;
  padding-bottom: 0;
  margin-bottom: 20px;
  letter-spacing: 0;
}

.related-list {
  list-style: none;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.related-list li {
  margin: 0;
}

.related-list a {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  background: var(--light-grey);
  border-radius: 6px;
  transition: background 0.15s ease;
  text-decoration: none;
}

.related-list a:hover {
  background: #ebebeb;
  text-decoration: none;
}

.related-list .arrow {
  color: var(--red);
  font-size: 1rem;
  flex-shrink: 0;
  margin-top: 1px;
}

.related-list .link-text {
  font-size: 0.9rem;
  color: var(--charcoal);
  font-weight: 500;
  line-height: 1.4;
}

/* --- Footer --- */
footer {
  background: var(--charcoal);
  color: #ccc;
  padding: 40px 24px;
  text-align: center;
}

.footer-inner {
  max-width: 1100px;
  margin: 0 auto;
}

footer p {
  font-size: 0.8125rem;
  color: #999;
  margin-bottom: 8px;
}

footer a {
  color: #ccc;
  font-size: 0.8125rem;
}

footer a:hover {
  color: var(--white);
}

.footer-nav {
  list-style: none;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 4px 16px;
  margin-bottom: 24px;
}

.footer-nav a {
  font-size: 0.8125rem;
  color: #aaa;
}

.footer-nav a:hover {
  color: var(--white);
  text-decoration: none;
}

/* --- Responsive adjustments --- */
@media (max-width: 600px) {
  .nav-inner {
    padding: 0 16px;
  }

  nav ul {
    gap: 2px;
  }

  nav a {
    font-size: 0.75rem;
    padding: 5px 8px;
  }

  main {
    padding: 40px 16px 64px;
  }

  .page-hero {
    padding: 40px 16px 36px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    transition: none !important;
    animation: none !important;
  }
}
