/* ==========================================================================
   SMARTMATE — profile layout 2 "Mono"
   A card cut from near-black. The cover dissolves into the ground rather than
   stopping at an edge, the portrait straddles the seam, and every label is set
   in wide-tracked typewriter capitals. Each link is a chalk plate carrying its
   mark, its title and — where it has one — its value. The chrome is monochrome;
   the content is not. Photographs and brand marks keep their own colour.
   ========================================================================== */

:root {
    --void:      #121110;  /* desktop surround */
    --ground:    #272523;  /* the card itself — warm near-black */
    --ground-up: #2E2C29;  /* pressed / raised chrome */

    --chalk:     #E9E8E3;  /* link buttons */
    --chalk-hi:  #FFFFFF;  /* primary action */
    --chalk-ink: #171614;  /* type on chalk */

    --bone:      #F0EEE9;  /* headline */
    --fog:       #BEBAB2;  /* body */
    --fog-2:     #918D85;  /* captions */
    --fog-3:     #6B6862;  /* colophon */

    --hair:      rgba(255, 255, 255, .13);
    --hair-2:    rgba(255, 255, 255, .24);

    --gutter: 24px;

    --serif: "Fraunces", "Iowan Old Style", Georgia, "Times New Roman", serif;
    --mono:  "Space Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

    --ease: cubic-bezier(.2, .7, .3, 1);
}

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

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

body {
    margin: 0;
    background: var(--ground);
    color: var(--bone);
    font-family: var(--serif);
    font-size: 16px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

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

a { color: inherit; text-decoration: none; }

:focus-visible {
    outline: 2px solid var(--chalk);
    outline-offset: 3px;
    border-radius: 2px;
}

/* --- the card ------------------------------------------------------------ */

.sheet {
    position: relative;
    max-width: 468px;
    margin: 0 auto;
    min-height: 100vh;
    background: var(--ground);
    overflow: hidden;
    padding-bottom: env(safe-area-inset-bottom);
}

/* --- cover: full-bleed, dissolving into the ground ------------------------ */

.plate {
    position: relative;
    margin: 0;
}

.plate__img {
    width: 100%;
    aspect-ratio: 16 / 10;
    object-fit: cover;
    background: var(--ground-up);
}

/* The seam is the point of the design — no hard line, the photograph simply
   runs out of light. Sits above the image, below the portrait. The top half is
   left clear so the cover shows in its own colour; only the fade is tinted. */
.plate::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to bottom,
        rgba(39, 37, 35, 0) 0%,
        rgba(39, 37, 35, 0) 44%,
        rgba(39, 37, 35, .72) 78%,
        var(--ground) 100%
    );
    pointer-events: none;
}

/* --- identity ------------------------------------------------------------ */

.identity {
    position: relative;
    z-index: 1;
    padding: 0 var(--gutter) 32px;
    text-align: center;
}

.portrait {
    position: relative;
    width: 124px;
    margin: -62px auto 20px;
    padding: 5px;
    background: var(--ground);
    border-radius: 50%;
}

.portrait__img {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    border-radius: 50%;
    background: var(--ground-up);
    box-shadow: 0 0 0 1px var(--hair-2);
}

.portrait__mark {
    position: absolute;
    right: 5px;
    bottom: 5px;
    width: 36px;
    height: 36px;
    padding: 3px;
    background: var(--ground);
    border-radius: 50%;
}

.portrait__mark img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 50%;
    /* A logo is usually drawn for a light ground and often ships with a
       transparent field — on the near-black card it would simply disappear. */
    background: var(--chalk);
    box-shadow: 0 0 0 1px var(--hair-2);
}

.identity__name {
    margin: 0;
    font-family: var(--serif);
    font-size: clamp(29px, 8.4vw, 37px);
    font-weight: 400;
    font-optical-sizing: auto;
    letter-spacing: -0.012em;
    line-height: 1.14;
    color: var(--bone);
    overflow-wrap: break-word;
}

.identity__role {
    margin: 13px 0 0;
    font-family: var(--mono);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.3em;
    /* the trailing letter-space would otherwise push the line off-centre */
    text-indent: 0.3em;
    text-transform: uppercase;
    line-height: 1.6;
    color: var(--fog-2);
}

.identity__brief {
    margin: 18px auto 0;
    max-width: 34ch;
    font-size: 15px;
    line-height: 1.7;
    color: var(--fog);
}

.identity__place {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    margin: 18px 0 0;
    font-family: var(--mono);
    font-size: 10px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--fog-2);
}

.pin { width: 13px; height: 13px; flex: none; color: var(--fog-3); }

/* --- link index: chalk plates -------------------------------------------- */

.index {
    display: grid;
    gap: 11px;
    padding: 0 var(--gutter);
}

.row {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    min-height: 60px;
    padding: 12px 54px;
    background: var(--chalk);
    border: 1px solid var(--chalk);
    border-radius: 3px;
    color: var(--chalk-ink);
    transition: background-color .2s var(--ease), border-color .2s var(--ease), transform .2s var(--ease);
    -webkit-tap-highlight-color: transparent;
}

/* Anchored left so the label stays optically centred in the plate. */
.row__tile {
    position: absolute;
    left: 16px;
    top: 50%;
    display: grid;
    place-items: center;
    width: 22px;
    height: 22px;
    margin-top: -11px;
}

/* Brand marks keep their own colour — they are the one place the card lets a
   hue in, and they read as themselves against the chalk. */
.row__tile img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    font-size: 0;
    border-radius: 5px;
}

.row__label {
    max-width: 100%;
    font-family: var(--mono);
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-indent: 0.16em;
    text-transform: uppercase;
    line-height: 1.5;
    text-align: center;
    overflow-wrap: anywhere;
}

/* The value a bare icon would hide — a phone number, an address, a handle.
   Set as typed: caps would make an e-mail harder to read, not easier. */
.row__value {
    max-width: 100%;
    font-family: var(--mono);
    font-size: 10px;
    font-weight: 400;
    letter-spacing: 0.02em;
    line-height: 1.4;
    text-align: center;
    color: rgba(23, 22, 20, .56);
    overflow-wrap: anywhere;
}

@media (hover: hover) {
    .row:hover { background: var(--chalk-hi); border-color: var(--chalk-hi); }
}

.row:active { transform: translateY(1px); }

/* --- actions ------------------------------------------------------------- */

.actions {
    display: grid;
    gap: 11px;
    margin-top: 30px;
    padding: 30px var(--gutter) 0;
    border-top: 1px solid var(--hair);
}

.actions__pair {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 11px;
}

.btn {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 54px;
    padding: 12px;
    border: 1px solid transparent;
    border-radius: 3px;
    font-family: var(--mono);
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-indent: 0.16em;
    text-transform: uppercase;
    text-align: center;
    line-height: 1.4;
    transition: background-color .2s var(--ease), color .2s var(--ease),
                border-color .2s var(--ease), transform .2s var(--ease);
    -webkit-tap-highlight-color: transparent;
}

.btn--solid {
    background: var(--chalk-hi);
    color: var(--chalk-ink);
    border-color: var(--chalk-hi);
}

.btn--outline {
    background: transparent;
    color: var(--bone);
    border-color: var(--hair-2);
}

.btn--wide {
    background: transparent;
    color: var(--fog);
    border-color: var(--hair);
}

@media (hover: hover) {
    .btn--outline:hover { background: var(--ground-up); border-color: var(--chalk); }
    .btn--wide:hover    { background: var(--ground-up); border-color: var(--hair-2); color: var(--bone); }
}

.btn:active { transform: translateY(1px); }

/* --- colophon ------------------------------------------------------------ */

.colophon {
    padding: 40px var(--gutter) 44px;
    text-align: center;
}

.colophon a {
    font-family: var(--mono);
    font-size: 9.5px;
    letter-spacing: 0.32em;
    text-indent: 0.32em;
    color: var(--fog-3);
    transition: color .18s var(--ease);
}

@media (hover: hover) {
    .colophon a:hover { color: var(--fog); }
}

/* --- desktop: the card floats on a darker ground -------------------------- */

@media (min-width: 620px) {
    :root { --gutter: 32px; }

    body { background: var(--void); }

    .sheet {
        min-height: 0;
        margin: 56px auto 72px;
        border-radius: 6px;
        box-shadow: 0 1px 0 var(--hair) inset, 0 30px 70px rgba(0, 0, 0, .5);
    }

    .portrait { width: 132px; margin-top: -66px; }
}

/* --- entrance: one quiet, orchestrated pass ------------------------------- */

@keyframes rise {
    from { opacity: 0; transform: translateY(9px); }
    to   { opacity: 1; transform: none; }
}

@keyframes bloom {
    from { opacity: 0; }
    to   { opacity: 1; }
}

.plate { animation: bloom .8s var(--ease) both; }

.identity,
.actions,
.colophon,
.row {
    animation: rise .55s var(--ease) both;
}

.identity { animation-delay: .08s; }
.row      { animation-delay: calc(.16s + var(--d, 0) * .05s); }
.actions  { animation-delay: .42s; }
.colophon { animation-delay: .5s; }

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