/* =========================================================
   林二設計 — liner.com.tw
   Hand-written replacement for the Bricks/Core Framework CSS.
   Values are carried over 1:1 from the original site so the
   layout renders identically at every breakpoint.
   Breakpoints (from Bricks): 991px tablet, 767px mobile-landscape,
   478px mobile-portrait.
   ========================================================= */

/* ---------- Design tokens (Core Framework) ---------- */
:root {
  --primary: #2364a9;
  --primary-90: #2364a9e6;
  --dark: #000000;
  --dark-90: #000000e6;
  --light: #ffffff;
  --text-body: hsl(0, 0%, 25%);
  --text-title: hsl(0, 0%, 0%);

  --brand-olive: #959922;
  --brand-green: #2f3e1c;
  --brand-beige: #e4e3d8;

  --space-xs: clamp(1.02rem, calc(0.36vw + 0.91rem), 1.4rem);
  --space-s: clamp(1.28rem, calc(0.67vw + 1.07rem), 1.98rem);
  --space-m: clamp(1.6rem, calc(1.15vw + 1.23rem), 2.8rem);
  --space-l: clamp(2rem, calc(1.87vw + 1.4rem), 3.96rem);
  --space-xl: clamp(2.5rem, calc(2.96vw + 1.55rem), 5.6rem);
  --space-2xl: clamp(3.13rem, calc(4.58vw + 1.66rem), 7.92rem);
  --space-3xl: clamp(3.91rem, calc(6.97vw + 1.68rem), 11.19rem);

  --text-s: clamp(1.42rem, calc(-0.07vw + 1.44rem), 1.35rem);
  --text-m: clamp(1.6rem, calc(0.19vw + 1.54rem), 1.8rem);
  --text-l: clamp(1.8rem, calc(0.57vw + 1.62rem), 2.4rem);
  --text-xl: clamp(2.02rem, calc(1.12vw + 1.67rem), 3.2rem);
  --text-2xl: clamp(2.28rem, calc(1.9vw + 1.67rem), 4.26rem);

  --radius-xs: 0.4rem;

  --container: 1366px;

  --msg-info-bg: #e5f3ff;   --msg-info-text: #00b0f4;
  --msg-success-bg: #e6f6ed; --msg-success-text: #11b76b;
  --msg-error-bg: #ffe6ec;  --msg-error-text: #fa4362;
}

/* ---------- Reset / base (Bricks defaults) ---------- */
*, ::before, ::after { box-sizing: border-box; }
html { font-size: 62.5%; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background-color: #fff;
  color: var(--text-body);
  font-family: "Inter", -apple-system, "system-ui", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: var(--text-m);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
main, section, figure { display: block; }
h1, h2, h3, h4, h5, h6 {
  margin: 0;
  color: var(--text-title);
  font-family: "Inter", sans-serif;
  text-rendering: optimizelegibility;
}
h1 { font-size: var(--text-2xl); line-height: 1.2; }
h2 { font-size: var(--text-xl); line-height: 1.2; }
h3 { font-size: var(--text-l); line-height: 1.3; }
p { margin: 0; }
a { text-decoration: none; }
img { max-width: 100%; height: auto; border-style: none; vertical-align: middle; outline: none; }
figure { margin: 0; }
button, input, select, textarea { font-family: inherit; font-size: 100%; line-height: 1.15; margin: 0; text-align: inherit; }
button { border: none; cursor: pointer; outline: none; padding: 0; }
:focus-visible { outline: 1px solid var(--primary); }

.skip-link {
  position: absolute; top: 0; left: 0; z-index: 9999;
  width: 1px; height: 1px; overflow: hidden; clip: rect(1px, 1px, 1px, 1px);
  padding: 5px 10px; background: #000; color: #fff; font-weight: 700;
  white-space: nowrap; border-bottom-right-radius: 8px;
}
.skip-link:focus { clip: auto; width: auto; height: auto; overflow: visible; }

/* ---------- Layout primitives (section / container / block) ---------- */
.section {
  display: flex; flex-direction: column; align-items: center;
  width: 100%; margin: 0 auto;
  padding: var(--space-3xl) var(--space-m);
}
.container {
  display: flex; flex-direction: column; align-items: flex-start;
  width: var(--container); max-width: 100%; margin: 0 auto;
}
.block {
  display: flex; flex-direction: column; align-items: flex-start;
  width: 100%; max-width: 100%;
}
/* Bricks lets layout elements wrap only on mobile */
@media (max-width: 767px) {
  .section, .container, .block { flex-wrap: wrap; }
}

/* ---------- Buttons ---------- */
.button {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: var(--space-xs) var(--space-m);
  border: 0; border-radius: var(--radius-xs);
  font-size: var(--text-s); font-weight: 600; line-height: 150%; letter-spacing: .5px;
  text-align: center; text-decoration: none;
  transition: all .2s ease;
}
.button--dark { background-color: var(--dark); color: var(--light); }
.button--dark:hover { background-color: var(--dark-90); }
.button--primary { background-color: var(--primary); color: var(--light); }
.button--primary:hover { background-color: var(--primary-90); }
.button svg { height: 1em; width: 1em; }
@media (max-width: 767px) {
  .button { padding-top: var(--space-s); padding-bottom: var(--space-s); }
}

/* Links inside body copy */
.text a { color: var(--primary); }
.text p:not(:last-child) { margin-bottom: 1.2em; }

/* Inline icons (replace Font Awesome / Ionicons) */
.icon { display: inline-block; width: 1em; height: 1em; fill: currentColor; vertical-align: -0.125em; }

/* ---------- Site header (logo + nav) ---------- */
.site-header { width: 100%; background: #fff; padding: var(--space-xs) var(--space-m); }
.site-header__inner { flex-direction: row; align-items: center; justify-content: space-between; column-gap: var(--space-m); }
.site-logo { display: inline-flex; align-items: center; gap: 0.55em; color: var(--brand-olive); text-decoration: none; }
.site-logo__mark { width: 48px; height: 48px; display: block; }
.site-logo__text { display: flex; flex-direction: column; align-items: flex-end; line-height: 1; }
.site-logo__name { font-family: "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", sans-serif; font-size: 2.6rem; font-weight: 300; letter-spacing: .18em; margin-right: -.18em; }
.site-logo__sub { font-family: "Inter", sans-serif; font-size: 1.15rem; font-weight: 400; letter-spacing: .04em; margin-top: .35em; }
.site-nav { display: flex; align-items: center; column-gap: var(--space-m); }
.site-nav a { color: var(--text-body); font-size: var(--text-s); font-weight: 600; letter-spacing: .06em; padding: .4em 0; border-bottom: 2px solid transparent; transition: border-color .2s ease, color .2s ease; }
.site-nav a:hover, .site-nav a:focus-visible { color: var(--brand-green); border-bottom-color: var(--brand-olive); outline: none; }
@media (max-width: 478px) {
  .site-header__inner { flex-wrap: nowrap; }
  .site-logo__mark { width: 38px; height: 38px; }
  .site-logo__name { font-size: 2rem; }
  .site-logo__sub { font-size: .95rem; }
  .site-nav { column-gap: var(--space-s); }
  .site-nav a { font-size: var(--text-xs, 1.26rem); }
}

/* =========================================================
   HOME
   ========================================================= */

/* ---------- Hero ---------- */
.hero {
  padding-top: 0; padding-bottom: 0;
  background-color: var(--brand-green);
  background-position: center center; background-size: contain; background-repeat: no-repeat;
}
.hero__inner {
  padding-top: 90px; padding-bottom: 90px;
  background-image: url(../img/hero/hero-illustration.png);
  background-repeat: no-repeat; background-size: contain; background-position: center right;
}
.hero__title {
  padding-top: 0;
  font-family: "Red Hat Display", "Inter", sans-serif;
  font-size: 4.4em; font-weight: 900; letter-spacing: 4px; line-height: 1em;
  color: var(--brand-olive);
  margin-bottom: 5px;
}
.hero__title:first-child { width: 100%; }
.hero__title--outline {
  margin-bottom: 0;
  color: rgba(0, 0, 0, 0);
  -webkit-text-stroke: 1.5px var(--brand-olive);
}
.hero__lead { margin: 16px 0 0; padding-top: 0; width: 41%; color: #ffffff; }
@media (max-width: 991px) {
  .hero__title { font-size: 3.3em; }
  .hero__inner { padding-top: 68px; }
  .hero__lead { width: 40%; margin-top: 10px; font-size: .9em; }
}
@media (max-width: 767px) {
  .hero__title { font-size: 2.8em; }
  .hero__inner { padding-top: 36px; }
  .hero__lead { width: 45%; font-size: .8em; margin-top: 9px; }
}
@media (max-width: 478px) {
  .hero {
    background-image: url(../img/hero/hero-mobile.gif);
    background-size: cover; margin-right: 0; margin-left: 0;
  }
  .hero__inner {
    padding-top: 28px; padding-bottom: 72px; width: 100%;
    background-image: none; margin-right: 0; margin-left: 0;
  }
  .hero__title { font-size: 1.3em; letter-spacing: 3px; }
  .hero__title--outline { -webkit-text-stroke: .7px black; }
  .hero__lead { font-size: .6em; margin-top: 22px; color: var(--brand-green); } /* white was unreadable on the light mobile GIF */
}

/* ---------- About ---------- */
.about { padding-bottom: 20px; }
.about__inner { margin-top: -54px; margin-bottom: 60px; }
.about__row { flex-direction: row; }
.about__label { width: 75%; }

/* ---------- Services (same two-column split as ABOUT US) ---------- */
/* The About row splits 31.75% / 68.25% (measured on the original site);
   SERVICE uses the same split: label left, the whole list in the text column. */
.about__row, .services {
  display: grid; grid-template-columns: minmax(0, 31.75%) minmax(0, 1fr); width: 100%;
}
.about__label { width: auto; }
.services { margin-top: var(--space-l); align-items: center; }   /* SERVICE label sits at the vertical middle of the list */
.services__list { margin: 0; border-top: 2px solid var(--brand-olive); }
.service {
  position: relative;
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); column-gap: var(--space-m);
  align-items: baseline;
  padding: var(--space-s) 0 var(--space-s) var(--space-xs);
  transition: background-color .25s ease;
}
/* olive accent bar that grows on hover — same colour as the hero type */
.service::before {
  content: ""; position: absolute; left: 0; top: var(--space-s); bottom: var(--space-s);
  width: 3px; background: var(--brand-olive); border-radius: 2px;
  transform: scaleY(.35); transform-origin: top; opacity: .7;
  transition: transform .3s ease, opacity .3s ease;
}
.service:hover::before { transform: scaleY(1); opacity: 1; }
.service__title { margin: 0; font-weight: 600; color: var(--text-title); }
.service__num {
  display: inline-block; margin-right: .6em;
  font-family: "Red Hat Display", "Inter", sans-serif; font-weight: 900; font-size: .8em;
  letter-spacing: .12em; color: var(--brand-olive); font-variant-numeric: tabular-nums;
}
.service__detail, .service__result { margin: 0; }
.service__result { opacity: .6; }
@media (max-width: 767px) {
  .about__row, .services { grid-template-columns: 1fr; }
  .about__label br { display: none; }
  .about__label, .services__label { margin-bottom: .4em; align-self: start; }
  .service { grid-template-columns: 1fr; row-gap: .2em; padding-left: var(--space-xs); align-items: start; }
  .service::before { transform: none; opacity: 1; }
}

/* ---------- Portfolio grid ---------- */
.portfolio { padding-top: 0; padding-bottom: 20px; }
.portfolio__grid {              /* this is the container itself: full width, not 1366px */
  flex-direction: row; flex-wrap: wrap;
  margin-right: auto; margin-left: auto; width: 100%; row-gap: 10px;
}
.tile {
  width: 32%; margin-right: 10px;
  flex-direction: column;
  color: inherit; text-decoration: none;
}
.tile { position: relative; }
.tile--row { flex-direction: row; margin-right: 0; }
/* Two sliders side by side inside a column tile (portrait pairs) */
.slider-pair { display: flex; width: 100%; align-items: flex-start; }
.slider-pair > .slider { width: 50%; }
/* Project name: hidden at rest, fades in on hover / keyboard focus / tap */
.tile__label {
  position: absolute; left: 10px; bottom: 10px; z-index: 5;
  max-width: calc(100% - 20px);
  padding: 0.45em 0.8em; border-radius: var(--radius-xs);
  background: rgba(0, 0, 0, .72); color: #fff;
  font-size: var(--text-s); line-height: 1.4;
  opacity: 0; transition: opacity .2s ease; pointer-events: none;
}
.tile__cat { display: inline-block; margin-right: .6em; opacity: .7; font-size: .85em; letter-spacing: .05em; }
.tile:hover .tile__label, .tile:focus-within .tile__label, .tile.is-touched .tile__label { opacity: 1; }
@media (prefers-reduced-motion: reduce) { .tile__label, .slide { transition: none; } }
.tile--row > .slider { width: 50%; }
.tile--narrow { width: 24%; max-height: 1120px; }
.tile--wide { width: 40%; }
@media (max-width: 991px) {
  .tile { width: 100%; }
  .tile--row { margin-right: 10px; }
  .tile--narrow { max-height: 2000px; }
  .tile--wide .slider:first-child { margin-bottom: 10px; }
}
@media (max-width: 767px) {
  .tile--row { flex-direction: row; flex-wrap: nowrap; }
  .tile--wide .slider:last-child { margin-top: 10px; }
}
@media (max-width: 478px) {
  .tile { width: 100% !important; margin: 0; padding: 0; display: flex; column-gap: 0; }
  .portfolio__grid { column-gap: 0; }
}

/* Slider (replaces Bricks carousel + Swiper). The first slide sets the
   box height (Swiper "autoHeight" behaviour); the others are stacked on
   top of it and faded in, exactly like the original hover crossfade. */
.slider { position: relative; width: 100%; min-width: 0; }
.slider__track { position: relative; overflow: hidden; }
.slide {
  width: 100%;
  opacity: 0; transition: opacity 100ms ease; will-change: opacity;
  z-index: 1;
}
.slide:not(:first-child) { position: absolute; top: 0; left: 0; }
.slide.is-active { opacity: 1; z-index: 2; }
.slide img { display: block; width: 100%; height: auto; }
.slider__dots {
  position: absolute; left: 50%; bottom: 15px; transform: translateX(-50%);
  display: flex; flex-direction: row; z-index: 10; margin: 0; padding: 0; list-style: none;
}
.slider__dots button {
  width: 10px; height: 10px; margin: 0 5px; padding: 0; border-radius: 100%;
  background-color: rgba(0, 0, 0, .33); line-height: 0;
}
.slider__dots button.is-active { background-color: #000; }
.slider__dots:empty { display: none; }
@media (hover: none) { .slider__track { touch-action: pan-y; cursor: pointer; } }

/* ---------- Lightbox ---------- */
.slide img { cursor: zoom-in; }
body.no-scroll { overflow: hidden; }
.lightbox {
  position: fixed; inset: 0; z-index: 1000;
  display: flex; align-items: center; justify-content: center;
  padding: 12px 72px;                       /* just enough room for the arrows */
  background: rgba(0, 0, 0, .92);
}
.lightbox[hidden] { display: none; }
.lightbox__figure {
  display: flex; flex-direction: column; align-items: center; justify-content: center; row-gap: 10px;
  width: 100%; height: 100%; margin: 0; cursor: zoom-out;
}
/* the image box takes every pixel the caption doesn't need; the picture is
   letterboxed inside it, so it is centred both ways and as large as it can be */
.lightbox__img {
  flex: 1 1 auto; min-height: 0; width: 100%; height: 100%;
  object-fit: contain; cursor: default;
}
.lightbox__caption { flex: 0 0 auto; max-width: 70ch; text-align: center; color: #fff; font-size: var(--text-m); line-height: 1.45; cursor: default; }
.lightbox__title { display: block; font-size: var(--text-l); font-weight: 600; letter-spacing: .02em; }
.lightbox__desc { display: block; margin-top: .15em; opacity: .85; }
.lightbox__count { display: block; margin-top: .35em; font-size: var(--text-s); opacity: .5; font-variant-numeric: tabular-nums; }
.lightbox__btn {
  position: fixed; z-index: 1001;
  width: 48px; height: 48px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: rgba(255, 255, 255, .12); color: #fff;
  transition: background-color .2s ease;
}
.lightbox__btn:hover, .lightbox__btn:focus-visible { background: rgba(255, 255, 255, .28); outline: none; }
.lightbox__btn svg { width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.lightbox__close { top: 16px; right: 16px; }
.lightbox__prev { left: 16px; top: 50%; transform: translateY(-50%); }
.lightbox__next { right: 16px; top: 50%; transform: translateY(-50%); }
@media (max-width: 767px) {
  .lightbox { padding: 56px 8px 8px; }
  .lightbox__btn { width: 40px; height: 40px; }
  .lightbox__prev { left: 8px; } .lightbox__next { right: 8px; } .lightbox__close { top: 12px; right: 12px; }
}

/* ---------- CTA ("Let's Chat") ---------- */
.cta { background-color: var(--brand-beige); padding-top: 40px; padding-bottom: 40px; }
.cta__info {
  flex-direction: column; row-gap: var(--space-l);
  padding-top: var(--space-2xl); padding-bottom: var(--space-2xl); padding-left: var(--space-xl);
  align-self: center !important;
}
.cta__inner { flex-direction: column; align-items: flex-start; row-gap: var(--space-xs); justify-content: flex-start; }
.cta__heading { font-size: var(--text-2xl); }
.cta__description { margin-top: 0; max-width: 540px; }
.cta__actions {
  width: fit-content; flex-direction: row; flex-wrap: nowrap;
  column-gap: var(--space-s); row-gap: var(--space-s); align-items: stretch;
}
.cta__features {
  flex-direction: row; flex-wrap: wrap; align-items: center; justify-content: flex-start;
  margin: 0; padding: 0; column-gap: var(--space-s); row-gap: var(--space-s);
  list-style: none;
}
.cta__feature { flex-direction: row; flex-wrap: nowrap; column-gap: var(--space-xs); width: auto; align-items: center; }
.cta__feature-icon { font-size: var(--text-m); color: var(--dark); fill: var(--dark); }
.cta__feature-text { font-weight: 600; color: var(--dark); font-size: var(--text-s); }
@media (max-width: 991px) {
  .cta__info { padding-right: var(--space-xl); }
}
@media (max-width: 478px) {
  .cta__info {
    align-items: center;
    padding-top: var(--space-l); padding-right: var(--space-m);
    padding-bottom: var(--space-l); padding-left: var(--space-m);
  }
  .cta__actions { width: 100%; flex-direction: column; }
}

/* =========================================================
   TEAM MEMBERS
   ========================================================= */
.team__container { row-gap: var(--space-xl); }
.team__intro { align-items: center; row-gap: var(--space-xs); width: 1080px; align-self: center !important; }
.team__tagline { font-weight: 600; color: var(--dark); margin-bottom: 0; }
.team__heading { font-size: var(--text-2xl); text-align: center; }
.team__description { text-align: center; width: 540px; max-width: 100%; }

.member {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-rows: repeat(1, minmax(0, 1fr));
  grid-gap: var(--space-m); align-items: stretch; overflow: hidden;
}
.member + .member { margin-top: 40px; }
.member__info { margin-top: auto; margin-bottom: auto; row-gap: var(--space-xl); }
.member__inner { row-gap: var(--space-xs); }
.member__role { color: var(--dark); font-weight: 600; }
.member__name { font-size: var(--text-xl); margin-top: 0; }
.member__bio { width: 540px; max-width: 100%; }
.member__photo { overflow: hidden; height: 100%; max-width: 100%; aspect-ratio: 4 / 3; order: -1; }
.member__photo img { width: 100%; height: 100%; object-fit: cover; object-position: 50%; }
@media (max-width: 991px) {
  .member { grid-template-columns: repeat(1, minmax(0, 1fr)); }
  .member__info { order: 1; }
  .member__photo { aspect-ratio: 4 / 3; }
}
@media (max-width: 767px) {
  .member__info { width: 100%; }
  .member__photo { width: 100%; }
}

/* =========================================================
   CONTACT FORM
   ========================================================= */
.form { display: flex; flex-wrap: wrap; width: 100%; justify-content: flex-start; }
.form__group { display: flex; flex-direction: column; padding: 0 0 20px; width: 100%; }
.form__group:last-child { padding-bottom: 0; }
.form__group--half { width: 50%; }
.form__group--submit { width: auto; }
.form input:not([type=submit]), .form select, .form textarea {
  width: 100%; padding: 0 12px;
  border: 1px solid #dddedf; border-radius: 0; box-shadow: none; outline: none;
  background-color: #fff; color: currentcolor;
  font-size: inherit; line-height: 40px;
  transition: all .2s ease;
}
.form ::placeholder { color: #dddedf; opacity: 1; }
.form select {
  appearance: none; -webkit-appearance: none; cursor: pointer;
  background-image: linear-gradient(45deg, transparent 50%, gray 0), linear-gradient(135deg, gray 50%, transparent 0);
  background-position: calc(100% - 20px) calc(50% + 2px), calc(100% - 16px) calc(50% + 2px);
  background-repeat: no-repeat; background-size: 4px 4px, 4px 4px;
}
.form textarea { height: auto; min-height: 90px; padding: 10px 12px; line-height: inherit !important; resize: vertical; }
.form button[type=submit] .loading { display: none; }
.form button[type=submit].is-sending .text { opacity: .5; }
.form button[type=submit].is-sending .loading { display: flex; animation: spin 1s linear infinite; }
.form button[type=submit].is-sending > .icon { display: none; }
.form__message {
  display: flex; gap: 15px; justify-content: space-between; width: 100%; margin-top: 20px;
  background-color: var(--msg-info-bg); color: var(--msg-info-text);
}
.form__message .text { padding: 15px; }
.form__message--success { background-color: var(--msg-success-bg); color: var(--msg-success-text); }
.form__message--error { background-color: var(--msg-error-bg); color: var(--msg-error-text); }
.form__message[hidden] { display: none; }
.form__message--target { display: none; }
.form__message--target:target { display: flex; }
.form__honeypot { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
@keyframes spin { to { transform: rotate(360deg); } }
