/* --------------------------------------------------------------------------
   NFC Business Card -- product page

   Brand tokens come from style.css. Everything here is scoped to .nfc so it
   cannot reach any other page.
   -------------------------------------------------------------------------- */

.nfc {
    --n-line: rgba(249, 251, 255, 0.10);
    --n-line-str: rgba(249, 251, 255, 0.18);
    --n-card: rgba(0, 0, 0, 0.22);
    --n-max: 1140px;
    --n-ease: cubic-bezier(0.16, 1, 0.3, 1);
    color: var(--color-body-text);
    font-family: var(--font-primary);
}

.nfc-wrap {
    max-width: var(--n-max);
    margin: 0 auto;
    padding: 0 1.75rem;
}

.nfc-sec { padding: 3.2rem 0; border-top: 1px solid var(--n-line); }
.nfc-sec:first-of-type { border-top: 0; }

/*  The sections below the hero were a heading and a 68ch column of text on
    a 1140px page, which left the right-hand half of every one of them
    empty. Putting the heading in a column of its own uses that width for
    something and gives the page a spine to read down. Under 900px it
    collapses back to one column, where the stacked version was right. */
.nfc-sec--split > .nfc-wrap {
    display: grid;
    grid-template-columns: minmax(210px, 0.8fr) minmax(0, 1.9fr);
    column-gap: 3rem;
    align-items: start;
}

.nfc-sec--split > .nfc-wrap > .nfc-h2 {
    grid-column: 1;
    grid-row: 1 / -1;
    margin: 0;
    position: sticky;
    top: 7rem;
}

.nfc-sec--split > .nfc-wrap > :not(.nfc-h2) { grid-column: 2; }

/*  a hairline under the heading, so the two columns read as one section */
.nfc-sec--split > .nfc-wrap > .nfc-h2::after {
    content: "";
    display: block;
    width: 40px;
    height: 3px;
    margin-top: 0.9rem;
    border-radius: 2px;
    background: var(--color-orange);
}

.nfc-h2 {
    margin: 0 0 1.1rem;
    font-family: var(--font-heavy, inherit);
    font-size: clamp(1.5rem, 3vw, 2.1rem);
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -0.01em;
    color: var(--color-light);
}

.nfc-p {
    margin: 0 0 1rem;
    max-width: 72ch;
    font-size: 1rem;
    line-height: 1.8;
    color: var(--color-body-text);
}

.nfc-p:last-child { margin-bottom: 0; }

/* ---- hero: the price is the headline act ------------------------------- */

/*  The clearance is bigger than a normal section because the header is fixed
    and 115px tall on a wide screen. */
.nfc-hero {
    position: relative;
    padding: clamp(8.5rem, 6rem + 5vw, 11rem) 0 4rem;
    overflow: hidden;
}

.nfc-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(60% 70% at 78% 18%, rgba(242, 100, 48, 0.13), transparent 62%),
        radial-gradient(50% 60% at 12% 8%, rgba(166, 212, 158, 0.07), transparent 60%);
    pointer-events: none;
}

.nfc-hero-grid {
    position: relative;
    display: grid;
    grid-template-columns: 1.05fr 0.95fr;
    gap: 3rem;
    align-items: center;
}

.nfc-h1 {
    margin: 0 0 1.4rem;
    font-family: var(--font-heavy, inherit);
    font-size: clamp(2.1rem, 5vw, 3.4rem);
    font-weight: 900;
    line-height: 1.05;
    letter-spacing: -0.02em;
    color: var(--color-light);
}

.nfc-hero-p { font-size: 1.05rem; }

/*  Price and delivery arrive as the same question -- what does it cost and
    when do I get it -- so they are one object, split into two labelled
    cells by a hairline. Before, they were a big number with a small green
    line floating next to it and no way to tell they were a pair. */
.nfc-buy {
    display: inline-grid;
    grid-template-columns: auto 1px auto;
    align-items: stretch;
    margin: 1.8rem 0 1.5rem;
    border: 1px solid var(--n-line-str);
    border-radius: 16px;
    background:
        linear-gradient(150deg, rgba(242, 100, 48, 0.10), transparent 58%),
        var(--n-card);
    overflow: hidden;
}

/*  the divider is the grid's middle column, so it is exactly as tall as the
    taller cell without anyone having to know which one that is */
.nfc-buy::before {
    content: "";
    grid-column: 2;
    grid-row: 1;
    background: var(--n-line-str);
}

.nfc-buy-cell {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 0.3rem;
    padding: 1rem 1.5rem;
}

.nfc-buy-cell--price { grid-column: 1; }
.nfc-buy-cell:not(.nfc-buy-cell--price) { grid-column: 3; }

.nfc-buy-label {
    font-size: 0.62rem;
    font-weight: 800;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--color-muted);
}

.nfc-price {
    font-family: var(--font-heavy, inherit);
    font-size: clamp(1.9rem, 3.6vw, 2.5rem);
    font-weight: 900;
    line-height: 1;
    letter-spacing: -0.02em;
    color: var(--color-light);
}

.nfc-buy-value {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    font-size: 1.05rem;
    font-weight: 800;
    line-height: 1.1;
    color: var(--color-green);
}

.nfc-buy-value i { font-size: 1.2rem; }

.nfc-actions { display: flex; flex-wrap: wrap; gap: 0.8rem; }

.nfc-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.95rem 1.9rem;
    border-radius: 999px;
    font-family: var(--font-primary);
    font-size: 0.95rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    text-decoration: none;
    white-space: nowrap;
    transition: transform 0.25s var(--n-ease), box-shadow 0.25s var(--n-ease),
                background 0.25s var(--n-ease), border-color 0.25s var(--n-ease);
}

.nfc-btn i { font-size: 1.15rem; }

.nfc-btn--primary {
    border: 1px solid rgba(242, 100, 48, 0.4);
    background: var(--gradient-button, var(--color-orange));
    color: #fff;
    box-shadow: 0 8px 25px rgba(242, 100, 48, 0.25);
}

.nfc-btn--primary:hover,
.nfc-btn--primary:focus-visible {
    transform: translateY(-2px);
    box-shadow: 0 12px 30px rgba(242, 100, 48, 0.4);
}

.nfc-btn--ghost {
    border: 1px solid var(--n-line-str);
    background: transparent;
    color: var(--color-light);
}

.nfc-btn--ghost:hover,
.nfc-btn--ghost:focus-visible {
    border-color: rgba(166, 212, 158, 0.5);
    background: rgba(166, 212, 158, 0.06);
}

/* ---- the card, drawn rather than photographed -------------------------- */

.nfc-figure { display: grid; place-items: center; }

.nfc-card {
    position: relative;
    width: min(100%, 380px);
    aspect-ratio: 1.586;          /* the ISO card ratio, 85.6 x 54 mm */
    border-radius: 18px;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    background:
        linear-gradient(145deg, rgba(255, 255, 255, 0.10), rgba(255, 255, 255, 0.02)),
        var(--color-dark);
    border: 1px solid var(--n-line-str);
    box-shadow: 0 26px 60px rgba(0, 0, 0, 0.45);
    transform: rotate(-6deg);
    transition: transform 0.6s var(--n-ease);
}

.nfc-figure:hover .nfc-card { transform: rotate(-2deg) translateY(-6px); }

.nfc-card-top { display: flex; align-items: center; justify-content: space-between; }

/*  The card belongs to whoever is looking at it, so it says so. The old
    version printed our own logo here, which made the mock-up an
    advertisement for us rather than a preview of theirs. */
.nfc-card-brand {
    font-family: var(--font-heavy, inherit);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--color-muted);
    padding: 0.42rem 0.75rem;
    border: 1px dashed var(--n-line-str);
    border-radius: 8px;
}

/*  The contactless mark: a dot and three arcs, drawn rather than built out
    of clipped circles. The arcs light up one after another, outward, which
    is the gesture the product performs. */
.nfc-mark {
    width: 34px;
    height: 34px;
    flex: none;
    color: var(--color-orange);
}

.nfc-arc {
    opacity: 0.3;
    animation: nfcTap 2.4s var(--n-ease) infinite;
}

.nfc-arc-1 { animation-delay: 0s; }
.nfc-arc-2 { animation-delay: 0.22s; }
.nfc-arc-3 { animation-delay: 0.44s; }

@keyframes nfcTap {
    0%   { opacity: 0.3; }
    18%  { opacity: 1; }
    62%  { opacity: 0.3; }
    100% { opacity: 0.3; }
}

.nfc-card-name {
    font-family: var(--font-heavy, inherit);
    font-size: 1.15rem;
    font-weight: 800;
    letter-spacing: 0.02em;
    color: var(--color-light);
}

.nfc-card-role {
    margin-top: 0.2rem;
    font-size: 0.72rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--color-muted);
}

.nfc-card-rule {
    margin-top: 0.9rem;
    height: 2px;
    width: 44px;
    border-radius: 2px;
    background: var(--color-green);
}

/* ---- the photographs --------------------------------------------------

   Three slots. Until the files land in /uploads/nfc/ each one draws its own
   frame at the right aspect ratio, so the page is never a broken image and
   the layout does not move when the photographs arrive.
   ----------------------------------------------------------------------- */

.nfc-photos {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-top: 1.6rem;
}

.nfc-photo { margin: 0; }

.nfc-photo img {
    display: block;
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    border-radius: 14px;
    border: 1px solid var(--n-line);
}

.nfc-photo figcaption {
    margin-top: 0.6rem;
    font-size: 0.82rem;
    color: var(--color-muted);
}

.nfc-photo--empty::before {
    content: "";
    display: block;
    aspect-ratio: 4 / 3;
    border-radius: 14px;
    border: 1px dashed var(--n-line-str);
    background:
        repeating-linear-gradient(-45deg, rgba(249, 251, 255, 0.022) 0 12px,
                                  transparent 12px 24px),
        var(--n-card);
}

.nfc-photo--empty { position: relative; }

.nfc-photo-mark {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    aspect-ratio: 4 / 3;
    display: grid;
    place-items: center;
    font-size: 1.9rem;
    color: rgba(249, 251, 255, 0.16);
    pointer-events: none;
}

/* ---- what it links to: chips ------------------------------------------- */

.nfc-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
    margin-top: 1.4rem;
}

.nfc-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.65rem 1.1rem;
    border: 1px solid var(--n-line);
    border-radius: 999px;
    background: var(--n-card);
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--color-light);
}

.nfc-chip i { font-size: 1.1rem; color: var(--color-green); }

.nfc-note {
    margin-top: 1.6rem;
    font-size: 1rem;
    font-weight: 600;
    color: var(--color-light);
}

/* ---- what is included: a spec sheet ------------------------------------ */

.nfc-spec {
    margin: 0;
    padding: 1.6rem 1.8rem;
    border: 1px solid var(--n-line-str);
    border-radius: 20px;
    background: var(--n-card);
    list-style: none;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.85rem 1.6rem;
}

.nfc-spec li {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    font-size: 0.95rem;
    color: var(--color-light);
}

.nfc-spec i { flex: none; font-size: 1.15rem; color: var(--color-green); }

/* ---- how it works: numbered, because the order is the point ------------ */

.nfc-steps {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.2rem;
    margin-top: 1.8rem;
    counter-reset: nfcstep;
}

.nfc-step {
    padding: 1.5rem 1.4rem;
    border: 1px solid var(--n-line);
    border-radius: 18px;
    background: var(--n-card);
}

.nfc-step::before {
    counter-increment: nfcstep;
    content: counter(nfcstep);
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    margin-bottom: 0.9rem;
    border-radius: 11px;
    background: rgba(242, 100, 48, 0.12);
    color: var(--color-orange);
    font-family: var(--font-heavy, inherit);
    font-size: 1rem;
    font-weight: 800;
}

.nfc-step h3 {
    margin: 0 0 0.45rem;
    font-size: 1rem;
    font-weight: 700;
    color: var(--color-light);
}

.nfc-step p {
    margin: 0;
    font-size: 0.9rem;
    line-height: 1.7;
    color: var(--color-muted);
}

/* ---- who it is for ------------------------------------------------------ */

.nfc-who {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    margin-top: 1.3rem;
}

.nfc-who span {
    padding: 0.55rem 1rem;
    border: 1px solid var(--n-line);
    border-radius: 10px;
    background: rgba(166, 212, 158, 0.06);
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--color-light);
}

/* ---- faq ---------------------------------------------------------------- */

.nfc-faq { display: grid; gap: 0.8rem; margin-top: 1.6rem; }

.nfc-faq details {
    border: 1px solid var(--n-line);
    border-radius: 16px;
    background: var(--n-card);
    overflow: hidden;
}

.nfc-faq summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.1rem 1.4rem;
    cursor: pointer;
    font-size: 0.98rem;
    font-weight: 700;
    color: var(--color-light);
    list-style: none;
}

.nfc-faq summary::-webkit-details-marker { display: none; }

.nfc-faq summary::after {
    content: "";
    flex: none;
    width: 9px;
    height: 9px;
    border-right: 2px solid var(--color-orange);
    border-bottom: 2px solid var(--color-orange);
    transform: rotate(45deg) translateY(-2px);
    transition: transform 0.25s var(--n-ease);
}

.nfc-faq details[open] summary::after { transform: rotate(-135deg) translateY(-2px); }

.nfc-faq p {
    margin: 0;
    padding: 0 1.4rem 1.2rem;
    font-size: 0.94rem;
    line-height: 1.75;
    color: var(--color-muted);
}

/* ---- closing ------------------------------------------------------------ */

.nfc-end {
    text-align: center;
    padding: 3.4rem 2rem;
    border: 1px solid rgba(242, 100, 48, 0.28);
    border-radius: 24px;
    background:
        radial-gradient(90% 120% at 50% 0%, rgba(242, 100, 48, 0.10), transparent 65%),
        var(--n-card);
}

.nfc-end .nfc-p { margin: 0 auto 1.8rem; }
.nfc-end .nfc-actions { justify-content: center; }

/* ---- narrower ----------------------------------------------------------- */

@media (max-width: 900px) {
    .nfc-sec--split > .nfc-wrap { display: block; }
    .nfc-sec--split > .nfc-wrap > .nfc-h2 {
        position: static;
        margin-bottom: 1.1rem;
    }
    .nfc-photos { grid-template-columns: repeat(3, 1fr); gap: 0.7rem; }
    .nfc-hero-grid { grid-template-columns: 1fr; gap: 2.5rem; }
    .nfc-figure { order: -1; }
    .nfc-card { transform: rotate(-3deg); }
    .nfc-steps { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 600px) {
    .nfc-wrap { padding: 0 1.2rem; }
    .nfc-sec { padding: 2.4rem 0; }
    .nfc-photos { grid-template-columns: 1fr 1fr; }
    .nfc-buy { display: grid; grid-template-columns: 1fr; }
    .nfc-buy::before { display: none; }
    /*  The wide layout pins the second cell to column 3 with a :not()
        selector, which is two classes' worth of specificity. A bare
        .nfc-buy-cell here loses to it, the cell stays in column 3, and
        the grid grows an implicit column -- so the two cells sit side
        by side at 375px with the price wrapping over two lines. Match
        the specificity and they stack. */
    .nfc-buy > .nfc-buy-cell,
    .nfc-buy > .nfc-buy-cell:not(.nfc-buy-cell--price) { grid-column: 1; }
    .nfc-buy-cell + .nfc-buy-cell { border-top: 1px solid var(--n-line-str); }
    .nfc-steps { grid-template-columns: 1fr; }
    .nfc-spec { grid-template-columns: 1fr; }
    .nfc-buy { gap: 0.9rem; }
    .nfc-actions { width: 100%; }
    .nfc-btn { flex: 1 1 auto; justify-content: center; }
}

@media (prefers-reduced-motion: reduce) {
    .nfc-arc { animation: none; opacity: 1; }
    .nfc-figure:hover .nfc-card { transform: rotate(-6deg); }
    .nfc-btn:hover { transform: none; }
}
