/*
Theme Name: Tamraght
Description: Coastal theme for the Tamraght Forum community. Sand, Atlantic ink and terracotta.
Version: 1.0.0
Author: Tamraght Forum
Requires PHP: 8.0
Text Domain: tamraght
*/

@font-face { font-family: "Bricolage Grotesque"; font-weight: 700; font-style: normal; font-display: swap; src: url(fonts/bricolage-grotesque-latin-700.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Bricolage Grotesque"; font-weight: 700; font-style: normal; font-display: swap; src: url(fonts/bricolage-grotesque-latin-ext-700.woff2) format("woff2"); unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Bricolage Grotesque"; font-weight: 800; font-style: normal; font-display: swap; src: url(fonts/bricolage-grotesque-latin-800.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Bricolage Grotesque"; font-weight: 800; font-style: normal; font-display: swap; src: url(fonts/bricolage-grotesque-latin-ext-800.woff2) format("woff2"); unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Figtree"; font-weight: 400; font-style: normal; font-display: swap; src: url(fonts/figtree-latin-400.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Figtree"; font-weight: 400; font-style: normal; font-display: swap; src: url(fonts/figtree-latin-ext-400.woff2) format("woff2"); unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Figtree"; font-weight: 400; font-style: italic; font-display: swap; src: url(fonts/figtree-latin-400i.woff2) format("woff2"); }
@font-face { font-family: "Figtree"; font-weight: 600; font-style: normal; font-display: swap; src: url(fonts/figtree-latin-600.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Figtree"; font-weight: 600; font-style: normal; font-display: swap; src: url(fonts/figtree-latin-ext-600.woff2) format("woff2"); unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }

:root {
	--bg: #F2EADF;
	--surface: #FBF7F1;
	--sand-2: #E9DECF;
	--ink: #1C2B33;
	--muted: #5E625F;
	--line: #DDD1C1;
	--accent: #B8482A;
	--accent-ink: #9C3A20;
	--ocean: #17485A;
	--ocean-2: #123A49;
	--ocean-ink: #EAF1F0;
	--success: #2F6B4A;
	--warning: #9A6A12;
	--font-display: "Bricolage Grotesque", "Avenir Next", "Segoe UI", sans-serif;
	--font-body: "Figtree", "Avenir Next", "Segoe UI", sans-serif;
	--r-sm: 6px;
	--r-md: 14px;
	--r-pill: 999px;
	--wrap: 1180px;
	--gutter: clamp(16px, 4vw, 32px);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 90px; }
body {
	margin: 0;
	background: var(--bg);
	color: var(--ink);
	font-family: var(--font-body);
	font-size: 16.5px;
	line-height: 1.55;
	-webkit-font-smoothing: antialiased;
	text-rendering: optimizeLegibility;
}
:where(h1, h2, h3, h4) { font-family: var(--font-display); font-weight: 700; line-height: 1.1; margin: 0 0 .4em; letter-spacing: -0.01em; text-wrap: balance; }
:where(p, ul, ol, dl, figure, blockquote) { margin: 0 0 1em; }
:where(ul, ol) { padding-left: 1.2em; }
:where(img) { max-width: 100%; height: auto; display: block; }
:where(a) { color: var(--ocean); text-decoration-thickness: 1px; text-underline-offset: 3px; }
:where(a:hover) { color: var(--accent); }
:where(button, input, select, textarea) { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
::selection { background: #B8482A33; }

.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }
.site-main { min-height: 60vh; padding-block: clamp(20px, 4vw, 40px) clamp(40px, 7vw, 80px); }
.skip-link { position: absolute; left: 12px; top: -60px; z-index: 100; background: var(--ink); color: var(--surface); padding: 10px 16px; border-radius: var(--r-sm); }
.skip-link:focus { top: 12px; }

/* Header */
.site-header { position: sticky; top: 0; z-index: 50; background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.admin-bar .site-header { top: 32px; }
.site-header__bar { display: flex; align-items: center; gap: 28px; min-height: 68px; }
.site-logo { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); flex-shrink: 0; }
.site-logo__mark { width: 34px; height: 34px; }
.site-logo__word { font-family: var(--font-display); font-weight: 800; font-size: 1.32rem; letter-spacing: -0.02em; line-height: 1; }
.site-logo__word span { font-family: var(--font-body); font-weight: 600; font-size: .7rem; letter-spacing: .14em; text-transform: uppercase; color: var(--accent); margin-left: 6px; vertical-align: 3px; }
.site-nav { flex: 1; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.site-nav__main { display: flex; gap: 4px; }
.site-nav__main a, .site-nav__mod, .site-nav__login { color: var(--ink); text-decoration: none; font-weight: 600; padding: 8px 12px; border-radius: var(--r-pill); }
.site-nav__main a:hover, .site-nav__mod:hover, .site-nav__login:hover { background: var(--sand-2); color: var(--ink); }
.site-nav__main a[aria-current] { background: var(--ink); color: var(--surface); }
.site-nav__user { display: flex; align-items: center; gap: 10px; }
.lang-switch { display: inline-flex; border: 1px solid var(--line); border-radius: var(--r-pill); padding: 2px; background: var(--surface); }
.lang-switch a { font-size: .78rem; font-weight: 600; letter-spacing: .06em; text-decoration: none; color: var(--muted); padding: 4px 9px; border-radius: var(--r-pill); }
.lang-switch a[aria-current] { background: var(--ocean); color: var(--ocean-ink); }
.bell { position: relative; display: inline-grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; color: var(--ink); }
.bell:hover { background: var(--sand-2); color: var(--ink); }
.bell svg { width: 22px; height: 22px; }
.bell__dot { position: absolute; top: 2px; right: 0; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--accent); color: var(--surface); font-size: .7rem; font-weight: 600; display: grid; place-items: center; line-height: 1; }
.me { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; color: var(--ink); font-weight: 600; padding: 3px 12px 3px 3px; border-radius: var(--r-pill); border: 1px solid var(--line); background: var(--surface); }
.me:hover, .me[aria-current] { border-color: var(--ink); color: var(--ink); }
.nav-toggle { display: none; margin-left: auto; width: 44px; height: 44px; border: 1px solid var(--line); border-radius: 50%; background: var(--surface); cursor: pointer; }
.nav-toggle__bars, .nav-toggle__bars::before, .nav-toggle__bars::after { display: block; width: 18px; height: 2px; background: var(--ink); margin: auto; position: relative; transition: transform .2s; }
.nav-toggle__bars::before, .nav-toggle__bars::after { content: ""; position: absolute; left: 0; }
.nav-toggle__bars::before { top: -6px; }
.nav-toggle__bars::after { top: 6px; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars { background: transparent; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars::before { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars::after { transform: translateY(-6px) rotate(-45deg); }

@media (max-width: 900px) {
	.nav-toggle { display: block; }
	.site-header__bar { flex-wrap: wrap; gap: 12px; }
	.site-nav { display: none; flex-basis: 100%; flex-direction: column; align-items: stretch; padding: 8px 0 16px; }
	.site-nav.is-open { display: flex; }
	.site-nav__main { flex-direction: column; }
	.site-nav__main a { padding: 12px; border-radius: var(--r-sm); }
	.site-nav__user { flex-wrap: wrap; border-top: 1px solid var(--line); padding-top: 12px; }
}
@media (max-width: 782px) { .admin-bar .site-header { top: 46px; } }
@media (max-width: 600px) { .admin-bar .site-header { top: 0; position: relative; } }

/* Footer */
.site-footer {
	background-color: var(--ocean);
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='56' height='56' viewBox='0 0 56 56'%3E%3Cg fill='none' stroke='%23EAF1F0' stroke-opacity='.07' stroke-width='1.2'%3E%3Cpath d='M28 6l6 16 16 6-16 6-6 16-6-16-16-6 16-6z'/%3E%3Crect x='19' y='19' width='18' height='18' transform='rotate(45 28 28)'/%3E%3C/g%3E%3C/svg%3E");
	color: var(--ocean-ink);
	padding-top: 56px;
}
.site-footer a { color: var(--ocean-ink); }
.site-footer a:hover { color: #F4B39E; }
.site-footer__grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.4fr; gap: 32px; padding-bottom: 40px; }
.site-footer__about p, .site-footer__rules p { color: #C9D8D7; max-width: 34ch; margin-top: 14px; }
.site-logo--light { color: var(--ocean-ink); }
.site-logo--light .site-logo__word span { color: #F4B39E; }
.site-footer h2 { font-size: .8rem; letter-spacing: .12em; text-transform: uppercase; font-family: var(--font-body); font-weight: 600; color: #C9D8D7; margin-bottom: 14px; }
.site-footer__col a { display: block; text-decoration: none; padding: 4px 0; font-weight: 600; }
.site-footer__base { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding-block: 18px; border-top: 1px solid #EAF1F01F; font-size: .85rem; color: #C9D8D7; }
@media (max-width: 860px) { .site-footer__grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .site-footer__grid { grid-template-columns: 1fr; } }

.page-prose { max-width: 70ch; }
