/* ============================================================
   TELANGANA SEO — Base Styles & Typography
   Depends on: tokens.css (must be loaded first)
   ============================================================ */

/* ----------------------------------------------------------
   FONT IMPORTS
---------------------------------------------------------- */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,500;0,600;0,700;1,400;1,600&family=DM+Sans:ital,opsz,wght@0,9..40,300;0,9..40,400;0,9..40,500;0,9..40,600;0,9..40,700;1,9..40,400&family=JetBrains+Mono:wght@400;500&display=swap');

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

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

body {
  font-family: var(--font-body);
  font-size: var(--text-base);
  font-weight: var(--weight-regular);
  line-height: var(--leading-relaxed);
  color: var(--color-neutral-700);
  background-color: var(--surface-page);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img, video, svg {
  display: block;
  max-width: 100%;
}

a {
  color: var(--color-brand-500);
  text-decoration: none;
  transition: color var(--duration-fast) var(--ease-out);
}
a:hover { color: var(--color-brand-600); }

button, input, select, textarea {
  font-family: inherit;
  font-size: inherit;
}

ul, ol { list-style: none; }

/* ----------------------------------------------------------
   TYPOGRAPHY — Semantic elements
---------------------------------------------------------- */

/* Display headings — use Playfair Display */
h1, h2 {
  font-family: var(--font-display);
  font-weight: var(--weight-semibold);
  line-height: var(--leading-tight);
  letter-spacing: var(--tracking-tight);
  color: var(--color-brand-900);
}

/* Sub-headings — use DM Sans */
h3, h4, h5, h6 {
  font-family: var(--font-body);
  font-weight: var(--weight-semibold);
  line-height: var(--leading-snug);
  color: var(--color-brand-800);
}

h1 { font-size: clamp(var(--text-4xl), 5vw, var(--text-6xl)); }
h2 { font-size: clamp(var(--text-3xl), 4vw, var(--text-5xl)); }
h3 { font-size: clamp(var(--text-xl), 2.5vw, var(--text-3xl)); }
h4 { font-size: var(--text-xl); }
h5 { font-size: var(--text-lg); }
h6 { font-size: var(--text-base); }

p {
  line-height: var(--leading-relaxed);
  color: var(--color-neutral-500);
  max-width: 68ch;  /* optimal reading width */
}

p.lead {
  font-size: var(--text-lg);
  color: var(--color-neutral-700);
  line-height: var(--leading-relaxed);
  max-width: 58ch;
}

strong { font-weight: var(--weight-semibold); color: var(--color-neutral-700); }

code, pre {
  font-family: var(--font-mono);
  font-size: 0.875em;
  background: var(--color-brand-50);
  border-radius: var(--radius-sm);
  padding: 0.1em 0.3em;
}

/* ----------------------------------------------------------
   LAYOUT UTILITIES
---------------------------------------------------------- */

.container {
  width: 100%;
  max-width: var(--container-xl);
  margin-inline: auto;
  padding-inline: var(--section-padding-x);
}

.container--narrow {
  max-width: var(--container-lg);
}

.container--wide {
  max-width: var(--container-2xl);
}

.section {
  padding-block: var(--section-padding-y);
}

.section--sm   { padding-block: var(--space-12); }
.section--lg   { padding-block: var(--space-32); }
.section--dark {
  background-color: var(--surface-dark);
  color: var(--color-neutral-300);
}
.section--tinted { background-color: var(--color-brand-50); }
.section--warm   { background-color: var(--color-accent-50); }

/* ----------------------------------------------------------
   GRID SYSTEM
---------------------------------------------------------- */

.grid {
  display: grid;
  gap: var(--space-6);
}

.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-auto { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }

/* Responsive grid collapse */
@media (max-width: 1024px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
}

/* ----------------------------------------------------------
   FLEXBOX UTILITIES
---------------------------------------------------------- */

.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.items-start  { align-items: flex-start; }
.justify-center  { justify-content: center; }
.justify-between { justify-content: space-between; }
.gap-2 { gap: var(--space-2); }
.gap-4 { gap: var(--space-4); }
.gap-6 { gap: var(--space-6); }
.gap-8 { gap: var(--space-8); }
.flex-wrap { flex-wrap: wrap; }

/* ----------------------------------------------------------
   TEXT UTILITIES
---------------------------------------------------------- */

.text-center  { text-align: center; }
.text-left    { text-align: left; }
.text-right   { text-align: right; }
.text-sm      { font-size: var(--text-sm); }
.text-lg      { font-size: var(--text-lg); }
.text-xl      { font-size: var(--text-xl); }
.text-muted   { color: var(--color-neutral-500); }
.text-accent  { color: var(--color-accent-500); }
.text-brand   { color: var(--color-brand-500); }
.text-display { font-family: var(--font-display); }
.font-medium  { font-weight: var(--weight-medium); }
.font-semibold{ font-weight: var(--weight-semibold); }

/* Section label — the small eyebrow text above headings */
.eyebrow {
  display: inline-block;
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  letter-spacing: var(--tracking-widest);
  text-transform: uppercase;
  color: var(--color-accent-500);
  margin-bottom: var(--space-3);
}

/* ----------------------------------------------------------
   SPACING UTILITIES
---------------------------------------------------------- */
.mt-2  { margin-top: var(--space-2); }
.mt-4  { margin-top: var(--space-4); }
.mt-6  { margin-top: var(--space-6); }
.mt-8  { margin-top: var(--space-8); }
.mt-12 { margin-top: var(--space-12); }
.mb-2  { margin-bottom: var(--space-2); }
.mb-4  { margin-bottom: var(--space-4); }
.mb-6  { margin-bottom: var(--space-6); }
.mb-8  { margin-bottom: var(--space-8); }
.py-4  { padding-block: var(--space-4); }
.py-8  { padding-block: var(--space-8); }

/* ----------------------------------------------------------
   ACCESSIBILITY
---------------------------------------------------------- */

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border-width: 0;
}

:focus-visible {
  outline: 2px solid var(--color-accent-500);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}

/* ----------------------------------------------------------
   SCROLLBAR (Chromium)
---------------------------------------------------------- */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: var(--color-neutral-300);
  border-radius: var(--radius-full);
}
::-webkit-scrollbar-thumb:hover { background: var(--color-brand-400); }

/* ----------------------------------------------------------
   SELECTION
---------------------------------------------------------- */
::selection {
  background: var(--color-accent-100);
  color: var(--color-brand-900);
}
