/* Adam Sarosi — digital business card. Shares the Sarosi Enterprises design system. */
:root {
  --bg: #0a0a0a;
  --surface: #141414;
  --surface-2: #1b1b1b;
  --line: rgba(255, 255, 255, 0.10);
  --line-strong: rgba(255, 255, 255, 0.18);
  --text: #f3f0ea;
  --text-muted: #a8a299;
  --text-faint: #77726b;
  --gold: #f4b860;
  --gold-hover: #ffc777;
  --ink: #141210;

  --font-display: 'Bebas Neue', 'Oswald', 'Arial Narrow', sans-serif;
  --font-body: 'General Sans', 'Inter', system-ui, sans-serif;

  --text-xs: clamp(0.75rem, 0.72rem + 0.15vw, 0.8125rem);
  --text-sm: clamp(0.875rem, 0.85rem + 0.12vw, 0.9375rem);
  --text-base: clamp(1rem, 0.97rem + 0.15vw, 1.0625rem);
  --text-lg: clamp(1.0625rem, 1rem + 0.3vw, 1.25rem);

  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --radius: 3px;
  --gutter: clamp(1.25rem, 4vw, 2.5rem);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font-family: var(--font-body); font-size: var(--text-base); line-height: 1.6;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; overflow-x: hidden;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
h1, h2, p, ul, figure { margin: 0; }
ul { padding: 0; list-style: none; }
button { font: inherit; color: inherit; }
::selection { background: var(--gold); color: var(--ink); }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }

.skip-link { position: absolute; left: 1rem; top: -100px; z-index: 300; background: var(--gold); color: var(--ink); padding: .75rem 1.25rem; font-weight: 600; font-size: var(--text-sm); }
.skip-link:focus { top: 1rem; }

.wrap { width: 100%; max-width: 1180px; margin-inline: auto; padding-inline: var(--gutter); }

.ic { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.ic--gold { color: var(--gold); }
.gold { color: var(--gold); }
.display { font-family: var(--font-display); font-weight: 400; line-height: .9; letter-spacing: .01em; text-transform: uppercase; }

.eyebrow {
  display: inline-flex; align-items: center; gap: .75rem;
  font-size: var(--text-xs); font-weight: 600; letter-spacing: .22em; text-transform: uppercase; color: var(--gold);
}
.eyebrow::before { content: ""; width: 28px; height: 1px; background: currentColor; }

/* ---------- Top bar ---------- */
.topbar { position: relative; z-index: 10; border-bottom: 1px solid var(--line); }
.topbar__inner { display: flex; align-items: center; justify-content: space-between; height: 76px; }
.topbar__brand img { height: 34px; width: auto; }
.topbar__link {
  display: inline-flex; align-items: center; gap: .5rem;
  font-size: var(--text-xs); font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--text-muted);
  transition: color .3s var(--ease);
}
.topbar__link:hover { color: var(--gold); }
.topbar__link .ic { width: 15px; height: 15px; transition: transform .3s var(--ease); }
.topbar__link:hover .ic { transform: translateX(3px); }

/* ---------- Backdrop ---------- */
main { position: relative; }
.backdrop { position: absolute; inset: 0 0 auto 0; height: 620px; overflow: hidden; z-index: 0; pointer-events: none; }
.backdrop img { width: 100%; height: 100%; object-fit: cover; opacity: .22; filter: grayscale(.35); }
.backdrop::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(10,10,10,.35) 0%, rgba(10,10,10,.85) 60%, var(--bg) 100%); }

/* ---------- Layout ---------- */
.layout {
  position: relative; z-index: 1;
  display: grid; grid-template-columns: minmax(300px, 420px) 1fr; gap: clamp(2.5rem, 5vw, 5rem);
  padding-block: clamp(3rem, 6vw, 5.5rem) clamp(4rem, 7vw, 6rem);
  align-items: start;
}

/* ---------- Portrait ---------- */
.portrait { position: sticky; top: 2.5rem; }
.portrait__frame { position: relative; }
.portrait__frame img {
  width: 100%; aspect-ratio: 4 / 5; object-fit: cover; object-position: 50% 30%;
  border-radius: var(--radius); background: #141210;
  box-shadow: 0 0 0 1px var(--line), 0 40px 80px -30px rgba(0,0,0,.8);
}
.portrait__frame::before, .portrait__frame::after {
  content: ""; position: absolute; width: 56px; height: 56px; pointer-events: none;
}
.portrait__frame::before { top: -12px; left: -12px; border-top: 1px solid var(--gold); border-left: 1px solid var(--gold); }
.portrait__frame::after { bottom: 44px; right: -12px; border-bottom: 1px solid var(--gold); border-right: 1px solid var(--gold); }
.portrait__tag {
  display: flex; align-items: center; gap: .6rem; margin-top: 1.1rem;
  font-size: var(--text-xs); font-weight: 500; letter-spacing: .16em; text-transform: uppercase; color: var(--text-muted);
}
.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 0 4px rgba(244,184,96,.15); }

/* ---------- Identity ---------- */
.identity { min-width: 0; }
.name { font-size: clamp(4rem, 2.2rem + 7vw, 8rem); margin-top: 1.1rem; }
.company {
  margin-top: .9rem; font-size: var(--text-sm); font-weight: 600; letter-spacing: .2em; text-transform: uppercase; color: var(--text);
}
.lead { margin-top: 1.25rem; max-width: 52ch; font-size: var(--text-lg); line-height: 1.55; color: var(--text-muted); }

/* ---------- Buttons ---------- */
.actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 2rem; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .65rem;
  min-height: 52px; padding: 0 1.4rem; border: 1px solid transparent; border-radius: 2px;
  font-size: var(--text-sm); font-weight: 600; letter-spacing: .08em; text-transform: uppercase; white-space: nowrap;
  cursor: pointer; background: none;
  transition: background-color .3s var(--ease), border-color .3s var(--ease), color .3s var(--ease);
}
.btn--gold { background: var(--gold); color: var(--ink); }
.btn--gold:hover { background: var(--gold-hover); }
.btn--ghost { border-color: var(--line-strong); color: var(--text); background: rgba(10,10,10,.35); }
.btn--ghost:hover { border-color: var(--text); }
.btn--sm { min-height: 44px; padding: 0 1rem; font-size: var(--text-xs); }

/* ---------- Blocks ---------- */
.block { margin-top: 2.75rem; }
.block__title {
  display: flex; align-items: center; gap: 1rem; margin-bottom: 1rem;
  font-size: var(--text-xs); font-weight: 600; letter-spacing: .22em; text-transform: uppercase; color: var(--text-faint);
}
.block__title::after { content: ""; flex: 1; height: 1px; background: var(--line); }

/* Direct lines */
.lines { border-top: 1px solid var(--line); }
.line {
  display: grid; grid-template-columns: 1fr auto auto; align-items: center; gap: 1.25rem;
  padding: 1.05rem 0; border-bottom: 1px solid var(--line);
}
.line__meta { display: flex; flex-direction: column; min-width: 0; }
.line__region { font-family: var(--font-display); font-size: 1.6rem; line-height: 1; letter-spacing: .02em; text-transform: uppercase; }
.line__note { margin-top: .3rem; font-size: var(--text-xs); letter-spacing: .08em; color: var(--text-faint); text-transform: uppercase; }
.line__num { font-size: var(--text-lg); font-weight: 500; font-variant-numeric: tabular-nums; letter-spacing: .02em; transition: color .3s var(--ease); }
.line__num:hover { color: var(--gold); }
.line__acts { display: flex; gap: .5rem; }
.icon-btn {
  display: grid; place-items: center; width: 44px; height: 44px; border: 1px solid var(--line-strong); border-radius: 2px;
  color: var(--text-muted); transition: border-color .3s var(--ease), color .3s var(--ease), background-color .3s var(--ease);
}
.icon-btn:hover { border-color: var(--gold); color: var(--ink); background: var(--gold); }

/* Tiles */
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 1.5rem; }
.tile {
  display: flex; align-items: flex-start; gap: 1rem; padding: 1.25rem; height: calc(100% - 2.5rem);
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  transition: border-color .3s var(--ease), background-color .3s var(--ease);
}
.tile:hover { border-color: rgba(244,184,96,.55); background: var(--surface-2); }
.tile .ic { width: 22px; height: 22px; margin-top: 2px; }
.tile__text { display: flex; flex-direction: column; min-width: 0; }
.tile__text strong { font-weight: 600; overflow-wrap: anywhere; }
.tile__text span { margin-top: .25rem; font-size: var(--text-sm); color: var(--text-muted); }

/* Group */
.group { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.group a {
  display: flex; flex-direction: column; gap: 1rem; height: 100%; padding: 1.25rem;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  transition: border-color .3s var(--ease), background-color .3s var(--ease);
}
.group a:hover { border-color: rgba(244,184,96,.55); background: var(--surface-2); }
.group img { height: 34px; width: auto; max-width: 100%; object-fit: contain; object-position: left center; }
.group span { font-size: var(--text-xs); line-height: 1.5; color: var(--text-muted); letter-spacing: .02em; }

/* Social */
.social { display: grid; grid-template-columns: repeat(4, 1fr); gap: .75rem; }
.social a {
  display: flex; align-items: center; justify-content: center; gap: .6rem; min-height: 52px;
  border: 1px solid var(--line-strong); border-radius: 2px;
  font-size: var(--text-xs); font-weight: 600; letter-spacing: .1em; text-transform: uppercase;
  transition: border-color .3s var(--ease), color .3s var(--ease);
}
.social a:hover { border-color: var(--gold); color: var(--gold); }

/* Share */
.share {
  display: grid; grid-template-columns: auto 1fr; gap: 1.75rem; align-items: center;
  padding: 1.5rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
}
.share__qr { background: #f3f0ea; padding: 12px; border-radius: 2px; }
.share__qr img { width: 132px; height: 132px; }
.share .block__title { margin-bottom: .5rem; color: var(--text); }
.share .block__title::after { display: none; }
.share p { font-size: var(--text-sm); color: var(--text-muted); max-width: 38ch; }
.share__acts { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: 1rem; }

/* Footer */
.foot { border-top: 1px solid var(--line); }
.foot__inner { display: flex; justify-content: space-between; align-items: center; gap: 1rem; min-height: 76px; font-size: var(--text-xs); letter-spacing: .08em; color: var(--text-faint); text-transform: uppercase; }
.foot a { display: inline-flex; align-items: center; gap: .5rem; color: var(--gold); font-weight: 600; letter-spacing: .12em; }
.foot a .ic { width: 15px; height: 15px; }

/* Mobile dock */
.dock { display: none; }
.toast {
  position: fixed; left: 50%; bottom: 96px; z-index: 400; transform: translate(-50%, 12px);
  padding: .7rem 1.1rem; background: var(--text); color: var(--ink); border-radius: 2px;
  font-size: var(--text-sm); font-weight: 600; opacity: 0; pointer-events: none;
  transition: opacity .3s var(--ease), transform .3s var(--ease);
}
.toast.is-on { opacity: 1; transform: translate(-50%, 0); }

/* Reveal */
@media (prefers-reduced-motion: no-preference) {
  .js .identity > *, .js .portrait { animation: rise .9s var(--ease) both; }
  .js .identity > :nth-child(2) { animation-delay: .06s; }
  .js .identity > :nth-child(3) { animation-delay: .12s; }
  .js .identity > :nth-child(4) { animation-delay: .18s; }
  .js .identity > :nth-child(n+5) { animation-delay: .24s; }
  @keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
}

/* ---------- Responsive ---------- */
@media (max-width: 959px) {
  .layout { grid-template-columns: 1fr; gap: 0; padding-top: 1.5rem; }
  .portrait { position: relative; top: 0; max-width: 520px; width: 100%; margin-inline: auto; }
  .portrait__frame img { aspect-ratio: 1 / 1; object-position: 50% 28%; }
  .portrait__frame::before { top: -8px; left: -8px; width: 40px; height: 40px; }
  .portrait__frame::after { right: -8px; bottom: 40px; width: 40px; height: 40px; }
  .identity { margin-top: 2.25rem; }
  .backdrop { height: 420px; }
}
@media (max-width: 640px) {
  :root { --gutter: 1.25rem; }
  .topbar__inner { height: 64px; }
  .topbar__brand img { height: 28px; }
  .topbar__link { font-size: .7rem; letter-spacing: .1em; }
  .identity .eyebrow { letter-spacing: .14em; font-size: .7rem; gap: .6rem; }
  .identity .eyebrow::before { width: 20px; }
  .name { font-size: clamp(3.6rem, 18vw, 5rem); }
  .company { letter-spacing: .14em; }
  .actions { display: grid; grid-template-columns: 1fr 1fr; }
  .actions .btn--gold { grid-column: 1 / -1; }
  .line { grid-template-columns: 1fr auto; row-gap: .5rem; }
  .line__num { grid-column: 1; grid-row: 2; font-size: var(--text-base); }
  .line__acts { grid-column: 2; grid-row: 1 / span 2; }
  .grid2 { grid-template-columns: 1fr; }
  .tile { height: auto; }
  .group { grid-template-columns: 1fr; }
  .group a { flex-direction: row; align-items: center; justify-content: space-between; }
  .group img { height: 28px; max-width: 55%; }
  .group span { text-align: right; max-width: 40%; }
  .social { grid-template-columns: 1fr 1fr; }
  .share { grid-template-columns: 1fr; justify-items: start; }
  .foot__inner { flex-direction: column; justify-content: center; padding-block: 1.25rem 6.5rem; text-align: center; }

  .dock {
    display: grid; grid-template-columns: 1fr 1fr 1.6fr; gap: .5rem;
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 200;
    padding: .65rem .75rem calc(.65rem + env(safe-area-inset-bottom));
    background: rgba(10,10,10,.92); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
    border-top: 1px solid var(--line);
    transform: translateY(110%); transition: transform .4s var(--ease);
  }
  .dock.is-on { transform: none; }
  .dock a {
    display: flex; align-items: center; justify-content: center; gap: .5rem; min-height: 48px;
    border: 1px solid var(--line-strong); border-radius: 2px;
    font-size: .75rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase;
  }
  .dock .dock__main { background: var(--gold); border-color: var(--gold); color: var(--ink); }
}
