/* =========================================================================
   tech-modern.css — "Signal"
   Light SaaS / product-magazine template for the CMS multi-template system.
   Editorial whitespace · Bricolage Grotesque + Newsreader + Space Mono ·
   ink / paper with a surgical indigo→violet gradient accent.
   Prefix: tm-   (kept isolated from st-/nt-/fp-/re- siblings)
   ========================================================================= */

:root{
    --tm-paper:    #ffffff;   /* base surface                       */
    --tm-canvas:   #f6f6fb;   /* page background, faint cool         */
    --tm-ink:      #0d0f17;   /* near-black headings / text          */
    --tm-ink-soft: #545a72;   /* secondary text                      */
    --tm-line:     rgba(13,15,23,.10);   /* hairline dividers        */
    --tm-line-2:   rgba(13,15,23,.05);
    --tm-i1:       #4338ca;   /* indigo  (gradient start)            */
    --tm-i2:       #6d28d9;   /* violet  (gradient mid)              */
    --tm-i3:       #9333ea;   /* purple  (gradient end)              */
    --tm-spark:    #ff5b39;   /* warm coral, hover-only accent       */
    --tm-grad:     linear-gradient(100deg,var(--tm-i1) 0%,var(--tm-i2) 52%,var(--tm-i3) 100%);
    --tm-shadow:   0 24px 60px -32px rgba(40,28,90,.42);
    --tm-radius:   18px;
    --tm-maxread:  40rem;
    --tm-ease:     cubic-bezier(.22,.61,.36,1);
    --tm-mono:     "Space Mono",ui-monospace,SFMono-Regular,Menlo,monospace;
}

*{ box-sizing:border-box; }
html{ -webkit-text-size-adjust:100%; scroll-behavior:smooth; }

body.tm-body{
    margin:0;
    background:var(--tm-canvas);
    color:var(--tm-ink);
    font-family:"Newsreader",Georgia,"Times New Roman",serif;
    font-optical-sizing:auto;
    font-size:1.075rem;
    line-height:1.72;
    font-weight:400;
    -webkit-font-smoothing:antialiased;
    text-rendering:optimizeLegibility;
    overflow-x:hidden;
}

.tm-body .container{ max-width:1200px; padding-left:1.4rem; padding-right:1.4rem; }
.tm-body a{ color:inherit; text-decoration:none; }

/* shared mono eyebrow / date ------------------------------------------------ */
.tm-meta{
    font-family:var(--tm-mono);
    font-size:.72rem;
    letter-spacing:.14em;
    text-transform:uppercase;
    color:var(--tm-ink-soft);
}

/* category chip ------------------------------------------------------------- */
.tm-body .tm-chip{
    display:inline-flex;
    align-items:center;
    font-family:var(--tm-mono);
    font-size:.68rem;
    letter-spacing:.16em;
    text-transform:uppercase;
    padding:.42rem .72rem;
    border-radius:999px;
    color:#fff;
    background:var(--tm-grad);
    transition:transform .25s var(--tm-ease),box-shadow .25s var(--tm-ease);
}
.tm-body .tm-chip:hover{ transform:translateY(-1px); box-shadow:0 8px 20px -10px rgba(78,40,160,.6); color:#fff; }
.tm-body .tm-chip--ghost{
    color:var(--tm-i2);
    background:transparent;
    border:1px solid var(--tm-line);
}
.tm-body .tm-chip--ghost:hover{ color:var(--tm-i2); border-color:var(--tm-i2); box-shadow:none; }

/* call-to-action link ------------------------------------------------------- */
.tm-cta{
    display:inline-flex;
    align-items:center;
    gap:.5rem;
    font-family:var(--tm-mono);
    font-size:.78rem;
    letter-spacing:.12em;
    text-transform:uppercase;
    color:var(--tm-ink);
    padding-bottom:2px;
    background-image:var(--tm-grad);
    background-size:0% 2px;
    background-repeat:no-repeat;
    background-position:0 100%;
    transition:background-size .35s var(--tm-ease),color .25s var(--tm-ease);
}
.tm-cta span{ transition:transform .3s var(--tm-ease); }
.tm-cta:hover{ color:var(--tm-spark); background-size:100% 2px; }
.tm-cta:hover span{ transform:translateX(5px); }
.tm-cta--sm{ font-size:.72rem; }

/* =========================  HEADER  ===================================== */
.tm-head{
    background:var(--tm-paper);
}
.tm-head__inner{
    display:flex;
    align-items:center;
    gap:1.5rem;
    padding:1.05rem 0;
}
.tm-head__rule{
    display:block;
    height:1px;
    width:100%;
    background:linear-gradient(90deg,transparent,var(--tm-line),transparent);
}

.tm-brand{
    display:inline-flex;
    align-items:center;
    gap:.6rem;
    font-family:"Bricolage Grotesque",sans-serif;
    font-weight:800;
    font-size:1.4rem;
    letter-spacing:-.02em;
    line-height:1;
}
.tm-brand__img{ width:30px;height:30px;border-radius:7px;object-fit:cover; }
.tm-brand__text{
    background:var(--tm-grad);
    -webkit-background-clip:text;
    background-clip:text;
    color:transparent;
}

.tm-nav{ display:flex; align-items:center; gap:1.9rem; }
.tm-nav__link{
    position:relative;
    font-family:var(--tm-mono);
    font-size:.74rem;
    letter-spacing:.13em;
    text-transform:uppercase;
    color:var(--tm-ink-soft);
    padding:.2rem 0;
    transition:color .22s var(--tm-ease);
}
.tm-nav__link::after{
    content:"";
    position:absolute;
    left:0; bottom:-3px;
    height:2px; width:0;
    background:var(--tm-grad);
    transition:width .3s var(--tm-ease);
}
.tm-nav__link:hover{ color:var(--tm-ink); }
.tm-nav__link:hover::after{ width:100%; }

/* hamburger ---------------------------------------------------------------- */
.tm-toggle{
    display:none;
    flex-direction:column;
    justify-content:center;
    gap:5px;
    width:44px; height:44px;
    margin-left:auto;
    border:1px solid var(--tm-line);
    border-radius:12px;
    background:var(--tm-paper);
    cursor:pointer;
}
.tm-toggle span{
    display:block;
    width:20px; height:2px;
    margin:0 auto;
    background:var(--tm-ink);
    border-radius:2px;
}

/* =========================  MAIN  ====================================== */
.tm-main{ display:block; }
.tm-wrap{ padding:1.6rem 0 4.5rem; }

/* =========================  HERO (split)  ============================== */
.tm-hero__inner{
    display:grid;
    grid-template-columns:1.05fr .95fr;
    gap:clamp(2rem,5vw,5rem);
    align-items:center;
    padding:clamp(2.5rem,6vw,5rem) 0 clamp(1.25rem,3vw,2rem);
}
.tm-hero__text{ animation:tm-rise .8s var(--tm-ease) both; }
.tm-hero__title{
    font-family:"Bricolage Grotesque",sans-serif;
    font-weight:800;
    font-size:clamp(2.5rem,5.4vw,4.4rem);
    line-height:1.02;
    letter-spacing:-.035em;
    margin:1.4rem 0 1.3rem;
}
.tm-hero__title a{ background-image:linear-gradient(var(--tm-i2),var(--tm-i2)); background-size:0 2px; background-repeat:no-repeat; background-position:0 92%; transition:background-size .4s var(--tm-ease); }
.tm-hero__title a:hover{ background-size:100% 2px; }
.tm-hero__intro{
    font-size:1.22rem;
    line-height:1.62;
    color:var(--tm-ink-soft);
    max-width:34rem;
    margin:0 0 1.9rem;
}
.tm-hero__foot{ display:flex; align-items:center; gap:1.6rem; flex-wrap:wrap; }

.tm-hero__media{
    position:relative;
    display:block;
    aspect-ratio:4/3.2;
    animation:tm-rise .9s .12s var(--tm-ease) both;
}
.tm-hero__media img{
    position:relative;
    z-index:2;
    width:100%; height:100%;
    object-fit:cover;
    border-radius:var(--tm-radius);
    box-shadow:var(--tm-shadow);
}
.tm-hero__frame{
    position:absolute;
    inset:18px -18px -18px 18px;
    border-radius:var(--tm-radius);
    background:var(--tm-grad);
    opacity:.16;
    z-index:1;
}

/* =========================  INDEX LIST ROWS  ========================== */
.tm-feed{ border-top:1px solid var(--tm-line); }
.tm-row{
    display:grid;
    grid-template-columns:auto 168px 1fr;
    gap:2rem;
    align-items:start;
    padding:2.4rem 0;
    border-bottom:1px solid var(--tm-line);
}
.tm-row--noimg{ grid-template-columns:auto 1fr; }
.tm-row__num{
    font-family:var(--tm-mono);
    font-size:.82rem;
    color:var(--tm-i2);
    padding-top:.35rem;
}
.tm-row__media{
    display:block;
    aspect-ratio:1/1;
    border-radius:14px;
    overflow:hidden;
    background:var(--tm-line-2);
}
.tm-row__media img{
    width:100%; height:100%;
    object-fit:cover;
    transition:transform .5s var(--tm-ease);
}
.tm-row:hover .tm-row__media img{ transform:scale(1.05); }
.tm-row__body{ min-width:0; }
.tm-row__meta{
    display:flex;
    align-items:center;
    gap:1rem;
    margin-bottom:.85rem;
}
.tm-row__title{
    font-family:"Bricolage Grotesque",sans-serif;
    font-weight:700;
    font-size:clamp(1.4rem,2.4vw,1.95rem);
    line-height:1.16;
    letter-spacing:-.02em;
    margin:0 0 .6rem;
}
.tm-row__title a{ transition:color .2s var(--tm-ease); }
.tm-row__title a:hover{ color:var(--tm-i2); }
.tm-row__excerpt{
    color:var(--tm-ink-soft);
    font-size:1.08rem;
    margin:0 0 1rem;
    display:-webkit-box;
    -webkit-line-clamp:2;
    -webkit-box-orient:vertical;
    overflow:hidden;
}

/* =========================  INTRO NOTE  =============================== */
.tm-note{
    position:relative;
    margin-top:3.4rem;
    padding:2.4rem 2.6rem;
    background:var(--tm-paper);
    border:1px solid var(--tm-line);
    border-radius:var(--tm-radius);
}
.tm-note__tag{
    display:inline-block;
    font-family:var(--tm-mono);
    font-size:.72rem;
    letter-spacing:.14em;
    color:var(--tm-i2);
    margin-bottom:.7rem;
}
.tm-note__body{ color:var(--tm-ink-soft); }
.tm-note__body :where(h1,h2,h3){ font-family:"Bricolage Grotesque",sans-serif; color:var(--tm-ink); }

/* =========================  PAGE / ARTICLE HEAD  ===================== */
.tm-pagehead{ padding:1rem 0 2.6rem; border-bottom:1px solid var(--tm-line); margin-bottom:.5rem; }
.tm-pagehead__tag{
    display:inline-block;
    font-family:var(--tm-mono);
    font-size:.74rem;
    letter-spacing:.16em;
    color:var(--tm-i2);
    margin-bottom:.8rem;
}
.tm-pagehead__title{
    font-family:"Bricolage Grotesque",sans-serif;
    font-weight:800;
    font-size:clamp(2.1rem,4.6vw,3.4rem);
    line-height:1.05;
    letter-spacing:-.03em;
    margin:0;
}

.tm-articlehead{ padding:3.6rem 0 1.8rem; max-width:54rem; }
.tm-articlehead__meta{ display:flex; align-items:center; gap:1rem; margin-bottom:1.3rem; }
.tm-articlehead__title{
    font-family:"Bricolage Grotesque",sans-serif;
    font-weight:800;
    font-size:clamp(2.3rem,5vw,3.9rem);
    line-height:1.07;
    letter-spacing:-.035em;
    margin:0;
}
.tm-article__hero{
    margin:1.6rem 0 0;
    border-radius:var(--tm-radius);
    overflow:hidden;
    box-shadow:var(--tm-shadow);
    aspect-ratio:16/8;
}
.tm-article__hero img{ width:100%; height:100%; object-fit:cover; display:block; }

/* =========================  READING COLUMN / PROSE  ================== */
.tm-read{ max-width:var(--tm-maxread); margin:0 auto; padding:3.4rem 0 4.5rem; }
.tm-prose{ font-size:1.16rem; line-height:1.82; }
.tm-prose > *:first-child{ margin-top:0; }
.tm-prose p{ margin:0 0 1.45rem; }
.tm-prose :where(h2,h3,h4){
    font-family:"Bricolage Grotesque",sans-serif;
    font-weight:700;
    letter-spacing:-.02em;
    line-height:1.2;
    color:var(--tm-ink);
    margin:2.8rem 0 1rem;
}
.tm-prose h2{ font-size:1.85rem; }
.tm-prose h3{ font-size:1.42rem; }
.tm-prose a{
    color:var(--tm-i2);
    text-decoration:underline;
    text-decoration-color:var(--tm-line);
    text-underline-offset:3px;
    transition:text-decoration-color .2s var(--tm-ease);
}
.tm-prose a:hover{ text-decoration-color:var(--tm-i2); }
.tm-prose img{ max-width:100%; height:auto; border-radius:14px; margin:1.6rem 0; }
.tm-prose ul,.tm-prose ol{ margin:0 0 1.45rem; padding-left:1.3rem; }
.tm-prose li{ margin:.4rem 0; }
.tm-prose blockquote{
    margin:2rem 0;
    padding:.4rem 0 .4rem 1.6rem;
    border-left:3px solid;
    border-image:var(--tm-grad) 1;
    font-style:italic;
    color:var(--tm-ink);
}
.tm-prose code{
    font-family:var(--tm-mono);
    font-size:.86em;
    background:#f0eefb;
    color:var(--tm-i1);
    padding:.16em .42em;
    border-radius:6px;
}
.tm-prose pre{
    background:#0d0f17;
    color:#e7e6f3;
    font-family:var(--tm-mono);
    font-size:.9rem;
    line-height:1.65;
    padding:1.3rem 1.5rem;
    border-radius:14px;
    overflow:auto;
    margin:1.8rem 0;
}
.tm-prose pre code{ background:none; color:inherit; padding:0; }
.tm-prose table{ width:100%; border-collapse:collapse; margin:1.8rem 0; font-size:1rem; }
.tm-prose th,.tm-prose td{ padding:.7rem .9rem; border-bottom:1px solid var(--tm-line); text-align:left; }
.tm-prose th{ font-family:var(--tm-mono); font-size:.78rem; text-transform:uppercase; letter-spacing:.08em; }

.tm-byline{
    display:flex;
    gap:1.1rem;
    margin-top:3rem;
    padding-top:2rem;
    border-top:1px solid var(--tm-line);
    color:var(--tm-ink-soft);
    font-style:italic;
}
.tm-byline__bar{ flex:0 0 4px; border-radius:4px; background:var(--tm-grad); }
.tm-byline p{ margin:0; }

/* =========================  PAGINATION (Bootstrap override)  ========= */
.tm-body .pagination{ gap:.4rem; margin-top:3rem; }
.tm-body .pagination .page-link{
    border:1px solid var(--tm-line);
    border-radius:11px;
    color:var(--tm-ink);
    background:var(--tm-paper);
    font-family:var(--tm-mono);
    font-size:.82rem;
    padding:.55rem .95rem;
    transition:border-color .2s var(--tm-ease),color .2s var(--tm-ease);
}
.tm-body .pagination .page-link:hover{ border-color:var(--tm-i2); color:var(--tm-i2); box-shadow:none; }
.tm-body .pagination .page-item.active .page-link{
    background:var(--tm-grad);
    border-color:transparent;
    color:#fff;
}

/* =========================  CONTACT FORM  =========================== */
.tm-form{ max-width:38rem; margin:3rem auto 0; }
.tm-body .tm-form .form-label{
    font-family:var(--tm-mono);
    font-size:.74rem;
    letter-spacing:.1em;
    text-transform:uppercase;
    color:var(--tm-ink-soft);
    margin-bottom:.45rem;
}
.tm-body .tm-form .form-control{
    border:1px solid var(--tm-line);
    border-radius:12px;
    padding:.85rem 1rem;
    font-family:"Newsreader",serif;
    font-size:1.05rem;
    background:var(--tm-paper);
}
.tm-body .tm-form .form-control:focus{
    border-color:var(--tm-i2);
    box-shadow:0 0 0 4px rgba(109,40,217,.12);
}
.tm-body .tm-btn{
    margin-top:.4rem;
    border:none;
    border-radius:999px;
    background:var(--tm-grad);
    color:#fff;
    font-family:var(--tm-mono);
    font-size:.78rem;
    letter-spacing:.12em;
    text-transform:uppercase;
    padding:.85rem 2rem;
    transition:transform .25s var(--tm-ease),box-shadow .25s var(--tm-ease);
}
.tm-body .tm-btn:hover{ transform:translateY(-2px); box-shadow:0 14px 28px -14px rgba(78,40,160,.6); }
.tm-form .form-check-label{ font-family:var(--tm-mono); font-size:.78rem; }

/* =========================  FOOTER  ================================= */
.tm-foot{
    border-top:1px solid var(--tm-line);
    background:var(--tm-paper);
    padding:2.6rem 0;
}
.tm-foot__inner{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:1.5rem;
    flex-wrap:wrap;
}
.tm-foot__brand{
    display:inline-flex;
    align-items:center;
    gap:.55rem;
    font-family:"Bricolage Grotesque",sans-serif;
    font-weight:700;
    font-size:1.05rem;
}
.tm-foot__nav{ display:flex; gap:1.8rem; }
.tm-foot__nav a{
    font-family:var(--tm-mono);
    font-size:.74rem;
    letter-spacing:.12em;
    text-transform:uppercase;
    color:var(--tm-ink-soft);
    transition:color .2s var(--tm-ease);
}
.tm-foot__nav a:hover{ color:var(--tm-i2); }

/* =========================  MOTION  ================================= */
@keyframes tm-rise{
    from{ opacity:0; transform:translateY(22px); }
    to{ opacity:1; transform:translateY(0); }
}
@media (prefers-reduced-motion:reduce){
    *{ animation:none !important; transition:none !important; scroll-behavior:auto !important; }
}

/* =========================  RESPONSIVE  ============================= */
/* MANDATORY: un-hide the Bootstrap .collapse nav on desktop, keep mobile
   collapse. Without this the desktop header shows no category links.       */
@media (min-width:992px){
    .tm-nav-wrap{
        display:flex !important;
        flex-basis:auto !important;
        width:auto !important;
        margin-left:auto;
    }
    .tm-toggle{ display:none; }
}
@media (max-width:991.98px){
    .tm-nav-wrap.collapse:not(.show){ display:none; }
    .tm-nav-wrap{ flex-basis:100%; order:3; }
    .tm-nav{
        flex-direction:column;
        align-items:flex-start;
        gap:.2rem;
        padding:1rem 0 .4rem;
    }
    .tm-nav__link{ padding:.6rem 0; }
    .tm-toggle{ display:flex; }
    .tm-head__inner{ flex-wrap:wrap; }
}
@media (max-width:860px){
    .tm-hero__inner{ grid-template-columns:1fr; gap:2.4rem; }
    .tm-hero__media{ order:-1; aspect-ratio:16/10; }
    .tm-hero__frame{ inset:12px -12px -12px 12px; }
    .tm-row{ grid-template-columns:110px 1fr; gap:1.3rem; }
    .tm-row--noimg{ grid-template-columns:1fr; }
    .tm-row__num{ display:none; }
}
@media (max-width:540px){
    body.tm-body{ font-size:1.02rem; }
    .tm-row{ grid-template-columns:1fr; }
    .tm-row__media{ aspect-ratio:16/9; max-height:220px; }
    .tm-wrap{ padding:2.4rem 0 3.2rem; }
    .tm-note{ padding:1.8rem 1.5rem; }
    .tm-foot__inner{ flex-direction:column; align-items:flex-start; }
}
