@import "tailwindcss";

@theme {
  --color-bg: #FFFFFF;
  --color-surface: #FFFFFF;
  --color-text: #334155;
  --color-primary: #172554;
  --color-accent: #F97316;
  --color-muted: #64748B;
  --color-border: #E2E8F0;
  --color-ink-60: rgba(51, 65, 85, 0.72);
  --color-ink-40: rgba(51, 65, 85, 0.48);
  --color-line: rgba(23, 37, 84, 0.12);
  --color-accent-hover: #EA580C;
  --font-display: "Inter", system-ui, sans-serif;
  --font-body: "Inter", system-ui, sans-serif;
  --radius-pv: 8px;
  --container-page: 1240px;
  --max-width-page: 1240px;
  --max-width-dashboard: 68rem;
  --width-sidebar: 14.5rem;
  --shadow-pv: 0 1px 2px rgba(23, 37, 84, 0.04);
  --breakpoint-nav: 1080px;
  --spacing-header: 70px;
  --height-dashboard-header: 60px;
}

@custom-variant in (&:is(.in));
@custom-variant open (&:is(.is-open));
@custom-variant pressed (&[aria-pressed="true"]);

@layer base {
  html {
    scroll-behavior: smooth;
  }

  body {
    @apply m-0 bg-bg font-body text-[17px] leading-[1.55] text-text antialiased;
  }

  img {
    @apply block max-w-full;
  }

  a {
    @apply text-inherit no-underline;
  }

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

  input,
  select,
  textarea {
    @apply text-sm;
  }

  input::placeholder,
  textarea::placeholder {
    @apply text-sm text-ink-40;
  }

  :focus-visible {
    @apply rounded outline-2 outline-offset-[3px] outline-accent;
  }

  #how,
  #why,
  #paid-posts,
  #creators,
  #pricing,
  #analytics,
  #rate-card,
  #portfolio,
  #get-started {
    scroll-margin-top: calc(var(--spacing-header) + 12px);
  }

  nav ul,
  footer ul {
    @apply m-0 list-none p-0;
  }

  h1,
  h2,
  h3,
  h4,
  h5,
  h6 {
    @apply m-0 font-display font-semibold tracking-[-0.028em] text-primary;
    line-height: 1.02;
  }

  h1 {
    font-size: clamp(2.7rem, 6.4vw, 4.6rem);
  }

  h2 {
    font-size: clamp(2rem, 4.2vw, 3.1rem);
  }

  h3 {
    @apply text-[1.28rem] leading-[1.2] tracking-[-0.02em];
  }

  p {
    @apply m-0;
  }

  h1 em {
    @apply not-italic text-accent;
  }

  select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%23172554' stroke-width='1.5'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='m19.5 8.25-7.5 7.5-7.5-7.5'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 16px;
  }
}

@font-face {
  font-family: "Inter";
  src: url("https://rsms.me/inter/font-files/InterVariable.woff2?v=4.1") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Inter";
  src: url("https://rsms.me/inter/font-files/InterVariable-Italic.woff2?v=4.1") format("woff2");
  font-weight: 100 900;
  font-style: italic;
  font-display: swap;
}

@keyframes slide {
  to {
    transform: translateX(-50%);
  }
}

@layer utilities {
  .rv {
    opacity: 0;
    transform: translateY(18px);
    transition: opacity 0.6s ease, transform 0.6s cubic-bezier(0.2, 0.7, 0.3, 1);
  }

  .rv.in {
    opacity: 1;
    transform: none;
  }

  .bar i {
    display: block;
    height: 100%;
    transform-origin: left;
    transform: scaleX(0);
    border-radius: 99px;
    background: var(--color-accent);
    transition: transform 1.1s cubic-bezier(0.2, 0.7, 0.3, 1);
  }

  .in .bar i {
    transform: scaleX(1);
  }

  .group\/strip:hover .track,
  .group\/strip:focus-within .track {
    animation-play-state: paused;
  }
}

@utility track {
  display: flex;
  width: max-content;
  animation: slide 52s linear infinite;
}

@utility btn {
  display: inline-flex;
  height: 2.75rem;
  max-height: 2.75rem;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-pv);
  padding-inline: 1.35rem;
  font-size: 0.97rem;
  font-weight: 600;
  transition-property: color, background-color, border-color;
  transition-duration: 150ms;
}

@utility btn-primary {
  background-color: var(--color-accent);
  color: #fff;
}

@utility btn-primary {
  &:hover {
    background-color: var(--color-accent-hover);
  }
}

@utility btn-secondary {
  border: 1.5px solid var(--color-line);
  color: var(--color-primary);
}

@utility btn-secondary {
  &:hover {
    border-color: var(--color-primary);
  }
}

@layer components {
  .socials {
    display: flex;
    flex-wrap: nowrap;
    gap: 0;
    margin: 1.15rem 0 0;
    padding: 0;
    list-style: none;
    overflow-x: auto;
    border-bottom: 1px solid var(--color-line);
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
  }

  .socials li {
    flex: 0 0 auto;
  }

  .socials button {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.7rem 0.95rem 0.85rem;
    border: 0;
    border-bottom: 3px solid transparent;
    border-radius: 0;
    background: transparent;
    color: var(--color-ink-40);
    white-space: nowrap;
    font-size: 0.95rem;
    font-weight: 500;
    transition:
      color 150ms ease,
      border-color 150ms ease;
  }

  .socials button:hover {
    color: var(--color-primary);
  }

  .socials button[aria-selected="true"] {
    color: var(--color-accent);
    border-bottom-color: var(--color-accent);
    font-weight: 600;
  }

  .soc-ico {
    display: inline-flex;
    flex-shrink: 0;
    align-items: center;
    justify-content: center;
    width: 1.15rem;
    height: 1.15rem;
  }

  .soc-ico svg {
    display: block;
    width: 1.05rem;
    height: 1.05rem;
  }

  .soc-ico.ig {
    color: currentColor;
  }

  .soc-ico.tt {
    color: currentColor;
  }

  .soc-ico.x {
    color: currentColor;
  }

  .soc-ico.fb {
    color: currentColor;
  }

  .soc-ico.li {
    color: currentColor;
  }

  .soc-label {
    display: inline-flex;
    min-width: 0;
    align-items: baseline;
    gap: 0.35rem;
    line-height: 1.15;
  }

  .soc-label > span:first-child {
    font-size: 0.95rem;
    font-weight: inherit;
    color: inherit;
  }

  .socials button[aria-selected="true"] .soc-label > span:first-child {
    color: inherit;
  }

  .soc-label .num {
    font-size: 0.95rem;
    font-weight: inherit;
    color: inherit;
    font-variant-numeric: tabular-nums;
  }
}

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

  .rv {
    opacity: 1;
    transform: none;
  }

  .bar i {
    transform: scaleX(1);
  }

  .group\/strip:hover .track {
    animation: none;
  }
}
