/* ==========================================================================
   Base: design tokens, reset, page background, utilities and animations.
   Load order on every page: base.css → components.css → <page>.css
   ========================================================================== */

/* ---------- Design tokens ---------- */

:root {
  --font-sans: "Plus Jakarta Sans", "Noto Sans Telugu", ui-sans-serif, system-ui, sans-serif,
    "Apple Color Emoji", "Noto Color Emoji", "Segoe UI Emoji";
  --font-emoji: "Apple Color Emoji", "Noto Color Emoji", "Segoe UI Emoji", sans-serif;

  --canvas: #f6f8f5;

  --brand-50: #ecfdf3;
  --brand-100: #d1fadf;
  --brand-200: #a6f4c5;
  --brand-400: #32d583;
  --brand-500: #12b76a;
  --brand-600: #039855;

  --slate-50: #f8fafc;
  --slate-100: #f1f5f9;
  --slate-200: #e2e8f0;
  --slate-400: #94a3b8;
  --slate-500: #64748b;
  --slate-600: #475569;
  --slate-700: #334155;
  --slate-800: #1e293b;
  --slate-900: #0f172a;

  /* Hairline borders drawn as box-shadow rings */
  --ring-faint: 0 0 0 1px rgb(15 23 42 / 0.05);
  --ring: 0 0 0 1px rgb(15 23 42 / 0.06);
  --ring-strong: 0 0 0 1px rgb(15 23 42 / 0.08);
  --ring-black: 0 0 0 1px rgb(0 0 0 / 0.05);

  --shadow-soft: 0 1px 2px 0 rgb(16 24 40 / 0.04), 0 1px 3px 0 rgb(16 24 40 / 0.06);
  --shadow-card: 0 1px 2px 0 rgb(16 24 40 / 0.04), 0 10px 28px -14px rgb(16 24 40 / 0.16);
  --shadow-lift: 0 2px 6px -2px rgb(16 24 40 / 0.06), 0 28px 56px -20px rgb(16 24 40 / 0.28);
  --shadow-inset-top: inset 0 1px 0 rgb(255 255 255 / 0.35);

  --ease: cubic-bezier(0.4, 0, 0.2, 1);
  --ease-out: cubic-bezier(0, 0, 0.2, 1);
  --ease-out-expo: cubic-bezier(0.22, 1, 0.36, 1);

  --container-width: 1400px;
  --gutter: 1.5rem;

  /* Breakpoints used below: 640px (sm), 768px (md), 1024px (lg), 1280px (xl), 1536px (2xl) */
}

/* ---------- Reset ---------- */

*,
*::before,
*::after {
  box-sizing: border-box;
  border: 0 solid var(--slate-200);
}

html {
  line-height: 1.5;
  -webkit-text-size-adjust: 100%;
  tab-size: 4;
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

body,
h1, h2, h3, h4, h5, h6,
p, ol, ul, figure, blockquote {
  margin: 0;
}

h1, h2, h3, h4, h5, h6 {
  font-size: inherit;
  font-weight: inherit;
}

ol,
ul {
  list-style: none;
  padding: 0;
}

a {
  color: inherit;
  text-decoration: inherit;
}

img,
svg {
  display: block;
  vertical-align: middle;
}

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

button,
input {
  font: inherit;
  color: inherit;
  margin: 0;
  padding: 0;
  background: transparent;
}

button {
  cursor: pointer;
}

input::placeholder {
  opacity: 1;
  color: var(--slate-400);
}

[type="search"] {
  -webkit-appearance: textfield;
  appearance: textfield;
  outline-offset: -2px;
}

::-webkit-search-decoration {
  -webkit-appearance: none;
}

kbd {
  font-family: var(--font-sans);
}

[hidden] {
  display: none !important;
}

/* ---------- Page ---------- */

/* Soft green and amber glow across the top of every page */
body {
  min-height: 100vh;
  font-family: var(--font-sans);
  color: var(--slate-800);
  background-color: var(--canvas);
  background-image:
    radial-gradient(60rem 38rem at -5% -12%, rgb(18 183 106 / 0.13), transparent 62%),
    radial-gradient(50rem 34rem at 105% -8%, rgb(245 158 11 / 0.1), transparent 60%);
  background-repeat: no-repeat;
}

::selection {
  background: rgb(18 183 106 / 0.2);
}

:focus-visible {
  outline: 2px solid var(--brand-500);
  outline-offset: 3px;
}

.container {
  max-width: var(--container-width);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.noscript {
  max-width: 32rem;
  margin: 4rem auto;
  padding: 1.5rem;
  border-radius: 1rem;
  background: #fff;
  box-shadow: var(--shadow-card), var(--ring);
  text-align: center;
}

/* ---------- Icons (see assets/js/components/icon.js) ---------- */

.icon {
  display: block;
  flex-shrink: 0;
  width: 1.25rem;
  height: 1.25rem;
}

.icon--xs  { width: 0.875rem; height: 0.875rem; }
.icon--sm  { width: 1rem;     height: 1rem; }
.icon--md  { width: 1.25rem;  height: 1.25rem; }
.icon--lg  { width: 22px;     height: 22px; }
.icon--xl  { width: 1.75rem;  height: 1.75rem; }
.icon--2xl { width: 2rem;     height: 2rem; }

/* ---------- Utilities ---------- */

.font-emoji {
  font-family: var(--font-emoji);
}

.truncate {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.line-clamp-2 {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
}

.bg-dots {
  background-image: radial-gradient(rgb(15 23 42 / 0.09) 1px, transparent 1px);
  background-size: 18px 18px;
}

.bg-dots-light {
  background-image: radial-gradient(rgb(255 255 255 / 0.22) 1px, transparent 1px);
  background-size: 18px 18px;
}

.mask-fade-b {
  -webkit-mask-image: linear-gradient(to bottom, #000 25%, transparent);
  mask-image: linear-gradient(to bottom, #000 25%, transparent);
}

.scrollbar-none {
  scrollbar-width: none;
}

.scrollbar-none::-webkit-scrollbar {
  display: none;
}

/* ---------- Animations ---------- */

/* Keyframes use the standalone `translate` property so they never
   override the `transform`-based hover lifts. */
@keyframes fade-up {
  0%   { opacity: 0; translate: 0 12px; }
  100% { opacity: 1; translate: 0 0; }
}

@keyframes float {
  0%, 100% { translate: 0 0; }
  50%      { translate: 0 -7px; }
}

@keyframes ping {
  75%, 100% { transform: scale(2); opacity: 0; }
}

@media (prefers-reduced-motion: no-preference) {
  .animate-fade-up {
    animation: fade-up 0.6s var(--ease-out-expo) both;
  }

  .animate-float {
    animation: float 6s ease-in-out infinite;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
