/* ============================================
   STUDY PARTNER — Base & Reset
   ============================================ */

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

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

body {
  font-family: var(--ff-body);
  font-size: var(--fs-base);
  font-weight: var(--fw-regular);
  line-height: var(--lh-normal);
  color: var(--clr-text);
  background-color: var(--clr-cream);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

/* Grain texture overlay */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9999;
  opacity: 0.025;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 256px 256px;
}

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

a {
  color: inherit;
  text-decoration: none;
  transition: color var(--dur-fast) var(--ease-out);
}

button {
  font: inherit;
  border: none;
  cursor: pointer;
  background: none;
  color: inherit;
}

ul, ol {
  list-style: none;
}

input, textarea {
  font: inherit;
  border: none;
  outline: none;
  background: none;
}

/* ── Typography ── */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--ff-heading);
  font-weight: var(--fw-bold);
  line-height: var(--lh-tight);
  letter-spacing: var(--ls-tight);
  color: var(--clr-primary);
}

h1 { font-size: var(--fs-5xl); }
h2 { font-size: var(--fs-3xl); }
h3 { font-size: var(--fs-xl);  }
h4 { font-size: var(--fs-lg);  }

p {
  color: var(--clr-text-light);
  line-height: var(--lh-normal);
}

/* ── Container ── */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--sp-6);
}

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

/* ── Section ── */
.section {
  padding: var(--sp-24) 0;
}

.section__label {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  font-family: var(--ff-heading);
  font-size: var(--fs-sm);
  font-weight: var(--fw-semibold);
  text-transform: uppercase;
  letter-spacing: var(--ls-wider);
  color: var(--clr-accent-dark);
  margin-bottom: var(--sp-4);
}

.section__label::before {
  content: '';
  display: inline-block;
  width: 24px;
  height: 2px;
  background: var(--clr-accent);
  border-radius: var(--radius-full);
}

.section__title {
  font-size: var(--fs-3xl);
  margin-bottom: var(--sp-4);
}

.section__subtitle {
  font-size: var(--fs-md);
  color: var(--clr-text-light);
  max-width: 580px;
}

.section__header {
  margin-bottom: var(--sp-16);
}

.section__header--center {
  text-align: center;
}

.section__header--center .section__subtitle {
  margin: 0 auto;
}

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-2);
  font-family: var(--ff-heading);
  font-size: var(--fs-sm);
  font-weight: var(--fw-semibold);
  padding: var(--sp-3) var(--sp-6);
  border-radius: var(--radius-full);
  transition: all var(--dur-normal) var(--ease-out);
  white-space: nowrap;
  position: relative;
  overflow: hidden;
}

.btn::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  opacity: 0;
  transition: opacity var(--dur-fast) var(--ease-out);
  background: linear-gradient(135deg, rgba(255,255,255,0.15), transparent);
}

.btn:hover::after {
  opacity: 1;
}

.btn--primary {
  background: var(--clr-accent);
  color: var(--clr-primary);
  box-shadow: var(--shadow-sm);
}

.btn--primary:hover {
  background: var(--clr-accent-light);
  box-shadow: var(--shadow-glow-accent);
  transform: translateY(-2px);
}

.btn--secondary {
  background: transparent;
  color: var(--clr-primary);
  border: 1.5px solid var(--clr-border);
}

.btn--secondary:hover {
  border-color: var(--clr-primary);
  background: var(--clr-primary);
  color: var(--clr-white);
  transform: translateY(-2px);
}

.btn--white {
  background: var(--clr-white);
  color: var(--clr-primary);
  box-shadow: var(--shadow-sm);
}

.btn--white:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.btn--lg {
  font-size: var(--fs-base);
  padding: var(--sp-4) var(--sp-8);
}

.btn--sm {
  font-size: var(--fs-xs);
  padding: var(--sp-2) var(--sp-4);
}

/* ── Scroll Reveal ── */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity var(--dur-slow) var(--ease-out),
              transform var(--dur-slow) var(--ease-out);
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal--delay-1 { transition-delay: 100ms; }
.reveal--delay-2 { transition-delay: 200ms; }
.reveal--delay-3 { transition-delay: 300ms; }
.reveal--delay-4 { transition-delay: 400ms; }
.reveal--delay-5 { transition-delay: 500ms; }
.reveal--delay-6 { transition-delay: 600ms; }

/* ── Responsive Typography ── */
@media (max-width: 1199px) {
  h1 { font-size: var(--fs-4xl); }
  h2 { font-size: var(--fs-2xl); }
  .section__title { font-size: var(--fs-2xl); }
}

@media (max-width: 767px) {
  html { font-size: 15px; }
  h1 { font-size: var(--fs-2xl); }
  h2 { font-size: var(--fs-xl);  }
  .section { padding: var(--sp-16) 0; }
  .section__title { font-size: var(--fs-xl); }
  .container { padding: 0 var(--sp-4); }
}

/* ── Selection ── */
::selection {
  background: var(--clr-accent);
  color: var(--clr-primary);
}

/* ── Scrollbar ── */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: var(--clr-cream);
}

::-webkit-scrollbar-thumb {
  background: var(--clr-border);
  border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--clr-text-muted);
}
