/*
 * Taihe Land Administration Office
 * Modern Eastern Professional Theme
 * Complete replacement stylesheet
 */

/* =========================================================
   1. Design tokens
   ========================================================= */
:root {
  --paper: #f7f3e9;
  --paper-light: #fcfaf4;
  --paper-deep: #eee7d8;
  --surface: rgba(255, 253, 247, 0.9);
  --surface-solid: #fffdf7;
  --ink: #201d1a;
  --ink-soft: #45403a;
  --muted: #746d64;
  --muted-light: #958d82;
  --seal: #b43830;
  --seal-dark: #86241f;
  --seal-soft: #ead2cc;
  --line: rgba(48, 41, 34, 0.13);
  --line-strong: rgba(48, 41, 34, 0.22);
  --shadow-sm: 0 8px 24px rgba(39, 31, 24, 0.06);
  --shadow-md: 0 22px 60px rgba(39, 31, 24, 0.09);
  --serif: "Noto Serif TC", "Source Han Serif TC", "Songti TC", serif;
  --sans: "Noto Serif TC", serif;
  --max-width: 1180px;
  --header-height: 96px;
  --radius: 2px;
  --ease: 220ms ease;
}

/* =========================================================
   2. Reset and foundations
   ========================================================= */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-height) + 24px);
}

.line-float{

    position:fixed;

    right:36px;
    bottom:36px;

    display:inline-flex;
    align-items:center;
    justify-content:center;

    gap:10px;

    padding:10px;

    color:#fff;

    background:#04B84F;

   border:2px solid rgba(255,255,255,.95);

   border-radius:50%;

    overflow:hidden;

    box-shadow:
        0 10px 24px rgba(0,0,0,.18);

    z-index:9999;

    transition:
        background .25s,
        border-color .25s,
        transform .25s,
        box-shadow .25s;
}

.line-float::before{

    content:"";

    position:absolute;

    inset:0.5px;

    background: #C89B6A;
    mask: url(images/card_frame.png) center / 100% 100% no-repeat;
    -webkit-mask: url(images/card_frame.png) center / 100% 100% no-repeat;

    border-radius:3px;

    pointer-events:none;
}

.line-float:hover,
.line-float:focus-visible{

    background:var(--seal-dark);

    border-color:var(--seal-dark);

    transform:translateY(-3px);

    box-shadow:
        0 16px 32px rgba(0,0,0,.22);
}
.line-float img{

    width:50px;
    height:50px;

    position:relative;
    z-index:1;
}

.line-float span{

    position:relative;
    z-index:1;

    font-size:15px;
    font-weight:600;

    line-height:1;

    white-space:nowrap;
}

.line-float img,
.line-float span{

    position:relative;

    z-index:1;
}

body {
    margin: 0;
    color: var(--ink);
    background-color: var(--paper);

    font-family:
        "Noto Serif TC",
        "Source Han Serif TC",
        "Songti TC",
        serif;

    font-size: 16px;
    line-height: 1.9;

    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0.2;
  background: repeating-linear-gradient(0deg, transparent 0 5px, rgba(67, 54, 41, 0.022) 6px);
}

::selection {
  color: #fff;
  background: var(--seal);
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
textarea,
select {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

img,
svg {
  display: block;
  max-width: 100%;
}

p {
  margin-top: 0;
}

.container {
  width: min(calc(100%), var(--max-width));
  margin-inline: auto;
}

.section {
  position: relative;
  padding: 124px 0;
}

.section-heading {
  max-width: 680px;
}

.eyebrow{

    display:flex;
    align-items:center;
    gap:12px;

    color:var(--seal-dark);

    font-family:"Noto Serif TC", serif;

    font-size:12px;
    font-weight:600;

    letter-spacing:.28em;
    text-transform:uppercase;
}

.eyebrow::before{

    content:"◈";

    width:auto;
    height:auto;

    flex:none;

    color:var(--seal);

    background:none;

    font-size:14px;

    line-height:1;
}

.section h2 {
  margin: 0;
  color: var(--ink);
  font-family:
        "Noto Serif TC",
        serif;
  font-weight:700;
  letter-spacing:.08em;
  line-height: 1.35;
  letter-spacing: 0.055em;
}

.section-heading > p:last-child {
  color: var(--muted);
  line-height: 2;
}

/* =========================================================
   3. Header and navigation
   ========================================================= */
.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 100;
  background: rgba(249, 246, 237, 0.9);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px) saturate(120%);
  -webkit-backdrop-filter: blur(18px) saturate(120%);
}

.site-header::after {
  content: "";
  position: absolute;
  inset: auto 0 -1px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(180, 56, 48, 0.35), transparent);
}

.nav-wrap {
  min-height: var(--header-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 16px;
  color: var(--ink);
}

.site-header .brand .brand-mark {
  width: 64px;
  height: 64px;
  flex: 0 0 64px;
  overflow: hidden;
}

.site-header .brand .brand-mark img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  align-items:center; 
}

.brand > span {
  min-height: 64px;
  width:auto;
  flex:1;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.brand-title {

    display:block;

    width:auto;

    height:56px;

    object-fit:contain;
}

.brand small {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-family: "Noto Serif TC", serif;
  font-size: 10px;
  font-weight: 500;
  line-height: 1;
  text-align:center;  
  letter-spacing: 0.25em;
  text-transform: uppercase;
  white-space: nowrap;
}

.main-nav{
    display:flex;
    align-items:center;
    gap:28px;

    color:var(--ink-soft);

    font-family:
        "Noto Serif TC",
        serif;

    font-size:16px;
    font-weight:600;

    letter-spacing:.14em;
}

.main-nav a {
  position: relative;
  transition: color var(--ease), background var(--ease), border-color var(--ease);
}

.main-nav .nav-cta{
    padding:10px 20px;

    color:var(--seal-dark);
    background:rgba(255,253,247,.72);

    border:1px solid var(--seal);
    border-radius:3px;

    box-shadow:none;
}

.main-nav .nav-cta:hover{
    color:#fff;
    background:var(--seal);
}

.main-nav .nav-cta:hover,
.main-nav .nav-cta:focus-visible{
    background:var(--seal-dark);
    border-color:var(--seal-dark);

    transform:translateY(-1px);

    box-shadow:
        0 7px 16px rgba(134,36,31,.16);
}

.main-nav .nav-cta::before{
    display:none;
}

.main-nav .nav-cta:hover,
.main-nav .nav-cta:focus-visible {
  background: var(--seal-dark);
  border-color: var(--seal-dark);
}

.main-nav .nav-cta::before{

    content:"";

    position:absolute;

    inset:0.5px;

    background:url("images/nav-button.png")
        center/100% 100% no-repeat;
    border-radius: 3px;

    pointer-events:none;
}

.menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  padding: 10px;
  color: var(--ink);
  background: transparent;
  border: 1px solid var(--line);
  cursor: pointer;
}

.menu-toggle span {
  display: block;
  width: 100%;
  height: 1px;
  margin: 5px 0;
  background: currentColor;
  transition: transform var(--ease), opacity var(--ease);
}

/* =========================================================
   4. Hero
   ========================================================= */
.hero{
    position: relative;

    background-image: url("images/banner.png");
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;

    overflow: hidden;
}

.hero-content {
  position: relative;
  z-index:2;
  padding-top: calc(var(--header-height) + 58px);
  padding-bottom: 72px;
}

.hero-title{
    width:min(100%,780px);

    position:relative;
    left:-30px;
}

.hero h1 {
  max-width: 900px;
  margin: 0;
  color: var(--ink);
  font-family: var(--serif);
  font-size: clamp(46px, 6vw, 76px);
  font-weight: 700;
  line-height: 1.42;
  letter-spacing: 0.075em;
}

.hero h1 span {
  position: relative;
  color: var(--seal-dark);
}

.hero-copy {
  max-width: 620px;
  margin: 0;
  color:#70453A;
  font-size:18px;
  line-height:2;
  font-weight:500;
}

.btn {
  min-height: 52px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 28px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  font-family: "Noto Serif TC", serif;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: 0.06em;
  cursor: pointer;
  transition: transform var(--ease), color var(--ease), background var(--ease), border-color var(--ease), box-shadow var(--ease);
}

.btn:hover,
.btn:focus-visible {
  transform: translateY(-2px);
}

.btn-primary {
  color: #fff;
  background: var(--seal);
  border-color: var(--seal);
  box-shadow: 0 10px 26px rgba(134, 36, 31, 0.16);
}

.btn-primary:hover,
.btn-primary:focus-visible {
  background: var(--seal-dark);
  border-color: var(--seal-dark);
  box-shadow: 0 14px 30px rgba(134, 36, 31, 0.22);
}

.btn-secondary {
  color: var(--ink);
  background: rgba(255, 253, 247, 0.52);
  border-color: var(--line-strong);
}

.btn-secondary:hover,
.btn-secondary:focus-visible {
  color: var(--seal-dark);
  background: var(--surface-solid);
  border-color: var(--seal);
}

.btn-line {
  color: #087b3c;
  background: rgba(255, 253, 247, 0.5);
  border-color: #159652;
}

.btn-line:hover,
.btn-line:focus-visible {
  color: #fff;
  background: #118b4a;
  border-color: #118b4a;
  box-shadow: 0 12px 28px rgba(17, 139, 74, 0.18);
}

.hero-notes{

    display:flex;
    flex-wrap:wrap;
    gap:10px 28px;

    margin-top:54px;

    color:#2E2A27;

    font-size:15px;

    font-weight:500;

    letter-spacing:.05em;
}

.hero-notes span::before {
  content:"❖";
  margin-right: 9px;
  color: var(--seal);
  font-size: 8px;
  vertical-align: 0.12em;
}
/* ========================================
   5.Services
======================================== */

.services{
    background:#F7F4EF;
}

.service-grid{
    display:grid;
    grid-template-columns:repeat(3,1fr);
    gap:24px;
    margin-top:50px;
}

/* 卡片 */

.service-card{

    position:relative;

    overflow:hidden;

    padding:42px 36px;

    min-height:270px;

    background:center/cover no-repeat;

    opacity: 0.8;

    border:1px solid #DFC0A0;

    box-shadow:
        0 8px 24px rgba(35,28,22,.06);

    transition:
        transform .25s ease,
        box-shadow .25s ease,
        border-color .25s ease;
}



/* 宣紙背景 */

.service-card:nth-child(odd){
    background-image:url("images/card-back1.png");
}

.service-card:nth-child(even){
    background-image:url("images/card-back2.png");
}

/* 花紋外框 */

.service-card::before{
    content:"";

    position:absolute;

    inset:10px;

    background:
        url("images/card_frame.png")
        center/100% 100% no-repeat;

    pointer-events:none;

    z-index:1;
}

/* 內容要在框線上方 */

.service-card>*{
    position:relative;
    z-index:2;
}

/* Hover */

.service-card:hover{

    border-color:#DFC0A0;

    transform:translateY(-6px);

    box-shadow:
        0 18px 42px rgba(35,28,22,.10);
}

/* 編號 */

.service-number{

    font-size:22px;

    font-weight:600;

    color:#3B332D;

    opacity:.55;

    letter-spacing:.18em;
}

/* 標題 */

.service-card h3{

    margin:0 0 18px;

    font-family:"Noto Serif TC", serif;

    font-size:27px;

    font-weight:700;

    line-height:1.45;

    letter-spacing:.04em;
}

.service-card h3::after{

    content:"";

    position:absolute;

    left:0;

    bottom:0;

    width:72px;

    height:1px;

    background:#C89B6A;
}

/* 內容 */

.service-card p{

    margin:0;

    color:#4F4843;

    font-size:16px;

    line-height:2;
}

/* 平板 */

@media (max-width:900px){

    .service-grid{

        grid-template-columns:repeat(2,1fr);
    }
}

/* 手機 */

@media (max-width:640px){

    .service-grid{

        grid-template-columns:1fr;

        gap:18px;
    }

    .service-card{

        min-height:auto;

        padding:30px 24px;
    }

    .service-number{

        font-size:28px;
    }

    .service-card h3 {

        font-size:21px;
    }

    .service-card p{

        font-size:15px;
    }
}

/* =========================================================
   6. About
   ========================================================= */
.about {
  background: transparent;
}

.about-grid {
  display: grid;
  grid-template-columns: minmax(360px, 0.9fr) 1.1fr;
  gap: clamp(56px, 8vw, 104px);
  align-items: center;
}

.about-visual {
  position: relative;
  min-height: 450px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  overflow: hidden;
  background:
    radial-gradient(circle at 20% 20%, rgba(180, 56, 48, 0.08), transparent 31%),
    var(--surface-solid);
  border:1px solid #C8B191;
  box-shadow: var(--shadow-md);
}

.about-visual::before {
  content: "";
  position: absolute;
  inset: 18px;
  z-index: 2;
  pointer-events: none;
  border:1px solid rgba(184,156,118,.35);
}

.about-block {
  position: relative;
  z-index: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 40px 32px;
  color: var(--ink);
  background: rgba(255, 253, 247, 0.46);
}

.about-block:first-child {
  border-right: 1px solid var(--line);
}

.about-block.accent{
    color:#8E2D22;
    background:
        linear-gradient(
            rgba(244,232,214,.92),
            rgba(239,226,206,.92)
        ),
        url("images/card-back2.png")
        center/cover
        no-repeat;
}

.about-block.accent::before{

    content:"";

    position:absolute;

    top:-40px;
    right:-70px;

    width:300px;
    height:450px;

    background:
        url("images/about.png")
        center/contain
        no-repeat;

    opacity:.10;

    mix-blend-mode:multiply;

    pointer-events:none;

    z-index:0;
}

.about-block.accent > *{

    position:relative;

    z-index:1;
}

.about-block p {
  margin: 0;
  font-family:
        "Noto Serif TC",
        serif;
  font-size: clamp(28px, 3vw, 38px);
  font-weight: 700;
  line-height: 1.4;
  letter-spacing: 0.04em;
}

.about-block strong {
  margin-top: 8px;
  color: var(--muted);
  font-family:
        "Noto Serif TC",
        serif;
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.about-block.accent strong {
  color: var(--seal-dark);
}

.about-content .lead {
  margin: 26px 0 12px;
  color: var(--ink-soft);
  font-size: 18px;
  line-height: 2;
}

.about-content > p:not(.eyebrow):not(.lead) {
  color: var(--muted);
  line-height: 2;
}

.about-points {
  margin-top: 34px;
  border-top: 1px solid var(--line);
}

.about-points div {
  display: grid;
  grid-template-columns: 54px 1fr;
  gap: 14px;
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
}

.about-points strong {
  color: var(--seal-dark);
  font-family: "Noto Serif TC", serif;
  font-size: 13px;
  letter-spacing: 0.08em;
}

/* =========================================================
   7. Contact
   ========================================================= */
.contact{
    background:#F7F4EF;
    border-top:none;
}

.contact-card{

    position:relative;

    display:grid;
    grid-template-columns:.9fr 1.1fr;
    gap:clamp(48px,7vw,80px);

    padding:clamp(56px,6vw,76px);

    /* 宣紙 */
    background:
        url("images/card-back1.png")
        center/cover
        no-repeat;

    /* 淺暖棕框 */
    border:1px solid #DFC0A0;

    /* 比 Service Card 更淡的陰影 */
    box-shadow:
        0 12px 32px rgba(35,28,22,.06);

    overflow:hidden;
}

.contact-copy,
.contact-info {
  position: relative;
  z-index: 1;
}

.contact-copy p:last-child {
  max-width: 480px;
  color: var(--muted);
  line-height: 2;
}

.contact-info {
  display: flex;
  flex-direction: column;
}

.contact-row {
  display: grid;
  grid-template-columns: 90px 1fr;
  gap: 18px;
  padding: 17px 0;
  border-bottom:1px solid #E6D8C7;
}

.contact-row span {
  color:#8A7564;
  font-family: "Noto Serif TC", serif;
  font-size: 13px;
  letter-spacing: 0.08em;
}

.contact-row strong {
  color:#2C2622;
  font-weight: 600;
  overflow-wrap: anywhere;
}

.contact-btn {
  align-self: flex-start;
  margin-top: 28px;
}

/* =========================================================
   8. Footer
   ========================================================= */
.site-footer{

    padding:48px 0;

   background:
        radial-gradient(
            circle at top center,
            rgba(255,255,255,.04),
            transparent 60%
        ),
        #2A2622;
    color:#D3CCC2;

    border-top:1px solid rgba(200,155,106,.28);

     position:relative;

    overflow:hidden;
}

.site-footer::before{

    content:"";

    position:absolute;

    inset:0;

    background:
        radial-gradient(
            circle at left center,
            rgba(255,255,255,.03),
            transparent 55%
        );

    pointer-events:none;
}

.footer-wrap {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 30px;
}

.footer-wrap strong{

    color:#F2ECE2;

    font-family:var(--serif);

    font-weight:700;

    letter-spacing:.08em;
}

.footer-wrap p{

    color:#9C9388;

    font-size:13px;

    line-height:1.8;
}

/* =========================================================
   9. Accessibility and interaction
   ========================================================= */
:focus-visible {
  outline: 2px solid var(--seal);
  outline-offset: 4px;
}

@media (hover: none) {
  .service-card:hover,
  .btn:hover {
    transform: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}

/* =========================================================
   10. Tablet
   ========================================================= */
@media (max-width: 900px) {
  :root {
    --header-height: 88px;
  }

  .main-nav {
    position: absolute;
    top: var(--header-height);
    left: 0;
    right: 0;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 12px 24px 24px;
    color: var(--ink-soft);
    background: rgba(252, 250, 244, 0.98);
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line-strong);
    box-shadow: var(--shadow-md);
  }

  .main-nav.is-open {
    display: flex;
  }

  .main-nav a {
    padding: 14px 4px;
    border-bottom: 1px solid var(--line);
  }

  .main-nav > a:not(.nav-cta)::after {
    display: none;
  }

  .main-nav .nav-cta {
    margin-top: 12px;
    text-align: center;
  }

  .menu-toggle {
    display: block;
  }

  .service-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .about-grid,
  .contact-card {
    grid-template-columns: 1fr;
  }

  .about-grid {
    gap: 54px;
  }

  .about-visual {
    min-height: 380px;
  }
}

/* ==========================================================
   11. Mobile
========================================================== */
@media (max-width:640px){

:root{
    --header-height:76px;
}

/* ---------- Layout ---------- */

.container{
    width:min(calc(100% - 24px),var(--max-width));
}

.section{
    padding:72px 0;
}

.section h2{
    font-size:34px;
    line-height:1.35;
}

.section-heading>p:last-child{
    font-size:16px;
    line-height:1.9;
}

/* ---------- Header ---------- */

.site-header .brand .brand-mark{
    width:48px;
    height:48px;
    flex-basis:48px;
}

.brand{
    gap:10px;
}

.brand>span{
    width:auto;
    min-height:48px;
}

.brand-title{
    height:38px;
}

.brand small{

    margin-top:4px;

    font-size:8px;

    letter-spacing:.15em;
}

/* ---------- Hero ---------- */

.hero{

    background-position:65% center;

    min-height:auto;
}

.hero-content{

    padding-top:calc(var(--header-height) + 48px);

    padding-bottom:48px;
}

.hero-title{
    left:0;
    margin-left:0;
}

.hero h1{

    font-size:38px;

    line-height:1.55;

    letter-spacing:.05em;
}

.hero-copy{

    margin-top:24px;

    font-size:16px;

    line-height:2;
}

.hero-notes{

    margin-top:32px;

    gap:10px;

    flex-direction:column;

    align-items:flex-start;
}

.hero-notes span{

    font-size:15px;
}


/* ---------- Service ---------- */

.service-grid{

    grid-template-columns:1fr;

    gap:18px;
}

.service-card{

    padding:30px 24px;

    min-height:auto;
}

.service-card::before{

    inset:8px;
}

.service-number{

    font-size:20px;
}

.service-card h3{

    margin:8px 0 16px;

    font-size:24px;
}

.service-card p{

    font-size:15px;

    line-height:1.9;
}

/* ---------- About ---------- */

.about-grid{

    gap:42px;
}

.about-visual{

    min-height:360px;

    grid-template-columns:1fr;
}

.about-visual::before{

    inset:14px;
}

.about-block{

    min-height:170px;

    padding:30px 24px;
}

.about-block:first-child{

    border-right:none;

    border-bottom:1px solid rgba(184,156,118,.28);
}

.about-block p{

    font-size:30px;
}

.about-content .lead{

    font-size:17px;
}

.about-points{

    margin-top:24px;
}

.about-points div{

    grid-template-columns:42px 1fr;

    gap:12px;
}

/* ---------- Contact ---------- */

.contact-card{

    grid-template-columns:1fr;

    gap:36px;

    padding:32px 24px;
}

.contact-row{

    grid-template-columns:1fr;

    gap:4px;

    padding:16px 0;
}

.contact-row span{

    font-size:12px;
}

.contact-row strong{

    font-size:17px;
}

/* ---------- Footer ---------- */

.site-footer{

    padding:36px 0;
}

.footer-wrap{

    flex-direction:column;

    align-items:flex-start;

    gap:14px;
}

.footer-wrap p{

    font-size:12px;
}

}

/* Print-friendly contact information */
@media print {
  .site-header,
  .menu-toggle,
  .hero-actions {
    display: none !important;
  }

  body,
  .hero,
  .services,
  .contact {
    color: #000;
    background: #fff !important;
  }

  .section {
    padding: 32px 0;
  }

  .hero {
    min-height: auto;
  }

  .service-card,
  .about-visual,
  .contact-card {
    box-shadow: none;
  }
}
