/* ponytail: optional evita CLS em rede fria e lenta; use metric overrides se a fonte de marca precisar sempre vencer. */
@font-face {
  font-family: "Source Sans 3";
  src: url("/assets/fonts/SourceSans3-400.woff2") format("woff2");
  font-style: normal;
  font-weight: 400 700;
  font-display: optional;
}

@font-face {
  font-family: "Source Serif 4";
  src: url("/assets/fonts/SourceSerif4-600.woff2") format("woff2");
  font-style: normal;
  font-weight: 600 700;
  font-display: optional;
}

:root {
  color-scheme: only light;
  --surface: #f4efe5;
  --depth: #0a252a;
  --depth-soft: #123f46;
  --sand: #d9c6a5;
  --amber: #c5a15d;
  --ink: #1e2729;
  --glass-radius: 0.875rem;
  --sans: "Source Sans 3", system-ui, sans-serif;
  --serif: "Source Serif 4", Georgia, serif;
}

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

html {
  min-width: 320px;
  background: var(--surface);
  overflow-x: clip;
  -webkit-text-size-adjust: 100%;
}

body {
  min-width: 320px;
  min-height: 100svh;
  margin: 0;
  color: var(--ink);
  background: var(--surface);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.5;
  overflow-x: clip;
}

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

a {
  color: inherit;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}

a:focus-visible {
  outline: 3px solid var(--depth-soft);
  outline-offset: 4px;
}

.page-shell {
  display: grid;
  grid-template-rows: auto 1fr auto;
  width: min(100%, 556px);
  min-height: 100svh;
  margin-inline: auto;
  padding:
    max(1.25rem, env(safe-area-inset-top))
    max(1rem, env(safe-area-inset-right))
    max(1.25rem, env(safe-area-inset-bottom))
    max(1rem, env(safe-area-inset-left));
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.7rem;
}

.brand__mark {
  width: 2.7rem;
  height: 2.7rem;
}

.brand__name {
  margin: 0;
  color: var(--depth);
  font-family: var(--serif);
  font-size: 1.2rem;
  font-weight: 700;
  line-height: 1;
}

main {
  display: grid;
  align-content: center;
  gap: clamp(1.35rem, 5vw, 2rem);
  padding-block: clamp(1.25rem, 5vh, 2.75rem);
}

.intro {
  display: grid;
  gap: clamp(1rem, 4vw, 1.4rem);
}

.profile {
  position: relative;
  justify-self: center;
  width: clamp(9.5rem, 46vw, 12.5rem);
  padding: 0.35rem;
  border: 1px solid rgb(10 37 42 / 0.18);
  border-radius: var(--glass-radius);
  background:
    linear-gradient(135deg, rgb(255 255 255 / 0.58), rgb(255 255 255 / 0.14)),
    rgb(244 239 229 / 0.7);
  -webkit-backdrop-filter: blur(18px) saturate(125%);
  backdrop-filter: blur(18px) saturate(125%);
  box-shadow:
    inset 0 1px 0 rgb(255 255 255 / 0.82),
    inset 0 -1px 0 rgb(10 37 42 / 0.05),
    0 12px 30px rgb(10 37 42 / 0.09);
  isolation: isolate;
}

.profile::before {
  position: absolute;
  z-index: -1;
  right: -0.8rem;
  bottom: -0.8rem;
  width: 3.5rem;
  height: 3.5rem;
  border-right: 1px solid var(--depth-soft);
  border-bottom: 1px solid var(--depth-soft);
  border-bottom-right-radius: calc(var(--glass-radius) + 0.5rem);
  content: "";
}

.profile::after {
  position: absolute;
  z-index: 1;
  right: -0.3rem;
  bottom: 1.2rem;
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  background: var(--amber);
  box-shadow: 0 3px 10px rgb(10 37 42 / 0.16);
  content: "";
}

.profile img {
  width: 100%;
  aspect-ratio: 1;
  border-radius: calc(var(--glass-radius) - 0.3rem);
  object-fit: cover;
}

h1 {
  margin: 0;
  color: var(--depth);
  font-family: var(--serif);
  font-size: clamp(2.35rem, 11vw, 3.25rem);
  font-weight: 600;
  letter-spacing: -0.035em;
  line-height: 0.98;
  text-wrap: balance;
}

.intro__copy p {
  max-width: 29rem;
  margin: 1rem 0 0;
  color: var(--depth-soft);
  font-size: clamp(1rem, 4vw, 1.125rem);
  line-height: 1.55;
}

.link-list {
  display: grid;
  gap: 0.75rem;
}

.link-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 4rem;
  padding: 0.9rem 1rem;
  border: 1px solid rgb(10 37 42 / 0.22);
  border-radius: var(--glass-radius);
  background:
    linear-gradient(135deg, rgb(255 255 255 / 0.6), rgb(255 255 255 / 0.16)),
    rgb(244 239 229 / 0.72);
  -webkit-backdrop-filter: blur(18px) saturate(125%);
  backdrop-filter: blur(18px) saturate(125%);
  box-shadow:
    inset 0 1px 0 rgb(255 255 255 / 0.82),
    inset 0 -1px 0 rgb(10 37 42 / 0.05),
    0 10px 24px rgb(10 37 42 / 0.07);
  color: var(--depth);
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.25;
  text-decoration: none;
  transition:
    color 150ms ease,
    border-color 150ms ease,
    box-shadow 150ms ease,
    transform 150ms ease;
}

.link-card__arrow {
  flex: 0 0 auto;
  margin-left: 1rem;
  font-size: 1.35rem;
  font-weight: 400;
  line-height: 1;
  transition: transform 150ms ease;
}

.link-card:hover {
  border-color: rgb(255 255 255 / 0.24);
  background:
    linear-gradient(135deg, rgb(18 63 70 / 0.96), rgb(10 37 42 / 0.92)),
    var(--depth);
  box-shadow:
    inset 0 1px 0 rgb(255 255 255 / 0.2),
    0 14px 30px rgb(10 37 42 / 0.14);
  color: var(--surface);
  transform: translateY(-2px);
}

.link-card--primary {
  border-color: rgb(255 255 255 / 0.24);
  background:
    linear-gradient(135deg, rgb(18 63 70 / 0.96), rgb(10 37 42 / 0.92)),
    var(--depth);
  box-shadow:
    inset 0 1px 0 rgb(255 255 255 / 0.2),
    0 12px 28px rgb(10 37 42 / 0.14);
  color: var(--surface);
}

.link-card--primary:hover {
  background:
    linear-gradient(135deg, rgb(24 75 82 / 0.98), rgb(18 63 70 / 0.94)),
    var(--depth-soft);
  box-shadow:
    inset 0 1px 0 rgb(255 255 255 / 0.22),
    0 16px 34px rgb(10 37 42 / 0.17);
}

.link-card:hover .link-card__arrow {
  transform: translate(2px, -2px);
}

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

footer {
  display: grid;
  gap: 1rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--sand);
  color: var(--depth-soft);
  font-size: 0.875rem;
}

.legal-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem 1rem;
}

.legal-links a:hover {
  color: var(--depth);
}

footer p {
  margin: 0;
}

@media (max-height: 40rem) {
  .page-shell {
    padding-top: max(0.75rem, env(safe-area-inset-top));
    padding-bottom: max(0.75rem, env(safe-area-inset-bottom));
  }

  main {
    gap: 0.9rem;
    padding-block: 0.75rem;
  }

  .intro {
    gap: 0.65rem;
  }

  .profile {
    width: 7.5rem;
  }

  h1 {
    font-size: 2rem;
    line-height: 1;
  }

  .intro__copy p {
    margin-top: 0.5rem;
    font-size: 0.95rem;
  }

  .link-list {
    gap: 0.5rem;
  }

  .link-card {
    min-height: 3.5rem;
    padding: 0.6rem 0.8rem;
    font-size: 0.95rem;
  }
}

@media (min-width: 48rem) {
  .page-shell {
    padding:
      max(2rem, env(safe-area-inset-top))
      max(1.5rem, env(safe-area-inset-right))
      max(2rem, env(safe-area-inset-bottom))
      max(1.5rem, env(safe-area-inset-left));
  }

  .profile {
    width: 13rem;
  }

  .link-card {
    min-height: 4.5rem;
    padding-inline: 1.2rem;
  }

  footer {
    grid-template-columns: 1fr auto;
    align-items: end;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
  }
}

/* Aproximação web do Liquid Glass: o material nativo da Apple não existe como CSS oficial. */
@supports not ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
  .profile,
  .link-card {
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }

  .profile,
  .link-card:not(.link-card--primary) {
    background: var(--surface);
  }
}

@media (prefers-reduced-transparency: reduce) {
  .profile,
  .link-card {
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }

  .profile,
  .link-card:not(.link-card--primary) {
    background: var(--surface);
  }
}
