/* tahal.co.nz - shared stylesheet for the main site and every subsite */
/* Served from https://www.tahal.co.nz/assets/site.css; subsites load it from there too. */
/* Clean & light design with the previous design's blues. */

@font-face{
	font-family:"Inter";
	src:url("../vendor/inter/5.3.0/inter-latin-wght-normal.woff2") format("woff2");
	font-weight:100 900;
	font-style:normal;
	font-display:swap;
}

:root{
	--bg:#e4f0f9;         /* soft tint of the previous design's blue */
	--surface:#ffffff;
	--text:#1b2333;
	--muted:#5a6a7e;
	--line:#d3e3f0;
	--brand:#1000a0;      /* logo indigo */
	--blue:#1c82c4;       /* previous design's page blue */
	--blue-dark:#1275ae;  /* previous design's darker blue */
	--blue-light:#bbe2f1; /* previous design's header-strip blue */
	--accent:#1275ae;     /* links and buttons: the darker blue reads well on white */
	--accent-soft:#e2f0fa;
	--radius:14px;
	--shadow:0 1px 2px rgba(16,24,40,.05), 0 4px 16px rgba(16,24,40,.06);
	--shadow-hover:0 2px 4px rgba(16,24,40,.06), 0 12px 32px rgba(16,24,40,.12);
}

/* ---- Base ---- */
*{box-sizing:border-box;}
html{-webkit-text-size-adjust:100%;}
body{
	margin:0;
	min-height:100vh;
	display:flex;
	flex-direction:column;
	background:var(--bg);
	color:var(--text);
	font-family:"Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
	font-size:16px;
	line-height:1.6;
}
main{flex:1 0 auto; width:100%; padding-bottom:48px;}
a{color:var(--accent); text-decoration:none;}
a:hover{text-decoration:underline;}
img{max-width:100%; height:auto;}
h1, h2, h3, h4, h5{line-height:1.25; letter-spacing:-.01em;}
hr{border:0; border-top:1px solid var(--line); margin:28px 0;}
.wrap{max-width:1080px; margin:0 auto; padding:0 24px;}
.sr-only{position:absolute; width:1px; height:1px; overflow:hidden; clip:rect(0 0 0 0); white-space:nowrap;}

/* ---- Top bar ---- */
.topbar{position:sticky; top:0; z-index:1000; background:rgba(255,255,255,.95); box-shadow:0 1px 0 rgba(16,24,40,.04);}
@supports (backdrop-filter:blur(8px)){
	.topbar{background:rgba(255,255,255,.88); backdrop-filter:saturate(180%) blur(8px);}
}
/* The previous design's blue gradient strip */
.topbar::after{content:""; display:block; height:6px; background:linear-gradient(to bottom, var(--blue-light), var(--blue));}
.topbar .wrap{display:flex; align-items:center; justify-content:space-between; height:64px; gap:16px;}
.brand{display:flex; align-items:center; gap:10px; min-width:0;}
.brand img{width:34px; height:34px; flex:none;}
.brand-text{display:flex; flex-direction:column; line-height:1.2; min-width:0;}
.brand-name{color:var(--text); font-weight:700; font-size:18px; letter-spacing:-.01em; white-space:nowrap;}
.brand-name:hover{text-decoration:none; color:var(--accent);}
.brand-back{font-size:12px; font-weight:500; color:var(--muted);}
.nav{display:flex; gap:2px; list-style:none; margin:0; padding:0;}
.nav a{display:block; padding:8px 12px; border-radius:8px; color:var(--muted); font-weight:500; font-size:15px; white-space:nowrap;}
.nav a:hover{background:var(--accent-soft); color:var(--text); text-decoration:none;}
.nav a.active{background:var(--accent-soft); color:var(--accent);}
.menu-btn{display:none;}

/* ---- Home: hero band and family member cards ---- */
.hero{background:linear-gradient(135deg, var(--blue) 0%, var(--blue-dark) 100%); color:#fff; padding:64px 0 120px;}
.eyebrow{display:inline-block; font-size:13px; font-weight:600; letter-spacing:.08em; text-transform:uppercase; color:var(--blue-light); margin-bottom:12px;}
.hero h1{font-size:46px; line-height:1.1; letter-spacing:-.025em; margin:0 0 14px; font-weight:800;}
.hero p{font-size:19px; color:rgba(255,255,255,.88); max-width:620px; margin:0;}
.members{display:grid; grid-template-columns:repeat(4, 1fr); gap:20px; margin-top:-80px; position:relative;}
.member{
	display:flex; flex-direction:column; align-items:center; text-align:center;
	background:var(--surface); border:2px solid var(--blue); border-radius:var(--radius);
	box-shadow:var(--shadow); padding:28px 20px 22px;
	transition:transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}
.member:hover{transform:translateY(-3px); box-shadow:var(--shadow-hover); border-color:var(--blue-dark);}
.member h2{font-size:20px; margin:0;}
.member h2 a{color:var(--text);}
.member p{color:var(--muted); font-size:14px; margin:4px 0 16px; flex:1;}
.links{display:flex; flex-wrap:wrap; justify-content:center; gap:6px;}
.links a{font-size:13px; font-weight:600; padding:5px 11px; border-radius:999px; background:var(--accent-soft);}
.links a:hover{background:var(--accent); color:#fff; text-decoration:none;}

/* Round portraits; people without a photo get a monogram */
.avatar{
	display:block; width:104px; height:104px; border-radius:50%; object-fit:cover; object-position:center 20%;
	border:4px solid #fff; box-shadow:0 0 0 1px var(--line), 0 6px 16px rgba(16,24,40,.12);
	margin-bottom:16px; flex:none;
}
.monogram{display:flex; align-items:center; justify-content:center; font-size:42px; font-weight:700; color:#fff; background:linear-gradient(135deg, var(--brand), var(--accent));}
.monogram.teal{background:linear-gradient(135deg, #1275ae, #2bb3c0);}

/* ---- Page heading band (every page except home) ---- */
.band{background:linear-gradient(135deg, var(--blue) 0%, var(--blue-dark) 100%); color:#fff; margin-bottom:28px;}
.page-head{display:flex; align-items:center; gap:24px; padding-top:36px; padding-bottom:36px;}
.page-head .avatar{width:88px; height:88px; margin:0; box-shadow:0 0 0 1px rgba(255,255,255,.4), 0 6px 16px rgba(0,0,0,.18);}
.page-head .monogram{font-size:36px;}
.page-head h1{font-size:36px; line-height:1.15; letter-spacing:-.02em; margin:0;}
.page-head p{margin:4px 0 0; color:rgba(255,255,255,.88);}
.social{display:flex; flex-wrap:wrap; gap:6px; margin-top:12px;}
.social a{font-size:13px; font-weight:600; padding:4px 11px; border-radius:999px; color:#fff; background:rgba(255,255,255,.16); border:1px solid rgba(255,255,255,.35);}
.social a:hover{background:#fff; color:var(--accent); text-decoration:none;}

/* ---- Content cards ---- */
.card{background:var(--surface); border:2px solid var(--blue); border-radius:var(--radius); box-shadow:var(--shadow); padding:28px 32px; margin-bottom:24px;}
.card > :first-child{margin-top:0;}
.card > :last-child{margin-bottom:0;}
.card h2{font-size:22px; margin:28px 0 8px;}
.card h3{font-size:18px; margin:28px 0 8px;}
.card h4{font-size:16px; margin:24px 0 6px; text-transform:uppercase; letter-spacing:.06em; color:var(--muted);}
.card h5{font-size:16px; margin:20px 0 4px; color:var(--accent);}
.card ul{padding-left:22px;}
.card li{margin:2px 0;}
.lead{color:var(--muted); margin:0 0 20px;}
.muted{color:var(--muted);}
.center{text-align:center;}
.coming-soon{text-align:center; padding:48px 32px;}
.coming-soon h2{font-size:24px; margin:0 0 6px;}
.coming-soon p{color:var(--muted); margin:0;}
.contact-email{font-size:20px; font-weight:600;}
.email-reveal{padding:0; border:0; background:none; font:inherit; color:var(--accent); cursor:pointer;}
.email-reveal:hover{text-decoration:underline;}
.actions{display:flex; flex-wrap:wrap; gap:10px; margin-top:24px;}
.actions.top{margin-top:0; margin-bottom:8px;}
.card hr{border:0; border-top:1px solid var(--line); margin:28px 0;}
.card li.sublist{list-style:none;}
.card li.sublist ul{columns:2; column-gap:24px; margin:4px 0 6px;}

/* ---- Buttons and badges ---- */
.btn{display:inline-block; font:inherit; font-weight:600; font-size:14px; line-height:1.4; padding:8px 16px; border-radius:8px; border:0; background:var(--accent); color:#fff; cursor:pointer; white-space:nowrap;}
.btn:hover{background:#0e5f8f; color:#fff; text-decoration:none;}
.btn-secondary{background:var(--accent-soft); color:var(--accent);}
.btn-secondary:hover{background:#cfe5f5; color:var(--accent);}
.btn-danger{background:#c0392b;}
.btn-danger:hover{background:#9e2f23;}
.badge{display:inline-block; font-size:12px; font-weight:600; padding:2px 9px; border-radius:999px; background:var(--accent-soft); color:var(--accent);}
.badge.stable{background:#e6f6ec; color:#1b7a3d;}
.badge.unstable, .badge.beta{background:#fdf1e3; color:#a45a00;}

/* ---- Tables (project downloads) ---- */
.table{width:100%; border-collapse:collapse; font-size:15px;}
.table th{text-align:left; font-size:12px; text-transform:uppercase; letter-spacing:.06em; color:var(--muted); font-weight:600; padding:0 12px 10px; border-bottom:1px solid var(--line);}
.table td{padding:14px 12px; border-bottom:1px solid var(--line); vertical-align:top;}
.table tr:last-child td{border-bottom:0;}
.table .name{font-weight:600;}
.table .num{font-variant-numeric:tabular-nums; color:var(--muted);}

/* ---- Forms ---- */
.form{max-width:420px;}
.form.center{margin:0 auto; text-align:left;}
.form h2{margin-top:0;}
.field{margin-bottom:16px;}
.field label{display:block; font-weight:600; font-size:14px; margin-bottom:6px;}
.field input[type=text], .field input[type=password], .field select{
	width:100%; font:inherit; font-size:15px; padding:10px 12px; border:1px solid #b9cfe0; border-radius:8px; background:#fff; color:var(--text);
}
.field input[type=file]{font:inherit; font-size:14px;}
.field input:focus, .field select:focus{outline:2px solid var(--blue); outline-offset:1px; border-color:var(--blue);}
.field select[size]{padding:6px;}
.hint{font-size:13px; color:var(--muted); margin:6px 0 0;}
.notice{padding:12px 16px; border-radius:10px; margin-bottom:20px; font-weight:500; background:var(--accent-soft); color:#0f4f7a; border:1px solid #c4def0;}
.notice.error{background:#fdecea; color:#922b21; border-color:#f5c6c0;}
.notice.success{background:#e6f6ec; color:#1b6b38; border-color:#bfe5cb;}
.grid-2{display:grid; grid-template-columns:1fr 1fr; gap:24px;}

/* ---- Gallery (UberGallery template) ---- */
#galleryWrapper{margin:0;}
#galleryList{display:grid; grid-template-columns:repeat(auto-fill, minmax(120px, 1fr)); gap:12px; list-style:none; margin:0; padding:0;}
#galleryList li{margin:0; padding:0;}
#galleryList li a{display:block; border-radius:10px; overflow:hidden; border:2px solid var(--line); transition:border-color .15s ease, transform .15s ease;}
#galleryList li a:hover{border-color:var(--blue); transform:translateY(-2px);}
#galleryList li img{display:block; width:100%; aspect-ratio:1 / 1; object-fit:cover;}
#galleryFooter{margin-top:16px;}
#galleryFooter:not(:has(li)){display:none;}
#galleryPagination{display:flex; gap:6px; list-style:none; padding:0; margin:0;}
#galleryPagination{flex-wrap:wrap; font-size:14px;}
#galleryPagination li{padding:4px 10px; border-radius:8px;}
#galleryPagination li:has(a){padding:0;}
#galleryPagination li a{display:block; padding:4px 10px; border-radius:8px; background:var(--accent-soft);}
#galleryPagination li a:hover{background:var(--accent); color:#fff; text-decoration:none;}
#galleryPagination li.current{font-weight:700;}
#galleryPagination li.inactive{color:#9aa8b8;}
#galleryPagination li.title{color:var(--muted);}

/* ---- Site statistics ---- */
.statChart{position:relative; width:100%; height:420px;}
#map{position:relative; z-index:0; isolation:isolate; width:100%; height:450px; border-radius:10px; overflow:hidden; border:1px solid var(--line);}

/* ---- Footer ---- */
.footer{background:var(--blue-dark); color:#d4e9f7;}
.footer .wrap{display:flex; justify-content:space-between; align-items:center; padding-top:20px; padding-bottom:20px; font-size:14px; gap:12px; flex-wrap:wrap;}
.footer a{color:#fff; text-decoration:underline;}

/* ---- Tablets ---- */
@media (max-width:960px){
	.nav a{padding:8px 9px; font-size:14px;}
}
@media (max-width:900px){
	.members{grid-template-columns:repeat(2, 1fr);}
}

/* ---- Phones: menu behind the button, tables become stacked cards ---- */
@media (max-width:880px){
	.menu-btn{display:flex; align-items:center; justify-content:center; width:42px; height:42px; flex:none; border:1px solid var(--line); border-radius:10px; background:#fff; font-size:20px; color:var(--text); cursor:pointer;}
	.nav-wrap{display:none; position:absolute; left:0; right:0; top:70px; background:#fff; border-bottom:2px solid var(--blue); box-shadow:0 12px 24px rgba(16,24,40,.12);}
	.topbar.open .nav-wrap{display:block;}
	.nav{flex-direction:column; padding:8px 16px 14px;}
	.nav a{padding:12px; font-size:16px;}
}
@media (max-width:640px){
	.wrap{padding:0 16px;}
	.hero{padding:36px 0 96px;}
	.hero h1{font-size:34px;}
	.hero p{font-size:17px;}
	.members{grid-template-columns:1fr 1fr; gap:12px; margin-top:-64px;}
	.member{padding:20px 12px 16px;}
	.avatar{width:80px; height:80px;}
	.monogram{font-size:32px;}
	.page-head{gap:16px; padding-top:24px; padding-bottom:24px;}
	.page-head .avatar{width:64px; height:64px;}
	.page-head .monogram{font-size:26px;}
	.page-head h1{font-size:28px;}
	.card{padding:20px 18px;}
	.grid-2{grid-template-columns:1fr;}
	.statChart{height:320px;}
	#map{height:340px;}
	.footer .wrap{flex-direction:column; align-items:flex-start; gap:4px;}

	/* Each table row becomes a small card; cells show their column name */
	.table thead, .table tr.head{display:none;}
	.table, .table tbody, .table tr, .table td{display:block; width:100%;}
	.table tr{border:1px solid var(--line); border-radius:10px; padding:12px 14px; margin-bottom:12px;}
	.table td{border:0; padding:3px 0;}
	.table td[data-label]::before{content:attr(data-label); display:inline-block; min-width:96px; font-size:12px; font-weight:600; text-transform:uppercase; letter-spacing:.06em; color:var(--muted);}
	.table td.name{font-size:17px; padding-bottom:6px;}
	.table td.name::before{display:none;}
	.table td.download{padding-top:10px;}
	.table td.download::before{display:none;}
}
