/* =============================================
   Athide — Main Stylesheet
   Design tokens derived from brand identity
   ============================================= */

/* --- Fonts (locally hosted variable font, no Google CDN) --- */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('/fonts/inter/inter-variable.woff2') format('woff2');
}

/* --- Design Tokens --- */
:root {
  --ath-blue: #1A2B3C;
  --ath-green: #1B7840;
  --ath-green-dark: #146433;
  --ath-white: #FFFFFF;
  --ath-text: #2D3748;
  --ath-bg: #F7F8FA;
  --ath-gradient: linear-gradient(135deg, #1A2B3C 0%, #146433 100%);
  --ath-shadow: 0 2px 8px rgba(26, 43, 60, 0.05);
  --ath-shadow-hover: 0 4px 16px rgba(26, 43, 60, 0.1);
  --ath-radius: 0;
  --ath-max-width: 1200px;
}

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

/* --- Base --- */
html {
  font-size: 16px;
  scroll-behavior: smooth;
}
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: var(--ath-text);
  background: var(--ath-white);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; }
a { color: var(--ath-green); text-decoration: none; }
a:hover { text-decoration: underline; }

/* --- Container --- */
.container {
  max-width: var(--ath-max-width);
  margin: 0 auto;
  padding: 0 2rem;
}

/* --- Navigation --- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--ath-blue);
}
.nav-container {
  max-width: var(--ath-max-width);
  margin: 0 auto;
  padding: 0 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}
.nav-logo svg,
.nav-logo img {
  display: block;
}
.nav-menu {
  list-style: none;
  display: flex;
  gap: 2rem;
}
.nav-menu a {
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.9rem;
  font-weight: 400;
  letter-spacing: 0.02em;
  transition: color 0.2s;
}
.nav-menu a:hover,
.nav-menu a.active {
  color: var(--ath-white);
  text-decoration: none;
}

/* --- Hero --- */
.hero {
  background: var(--ath-gradient);
  padding: clamp(2.5rem, 6vw, 4.5rem) 2rem;
}
.hero-content {
  max-width: var(--ath-max-width);
  margin: 0 auto;
  -webkit-font-smoothing: auto;
  -moz-osx-font-smoothing: auto;
}
.hero h1 {
  color: var(--ath-white);
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 2rem;
}
.hero-highlight {
  color: var(--ath-green);
  filter: brightness(1.4);
}
.hero-sub {
  color: #fff;
  font-size: clamp(1.05rem, 2.5vw, 1.15rem);
  line-height: 1.7;
  max-width: 640px;
  margin-bottom: 2rem;
}

/* --- Buttons --- */
.btn {
  display: inline-block;
  padding: 0.85rem 2rem;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  border: none;
  border-radius: var(--ath-radius);
  cursor: pointer;
  transition: background-color 0.2s, transform 0.1s;
}
.btn:hover { text-decoration: none; }
.btn-primary {
  background: var(--ath-green);
  color: var(--ath-white);
}
.btn-primary:hover {
  background: var(--ath-green-dark);
  transform: translateY(-1px);
}

/* --- Grid System --- */
.grid-3 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
}
.grid-4 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
}

/* --- Cards --- */
.card {
  padding: 2rem;
  border-radius: var(--ath-radius);
  transition: box-shadow 0.2s, transform 0.2s;
}
.card h3 {
  font-size: 1.25rem;
  margin-bottom: 0.75rem;
}
.card p {
  font-size: 0.95rem;
  line-height: 1.6;
}

/* White card (methodology) */
.card-white {
  background: var(--ath-white);
  border-top: 5px solid var(--ath-green);
  box-shadow: var(--ath-shadow);
}
.card-white:hover {
  box-shadow: var(--ath-shadow-hover);
  transform: translateY(-2px);
}
.card-white h3 {
  color: var(--ath-blue);
}

/* Dark card (expertise) */
.card-dark {
  background: var(--ath-blue);
  color: var(--ath-white);
  display: block;
}
.card-dark:hover {
  background: #223A4F;
  transform: translateY(-2px);
  text-decoration: none;
}
.card-dark h3 {
  color: var(--ath-white);
}
.card-dark p {
  color: rgba(255, 255, 255, 0.8);
}

/* Outline card (white bg, blue border) */
.card-outline {
  background: var(--ath-white);
  border: 3px solid var(--ath-blue);
  display: block;
}
.card-outline:hover {
  box-shadow: var(--ath-shadow-hover);
  transform: translateY(-2px);
  text-decoration: none;
}
.card-outline h3 {
  color: var(--ath-blue);
}
.card-outline p {
  color: var(--ath-text);
}

/* --- Sections --- */
.methodology {
  background: var(--ath-bg);
  padding: 5rem 2rem;
}
.expertise {
  padding: 5rem 2rem;
}
.expertise h2 {
  color: var(--ath-blue);
  font-size: 1.75rem;
  margin-bottom: 2rem;
}
.expertise-layout {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 2rem;
  align-items: start;
}
.expertise-sidebar {
  padding: 2rem;
}
.expertise-sidebar h3 {
  color: var(--ath-blue);
  margin-bottom: 0.5rem;
}
.expertise-sidebar p {
  color: var(--ath-text);
  font-size: 0.95rem;
}

/* --- Latest Articles --- */
.latest-articles {
  background: var(--ath-bg);
  padding: 5rem 2rem;
}
.latest-articles h2 {
  color: var(--ath-blue);
  font-size: 1.75rem;
  margin-bottom: 2rem;
}
.article-list {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}
.article-item {
  padding-bottom: 1.5rem;
  border-bottom: 1px solid #E2E8F0;
}
.article-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}
.article-item h2,
.article-item h3 {
  color: var(--ath-blue);
  font-size: 1.15rem;
  margin-bottom: 0.25rem;
}
.article-item h2 a,
.article-item h3 a {
  color: var(--ath-blue);
}
.article-item h2 a:hover,
.article-item h3 a:hover {
  color: var(--ath-green);
}
.article-item time {
  font-size: 0.8rem;
  color: #636e7f;
  display: block;
  margin-bottom: 0.5rem;
}
.article-item p {
  font-size: 0.95rem;
  margin-bottom: 0.5rem;
}
.read-more {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--ath-green);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

/* --- Page Content --- */
.page-content {
  padding: 4rem 0;
}
.page-header {
  margin-bottom: 2rem;
}
.page-header h1 {
  color: var(--ath-blue);
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  line-height: 1.3;
}
.page-header time {
  font-size: 0.85rem;
  color: #636e7f;
  display: block;
  margin-top: 0.5rem;
}
.page-body h2 {
  color: var(--ath-blue);
  font-size: 1.5rem;
  margin: 2.5rem 0 1rem;
}
.page-body h3 {
  color: var(--ath-blue);
  font-size: 1.2rem;
  margin: 2rem 0 0.75rem;
}
.page-body p {
  margin-bottom: 1rem;
}
.page-body ul, .page-body ol {
  margin: 0 0 1rem 1.5rem;
}
.page-body li {
  margin-bottom: 0.35rem;
}
.page-body table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  font-size: 0.9rem;
}
.page-body th {
  background: var(--ath-blue);
  color: var(--ath-white);
  padding: 0.75rem 1rem;
  text-align: left;
}
.page-body td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid #E2E8F0;
}
.page-body strong {
  color: var(--ath-blue);
}
.page-body blockquote {
  border-left: 4px solid var(--ath-green);
  background: #f9f9f9;
  padding: 1rem 1.5rem;
  margin: 1.5rem 0;
}

/* --- Footer --- */
.site-footer {
  background: var(--ath-blue);
  color: rgba(255, 255, 255, 0.6);
  padding: 2rem;
  text-align: center;
  font-size: 0.85rem;
}

/* --- Responsive --- */
@media (max-width: 768px) {
  .nav-menu {
    gap: 1rem;
  }
  .nav-menu a {
    font-size: 0.8rem;
  }
  .grid-3 {
    grid-template-columns: 1fr;
  }
  .grid-4 {
    grid-template-columns: 1fr;
  }
}

/* --- Print --- */
@media print {
  .site-header, .site-footer, .btn { display: none; }
  .hero { background: none; color: #000; padding: 1rem 0; }
  .hero h1, .hero-highlight { color: #000; }
  body { font-size: 12pt; }
}

/* --- Accessibility --- */
:focus-visible {
  outline: 3px solid var(--ath-green);
  outline-offset: 2px;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}
