/* ============================================================
   AMAZING DEVYA — main.css
   Global reset + layout shell
   ============================================================ */

@import './design-system.css?v=7';
@import './components.css?v=7';


/* ── Reset ── */

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

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

body {
  font-family: var(--font-body);
  font-size: var(--text-base);
  color: var(--color-ink);
  background-color: var(--color-paper);
  background-image:
    /* Light paper grain */
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='400' height='400'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='4' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='400' height='400' filter='url(%23n)' opacity='0.025'/%3E%3C/svg%3E"),
    /* Horizontal ruled lines — warm-toned blue on cream */
    repeating-linear-gradient(
      to bottom,
      transparent,
      transparent 31px,
      rgba(100, 140, 200, 0.20) 31px,
      rgba(100, 140, 200, 0.20) 32px
    ),
    /* Red margin line */
    linear-gradient(
      to right,
      transparent 72px,
      rgba(220, 90, 70, 0.22) 72px,
      rgba(220, 90, 70, 0.22) 73px,
      transparent 73px
    );
  background-size: 400px 400px, auto, auto;
  min-height: 100vh;
  line-height: var(--leading-normal);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

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

ul, ol { list-style: none; }

button { font-family: inherit; }

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: var(--leading-snug);
  color: var(--color-ink);
}


/* ── Container ── */

.container {
  width: 100%;
  max-width: var(--container-xl);
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--space-8);
  padding-right: var(--space-8);
}

@media (max-width: 480px) {
  .container {
    padding-left: var(--space-4);
    padding-right: var(--space-4);
  }
}

.container--sm  { max-width: var(--container-sm); }
.container--md  { max-width: var(--container-md); }
.container--lg  { max-width: var(--container-lg); }
.container--2xl { max-width: var(--container-2xl); }


/* ── Page Wrapper ── */

.page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.page__main {
  flex: 1;
}


/* ── Visually Hidden (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: 0;
}


/* ── Focus Visible (keyboard nav) ── */

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


/* ── Utility: spacing helpers ── */

.mt-auto { margin-top: auto; }
.mb-auto { margin-bottom: auto; }
.mx-auto { margin-left: auto; margin-right: auto; }

.py-section {
  padding-top: var(--space-16);
  padding-bottom: var(--space-16);
}


/* ── Utility: flex/grid helpers ── */

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


/* ── Utility: text alignment ── */

.text-center { text-align: center; }
.text-left   { text-align: left; }
.text-right  { text-align: right; }


/* ── Utility: display ── */

.hidden { display: none !important; }


/* ── Page Transition Fade ── */

@keyframes page-fade-in {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}

.page__main {
  animation: page-fade-in 400ms ease both;
}


/* ── Selection color ── */

::selection {
  background: var(--color-marigold-light);
  color: var(--color-ink);
}


/* ── Scrollbar styling (webkit) ── */

::-webkit-scrollbar       { width: 8px; }
::-webkit-scrollbar-track { background: var(--color-paper-dark); }
::-webkit-scrollbar-thumb {
  background: var(--color-ink-faint);
  border-radius: var(--radius-full);
  border: 2px solid var(--color-paper-dark);
}
::-webkit-scrollbar-thumb:hover { background: var(--color-ink-light); }
