/* ELIN Software — business card. Swiss International Style: grid, stone palette, one accent. */

:root {
  --bg: #fafaf9;              /* stone-50 */
  --border: #e7e5e4;          /* stone-200 */
  --text: #1c1917;            /* stone-900 */
  --text-2: rgba(28, 25, 23, .70);
  --text-3: rgba(28, 25, 23, .40);
  --accent: #ff6900;          /* Cloudflare dashboard orange (sRGB fallback) */

  --sans: "IBM Plex Sans", "Hanken Grotesk", "Barlow", system-ui, sans-serif;
  --pad: 16px;
  --gap: 16px;
  --maxw: 1152px;
  --ease: cubic-bezier(.2, .8, .1, 1);
}

/* Same orange as the Cloudflare dashboard; richer on wide-gamut screens */
@supports (color: oklch(0% 0 0)) {
  :root { --accent: oklch(70.5% .213 47.604); }
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0c0a09;            /* stone-950 */
    --border: #292524;        /* stone-800 */
    --text: #fafaf9;          /* stone-50 */
    --text-2: rgba(250, 250, 249, .70);
    --text-3: rgba(250, 250, 249, .40);
  }
}

@media (min-width: 768px) {
  :root { --pad: 32px; --gap: 32px; }
}
@media (min-width: 1280px) {
  :root { --pad: 64px; }
}

*, *::before, *::after { box-sizing: border-box; }
html { color-scheme: light dark; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 16px/1.625 var(--sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
h1, h2, p { margin: 0; font-weight: inherit; font-size: inherit; }
a { color: inherit; text-decoration: none; }
svg { display: block; }
::selection { background: var(--accent); color: #fafaf9; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }

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

/* ---------- Grid ---------- */
.card {
  display: grid;
  grid-template-rows: auto 1fr auto;
  min-height: 100vh;
  min-height: 100svh;
  max-width: calc(var(--maxw) + 2 * var(--pad));
  margin-inline: auto;
  padding-inline: var(--pad);
}
.grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: var(--gap);
}
.grid > * { grid-column: 1 / -1; }

.cap {
  font-size: 12px;
  line-height: 1.5;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--text-3);
  font-variant-numeric: tabular-nums;
}

.flag {
  display: inline-block;
  flex: none;
  width: 19px;
  height: 10px;
  box-shadow: 0 0 0 .5px rgba(0, 0, 0, .2);
}

/* ---------- Header ---------- */
.top {
  align-items: center;
  row-gap: 8px;
  padding-block: 24px;
}
.brand {
  grid-column: 1 / 7;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 15px;
  font-weight: 500;
  letter-spacing: .01em;
  line-height: 1;
}
.mark { width: 14px; height: 14px; background: var(--accent); flex: none; }
.tagline { display: none; }
.loc {
  grid-column: 7 / -1;
  justify-self: end;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  white-space: nowrap;
}

/* ---------- Rows ---------- */
.rows {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-block: 32px 48px;
}
.row {
  position: relative;
  row-gap: 8px;
  padding-block: 20px 28px;
}
.row::before,
.row:last-child::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 1px;
  background: var(--border);
  transform-origin: left;
}
.row:last-child::after { top: auto; bottom: 0; }

.num { display: inline-flex; align-items: center; gap: 10px; }
.word {
  font-size: clamp(44px, 14.5vw, 128px);
  font-weight: 300;
  line-height: .95;
  letter-spacing: -.035em;
  overflow: hidden;
  padding-block: .06em .04em;
  text-wrap: balance;
}
.word span { display: inline-block; }
.dot {
  display: inline-block;
  width: .15em;
  height: .15em;
  margin-left: .07em;
  background: var(--accent);
  transition: transform .4s var(--ease);
}
.desc {
  max-width: 44ch;
  margin-top: 8px;
  font-size: 15px;
  line-height: 1.625;
  color: var(--text-2);
  text-wrap: pretty;
  transition: opacity .3s;
}

@media (hover: hover) {
  .row:hover .dot { transform: scale(1.5); }
}

/* ---------- Footer ---------- */
.bottom {
  row-gap: 24px;
  align-items: end;
  padding-block: 8px 32px;
}
.contact .cap { margin-bottom: 8px; }
.mail {
  position: relative;
  display: inline-flex;
  align-items: baseline;
  gap: .35em;
  min-height: 44px;
  font-size: clamp(22px, 3.2vw, 40px);
  font-weight: 300;
  line-height: 1.3;
  letter-spacing: -.02em;
  word-break: break-word;
}
.mail::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 2px;
  height: 2px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .45s var(--ease);
}
.mail:hover::after, .mail:focus-visible::after { transform: scaleX(1); }
.arr { color: var(--accent); transition: transform .3s var(--ease); }
.mail:hover .arr { transform: translateX(.15em); }
.meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 24px;
}

/* ---------- Desktop ---------- */
@media (min-width: 768px) {
  .top { padding-block: 32px; }
  .loc { grid-column: 7 / -1; }
  .meta { grid-column: 9 / -1; flex-direction: column; align-items: flex-end; text-align: right; }
  .contact { grid-column: 1 / 9; }
}

@media (min-width: 1024px) {
  .brand { grid-column: 1 / 5; }
  .tagline { display: block; grid-column: 5 / 9; }
  .loc { grid-column: 9 / -1; }
  .rows { padding-block: 24px 56px; }
  .row { align-items: end; padding-block: 24px; }
  .num { grid-column: 1 / 2; align-self: start; padding-top: 4px; }
  .word {
    grid-column: 2 / 9;
    font-size: clamp(80px, min(8.8vw, 14vh), 128px);
  }
  .desc { grid-column: 9 / -1; margin: 0 0 .9em; }
}

/* ---------- Entrance (motion-safe only) ---------- */
@media (prefers-reduced-motion: no-preference) {
  .row::before, .row:last-child::after { animation: rule 1.2s cubic-bezier(.65, 0, .15, 1) backwards; }
  .word span { animation: rise 1s var(--ease) backwards; }
  .dot { animation: pop .55s cubic-bezier(.3, 1.6, .5, 1) backwards; }
  .num, .desc { animation: fade .9s ease backwards; }
  .top, .bottom { animation: fade 1s ease backwards; }

  .row:nth-child(1)::before { animation-delay: .1s; }
  .row:nth-child(2)::before { animation-delay: .22s; }
  .row:nth-child(3)::before { animation-delay: .34s; }
  .row:last-child::after   { animation-delay: .46s; }
  .row:nth-child(1) .word span { animation-delay: .3s; }
  .row:nth-child(2) .word span { animation-delay: .42s; }
  .row:nth-child(3) .word span { animation-delay: .54s; }
  .row:nth-child(1) .dot { animation-delay: 1.05s; }
  .row:nth-child(2) .dot { animation-delay: 1.17s; }
  .row:nth-child(3) .dot { animation-delay: 1.29s; }
  .row:nth-child(1) :is(.num, .desc) { animation-delay: .7s; }
  .row:nth-child(2) :is(.num, .desc) { animation-delay: .82s; }
  .row:nth-child(3) :is(.num, .desc) { animation-delay: .94s; }
  .top { animation-delay: 0s; }
  .bottom { animation-delay: 1.1s; }
}
@keyframes rule { from { transform: scaleX(0); } }
@keyframes rise { from { transform: translateY(110%); } }
@keyframes pop { from { transform: scale(0); } }
@keyframes fade { from { opacity: 0; } }
