/* ============================================
   WhatsApp Link Generator — Core Styles
   Light Theme | whatsapplinks.github.io
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Syne:wght@400;500;600;700;800&family=DM+Sans:ital,opsz,wght@0,9..40,300;0,9..40,400;0,9..40,500;1,9..40,300&display=swap');

/* ── Variables ── */
:root {
  --green-primary: #25D366;
  --green-deep:    #128C7E;
  --green-light:   #DCF8C6;
  --green-pale:    #F0FBF4;
  --green-glow:    rgba(37,211,102,0.15);

  --ink:           #0D1F17;
  --ink-2:         #2C4A3A;
  --ink-3:         #587066;
  --ink-mute:      #8DA89E;

  --surface:       #FFFFFF;
  --surface-2:     #F7FDFB;
  --surface-3:     #EDF7F2;
  --border:        #D6EDDF;
  --border-light:  #EBF5EE;

  --radius-sm:     8px;
  --radius-md:     14px;
  --radius-lg:     22px;
  --radius-xl:     32px;

  --shadow-xs:  0 1px 3px rgba(18,140,126,.06);
  --shadow-sm:  0 2px 10px rgba(18,140,126,.08);
  --shadow-md:  0 8px 32px rgba(18,140,126,.12);
  --shadow-lg:  0 20px 60px rgba(18,140,126,.16);

  --font-display: 'Syne', sans-serif;
  --font-body:    'DM Sans', sans-serif;

  --transition: 0.22s cubic-bezier(.4,0,.2,1);
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: var(--font-body);
  background: var(--surface);
  color: var(--ink);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { text-decoration: none; color: inherit; }
ul, ol { list-style: none; }
button { cursor: pointer; font-family: var(--font-body); border: none; background: none; }
input, textarea, select {
  font-family: var(--font-body);
  font-size: 1rem;
  outline: none;
}

/* ── Typography ── */
h1,h2,h3,h4,h5 {
  font-family: var(--font-display);
  line-height: 1.15;
  letter-spacing: -.02em;
}

/* ── Layout ── */
.container {
  width: 100%;
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 24px;
}
.section { padding: 88px 0; }
.section--alt { background: var(--surface-2); }
.section--tinted { background: var(--green-pale); }

/* ── Badges & Labels ── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  padding: 5px 12px;
  border-radius: 99px;
  background: var(--green-light);
  color: var(--green-deep);
  margin-bottom: 16px;
}
.badge svg { width: 13px; height: 13px; }

/* ── Section Headings ── */
.section-label {
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--green-primary);
  margin-bottom: 10px;
}
.section-title {
  font-size: clamp(1.8rem, 3.5vw, 2.75rem);
  color: var(--ink);
  margin-bottom: 18px;
}
.section-subtitle {
  font-size: 1.05rem;
  color: var(--ink-3);
  max-width: 580px;
  line-height: 1.7;
}
.section-header { margin-bottom: 56px; }
.section-header--center { text-align: center; }
.section-header--center .section-subtitle { margin: 0 auto; }

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  font-size: .95rem;
  padding: 13px 26px;
  border-radius: var(--radius-md);
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}
.btn--primary {
  background: var(--green-primary);
  color: #fff;
  box-shadow: 0 4px 20px rgba(37,211,102,.35);
}
.btn--primary:hover {
  background: var(--green-deep);
  box-shadow: 0 6px 28px rgba(37,211,102,.45);
  transform: translateY(-1px);
}
.btn--outline {
  background: transparent;
  color: var(--green-deep);
  border: 2px solid var(--border);
}
.btn--outline:hover {
  border-color: var(--green-primary);
  background: var(--green-pale);
}
.btn--ghost {
  background: var(--surface-3);
  color: var(--ink-2);
}
.btn--ghost:hover { background: var(--border); }
.btn--lg { padding: 16px 32px; font-size: 1.05rem; border-radius: var(--radius-lg); }
.btn--sm { padding: 8px 16px; font-size: .85rem; border-radius: var(--radius-sm); }
.btn svg { width: 18px; height: 18px; flex-shrink: 0; }

/* ── Cards ── */
.card {
  background: var(--surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 32px;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}
.card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-3px);
  border-color: var(--border);
}

/* ── Form Elements ── */
.form-group { margin-bottom: 20px; }
.form-label {
  display: block;
  font-size: .85rem;
  font-weight: 600;
  color: var(--ink-2);
  margin-bottom: 8px;
  letter-spacing: .01em;
}
.form-label span.req { color: var(--green-primary); margin-left: 3px; }
.form-control {
  display: block;
  width: 100%;
  padding: 13px 16px;
  background: var(--surface-2);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--ink);
  font-size: .97rem;
  transition: var(--transition);
}
.form-control:focus {
  border-color: var(--green-primary);
  background: var(--surface);
  box-shadow: 0 0 0 4px var(--green-glow);
}
.form-control::placeholder { color: var(--ink-mute); }
select.form-control { cursor: pointer; }
.form-hint {
  font-size: .78rem;
  color: var(--ink-mute);
  margin-top: 5px;
}

/* ── Divider ── */
.divider {
  width: 48px;
  height: 3px;
  background: var(--green-primary);
  border-radius: 99px;
  margin-bottom: 18px;
}
.divider--center { margin: 0 auto 18px; }

/* ── Chip Tags ── */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 12px;
  background: var(--surface-3);
  border: 1px solid var(--border);
  border-radius: 99px;
  font-size: .78rem;
  font-weight: 500;
  color: var(--ink-2);
}

/* ── Scrollbar ── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--surface-2); }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 99px; }
::-webkit-scrollbar-thumb:hover { background: var(--ink-mute); }

/* ── Selection ── */
::selection { background: var(--green-light); color: var(--green-deep); }

/* ── Animations ── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes pulse-ring {
  0%   { transform: scale(1);    opacity: .6; }
  100% { transform: scale(1.8);  opacity: 0; }
}
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-10px); }
}
@keyframes shimmer {
  0%   { background-position: -200% 0; }
  100% { background-position:  200% 0; }
}
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes bounceIn {
  0%   { transform: scale(.5);  opacity: 0; }
  70%  { transform: scale(1.1); opacity: 1; }
  100% { transform: scale(1); }
}

.anim-fade-up  { animation: fadeUp .6s ease both; }
.anim-delay-1  { animation-delay: .1s; }
.anim-delay-2  { animation-delay: .2s; }
.anim-delay-3  { animation-delay: .3s; }
.anim-delay-4  { animation-delay: .4s; }

/* ── Tooltip ── */
[data-tooltip] { position: relative; }
[data-tooltip]::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  background: var(--ink);
  color: #fff;
  font-size: .75rem;
  padding: 5px 10px;
  border-radius: var(--radius-sm);
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s;
  z-index: 99;
}
[data-tooltip]:hover::after { opacity: 1; }

/* ── Notification Toast ── */
#toast-container {
  position: fixed;
  bottom: 28px;
  right: 28px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.toast {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 20px;
  background: var(--ink);
  color: #fff;
  border-radius: var(--radius-md);
  font-size: .9rem;
  font-weight: 500;
  box-shadow: var(--shadow-lg);
  animation: fadeUp .3s ease;
  min-width: 220px;
}
.toast--success { background: var(--green-deep); }
.toast--error   { background: #D93025; }
.toast svg { width: 18px; height: 18px; flex-shrink: 0; }

/* ── Back to Top ── */
#back-top {
  position: fixed;
  bottom: 28px;
  left: 28px;
  width: 44px;
  height: 44px;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-md);
  opacity: 0;
  pointer-events: none;
  transition: var(--transition);
  z-index: 999;
  color: var(--ink-2);
}
#back-top.visible { opacity: 1; pointer-events: all; }
#back-top:hover { background: var(--green-primary); color: #fff; border-color: var(--green-primary); }

/* ── Mobile Nav Overlay ── */
.nav-overlay {
  position: fixed;
  inset: 0;
  background: rgba(13,31,23,.5);
  backdrop-filter: blur(4px);
  z-index: 998;
  opacity: 0;
  pointer-events: none;
  transition: opacity .3s;
}
.nav-overlay.active { opacity: 1; pointer-events: all; }

/* ── Responsive ── */
@media (max-width: 768px) {
  .section { padding: 64px 0; }
  .container { padding: 0 16px; }
}
@media (max-width: 480px) {
  .section { padding: 48px 0; }
}
