/* ============================================================
   FEDERICA ERBA — Personal Brand Landing Page
   Design System: Soft Editorial · Pastel Professional
   ============================================================ */

/* ── TOKENS ─────────────────────────────────────────────── */
:root {
  /* Palette */
  --sage:        #B8C9B0;
  --sage-light:  #D6E4CF;
  --sage-dark:   #8AA380;
  --ivory:       #F5F0E8;
  --ivory-dark:  #EDE6D6;
  --dusty-blue:  #A8B8C8;
  --blue-light:  #D0DCE8;
  --charcoal:    #2D2D2D;
  --charcoal-60: rgba(45,45,45,.6);
  --charcoal-20: rgba(45,45,45,.12);
  --white:       #FFFFFF;
  --accent:      #C4A882;   /* warm sand — CTA accent */
  --accent-dark: #A88B60;

  /* Typography */
  --font-display: 'Cormorant Garamond', Georgia, serif;
  --font-body:    'DM Sans', system-ui, sans-serif;

  /* Spacing */
  --section-pad: clamp(5rem, 10vw, 9rem);
  --container:   1200px;
  --gap:         2rem;

  /* Motion */
  --ease-out: cubic-bezier(.22,1,.36,1);
  --ease-in:  cubic-bezier(.64,0,.78,0);

  /* Radius */
  --r-sm: 6px;
  --r-md: 14px;
  --r-lg: 28px;
}

/* ── 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(--ivory);
  color: var(--charcoal);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
button { cursor: pointer; border: none; background: none; font: inherit; }
input, textarea, select { font: inherit; }

/* ── CONTAINER ───────────────────────────────────────────── */
.container {
  width: min(var(--container), 100% - 3rem);
  margin-inline: auto;
}

/* ── SECTION BASICS ──────────────────────────────────────── */
.section { padding-block: var(--section-pad); }
.section-tag {
  display: inline-block;
  font-family: var(--font-body);
  font-size: .72rem;
  font-weight: 500;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--sage-dark);
  background: var(--sage-light);
  padding: .3rem .9rem;
  border-radius: 100px;
  margin-bottom: 1.2rem;
}
.section-tag.center { display: block; text-align: center; }
.section-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 300;
  line-height: 1.15;
  color: var(--charcoal);
  margin-bottom: 1.8rem;
}
.section-title em {
  font-style: italic;
  color: var(--sage-dark);
}
.section-title.center { text-align: center; }

/* ── REVEAL ANIMATION ────────────────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity .8s var(--ease-out), transform .8s var(--ease-out);
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ── BUTTONS ─────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .85rem 2rem;
  border-radius: 100px;
  font-size: .9rem;
  font-weight: 500;
  letter-spacing: .04em;
  transition: all .3s var(--ease-out);
}
.btn--primary {
  background: var(--charcoal);
  color: var(--ivory);
}
.btn--primary:hover {
  background: var(--accent-dark);
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(45,45,45,.25);
}
.btn--ghost {
  border: 1.5px solid var(--charcoal-20);
  color: var(--charcoal);
  background: transparent;
}
.btn--ghost:hover {
  border-color: var(--charcoal);
  background: var(--charcoal-20);
}
.btn--full { width: 100%; justify-content: center; }

/* ── NAV ─────────────────────────────────────────────────── */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 999;
  display: flex;
  align-items: center;
  gap: 2rem;
  padding: 1.1rem clamp(1.5rem, 4vw, 3rem);
  background: rgba(245,240,232,.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--charcoal-20);
  transition: box-shadow .3s;
}
.nav.scrolled { box-shadow: 0 4px 24px rgba(45,45,45,.08); }
.nav__logo {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 600;
  letter-spacing: .06em;
  color: var(--charcoal);
  margin-right: auto;
}
.nav__links {
  display: flex;
  gap: 2rem;
}
.nav__links a {
  font-size: .85rem;
  font-weight: 400;
  color: var(--charcoal-60);
  transition: color .25s;
}
.nav__links a:hover { color: var(--charcoal); }
.nav__cta {
  font-size: .82rem;
  font-weight: 500;
  padding: .55rem 1.4rem;
  border-radius: 100px;
  border: 1.5px solid var(--charcoal);
  color: var(--charcoal);
  transition: all .3s var(--ease-out);
}
.nav__cta:hover {
  background: var(--charcoal);
  color: var(--ivory);
}
.nav__burger {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: .3rem;
}
.nav__burger span {
  display: block;
  width: 22px;
  height: 1.5px;
  background: var(--charcoal);
  transition: all .3s;
}

/* ── HERO ────────────────────────────────────────────────── */
.hero {
  min-height: 100dvh;
  display: flex;
  align-items: center;
  padding-top: 7rem;
  padding-bottom: 4rem;
  position: relative;
  overflow: hidden;
}
.hero__bg-shape {
  position: absolute;
  top: -10%;
  right: -8%;
  width: clamp(340px, 50vw, 680px);
  aspect-ratio: 1;
  background: radial-gradient(circle, var(--sage-light) 0%, transparent 72%);
  border-radius: 50%;
  pointer-events: none;
}
.hero__bg-dots {
  position: absolute;
  inset: 0;
  background-image: radial-gradient(var(--charcoal-20) 1px, transparent 1px);
  background-size: 32px 32px;
  mask-image: radial-gradient(ellipse 60% 60% at 80% 30%, black 40%, transparent 100%);
  pointer-events: none;
}
.hero__content {
  container: hero / inline-size;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 4rem;
  width: min(var(--container), 100% - 3rem);
  margin-inline: auto;
}
.hero__eyebrow {
  display: block;
  font-size: .78rem;
  font-weight: 500;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--sage-dark);
  margin-bottom: 1.4rem;
}
.hero__title {
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 5vw, 4rem);
  font-weight: 300;
  line-height: 1.1;
  margin-bottom: 1.4rem;
  color: var(--charcoal);
}
.hero__title em {
  font-style: italic;
  color: var(--sage-dark);
}
.hero__sub {
  font-size: clamp(.9rem, 1.5vw, 1rem);
  color: var(--charcoal-60);
  line-height: 1.7;
  margin-bottom: 2.2rem;
  max-width: 46ch;
}
.hero__actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 2rem;
}
.hero__langs {
  display: flex;
  gap: .8rem;
  flex-wrap: wrap;
}
.hero__langs span {
  font-size: .75rem;
  font-weight: 500;
  letter-spacing: .06em;
  color: var(--charcoal-60);
  background: var(--white);
  border: 1px solid var(--charcoal-20);
  padding: .3rem .7rem;
  border-radius: 100px;
}
.hero__lottie {
  position: relative;
  display: flex;
  justify-content: center;
}
.lottie-globe {
  width: 100%;
  max-width: 460px;
  aspect-ratio: 1;
}
.hero__badge {
  position: absolute;
  bottom: 2rem;
  right: -1rem;
  background: var(--white);
  border: 1px solid var(--charcoal-20);
  border-radius: var(--r-md);
  padding: .9rem 1.3rem;
  display: flex;
  align-items: center;
  gap: .7rem;
  box-shadow: 0 8px 32px rgba(45,45,45,.1);
}
.hero__badge-num {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 600;
  line-height: 1;
}
.hero__badge-label {
  font-size: .72rem;
  color: var(--charcoal-60);
  line-height: 1.4;
}
.hero__scroll {
  position: absolute;
  bottom: 2.5rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .5rem;
  font-size: .7rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--charcoal-60);
}
.hero__scroll-line {
  width: 1px;
  height: 48px;
  background: linear-gradient(to bottom, var(--charcoal-60), transparent);
  animation: scrollPulse 2s ease-in-out infinite;
}
@keyframes scrollPulse {
  0%, 100% { opacity: .3; transform: scaleY(1); }
  50%       { opacity: 1;  transform: scaleY(1.2); }
}

/* ── ABOUT ───────────────────────────────────────────────── */
.about { background: var(--white); }
.about__grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 5rem;
  align-items: center;
}
.about__visual {
  position: relative;
}
.about__lottie-wrap {
  width: 100%;
  max-width: 380px;
  aspect-ratio: 1;
  margin: auto;
}
.about__text {
  color: var(--charcoal-60);
  line-height: 1.8;
  margin-bottom: 1rem;
}
.about__stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin-top: 2.5rem;
  padding-top: 2rem;
  border-top: 1px solid var(--charcoal-20);
}
.stat__num {
  display: block;
  font-family: var(--font-display);
  font-size: 2.2rem;
  font-weight: 600;
  color: var(--charcoal);
  line-height: 1;
}
.stat__label {
  display: block;
  font-size: .72rem;
  color: var(--charcoal-60);
  margin-top: .3rem;
  line-height: 1.4;
}

/* ── SERVICES ────────────────────────────────────────────── */
.services { background: var(--ivory); }
.services__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-top: 3.5rem;
}
.service-card {
  background: var(--white);
  border: 1px solid var(--charcoal-20);
  border-radius: var(--r-lg);
  padding: 2rem;
  transition: transform .35s var(--ease-out), box-shadow .35s var(--ease-out), border-color .35s;
}
.service-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 16px 48px rgba(45,45,45,.1);
  border-color: var(--sage);
}
.service-card__icon {
  width: 72px;
  height: 72px;
  margin-bottom: 1.3rem;
}
.service-card h3 {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 400;
  margin-bottom: .8rem;
  color: var(--charcoal);
}
.service-card p {
  font-size: .88rem;
  color: var(--charcoal-60);
  line-height: 1.75;
}

/* ── EXPERIENCE / TIMELINE ───────────────────────────────── */
.experience { background: var(--ivory-dark); }
.timeline {
  margin-top: 3.5rem;
  display: flex;
  flex-direction: column;
  gap: 0;
  position: relative;
}
.timeline::before {
  content: '';
  position: absolute;
  top: 0; bottom: 0;
  left: 10px;
  width: 1px;
  background: linear-gradient(to bottom, var(--sage), var(--sage-light), transparent);
}
.timeline__item {
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 1.5rem;
  padding-bottom: 3.5rem;
}
.timeline__item:last-child { padding-bottom: 0; }
.timeline__marker {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--sage);
  border: 3px solid var(--ivory-dark);
  box-shadow: 0 0 0 3px var(--sage-light);
  flex-shrink: 0;
  margin-top: .2rem;
  transition: transform .3s var(--ease-out);
}
.timeline__item:hover .timeline__marker {
  transform: scale(1.3);
  background: var(--sage-dark);
}
.timeline__content {
  background: var(--white);
  border-radius: var(--r-md);
  padding: 1.8rem 2rem;
  border: 1px solid var(--charcoal-20);
  transition: box-shadow .3s;
}
.timeline__item:hover .timeline__content {
  box-shadow: 0 8px 32px rgba(45,45,45,.08);
}
.timeline__period {
  font-size: .72rem;
  font-weight: 500;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--sage-dark);
  background: var(--sage-light);
  padding: .2rem .7rem;
  border-radius: 100px;
}
.timeline__role {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 400;
  margin: .8rem 0 .2rem;
}
.timeline__company {
  font-size: .82rem;
  color: var(--charcoal-60);
  display: block;
  margin-bottom: .9rem;
}
.timeline__content p {
  font-size: .9rem;
  color: var(--charcoal-60);
  line-height: 1.75;
  margin-bottom: 1rem;
}
.timeline__tags {
  display: flex;
  gap: .5rem;
  flex-wrap: wrap;
}
.timeline__tags span {
  font-size: .72rem;
  font-weight: 500;
  padding: .25rem .65rem;
  border-radius: 100px;
  border: 1px solid var(--sage);
  color: var(--sage-dark);
  background: var(--sage-light);
}

/* ── CONTACT ─────────────────────────────────────────────── */
.contact { background: var(--white); }
.contact__grid {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 5rem;
  align-items: start;
}
.contact__desc {
  color: var(--charcoal-60);
  line-height: 1.8;
  margin-bottom: 1.5rem;
  font-size: .95rem;
}
.contact__lottie-wrap {
  width: 200px;
  height: 160px;
  margin-bottom: 1.5rem;
}
.contact__info {
  display: flex;
  flex-direction: column;
  gap: .8rem;
}
.contact__info li {
  display: flex;
  align-items: center;
  gap: .7rem;
  font-size: .9rem;
  color: var(--charcoal-60);
}
.contact__info svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  stroke: var(--sage-dark);
}
.contact__info a:hover { color: var(--charcoal); }

/* ── FORM ────────────────────────────────────────────────── */
.contact-form {
  background: var(--ivory);
  border: 1px solid var(--charcoal-20);
  border-radius: var(--r-lg);
  padding: 2.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
}
.form-group {
  display: flex;
  flex-direction: column;
  gap: .4rem;
}
.form-group label {
  font-size: .8rem;
  font-weight: 500;
  letter-spacing: .06em;
  color: var(--charcoal);
}
.form-group input,
.form-group textarea {
  padding: .8rem 1rem;
  border: 1.5px solid var(--charcoal-20);
  border-radius: var(--r-sm);
  background: var(--white);
  color: var(--charcoal);
  font-size: .9rem;
  transition: border-color .25s, box-shadow .25s;
  resize: vertical;
}
.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--sage);
  box-shadow: 0 0 0 3px rgba(184,201,176,.25);
}
.form-group input.error,
.form-group textarea.error { border-color: #c0392b; }
.form-group--check {
  flex-direction: row;
  align-items: flex-start;
  gap: .7rem;
}
.form-group--check input[type="checkbox"] {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  margin-top: .1rem;
  accent-color: var(--sage-dark);
  cursor: pointer;
}
.form-group--check label {
  font-size: .82rem;
  font-weight: 400;
  color: var(--charcoal-60);
  line-height: 1.5;
  cursor: pointer;
}
.form-group--check label a {
  color: var(--sage-dark);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.form-note {
  font-size: .72rem;
  color: var(--charcoal-60);
  text-align: center;
}
.form-feedback {
  display: none;
  padding: .9rem 1rem;
  border-radius: var(--r-sm);
  font-size: .88rem;
  text-align: center;
}
.form-feedback.success {
  display: block;
  background: var(--sage-light);
  color: var(--sage-dark);
  border: 1px solid var(--sage);
}
.form-feedback.error {
  display: block;
  background: #fdecea;
  color: #c0392b;
  border: 1px solid #e8b4b8;
}

/* ── FOOTER ──────────────────────────────────────────────── */
.footer {
  background: var(--charcoal);
  color: var(--ivory);
  padding-block: 3rem;
}
.footer__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
  text-align: center;
}
.footer__name {
  display: block;
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 300;
  letter-spacing: .06em;
}
.footer__tagline {
  display: block;
  font-size: .72rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: rgba(245,240,232,.4);
  margin-top: .2rem;
}
.footer__nav {
  display: flex;
  gap: 1.8rem;
  flex-wrap: wrap;
  justify-content: center;
}
.footer__nav a {
  font-size: .82rem;
  color: rgba(245,240,232,.55);
  transition: color .25s;
}
.footer__nav a:hover { color: var(--ivory); }
.footer__copy {
  font-size: .72rem;
  color: rgba(245,240,232,.3);
}

/* ── RESPONSIVE ──────────────────────────────────────────── */
@media (max-width: 900px) {
  .hero__content        { grid-template-columns: 1fr; text-align: center; }
  .hero__sub            { margin-inline: auto; }
  .hero__actions        { justify-content: center; }
  .hero__langs          { justify-content: center; }
  .hero__lottie         { display: none; }
  .about__grid          { grid-template-columns: 1fr; }
  .about__visual        { display: none; }
  .about__stats         { grid-template-columns: repeat(2, 1fr); }
  .services__grid       { grid-template-columns: 1fr 1fr; }
  .contact__grid        { grid-template-columns: 1fr; }
  .contact__lottie-wrap { display: none; }
}

@media (max-width: 600px) {
  .services__grid       { grid-template-columns: 1fr; }
  .about__stats         { grid-template-columns: repeat(4, 1fr); gap: .5rem; }
  .nav__links, .nav__cta { display: none; }
  .nav__burger          { display: flex; }
  .nav__links.open {
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 64px; left: 0; right: 0;
    background: var(--ivory);
    padding: 1.5rem 2rem 2rem;
    border-bottom: 1px solid var(--charcoal-20);
    gap: 1.2rem;
    z-index: 998;
  }
  .nav__links.open a { font-size: 1rem; }
  .timeline::before { display: none; }
  .timeline__item { grid-template-columns: 1fr; }
  .timeline__marker { display: none; }
}

/* ── ACCESSIBILITY ───────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  .reveal { transition: none; }
  .hero__scroll-line { animation: none; }
}
