Files
2026-09-02 14:24:54 +08:00

253 lines
7.4 KiB
CSS

/* ============================================================
contact.css — Contact Us page
Loaded AFTER style.css. Prefix: .ct-* | hooks: body.is-contact, main.ct
Sections: page base · hero · inquiry form · map · responsive
============================================================ */
/* ---------- page base (light theme for this page) ---------- */
body.is-contact { background: #ffffff; color: var(--text-dark); font-family: var(--font-body); }
.is-contact .ct { background: #ffffff; }
/* ---------- scroll reveal (driven by contact.js) ---------- */
[data-reveal] { opacity: 0; transform: translateY(32px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
[data-reveal].in { opacity: 1; transform: none; }
/* ============================================================
HERO BANNER — full-bleed office photo + left-aligned title
============================================================ */
.ct-hero {
position: relative;
min-height: 66vh;
display: flex;
align-items: center;
overflow: hidden;
margin-top: var(--header-h); /* banner starts BELOW the fixed nav */
}
.ct-hero__scene { position: absolute; inset: 0; z-index: 0; background: #060a12; overflow: hidden; }
.ct-hero__bg {
position: absolute; inset: 0;
width: 100%; height: 100%;
object-fit: cover;
object-position: center 40%;
transform: scale(1.04);
animation: ct-hero-zoom 16s var(--ease) forwards;
}
@keyframes ct-hero-zoom { from { transform: scale(1.14); } to { transform: scale(1.04); } }
/* readability veil */
.ct-hero__veil {
position: absolute; inset: 0; z-index: 2;
/* background:
linear-gradient(90deg, rgba(6,12,22,.78) 0%, rgba(6,12,22,.42) 42%, rgba(6,12,22,.18) 100%),
linear-gradient(180deg, rgba(6,12,22,.5) 0%, rgba(6,12,22,.05) 35%, rgba(6,12,22,.55) 100%); */
}
.ct-hero__copy {
position: relative; z-index: 3;
display: flex; flex-direction: column; align-items: center;
}
.ct-hero__title {
font-family: var(--font-display);
font-weight: 900;
font-size: clamp(2.8rem, 8.5vw, 5rem);
line-height: 0.96;
letter-spacing: 0.1em;
color: #fff;
}
/* ============================================================
INQUIRY FORM
============================================================ */
.ct-form-section { padding: 90px 0 110px; }
.ct-form { max-width: 980px; margin: 0 auto; }
.ct-form__grid {
display: grid;
grid-template-columns: 1fr 1fr;
gap: 26px 30px;
}
.ct-field { display: flex; flex-direction: column; }
.ct-field--full { grid-column: 1 / -1; }
.ct-label {
font-family: var(--font-display);
font-weight: 600;
font-size: 0.85rem;
letter-spacing: 0.02em;
color: var(--text-dark);
margin-bottom: 9px;
}
.ct-label::after { content: " *"; color: var(--orange-700); }
.ct-input,
.ct-selectwrap select {
width: 100%;
font-family: var(--font-body);
font-size: 0.95rem;
color: var(--text-dark);
background: #ffffff;
border: 1px solid var(--line);
border-radius: var(--radius);
padding: 13px 16px;
outline: none;
transition: border-color .2s var(--ease), box-shadow .2s var(--ease);
}
.ct-input::placeholder { color: #9aa6b5; }
.ct-input:hover,
.ct-selectwrap select:hover { border-color: #c9d2de; }
.ct-input:focus,
.ct-selectwrap select:focus {
border-color: var(--orange-500);
box-shadow: 0 0 0 4px rgba(255,138,30,.14);
}
.ct-selectwrap { position: relative; }
.ct-selectwrap select {
appearance: none; -webkit-appearance: none;
padding-right: 44px;
cursor: pointer;
}
.ct-selectwrap::after {
content: "";
position: absolute;
right: 18px; top: 50%;
width: 9px; height: 9px;
border-right: 2px solid var(--text-mid);
border-bottom: 2px solid var(--text-mid);
transform: translateY(-70%) rotate(45deg);
pointer-events: none;
}
.ct-textarea { resize: vertical; min-height: 130px; }
/* invalid state (after attempted submit) */
.ct-form.was-validated .ct-input:invalid,
.ct-form.was-validated .ct-selectwrap select:invalid {
border-color: #e5484d;
box-shadow: 0 0 0 4px rgba(229,72,77,.1);
}
/* submit — orange gradient button (site style) */
.ct-submit {
margin-top: 36px;
display: inline-flex; align-items: center; gap: 10px;
font-family: var(--font-display);
font-weight: 700;
font-size: 0.82rem;
letter-spacing: 0.12em;
text-transform: uppercase;
color: #fff;
background: var(--grad-orange);
border: none;
border-radius: var(--radius);
padding: 15px 34px;
cursor: pointer;
box-shadow: 0 6px 18px rgba(255,106,0,.28);
transition: transform .25s var(--ease), box-shadow .25s var(--ease);
}
.ct-submit .arrow { transition: transform .25s var(--ease); }
.ct-submit:hover { transform: translateY(-2px); box-shadow: 0 10px 26px rgba(255,106,0,.38); }
.ct-submit:hover .arrow { transform: translateX(4px); }
/* success / error note */
.ct-note {
margin-top: 18px;
font-size: 0.92rem;
min-height: 1.4em;
}
.ct-note.is-ok { color: #18794e; }
.ct-note.is-err { color: #e5484d; }
/* ============================================================
MAP — map-bg background, framed map in the safe area,
dark veil + contact information on top
============================================================ */
.ct-map {
position: relative;
background: url(../image/map-bg.png) center / cover no-repeat;
padding: 0px 0 90px;
}
.ct-map__box {
position: relative;
}
.ct-map__frame {
width: 100%;
height: 480px;
border: 0;
display: block;
filter: saturate(0.82) contrast(0.98);
}
/* dark veil over the map */
.ct-map__veil {
position: absolute; inset: 0;
pointer-events: none;
background: rgb(0 0 0 / 60%);
}
/* contact information, vertically centered over the veiled map */
.ct-map__info {
position: absolute; inset: 0;
display: flex; flex-direction: column; justify-content: end;
padding: 40px 80px;
color: #fff;
pointer-events: none; /* keeps the map draggable outside the text */
}
.ct-map__info-title {
font-family: var(--font-display);
font-weight: 800;
font-size: clamp(1.6rem, 3vw, 2.2rem);
line-height: 1.15;
color: #000;
margin-bottom: 30px;
}
.ct-map__item {
display: flex; align-items: flex-start; gap: 14px; /* icon top-aligns with the label line */
margin-bottom: 20px;
}
.ct-map__item:last-child { margin-bottom: 0; }
.ct-map__ico {
width: 22px; height: auto;
flex-shrink: 0; display: block;
margin-top: 1px; /* optical alignment against the small-caps label */
}
.ct-map__item dt {
font-family: var(--font-display);
font-weight: 600;
font-size: 0.78rem;
letter-spacing: 0.16em;
text-transform: uppercase;
color: rgba(255,255,255,0.72);
margin-bottom: 4px;
}
.ct-map__item dd {
font-size: clamp(1rem, 1.3vw, 1.15rem);
font-weight: 500;
color: #fff;
line-height: 1.5;
}
/* ============================================================
RESPONSIVE
============================================================ */
@media (max-width: 1024px) {
.ct-hero { min-height: 58vh; }
.ct-form-section { padding: 72px 0 90px; }
}
@media (max-width: 760px) {
.ct-form__grid { grid-template-columns: 1fr; gap: 22px; }
.ct-hero { min-height: 54vh; }
.ct-form-section { padding: 56px 0 72px; }
.ct-submit { width: 100%; justify-content: center; }
.ct-map { padding: 48px 0 64px; }
.ct-map__frame { height: 420px; }
.ct-map__info { padding: 28px 24px; }
}
/* ---------- reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
[data-reveal] { opacity: 1 !important; transform: none !important; }
.ct-hero__bg { transform: none !important; animation: none !important; }
}