/* ============================================================
   AVATAR STUDIO — Global Styles
   Reset, tipografie de bază, utilitare și componente comune.
   ============================================================ */

/* ── Google Fonts ─────────────────────────────────────────── */
@import url("https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap");

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

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

body {
  background-color: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  /* Scrollbar custom — Firefox */
  scrollbar-width: thin;
  scrollbar-color: var(--accent) transparent;
}

/* Scrollbar — Webkit: fără reguli custom, browserul folosește overlay scrollbar
   nativ (macOS/iOS: bară subțiră fără track, dispare automat). */
/* Firefox: bară subțiră cu accent auriu (setat pe body via scrollbar-color) */

/* Blocare scroll la meniu mobil deschis */
body.menu-open {
  overflow: hidden;
}

/* ── Tipografie ────────────────────────────────────────────── */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.2;
  color: var(--text);
  text-wrap: balance;
}

h1 {
  font-size: clamp(2rem, 5vw, 3.5rem);
}
h2 {
  font-size: clamp(1.6rem, 3.5vw, 2.5rem);
}
h3 {
  font-size: clamp(1.2rem, 2.5vw, 1.6rem);
}
h4 {
  font-size: 1.2rem;
}

p {
  margin-bottom: 1rem;
  color: var(--text-muted);
  text-wrap: pretty;
}

p:last-child {
  margin-bottom: 0;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color var(--transition);
}

a:hover {
  color: var(--accent-hover);
}

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

ul,
ol {
  list-style: none;
}

/* ── Layout helpers ────────────────────────────────────────── */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section {
  padding-block: var(--section-pad);
}

.section--alt {
  background-color: var(--bg-surface);
}

/* Header-ul e position:fixed — fără asta, saltul la o ancoră (#id) ascunde
   începutul secțiunii sub bara de navigare. */
[id] {
  scroll-margin-top: 100px;
}

/* Degajare sub header-ul fix când prima secțiune a paginii NU e un hero
   (paginile de tip „Despre"/„Portofoliu" nu au hero, deci pornesc direct
   sub bara de navigare fixă fără acest spațiu). Tipurile de hero își
   construiesc deja propriul padding suficient, deci sunt excluse. */
#main-content > .section:first-child:not(.hero):not(.svc-hero):not(.sl-hero):not(.cl-hero) {
  padding-top: clamp(116px, 14vw, 150px);
}

/* ── Butoane ───────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 32px;
  font-family: var(--font-body);
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border-radius: var(--radius);
  border: 2px solid transparent;
  cursor: pointer;
  transition:
    background-color var(--transition),
    border-color var(--transition),
    color var(--transition),
    transform var(--transition-fast);
  text-decoration: none;
  white-space: nowrap;
}

.btn:active {
  transform: scale(0.98);
}

/* Gold filled */
.btn--primary {
  background-color: var(--accent);
  border-color: var(--accent);
  color: var(--text-dark);
}

.btn--primary:hover {
  background-color: var(--accent-hover);
  border-color: var(--accent-hover);
  color: var(--text-dark);
}

/* Gold outlined */
.btn--outline {
  background-color: transparent;
  border-color: var(--accent);
  color: var(--accent);
}

.btn--outline:hover {
  background-color: var(--accent);
  color: var(--text-dark);
}

/* Ghost — contur subtil, funcționează pe fundal deschis */
.btn--ghost {
  background-color: transparent;
  border-color: var(--border);
  color: var(--text-muted);
}

.btn--ghost:hover {
  background-color: rgba(var(--accent-rgb), 0.06);
  border-color: var(--accent);
  color: var(--accent);
}

/* Ghost small */
.btn--sm {
  padding: 10px 22px;
  font-size: 0.8rem;
}

/* ── Etichete / Badge ──────────────────────────────────────── */
.badge {
  display: inline-block;
  padding: 3px 10px;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border-radius: 2px;
  background-color: var(--accent);
  color: var(--text-dark);
}

/* ── Section header (titlu + subtitlu centrat) ─────────────── */
.section-header {
  text-align: center;
  margin-bottom: clamp(18px, 2.5vw, 36px);
}

.section-header__eyebrow {
  display: block;
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 12px;
}

.section-header h2 {
  margin-bottom: 16px;
}

.section-header p,
.section-header__desc {
  max-width: 640px;
  margin-inline: auto;
  font-size: 1.05rem;
  line-height: 1.8;
  color: var(--text-muted);
}

/* ── Animație fade-up (declanșată de JS) ───────────────────── */
.fade-up {
  opacity: 0;
  transform: translateY(32px);
  transition:
    opacity 0.65s ease,
    transform 0.65s ease;
}

.fade-up.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Delay în cascadă pentru copii */
.fade-up:nth-child(2) {
  transition-delay: 0.1s;
}
.fade-up:nth-child(3) {
  transition-delay: 0.2s;
}
.fade-up:nth-child(4) {
  transition-delay: 0.3s;
}
.fade-up:nth-child(5) {
  transition-delay: 0.4s;
}

/* ── Separator auriu ───────────────────────────────────────── */
.divider {
  width: 48px;
  height: 2px;
  background-color: var(--accent);
  border: none;
  margin: 24px auto;
}

.divider--left {
  margin-inline: 0;
}

/* ── Form elements ─────────────────────────────────────────── */
input[type="text"],
input[type="email"],
input[type="tel"],
textarea {
  width: 100%;
  padding: 14px 16px;
  background-color: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 0.95rem;
  transition: border-color var(--transition);
  outline: none;
  resize: vertical;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="tel"]:focus,
textarea:focus {
  border-color: var(--accent);
}

input::placeholder,
textarea::placeholder {
  color: var(--text-muted);
  opacity: 0.7;
}

/* ── Toast notificări ──────────────────────────────────────── */
.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: var(--z-toast);
  padding: 14px 24px;
  border-radius: var(--radius);
  font-size: 0.9rem;
  font-weight: 500;
  opacity: 0;
  transform: translateY(16px);
  transition:
    opacity 0.3s ease,
    transform 0.3s ease;
  pointer-events: none;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.toast--success {
  background-color: #1a3a2a;
  border: 1px solid #2d7a4a;
  color: #6ee89a;
}

.toast--error {
  background-color: #3a1a1a;
  border: 1px solid #7a2d2d;
  color: #e86e6e;
}

/* ── Utilitare ─────────────────────────────────────────────── */
.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;
}

.text-accent {
  color: var(--accent);
}

.text-muted {
  color: var(--text-muted);
}

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

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

::-webkit-scrollbar-thumb {
  background: var(--border-light);
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--accent);
}

/* ── Focus vizibil pentru accesibilitate ───────────────────── */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}
