/* ============================================================
   Vedha Links — standalone link-in-bio page.
   Tokens, buttons and the hero slideshow are mirrored from the
   main site (vedha.ae: src/styles/typography.css + global.css).
   Keep them in sync when the main brand styles change.
   ============================================================ */

/* —— Fonts (Inter Variable, same files as @fontsource-variable/inter) —— */
@font-face {
  font-family: "Inter Variable";
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url("fonts/inter-latin-ext-wght-normal.woff2") format("woff2-variations");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Inter Variable";
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url("fonts/inter-latin-wght-normal.woff2") format("woff2-variations");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* —— Tokens —— */
:root {
  --bg: #f4f4f2;
  --card: #ffffff;
  --ink: #111111;
  --ink-soft: #6b6b6b;
  --dark: #0e0e0e;
  --line: rgba(17, 17, 17, 0.1);
  --radius: clamp(0.85rem, 1.85vw, 1.35rem);
  --gutter: clamp(1.15rem, 4.5vw, 4rem);
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);

  --font-sans: "Inter Variable", "Inter", -apple-system, "Helvetica Neue", Arial, sans-serif;
  --font-display: var(--font-sans);

  --text-2xs: max(0.6875rem, 11px);
  --text-xs: max(0.75rem, 12px);
  --text-sm: max(0.875rem, 13.5px);
  --text-md: 1rem;
  --text-lg: 1.125rem;
  --text-3xl: clamp(1.625rem, 2.2vw, 1.875rem);
  --text-4xl: clamp(1.85rem, 3.2vw, 2.5rem);

  --leading-none: 1;
  --leading-display: 1.08;
  --leading-tight: 1.18;
  --leading-snug: 1.32;
  --leading-normal: 1.5;
  --leading-relaxed: 1.65;

  --tracking-tight: -0.022em;
  --tracking-normal: -0.01em;
  --tracking-none: 0;
  --tracking-wide: 0.08em;
  --tracking-wider: 0.14em;

  --weight-light: 300;
  --weight-regular: 400;
  --weight-medium: 500;
  --weight-semibold: 600;

  /* Height of the photo window above the sheet on phones */
  --hero-h: 46svh;
  /* Width of the link panel on desktop */
  --sheet-w: min(30rem, 42vw);
  --sheet-pad: clamp(1.25rem, 5vw, 2rem);

  /* One rhythm for the whole sheet */
  --space-section: 2rem;
  --space-row: 0.625rem;
  /* Row padding = icon inset, so the icon circle sits concentric in the pill */
  --row-inset: 0.5rem;
  --row-icon: 2.75rem;

  font-size: clamp(15px, 0.92vw + 0.35rem, 16px);
}

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

html { -webkit-text-size-adjust: 100%; background: #080808; }

body {
  min-height: 100svh;
  font-family: var(--font-sans);
  font-size: var(--text-md);
  font-weight: var(--weight-regular);
  line-height: var(--leading-relaxed);
  color: var(--ink);
  background: #080808;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  overflow-x: hidden;
}

img, svg { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; touch-action: manipulation; }
ul { list-style: none; }
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; touch-action: manipulation; }
:focus-visible { outline: 2px solid currentColor; outline-offset: 3px; }
p { text-wrap: pretty; }

.visually-hidden {
  position: absolute; width: 1px; height: 1px;
  clip-path: inset(50%); overflow: hidden; white-space: nowrap;
}

.kicker {
  font-size: var(--text-xs);
  font-weight: var(--weight-medium);
  letter-spacing: var(--tracking-wider);
  line-height: var(--leading-none);
  text-transform: uppercase;
  color: var(--ink-soft);
}

/* === Buttons (same as main site) === */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6em;
  min-height: 44px;
  padding: 0.7em 1.6em;
  border: none;
  border-radius: 999px;
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  letter-spacing: var(--tracking-normal);
  line-height: var(--leading-none);
  position: relative;
  overflow: hidden;
  transition: transform 0.45s var(--ease-spring), background 0.3s, color 0.3s, box-shadow 0.35s var(--ease-out);
  -webkit-user-select: none;
  user-select: none;
}
.btn > * { position: relative; z-index: 1; }
.btn::before {
  content: "";
  position: absolute; inset: 0; z-index: 0;
  background: linear-gradient(105deg, transparent 30%, rgba(255, 255, 255, 0.16) 50%, transparent 70%);
  transform: translateX(-110%);
  transition: transform 0.7s var(--ease-out);
  pointer-events: none;
}
.btn:active { transform: scale(0.965); transition-duration: 0.12s; }
.btn--dark { background: var(--dark); color: #fff; box-shadow: 0 10px 24px rgba(0, 0, 0, 0.18); }
.btn--ghost { border: 1px solid var(--line); background: transparent; color: var(--ink); }
.btn--glass {
  color: #fff;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.22);
  -webkit-backdrop-filter: blur(14px) saturate(1.4);
  backdrop-filter: blur(14px) saturate(1.4);
}
.btn--wide { width: 100%; }
.btn svg { width: 1.15em; height: 1.15em; flex: none; }

@media (hover: hover) and (pointer: fine) {
  .btn:hover::before { transform: translateX(110%); }
  .btn:hover { transform: scale(1.045); }
  .btn--dark:hover { background: #2a2a2a; box-shadow: 0 14px 32px rgba(0, 0, 0, 0.24); }
  .btn--ghost:hover { background: var(--ink); color: #fff; }
  .btn--glass:hover { background: rgba(255, 255, 255, 0.24); }
}

/* ============ Hero slideshow (fixed backdrop) ============ */
.hero-slideshow {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  background: #080808;
}
.hero-slideshow__slide {
  position: absolute;
  inset: 0;
  margin: 0;
  overflow: hidden;
  opacity: 0;
  animation: hero-slide-fade 32s infinite;
  animation-delay: calc(var(--slide-index) * 8s - 1.6s);
  will-change: opacity, transform;
}
.hero-slideshow__slide picture { position: absolute; inset: 0; display: block; }
.hero-slideshow__slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.02);
  filter: saturate(1.1) contrast(1.06) brightness(1.03);
  animation: hero-slide-drift 32s infinite;
  animation-delay: calc(var(--slide-index) * 8s - 1.6s);
}
.hero-slideshow__veil {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 50% 48%, transparent 0%, rgba(0, 0, 0, 0.04) 58%, rgba(0, 0, 0, 0.22) 100%),
    linear-gradient(180deg, rgba(0, 0, 0, 0.18), transparent 42%, rgba(0, 0, 0, 0.1));
  pointer-events: none;
}
/* Glass Vedha mark — fixed while the photo flows underneath */
.hero-slideshow__mark {
  position: absolute;
  inset: 0;
  margin: auto;
  width: min(29vw, 19rem);
  aspect-ratio: 566 / 493;
  background-image:
    radial-gradient(circle at 24% 17%, rgba(255, 255, 255, 0.88), transparent 31%),
    linear-gradient(125deg, rgba(255, 255, 255, 0.36), rgba(255, 255, 255, 0.08) 42%, rgba(205, 229, 255, 0.28) 72%, rgba(255, 225, 184, 0.2));
  background-color: rgba(255, 255, 255, 0.1);
  background-position: 18% 20%, 50% 50%;
  background-size: 160% 160%, 220% 220%;
  -webkit-mask: url("images/vedha-mark-mask.svg") center / contain no-repeat;
  mask: url("images/vedha-mark-mask.svg") center / contain no-repeat;
  -webkit-backdrop-filter: blur(12px) saturate(1.65) contrast(1.08);
  backdrop-filter: blur(12px) saturate(1.65) contrast(1.08);
  filter:
    drop-shadow(0 1px 0 rgba(255, 255, 255, 0.78))
    drop-shadow(0 0 1.25rem rgba(224, 240, 255, 0.3))
    drop-shadow(0 0 3.8rem rgba(120, 190, 255, 0.2));
  opacity: 0;
  animation:
    hero-mark-merge 32s infinite,
    hero-mark-flow 10s ease-in-out infinite;
  animation-delay: calc(var(--slide-index) * 8s - 1.6s);
  will-change: opacity, background-position, filter;
}
.hero-slideshow__mark::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(105deg, transparent 24%, rgba(255, 255, 255, 0.18) 38%, rgba(255, 255, 255, 0.82) 49%, rgba(225, 242, 255, 0.2) 61%, transparent 74%);
  background-size: 220% 100%;
  background-position: 130% 0;
  -webkit-mask: url("images/vedha-mark-mask.svg") center / contain no-repeat;
  mask: url("images/vedha-mark-mask.svg") center / contain no-repeat;
  mix-blend-mode: screen;
  opacity: 0.72;
  animation: hero-mark-sheen 5s ease-in-out infinite;
}
.hero-slideshow__title {
  position: absolute;
  z-index: 1;
  left: max(var(--gutter), env(safe-area-inset-left));
  bottom: max(2rem, calc(env(safe-area-inset-bottom) + 1.25rem));
  color: rgba(255, 255, 255, 0.42);
  font-family: var(--font-display);
  font-size: var(--text-4xl);
  font-weight: var(--weight-light);
  letter-spacing: var(--tracking-tight);
  line-height: var(--leading-display);
  text-shadow: 0 1px 18px rgba(0, 0, 0, 0.22);
  mix-blend-mode: screen;
  pointer-events: none;
}

@keyframes hero-slide-fade {
  0% { opacity: 0; }
  5%, 25% { opacity: 1; }
  30%, 100% { opacity: 0; }
}
@keyframes hero-slide-drift {
  0%, 4% { transform: scale(1.1); }
  28%, 100% { transform: scale(1.02); }
}
@keyframes hero-mark-merge {
  0% { opacity: 0; filter: drop-shadow(0 0 0 rgba(255, 255, 255, 0)); }
  5%, 25% { opacity: 1; filter: drop-shadow(0 0 2.5rem rgba(255, 255, 255, 0.32)); }
  30%, 100% { opacity: 0; filter: drop-shadow(0 0 0 rgba(255, 255, 255, 0)); }
}
@keyframes hero-mark-flow {
  0%, 100% { background-position: 18% 20%, 45% 48%; }
  50% { background-position: 76% 66%, 58% 44%; }
}
@keyframes hero-mark-sheen {
  0%, 25% { background-position: 130% 0; }
  70%, 100% { background-position: -35% 0; }
}

/* ============ Page layout ============ */
.topbar {
  position: absolute;
  z-index: 3;
  top: max(1rem, env(safe-area-inset-top));
  right: max(1rem, env(safe-area-inset-right));
}
.topbar .btn { min-height: 40px; padding: 0.6em 1.1em; font-size: var(--text-xs); }

.page {
  position: relative;
  z-index: 1;
  min-height: 100svh;
}
/* Transparent window onto the slideshow (phones) */
.page__hero { height: var(--hero-h); }

.sheet {
  position: relative;
  min-height: calc(100svh - var(--hero-h) + 2rem);
  margin-top: -1.5rem;
  padding: 3.25rem var(--sheet-pad) max(2rem, calc(env(safe-area-inset-bottom) + 1.5rem));
  background: var(--bg);
  border-radius: calc(var(--radius) * 1.6) calc(var(--radius) * 1.6) 0 0;
  box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.16);
  display: grid;
  align-content: start;
  gap: var(--space-section);
}
.sheet::before {
  content: "";
  position: absolute;
  top: 0.6rem;
  left: 50%;
  width: 2.5rem;
  height: 4px;
  border-radius: 999px;
  background: rgba(17, 17, 17, 0.12);
  transform: translateX(-50%);
}

/* —— Intro —— */
.intro {
  display: grid;
  justify-items: center;
  gap: 0.75rem;
  text-align: center;
}
.intro__wordmark {
  width: 9.5rem;
  filter: brightness(0.07);
  margin-bottom: 0.5rem;
}
.intro__headline {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 6vw, 1.75rem);
  font-weight: var(--weight-semibold);
  letter-spacing: var(--tracking-tight);
  line-height: var(--leading-tight);
  max-width: 20ch;
  text-wrap: balance;
}
.intro__subline {
  color: var(--ink-soft);
  font-size: var(--text-sm);
  line-height: var(--leading-snug);
  max-width: 32ch;
  text-wrap: balance;
}

/* —— Quick actions: call / WhatsApp / email —— */
.quick {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
}
.quick__item {
  display: grid;
  justify-items: center;
  gap: 0.5rem;
  color: var(--ink-soft);
  font-size: var(--text-xs);
  font-weight: var(--weight-medium);
  letter-spacing: var(--tracking-normal);
  line-height: var(--leading-none);
  text-align: center;
  transition: color 0.3s;
}
.quick__icon {
  display: grid;
  place-items: center;
  width: 3.25rem;
  height: 3.25rem;
  border-radius: 50%;
  background: var(--card);
  border: 1px solid var(--line);
  color: var(--ink);
  transition: transform 0.45s var(--ease-spring), background 0.3s, color 0.3s, border-color 0.3s;
}
.quick__icon svg { width: 1.2rem; height: 1.2rem; }
.quick__item:active .quick__icon { transform: scale(0.94); transition-duration: 0.12s; }

/* —— Link list —— */
.links { display: grid; gap: var(--space-row); }

.link {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 0.875rem;
  padding: var(--row-inset) calc(var(--row-inset) + 1rem) var(--row-inset) var(--row-inset);
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 999px;
  position: relative;
  overflow: hidden;
  transition: transform 0.45s var(--ease-spring), background 0.3s, color 0.3s, border-color 0.3s, box-shadow 0.35s var(--ease-out);
}
.link::before {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(105deg, transparent 30%, rgba(17, 17, 17, 0.05) 50%, transparent 70%);
  transform: translateX(-110%);
  transition: transform 0.7s var(--ease-out);
  pointer-events: none;
}
.link__icon {
  display: grid;
  place-items: center;
  width: var(--row-icon);
  height: var(--row-icon);
  border-radius: 50%;
  background: var(--bg);
  color: var(--ink);
  transition: background 0.3s, color 0.3s;
}
.link__icon svg { width: 1.125rem; height: 1.125rem; }
.link__text { display: grid; gap: 0.125rem; min-width: 0; }
.link__title,
.link__sub {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.link__title {
  font-size: var(--text-md);
  font-weight: var(--weight-medium);
  letter-spacing: var(--tracking-normal);
  line-height: var(--leading-tight);
}
.link__sub {
  color: var(--ink-soft);
  font-size: var(--text-xs);
  line-height: var(--leading-snug);
  transition: color 0.3s;
}
.link__arrow { width: 1rem; height: 1rem; color: var(--ink-soft); transition: transform 0.35s var(--ease-out), color 0.3s; }
.link:active { transform: scale(0.975); transition-duration: 0.12s; }

/* Primary row (save contact) */
.link--dark {
  background: var(--dark);
  border-color: var(--dark);
  color: #fff;
}
.link--dark::before { background: linear-gradient(105deg, transparent 30%, rgba(255, 255, 255, 0.16) 50%, transparent 70%); }
.link--dark .link__icon { background: rgba(255, 255, 255, 0.12); color: #fff; }
.link--dark .link__sub,
.link--dark .link__arrow { color: rgba(255, 255, 255, 0.6); }

@media (hover: hover) and (pointer: fine) {
  .quick__item:hover { color: var(--ink); }
  .quick__item:hover .quick__icon { transform: scale(1.06); background: var(--dark); border-color: var(--dark); color: #fff; }
  .link:hover::before { transform: translateX(110%); }
  .link:hover { transform: scale(1.015); border-color: rgba(17, 17, 17, 0.24); }
  .link:hover .link__icon { background: var(--ink); color: #fff; }
  .link:hover .link__arrow { transform: translate(2px, -2px); color: var(--ink); }
  .link--dark:hover { background: #2a2a2a; border-color: #2a2a2a; }
  .link--dark:hover .link__icon { background: #fff; color: var(--ink); }
  .link--dark:hover .link__arrow { color: #fff; }
}

/* —— Footer —— */
.foot {
  display: grid;
  justify-items: center;
  gap: 0.25rem;
  text-align: center;
  color: var(--ink-soft);
  font-size: var(--text-xs);
  line-height: var(--leading-normal);
}
.foot a { text-decoration: underline; text-underline-offset: 0.2em; text-decoration-color: rgba(17, 17, 17, 0.25); }

/* —— Toast (share / copy feedback) —— */
.toast {
  position: fixed;
  z-index: 5;
  left: 50%;
  bottom: max(1.5rem, calc(env(safe-area-inset-bottom) + 1rem));
  padding: 0.7rem 1.2rem;
  border-radius: 999px;
  background: var(--dark);
  color: #fff;
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.24);
  opacity: 0;
  transform: translate(-50%, 0.75rem);
  transition: opacity 0.3s var(--ease-out), transform 0.4s var(--ease-spring);
  pointer-events: none;
}
.toast.is-visible { opacity: 1; transform: translate(-50%, 0); }

/* —— Entrance —— */
.sheet > * {
  animation: rise 0.8s var(--ease-out) both;
  animation-delay: calc(var(--i, 0) * 70ms + 120ms);
}
@keyframes rise {
  from { opacity: 0; transform: translateY(1.1rem); filter: blur(6px); }
  to { opacity: 1; transform: none; filter: none; }
}

/* ============ Phones: keep the mark + title inside the photo window ============ */
@media (max-width: 47.99rem) {
  .hero-slideshow__mark {
    top: max(1.5rem, env(safe-area-inset-top));
    bottom: calc(100svh - var(--hero-h) + 1.5rem);
    width: min(40vw, 10.5rem);
  }
  .hero-slideshow__title {
    top: calc(var(--hero-h) - 4.75rem);
    bottom: auto;
    left: max(1.15rem, env(safe-area-inset-left));
    font-size: var(--text-3xl);
  }
}

/* ============ Desktop: link panel floats right, photo fills the rest ============ */
@media (min-width: 48rem) {
  .page {
    display: flex;
    justify-content: flex-end;
    padding: var(--gutter);
    padding-top: max(var(--gutter), 4.5rem);
  }
  .page__hero { display: none; }
  .sheet {
    width: var(--sheet-w);
    min-height: auto;
    margin: 0;
    padding: 3.25rem 2rem 2.5rem;
    border-radius: calc(var(--radius) * 1.4);
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.35);
    align-self: flex-start;
  }
  .sheet::before { display: none; }
  .hero-slideshow__mark { right: calc(var(--sheet-w) + var(--gutter)); }
  .topbar { position: fixed; left: max(var(--gutter), env(safe-area-inset-left)); right: auto; top: var(--gutter); }
}

@media (prefers-reduced-motion: reduce) {
  .hero-slideshow__slide,
  .hero-slideshow__slide img,
  .hero-slideshow__mark,
  .hero-slideshow__mark::after,
  .sheet > * { animation: none; }
  .hero-slideshow__slide:first-child,
  .hero-slideshow__slide:first-child .hero-slideshow__mark { opacity: 1; }
}
