/*
Theme Name: 詠聖機械工程
Description: 詠聖機械工程有限公司形象網站，提供 3D 鋼結構建模算料與工程動畫服務介紹。
Version: 1.3.0
Text Domain: yongsheng
*/
:root {
    --navy: #0d2639;
    --ink: #142c3e;
    --muted: #506270;
    --orange: #eea24b;
    --orange-ink: #93500d;
    --line: #d8e0e5;
    --paper: #f4f7f9;
    --on-dark: #c5d4df;
    --ease: cubic-bezier(.16, 1, .3, 1);
    color-scheme: light;
    scrollbar-color: #738592 #edf2f5;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; scroll-padding-top: 110px; }
body { margin: 0; font-family: "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", sans-serif; color: var(--ink); background: #fff; line-height: 1.85; -webkit-font-smoothing: antialiased; }
::selection { background: #eea24b; color: #0d2639; }
a { color: inherit; text-decoration: none; text-underline-offset: .28em; }
button { font: inherit; cursor: pointer; }
button:disabled { cursor: not-allowed; }
a:focus-visible, button:focus-visible, summary:focus-visible { outline: 3px solid #b36717; outline-offset: 5px; }
.hero a:focus-visible, .hero button:focus-visible, .contact a:focus-visible, .contact button:focus-visible { outline-color: #ffd093; }
img, svg { max-width: 100%; }
.wrap { width: min(1240px, calc(100% - 96px)); margin-inline: auto; }
.skip { position: absolute; top: -90px; left: 20px; z-index: 100; padding: 12px 20px; background: white; }
.skip:focus { top: 12px; }
.site-header { position: sticky; top: 0; z-index: 20; background: #fff; border-bottom: 1px solid var(--line); }
.admin-bar .site-header { top: 32px; }
.nav { min-height: 92px; display: flex; justify-content: space-between; align-items: center; gap: 24px; }
.brand { display: flex; align-items: center; gap: 14px; flex-shrink: 0; }
.brand-logo { width: 62px; height: 62px; object-fit: contain; }
.brand strong { display: block; font-size: 1.05rem; letter-spacing: .065em; }
.brand small { display: block; color: var(--muted); font-size: .67rem; letter-spacing: .15em; }
nav { display: flex; align-items: center; gap: 22px; font-size: .9rem; }
nav a { display: inline-flex; align-items: center; min-height: 48px; padding: 7px 5px; }
nav a:hover { color: var(--orange-ink); }
nav .nav-contact { padding: 10px 18px; gap: 18px; border: 1px solid var(--line); color: var(--navy); }
nav .nav-contact:hover { border-color: #9aafbd; background: var(--paper); }
.menu-toggle { align-items: center; gap: 10px; min-height: 44px; background: transparent; color: var(--ink); border: 1px solid var(--line); padding: 7px 12px; }
.arrow { flex: 0 0 auto; transition: transform .22s var(--ease); }
a:hover > .arrow { transform: translateX(3px); }
.hero { color: white; background: var(--navy); }
.hero-grid { display: grid; grid-template-columns: 1fr 1.1fr; gap: 28px; min-height: 716px; align-items: center; padding-block: 46px; }
.hero-copy { padding-bottom: 24px; }
h1, h2, h3 { font-weight: 700; text-wrap: balance; }
h1 { font-size: clamp(2.15rem, 3.6vw, 3.3rem); line-height: 1.5; letter-spacing: -.025em; margin: 0 0 22px; }
h1 span { color: var(--orange); }
.lead { font-size: clamp(1rem, 1.3vw, 1.15rem); line-height: 1.85; color: #e1e9ef; margin: 0 0 18px; }
.hero-description { max-width: 29em; color: var(--on-dark); font-size: .92rem; margin: 0; line-height: 1.95; }
.hero-actions { display: flex; align-items: center; gap: 20px; margin-top: 34px; flex-wrap: wrap; }
.button { display: inline-flex; align-items: center; justify-content: space-between; gap: 24px; min-height: 54px; padding: 13px 22px; background: var(--orange); color: var(--navy); font-weight: 700; border: 1px solid transparent; transition: background .2s; }
.button:hover { background: #ffc077; }
.text-link { display: inline-flex; align-items: center; gap: 12px; min-height: 48px; padding-block: 10px; font-size: .92rem; text-decoration: underline; text-decoration-color: #92a6b6; }
.text-link:hover { text-decoration-color: currentColor; }
.engineering { margin: 0; min-width: 0; padding-top: 6px; }
.model-top { display: flex; justify-content: space-between; gap: 16px; padding-bottom: 13px; border-bottom: 1px solid #395568; font-size: .78rem; color: #d0dde6; }
.model-key { display: inline-flex; align-items: center; gap: 8px; }
.model-key i { width: 6px; height: 6px; background: var(--orange); display: inline-block; }
.diagram { display: block; width: 100%; height: auto; overflow: visible; }
.model-member { transition: opacity .32s var(--ease); }
.column .face-a { fill: #799aad; }
.column .face-b { fill: #bdcdd7; }
.column .face-top { fill: #e3edf3; }
.beam .face-a { fill: #b76a22; }
.beam .face-b { fill: #eaa04e; }
.beam .face-top { fill: #ffc983; }
.crossbeam .face-a { fill: #668799; }
.crossbeam .face-b { fill: #9ab6c8; }
.crossbeam .face-top { fill: #d4e1e9; }
.foundation .face-a { fill: #415f70; }
.foundation .face-b { fill: #567484; }
.foundation .face-top { fill: #718e9e; }
.diagram[data-view="columns"] :is(.beam, .crossbeam, .brace) { opacity: .12; }
.diagram[data-view="beams"] :is(.column, .foundation) { opacity: .15; }
.model-controls { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; justify-content: space-between; }
.view-switch { display: flex; border: 1px solid #597383; }
.view-switch button { min-height: 44px; border: 0; background: transparent; color: #e0e9ef; font-size: .76rem; padding: 10px 12px; }
.view-switch button + button { border-left: 1px solid #597383; }
.view-switch button:hover { background: #284559; }
.view-switch button[aria-pressed="true"] { background: #dce6ec; color: #0d2639; font-weight: 700; }
.replay { display: inline-flex; gap: 7px; align-items: center; min-height: 44px; border: 0; background: none; color: #e4bd8b; padding: 7px 0; font-size: .76rem; }
.replay:hover { color: #ffe1bc; }
.replay:disabled { color: #9fb3c1; }
.model-status { min-height: 2em; margin: 13px 0 5px; color: #d0dde6; font-size: .76rem; }
.engineering figcaption { font-size: .7rem; color: #aebfcb; }
@keyframes model-assemble { from { opacity: .15; transform: translateY(-14px); } to { opacity: 1; transform: translateY(0); } }
.is-replaying .foundation { animation: model-assemble .5s var(--ease) both; }
.is-replaying .column { animation: model-assemble .7s .15s var(--ease) both; }
.is-replaying :is(.beam, .crossbeam) { animation: model-assemble .7s .65s var(--ease) both; }
.is-replaying .brace { animation: model-assemble .6s 1.1s var(--ease) both; }
.hero-bottom { display: flex; justify-content: space-between; align-items: center; gap: 20px; border-top: 1px solid #395568; padding-block: 17px; font-size: .8rem; color: #c5d4df; }
.hero-bottom p { margin: 0; }
.hero-bottom a { display: flex; gap: 14px; align-items: center; min-height: 44px; }
.hero-bottom .arrow { transform: rotate(90deg); }
section { padding-block: 104px; }
h2 { font-size: clamp(1.8rem, 2.65vw, 2.55rem); line-height: 1.5; letter-spacing: -.02em; margin: 0; }
h3 { font-size: clamp(1.45rem, 2vw, 1.9rem); line-height: 1.6; margin: 0; }
.section-heading { display: flex; justify-content: space-between; align-items: end; gap: 32px; padding-bottom: 48px; }
.section-heading p { color: var(--muted); margin: 0; }
.service-row { display: grid; grid-template-columns: 1fr 1fr; gap: 72px; padding: 48px 0; border-top: 1px solid var(--line); }
.service-row:last-child { padding-bottom: 0; }
.service-title { display: flex; gap: 30px; align-items: flex-start; }
.service-icon { color: var(--orange-ink); margin-top: 8px; flex-shrink: 0; }
.service-copy { max-width: 38em; }
.service-copy > p { margin-top: 0; color: var(--muted); }
.service-copy ul { margin: 20px 0; padding-left: 1.25em; }
.service-copy li { margin-block: 5px; padding-left: 4px; }
.service-copy li::marker { color: var(--orange-ink); font-size: .8em; }
.service-copy .text-link { color: var(--ink); font-weight: 600; }
.about { background: var(--paper); border-block: 1px solid #e3e9ed; }
.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 72px; }
.company-name { color: var(--muted); margin-top: 24px; font-size: .9rem; }
.about-copy { max-width: 38em; color: var(--muted); }
.about-copy p:first-child { margin-top: 0; }
.about-note { margin-top: 30px; padding-top: 23px; border-top: 1px solid #cbd7df; color: var(--ink); font-weight: 600; }
.prepare-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 72px; }
.prepare-grid > div > p { color: var(--muted); }
.brief-list { margin: 0; }
.brief-list > div { padding: 22px 0; border-top: 1px solid var(--line); }
.brief-list > div:first-child { padding-top: 0; border: 0; }
.brief-list dt { font-weight: 700; margin-bottom: 6px; }
.brief-list dd { margin: 0; color: var(--muted); }
.faq { margin-top: 24px; border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { min-height: 64px; display: flex; gap: 22px; align-items: center; justify-content: space-between; list-style: none; cursor: pointer; font-size: .95rem; font-weight: 600; padding: 15px 0; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary svg { flex: 0 0 auto; transition: transform .2s var(--ease); }
.faq details[open] summary svg { transform: rotate(180deg); }
.faq details > p { color: var(--muted); font-size: .9rem; margin: 0 0 24px; }
.contact { background: var(--navy); color: #fff; }
.contact-grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: 72px; }
.contact h2 { font-size: clamp(1.75rem, 2.6vw, 2.4rem); }
.contact h2 span { color: #eeb574; }
.contact-intro { color: #d3dfe7; margin: 24px 0; }
.contact-help { font-size: .78rem; color: #b9cbd7; margin-top: 18px; }
.contact-list { margin: 0; }
.contact-row { display: grid; grid-template-columns: 72px 1fr; gap: 16px; padding: 20px 0; border-bottom: 1px solid #395568; align-items: baseline; }
.contact-row:first-child { padding-top: 0; }
.contact-row dt { color: #c5d4df; font-size: .8rem; }
.contact-row dd { margin: 0; overflow-wrap: anywhere; }
.contact-row a { display: inline-flex; align-items: center; min-height: 44px; text-decoration: underline; }
.contact-row a:hover { color: var(--orange); }
.contact-row small { display: block; font-size: .76rem; color: #b9cbd7; margin-top: 6px; }
.line-id { user-select: all; }
.copy-button { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 6px 12px; margin-left: 12px; border: 1px solid #718b9c; background: transparent; color: #e6edf2; font-size: .8rem; }
.copy-button:hover { background: #244155; }
.site-footer { background: #091f30; color: #c5d4df; }
.footer-inner { display: flex; justify-content: space-between; align-items: center; gap: 20px; padding-block: 20px; font-size: .76rem; }
.footer-inner a { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; }
.entry-content img { max-width: 100%; height: auto; }
.entry-content a { text-decoration: underline; }
.wp-site-content { min-height: 55vh; padding-block: 60px; }
.wp-site-content article { margin-bottom: 40px; }
@media (min-width: 801px) { .menu-toggle { display: none; } }
@media (max-width: 1100px) {
    .wrap { width: calc(100% - 64px); }
    .hero-grid { grid-template-columns: 1fr 1fr; gap: 26px; min-height: 640px; }
    h1 { font-size: 2.25rem; }
    nav { gap: 12px; }
    .brand strong { font-size: .95rem; }
    .model-controls { gap: 0; }
    .view-switch { flex: 1 0 100%; }
    .view-switch button { flex: 1; }
}
@media (max-width: 800px) {
    html { scroll-padding-top: 98px; }
    .wrap { width: calc(100% - 40px); }
    .nav { min-height: 80px; flex-wrap: wrap; gap: 0; padding-block: 12px; }
    .brand { gap: 10px; }
    .brand-logo { width: 46px; height: 46px; }
    .brand strong { font-size: .84rem; letter-spacing: .025em; }
    .brand small { font-size: .57rem; letter-spacing: .08em; }
    .menu-toggle { display: inline-flex; font-size: .8rem; }
    nav { width: 100%; justify-content: space-between; padding-top: 12px; gap: 10px; }
    .has-menu:not(.menu-open) nav { display: none; }
    nav .nav-contact { padding-inline: 10px; gap: 8px; }
    .hero-grid { grid-template-columns: 1fr; padding-block: 46px 28px; gap: 34px; }
    .hero-copy { padding-bottom: 0; }
    h1 { font-size: clamp(1.85rem, 5.4vw, 2.65rem); }
    .hero-description { max-width: 36em; }
    .hero-actions { gap: 16px; margin-top: 26px; }
    .engineering { width: min(100%, 580px); margin-inline: auto; }
    .model-controls { gap: 12px; }
    .view-switch { flex: initial; }
    .view-switch button { padding-inline: 13px; }
    .hero-bottom { font-size: .73rem; }
    section { padding-block: 64px; }
    .section-heading { display: block; padding-bottom: 28px; }
    .section-heading p { margin-top: 20px; }
    .service-row { grid-template-columns: 1fr; gap: 24px; padding-block: 32px; }
    .service-title { gap: 20px; }
    .service-title h3 br { display: none; }
    .service-title h3 { font-size: 1.5rem; }
    .service-icon { width: 32px; height: 32px; margin-top: 4px; }
    .service-copy { max-width: none; }
    .about-grid, .prepare-grid, .contact-grid { grid-template-columns: 1fr; gap: 30px; }
    .about-copy { max-width: none; }
    .company-name { margin-bottom: 0; }
    .contact-row:first-child { padding-top: 20px; border-top: 1px solid #395568; }
    .footer-inner { align-items: flex-start; }
    .admin-bar .site-header { top: 46px; }
}
@media (max-width: 380px) {
    .wrap { width: calc(100% - 32px); }
    .brand-logo { width: 36px; height: 36px; }
    .brand strong { font-size: .74rem; }
    .brand small { font-size: .5rem; }
    .brand { gap: 6px; }
    .menu-toggle { padding-inline: 8px; gap: 4px; }
    h1 { font-size: 1.75rem; }
    .view-switch { width: 100%; }
    .view-switch button { flex: 1; padding-inline: 8px; }
    .hero-actions { gap: 8px; }
    .button { padding-inline: 18px; }
    .contact-row { grid-template-columns: 54px 1fr; gap: 10px; }
    .contact-row dd { font-size: .9rem; }
    .copy-button { margin-left: 0; display: flex; margin-top: 8px; }
    .footer-inner { flex-wrap: wrap; gap: 4px; }
}
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { animation: none !important; transition: none !important; }
}
@media print {
    .site-header { position: static; }
    .hero, .contact, .site-footer { background: white; color: #142c3e; }
    .hero :is(p,figcaption), .contact :is(p,small,dt), .site-footer { color: #142c3e; }
    .model-controls, .menu-toggle, .copy-button { display: none !important; }
    section { padding-block: 30px; }
}

/* Authored work: opt-in films and readable drawing previews. */
.media-showcase{padding:80px 0;background:linear-gradient(155deg,#eef4f7,#fff 60%,#fff4e5)}.media-feature{display:grid;grid-template-columns:1.7fr 1fr;gap:32px;align-items:center}.media-showcase video{display:block;width:100%;aspect-ratio:16/9;background:#0d2639}.media-feature h3,.brand-story h3{font-size:26px;line-height:1.5;margin:0 0 16px}.media-projects{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:24px;margin-top:40px}.media-project{display:block;padding:16px;background:#fff;border:1px solid #c7d5df;text-decoration:none;color:#142c3e}.media-project img{display:block;width:100%;height:auto;aspect-ratio:1.415;object-fit:contain}.media-project h3{font-size:20px;line-height:1.6;margin:16px 0 8px}.media-project span{display:block;padding:8px 0;color:#86501a}.media-project:hover{border-color:#a56325}.media-project:focus-visible{outline:3px solid #a56325;outline-offset:4px}.brand-story{display:grid;grid-template-columns:1fr 1.4fr;gap:40px;align-items:center;margin-top:48px;padding-top:40px;border-top:1px solid #c7d5df}@media(max-width:800px){.media-feature,.brand-story{grid-template-columns:1fr}.media-projects{grid-template-columns:1fr}.media-showcase{padding:48px 0}}
