/* Elit Optimum, elitoptimum.com
   One page that opens out of a business card. No framework, no build. */

:root {
    --paper: #ecebe6;
    --paper-2: #f7f6f2;
    --desk: #27302d;
    --ink: #2e3131;
    --ink-2: #5b5d5d;
    --ink-3: #8a8b88;
    --rule: #cfcdc5;
    --blue: #2879c2;
    --green: #00ab4f;
    --orange: #ff7d24;
    --f-sans: "Archivo", "Helvetica Neue", Arial, sans-serif;
    --f-serif: "Source Serif 4", Georgia, "Times New Roman", serif;
    --bar-h: 56px;
    --ease: cubic-bezier(.22, .72, .18, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--bar-h) + 24px); }
body {
    margin: 0;
    background: var(--paper);
    color: var(--ink);
    font-family: var(--f-serif);
    font-size: 18px;
    line-height: 1.55;
    font-optical-sizing: auto;
}
body.is-closed { overflow: hidden; }
body.is-closed .page, body.is-closed .bar { visibility: hidden; }
img { display: block; }
a { color: inherit; text-decoration: underline; text-decoration-color: var(--blue); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
h1, h2, h3 { margin: 0; font-weight: 600; line-height: 1.2; }
p { margin: 0 0 1.1em; }
button { font: inherit; color: inherit; }
.link-btn { background: none; border: 0; padding: 0; cursor: pointer; text-decoration: underline; text-decoration-color: var(--blue); text-underline-offset: 3px; }
.link-btn:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; }
.card:focus-visible { outline-offset: 10px; outline-color: rgba(255,255,255,.6); }

.wordmark {
    font-family: var(--f-sans);
    font-variation-settings: "wdth" 118;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: .16em;
    line-height: 1;
}
.wordmark--bar { font-size: 12px; letter-spacing: .2em; }
.wordmark--small { font-size: 12px; letter-spacing: .2em; color: var(--ink-2); }

.dot { display: inline-block; width: 9px; height: 9px; margin-right: 10px; vertical-align: 1px; }
.dot--blue { background: var(--blue); }
.dot--green { background: var(--green); }
.dot--orange { background: var(--orange); }
.dot--ink { background: var(--ink); }

/* ---------- Chapter numbers behind the page ---------- */

/* Each chapter carries its number, huge and pale, set against the right
   edge of the window so the edge cuts the second digit. Anchored to the
   chapter, so it scrolls with it. */
html, body { overflow-x: clip; }
.chapter { position: relative; isolation: isolate; }
.chapter::before {
    content: attr(data-num);
    position: absolute;
    z-index: -1;
    top: 48px;
    right: calc(50% - 50vw);
    transform: translateX(14%);
    font-family: var(--f-sans);
    font-variation-settings: "wdth" 110;
    font-weight: 600;
    font-size: clamp(220px, 30vw, 460px);
    line-height: 1;
    letter-spacing: -.05em;
    color: color-mix(in srgb, var(--arc) 6%, var(--paper));
    pointer-events: none;
    user-select: none;
}
.page { position: relative; z-index: 1; }

/* ---------- The desk and the card ---------- */

.stage {
    position: fixed;
    inset: 0;
    z-index: 50;
    background: var(--desk);
    display: grid;
    place-items: center;
    perspective: 1600px;
    transition: background-color .7s var(--ease), opacity .4s ease;
}
.stage__inner { position: relative; display: grid; justify-items: center; gap: 28px; }

.card {
    --rx: 0deg; --ry: 0deg; --s: 1;
    position: relative;
    width: min(600px, 88vw);
    aspect-ratio: 1.6;
    transform-style: preserve-3d;
    transform: rotateX(var(--rx)) rotateY(var(--ry)) scale(var(--s));
    transition: transform .9s var(--ease);
    cursor: pointer;
    will-change: transform;
}
.card.is-turned { transform: rotateX(var(--rx)) rotateY(calc(180deg + var(--ry))) scale(var(--s)); }
.card.is-opening { transition: transform .8s var(--ease); }
.card.is-opening .card__back > * { opacity: 0; transition: opacity .3s ease; }

.card__face {
    position: absolute;
    inset: 0;
    background-color: var(--paper-2);
    background-repeat: no-repeat;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    padding: 6.5% 7%;
    display: flex;
    flex-direction: column;
    box-shadow:
        0 1px 2px rgba(0, 0, 0, .25),
        0 12px 28px rgba(0, 0, 0, .35),
        0 40px 80px rgba(0, 0, 0, .25);
}
.card__back { transform: rotateY(180deg); }
/* One thin arc per face, drawn as a background so the 3D flip stays clean. */
.card__face { --r: 240px; }
.card__front {
    background-image: radial-gradient(circle at 108% 118%, transparent calc(var(--r) - 1px), var(--blue) calc(var(--r) - .5px), var(--blue) calc(var(--r) + .5px), transparent calc(var(--r) + 1px));
}
.card__back {
    background-image: radial-gradient(circle at -6% -44%, transparent calc(var(--r) - 1px), var(--orange) calc(var(--r) - .5px), var(--orange) calc(var(--r) + .5px), transparent calc(var(--r) + 1px));
}

.card__brand { display: flex; align-items: center; gap: 4%; }
.card__logo { width: 62%; height: auto; }
.card__line {
    margin: 7% 0 0;
    font-family: var(--f-serif);
    font-size: clamp(15px, 2.6vw, 20px);
    color: var(--ink-2);
}
.card__foot {
    margin-top: auto;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 16px;
    font-family: var(--f-sans);
    font-size: clamp(11px, 1.9vw, 14px);
    line-height: 1.4;
}
.card__name { font-weight: 600; }
.card__role, .card__since { color: var(--ink-2); }
.card__place { text-align: right; }

.card__toc-head {
    display: flex; justify-content: space-between; align-items: baseline;
    padding-bottom: 3%;
    border-bottom: 1px solid var(--rule);
}
.card__toc-label { font-family: var(--f-sans); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); }
.card__toc { list-style: none; margin: 0; padding: 0; flex: 1; display: flex; flex-direction: column; justify-content: center; }
.card__toc a {
    display: flex; align-items: baseline; gap: 18px;
    padding: 2.2% 0;
    text-decoration: none;
    font-family: var(--f-sans);
    font-variation-settings: "wdth" 108;
    font-weight: 500;
    font-size: clamp(16px, 3.2vw, 26px);
    line-height: 1.15;
    border-bottom: 1px solid transparent;
}
.card__toc a:hover .toc__title, .card__toc a:focus-visible .toc__title { text-decoration: underline; text-decoration-color: var(--blue); text-underline-offset: 4px; }
.toc__num { font-size: .55em; color: var(--ink-3); letter-spacing: .1em; min-width: 2.4em; }
.card__open { font-family: var(--f-sans); font-size: clamp(11px, 1.9vw, 13px); color: var(--ink-2); }

.stage__hint {
    margin: 0;
    font-family: var(--f-sans);
    font-size: 13px;
    letter-spacing: .04em;
    color: rgba(255, 255, 255, .6);
    transition: opacity .3s;
}
.stage.is-turned .stage__hint { opacity: 0; }
.stage__corner {
    position: fixed; top: 18px; right: 20px;
    display: flex; gap: 18px; align-items: center;
    font-family: var(--f-sans); font-size: 13px;
    color: rgba(255, 255, 255, .7);
}
.stage__skip { color: inherit; text-decoration-color: rgba(255, 255, 255, .5); }


/* ---------- The page ---------- */

.bar {
    position: fixed; top: 0; left: 0; right: 0; z-index: 10;
    height: var(--bar-h);
    display: flex; align-items: center; gap: 40px;
    padding: 0 24px;
    background: color-mix(in srgb, var(--paper) 92%, transparent);
    -webkit-backdrop-filter: saturate(1.2) blur(6px);
    backdrop-filter: saturate(1.2) blur(6px);
    border-bottom: 1px solid var(--rule);
}
.bar__brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.bar__nav { display: flex; gap: 28px; margin-left: auto; margin-right: 24px; font-family: var(--f-sans); font-size: 13px; }
.bar__nav a { text-decoration: none; color: var(--ink-2); }
.bar__nav a .nav__num {
    display: inline-block;
    color: var(--ink-3);
    letter-spacing: .08em;
    margin-right: 4px;
    padding: 3px 4px 2px 5px;
    line-height: 1;
    border: 1px solid transparent;
    transition: border-color .25s ease, color .25s ease;
}
.bar__nav a.is-active .nav__num { border-color: var(--c); color: var(--ink); }
.bar__nav a.is-active { color: var(--ink); }
.bar__nav a:hover { color: var(--ink); }

.page { max-width: 1180px; margin: 0 auto; padding: var(--bar-h) 24px 0; }

.chapter {
    display: grid;
    grid-template-columns: 220px minmax(0, 66ch) 170px;
    column-gap: 56px;
    padding: 104px 0 96px;
    border-top: 1px solid var(--rule);
}
.chapter:first-child { border-top: 0; padding-top: 120px; }
#who { --arc: var(--blue); }
#work { --arc: var(--green); }
#noko { --arc: var(--orange); }
#contact { --arc: var(--ink); }
.chapter__aside { position: sticky; top: calc(var(--bar-h) + 40px); align-self: start; }
.chapter__num { font-family: var(--f-sans); font-size: 13px; letter-spacing: .12em; color: var(--ink-2); margin-bottom: 14px; }
.chapter__title {
    font-family: var(--f-sans);
    font-variation-settings: "wdth" 110;
    font-weight: 600;
    font-size: 26px;
    letter-spacing: -.005em;
}
.chapter__body { max-width: 66ch; }
.chapter__note {
    position: sticky;
    top: calc(var(--bar-h) + 44px);
    align-self: start;
    padding-left: 14px;
    border-left: 1px solid var(--arc);
    font-family: var(--f-sans);
    font-size: 13px;
    line-height: 1.6;
    color: var(--ink-2);
}
.note__label { color: var(--arc); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; margin-bottom: 4px; }
.chapter__note a { color: var(--ink); text-decoration-color: var(--arc); }
.lead { font-size: 25px; line-height: 1.4; margin-bottom: 1.2em; }
.chapter__body h3 {
    font-family: var(--f-sans);
    font-size: 14px; letter-spacing: .1em; text-transform: uppercase; font-weight: 600;
    margin: 56px 0 10px;
}

.list { margin: 0; }
.list__row { display: grid; grid-template-columns: 200px 1fr; gap: 24px; padding: 16px 0; border-top: 1px solid var(--rule); }
.list__row:last-child { border-bottom: 1px solid var(--rule); }
.list dt { font-family: var(--f-sans); font-size: 15px; font-weight: 600; padding-top: 3px; }
.list dd { margin: 0; font-size: 17px; color: var(--ink-2); }

.ledger { list-style: none; margin: 12px 0 0; padding: 0; }
.ledger__row { display: grid; grid-template-columns: 150px 1fr; gap: 24px; padding: 28px 0; border-top: 1px solid var(--rule); }
.ledger__row:last-child { border-bottom: 1px solid var(--rule); }
.ledger__when { font-family: var(--f-sans); font-size: 14px; color: var(--ink-2); padding-top: 6px; letter-spacing: .02em; }
.ledger__what h3 { font-family: var(--f-serif); font-size: 22px; font-weight: 600; text-transform: none; letter-spacing: 0; margin: 0 0 8px; }
.ledger__what p { font-size: 17px; color: var(--ink-2); margin-bottom: .6em; }
.ledger__who { font-family: var(--f-sans); font-size: 14px; color: var(--ink-3); }

.noko-link { margin-top: 28px; font-size: 17px; color: var(--ink-2); }
.noko-link a { font-family: var(--f-sans); font-weight: 600; color: var(--ink); }

.contact__email { margin: 8px 0 4px; font-size: clamp(20px, 2.4vw, 32px); line-height: 1.3; font-weight: 500; overflow-wrap: anywhere; }
.contact__email a { text-decoration-thickness: 1.5px; text-underline-offset: 5px; text-decoration-skip-ink: none; }
.contact__phone { font-size: 21px; margin-bottom: 40px; }
.facts > .facts__address { display: none; }
.contact__phone a { text-decoration: none; }
.contact__phone a:hover { text-decoration: underline; }
.facts { margin: 0; font-size: 15px; }
.facts > div { display: grid; grid-template-columns: 150px 1fr; gap: 24px; padding: 10px 0; border-top: 1px solid var(--rule); }
.facts > div:last-child { border-bottom: 1px solid var(--rule); }
.facts dt { font-family: var(--f-sans); color: var(--ink-2); }
.facts dd { margin: 0; }

.foot {
    display: flex; justify-content: space-between; align-items: center; gap: 16px;
    padding: 28px 0 36px;
    border-top: 1px solid var(--rule);
    font-family: var(--f-sans); font-size: 13px; color: var(--ink-2);
}
.foot__left { display: flex; align-items: center; gap: 10px; }

/* ---------- Small screens ---------- */

@media (max-width: 820px) {
    .bar { gap: 16px; padding: 0 16px; }
    .bar__nav { gap: 14px; margin-right: 12px; }
    .bar__nav a span:last-child { display: none; }
    .bar__nav a .nav__num { margin: 0; color: var(--ink-2); }
    .page { padding-left: 16px; padding-right: 16px; }
    .chapter::before { top: 24px; font-size: 180px; transform: translateX(10%); }
    .chapter { grid-template-columns: 1fr; row-gap: 20px; padding: 64px 0 56px; }
    .chapter__aside { order: 1; }
    .chapter__note { order: 2; position: static; margin: 0 0 8px; display: flex; flex-wrap: wrap; gap: 2px 14px; }
    .chapter__note .note__label { width: 100%; margin-bottom: 2px; }
    .chapter__body { order: 3; }
    .chapter:first-child { padding-top: 72px; }
    .chapter__aside { position: static; }
    .lead { font-size: 21px; }
    .list__row, .ledger__row, .facts > div { grid-template-columns: 1fr; gap: 6px; }
    .ledger__when { padding-top: 0; }
    .contact__phone { font-size: 19px; margin-bottom: 28px; }
    #contact .chapter__note { display: none; }
    .facts > .facts__address { display: grid; }
    .card { width: min(600px, 92vw); }
    .card__face { --r: 150px; }
    .card__face { padding: 6% 6%; }
    .stage__corner { top: 12px; right: 12px; }

}

@media (max-height: 520px) and (orientation: landscape) {
    .card { width: min(560px, 70vh * 1.6); }
}

@media (prefers-reduced-motion: reduce) {
    .card, .card.is-opening, .stage, .stage__hint { transition: none; }
}
