/* ============================================================
   SYSNOT Master Theme — components.css
   Reusable UI Components
   ============================================================ */

/* ----------------------------------------------------------
   1. Buttons — Shared Base
   ---------------------------------------------------------- */

.btn-main,
.btn-out,
.btn-ghost,
.btn-hdr {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .6rem;
  font-family: var(--body);
  font-weight: 600;
  font-size: .88rem;
  letter-spacing: .04em;
  text-decoration: none;
  cursor: pointer;
  transition: all .35s var(--e1);
  position: relative;
  white-space: nowrap;
}

/* --- Primary Button --- */

.btn-main {
  background: linear-gradient(135deg, var(--a1), color-mix(in srgb, var(--a1) 65%, white));
  color: #fff;
  border: none;
  border-radius: var(--radius-full);
  padding: .85rem 2.2rem;
  overflow: hidden;
  z-index: 1;
}

.btn-main::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(
    105deg,
    transparent 30%,
    rgba(255, 255, 255, .2) 50%,
    transparent 70%
  );
  transform: translateX(-120%);
  transition: transform .6s var(--e1);
  z-index: -1;
}

.btn-main:hover {
  transform: translateY(-4px) scale(1.02);
  box-shadow:
    0 16px 48px rgba(123, 94, 167, .35),
    0 4px 12px rgba(123, 94, 167, .2);
}

.btn-main:hover::before {
  transform: translateX(120%);
}

.btn-main:active {
  transform: translateY(-2px) scale(1);
}

/* --- Outline Button --- */

.btn-out {
  background: transparent;
  color: var(--txt);
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: var(--radius-full);
  padding: .85rem 2.2rem;
}

.btn-out:hover {
  border-color: var(--a1);
  color: var(--txt);
  transform: translateY(-4px);
  box-shadow: 0 12px 36px rgba(123, 94, 167, .15);
}

.btn-out:active {
  transform: translateY(-2px);
}

[data-theme="light"] .btn-out {
  border-color: rgba(0, 0, 0, .12);
}

[data-theme="light"] .btn-out:hover {
  border-color: var(--a1);
}

/* --- Ghost Button --- */

.btn-ghost {
  background: transparent;
  border: none;
  color: var(--a1);
  padding: .6rem .2rem;
}

.btn-ghost:hover {
  text-decoration: underline;
  text-underline-offset: 4px;
}

/* --- Header Button --- */

.btn-hdr {
  font-size: .78rem;
  padding: .55rem 1.5rem;
  border: 1px solid var(--a1);
  border-radius: var(--radius-full);
  background: transparent;
  color: var(--a1);
}

.btn-hdr:hover {
  background: var(--a1);
  color: #fff;
  box-shadow: 0 8px 28px rgba(123, 94, 167, .35);
}

.btn-hdr:active {
  transform: scale(.97);
}

/* ----------------------------------------------------------
   2. Cards
   ---------------------------------------------------------- */

.card {
  background: var(--sur);
  border: 1px solid var(--brd);
  border-radius: var(--radius);
  overflow: hidden;
  position: relative;
  transition:
    transform .45s var(--e1),
    border-color .45s var(--e1),
    box-shadow .45s var(--e1);
}

.card:hover {
  transform: translateY(-12px);
  border-color: rgba(123, 94, 167, .4);
  box-shadow: 0 32px 80px rgba(0, 0, 0, .5);
}

[data-theme="light"] .card:hover {
  box-shadow: 0 32px 80px rgba(0, 0, 0, .1);
}

.card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(
    600px circle at var(--mx, 50%) var(--my, 50%),
    rgba(123, 94, 167, .08),
    transparent 60%
  );
  opacity: 0;
  transition: opacity .45s var(--e1);
  pointer-events: none;
  z-index: 1;
}

.card:hover::before {
  opacity: 1;
}

.card::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--a1), var(--a2));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .45s var(--e1);
  z-index: 2;
}

.card:hover::after {
  transform: scaleX(1);
}

/* ----------------------------------------------------------
   3. Badges / Tags
   ---------------------------------------------------------- */

.tag {
  display: inline-block;
  font-family: var(--body);
  font-size: .65rem;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  padding: .22rem .7rem;
  background: rgba(123, 94, 167, .08);
  border: 1px solid rgba(123, 94, 167, .2);
  border-radius: var(--radius-full);
  color: var(--mut);
  transition: all .3s var(--e1);
  white-space: nowrap;
}

.tag:hover {
  background: rgba(123, 94, 167, .16);
  color: var(--txt);
  border-color: rgba(123, 94, 167, .35);
}

/* ----------------------------------------------------------
   4. Section Headers
   ---------------------------------------------------------- */

.section-label,
.slbl {
  display: inline-flex;
  align-items: center;
  gap: .7rem;
  font-family: var(--body);
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--a1);
  margin-bottom: 1.2rem;
}

.section-label::before,
.slbl::before {
  content: '';
  display: inline-block;
  width: 18px;
  height: 2px;
  background: var(--a1);
  border-radius: 2px;
  flex-shrink: 0;
}

.section-title,
.stitle {
  font-family: var(--head);
  font-size: clamp(3rem, 5.5vw, 5.5rem);
  line-height: .92;
  letter-spacing: .01em;
  color: var(--txt);
  text-wrap: balance;
  margin-bottom: 1.5rem;
}

.section-subtitle,
.ssub {
  font-family: var(--body);
  font-size: .95rem;
  color: var(--mut);
  max-width: 340px;
  line-height: 1.85;
}

/* ----------------------------------------------------------
   5. Form Inputs
   ---------------------------------------------------------- */

input[type="text"],
input[type="email"],
input[type="tel"],
input[type="url"],
input[type="password"],
input[type="search"],
input[type="number"],
textarea,
select {
  display: block;
  width: 100%;
  background: var(--sur);
  border: 1px solid var(--brd);
  border-radius: var(--radius-sm);
  padding: 1rem 1.3rem;
  color: var(--txt);
  font-family: var(--body);
  font-size: .9rem;
  line-height: 1.5;
  transition:
    border-color .3s var(--e1),
    box-shadow .3s var(--e1);
  -webkit-appearance: none;
  appearance: none;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="tel"]:focus,
input[type="url"]:focus,
input[type="password"]:focus,
input[type="search"]:focus,
input[type="number"]:focus,
textarea:focus,
select:focus {
  border-color: var(--a1);
  box-shadow: 0 0 0 3px rgba(123, 94, 167, .15);
  outline: none;
}

input::placeholder,
textarea::placeholder {
  color: var(--mut);
  opacity: 1;
}

textarea {
  resize: vertical;
  min-height: 140px;
}

select {
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1.5L6 6.5L11 1.5' stroke='%2355556A' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1.3rem center;
  padding-right: 3rem;
}

/* ----------------------------------------------------------
   6. Pill Badge
   ---------------------------------------------------------- */

.pill {
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  padding: .35rem 1rem;
  background: rgba(123, 94, 167, .1);
  border: 1px solid rgba(123, 94, 167, .3);
  border-radius: var(--radius-full);
  font-family: var(--body);
  font-size: .7rem;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--a1);
  white-space: nowrap;
  transition: all .3s var(--e1);
}

.pill:hover {
  background: rgba(123, 94, 167, .18);
  border-color: rgba(123, 94, 167, .5);
}
