/* UI/UX Pro Max polish layer: accessibility, alignment, responsive finish. */
:root {
  --ae-focus-ring: 0 0 0 3px rgb(var(--gold-rgb) / 0.24);
  --ae-focus-border: 0 0 0 1px rgb(var(--gold-dark-rgb) / 0.28), var(--ae-focus-ring);
  --ae-soft-shadow: 0 22px 70px rgb(var(--text-rgb) / 0.07);
  --ae-soft-shadow-hover: 0 28px 90px rgb(var(--text-rgb) / 0.1);
}

html,
body,
#root {
  max-width: 100%;
  overflow-x: clip;
}

html {
  background: var(--bg);
}

body {
  min-width: 320px;
  text-rendering: optimizeLegibility;
}

::selection {
  background: rgb(var(--gold-rgb) / 0.24);
  color: var(--text);
}

.ae-skip-link {
  position: fixed;
  top: 0.75rem;
  left: 50%;
  z-index: 9999;
  transform: translate(-50%, -145%);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--ae-soft-shadow);
  padding: 0.85rem 1.1rem;
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.ae-skip-link:focus-visible {
  transform: translate(-50%, 0);
  box-shadow: var(--ae-focus-border);
}

:where(a[href], button, [role="button"], input, select, textarea) {
  -webkit-tap-highlight-color: rgb(var(--gold-rgb) / 0.16);
}

:where(a[href], button, [role="button"]) {
  touch-action: manipulation;
}

:where(a[href], button, [role="button"]):not(.ae-skip-link) {
  min-height: 44px;
}

:where(button, [role="button"], a[href], input, select, textarea):focus-visible {
  outline: 0;
  box-shadow: var(--ae-focus-border) !important;
}

:where(input, select, textarea) {
  min-height: 48px;
  caret-color: var(--gold-dark);
}

:where(input, select, textarea):focus {
  border-color: var(--gold) !important;
}

button:disabled,
[aria-disabled="true"] {
  cursor: not-allowed !important;
  opacity: 0.62 !important;
}

a[href] {
  text-underline-offset: 0.22em;
}

header {
  -webkit-backdrop-filter: blur(18px) saturate(1.08);
  backdrop-filter: blur(18px) saturate(1.08);
}

header a[href],
header button {
  min-height: 44px;
}

header nav a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

main,
section[id] {
  scroll-margin-top: 7rem;
}

section[id] > div,
main > div,
footer > div,
header > div {
  margin-inline: auto;
}

:where(.text-center) > :where(h1, h2, h3, p, .gold-divider),
section[id] :where(h1, h2),
main :where(h1, h2) {
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}

.center-tracked {
  display: flex !important;
  justify-content: center;
  align-items: center;
  width: 100%;
  max-width: 100%;
  padding-left: var(--tracked-indent, 0.28em);
  text-align: center;
  text-indent: 0 !important;
  overflow-wrap: anywhere;
}

:where(h1, h2, h3) {
  text-wrap: balance;
}

:where(p, li) {
  text-wrap: pretty;
}

[class*="shadow-elegant"] {
  box-shadow: var(--ae-soft-shadow) !important;
}

[class*="border-border"],
[class*="border-accent"] {
  border-color: var(--border) !important;
}

[class*="bg-card"],
[class*="bg-secondary/30"],
[class*="bg-background/70"],
[class*="bg-background/60"] {
  transition: box-shadow 220ms ease, transform 220ms ease, border-color 220ms ease;
}

@media (hover: hover) and (pointer: fine) {
  [class*="shadow-elegant"]:hover {
    box-shadow: var(--ae-soft-shadow-hover) !important;
  }

  a[href]:hover,
  button:hover {
    transition-duration: 180ms;
  }
}

img {
  background-color: var(--surface);
}

img[src*="img4.jpg"],
img[src*="img5.jpg"],
img[src*="img6.jpg"],
img[src*="img7.jpg"] {
  object-fit: cover;
}

img[src*="img4.jpg"] {
  object-position: center 18% !important;
}

img[src*="img5.jpg"] {
  object-position: center 14% !important;
}

img[src*="img6.jpg"] {
  object-position: center 30% !important;
}

img[src*="img7.jpg"] {
  object-position: center top !important;
}

img[src*="gallery-"] {
  object-position: center center;
}

form label,
[class*="uppercase"][class*="tracking"] {
  letter-spacing: min(0.28em, 0.24rem);
}

form button[type="submit"],
form button:not([type]),
a[class*="bg-accent"],
button[class*="bg-accent"] {
  min-height: 48px;
}

textarea {
  line-height: 1.65;
}

[class*="grid-cols-[6rem_1fr]"] {
  align-items: start;
}

[class*="break-words"] {
  overflow-wrap: anywhere;
}

@media (max-width: 767px) {
  html {
    scroll-padding-top: 5.75rem;
  }

  main,
  section[id] {
    scroll-margin-top: 5.75rem;
  }

  section[id] {
    padding-top: clamp(5rem, 14vw, 6.5rem) !important;
    padding-bottom: clamp(5rem, 14vw, 6.5rem) !important;
  }

  main > div,
  section[id] > div {
    padding-left: max(1.2rem, env(safe-area-inset-left));
    padding-right: max(1.2rem, env(safe-area-inset-right));
  }

  :where(h1) {
    font-size: clamp(2.55rem, 12vw, 4.1rem) !important;
    line-height: 0.98 !important;
  }

  :where(h2) {
    font-size: clamp(2.2rem, 10vw, 3.45rem) !important;
    line-height: 1.04 !important;
  }

  .center-tracked {
    font-size: 0.72rem;
    line-height: 1.7;
    letter-spacing: min(0.24em, 0.22rem) !important;
  }

  .h-screen {
    width: 100vw !important;
    max-width: 100vw !important;
    min-width: 0 !important;
    overflow: hidden !important;
  }

  main > section:first-of-type h1 {
    max-width: 100%;
    font-size: clamp(2.35rem, 10.5vw, 3rem) !important;
    line-height: 1.05 !important;
    white-space: normal;
  }

  main > section:first-of-type [class*="max-w-2xl"] {
    max-width: min(100%, 21rem) !important;
  }

  main > section:first-of-type p {
    overflow-wrap: normal;
  }

  main > section:first-of-type a[class*="bg-accent"],
  main > section:first-of-type button[class*="bg-accent"] {
    width: min(100%, 20rem);
    padding-left: 1rem;
    padding-right: 1rem;
    white-space: normal;
  }

  .h-screen > .relative.z-10 {
    box-sizing: border-box;
    width: 100vw !important;
    max-width: 100vw !important;
    margin-left: calc(50% - 50vw) !important;
    margin-right: calc(50% - 50vw) !important;
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }

  .h-screen .relative.z-10 {
    transform: translateX(-14vw) !important;
  }

  .h-screen [class*="left-1/2"][class*="top-28"],
  .h-screen [class*="left-1/2"][class*="bottom-10"] {
    transform: translateX(calc(-50% - 14vw)) !important;
  }

  .h-screen h1 {
    max-width: 8.6ch;
    margin-left: auto;
    margin-right: auto;
    font-size: clamp(1.85rem, 8vw, 2.2rem) !important;
    line-height: 1.08 !important;
  }

  .h-screen [class*="max-w-2xl"] {
    max-width: 16rem !important;
  }

  .h-screen p {
    font-size: 0.82rem !important;
    line-height: 1.55;
  }

  .h-screen a[class*="bg-accent"],
  .h-screen button[class*="bg-accent"] {
    width: auto;
    max-width: 16rem;
    padding-left: 1.1rem !important;
    padding-right: 1.1rem !important;
    font-size: 0.82rem !important;
    letter-spacing: 0.16em !important;
  }

  [class*="rounded-2xl"] {
    border-radius: 0.95rem !important;
  }
}

@media (max-width: 520px) {
  [class*="grid-cols-[6rem_1fr]"] {
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 0.35rem !important;
  }

  [class*="grid-cols-[6rem_1fr]"] span {
    line-height: 1.4;
  }

  [class*="tracking-[0."] {
    letter-spacing: min(0.22em, 0.2rem) !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.001ms !important;
  }
}
