/*
Theme Name: First Loyalty 初忠
Theme URI: https://1stloyalty.com
Author: First Loyalty
Author URI: https://1stloyalty.com
Description: Champion-level auto detailing company theme — 初忠汽車美容。Sunny gold logo with sky blue accents on a clean white background. Fully responsive, modern, and optimized for auto detailing businesses.
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: first-loyalty
Tags: one-column, custom-menu, featured-images, translation-ready, custom-logo
*/

/* ===== RESET & VARIABLES ===== */
*,*::before,*::after{margin:0;padding:0;box-sizing:border-box}
:root{
  --white:#ffffff;
  --snow:#f0f7ff;
  --ice:#e0f0ff;
  --pearl:#c8dff5;
  --sky:#0ea5e9;
  --sky-deep:#0284c7;
  --sky-bright:#38bdf8;
  --sky-pale:#7dd3fc;
  --gold:#e8a800;
  --gold-bright:#f5c518;
  --gold-deep:#c48f00;
  --black:#000000;
  --gray:#444444;
  --gray-mid:#666666;
  --red:#e53e3e;
  --red-dark:#c53030;
  --step-blue:#148EDE;
}
html{scroll-behavior:smooth}
body{font-family:'Zen Kaku Gothic New','Noto Serif TC',sans-serif;background:var(--white);color:var(--black);overflow-x:hidden;-webkit-font-smoothing:antialiased}
a{text-decoration:none;color:inherit}
img{max-width:100%;height:auto;display:block}

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar{width:5px}
::-webkit-scrollbar-track{background:var(--snow)}
::-webkit-scrollbar-thumb{background:var(--sky-pale);border-radius:3px}

/* ===== PRELOADER ===== */
.preloader{position:fixed;inset:0;z-index:9999;background:var(--sky-deep);display:flex;align-items:center;justify-content:center;transition:opacity .6s ease,visibility .6s ease}
.preloader.hidden{opacity:0;visibility:hidden;pointer-events:none}
.preloader-inner{text-align:center}
.preloader-kanji{font-family:'Noto Serif TC',serif;font-size:clamp(3rem,8vw,5.5rem);font-weight:900;color:var(--gold-bright);opacity:0;animation:preIn 1.8s ease forwards}
.preloader-sub{font-family:'Cormorant Garamond',serif;font-size:.85rem;letter-spacing:.4em;color:var(--white);margin-top:.5rem;opacity:0;animation:preIn 1.8s ease .3s forwards}
@keyframes preIn{0%{opacity:0;transform:translateY(15px)}100%{opacity:1;transform:translateY(0)}}

/* ===== NAVIGATION ===== */
.site-nav{position:fixed;top:0;left:0;right:0;z-index:100;padding:1.2rem 3rem;display:flex;justify-content:space-between;align-items:center;transition:all .4s ease}
.site-nav.scrolled{background:rgba(255,255,255,.96);padding:1rem 3rem;box-shadow:0 2px 20px rgba(0,0,0,.06)}
.nav-logo{font-family:'Noto Serif TC',serif;font-size:1.5rem;font-weight:900;color:var(--gold);letter-spacing:.12em;text-decoration:none;display:flex;flex-direction:column;line-height:1.2}
.nav-logo .en{font-family:'Cormorant Garamond',serif;font-size:.65rem;font-weight:400;letter-spacing:.25em;color:var(--black);margin-top:2px}
.nav-links{display:flex;gap:2.5rem;align-items:center;list-style:none}
.nav-links a{font-size:.8rem;font-weight:500;color:var(--black);text-decoration:none;letter-spacing:.1em;transition:color .3s;position:relative}
.nav-links a::after{content:'';position:absolute;bottom:-4px;left:0;width:0;height:2px;background:var(--sky);transition:width .3s;border-radius:1px}
.nav-links a:hover{color:var(--sky-deep)}
.nav-links a:hover::after{width:100%}
.nav-cta{padding:.55rem 1.6rem !important;background:var(--gold) !important;color:var(--white) !important;font-size:.75rem !important;font-weight:700 !important;letter-spacing:.15em !important;border:none !important;border-radius:6px !important;transition:all .3s !important}
.nav-cta:hover{background:var(--gold-deep) !important;transform:translateY(-1px) !important;box-shadow:0 4px 12px rgba(232,168,0,.3) !important}
.nav-cta::after{display:none !important}

/* Hamburger */
.hamburger{display:none;cursor:pointer;flex-direction:column;gap:5px;background:none;border:none;padding:5px}
.hamburger span{width:22px;height:2px;background:var(--black);border-radius:1px;display:block}

/* ===== HERO ===== */
.hero{min-height:100vh;display:flex;align-items:center;justify-content:center;position:relative;overflow:hidden;background:linear-gradient(165deg,#0284c7 0%,#0ea5e9 40%,#38bdf8 75%,#7dd3fc 100%)}
.hero-deco-1{position:absolute;top:-10%;right:-10%;width:500px;height:500px;border-radius:50%;background:rgba(255,255,255,.07)}
.hero-deco-2{position:absolute;bottom:-15%;left:-8%;width:400px;height:400px;border-radius:50%;background:rgba(255,255,255,.05)}
.hero-deco-3{position:absolute;top:20%;left:10%;width:200px;height:200px;border-radius:50%;background:rgba(245,197,24,.08)}
.hero-content{position:relative;z-index:2;text-align:center;padding:2rem}
.hero-stamp{width:88px;height:88px;border:2.5px solid rgba(255,255,255,.5);border-radius:50%;display:flex;align-items:center;justify-content:center;margin:0 auto 2.5rem}
.hero-stamp-text{font-family:'Noto Serif TC',serif;font-size:1.5rem;font-weight:900;color:var(--gold-bright)}
.hero-tagline-top{font-family:'Cormorant Garamond',serif;font-size:clamp(.75rem,1.2vw,.9rem);font-weight:400;color:rgba(255,255,255,.85);letter-spacing:.5em;text-transform:uppercase;margin-bottom:1.8rem;opacity:0;animation:fadeUp .8s ease .2s forwards}
.hero-title{font-family:'Noto Serif TC',serif;font-size:clamp(2.8rem,7.5vw,6.5rem);font-weight:900;color:var(--white);line-height:1.15;margin-bottom:.8rem;opacity:0;animation:fadeUp .8s ease .4s forwards}
.hero-title .accent{color:var(--gold-bright)}
.hero-subtitle{font-family:'Noto Serif TC',serif;font-size:clamp(1.1rem,2.2vw,1.8rem);font-weight:600;color:rgba(255,255,255,.9);letter-spacing:.35em;margin-bottom:1rem;opacity:0;animation:fadeUp .8s ease .6s forwards}
.hero-en{font-family:'Cormorant Garamond',serif;font-size:clamp(.8rem,1.4vw,1.05rem);font-weight:400;color:rgba(255,255,255,.7);letter-spacing:.5em;text-transform:uppercase;margin-bottom:2.5rem;opacity:0;animation:fadeUp .8s ease .75s forwards}
.hero-line{width:50px;height:2px;background:var(--gold-bright);margin:0 auto 1.8rem;border-radius:1px;opacity:0;animation:fadeUp .8s ease .85s forwards}
.hero-philosophy{font-size:clamp(.85rem,1.1vw,.95rem);font-weight:400;color:rgba(255,255,255,.8);max-width:480px;margin:0 auto;line-height:2.1;letter-spacing:.08em;opacity:0;animation:fadeUp .8s ease .95s forwards}
.scroll-indicator{position:absolute;bottom:2.5rem;left:50%;transform:translateX(-50%);display:flex;flex-direction:column;align-items:center;gap:.6rem;opacity:0;animation:fadeUp .8s ease 1.3s forwards}
.scroll-indicator span{font-family:'Cormorant Garamond',serif;font-size:.6rem;letter-spacing:.3em;text-transform:uppercase;color:rgba(255,255,255,.6)}
.scroll-dot{width:6px;height:6px;border-radius:50%;background:var(--gold-bright);animation:dotBounce 2s ease infinite}
@keyframes dotBounce{0%,100%{transform:translateY(0);opacity:.5}50%{transform:translateY(8px);opacity:1}}
@keyframes fadeUp{from{opacity:0;transform:translateY(20px)}to{opacity:1;transform:translateY(0)}}

/* ===== SECTION COMMON ===== */
.section-padding{padding:clamp(4rem,10vw,7rem) clamp(1.5rem,5vw,4rem)}
.section-label{font-family:'Cormorant Garamond',serif;font-size:.75rem;font-weight:400;letter-spacing:.4em;text-transform:uppercase;color:var(--sky-deep);margin-bottom:.8rem}
.section-title{font-family:'Noto Serif TC',serif;font-size:clamp(1.8rem,3.5vw,3rem);font-weight:900;color:var(--gold-deep);margin-bottom:1.2rem;line-height:1.3}
.section-divider{width:40px;height:3px;background:var(--sky);margin-bottom:2rem;border-radius:2px}
.section-center{text-align:center}
.section-center .section-divider{margin:0 auto 2rem}
.container{max-width:1200px;margin:0 auto}
.container-narrow{max-width:800px;margin:0 auto}
.container-mid{max-width:900px;margin:0 auto}

/* ===== BRAND STORY ===== */
.brand-story{background:var(--white);position:relative;overflow:hidden}
.brand-story::before{content:'初';position:absolute;right:-3%;top:50%;transform:translateY(-50%);font-family:'Noto Serif TC',serif;font-size:clamp(12rem,28vw,26rem);font-weight:900;color:rgba(14,165,233,.04);pointer-events:none}
.story-content p{font-size:clamp(.92rem,1.1vw,1rem);font-weight:400;line-height:2.2;color:var(--black);letter-spacing:.04em;margin-bottom:1.8rem}
.story-content .highlight{color:var(--sky-deep);font-weight:600}
.story-signature{margin-top:2rem;padding-top:2rem;border-top:2px solid var(--ice)}
.story-signature .kanji{font-family:'Noto Serif TC',serif;font-size:1.8rem;font-weight:900;color:var(--gold);letter-spacing:.15em}
.story-signature .meaning{font-family:'Cormorant Garamond',serif;font-size:.8rem;font-weight:400;color:var(--gray-mid);letter-spacing:.25em;margin-top:.4rem}

/* ===== CERTIFICATIONS ===== */
.certifications{background:var(--snow)}
.cert-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(280px,1fr));gap:1.2rem}
.cert-card{background:var(--white);border:1.5px solid var(--pearl);padding:clamp(1.8rem,2.5vw,2.2rem);position:relative;overflow:hidden;transition:all .4s ease;border-radius:10px}
.cert-card:hover{border-color:var(--sky-pale);transform:translateY(-3px);box-shadow:0 10px 30px rgba(14,165,233,.1)}
.cert-card::before{content:'';position:absolute;top:0;left:0;width:100%;height:3px;background:var(--sky);opacity:0;transition:opacity .4s;border-radius:10px 10px 0 0}
.cert-card:hover::before{opacity:1}
.cert-year{font-family:'Cormorant Garamond',serif;font-size:2.8rem;font-weight:700;color:var(--step-blue);line-height:1;margin-bottom:.8rem}
.cert-card:hover .cert-year{color:#1076c0}
.cert-badge{display:inline-block;padding:.25rem .7rem;border:1.5px solid var(--sky);font-family:'Cormorant Garamond',serif;font-size:.65rem;letter-spacing:.18em;text-transform:uppercase;color:var(--sky-deep);margin-bottom:1rem;border-radius:4px;font-weight:600}
.cert-badge.champion{background:var(--gold);border-color:var(--gold);color:var(--white)}
.cert-title{font-size:clamp(.88rem,1vw,.95rem);font-weight:500;color:var(--black);line-height:1.8;margin-bottom:.6rem}
.cert-org{font-family:'Cormorant Garamond',serif;font-size:.75rem;font-weight:400;color:var(--gray-mid);letter-spacing:.12em}
.cert-icon{position:absolute;top:1.2rem;right:1.2rem;font-size:1.4rem}

/* Champion Card */
.cert-card.champion-card{grid-column:1/-1;background:linear-gradient(135deg,var(--sky-deep),var(--sky));border:none;display:grid;grid-template-columns:auto 1fr;gap:2rem;align-items:center}
.cert-card.champion-card .cert-year{color:rgba(255,255,255,.2)}
.cert-card.champion-card:hover .cert-year{color:rgba(255,255,255,.3)}
.cert-card.champion-card .cert-title{color:var(--white)}
.cert-card.champion-card .cert-org{color:rgba(255,255,255,.7)}
.cert-card.champion-card::before{background:var(--gold-bright)}
.champion-trophy{width:90px;height:90px;border:2.5px solid var(--gold-bright);border-radius:50%;display:flex;align-items:center;justify-content:center;font-size:2.2rem;background:rgba(245,197,24,.12)}

/* ===== AUTHORIZED ===== */
.authorized{background:var(--white);text-align:center}
.authorized-badge{display:inline-block;padding:.8rem 2rem;border:2px solid var(--gold);margin-bottom:1.8rem;border-radius:6px}
.authorized-badge span{font-family:'Cormorant Garamond',serif;font-size:.75rem;font-weight:600;color:var(--gold-deep);letter-spacing:.3em;text-transform:uppercase}
.authorized-title{font-family:'Cormorant Garamond',serif;font-size:clamp(1.8rem,3.5vw,3rem);font-weight:700;color:var(--black);letter-spacing:.08em;margin-bottom:1rem}
.authorized-title strong{color:var(--sky-deep)}
.authorized-sub{font-family:'Noto Serif TC',serif;font-size:clamp(1.1rem,1.8vw,1.4rem);color:var(--gold-deep);margin-bottom:1.2rem;font-weight:700}
.authorized-desc{font-size:.9rem;font-weight:400;color:var(--gray);line-height:2;letter-spacing:.04em}

/* ===== GALLERY STRIP ===== */
.gallery-strip{padding:0;display:flex;overflow:hidden;border-top:2px solid var(--ice);border-bottom:2px solid var(--ice)}
.gallery-item{flex:0 0 25%;aspect-ratio:1;position:relative;overflow:hidden;border-right:1px solid var(--ice);transition:flex .5s ease;cursor:pointer}
.gallery-item:hover{flex:0 0 35%}
.gallery-placeholder{width:100%;height:100%;display:flex;align-items:center;justify-content:center;flex-direction:column;gap:.6rem;background:var(--snow);transition:background .4s}
.gallery-item:hover .gallery-placeholder{background:var(--ice)}
.gallery-placeholder .icon{font-size:2rem;opacity:.5;transition:opacity .4s}
.gallery-item:hover .icon{opacity:.8}
.gallery-placeholder .label{font-size:.75rem;font-weight:600;letter-spacing:.2em;color:var(--black);opacity:.5}
.gallery-item:hover .label{opacity:.8}

/* ===== SERVICES ===== */
.services{background:var(--sky-pale);position:relative}
.services .section-label{color:var(--sky-deep)}
.services .section-title{color:var(--gold-deep)}
.services .section-divider{margin:0 auto 2rem;background:var(--gold)}
.services-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:1.2rem}
.service-item{padding:clamp(1.8rem,2.5vw,2.5rem);border:1.5px solid rgba(255,255,255,.6);position:relative;cursor:pointer;transition:all .4s;overflow:hidden;border-radius:10px;background:var(--white)}
.service-item:hover{transform:translateY(-3px);box-shadow:0 8px 25px rgba(14,165,233,.12);border-color:var(--sky)}
.service-num{font-family:'Cormorant Garamond',serif;font-size:3rem;font-weight:300;color:var(--red);line-height:1;margin-bottom:1.2rem}
.service-item:hover .service-num{color:var(--red-dark)}
.service-name{font-family:'Noto Serif TC',serif;font-size:clamp(1.05rem,1.4vw,1.2rem);font-weight:700;color:var(--black);margin-bottom:.4rem}
.service-name-en{font-family:'Cormorant Garamond',serif;font-size:.7rem;font-weight:600;color:var(--sky-deep);letter-spacing:.22em;text-transform:uppercase;margin-bottom:1rem}
.service-desc{font-size:.85rem;font-weight:400;color:var(--gray);line-height:1.8}

/* ===== PROCESS ===== */
.process{background:var(--white)}
.process .section-divider{margin:0 auto 2rem}
.process-timeline{position:relative;padding-left:2.5rem}
.process-timeline::before{content:'';position:absolute;left:0;top:0;bottom:0;width:3px;background:linear-gradient(to bottom,var(--sky),var(--sky-pale),var(--pearl));border-radius:2px}
.process-step{position:relative;padding:0 0 2.5rem 2.5rem;opacity:0;transform:translateX(-15px);transition:all .5s ease}
.process-step.visible{opacity:1;transform:translateX(0)}
.process-step::before{content:'';position:absolute;left:-5px;top:.4rem;width:12px;height:12px;border:3px solid var(--sky);background:var(--white);border-radius:50%;transition:background .3s}
.process-step.visible::before{background:var(--sky)}
.step-num{font-family:'Cormorant Garamond',serif;font-size:.7rem;font-weight:600;color:var(--step-blue);letter-spacing:.3em;margin-bottom:.4rem}
.step-title{font-family:'Noto Serif TC',serif;font-size:1.15rem;font-weight:700;color:var(--black);margin-bottom:.4rem}
.step-desc{font-size:.88rem;font-weight:400;color:var(--gray);line-height:1.8}

/* ===== CTA ===== */
.cta-section{background:linear-gradient(160deg,var(--sky-deep) 0%,var(--sky) 50%,var(--sky-bright) 100%);text-align:center;position:relative;overflow:hidden;padding:clamp(5rem,12vw,9rem) 2rem}
.cta-content{position:relative;z-index:2}
.cta-kanji{font-family:'Noto Serif TC',serif;font-size:clamp(5rem,14vw,11rem);font-weight:900;color:rgba(255,255,255,.06);position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);pointer-events:none}
.cta-section .section-label{text-align:center;color:rgba(255,255,255,.7)}
.cta-title{font-family:'Noto Serif TC',serif;font-size:clamp(1.8rem,3.5vw,2.8rem);font-weight:900;color:var(--white);margin-bottom:1.2rem;line-height:1.4}
.cta-subtitle{font-family:'Cormorant Garamond',serif;font-size:clamp(.9rem,1.4vw,1.1rem);font-weight:400;color:rgba(255,255,255,.75);letter-spacing:.15em;margin-bottom:2.5rem}
.cta-buttons{display:flex;gap:1.2rem;justify-content:center;flex-wrap:wrap}
.btn-primary{padding:.9rem 2.8rem;background:var(--gold);color:var(--white);font-family:'Zen Kaku Gothic New',sans-serif;font-size:.8rem;font-weight:700;letter-spacing:.18em;border:none;cursor:pointer;transition:all .3s;text-decoration:none;border-radius:6px;display:inline-block}
.btn-primary:hover{background:var(--gold-deep);transform:translateY(-2px);box-shadow:0 8px 25px rgba(232,168,0,.3)}
.btn-secondary{padding:.9rem 2.8rem;background:transparent;color:var(--white);font-family:'Zen Kaku Gothic New',sans-serif;font-size:.8rem;font-weight:700;letter-spacing:.18em;border:2px solid rgba(255,255,255,.5);cursor:pointer;transition:all .3s;text-decoration:none;border-radius:6px;display:inline-block}
.btn-secondary:hover{background:rgba(255,255,255,.15);border-color:var(--white);transform:translateY(-2px)}

/* ===== FOOTER ===== */
.site-footer{background:var(--snow);border-top:2px solid var(--ice);padding:3.5rem clamp(1.5rem,5vw,4rem) 1.5rem}
.footer-content{max-width:1200px;margin:0 auto;display:grid;grid-template-columns:2fr 1fr 1fr 1fr;gap:2.5rem;margin-bottom:2.5rem}
.footer-brand .logo{font-family:'Noto Serif TC',serif;font-size:1.6rem;font-weight:900;color:var(--gold);letter-spacing:.12em;margin-bottom:.3rem}
.footer-brand .tagline{font-family:'Cormorant Garamond',serif;font-size:.7rem;font-weight:400;color:var(--gray-mid);letter-spacing:.25em;margin-bottom:1.2rem}
.footer-brand .desc{font-size:.8rem;font-weight:400;color:var(--gray);line-height:1.8;max-width:280px}
.footer-col h4{font-family:'Cormorant Garamond',serif;font-size:.7rem;font-weight:600;color:var(--sky-deep);letter-spacing:.25em;text-transform:uppercase;margin-bottom:1.2rem}
.footer-col ul{list-style:none}
.footer-col a,.footer-col p,.footer-col li{display:block;font-size:.8rem;font-weight:400;color:var(--gray);text-decoration:none;margin-bottom:.7rem;transition:color .3s}
.footer-col a:hover{color:var(--sky-deep)}
.footer-bottom{max-width:1200px;margin:0 auto;padding-top:1.5rem;border-top:1.5px solid var(--pearl);display:flex;justify-content:space-between;align-items:center;flex-wrap:wrap;gap:1rem}
.footer-bottom span{font-size:.7rem;font-weight:400;color:var(--gray-mid);letter-spacing:.08em}

/* ===== SCROLL ANIMATIONS ===== */
.reveal{opacity:0;transform:translateY(30px);transition:all .7s cubic-bezier(.16,1,.3,1)}
.reveal.visible{opacity:1;transform:translateY(0)}
.reveal-delay-1{transition-delay:.1s}
.reveal-delay-2{transition-delay:.2s}
.reveal-delay-3{transition-delay:.3s}
.reveal-delay-4{transition-delay:.4s}
.reveal-delay-5{transition-delay:.5s}

/* ===== WORDPRESS SPECIFIC ===== */
.wp-block-image img{border-radius:8px}
.aligncenter{text-align:center}
.alignleft{float:left;margin-right:1.5rem}
.alignright{float:right;margin-left:1.5rem}
.screen-reader-text{clip:rect(1px,1px,1px,1px);position:absolute!important;height:1px;width:1px;overflow:hidden}

/* ===== RESPONSIVE ===== */
@media(max-width:1024px){
  .services-grid{grid-template-columns:repeat(2,1fr)}
  .footer-content{grid-template-columns:1fr 1fr}
}
@media(max-width:768px){
  .site-nav{padding:1rem 1.5rem}
  .nav-links{display:none}
  .hamburger{display:flex}
  .nav-links.active{display:flex;flex-direction:column;position:fixed;top:0;left:0;right:0;bottom:0;background:rgba(255,255,255,.98);justify-content:center;align-items:center;gap:2rem;z-index:99;list-style:none}
  .nav-links.active a{font-size:1.1rem;color:var(--black)}
  .services-grid{grid-template-columns:1fr}
  .gallery-strip{flex-wrap:wrap}
  .gallery-item{flex:0 0 50%}
  .gallery-item:hover{flex:0 0 50%}
  .cert-card.champion-card{grid-template-columns:1fr;text-align:center}
  .champion-trophy{margin:0 auto}
  .footer-content{grid-template-columns:1fr}
  .footer-bottom{flex-direction:column;text-align:center}
}
@media(max-width:480px){
  .cta-buttons{flex-direction:column;align-items:center}
  .btn-primary,.btn-secondary{width:100%;max-width:280px;text-align:center}
}
