/*
Theme Name: Loqomotiv.com
Theme URI: https://loqomotiv.com/
Author: Loqomotiv.com
Author URI: https://loqomotiv.com/
Description: A minimal WordPress theme styled after Tufte CSS, built for Loqomotiv.com to sell programming and AI courses. Off-white background, ET-Book serif typography, and a responsive header menu that collapses to a hamburger on small screens.
Version: 1.0.0
License: MIT (theme code) / Tufte CSS is MIT-licensed; ET-Book font has its own license
Requires at least: 6.0
Requires PHP: 7.4
Text Domain: loqomotiv
*/

/* =========================================================
   ET-Book font (the real Tufte typeface)
   Files live in /fonts/et-book/ relative to this stylesheet.
   ========================================================= */
@font-face {
    font-family: "et-book";
    src: url("fonts/et-book/et-book-roman-line-figures/et-book-roman-line-figures.woff") format("woff"),
         url("fonts/et-book/et-book-roman-line-figures/et-book-roman-line-figures.ttf") format("truetype");
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: "et-book";
    src: url("fonts/et-book/et-book-display-italic-old-style-figures/et-book-display-italic-old-style-figures.woff") format("woff"),
         url("fonts/et-book/et-book-display-italic-old-style-figures/et-book-display-italic-old-style-figures.ttf") format("truetype");
    font-weight: normal;
    font-style: italic;
    font-display: swap;
}
@font-face {
    font-family: "et-book";
    src: url("fonts/et-book/et-book-bold-line-figures/et-book-bold-line-figures.woff") format("woff"),
         url("fonts/et-book/et-book-bold-line-figures/et-book-bold-line-figures.ttf") format("truetype");
    font-weight: bold;
    font-style: normal;
    font-display: swap;
}

/* =========================================================
   Tufte fundamentals (values taken directly from tufte.css)
   ========================================================= */
html {
    font-size: 15px;
}

body {
    /* Centered with equal gutters on both sides. Tufte's original uses a
       one-sided padding-left, which leaves the right edge flush; because this
       theme has full-width elements (header, hero, footer) we center instead
       so the gutters match on the left and right. */
    width: 87.5%;
    margin-left: auto;
    margin-right: auto;
    font-family: et-book, Palatino, "Palatino Linotype", "Palatino LT STD", "Book Antiqua", Georgia, serif;
    background-color: #fffff8;
    color: #111;
    max-width: 1400px;
}

@media (prefers-color-scheme: dark) {
    body {
        background-color: #151515;
        color: #ddd;
    }
}

h1 {
    font-weight: 400;
    margin-top: 4rem;
    margin-bottom: 1.5rem;
    font-size: 3.2rem;
    line-height: 1;
}

h2 {
    font-style: italic;
    font-weight: 400;
    margin-top: 2.1rem;
    margin-bottom: 1.4rem;
    font-size: 2.2rem;
    line-height: 1;
}

h3 {
    font-style: italic;
    font-weight: 400;
    font-size: 1.7rem;
    margin-top: 2rem;
    margin-bottom: 1.4rem;
    line-height: 1;
}

hr {
    display: block;
    height: 1px;
    width: 55%;
    border: 0;
    border-top: 1px solid #ccc;
    margin: 1em 0;
    padding: 0;
}

p.subtitle {
    font-style: italic;
    margin-top: 1rem;
    margin-bottom: 1rem;
    font-size: 1.8rem;
    display: block;
    line-height: 1;
}

article {
    padding: 3.5rem 0;
}

section {
    padding-top: 1rem;
    padding-bottom: 1rem;
}

p, dl, ol, ul {
    font-size: 1.4rem;
    line-height: 2rem;
}

p {
    margin-top: 1.4rem;
    margin-bottom: 1.4rem;
    padding-right: 0;
    vertical-align: baseline;
}

/* Main reading column: Tufte keeps body text at 55% to leave a wide margin */
.content-column > p,
.content-column > ol,
.content-column > ul,
.content-column > dl,
.content-column > blockquote,
.content-column > h2,
.content-column > h3,
.content-column > pre,
.content-column > figure {
    width: 55%;
}

@media (max-width: 760px) {
    .content-column > p,
    .content-column > ol,
    .content-column > ul,
    .content-column > dl,
    .content-column > blockquote,
    .content-column > h2,
    .content-column > h3,
    .content-column > pre,
    .content-column > figure {
        width: 100%;
    }
}

blockquote {
    font-size: 1.4rem;
}

blockquote footer {
    font-size: 1.1rem;
    text-align: right;
}

a:link, a:visited {
    color: inherit;
    text-underline-offset: 0.1em;
    text-decoration-thickness: 0.05em;
}

img {
    max-width: 100%;
}

/* Code, following Tufte's monospace choices */
code, pre > code {
    font-family: Consolas, "Liberation Mono", Menlo, Courier, monospace;
    font-size: 1.0rem;
    line-height: 1.42;
}

pre > code {
    font-size: 0.9rem;
    width: 52.5%;
    margin-left: 2.5%;
    overflow-x: auto;
    display: block;
}

/* =========================================================
   Header & responsive navigation (the custom piece)
   ========================================================= */
.site-header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    flex-wrap: wrap;
    padding-top: 2.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #ccc;
    width: 100%;
}

.site-branding .site-title {
    font-size: 2rem;
    font-weight: 400;
    margin: 0;
    line-height: 1.1;
}

.site-branding .site-title a {
    text-decoration: none;
}

.site-branding .site-description {
    font-style: italic;
    font-size: 1.1rem;
    margin: 0.25rem 0 0;
    color: #333;
}

@media (prefers-color-scheme: dark) {
    .site-header { border-bottom-color: #444; }
    .site-branding .site-description { color: #bbb; }
}

/* The hamburger button — hidden on large screens */
.menu-toggle {
    display: none;
    background: transparent;
    border: 1px solid currentColor;
    color: inherit;
    font-family: inherit;
    font-size: 1.4rem;
    line-height: 1;
    padding: 0.4rem 0.6rem;
    cursor: pointer;
    border-radius: 3px;
}

.menu-toggle .menu-toggle-icon {
    display: inline-block;
    width: 1.1em;
}

/* Navigation list */
.main-navigation ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 1.6rem;
    font-size: 1.4rem;
}

.main-navigation li {
    margin: 0;
}

.main-navigation a {
    text-decoration: none;
}

.main-navigation a:hover,
.main-navigation .current-menu-item > a {
    text-decoration: underline;
}

/* ---- Small screens: show hamburger, stack the menu ---- */
@media (max-width: 760px) {
    .site-header {
        align-items: center;
        padding-top: 1.5rem;
    }

    .menu-toggle {
        display: inline-block;
    }

    .main-navigation {
        flex-basis: 100%;
        order: 3;
    }

    .main-navigation ul {
        display: none;
        flex-direction: column;
        gap: 0;
        padding-top: 0.5rem;
    }

    .main-navigation ul li {
        padding: 0.6rem 0;
        border-top: 1px solid #ddd;
    }

    /* Toggled open by navigation.js */
    .main-navigation.toggled ul {
        display: flex;
    }
}

@media (max-width: 760px) and (prefers-color-scheme: dark) {
    .main-navigation ul li { border-top-color: #444; }
}

/* =========================================================
   Simple front-page / course helpers
   ========================================================= */
.hero {
    padding-top: 1rem;
}

.cta-button {
    display: inline-block;
    margin-top: 1rem;
    padding: 0.7rem 1.4rem;
    font-size: 1.3rem;
    text-decoration: none;
    border: 1px solid #111;
    border-radius: 3px;
}

.cta-button:hover {
    background-color: #111;
    color: #fffff8;
}

@media (prefers-color-scheme: dark) {
    .cta-button { border-color: #ddd; }
    .cta-button:hover { background-color: #ddd; color: #151515; }
}

.site-footer {
    width: 100%;
    border-top: 1px solid #ccc;
    margin-top: 4rem;
    padding: 2rem 0 3rem;
    font-size: 1.1rem;
    font-style: italic;
}

@media (prefers-color-scheme: dark) {
    .site-footer { border-top-color: #444; }
}

/* Accessibility helper */
.screen-reader-text {
    position: absolute;
    width: 1px; height: 1px;
    padding: 0; margin: -1px;
    overflow: hidden;
    clip: rect(0,0,0,0);
    border: 0;
}
/* Main course purchase buttons */
.course-buy-button .wp-block-button__link,
.woocommerce-cart .checkout-button,
.woocommerce-checkout #place_order {
    background: #6b35ff;
    color: #ffffff;
    border: none;
    border-radius: 8px;
    padding: 14px 24px;
    font-weight: 600;
    font-size: 16px;
    text-decoration: none;
    cursor: pointer;
}

/* Hover state */
.course-buy-button .wp-block-button__link:hover,
.woocommerce-cart .checkout-button:hover,
.woocommerce-checkout #place_order:hover {
    background: #5426d9;
    color: #ffffff;
    text-decoration: none;
}

/* Style "View cart" button in WooCommerce notices */
.woocommerce-message .button.wc-forward {
    background: #6b35ff;
    color: #ffffff;
    border: none;
    border-radius: 8px;
    padding: 10px 18px;
    font-weight: 600;
    text-decoration: none;
}

.woocommerce-message .button.wc-forward:hover {
    background: #5426d9;
    color: #ffffff;
    text-decoration: none;
}

/* .woocommerce-cart .wc-proceed-to-checkout a.checkout-button {
    background: #6b35ff !important;
    color: #ffffff !important;
}

.woocommerce-cart .wc-proceed-to-checkout a.checkout-button:hover {
    background: #5426d9 !important;
    color: #ffffff !important;
} */

/* WooCommerce Cart block - Proceed to Checkout button */
.wp-block-woocommerce-cart .wc-block-cart__submit-button,
.wp-block-woocommerce-cart .wc-block-cart__submit-button .wc-block-components-button,
.wp-block-woocommerce-cart .wc-block-cart__submit-button a {
    background: #6b35ff !important;
    color: #ffffff !important;
    border: none !important;
    border-radius: 8px !important;
    padding: 14px 24px !important;
    font-weight: 600 !important;
    font-size: 16px !important;
    text-decoration: none !important;
}

/* Hover */
.wp-block-woocommerce-cart .wc-block-cart__submit-button:hover,
.wp-block-woocommerce-cart .wc-block-cart__submit-button .wc-block-components-button:hover,
.wp-block-woocommerce-cart .wc-block-cart__submit-button a:hover {
    background: #5426d9 !important;
    color: #ffffff !important;
    text-decoration: none !important;
}