/* =========================================================
   PRATIK INSIGHT
   Shared stylesheet
   Pure CSS — no frameworks, no dependencies
   ========================================================= */


/* ---------------------------------------------------------
   1. RESET & BASE
   --------------------------------------------------------- */

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    background: #f7f6f2;
    color: #181818;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 16px;
    line-height: 1.7;
    text-rendering: optimizeLegibility;
}

img {
    display: block;
    max-width: 100%;
    height: auto;
}

a {
    color: inherit;
}

button,
input,
textarea,
select {
    font: inherit;
}

::selection {
    background: #181818;
    color: #ffffff;
}


/* ---------------------------------------------------------
   2. DESIGN TOKENS
   --------------------------------------------------------- */

:root {
    --background: #f7f6f2;
    --surface: #fbfaf7;
    --text: #181818;
    --muted: #686762;
    --soft: #8a8983;
    --border: #dcdad4;
    --max-width: 1180px;
    --reading-width: 760px;
    --side-padding: 24px;
}


/* ---------------------------------------------------------
   3. ACCESSIBILITY
   --------------------------------------------------------- */

.skip-link {
    position: absolute;
    left: 16px;
    top: -100px;
    z-index: 1000;
    padding: 10px 14px;
    background: var(--text);
    color: #fff;
    text-decoration: none;
}

.skip-link:focus {
    top: 16px;
}

:focus-visible {
    outline: 2px solid var(--text);
    outline-offset: 4px;
}


/* ---------------------------------------------------------
   4. TYPOGRAPHY
   --------------------------------------------------------- */

h1,
h2,
h3,
h4,
p,
blockquote {
    margin-top: 0;
}

h1,
h2,
h3 {
    font-family: Georgia, "Times New Roman", serif;
    font-weight: 400;
    letter-spacing: -0.02em;
}

h1 {
    font-size: clamp(2.7rem, 8vw, 5.8rem);
    line-height: 0.98;
}

h2 {
    font-size: clamp(2rem, 5vw, 3.3rem);
    line-height: 1.1;
}

h3 {
    font-size: 1.5rem;
    line-height: 1.25;
}

p {
    margin-bottom: 1.25rem;
}

.serif {
    font-family: Georgia, "Times New Roman", serif;
}


/* ---------------------------------------------------------
   5. GLOBAL LAYOUT
   --------------------------------------------------------- */

.site-container {
    width: min(var(--max-width), calc(100% - (var(--side-padding) * 2)));
    margin-inline: auto;
}

.site-main {
    min-height: 60vh;
}


/* ---------------------------------------------------------
   6. HEADER
   --------------------------------------------------------- */

.site-header {
    padding: 22px 0;
}

.header-inner {
    width: min(var(--max-width), calc(100% - (var(--side-padding) * 2)));
    margin-inline: auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.brand {
    font-family: Georgia, "Times New Roman", serif;
    font-size: 1.2rem;
    line-height: 1;
    text-decoration: none;
    white-space: nowrap;
}

.main-nav a {
    color: var(--muted);
    font-size: 0.9rem;
    text-decoration: none;
    white-space: nowrap;
}

.main-nav a:hover {
    color: var(--text);
}

.main-nav a::after {
    content: " →";
    transition: margin-left 0.2s ease;
}

.main-nav a:hover::after {
    margin-left: 3px;
}


/* ---------------------------------------------------------
   7. FOOTER
   --------------------------------------------------------- */

.site-footer {
    margin-top: 100px;
    border-top: 1px solid var(--border);
}

.footer-inner {
    width: min(var(--max-width), calc(100% - (var(--side-padding) * 2)));
    margin-inline: auto;
    padding: 42px 0 32px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.3fr 1fr;
    gap: 50px;
}

.footer-brand {
    margin-bottom: 10px;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 1.2rem;
}

.footer-description {
    max-width: 520px;
    color: var(--muted);
    font-size: 0.92rem;
}

.footer-support {
    max-width: 420px;
    margin-left: auto;
}

.footer-support p {
    color: var(--muted);
    font-size: 0.92rem;
}

.support-link,
.text-link {
    display: inline-block;
    color: var(--text);
    text-decoration: none;
    border-bottom: 1px solid var(--text);
    padding-bottom: 2px;
}

.support-link:hover,
.text-link:hover {
    opacity: 0.65;
}

.footer-bottom {
    margin-top: 38px;
    padding-top: 18px;
    border-top: 1px solid var(--border);
    color: var(--soft);
    font-size: 0.78rem;
}


/* ---------------------------------------------------------
   8. HOMEPAGE
   --------------------------------------------------------- */

.home-main {
    padding-bottom: 20px;
}

.hero {
    width: min(var(--max-width), calc(100% - (var(--side-padding) * 2)));
    min-height: calc(100vh - 90px);
    margin-inline: auto;
    display: grid;
    grid-template-columns: 1fr 390px;
    align-items: center;
    gap: 90px;
    padding: 70px 0 100px;
}

.hero-copy {
    max-width: 680px;
}

.hero-title {
    max-width: 650px;
    margin-bottom: 34px;
    font-size: clamp(3.3rem, 8vw, 6.8rem);
}

.hero-link {
    font-family: Georgia, "Times New Roman", serif;
    font-size: 1.15rem;
    text-decoration: none;
}

.hero-link span {
    display: inline-block;
    margin-left: 4px;
    transition: transform 0.2s ease;
}

.hero-link:hover span {
    transform: translateX(4px);
}

.hero-portrait {
    width: 100%;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    filter: grayscale(100%);
    background: #e9e7e1;
}


/* ---------------------------------------------------------
   9. HOMEPAGE — E-BOOK CATALOGUE
   --------------------------------------------------------- */

.home-books {
    width: min(var(--max-width), calc(100% - (var(--side-padding) * 2)));
    margin: 0 auto;
    padding: 30px 0 30px;
}

.section-intro {
    margin-bottom: 42px;
}

.section-label {
    margin-bottom: 8px;
    color: var(--muted);
    font-size: 0.75rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.section-heading {
    margin-bottom: 0;
}

.books-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
}

.book-item {
    text-decoration: none;
}

.book-cover {
    position: relative;
    aspect-ratio: 3 / 4;
    margin-bottom: 18px;
    border: 1px solid var(--border);
    background: var(--surface);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.book-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.book-cover-placeholder {
    padding: 30px;
    text-align: center;
}

.book-cover-placeholder .book-cover-title {
    margin: 0;
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(2rem, 4vw, 3.2rem);
    line-height: 0.95;
    text-transform: uppercase;
}

.book-cover-placeholder .book-cover-author {
    margin-top: 18px;
    color: var(--muted);
    font-size: 0.72rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.book-name {
    margin-bottom: 4px;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 1.45rem;
}

.book-meta {
    margin: 0;
    color: var(--muted);
    font-size: 0.85rem;
}

.book-item:hover .book-name {
    text-decoration: underline;
    text-underline-offset: 4px;
}


/* ---------------------------------------------------------
   10. ARCHIVE
   --------------------------------------------------------- */

.archive-main {
    padding: 80px 0 20px;
}

.page-intro {
    max-width: 760px;
    margin-bottom: 90px;
}

.page-label {
    margin-bottom: 16px;
    color: var(--muted);
    font-size: 0.75rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.page-title {
    margin-bottom: 24px;
}

.page-description {
    max-width: 690px;
    color: var(--muted);
    font-size: 1.08rem;
}

.archive-list {
    border-top: 1px solid var(--border);
}

.archive-item {
    display: grid;
    grid-template-columns: 1fr 150px 110px;
    gap: 25px;
    align-items: baseline;
    padding: 24px 0;
    border-bottom: 1px solid var(--border);
    text-decoration: none;
}

.archive-item-title {
    margin: 0;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 1.55rem;
}

.archive-item-category,
.archive-item-date {
    color: var(--muted);
    font-size: 0.8rem;
}

.archive-item-date {
    text-align: right;
}

.archive-item:hover .archive-item-title {
    text-decoration: underline;
    text-underline-offset: 5px;
}


/* ---------------------------------------------------------
   11. ARTICLE
   --------------------------------------------------------- */

.article-main {
    padding: 85px 0 30px;
}

.article-header {
    width: min(var(--reading-width), calc(100% - (var(--side-padding) * 2)));
    margin: 0 auto 70px;
}

.article-category {
    margin-bottom: 18px;
    color: var(--muted);
    font-size: 0.75rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.article-title {
    margin-bottom: 24px;
    font-size: clamp(3rem, 8vw, 5.7rem);
}

.article-date {
    margin: 0;
    color: var(--muted);
    font-size: 0.82rem;
}

.article-content {
    width: min(var(--reading-width), calc(100% - (var(--side-padding) * 2)));
    margin: 0 auto;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 1.12rem;
    line-height: 1.85;
}

.article-content p {
    margin-bottom: 1.7rem;
}

.article-content h2 {
    margin-top: 65px;
    margin-bottom: 24px;
    font-size: 2rem;
}

.article-content h3 {
    margin-top: 45px;
    margin-bottom: 18px;
}

.article-content blockquote {
    margin: 45px 0;
    padding-left: 24px;
    border-left: 2px solid var(--text);
    font-size: 1.3rem;
    line-height: 1.55;
}

.article-end {
    width: min(var(--reading-width), calc(100% - (var(--side-padding) * 2)));
    margin: 70px auto 0;
    padding-top: 28px;
    border-top: 1px solid var(--border);
}


/* ---------------------------------------------------------
   12. E-BOOK PAGE
   --------------------------------------------------------- */

.book-main {
    padding: 75px 0 20px;
}

.book-hero {
    width: min(var(--max-width), calc(100% - (var(--side-padding) * 2)));
    margin-inline: auto;
    display: grid;
    grid-template-columns: 330px 1fr;
    gap: 80px;
    align-items: center;
    padding-bottom: 100px;
}

.book-page-cover {
    width: 100%;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    border: 1px solid var(--border);
    background: var(--surface);
}

.book-page-cover-placeholder {
    width: 100%;
    aspect-ratio: 3 / 4;
    border: 1px solid var(--border);
    background: var(--surface);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 35px;
    text-align: center;
}

.book-page-cover-placeholder strong {
    display: block;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 3.2rem;
    font-weight: 400;
    line-height: 0.9;
    text-transform: uppercase;
}

.book-page-cover-placeholder span {
    display: block;
    margin-top: 20px;
    color: var(--muted);
    font-size: 0.7rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.book-page-title {
    margin-bottom: 15px;
    font-size: clamp(3.5rem, 8vw, 6.5rem);
}

.book-author {
    margin-bottom: 28px;
    color: var(--muted);
    font-family: Georgia, "Times New Roman", serif;
    font-size: 1.05rem;
}

.book-description {
    max-width: 650px;
    color: var(--muted);
    font-size: 1.08rem;
}

.book-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 18px;
    margin-top: 35px;
}

.button-link {
    display: inline-block;
    padding: 11px 18px;
    border: 1px solid var(--text);
    background: var(--text);
    color: #fff;
    text-decoration: none;
    font-size: 0.85rem;
}

.button-link:hover {
    background: transparent;
    color: var(--text);
}

.button-link.secondary {
    background: transparent;
    color: var(--text);
}

.button-link.secondary:hover {
    background: var(--text);
    color: #fff;
}

.book-details {
    width: min(760px, calc(100% - (var(--side-padding) * 2)));
    margin-inline: auto;
    padding-bottom: 30px;
}

.book-section {
    padding: 50px 0;
    border-top: 1px solid var(--border);
}

.book-section h2 {
    margin-bottom: 22px;
    font-size: 2rem;
}

.book-section p {
    color: var(--muted);
}

.contents {
    margin: 0;
    padding: 0;
    list-style: none;
}

.contents li {
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
    font-family: Georgia, "Times New Roman", serif;
}


/* ---------------------------------------------------------
   13. SUPPORT PAGE
   --------------------------------------------------------- */

.support-main {
    width: min(760px, calc(100% - (var(--side-padding) * 2)));
    margin-inline: auto;
    padding: 110px 0 40px;
}

.support-title {
    margin-bottom: 30px;
}

.support-content {
    font-family: Georgia, "Times New Roman", serif;
    font-size: 1.15rem;
    line-height: 1.85;
}

.support-box {
    margin-top: 55px;
    padding: 30px;
    border: 1px solid var(--border);
    background: var(--surface);
}

.support-box p {
    margin-bottom: 20px;
    color: var(--muted);
    font-family: Arial, Helvetica, sans-serif;
    font-size: 0.95rem;
}


/* ---------------------------------------------------------
   14. RESPONSIVE — TABLET
   --------------------------------------------------------- */

@media (max-width: 900px) {

    .hero {
        grid-template-columns: 1fr 300px;
        gap: 45px;
    }

    .hero-title {
        font-size: clamp(3rem, 8vw, 5rem);
    }

    .book-hero {
        grid-template-columns: 270px 1fr;
        gap: 50px;
    }

    .books-grid {
        gap: 20px;
    }

    .archive-item {
        grid-template-columns: 1fr 120px 95px;
    }
}


/* ---------------------------------------------------------
   15. RESPONSIVE — MOBILE
   --------------------------------------------------------- */

@media (max-width: 700px) {

    :root {
        --side-padding: 18px;
    }

    body {
        font-size: 15px;
    }

    .site-header {
        padding: 20px 0;
    }

    .header-inner {
        align-items: baseline;
    }

    .brand {
        font-size: 1.05rem;
    }

    .main-nav a {
        font-size: 0.78rem;
    }

    /* Homepage */

    .hero {
        min-height: auto;
        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: 48px;
        padding: 65px 0 75px;
    }

    .hero-copy {
        order: 1;
    }

    .hero-image {
        order: 2;
        width: min(100%, 360px);
        margin-inline: auto;
    }

    .hero-title {
        margin-bottom: 28px;
        font-size: clamp(3.2rem, 16vw, 5.3rem);
    }

    .hero-link {
        font-size: 1rem;
    }

    .hero-portrait {
        aspect-ratio: 3 / 4;
    }

    .home-books {
        padding-top: 10px;
    }

    .section-intro {
        margin-bottom: 30px;
    }

    .books-grid {
        grid-template-columns: 1fr;
        gap: 42px;
    }

    .book-cover {
        width: min(100%, 330px);
    }

    /* Archive */

    .archive-main {
        padding-top: 55px;
    }

    .page-intro {
        margin-bottom: 55px;
    }

    .page-title {
        font-size: clamp(3rem, 14vw, 4.5rem);
    }

    .page-description {
        font-size: 1rem;
    }

    .archive-item {
        display: grid;
        grid-template-columns: 1fr auto;
        gap: 4px 15px;
        padding: 21px 0;
    }

    .archive-item-title {
        grid-column: 1 / -1;
        font-size: 1.3rem;
        line-height: 1.3;
    }

    .archive-item-category {
        grid-column: 1;
    }

    .archive-item-date {
        grid-column: 2;
        text-align: right;
    }

    /* Articles */

    .article-main {
        padding-top: 55px;
    }

    .article-header {
        margin-bottom: 52px;
    }

    .article-title {
        font-size: clamp(3rem, 14vw, 5rem);
    }

    .article-content {
        font-size: 1.05rem;
        line-height: 1.8;
    }

    .article-content h2 {
        margin-top: 52px;
        font-size: 1.8rem;
    }

    .article-content blockquote {
        margin: 35px 0;
        padding-left: 18px;
        font-size: 1.15rem;
    }

    /* E-book */

    .book-main {
        padding-top: 50px;
    }

    .book-hero {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: 45px;
        padding-bottom: 65px;
    }

    .book-cover-column {
        width: min(100%, 320px);
        margin-inline: auto;
    }

    .book-page-title {
        font-size: clamp(3.4rem, 16vw, 5rem);
    }

    .book-description {
        font-size: 1rem;
    }

    .book-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .button-link {
        text-align: center;
    }

    .book-section {
        padding: 40px 0;
    }

    /* Support */

    .support-main {
        padding-top: 70px;
    }

    .support-title {
        font-size: clamp(3rem, 14vw, 4.5rem);
    }

    .support-content {
        font-size: 1.05rem;
    }

    /* Footer */

    .site-footer {
        margin-top: 70px;
    }

    .footer-inner {
        padding-top: 35px;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 35px;
    }

    .footer-support {
        margin-left: 0;
    }

    .footer-bottom {
        margin-top: 30px;
    }
}


/* ---------------------------------------------------------
   16. SMALL PHONES
   --------------------------------------------------------- */

@media (max-width: 380px) {

    .main-nav a {
        font-size: 0.72rem;
    }

    .hero-title {
        font-size: 3rem;
    }

    .article-title,
    .page-title,
    .support-title {
        font-size: 2.9rem;
    }
}


/* ---------------------------------------------------------
   17. REDUCED MOTION
   --------------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {

    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        transition: none !important;
    }
}
