/*
  connect.css — the /connect links page (Instagram / TikTok bio, QR codes).
  Standalone and small on purpose: this page must open instantly on a phone,
  so it does not load the full site stylesheet. Colours, fonts and focus
  styles match assets/css/style.css.

  Hierarchy: one strong WhatsApp action > a compact contact group (Call,
  Website, Email) > a lighter social list > a one-line footer.
  Every animation is transform/opacity only (compositor, no main-thread cost).
*/
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("../fonts/inter-latin-var.woff2") format("woff2");
  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;
}

@font-face {
  font-family: "Space Grotesk";
  font-style: normal;
  font-weight: 500 700;
  font-display: swap;
  src: url("../fonts/space-grotesk-latin-var.woff2") format("woff2");
  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;
}

:root {
  --bg: #070404;
  --surface: linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.025));
  --surface-hover: linear-gradient(180deg, rgba(255, 255, 255, 0.085), rgba(255, 255, 255, 0.04));
  --line: rgba(255, 255, 255, 0.085);
  --line-soft: rgba(255, 255, 255, 0.07);
  --line-red: rgba(255, 90, 96, 0.45);
  --text: #ffffff;
  --muted: #b5b5b5;
  --red: #c52328;
  --red-deep: #a8131d;
  --red-text: #ff5a60; /* AA-contrast tint of the brand red for small text */
  --font-heading: "Space Grotesk", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --font-body: "Inter", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  --page: min(100% - 32px, 440px);
  color-scheme: dark;
}

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

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

body {
  position: relative;
  display: flex;
  flex-direction: column;
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  background:
    radial-gradient(ellipse 80% 38% at 50% 108%, rgba(197, 35, 40, 0.1), transparent 62%),
    var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  line-height: 1.5;
  overflow-x: hidden;
}

/* Ambient red light behind the logo. A separate fixed layer that drifts
   very slowly with transform only, so it never repaints the page. */
body::before {
  content: "";
  position: fixed;
  z-index: -1;
  top: -32vh;
  left: 50%;
  width: max(720px, 150vw);
  height: 78vh;
  margin-left: calc(max(720px, 150vw) / -2);
  background: radial-gradient(closest-side, rgba(197, 35, 40, 0.34), rgba(197, 35, 40, 0.08) 60%, transparent);
  pointer-events: none;
  animation: glowDrift 18s ease-in-out infinite alternate;
}

@keyframes glowDrift {
  from { transform: translate3d(-4%, 0, 0) scale(1); }
  to { transform: translate3d(4%, 3vh, 0) scale(1.06); }
}

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

a {
  color: inherit;
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
}

h1, h2 {
  margin: 0;
}

p {
  margin: 0;
}

ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

:focus-visible {
  outline: 2px solid rgba(255, 90, 96, 0.95);
  outline-offset: 3px;
}

.skip-link {
  position: fixed;
  top: 0.75rem;
  left: 0.75rem;
  z-index: 10;
  padding: 0.75rem 1.1rem;
  border-radius: 12px;
  background: #fff;
  color: #111;
  font-weight: 700;
  transform: translateY(-200%);
}

.skip-link:focus {
  transform: none;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

svg.icon--stroke {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

svg.icon--fill {
  fill: currentColor;
}

/* ---------- layout (mobile first) ---------- */
.connect {
  width: var(--page);
  margin: 0 auto;
  padding-top: max(clamp(1.75rem, 6vh, 3rem), env(safe-area-inset-top));
}

/* ---------- intro ---------- */
.connect-intro {
  display: grid;
  justify-items: center;
  text-align: center;
}

.connect-logo {
  display: grid;
  place-items: center;
  width: 84px;
  height: 84px;
  margin-bottom: 1.05rem;
  border-radius: 24px;
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.025));
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.12),
    0 16px 40px rgba(0, 0, 0, 0.5),
    0 0 48px rgba(197, 35, 40, 0.2);
  transition: transform 0.4s var(--ease);
}

.connect-logo img {
  width: 56px;
  height: 56px;
}

.connect-logo:hover {
  transform: translateY(-2px);
}

.connect-name {
  font-family: var(--font-heading);
  font-size: clamp(1.6rem, 1.25rem + 1.8vw, 2rem);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  /* optical centring: letter-spacing adds space after the last letter */
  margin-right: -0.16em;
}

.connect-lead {
  max-width: 27ch;
  margin-top: 0.7rem;
  color: rgba(255, 255, 255, 0.86);
  font-size: 1.02rem;
  line-height: 1.55;
  text-wrap: balance;
}

.connect-local {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  margin-top: 0.8rem;
  color: var(--red-text);
  font-size: 0.95rem;
  font-weight: 500;
}

.connect-local::before,
.connect-local::after {
  content: "";
  width: 16px;
  height: 1px;
  background: currentColor;
  opacity: 0.55;
}

/* ---------- primary: WhatsApp ---------- */
.connect-actions {
  display: grid;
  gap: 0.7rem;
  margin-top: 1.75rem;
}

.connect-primary {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.9rem;
  min-height: 70px;
  padding: 0.7rem 0.85rem 0.7rem 0.75rem;
  border-radius: 20px;
  border: 1px solid rgba(255, 140, 140, 0.32);
  background: linear-gradient(135deg, #d52b31 0%, #b3171f 55%, #8f1119 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.22),
    0 16px 34px -10px rgba(197, 35, 40, 0.6),
    0 2px 8px rgba(0, 0, 0, 0.35);
  overflow: hidden;
  isolation: isolate;
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease);
}

/* one soft light sweep shortly after load, and again on hover */
.connect-primary::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(110deg, transparent 30%, rgba(255, 255, 255, 0.2) 48%, transparent 66%);
  transform: translateX(-120%);
  animation: sweep 1.4s var(--ease) 0.95s both;
  pointer-events: none;
}

.connect-primary:hover {
  transform: translateY(-2px);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.24),
    0 22px 44px -10px rgba(197, 35, 40, 0.7),
    0 2px 8px rgba(0, 0, 0, 0.35);
}

.connect-primary:hover::after {
  animation: sweep 0.9s var(--ease) both;
}

@keyframes sweep {
  to { transform: translateX(120%); }
}

.connect-primary-icon {
  flex: 0 0 auto;
  width: 46px;
  height: 46px;
  border-radius: 13px;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.3);
}

.connect-primary-icon img {
  width: 46px;
  height: 46px;
  border-radius: inherit;
}

.connect-primary-text {
  display: grid;
  flex: 1 1 auto;
  min-width: 0;
  line-height: 1.25;
}

.connect-primary-text strong {
  font-family: var(--font-heading);
  font-size: 1.24rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.connect-primary-text span {
  color: rgba(255, 255, 255, 0.84);
  font-size: 0.82rem;
}

.connect-primary-arrow {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.14);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.16);
}

.connect-primary-arrow svg {
  width: 18px;
  height: 18px;
  transition: transform 0.3s var(--ease);
}

.connect-primary:hover .connect-primary-arrow svg {
  transform: translateX(2px);
}

/* ---------- secondary: Call / Website / Email ---------- */
.connect-tiles {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.6rem;
}

.connect-tiles-wide {
  grid-column: 1 / -1;
}

.connect-tile {
  position: relative;
  display: grid;
  align-content: start;
  height: 100%;
  min-height: 52px;
  padding: 0.8rem 0.85rem 0.85rem;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: var(--surface);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04), 0 10px 24px -14px rgba(0, 0, 0, 0.8);
  transition: transform 0.3s var(--ease), border-color 0.25s ease, background 0.25s ease;
}

.connect-tile-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 0.6rem;
}

.connect-tile-icon {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: rgba(197, 35, 40, 0.14);
  color: var(--red-text);
  transition: transform 0.3s var(--ease), background 0.25s ease;
}

.connect-tile-icon svg {
  width: 18px;
  height: 18px;
}

.connect-tile-arrow {
  flex: 0 0 auto;
  width: 16px;
  height: 16px;
  color: rgba(255, 255, 255, 0.4);
  transition: transform 0.3s var(--ease), color 0.25s ease;
}

.connect-tile strong {
  font-size: 0.96rem;
  font-weight: 600;
  line-height: 1.3;
}

.connect-tile-detail {
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.35;
  white-space: nowrap;
}

/* Email: one wide row, icon on the left, so the long address has room */
.connect-tile--wide {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  padding: 0.75rem 0.95rem 0.75rem 0.85rem;
}

.connect-tile-text {
  display: grid;
  flex: 1 1 auto;
  min-width: 0;
}

.connect-tile--wide .connect-tile-detail {
  font-size: 0.84rem;
  white-space: normal;
  overflow-wrap: anywhere; /* last resort; <wbr> prefers a break before "@" */
}

.connect-tile:hover {
  transform: translateY(-2px);
  border-color: var(--line-red);
  background: var(--surface-hover);
}

.connect-tile:hover .connect-tile-icon {
  transform: scale(1.06);
  background: rgba(197, 35, 40, 0.22);
}

.connect-tile:hover .connect-tile-arrow {
  color: #fff;
  transform: translate(2px, -2px);
}

/* ---------- social ---------- */
.connect-social {
  margin-top: 2.1rem;
}

.connect-section-title {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  margin-bottom: 0.4rem;
  color: rgba(255, 255, 255, 0.62);
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  white-space: nowrap;
}

.connect-section-title::before,
.connect-section-title::after {
  content: "";
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.14));
}

.connect-section-title::after {
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.14), transparent);
}

/* lighter than the contact tiles: no filled surface, hairline dividers */
.connect-social-list li + li {
  border-top: 1px solid var(--line-soft);
}

.connect-social-link {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  min-height: 60px;
  padding: 0.5rem 0.35rem;
  border-radius: 14px;
  transition: background 0.25s ease;
}

.connect-social-icon {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #fff;
  transition: transform 0.3s var(--ease), border-color 0.25s ease, background 0.25s ease, color 0.25s ease;
}

.connect-social-icon svg {
  width: 19px;
  height: 19px;
}

.connect-social-text {
  display: grid;
  flex: 1 1 auto;
  min-width: 0;
  line-height: 1.3;
}

.connect-social-text strong {
  font-size: 0.95rem;
  font-weight: 600;
}

.connect-social-text span {
  color: var(--muted);
  font-size: 0.82rem;
}

.connect-social-arrow {
  flex: 0 0 auto;
  width: 16px;
  height: 16px;
  margin-right: 0.3rem;
  color: rgba(255, 255, 255, 0.35);
  transition: transform 0.3s var(--ease), color 0.25s ease;
}

.connect-social-link:hover {
  background: rgba(255, 255, 255, 0.035);
}

.connect-social-link:hover .connect-social-icon {
  transform: scale(1.06);
  border-color: var(--line-red);
  background: rgba(197, 35, 40, 0.16);
  color: var(--red-text);
}

.connect-social-link:hover .connect-social-arrow {
  color: #fff;
  transform: translate(2px, -2px);
}

/* ---------- footer ---------- */
.connect-footer {
  width: var(--page);
  margin: auto auto 0;
  padding: 2.25rem 0 max(1.5rem, env(safe-area-inset-bottom));
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.78rem;
  letter-spacing: 0.02em;
  text-align: center;
}

/* ---------- entrance (pure CSS, starts with the first paint) ---------- */
@keyframes rise {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: none; }
}

@keyframes settle {
  from { transform: translateY(8px) scale(0.94); }
  to { transform: none; }
}

@keyframes lift {
  from { transform: translateY(10px); }
  to { transform: none; }
}

/* The logo and intro text only move (never invisible), so they are painted
   in the very first frame and do not delay the largest contentful paint.
   Actions then appear in sequence; the whole entrance is under a second. */
.connect-logo { animation: settle 0.7s var(--ease) backwards; }
.connect-name { animation: lift 0.65s var(--ease) 0.04s backwards; }
.connect-lead { animation: lift 0.65s var(--ease) 0.09s backwards; }
.connect-local { animation: lift 0.65s var(--ease) 0.14s backwards; }

.connect-primary,
.connect-tiles > li,
.connect-social,
.connect-footer {
  animation: rise 0.6s var(--ease) backwards;
}

.connect-primary { animation-delay: 0.2s; }
.connect-tiles > li:nth-child(1) { animation-delay: 0.27s; }
.connect-tiles > li:nth-child(2) { animation-delay: 0.32s; }
.connect-tiles > li:nth-child(3) { animation-delay: 0.37s; }
.connect-social { animation-delay: 0.44s; }
.connect-footer { animation-delay: 0.5s; }

/* ---------- small phones (320–359px) ---------- */
@media (max-width: 359px) {
  /* keep the Lebanese line and its dashes on one line */
  .connect-local {
    gap: 0.45rem;
    font-size: 0.88rem;
  }

  .connect-local::before,
  .connect-local::after {
    width: 10px;
  }

  .connect-tile {
    padding: 0.75rem 0.75rem 0.8rem;
  }

  .connect-tile-detail {
    font-size: 0.76rem;
  }

  /* the arrow is decorative; dropping it here lets the email fit on one line */
  .connect-tile--wide {
    gap: 0.7rem;
  }

  .connect-tile--wide .connect-tile-arrow {
    display: none;
  }

  .connect-tile--wide .connect-tile-detail {
    font-size: 0.8rem;
  }

  .connect-primary-text strong {
    font-size: 1.16rem;
  }
}

/* ---------- larger screens: same column, a little more room ---------- */
@media (min-width: 640px) {
  :root {
    --page: min(100% - 64px, 480px);
  }

  .connect {
    padding-top: clamp(3rem, 9vh, 5.5rem);
  }

  .connect-logo {
    width: 92px;
    height: 92px;
    border-radius: 26px;
  }

  .connect-logo img {
    width: 60px;
    height: 60px;
  }

  .connect-actions {
    margin-top: 2rem;
  }

  .connect-primary {
    min-height: 74px;
  }

  .connect-tile-detail {
    font-size: 0.84rem;
  }
}

/* ---------- touch, reduced motion, print ---------- */
@media (hover: none) {
  .connect-logo:hover,
  .connect-primary:hover,
  .connect-tile:hover,
  .connect-tile:hover .connect-tile-icon,
  .connect-tile:hover .connect-tile-arrow,
  .connect-primary:hover .connect-primary-arrow svg,
  .connect-social-link:hover .connect-social-icon,
  .connect-social-link:hover .connect-social-arrow {
    transform: none;
  }

  .connect-primary:hover::after {
    animation: none;
  }

  /* a quick pressed state instead of hover on phones */
  .connect-primary:active,
  .connect-tile:active {
    transform: scale(0.985);
  }

  .connect-social-link:active {
    background: rgba(255, 255, 255, 0.05);
  }
}

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

@media print {
  body {
    background: #fff;
    color: #000;
  }

  body::before {
    display: none;
  }
}
