:root {
  color-scheme: light;
  --cream: #fdfbf7;
  --ink: #202b24;
  --forest: #253e33;
  --line: #ded7c9;
  --focus: #665431;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

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

body {
  isolation: isolate;
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background: #4d5037;
}

body::before,
body::after {
  position: fixed;
  content: "";
  pointer-events: none;
}

body::before {
  z-index: -2;
  inset: -1rem;
  background: #4d5037 url("assets/jardim-hora-dourada.webp") center / cover no-repeat;
  filter: blur(5px);
}

body::after {
  z-index: -1;
  inset: 0;
  background:
    radial-gradient(ellipse at 50% 0%, #ffdc9c37, transparent 63%),
    linear-gradient(180deg, #2b2b1922, #202d1a68);
}

@media (max-width: 40rem) {
  body::before { background-position: 30% center; }
}

button { font: inherit; }
button[hidden] { display: none; }
a:focus-visible, button:focus-visible, input:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}

.link-card:focus-visible {
  outline: 2px solid #fff5dd;
  outline-offset: 3px;
  box-shadow: 0 0 0 7px #24382e;
}

.icon-defs { position: absolute; pointer-events: none; }
.icon {
  display: block;
  width: 1.25rem;
  height: 1.25rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.55;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.page {
  width: min(100%, 38rem);
  margin-inline: auto;
  padding: clamp(1rem, 4.5vw, 3rem) clamp(1rem, 4vw, 1.5rem) 2rem;
}

.profile {
  position: relative;
  padding: 1.45rem 1rem 1.4rem;
  border: 1px solid #eee4d444;
  border-top-color: #fff1da80;
  border-radius: 1.75rem;
  color: #fff9ee;
  background: #3a372e;
  box-shadow: inset 0 1px 1px #fff0db2b, 0 8px 24px #1e1b142b;
  text-align: center;
}

.profile-mark {
  display: grid;
  width: 4.25rem;
  height: 4.25rem;
  margin: 0 auto .82rem;
  place-items: center;
  border: 1px solid #fff0d76b;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 16%, #fff1da36, #f5e4c515 75%);
  box-shadow: inset 0 1px 1px #fff4e53b, 0 3px 10px #211e171a;
}

.profile-mark img {
  width: 2.7rem;
  height: 2.7rem;
  object-fit: contain;
  filter: brightness(0) invert(1);
}

.profile h1 {
  margin: 0;
  font: 400 clamp(1.85rem, 7.7vw, 2.95rem)/1.06 Georgia, serif;
  letter-spacing: .055em;
  text-shadow: 0 2px 8px #17150f61;
}

.profile h1 span {
  display: block;
  margin: .42rem 0 0;
  color: #f7e8cf;
  font: 650 .65rem/1.4 system-ui, sans-serif;
  letter-spacing: .34em;
  text-transform: uppercase;
}

.tagline {
  margin: .85rem auto 0;
  font-size: .88rem;
  line-height: 1.45;
  color: #f6eee0;
  text-shadow: 0 1px 4px #211c137a;
}

.share-button {
  position: absolute;
  top: .75rem;
  right: .75rem;
  display: grid;
  width: 2.75rem;
  height: 2.75rem;
  place-items: center;
  border: 1px solid #fff4e15c;
  border-radius: 50%;
  color: #fff9ef;
  background: #fff4e015;
  box-shadow: inset 0 1px 0 #fff0d92b;
  cursor: pointer;
}

.share-button:hover { background: #fff4e02b; }
.share-button:focus-visible { outline-color: #fff5dd; }
.share-button .icon { width: 1.05rem; height: 1.05rem; }

.link-list {
  display: grid;
  gap: .55rem;
  padding: 0;
  margin: 1rem 0 0;
  list-style: none;
}

.link-card {
  --surface: #4b4941;
  --rim-light: #f8f2e96b;
  --rim-shade: #eee8de30;
  display: grid;
  grid-template-columns: 2.5rem minmax(0, 1fr) 1.875rem;
  gap: .75rem;
  align-items: center;
  min-height: 3.95rem;
  padding: .6rem .9rem .6rem .68rem;
  border: 1px solid var(--rim-shade);
  border-top-color: var(--rim-light);
  border-left-color: var(--rim-light);
  border-radius: 2.25rem;
  background: var(--surface);
  color: #fdfbf6;
  text-decoration: none;
  text-shadow: 0 1px 3px #181510a6;
  box-shadow: inset 0 1px 1px #fff8ee24, inset 0 -1px 2px #241e151c, 0 4px 14px #1b190e26;
  transition: border-color .18s ease, transform .18s ease;
}

.link-icon {
  display: grid;
  width: 2.5rem;
  height: 2.5rem;
  place-items: center;
  border: 1px solid #f8f2e83d;
  border-radius: 50%;
  background: linear-gradient(145deg, #f9f1e01d, #efe8db05);
  box-shadow: inset 0 1px 1px #fff8eb22;
}

.link-label { display: grid; gap: .15rem; }
.link-label strong { font-size: .94rem; font-weight: 650; line-height: 1.25; }
.link-label > span { font-size: .78rem; line-height: 1.2; color: #f0ece4; }
.link-arrow {
  width: 1.875rem;
  height: 1.875rem;
  padding: .4375rem;
  border: 1px solid #f7f1e43b;
  border-radius: 50%;
  background: #f8f1e510;
}

.link-card--featured {
  --rim-light: #fff1d497;
  --rim-shade: #fbe8c74a;
}

.link-card--featured .link-icon { background: linear-gradient(145deg, #fff0d335, #f6e6c90b); }

@media (hover: hover) {
  .link-card:hover {
    transform: translateY(-2px);
    border-color: #fff5e5a6;
  }
}

@supports (backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px)) {
  .profile {
    background:
      radial-gradient(ellipse at 50% 58%, #1b19135e, transparent 81%),
      linear-gradient(114deg, #302b2457, #efe2ca27 47%, #302b244d);
    -webkit-backdrop-filter: blur(12px) saturate(.73) brightness(.65);
    backdrop-filter: blur(12px) saturate(.73) brightness(.65);
  }

  .link-card {
    --surface:
      linear-gradient(112deg, transparent 24%, #faf1e429 56%, transparent 89%),
      linear-gradient(90deg, #1c19134d 8%, #26211c38 50%, #4a423c13 100%);
    -webkit-backdrop-filter: blur(6px) saturate(.66) brightness(.83);
    backdrop-filter: blur(6px) saturate(.66) brightness(.83);
  }
}

@media (prefers-reduced-transparency: reduce) {
  .profile { background: #3a372e; }
  .link-card { --surface: #4b4941; }
  .profile, .link-card { -webkit-backdrop-filter: none; backdrop-filter: none; }
}

.share-status {
  position: fixed;
  z-index: 1;
  bottom: max(1rem, env(safe-area-inset-bottom));
  left: 50%;
  transform: translateX(-50%);
  max-width: calc(100% - 2rem);
  width: max-content;
  border-radius: 2rem;
  color: #fffdf6;
  background: var(--forest);
  font-size: .875rem;
  pointer-events: none;
}

.share-status:not(:empty) { padding: .65rem 1.1rem; }

.share-dialog {
  width: min(calc(100% - 2rem), 24rem);
  padding: 1.25rem;
  border: 1px solid var(--line);
  border-radius: 1rem;
  color: var(--ink);
  background: var(--cream);
}

.share-dialog::backdrop { background: #1c27236b; }
.share-dialog h2 { margin: 0 0 .75rem; font: 1.6rem Georgia, serif; }
.share-dialog label { display: block; font-size: .875rem; }
.share-dialog input {
  width: 100%;
  margin: .45rem 0 1rem;
  padding: .65rem;
  border: 1px solid #a69a83;
  border-radius: .45rem;
  color: var(--ink);
  background: #fff;
  font: inherit;
}
.share-dialog button {
  min-height: 2.75rem;
  padding: .5rem .9rem;
  border: 0;
  border-radius: .45rem;
  color: #fffdf6;
  background: var(--forest);
  cursor: pointer;
}

@media (prefers-reduced-motion: reduce) {
  .link-card { transition: none; }
  .link-card:hover { transform: none; }
}
