/* Organic Gold Cosmetics — Linktree France */

html {
  --color-gold: #bda579;
  --color-gold-border: rgba(197, 163, 106, 0.4);
  --color-gold-ring: rgba(117, 90, 40, 0.3);
  --color-title: rgba(255, 255, 255, 1);
  --color-subtitle: rgba(189, 165, 121, 1);
  --color-desc: rgba(255, 255, 255, 0.5);
  --color-card-bg: rgba(0, 0, 0, 0.55);
  --color-card-bg-hover: rgba(0, 0, 0, 0.72);
  --color-card-border-hover: rgba(197, 163, 106, 0.65);
  --color-card-shadow-hover: rgba(197, 163, 106, 0.12);
  --color-body-bg: #0a0a0a;
  --color-focus: #755a28;
  --color-toggle-bg: rgba(0, 0, 0, 0.55);
  --color-toggle-border: rgba(197, 163, 106, 0.4);
  --color-toggle-icon: #bda579;
  --font-family: "Figtree", system-ui, sans-serif;
  --content-width: 380px;
  --content-max: 576px;
  --radius-card: 12px;
  --radius-pill: 9999px;
  --hero-title-size: 26px;
  --hero-title-weight: 700;
  --hero-title-spacing: 0px;
  --hero-subtitle-margin: 48px;
  --hero-avatar-margin: 24px;
}

html[data-theme="light"] {
  --color-gold: #755a28;
  --color-gold-border: rgba(197, 163, 106, 0.3);
  --color-gold-ring: rgba(117, 90, 40, 0.3);
  --color-title: #1a1c1c;
  --color-subtitle: #755a28;
  --color-desc: #4e463a;
  --color-card-bg: rgba(255, 255, 255, 0.4);
  --color-card-bg-hover: rgba(255, 255, 255, 0.65);
  --color-card-border-hover: rgba(197, 163, 106, 0.5);
  --color-card-shadow-hover: rgba(197, 163, 106, 0.15);
  --color-body-bg: #f9f9f9;
  --color-focus: #755a28;
  --color-toggle-bg: rgba(255, 255, 255, 0.55);
  --color-toggle-border: rgba(197, 163, 106, 0.35);
  --color-toggle-icon: #755a28;
  --hero-avatar-margin: 22px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-family);
  background: var(--color-body-bg);
  color: var(--color-title);
  min-height: 100dvh;
  transition: background-color 0.35s ease, color 0.35s ease;
}

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

a {
  color: inherit;
  text-decoration: none;
}

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

/* ── Theme toggle ── */

.theme-toggle {
  position: fixed;
  top: 16px;
  right: 16px;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--color-toggle-border);
  background: var(--color-toggle-bg);
  color: var(--color-toggle-icon);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  transition:
    background 0.35s ease,
    border-color 0.35s ease,
    color 0.35s ease,
    transform 0.2s ease,
    box-shadow 0.25s ease;
}

.theme-toggle:hover {
  transform: scale(1.05);
  box-shadow: 0 0 20px var(--color-card-shadow-hover);
}

.theme-toggle:focus-visible {
  outline: 2px solid var(--color-focus);
  outline-offset: 2px;
}

.theme-toggle__icon {
  position: absolute;
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.theme-toggle__icon--sun {
  opacity: 1;
  transform: rotate(0deg) scale(1);
}

.theme-toggle__icon--moon {
  opacity: 0;
  transform: rotate(-30deg) scale(0.8);
}

html[data-theme="light"] .theme-toggle__icon--sun {
  opacity: 0;
  transform: rotate(30deg) scale(0.8);
}

html[data-theme="light"] .theme-toggle__icon--moon {
  opacity: 1;
  transform: rotate(0deg) scale(1);
}

/* ── Page layout ── */

.page {
  position: relative;
  min-height: 100dvh;
  overflow-x: hidden;
}

.page__backdrop {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
}

.page__backdrop-img,
.page__backdrop-overlay {
  transition: opacity 0.45s ease;
}

.page__backdrop-img--light,
.page__backdrop-overlay--light {
  display: none;
}

.page__backdrop-img--dark {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
  object-position: center;
}

.page__backdrop-overlay--dark {
  display: none;
}

html[data-theme="light"] .page__backdrop-img--dark,
html[data-theme="light"] .page__backdrop-overlay--dark {
  display: none;
}

html[data-theme="light"] .page__backdrop-img--light {
  display: block;
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

html[data-theme="light"] .page__backdrop-overlay--light {
  display: none;
}

.page__content {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 2px 24px 96px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

html[data-theme="light"] .page__content {
  padding-bottom: 48px;
}

/* ── Hero ── */

.hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: 48px;
  width: 100%;
  max-width: var(--content-width);
}

.hero__logo {
  width: 185px;
  height: 64px;
  object-fit: contain;
  margin-bottom: 40px;
  flex-shrink: 0;
}

.hero__avatar-wrap {
  position: relative;
  padding: 5px;
  border: 1px solid var(--color-gold-ring);
  border-radius: var(--radius-pill);
  margin-bottom: var(--hero-avatar-margin);
  transition: margin-bottom 0.35s ease;
}

.hero__avatar-glow {
  display: none;
}

html[data-theme="light"] .hero__avatar-glow {
  display: block;
  position: absolute;
  inset: -7px;
  border-radius: var(--radius-pill);
  background: rgba(197, 163, 106, 0.2);
  filter: blur(12px);
  z-index: -1;
  pointer-events: none;
}

.hero__avatar {
  width: 128px;
  height: 128px;
  border-radius: var(--radius-pill);
  object-fit: cover;
  object-position: center top;
}

.hero__title {
  font-size: var(--hero-title-size);
  font-weight: var(--hero-title-weight);
  line-height: 35px;
  letter-spacing: var(--hero-title-spacing);
  text-align: center;
  color: var(--color-title);
  margin-bottom: 8px;
  transition: color 0.35s ease;
}

.hero__subtitle {
  font-size: 12px;
  font-weight: 400;
  line-height: 16px;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  text-align: center;
  color: var(--color-subtitle);
  margin-bottom: var(--hero-subtitle-margin);
  transition: color 0.35s ease, margin-bottom 0.35s ease;
}

/* ── Link cards ── */

.links {
  display: flex;
  flex-direction: column;
  gap: 16px;
  width: 100%;
  max-width: var(--content-width);
}

.link-card {
  display: flex;
  align-items: center;
  gap: 0;
  width: 100%;
  padding: 21px;
  border-radius: var(--radius-card);
  border: 1px solid var(--color-gold-border);
  background: var(--color-card-bg);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  cursor: pointer;
  transition:
    background 0.35s ease,
    border-color 0.35s ease,
    transform 0.2s ease,
    box-shadow 0.25s ease,
    opacity 0.4s ease;
  opacity: 0;
  transform: translateY(12px);
}

.link-card.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.link-card:hover,
.link-card:focus-visible {
  background: var(--color-card-bg-hover);
  border-color: var(--color-card-border-hover);
  box-shadow: 0 0 24px var(--color-card-shadow-hover);
  transform: translateY(-1px);
}

.link-card:active {
  transform: translateY(0);
}

.link-card:focus-visible {
  outline: 2px solid var(--color-focus);
  outline-offset: 2px;
}

.link-card__icon {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  margin-right: 12px;
  object-fit: contain;
  object-position: center;
}

.link-card__text {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.link-card__label {
  font-size: 11px;
  line-height: 16.5px;
  color: var(--color-gold);
  letter-spacing: 0.02em;
  transition: color 0.35s ease;
}

.link-card__desc {
  font-size: 14px;
  line-height: 20px;
  color: var(--color-desc);
  transition: color 0.35s ease;
}

.link-card__arrow {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  margin-left: 8px;
  opacity: 0.85;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.link-card:hover .link-card__arrow,
.link-card:focus-visible .link-card__arrow {
  transform: translateX(3px);
  opacity: 1;
}

/* ── Hero entrance animation ── */

.hero__logo,
.hero__avatar-wrap,
.hero__title,
.hero__subtitle {
  opacity: 0;
  transform: translateY(16px);
  animation: fadeUp 0.7s ease forwards;
}

.hero__logo { animation-delay: 0.05s; }
.hero__avatar-wrap { animation-delay: 0.15s; }
.hero__title { animation-delay: 0.25s; }
.hero__subtitle { animation-delay: 0.35s; }

@keyframes fadeUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ── Responsive ── */

@media (min-width: 480px) {
  .page__content {
    padding-left: 32px;
    padding-right: 32px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero__logo,
  .hero__avatar-wrap,
  .hero__title,
  .hero__subtitle,
  .link-card,
  body,
  .link-card__label,
  .link-card__desc,
  .hero__title,
  .hero__subtitle,
  .theme-toggle,
  .theme-toggle__icon {
    animation: none;
    transition: none;
  }

  .link-card.is-visible,
  .hero__logo,
  .hero__avatar-wrap,
  .hero__title,
  .hero__subtitle {
    opacity: 1;
    transform: none;
  }
}
