@charset "UTF-8";

/* =========================================================
   REIFONE.COM  —  style.css
   01. Reset / Base
   02. Layout helper (container)
   03. Header 選單
   04. Hero 影片區
   05. FEATURED 精選實績
   06. OUR PROCESS 服務流程
   07. OUR CLIENTS 客戶
   08. Footer 頁尾
   09. RWD
   ========================================================= */


/* =========================================================
   01. Reset / Base
   ========================================================= */
*,
*::before,
*::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body,
h1, h2, h3, h4, h5, h6,
p, ul, ol, li, figure, figcaption, blockquote, dl, dd {
  margin: 0;
  padding: 0;
}

ul, ol { list-style: none; }

img,
video {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  cursor: pointer;
}

:root {
  /* Colors */
  --c-navy:        #31415b;
  --c-navy-dark:   #26324a;
  --c-cream:       #f9f8f4;
  --c-sand:        #e1d8d1;
  --c-mist:        #dbe0e6;
  --c-text:        #45413f;
  --c-nav:         #4f5a66;
  --c-label:       #6f6f6d;   /* 區塊小標 FEATURED */
  --c-cat:         #5a6266;   /* 卡片分類標題 */
  --c-ink:         #24202f;   /* 區塊小標 OUR PROCESS */
  --c-slate:       #57646c;   /* 標語文字 / 按鈕底色 / 頁尾連結 */
  --c-muted:       #7a776e;   /* 頁尾欄位標頭 / copyright */
  --c-body:        #5c5c5a;   /* 頁尾公司描述 */
  --c-white:       #ffffff;
  --c-line:        #e6e6e2;

  /* Metrics */
  --container:     1400px;   /* 內容寬 1352px + 左右留白 */
  --gutter:        24px;
  --header-h:      86px;

  /* Type */
  --font-base: "Noto Sans TC", "PingFang TC", "Microsoft JhengHei",
               "Helvetica Neue", Arial, sans-serif;
}

body {
  font-family: var(--font-base);
  font-weight: 400;
  font-size: 16px;
  line-height: 1.75;
  color: var(--c-text);
  background: var(--c-white);
  overflow-x: hidden;
}

body.is-nav-open { overflow: hidden; }


/* =========================================================
   02. Layout helper
   ========================================================= */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}


/* =========================================================
   03. Header 選單
   ========================================================= */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--c-white);
  border-bottom: 1px solid transparent;
  transition: box-shadow .3s ease, border-color .3s ease;
}

.site-header.is-stuck {
  box-shadow: 0 2px 14px rgba(49, 65, 91, .10);
  border-bottom-color: var(--c-line);
}

.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: var(--header-h);
}

/* --- Logo --- */
.header__logo {
  position: relative;
  z-index: 96;
  flex: 0 0 auto;
  display: block;
  line-height: 0;
}

.header__logo img {
  width: auto;
  height: 44px;
}

/* --- Nav --- */
.site-nav__list {
  display: flex;
  align-items: center;
  gap: 71px;
}

.site-nav__list a {
  position: relative;
  display: block;
  padding: 6px 2px;
  font-size: 20px;
  font-weight: 500;
  letter-spacing: .06em;
  color: var(--c-nav);
  transition: color .25s ease;
}

.site-nav__list a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 2px;
  background: var(--c-navy);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform .3s ease;
}

.site-nav__list a:hover,
.site-nav__list a:focus-visible,
.site-nav__list a.is-active {
  color: var(--c-navy);
}

.site-nav__list a:hover::after,
.site-nav__list a:focus-visible::after,
.site-nav__list a.is-active::after {
  transform: scaleX(1);
}

/* --- Hamburger --- */
.nav-toggle {
  position: relative;
  z-index: 96;               /* 高於側邊選單，確保可點擊關閉 */
  display: none;
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
  padding: 10px;
  margin-right: -10px;
}

.nav-toggle__bar {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--c-navy);
  border-radius: 2px;
  transition: transform .3s ease, opacity .2s ease;
}

.nav-toggle__bar + .nav-toggle__bar { margin-top: 6px; }

.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}
.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(2) {
  opacity: 0;
}
.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}

/* --- Backdrop (mobile) --- */
.nav-backdrop {
  position: fixed;
  inset: 0;
  z-index: 90;
  background: rgba(38, 50, 74, .45);
  opacity: 0;
  transition: opacity .3s ease;
}

.nav-backdrop.is-visible { opacity: 1; }


/* =========================================================
   04. Hero 影片區
   ========================================================= */
.hero {
  position: relative;
  background: var(--c-navy);
}

/* --- 影片 --- */
.hero__media {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;      /* 同 reifone.mp4 原始比例 1280×720，不裁切 */
  overflow: hidden;
  background: var(--c-navy-dark);
}

.hero__video {
  width: 100%;
  height: 100%;
  object-fit: contain;       /* 完整顯示影片內容 */
  object-position: center;
}

/* 舊瀏覽器不支援 aspect-ratio 時的退路 */
@supports not (aspect-ratio: 16 / 9) {
  .hero__media {
    height: 0;
    padding-bottom: 56.25%;
  }

  .hero__video {
    position: absolute;
    inset: 0;
  }
}


/* =========================================================
   05. FEATURED 精選實績
   ========================================================= */
.featured {
  --fcard-gap: 24px;
  --fcard-per-view: 3;

  padding: 34px 0 62px;
  background: var(--c-sand);
}

/* --- FEATURED 小標 --- */
.featured__label {
  margin-bottom: 37px;
  font-size: 22px;
  font-weight: 400;
  line-height: 1.2;
  letter-spacing: .05em;
  color: var(--c-label);
}

/* --- 輪播外框（箭頭定位基準） --- */
.featured__viewport {
  position: relative;
}

/* --- 卡片軌道 --- */
.featured__track {
  display: flex;
  gap: var(--fcard-gap);
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;

  /* 隱藏卷軸（仍可滑動 / 鍵盤操作） */
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.featured__track::-webkit-scrollbar { display: none; }

@media (prefers-reduced-motion: reduce) {
  .featured__track { scroll-behavior: auto; }
}

/* --- 單張卡片 --- */
.fcard {
  flex: 0 0 auto;
  width: calc(
    (100% - (var(--fcard-per-view) - 1) * var(--fcard-gap))
    / var(--fcard-per-view)
  );
  scroll-snap-align: start;
}

.fcard__cat {
  margin-bottom: 16px;
  font-size: 25px;
  font-weight: 400;
  line-height: 1.2;
  letter-spacing: .02em;
  color: var(--c-cat);
}

/* 卡片圖 = 圖 + 文（含白色文字帶）為同一張圖 */
.fcard__link {
  display: block;
  line-height: 0;
  background: var(--c-white);
  transition: box-shadow .35s ease;
}

.fcard__img {
  width: 100%;
  height: auto;
  /* 固定成參考圖的卡片比例 435 : 415，三張卡下緣才會對齊；
     各張照片比例略有差異（1.044~1.055），由 cover 吸收（裁切 < 2px）。 */
  aspect-ratio: 435 / 415;
  object-fit: cover;
}

.fcard__link:hover,
.fcard__link:focus-visible {
  box-shadow: 0 10px 26px rgba(69, 65, 63, .18);
}

.fcard__link:focus-visible {
  outline: 2px solid var(--c-navy);
  outline-offset: 3px;
}

/* --- 左右箭頭 --- */
.featured__nav {
  position: absolute;
  top: 50%;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  transform: translateY(-50%);
  transition: opacity .25s ease;
}

.featured__nav--prev { right: calc(100% + 26px); }
.featured__nav--next { left:  calc(100% + 26px); }

.featured__nav[hidden] { display: none; }
.featured__nav:disabled { opacity: .3; cursor: default; }

/* 雙人字形 » */
.featured__chev {
  position: relative;
  display: block;
  width: 30px;
  height: 30px;
}

.featured__chev::before,
.featured__chev::after {
  content: "";
  position: absolute;
  top: 50%;
  width: 17px;
  height: 17px;
  border-top: 3px solid var(--c-white);
  border-right: 3px solid var(--c-white);
  transition: border-color .25s ease;
}

.featured__nav--next .featured__chev::before { left: 1px;  transform: translateY(-50%) rotate(45deg); }
.featured__nav--next .featured__chev::after  { left: 13px; transform: translateY(-50%) rotate(45deg); }

.featured__nav--prev .featured__chev::before { right: 1px;  transform: translateY(-50%) rotate(-135deg); }
.featured__nav--prev .featured__chev::after  { right: 13px; transform: translateY(-50%) rotate(-135deg); }

.featured__nav:hover .featured__chev::before,
.featured__nav:hover .featured__chev::after,
.featured__nav:focus-visible .featured__chev::before,
.featured__nav:focus-visible .featured__chev::after {
  border-color: var(--c-navy);
}

.featured__nav:focus-visible {
  outline: 2px solid var(--c-navy);
  outline-offset: 2px;
}


/* =========================================================
   06. OUR PROCESS 服務流程
   ========================================================= */
.process {
  /* 上下留白刻意大於參考圖（原 25 / 35），讓白色區與上下砂色區拉開 */
  padding: 50px 0 60px;
  background: var(--c-white);
}

/* --- OUR PROCESS 小標 --- */
.process__label {
  margin-bottom: 11px;
  font-size: 22px;
  font-weight: 400;
  line-height: 1.2;
  letter-spacing: .05em;
  color: var(--c-ink);
}

/* --- 流程圖 ---
   img/process-flow.jpg 為 7 段流程的整張圖（1032x76，含上下左右白邊）。
   滿版 1352px 時圖內色塊高 79px、文字約 21px，與參考圖一致。 */
.process__flow {
  /* 視窗變窄時改為橫向捲動；此處保留捲軸，
     否則滑鼠使用者看不出還有後面的流程可看。 */
  overflow-x: auto;
  overscroll-behavior-x: contain;
}

.process__flow-img {
  width: 100%;
  /* 低於此寬度改為橫向捲動，避免圖內文字縮到無法辨識 */
  min-width: 900px;
  height: auto;
  aspect-ratio: 1032 / 76;
}

/* --- 標語 --- */
.process__tagline {
  margin-top: 34px;
  font-size: 54px;
  font-weight: 400;
  line-height: 1.2;
  letter-spacing: .06em;
  text-align: center;
  color: var(--c-slate);
}

/* --- 諮詢按鈕 --- */
.process__actions {
  margin-top: 44px;
  text-align: center;
}

.process__cta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 13px 10px 14px 19px;
  font-size: 22px;
  line-height: 1;
  letter-spacing: .2em;
  color: var(--c-cream);
  background: var(--c-slate);
  transition: background-color .25s ease;
}

.process__cta::after {
  content: ">";
  font-size: 15px;
  letter-spacing: 0;
}

.process__cta:hover,
.process__cta:focus-visible {
  background: var(--c-navy);
}

.process__cta:focus-visible {
  outline: 2px solid var(--c-navy);
  outline-offset: 3px;
}


/* =========================================================
   07. OUR CLIENTS 客戶
   ========================================================= */
/* img/clients.jpg（1438x515）已含 OUR CLIENTS 小標與砂色底，
   整塊滿版出血，寬度吃滿視窗、不受 .container 限制。 */
.clients {
  background: var(--c-sand);
}

.clients__wall {
  /* 視窗變窄時改為橫向捲動；保留捲軸讓使用者看得出可以往右滑 */
  overflow-x: auto;
  overscroll-behavior-x: contain;
}

.clients__img {
  width: 100%;
  /* 低於此寬度改為橫向捲動，避免商標縮到無法辨識 */
  min-width: 900px;
  height: auto;
  aspect-ratio: 1438 / 515;
}


/* =========================================================
   08. Footer 頁尾
   ========================================================= */
.site-footer {
  /* 上方留白刻意大於參考圖（原 24），與 OUR CLIENTS 砂色區拉開 */
  padding: 74px 0 30px;
  background: var(--c-white);
}

/* 四欄比例取自參考圖：568 : 233 : 253 : 296（合計 1350 ≈ 內容寬 1352） */
.footer__inner {
  display: grid;
  grid-template-columns: 568fr 233fr 253fr 296fr;
  align-items: start;
}

/* --- 左欄：LOGO / 描述 / copyright --- */
.footer__logo {
  width: 254px;
  max-width: 100%;
  height: auto;
  aspect-ratio: 464 / 167;
}

.footer__desc {
  /* 限寬以複製參考圖的斷行（每行 14 字） */
  max-width: 266px;
  margin-top: 26px;
  font-size: 18.5px;
  line-height: 1.3;
  color: var(--c-body);
}

/* 獨立成最後一列，堆疊時才會留在最下方 */
.footer__copy {
  grid-column: 1 / -1;
  margin-top: 0;
  font-size: 16.5px;
  line-height: 1.4;
  color: var(--c-muted);
}

/* --- 三個連結欄 --- */
.footer__head {
  margin-bottom: 16px;
  font-size: 18px;
  font-weight: 400;
  line-height: 1.2;
  letter-spacing: .02em;
  color: var(--c-muted);
}

.footer__list {
  font-size: 21.5px;
  line-height: 1.5;
  color: var(--c-slate);
}

.footer__col--contact .footer__list { font-size: 20px; }

.footer__list a {
  display: inline-block;
  transition: color .25s ease;
}

.footer__list a:hover,
.footer__list a:focus-visible {
  color: var(--c-navy);
}

.footer__list a:focus-visible {
  outline: 2px solid var(--c-navy);
  outline-offset: 2px;
}


/* =========================================================
   09. RWD
   ========================================================= */

/* ---------- ≤ 1600px : 箭頭收進版面內側 ---------- */
@media (max-width: 1600px) {
  .featured__nav--prev { right: auto; left: 8px; }
  .featured__nav--next { left:  auto; right: 8px; }

  .featured__chev::before,
  .featured__chev::after {
    border-top-color: rgba(255, 255, 255, .9);
    border-right-color: rgba(255, 255, 255, .9);
    filter: drop-shadow(0 1px 3px rgba(38, 50, 74, .45));
  }
}

/* ---------- ≤ 1280px ---------- */
@media (max-width: 1280px) {
  .site-nav__list { gap: 42px; }
  .site-nav__list a { font-size: 18px; }
}

/* ---------- ≤ 1080px : 改 2 張／頁 ----------
   卡片文字燒進圖檔內，會隨卡寬縮放；
   3 張／頁在此以下卡寬 < 330px，圖內文字會過小。 */
@media (max-width: 1080px) {
  .featured {
    --fcard-per-view: 2;
    --fcard-gap: 20px;
    padding: 30px 0 54px;
  }

  .featured__label { font-size: 20px; margin-bottom: 30px; }
  .fcard__cat { font-size: 22px; margin-bottom: 14px; }

  .process__label { font-size: 20px; }
  .process__tagline { margin-top: 30px; font-size: 40px; }
  .process__actions { margin-top: 34px; }

  /* 品牌區獨佔一列，三個連結欄並排 */
  .footer__inner {
    grid-template-columns: repeat(3, 1fr);
    row-gap: 40px;
    column-gap: 24px;
  }

  .footer__brand { grid-column: 1 / -1; }
  .footer__copy { margin-top: 4px; }
}

/* ---------- ≤ 1100px ---------- */
@media (max-width: 1100px) {
  .site-nav__list { gap: 28px; }
  .site-nav__list a { font-size: 16px; }
}

/* ---------- ≤ 992px : 漢堡選單 ---------- */
@media (max-width: 992px) {
  :root {
    --header-h: 72px;
  }

  .nav-toggle { display: block; }

  .site-nav {
    position: fixed;
    top: 0;
    right: 0;
    z-index: 95;
    width: min(320px, 84vw);
    height: 100dvh;
    padding: calc(var(--header-h) + 16px) 28px 40px;
    background: var(--c-white);
    box-shadow: -8px 0 30px rgba(38, 50, 74, .16);
    transform: translateX(100%);
    transition: transform .32s cubic-bezier(.4, 0, .2, 1);
    overflow-y: auto;
  }

  .site-nav.is-open { transform: translateX(0); }

  .site-nav__list {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
  }

  .site-nav__list li + li { border-top: 1px solid var(--c-line); }

  .site-nav__list a {
    padding: 16px 4px;
    font-size: 17px;
  }

  .site-nav__list a::after { display: none; }

  .header__logo img { height: 38px; }

  .featured {
    --fcard-gap: 18px;
    padding: 26px 0 48px;
  }

  .featured__label { margin-bottom: 24px; }
}

/* ---------- ≤ 767px ---------- */
@media (max-width: 767px) {
  :root {
    --gutter: 18px;
    --header-h: 64px;
  }

  .header__logo img { height: 32px; }

  .featured {
    --fcard-per-view: 1;
    padding: 22px 0 40px;
  }

  .featured__label { font-size: 18px; margin-bottom: 20px; }
  .fcard__cat { font-size: 20px; margin-bottom: 12px; }

  .process { padding: 36px 0 46px; }
  .process__label { font-size: 18px; }
  .process__tagline { margin-top: 26px; font-size: 30px; }
  .process__actions { margin-top: 28px; }

  .process__cta {
    gap: 12px;
    padding: 12px 12px 13px 18px;
    font-size: 19px;
  }

  .site-footer { padding: 50px 0 28px; }

  .footer__inner {
    grid-template-columns: 1fr;
    row-gap: 30px;
  }

  .footer__logo { width: 218px; }

  .footer__desc {
    max-width: none;
    margin-top: 20px;
    font-size: 17px;
  }

  .footer__head { margin-bottom: 12px; font-size: 17px; }

  .footer__list { font-size: 19px; line-height: 1.7; }
  .footer__col--contact .footer__list { font-size: 18px; }

  .footer__copy { margin-top: 4px; font-size: 15px; }

  .featured__nav { width: 44px; height: 44px; }
  .featured__chev { width: 24px; height: 24px; }

  .featured__chev::before,
  .featured__chev::after {
    width: 14px;
    height: 14px;
    border-top-width: 2px;
    border-right-width: 2px;
  }

  .featured__nav--next .featured__chev::after { left: 10px; }
  .featured__nav--prev .featured__chev::after { right: 10px; }
}

/* ---------- ≤ 480px ---------- */
@media (max-width: 480px) {
  .header__logo img { height: 28px; }

  .featured__label { font-size: 17px; }
  .fcard__cat { font-size: 19px; }

  .process__label { font-size: 17px; }
  .process__tagline { font-size: 24px; }
}

/* ---------- 減少動態偏好 ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    transition-duration: .01ms !important;
  }
}
