/* Kurtaxe — shared stylesheet */

:root{
  --red:#D8232A;
  --red-deep:#A81920;
  --ink:#161616;
  --grey:#5C5F63;
  --grey-light:#8A8D91;
  --line:#E5E5E3;
  --paper:#FFFFFF;
  --surface:#FAFAF9;
  --ok-bg:#F1F8F0;
  --ok-line:#CFE6C9;
  --pending-bg:#FBF6E9;
  --pending-line:#EBDDA9;
  --pending-ink:#8A6A0F;
  --radius:10px;
  --max:1080px;
}

*{box-sizing:border-box;}
html{scroll-behavior:smooth;}
body{
  margin:0;
  background:var(--paper);
  color:var(--ink);
  font-family:'Inter',system-ui,-apple-system,Segoe UI,Roboto,sans-serif;
  -webkit-font-smoothing:antialiased;
  font-size:16px;
  line-height:1.6;
}
h1,h2,h3,h4{
  font-weight:700; letter-spacing:-0.015em; margin:0 0 14px; color:var(--ink);
}
p{margin:0 0 14px; color:var(--grey);}
a{color:var(--red-deep); text-decoration:none;}
a:hover{text-decoration:underline;}
.wrap{max-width:var(--max); margin:0 auto; padding:0 24px;}
.center{text-align:center;}
img,svg{max-width:100%;}

/* reveal-on-scroll */
.reveal{opacity:0; transform:translateY(14px); transition:opacity .6s ease, transform .6s ease;}
.reveal.in{opacity:1; transform:none;}

/* header */
header.site{
  border-bottom:1px solid var(--line);
  position:sticky; top:0; background:rgba(255,255,255,.92);
  backdrop-filter:blur(6px);
  z-index:50;
}
header.site .header-bar{
  display:grid;
  grid-template-columns:1fr auto 1fr;
  grid-template-areas:"logo nav lang";
  align-items:center;
  column-gap:24px;
  height:64px;
}
.logo{
  grid-area:logo; justify-self:start;
  display:flex; align-items:center; gap:9px;
  font-weight:800; font-size:17px; letter-spacing:-0.01em; color:var(--ink);
}
.logo .cross{
  width:20px; height:20px; background:var(--red); border-radius:3px;
  position:relative; flex:none;
}
.logo .cross::before, .logo .cross::after{
  content:""; position:absolute; background:#fff;
}
.logo .cross::before{ left:8px; top:4px; width:4px; height:12px; }
.logo .cross::after{ left:4px; top:8px; width:12px; height:4px; }

nav.main{grid-area:nav; justify-self:center; display:flex; align-items:center; gap:30px;}
nav.main a{
  color:var(--grey); font-size:14.5px; font-weight:500;
}
nav.main a:hover{color:var(--ink); text-decoration:none;}
nav.main .nav-btn{
  background:none; border:none; padding:0; font:inherit; color:var(--grey);
  font-size:14.5px; font-weight:500; cursor:pointer;
}
nav.main .nav-btn:hover{color:var(--ink);}
nav.main a.current{color:var(--red-deep);}
.lang-switch{
  grid-area:lang;
  display:flex; gap:4px; font-size:13.5px; font-weight:600;
  justify-self:end;
}
.lang-switch a{
  color:var(--grey-light); padding:5px 9px; border-radius:6px;
}
.lang-switch a:hover{color:var(--ink); background:var(--surface); text-decoration:none;}
.lang-switch a.active{color:#fff; background:var(--red); }
.lang-switch a.active:hover{background:var(--red);}

/* hero */
.hero{padding:76px 0 56px; text-align:center; border-bottom:1px solid var(--line);}
.eyebrow{
  display:inline-flex; align-items:center; gap:7px;
  font-size:13px; font-weight:600; color:var(--red-deep);
  background:#FDECEC; padding:6px 14px; border-radius:20px; margin-bottom:22px;
}
.hero h1{font-size:clamp(32px,4.2vw,48px); line-height:1.08; max-width:720px; margin:0 auto 18px;}
.hero .sub{font-size:17.5px; max-width:560px; margin:0 auto 34px; color:var(--grey);}

/* search */
.search-shell{max-width:600px; margin:0 auto; position:relative; z-index:30;}
input#q{
  width:100%; font-size:17px; font-weight:500; padding:16px 20px;
  border:1.5px solid var(--ink); border-radius:var(--radius);
  outline:none; background:var(--paper); color:var(--ink);
  transition:border-color .2s, box-shadow .2s;
}
input#q:focus{border-color:var(--red); box-shadow:0 0 0 4px #D8232A1A;}
.suggestions{
  position:absolute; left:0; right:0; top:calc(100% + 8px);
  background:var(--paper); border:1.5px solid var(--line); border-radius:var(--radius);
  box-shadow:0 12px 30px rgba(0,0,0,.08); text-align:left; overflow:hidden;
  display:none; z-index:100; max-height:320px; overflow-y:auto;
}
.suggestions.open{display:block;}
.suggestions a{
  display:flex; justify-content:space-between; padding:13px 18px;
  border-bottom:1px solid var(--line); color:var(--ink); font-weight:500; font-size:15px;
}
.suggestions a:last-child{border-bottom:none;}
.suggestions a:hover, .suggestions a.selected{background:var(--surface); text-decoration:none;}
.suggestions a .c{color:var(--grey-light); font-size:13px; font-weight:400;}

/* stat strip */
.stat-strip{
  display:grid; grid-template-columns:repeat(3,1fr); border-bottom:1px solid var(--line);
}
.stat-strip .stat{
  padding:34px 20px; text-align:center; border-right:1px solid var(--line);
}
.stat-strip .stat:last-child{border-right:none;}
.stat .num{
  font-size:34px; font-weight:800; color:var(--ink); letter-spacing:-0.02em;
}
.stat .num .unit{font-size:18px; font-weight:600; color:var(--grey-light);}
.stat .label{font-size:13.5px; color:var(--grey); margin-top:6px;}

/* section */
section.block{padding:64px 0; border-bottom:1px solid var(--line);}
section.block.tight{padding:44px 0;}
.section-head{text-align:center; max-width:600px; margin:0 auto 44px;}
.section-head .kicker{
  font-size:13px; font-weight:700; color:var(--red-deep); text-transform:uppercase;
  letter-spacing:0.06em; margin-bottom:10px;
}
.section-head h2{font-size:clamp(24px,3vw,32px);}
.section-head p{margin:0;}

/* how it works */
.steps{display:grid; grid-template-columns:repeat(3,1fr); gap:28px; max-width:900px; margin:0 auto;}
.step{text-align:center; padding:0 12px;}
.step .n{
  width:38px; height:38px; border-radius:50%; background:var(--ink); color:#fff;
  display:flex; align-items:center; justify-content:center; font-weight:700; margin:0 auto 16px;
}
.step h3{font-size:16.5px; margin-bottom:8px;}
.step p{font-size:14.5px; margin:0;}

/* browse table */
.table-shell{max-width:840px; margin:0 auto; border:1px solid var(--line); border-radius:var(--radius); overflow-x:auto; -webkit-overflow-scrolling:touch;}
table{width:100%; border-collapse:collapse; font-size:14.5px;}
thead th{
  text-align:left; font-size:12.5px; font-weight:700; text-transform:uppercase;
  letter-spacing:0.04em; color:var(--grey-light); background:var(--surface);
  padding:13px 18px; border-bottom:1px solid var(--line);
}
th.num, td.num{text-align:right;}
tbody td{padding:15px 18px; border-bottom:1px solid var(--line);}
tbody tr:last-child td{border-bottom:none;}
tbody tr{transition:background .15s;}
tbody tr:hover{background:var(--surface);}
tbody td a{color:var(--ink); font-weight:600; display:block;}
tbody td a:hover{text-decoration:none; color:var(--red-deep);}
.pill{
  display:inline-flex; align-items:center; gap:5px; font-size:12px; font-weight:600;
  padding:3px 9px; border-radius:20px;
}
.pill.ok{background:var(--ok-bg); color:#2E6B27; border:1px solid var(--ok-line);}
.pill.pending{background:var(--pending-bg); color:var(--pending-ink); border:1px solid var(--pending-line);}

/* commune detail page */
.breadcrumb{font-size:13.5px; color:var(--grey-light); margin-bottom:18px;}
.breadcrumb a{color:var(--grey-light);}
.detail-head{padding:48px 0 32px; border-bottom:1px solid var(--line);}
.detail-head .place-name{font-size:clamp(30px,4vw,42px); margin-bottom:8px;}
.detail-head .place-meta{color:var(--grey); font-size:15px;}
.rate-hero{
  margin:28px 0 0; padding:28px; background:var(--surface); border:1px solid var(--line);
  border-radius:var(--radius); text-align:center;
}
.rate-hero .amt{font-size:44px; font-weight:800; letter-spacing:-0.02em;}
.rate-hero .amt.pending{color:var(--pending-ink); font-size:22px;}
.rate-hero .per{font-size:14px; color:var(--grey); margin-top:4px;}

.detail-grid{display:grid; grid-template-columns:1fr 1fr; gap:32px; padding:44px 0;}
.detail-field h3{
  font-size:13px; text-transform:uppercase; letter-spacing:0.05em; color:var(--red-deep);
  margin-bottom:8px;
}
.detail-field p{font-size:15.5px; color:var(--ink);}
.detail-field.full{grid-column:1/-1;}

.source-box{
  background:var(--surface); border:1px solid var(--line); border-radius:var(--radius);
  padding:20px 24px; display:flex; justify-content:space-between; align-items:center;
  flex-wrap:wrap; gap:12px; margin-bottom:44px; font-size:14px;
}
.source-box a{font-weight:600;}
.verified-tag{font-size:12.5px; color:var(--grey-light);}

.disclaimer-box{
  border-left:3px solid var(--red); padding:16px 20px; background:#FDECEC33;
  font-size:13.5px; color:var(--grey); margin-bottom:44px;
}

.related{padding-bottom:56px;}
.related h3{font-size:16px; margin-bottom:16px;}
.related-list{display:flex; gap:10px; flex-wrap:wrap;}
.related-list a{
  border:1px solid var(--line); border-radius:20px; padding:8px 16px; font-size:14px;
  color:var(--ink); font-weight:500;
}
.related-list a:hover{border-color:var(--red); color:var(--red-deep); text-decoration:none;}
.related-list-item{
  display:inline-block; border:1px solid var(--line); border-radius:20px; padding:6px 14px;
  font-size:13.5px; color:var(--grey);
}
.field-row label{display:block; font-size:13px; font-weight:700; color:var(--red-deep); margin-bottom:8px; text-transform:uppercase; letter-spacing:0.04em;}

/* faq */
.faq-item{border-bottom:1px solid var(--line); padding:20px 0;}
.faq-item summary{
  cursor:pointer; font-weight:600; font-size:16px; list-style:none; position:relative;
  padding-right:28px;
}
.faq-item summary::-webkit-details-marker{display:none;}
.faq-item summary::after{
  content:"+"; position:absolute; right:0; top:0; font-size:20px; color:var(--red-deep); font-weight:400;
  transition:transform .2s;
}
.faq-item[open] summary::after{content:"–";}
.faq-item p{margin-top:12px; font-size:15px;}

/* guide cards */
.guide-grid{display:grid; grid-template-columns:1fr 1fr; gap:20px; max-width:900px; margin:0 auto;}
.guide-card{
  border:1px solid var(--line); border-radius:var(--radius); padding:26px; text-align:left;
  transition:border-color .2s, transform .2s;
}
.guide-card:hover{border-color:var(--red); transform:translateY(-2px);}
.guide-card h3{font-size:17px; margin-bottom:8px;}
.guide-card p{font-size:14px; margin:0;}
.guide-card a{color:var(--ink); display:block;}
.guide-card a:hover{text-decoration:none;}

article.guide{max-width:700px; margin:0 auto; padding:56px 0 70px;}
article.guide h1{font-size:clamp(28px,3.6vw,38px); margin-bottom:10px;}
article.guide .meta{font-size:13.5px; color:var(--grey-light); margin-bottom:36px;}
article.guide h2{font-size:21px; margin-top:36px;}
article.guide p, article.guide li{font-size:15.5px; color:var(--ink);}
article.guide ul, article.guide ol{color:var(--ink); padding-left:22px;}
article.guide blockquote{border-left:3px solid var(--red); margin:24px 0; padding:4px 20px; color:var(--grey); font-style:italic;}
article.guide img{border-radius:8px;}
article.guide table{width:100%; max-width:100%; border-collapse:collapse; font-size:14.5px; margin:20px 0; display:block; overflow-x:auto; -webkit-overflow-scrolling:touch;}
article.guide table th, article.guide table td{border:1px solid var(--line); padding:10px 14px; text-align:left;}
article.guide table th{background:var(--surface); font-weight:700;}

/* footer */
footer.site{padding:48px 0 40px; text-align:center;}
footer.site .flinks{
  display:flex; justify-content:center; gap:26px; flex-wrap:wrap; margin-bottom:24px; font-size:14px;
}
footer.site .flinks a, footer.site .flinks button{color:var(--grey);}
footer.site .flinks button{
  background:none; border:none; padding:0; font:inherit; cursor:pointer; text-decoration:none;
}
footer.site .flinks button:hover{color:var(--ink); text-decoration:underline;}
footer.site p.fine{font-size:12.5px; color:var(--grey-light); max-width:560px; margin:0 auto;}

/* count-up target */
.count[data-target]{}

/* request-a-commune modal */
.modal-overlay{
  position:fixed; inset:0; background:rgba(22,22,22,.5);
  display:none; align-items:center; justify-content:center; z-index:200; padding:20px;
}
.modal-overlay.open{display:flex;}
.modal-box{
  background:#fff; border-radius:var(--radius); max-width:440px; width:100%;
  padding:30px; max-height:90vh; overflow-y:auto; position:relative;
}
.modal-box h3{font-size:19px; margin-bottom:6px;}
.modal-box .modal-sub{font-size:13.5px; color:var(--grey); margin-bottom:22px;}
.modal-close{
  position:absolute; top:18px; right:18px; background:none; border:none; font-size:20px;
  color:var(--grey-light); cursor:pointer; line-height:1; padding:4px;
}
.modal-close:hover{color:var(--ink);}
.field-row{margin-bottom:16px;}
.field-row label{display:block; font-size:13px; font-weight:600; margin-bottom:6px; color:var(--ink);}
.field-row input{
  width:100%; padding:11px 13px; border:1.5px solid var(--line); border-radius:8px;
  font-size:15px; font-family:inherit; outline:none; transition:border-color .2s;
}
.field-row input:focus{border-color:var(--red);}
.hp-field{position:absolute; left:-9999px; top:-9999px;}
.modal-submit{
  width:100%; padding:13px; background:var(--ink); color:#fff; border:none; border-radius:8px;
  font-size:15px; font-weight:600; cursor:pointer; margin-top:6px; transition:background .2s;
}
.modal-submit:hover{background:var(--red-deep);}
.modal-submit:disabled{opacity:.6; cursor:default;}
.modal-status{font-size:13.5px; margin-top:14px; display:none;}
.modal-status.show{display:block;}
.modal-status.ok{color:#2E6B27;}
.modal-status.err{color:var(--red-deep);}

@media (max-width:760px){
  .stat-strip{grid-template-columns:1fr; }
  .stat-strip .stat{border-right:none; border-bottom:1px solid var(--line);}
  .steps{grid-template-columns:1fr;}
  .detail-grid{grid-template-columns:1fr;}
  .guide-grid{grid-template-columns:1fr;}
  nav.main{gap:16px;}
  nav.main a{font-size:13px;}
}

@media (max-width:640px){
  .wrap{padding:0 18px;}
  .hero{padding:44px 0 34px;}
  .hero h1{font-size:clamp(25px,7vw,32px);}
  .hero .sub{font-size:15px; padding:0 4px;}
  section.block{padding:44px 0;}
  section.block.tight{padding:36px 0;}
  .rate-hero .amt{font-size:clamp(28px,9vw,40px);}
  .detail-head .place-name{font-size:clamp(26px,7vw,36px);}

  /* table: drop the canton column and tighten spacing so it fits without scrolling */
  table{min-width:0;}
  thead th:nth-child(2), tbody td:nth-child(2){display:none;}
  thead th, tbody td{padding:11px 10px; font-size:13px;}
  .pill{font-size:10px; padding:2px 7px; white-space:nowrap;}

  .source-box{padding:16px 18px; font-size:13px;}
  .modal-box{padding:24px 20px;}
}

@media (max-width:460px){
  header.site .header-bar{
    grid-template-columns:auto 1fr auto;
    grid-template-areas:"logo nav lang";
    height:56px; column-gap:8px;
  }
  nav.main{
    justify-self:center; gap:0;
  }
  nav.main .nav-btn{
    font-size:12px;
  }
  .logo{font-size:14.5px; gap:7px;}
  .logo .cross{width:18px; height:18px;}
  .logo .cross::before{left:7px; top:3px; width:4px; height:11px;}
  .logo .cross::after{left:3px; top:7px; width:11px; height:4px;}
  .lang-switch{gap:1px; font-size:12px;}
  .lang-switch a{padding:4px 6px;}
  .eyebrow{font-size:11.5px; padding:5px 11px;}
  input#q{font-size:16px; padding:14px 16px;}
  .table-shell{border-radius:8px;}
}
