/*
Theme Name: Dashan Child
Theme URI: https://dashan.com
Description: Custom child theme of Astra for Dashan's official site. Bilingual (EN/ZH) typography and layout on top of Astra; colors follow the parent theme's global color settings.
Author: Dashan
Author URI: https://dashan.com
Template: astra
Version: 1.0.6
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: dashan-child
*/

/* =============================================================
   DESIGN TOKENS
   ============================================================= */

:root {
    /* Typography */
    --font-display-en: 'Cormorant Garamond', 'Times New Roman', serif;
    --font-display-zh: 'Noto Serif SC', 'Source Han Serif SC', 'Songti SC', serif;
    --font-body-en:    'Cormorant Garamond', Georgia, serif;
    --font-body-zh:    'Noto Serif SC', 'Source Han Serif SC', serif;

    /* Spacing scale */
    --space-xs:  0.5rem;
    --space-sm:  1rem;
    --space-md:  2rem;
    --space-lg:  4rem;
    --space-xl:  6rem;
    --space-xxl: 10rem;

    /* Layout */
    --content-max-width: 1200px;
    --reading-max-width: 640px;
}

/* =============================================================
   GLOBAL BASE STYLES
   ============================================================= */

body {
    font-family: var(--font-body-en);
    font-weight: 400;
    line-height: 1.7;
    font-size: 18px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Chinese text gets a CJK serif stack */
:lang(zh) body,
:lang(zh-CN) body,
:lang(zh-Hans) body,
body.zh,
.zh-text {
    font-family: var(--font-body-zh);
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-display-en);
    font-weight: 400;
    line-height: 1.2;
    letter-spacing: -0.01em;
}

:lang(zh) h1, :lang(zh) h2, :lang(zh) h3,
.zh-text h1, .zh-text h2, .zh-text h3 {
    font-family: var(--font-display-zh);
    letter-spacing: 0.05em;
}

a {
    text-decoration: none;
}

/* =============================================================
   LANDING PAGE — HERO
   Full-bleed photo with a bottom gradient overlay; headline is
   pinned to the bottom-left, over the photo (not centered).
   ============================================================= */

/* Astra wraps page content in a flex container (.ast-container)
   with a max-width; without an explicit width the <main> shrinks
   to fit its content instead of filling that container. */
.dashan-landing {
    width: 100%;
}

.dashan-hero {
    position: relative;
    width: 100vw;
    margin-left: calc(50% - 50vw);
    min-height: 100vh;
    display: flex;
    align-items: flex-end;
    background-color: #1a1a1a;
    background-size: cover;
    background-position: center;
    padding: var(--space-xl) var(--space-md);
}

.dashan-hero__overlay {
    position: absolute;
    inset: 0;
    background-image: linear-gradient(180deg, rgba(0, 0, 0, 0) 35%, rgba(0, 0, 0, 0.85) 100%);
    pointer-events: none;
}

.dashan-hero__content {
    position: relative;
    z-index: 1;
    max-width: var(--content-max-width);
    margin: 0 auto;
    width: 100%;
    color: #fff;
}

.dashan-hero__name-zh {
    font-family: var(--font-display-zh);
    font-size: clamp(3rem, 8vw, 6rem);
    font-weight: 500;
    line-height: 1;
    color: inherit;
    margin: 0 0 var(--space-sm) 0;
    letter-spacing: 0.1em;
}

.dashan-hero__name-en {
    font-family: var(--font-display-en);
    font-size: clamp(1.25rem, 2.5vw, 1.75rem);
    font-weight: 300;
    font-style: italic;
    opacity: 0.85;
    margin: 0 0 var(--space-md) 0;
    letter-spacing: 0.2em;
    text-transform: uppercase;
}

.dashan-hero__cta {
    display: inline-block;
    padding: var(--space-sm) var(--space-md);
    font-family: var(--font-display-en);
    font-size: 1rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: inherit;
    border: 1px solid currentColor;
    background-color: transparent;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.dashan-hero__cta:hover {
    background-color: #fff;
    color: #1a1a1a;
}

@media (max-width: 768px) {
    .dashan-hero {
        padding: var(--space-lg) var(--space-md);
    }
}

/* =============================================================
   LANDING PAGE — BIOGRAPHY
   ============================================================= */

.dashan-section-title {
    font-family: var(--font-display-en);
    font-weight: 400;
    font-size: clamp(2rem, 4vw, 2.5rem);
    margin: 0 0 var(--space-lg) 0;
}

.dashan-bio {
    padding: 32px;
    color: #fff;
}

.dashan-bio__inner {
    max-width: var(--content-max-width);
    margin: 0 auto;
}

.dashan-bio__intro {
    font-size: 1.125rem;
    max-width: var(--reading-max-width);
    margin-bottom: 0;
}

.dashan-bio__intro p {
    margin: 0 0 var(--space-sm) 0;
}

.dashan-timeline {
    list-style: none;
    margin: 0;
    padding: 0;
    border-left: 1px solid currentColor;
}

.dashan-timeline__item {
    position: relative;
    padding: 0 0 var(--space-lg) var(--space-lg);
}

.dashan-timeline__item::before {
    content: "";
    position: absolute;
    left: -5px;
    top: 6px;
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background-color: currentColor;
}

.dashan-timeline__item:last-child {
    padding-bottom: 0;
}

.dashan-timeline__year {
    display: block;
    font-family: var(--font-display-en);
    font-style: italic;
    font-size: 0.95rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    opacity: 0.6;
    margin-bottom: 0.25rem;
}

.dashan-timeline__heading {
    font-family: var(--font-display-en);
    font-weight: 400;
    font-style: italic;
    font-size: 1.25rem;
    margin: 0 0 0.5rem 0;
}

.dashan-timeline__text {
    margin: 0;
    max-width: var(--reading-max-width);
}

/* =============================================================
   LANDING PAGE — REPERTOIRE
   ============================================================= */

.dashan-repertoire {
    padding: 0 var(--space-md) var(--space-xxl);
}

.dashan-repertoire__inner {
    max-width: var(--content-max-width);
    margin: 0 auto;
}

.dashan-repertoire__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-md);
    margin: 0;
}

.dashan-repertoire__item img {
    display: block;
    width: 100%;
    height: auto;
}

.dashan-repertoire__title {
    font-family: var(--font-display-en);
    font-weight: 400;
    font-size: 1.1rem;
    margin: var(--space-sm) 0 0.25rem 0;
}

.dashan-repertoire__subtitle {
    font-size: 0.95rem;
    opacity: 0.7;
    margin: 0;
}

@media (max-width: 768px) {
    .dashan-repertoire__grid {
        grid-template-columns: 1fr;
    }
}

/* =============================================================
   LANDING PAGE — CLOSING CTA
   ============================================================= */

.dashan-landing-footer {
    padding: 32px;
    text-align: center;
}

.dashan-landing-footer__heading {
    font-family: var(--font-display-en);
    font-weight: 400;
    font-style: italic;
    font-size: clamp(1.75rem, 3vw, 2.5rem);
    margin: 0 0 var(--space-md) 0;
}

.dashan-landing-footer__cta {
    display: inline-block;
    padding: var(--space-sm) var(--space-md);
    font-family: var(--font-display-en);
    font-size: 1rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    border: 1px solid currentColor;
    transition: opacity 0.3s ease;
}

.dashan-landing-footer__cta:hover {
    opacity: 0.7;
}

/* =============================================================
   CONTACT PAGE
   ============================================================= */

.dashan-contact {
    padding: var(--space-xl) var(--space-md);
    max-width: var(--reading-max-width);
    margin: 0 auto;
}

.dashan-contact__title {
    font-size: clamp(2rem, 4vw, 3rem);
    margin: 0 0 var(--space-md) 0;
}

.dashan-contact__intro {
    margin: 0 0 var(--space-lg) 0;
    font-size: 1.125rem;
    font-style: italic;
}

.dashan-contact__form {
    margin-top: var(--space-lg);
}

/* Style Fluent Forms to match the theme's typography */
.dashan-contact__form .ff-el-input--label label {
    font-family: var(--font-body-en) !important;
    font-size: 0.95rem !important;
    letter-spacing: 0.05em !important;
}

.dashan-contact__form .ff-el-form-control {
    background-color: transparent !important;
    border: none !important;
    border-radius: 0 !important;
    padding: var(--space-sm) 0 !important;
    font-size: 1.125rem !important;
    font-family: var(--font-body-en) !important;
    box-shadow: none !important;
}

.dashan-contact__form .ff-el-form-control:focus {
    outline: none !important;
    box-shadow: none !important;
}

.dashan-contact__form textarea.ff-el-form-control {
    padding: var(--space-sm) !important;
}

.dashan-contact__form .ff-btn-submit {
    background-color: transparent !important;
    border-radius: 0 !important;
    padding: var(--space-sm) var(--space-md) !important;
    font-family: var(--font-display-en) !important;
    font-size: 1rem !important;
    letter-spacing: 0.2em !important;
    text-transform: uppercase !important;
    transition: all 0.3s ease !important;
    cursor: pointer;
}

/* =============================================================
   LANGUAGE SWITCHER (Polylang)
   ============================================================= */

.dashan-lang-switcher {
    text-align: center;
    padding: 10px var(--space-md) 0;
    font-family: var(--font-display-en);
    font-size: 0.875rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
}

.dashan-lang-switcher ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: inline-flex;
    gap: var(--space-md);
}

.dashan-lang-switcher li {
    margin: 0;
}

.dashan-lang-switcher a {
    border-bottom: none;
    padding-bottom: 2px;
}

.dashan-lang-switcher .lang-item-zh a,
.dashan-lang-switcher li[class*="zh"] a {
    font-family: var(--font-display-zh);
    letter-spacing: 0.1em;
}
