/* ===========================================
   SAM EL HINDY — Personal Links
   links.colartdigitalmarketingagency.com/samelhindy/
   Monochrome, editorial. The SH monogram signs itself.
=========================================== */

:root {
  --ink:     #1b1819;
  --ink-2:   #3a3637;
  --muted:   #8a8484;
  --paper:   #f3f1ee;
  --card:    rgba(255, 255, 255, .62);
  --line:    rgba(27, 24, 25, .12);
  --line-hi: rgba(27, 24, 25, .3);
  --wa:      #25d366;

  --font: 'Poppins', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --serif: 'Cormorant Garamond', Georgia, serif;
  --ease: cubic-bezier(.16, 1, .3, 1);
  --sweep: cubic-bezier(.77, 0, .175, 1);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; overflow-x: hidden; }
body {
  font-family: var(--font);
  font-weight: 400;
  color: var(--ink);
  background: var(--paper) url('assets/concrete.webp') center top / 1100px auto repeat;
  line-height: 1.55;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
img, svg { display: block; max-width: 100%; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
:focus-visible { outline: 1.5px solid var(--ink); outline-offset: 4px; }

/* ============ TOP BAR ============ */
.topbar {
  width: 100%;
  max-width: 520px;
  margin: 0 auto;
  padding: 18px 22px 0;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}
.icon-btn {
  height: 40px;
  min-width: 40px;
  padding: 0 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid var(--line-hi);
  background: var(--card);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: .18em;
  text-transform: uppercase;
  transition: background .35s, color .35s, border-color .35s;
}
.icon-btn--sq { padding: 0; width: 40px; }
.icon-btn:hover { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.icon-btn svg { width: 16px; height: 16px; }

/* ============ PAGE ============ */
.page {
  flex: 1;
  width: 100%;
  max-width: 520px;
  margin: 0 auto;
  padding: 0 22px 64px;
}

/* ============ IDENTITY ============ */
.identity { text-align: center; padding-top: 18px; }
.mono { width: clamp(118px, 34vw, 148px); margin: 0 auto; }
.mono svg { width: 100%; height: auto; overflow: visible; }
.mono path { fill: var(--ink); stroke: var(--ink); stroke-width: 5; stroke-linejoin: round; }

.name {
  margin-top: 26px;
  font-size: clamp(17px, 4.8vw, 21px);
  font-weight: 400;
  letter-spacing: .42em;
  text-indent: .42em;          /* balances the trailing letter-space */
  text-transform: uppercase;
  white-space: nowrap;
}
.rule {
  width: min(240px, 62%);
  height: 1px;
  margin: 16px auto 14px;
  background: var(--ink);
  transform-origin: center;
}
.title {
  font-size: 11px;
  font-weight: 400;
  letter-spacing: .34em;
  text-indent: .34em;
  text-transform: uppercase;
  color: var(--ink-2);
  line-height: 2;
}
.ceo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 22px;
  padding: 9px 16px 9px 10px;
  border: 1px solid var(--line-hi);
  background: var(--card);
  font-size: 13px;
  transition: background .35s, color .35s, border-color .35s;
}
.ceo img { width: 26px; height: 26px; }
.ceo b { font-weight: 600; }
.ceo:hover { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.ceo:hover img { filter: brightness(0) invert(1); }

/* ============ SECTIONS ============ */
.label {
  display: flex;
  align-items: baseline;
  gap: 14px;
  margin: 46px 0 6px;
}
.label__no { font-family: var(--serif); font-style: italic; font-size: 15px; color: var(--muted); }
.label__t {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: .3em;
  text-transform: uppercase;
}
.label::after { content: ''; flex: 1; height: 1px; background: var(--line-hi); transform: translateY(-3px); }

.rows { list-style: none; display: grid; grid-template-columns: minmax(0, 1fr); }
.row {
  position: relative;
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: 74px;
  padding: 12px 6px 12px 4px;
  border-bottom: 1px solid var(--line);
  overflow: hidden;
  isolation: isolate;
  transition: color .45s var(--sweep), padding .45s var(--sweep);
}
/* ink sweep on hover */
.row::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background: var(--ink);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform .55s var(--sweep);
}
.row:hover { color: var(--paper); padding-left: 16px; padding-right: 16px; }
.row:hover::before { transform: scaleX(1); transform-origin: left; }

.row__icon {
  flex: none;
  width: 42px; height: 42px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line-hi);
  border-radius: 50%;
  transition: border-color .45s, background .45s, color .45s;
}
.row__icon svg { width: 18px; height: 18px; }
.row:hover .row__icon { border-color: rgba(243, 241, 238, .35); }
.row--wa:hover .row__icon { background: var(--wa); border-color: var(--wa); color: #fff; }

.row__text { flex: 1; min-width: 0; }
.row__title { display: block; font-size: 15px; font-weight: 500; line-height: 1.3; }
.row__sub {
  display: block;
  margin-top: 2px;
  font-size: 13px;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  transition: color .45s;
}
.row:hover .row__sub { color: rgba(243, 241, 238, .65); }
.row__go { flex: none; display: flex; transition: transform .45s var(--sweep); }
.row__go svg { width: 18px; height: 18px; }
.row:hover .row__go { transform: translate(3px, -3px); }

/* Socials: monogram-like tiles */
.socials {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 14px;
}
@media (min-width: 480px) { .socials { grid-template-columns: repeat(6, 1fr); } }
.social {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  aspect-ratio: 1.6 / 1;
  border: 1px solid var(--line-hi);
  background: var(--card);
  overflow: hidden;
  isolation: isolate;
  min-width: 0;
  font-size: 8.5px;
  font-weight: 500;
  letter-spacing: .08em;
  text-transform: uppercase;
  transition: color .45s var(--sweep), border-color .45s;
}
.social span { max-width: 100%; overflow: hidden; text-overflow: clip; white-space: nowrap; }
@media (min-width: 480px) { .social { aspect-ratio: 1 / 1.1; } }
.social { font-size: 9.5px; letter-spacing: .12em; }
.social::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background: var(--ink);
  transform: scaleY(0);
  transform-origin: bottom;
  transition: transform .5s var(--sweep);
}
.social:hover { color: var(--paper); border-color: var(--ink); }
.social:hover::before { transform: scaleY(1); }
.social svg { width: 22px; height: 22px; fill: currentColor; transition: transform .45s var(--ease); }
.social:hover svg { transform: translateY(-2px) scale(1.08); }

/* ============ GET LISTED (Colart) ============ */
.listed {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 46px;
  padding: 16px 16px 16px 20px;
  border: 1px dashed var(--line-hi);
  background: rgba(255, 255, 255, .35);
  transition: border-color .3s, background .3s;
}
.listed:hover { border-color: var(--wa); background: #fff; }
.listed__q { display: block; font-size: 13px; color: var(--muted); }
.listed__a { display: block; font-size: 15px; font-weight: 500; line-height: 1.4; }
.listed__icon {
  flex: none;
  width: 44px; height: 44px;
  border-radius: 50%;
  background: var(--wa);
  color: #fff;
  display: grid;
  place-items: center;
  transition: transform .3s var(--ease);
}
.listed__icon svg { width: 22px; height: 22px; fill: currentColor; }
.listed:hover .listed__icon { transform: scale(1.08); }

/* ============ FOOTER ============ */
.footer {
  background: var(--ink);
  color: rgba(243, 241, 238, .55);
  padding: 26px 20px calc(26px + env(safe-area-inset-bottom, 0px));
}
.footer__credits {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 8px 12px;
  font-size: 12.5px;
  text-align: center;
}
.footer__credit { display: inline-flex; flex-wrap: wrap; justify-content: center; align-items: baseline; gap: 2px 6px; }
.footer__label { font-size: 10px; letter-spacing: .24em; text-transform: uppercase; white-space: nowrap; }
.footer a { color: var(--paper); font-weight: 500; border-bottom: 1px solid transparent; transition: border-color .3s; }
.footer a:hover { border-color: var(--paper); }
.footer__sep { color: rgba(243, 241, 238, .25); }
@media (max-width: 440px) { .footer__sep { display: none; } .footer__credits { flex-direction: column; } }

/* Toast */
.toast {
  position: fixed;
  left: 50%; bottom: 24px;
  z-index: 10;
  transform: translate(-50%, 20px);
  opacity: 0;
  padding: 12px 22px;
  background: var(--ink);
  color: var(--paper);
  font-size: 12px;
  letter-spacing: .14em;
  text-transform: uppercase;
  pointer-events: none;
  transition: opacity .3s, transform .3s var(--ease);
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ============ ENTRANCE: "the signature" ============ */
@media (prefers-reduced-motion: no-preference) {
  /* 1. the SH outline is drawn like a pen stroke, then the ink fills in */
  .mono path {
    stroke-dasharray: 1;
    stroke-dashoffset: 1;
    fill-opacity: 0;
    animation: sign 1.9s cubic-bezier(.6, 0, .3, 1) forwards, ink .9s 1.5s ease forwards;
  }
  .mono path:nth-child(2) { animation-delay: .35s, 1.7s; }
  .mono path:nth-child(3) { animation-delay: .6s, 1.85s; }
  /* 2. the name breathes open, letters spreading into place */
  .name  { animation: spread 1.4s 1.8s var(--ease) both; }
  /* 3. the hairline draws out from the centre */
  .rule  { animation: rule 1s 2.3s var(--sweep) both; }
  .title { animation: fadeUp .9s 2.6s var(--ease) both; }
  .ceo   { animation: fadeUp .9s 2.75s var(--ease) both; }
  .topbar { animation: fade 1s 2.8s ease both; }
  .reveal { opacity: 0; transform: translateY(16px); }
  .reveal.in { opacity: 1; transform: none; transition: opacity .8s var(--ease), transform .8s var(--ease); transition-delay: var(--d, 0s); }
}
@keyframes sign   { to { stroke-dashoffset: 0; } }
@keyframes ink    { to { fill-opacity: 1; stroke-width: 0; } }
@keyframes spread {
  from { opacity: 0; letter-spacing: .05em; text-indent: .05em; filter: blur(4px); }
  to   { opacity: 1; letter-spacing: .42em; text-indent: .42em; filter: none; }
}
@keyframes rule   { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes fadeUp { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes fade   { from { opacity: 0; } to { opacity: 1; } }

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

.row__sub--wrap { white-space: normal; overflow-wrap: anywhere; }
