/* Contact page (contact.html), no hero: one navy screen with the hero's grid and grid effects (grid-fx.js). The
   message and the ways to reach us on the left; the form on a paper panel floating on the right, like the home
   page's paper panels on navy ("why zuoyou", FAQ), so there is no hard seam down the middle.
   Header, menu, footer, cursor dot and button effect are the shared home components. */

.cp{position:relative;overflow:hidden;overflow:clip;isolation:isolate;display:grid;grid-template-columns:minmax(0,1fr) minmax(0,clamp(680px,56vw,880px));gap:clamp(48px,4.2vw,72px);align-items:center;min-height:100svh;padding:130px 9% 96px;background:#363a54;color:var(--paper);background-image:linear-gradient(#ffffff08 1px,transparent 1px),linear-gradient(90deg,#ffffff08 1px,transparent 1px);background-size:var(--grid,64px) var(--grid,64px)}
/* above 1400px the form column keeps its width (56vw, 680–880px) and the left side takes what's left, so between
   1700px and 1400px it's the left side that gets narrower, and the form stays the wider of the two */
/* glows: orange low on the left (the hero's recipe), light blue behind the panel's top right */
.cp:before,.cp:after{content:'';position:absolute;z-index:-1;border-radius:50%;pointer-events:none}
.cp:before{width:620px;height:620px;left:-220px;bottom:-240px;background:radial-gradient(circle,#e4704c47 0%,#e4704c00 68%);animation:cp-drift 11s ease-in-out infinite alternate}
.cp:after{width:640px;height:640px;right:-200px;top:-220px;background:radial-gradient(circle,#7ba1ea2b 0%,#7ba1ea00 66%);animation:glow-drift 13s ease-in-out infinite alternate-reverse}
@keyframes cp-drift{0%{transform:translate(0,0)}50%{transform:translate(120px,-60px)}100%{transform:translate(40px,-120px)}}
@keyframes glow-drift{0%{transform:translate(0,0)}50%{transform:translate(-140px,90px)}100%{transform:translate(60px,160px)}}
.cp-fx{position:absolute;inset:0;z-index:-1;overflow:hidden;pointer-events:none}
.cp.lit-on .fx-lit{--lit:170px}

.cp-info{display:flex;flex-direction:column;justify-content:space-between;gap:64px;align-self:stretch;padding-top:40px}

/* "聯絡我們" is the big title (the home hero title's size: .hero-tagline in content.css / responsive.css); the
   question under it is smaller, one line, all orange */
.cp h1{margin:0;color:var(--paper)}
.cp-sub{margin:16px 0 0;font-size:clamp(18px,1.5vw,22px);font-weight:800;line-height:1.5;letter-spacing:.5px;color:var(--orange)}
.cp-sub em{font-style:normal}
.cp-lead{margin:30px 0 0;font-size:16px;line-height:2;letter-spacing:.5px;color:#c9cde0}

/* ways to reach us: hairline rows, the value large, a small arrow that slides on hover */
.cp-ways{list-style:none;margin:0;padding:0;border-top:1px solid #ffffff26}
.cp-ways li>*{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:end;column-gap:16px;padding:20px 0;border-bottom:1px solid #ffffff26}
.cp-ways small{grid-column:1/-1;margin-bottom:6px;font-size:12px;letter-spacing:2px;color:#8f96b5}
.cp-ways b{font-size:clamp(16px,1.2vw,21px);font-weight:700;line-height:1.5;overflow-wrap:anywhere;transition:color .25s}
.cp-ways svg{width:22px;height:22px;margin-bottom:4px;fill:none;stroke:var(--orange);stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round;transition:transform .3s cubic-bezier(.16,1,.3,1)}
.cp-ways a:hover b,.cp-ways a:focus-visible b{color:var(--orange)}
.cp-ways a:hover svg,.cp-ways a:focus-visible svg{transform:translate(3px,-3px)}

/* right: the form on a floating paper panel (rounded, soft shadow, like the "why zuoyou" panel) */
.cp-form{position:relative;z-index:1;display:flex;flex-direction:column;color:var(--navy)}
.cp-body{padding:44px 52px 44px;border-radius:0 0 24px 24px;background:var(--paper);box-shadow:0 30px 60px #0b0f2a40}
/* over the panel: no orange dot, the normal cursor (and the text caret in the fields) */
.dot-zone .cp-form{cursor:auto}
.dot-zone .cp-form :is(input,textarea){cursor:text}
.dot-zone .cp-form :is(label,button,.dd-list li){cursor:pointer}
.sr{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap;border:0}
.form-flag{align-self:flex-start;margin:0 0 30px;padding:6px 12px;border-radius:6px;border:1px dashed #e4704c99;font-size:13px;line-height:1.6;color:#b5532f}
/* folder tabs on top of the paper panel with rounded tops, side by side (no gap, so the curve starts right at the chosen tab's edge). The other tab is a solid lighter navy (white
   text, an empty circle) and brightens on hover; the chosen one is paper, a little taller, and joins the panel below.
   The inward curve where the chosen tab meets the panel: a paper strip runs behind the bottom of both tabs, and the
   other tab rounds off its bottom corner next to the chosen one, so the strip shows through as one clean curve (real
   border-radius, no added piece). Nothing animates the shape, only colours, so there is no seam while switching. */
.seg-wrap{min-width:0;margin:0;padding:0;border:0}
.tabs{--r:20px;position:relative;z-index:1;container-type:inline-size;display:grid;grid-template-columns:1fr 1fr;gap:0;align-items:end}
.tabs:after{content:'';position:absolute;z-index:-1;left:0;right:0;bottom:-1px;height:calc(var(--r) + 2px);background:var(--paper);pointer-events:none}
.tabs label{position:relative;cursor:pointer;-webkit-tap-highlight-color:transparent}
.tabs input{position:absolute;opacity:0;width:1px;height:1px}
.tabs label>span{display:flex;align-items:center;gap:14px;padding:18px 24px;border-radius:var(--r) var(--r) 0 0;background:#4c516f;color:#fff}
.tabs label:first-child input:not(:checked)+span{border-bottom-right-radius:var(--r)}
.tabs label:last-child input:not(:checked)+span{border-bottom-left-radius:var(--r)}
.tabs label>span>span:last-child{display:flex;flex-direction:column;gap:3px;min-width:0}
.tabs small{font-size:13px;letter-spacing:.5px;color:#aab0cb;transition:color .3s}
/* the option grows with the tab bar (one tab is half of it, less padding, circle and gap), up to 21px, so it stays on one line */
.tabs b{font-size:clamp(14px,calc((50cqw - 96px) / 8.3),21px);font-weight:700;letter-spacing:.5px}
.tab-rd{flex:none;display:grid;place-items:center;width:28px;height:28px;border-radius:50%;border:2px solid #ffffff80;transition:background .3s,border-color .3s}
.tab-rd:after{content:'';width:11px;height:5.5px;margin-top:-3px;border:solid #fff;border-width:0 0 2.5px 2.5px;transform:rotate(-45deg) scale(.4);opacity:0;transition:opacity .25s,transform .35s cubic-bezier(.16,1,.3,1)}
.tabs label:hover input:not(:checked)+span{background:#5b6080}
.tabs label:hover input:not(:checked)+span .tab-rd{border-color:#fff}
.tabs input:checked+span{padding-top:26px;background:var(--paper);color:var(--navy)}
.tabs input:checked+span small{color:#7a8099}
.tabs input:checked+span .tab-rd{background:var(--orange);border-color:var(--orange)}
.tabs input:checked+span .tab-rd:after{opacity:1;transform:rotate(-45deg) scale(1)}
.tabs input:focus-visible+span{outline:3px solid var(--orange);outline-offset:3px}
/* the two question sets; the shown one fades up when switched */
.f-panel{min-width:0;margin:0;padding:0;border:0}
.f-panel:not([hidden]){animation:f-in .5s cubic-bezier(.16,1,.3,1)}
@keyframes f-in{from{opacity:0;transform:translateY(12px)}to{opacity:1;transform:none}}
/* question numbers: counted in page order over the shown questions only */
.cp-form{counter-reset:q}
.f{counter-increment:q}
.f i:before{content:counter(q,decimal-leading-zero)}
.f-row{display:grid;grid-template-columns:1fr 1fr;gap:0 40px}
.f{display:block;min-width:0;margin:0 0 28px;padding:0;border:0}
.f>span,.f legend span{display:flex;align-items:baseline;gap:12px;font-size:16px;font-weight:600;letter-spacing:.5px;color:var(--navy)}
.f legend{padding:0;margin:0 0 16px}
.f i{font:500 13px Outfit,sans-serif;font-style:normal;letter-spacing:1px;color:var(--orange)}
.f em{font-style:normal;color:var(--orange);margin-left:-8px}
/* underlined fields, the line starting under the title text (past the number), in line with the option pills and the
   message box; it turns orange and thickens when focused. On phones everything starts at the left edge. */
.f input,.f textarea{display:block;width:calc(100% - 27px);margin:4px 0 0 27px;padding:12px 0;border:0;border-bottom:1px solid #30375f40;border-radius:0;background:transparent;font:inherit;font-size:16px;color:var(--navy);transition:border-color .25s,box-shadow .25s}
.f textarea{resize:vertical;min-height:110px;line-height:1.7}
/* the contact-time dropdown (contact.js): the button looks like the underlined fields, with a chevron that turns
   when open; the list is a small paper card with a soft shadow, each row the time of day and its hours (grey, right),
   the hovered row tinted, the chosen one with an orange check */
.f-dd{position:relative}
.dd-btn{position:relative;display:block;width:calc(100% - 27px);margin:4px 0 0 27px;padding:12px 36px 12px 0;border:0;border-bottom:1px solid #30375f40;background:none;font:inherit;font-size:16px;text-align:left;color:var(--navy);cursor:pointer;transition:border-color .25s,box-shadow .25s}
.dd-btn:after{content:'';position:absolute;right:10px;top:50%;width:8px;height:8px;margin-top:-6px;border:solid var(--navy);border-width:0 1.8px 1.8px 0;transform:rotate(45deg);transition:transform .3s cubic-bezier(.16,1,.3,1),margin .3s}
.dd-btn[aria-expanded=true]:after{margin-top:-1px;transform:rotate(225deg)}
.dd-btn:focus-visible,.dd-btn[aria-expanded=true]{outline:0;border-color:var(--orange);box-shadow:0 1px 0 var(--orange)}
.dd-btn.empty .dd-val{color:#8a8fa8}
.dd-list{position:absolute;z-index:5;left:27px;right:0;top:calc(100% + 8px);margin:0;padding:6px;list-style:none;border-radius:14px;background:#fff;box-shadow:0 18px 40px #1b1f3a2e,0 0 0 1px #30375f14;transform-origin:top;animation:dd-in .22s cubic-bezier(.16,1,.3,1)}
.dd-list:focus{outline:0}
@keyframes dd-in{from{opacity:0;transform:translateY(-6px) scale(.98)}to{opacity:1;transform:none}}
.dd-list li{position:relative;display:flex;align-items:baseline;gap:12px;padding:12px 14px 12px 40px;border-radius:9px;font-size:15px;color:var(--navy);cursor:pointer}
.dd-list b{font-weight:600}
.dd-list small{margin-left:auto;font:400 13px Outfit,sans-serif;letter-spacing:.5px;color:#8a8fa8}
.dd-list li.on{background:#30375f0d}
.dd-list li[aria-selected=true]{color:var(--orange)}
.dd-list li[aria-selected=true]:before{content:'';position:absolute;left:16px;top:50%;width:10px;height:5px;margin-top:-5px;border:solid var(--orange);border-width:0 0 2px 2px;transform:rotate(-45deg)}
.f input:focus,.f textarea:focus{outline:0;border-color:var(--orange);box-shadow:0 1px 0 var(--orange)}
.f input[aria-invalid=true]{border-color:#c94a2a;box-shadow:0 1px 0 #c94a2a}
/* service choices as pills (the five service names) */
.chips{display:flex;flex-wrap:wrap;gap:8px;padding-left:27px}
.chips label{position:relative;cursor:pointer}
.chips input{position:absolute;opacity:0;width:1px;height:1px}
.chips span{display:inline-flex;align-items:center;min-height:38px;padding:0 15px;border:1px solid #30375f33;border-radius:999px;font-size:14px;color:#3f4566;transition:background .2s,border-color .2s,color .2s}
.chips label:hover span{border-color:var(--navy)}
.chips input:checked+span{background:var(--navy);border-color:var(--navy);color:#fff}
.chips input:focus-visible+span{outline:3px solid var(--orange);outline-offset:3px}
.chips small{margin-left:2px;font-size:13px;opacity:.75}
.f-foot{display:flex;flex-wrap:wrap;align-items:center;gap:14px 20px;margin-top:6px;padding-left:27px}
.f-status{margin:0;font-size:14px;line-height:1.7;color:#5d637d}
.f-status.err{color:#c94a2a}

/* desktop (above 1400px): the left side (title, then the ways to reach us right under it) stays in place while the
   form scrolls past on the right; overflow:clip on .cp (not hidden) so the sticky still works */
@media(min-width:1401px){
  .cp{align-items:start}
  .cp-info{position:sticky;top:110px;justify-content:flex-start;gap:52px;align-self:start;padding-top:40px}
}
/* 1400px and below (small laptops, tablets): stacked like on phones, the message on top, the panel below; the LINE /
   Email / address rows are hidden (the footer has them) */
@media(max-width:1400px){
  .cp{grid-template-columns:1fr;gap:56px;min-height:0;padding:150px 7% 80px}
  .cp-info{padding-top:0;gap:56px}
  .cp-ways{display:none}
  .cp-lead br:first-child{display:none}
}
@media(min-width:769px) and (max-width:1400px){
  .cp-head{max-width:640px}
}
/* phones and small tablets (768px and below): the panel keeps the same 7vw side margins as the title (not full width);
   the fields, pills and button still start under the title text like on desktop; titles 15px */
@media(max-width:768px){
  .cp{padding:124px 7vw 56px;gap:44px}
  .cp-info{gap:44px}
  .cp:before{width:420px;height:420px;left:auto;right:-230px;bottom:auto;top:-60px}
  .cp:after{display:none}
  .cp-lead{font-size:15px;margin-top:22px}
  .cp-lead br{display:none}
  .f-row{grid-template-columns:1fr}
  .f{margin-bottom:26px}
  .f input,.f textarea{font-size:16px}
  .f>span,.f legend span{font-size:15px}
  .f-foot .btn{flex:1 1 100%}
  /* same 27px in from both sides (fields, dropdown, pills, button), so the form sits evenly in the panel */
  .f input,.f textarea,.dd-btn{width:calc(100% - 54px)}
  .dd-list{right:27px}
  .chips,.f-foot{padding-right:27px}
  /* smaller pills */
  .chips{gap:6px}
  .chips span{min-height:34px;padding:0 12px;font-size:13px}
  .chips small{font-size:12px}
  .cp-body{padding:30px 22px 28px;border-radius:0 0 18px 18px}
  .tabs{--r:16px}
  .tabs label>span{gap:8px;padding:14px 8px 14px 14px}
  .tabs input:checked+span{padding-top:20px}
  .tab-rd{width:20px;height:20px;border-width:1.5px}
  .tab-rd:after{width:8px;height:4px;margin-top:-2px;border-width:0 0 2px 2px}
  .tabs small{font-size:12px}
  .tabs b{font-size:clamp(13px,calc((50cqw - 52px) / 8),16px);letter-spacing:0}
}
/* very small phones (under 360px): a little less room around the check so "我想洽談商業合作" still fits on one line */
@media(max-width:359px){
  .tabs label>span{gap:6px;padding-left:10px;padding-right:6px}
  .tab-rd{width:18px;height:18px}
  .tabs b{font-size:clamp(12px,calc((50cqw - 44px) / 8),16px);white-space:nowrap}
}
@media(prefers-reduced-motion:reduce){.cp:before,.cp:after,.f-panel:not([hidden]),.dd-list{animation:none}.tabs label>span,.tab-rd,.tab-rd:after{transition:none}}
@media(max-width:768px){.cp-sub{font-size:18px;margin-top:12px}}

/* entrance (2026-11-19, as on the other pages): the title slides up out of its line (style.css lineUp), then the
   subtitle, the form panel, the text and the ways to reach us fade up one after another (style.css .reveal) */
.cp h1 .line{display:block;overflow:hidden;padding-bottom:.04em}
.cp h1 .line>span{display:inline-block;animation:lineUp 1s cubic-bezier(.16,1,.3,1) var(--d,0s) both}
@media(prefers-reduced-motion:reduce){.cp h1 .line>span{animation:none}}
/* the spam trap field (contact-form.php): off screen, never seen or tabbed to */
.f-hp{position:absolute;left:-9999px;top:auto;width:1px;height:1px;overflow:hidden}
