/*
Theme Name: TamaRun
Theme URI: https://tamarun.cr/
Author: TamaRun
Description: Lightweight theme built to host hand-authored HTML pasted into Gutenberg Custom HTML blocks. Ships the TamaRun design system (tokens, components, and the plan/Cooper/hydration/technique interactions) so pasted markup needs no <script> and no inline styles. Includes a full-bleed "TamaRun Canvas" page template and block patterns for every section of the landing page.
Version: 1.1.1
Requires at least: 6.4
Tested up to: 6.7
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: tamarun
Tags: one-column, custom-colors, block-patterns, full-width-template, editor-style
*/

/* ------------------------------------------------------------
   This file holds only the WordPress-facing shell: the site
   header/footer chrome and the handful of rules that reconcile
   the design system with WordPress itself.

   The design system proper lives in assets/css/tamarun.css and is
   enqueued separately, so it can be reused outside WordPress.
   ------------------------------------------------------------ */

body {
  margin: 0;
  background: #fbf7f1;
  color: #5a4f46;
  font-family: "Hanken Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;
  line-height: 1.6;
}

/* --- Site chrome (used by page.php / single.php, not by Canvas) --- */

.site-shell {
  max-width: 1180px;
  margin-inline: auto;
  padding-inline: clamp(18px, 4vw, 30px);
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  padding-block: 20px;
  border-bottom: 1.5px solid #e7dac8;
}

.site-title {
  margin: 0;
  font-family: "Archivo", system-ui, sans-serif;
  font-weight: 900;
  font-size: 22px;
  line-height: 1;
  letter-spacing: -0.01em;
  text-transform: uppercase;
}

.site-title a {
  color: #2a2420;
  text-decoration: none;
}

.site-description {
  margin: 4px 0 0;
  font-size: 14px;
  color: #8a7c6e;
}

.site-nav ul {
  display: flex;
  gap: 20px;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 15px;
  font-weight: 600;
}

.site-nav a {
  color: #5a4f46;
  text-decoration: none;
}

.site-nav a:hover,
.site-nav .current-menu-item > a {
  color: #007696;
}

.site-main {
  padding-block: clamp(28px, 5vw, 48px);
}

.site-footer {
  margin-top: 40px;
  padding-block: 28px;
  border-top: 1.5px solid #e7dac8;
  font-size: 14px;
  color: #8a7c6e;
}

.entry-title {
  font-family: "Archivo", system-ui, sans-serif;
  font-weight: 900;
  font-size: clamp(30px, 5vw, 46px);
  line-height: 0.96;
  letter-spacing: -0.02em;
  text-transform: uppercase;
  color: #2a2420;
  margin: 0 0 20px;
}

/* Accessibility: skip link */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100000;
  padding: 12px 20px;
  background: #2a2420;
  color: #fff;
  font-weight: 700;
  text-decoration: none;
}

.skip-link:focus {
  left: 8px;
  top: 8px;
}

/* --- Canvas template: content runs edge to edge --- */

.tamarun-canvas {
  margin: 0;
  padding: 0;
  max-width: none;
  width: 100%;
  overflow-x: hidden;
}

/* Neutralise WordPress's default block alignment container inside Canvas,
   so a pasted TamaRun block genuinely spans the viewport. */
.tamarun-canvas > .alignfull,
.tamarun-canvas > .wp-block-html,
.tamarun-canvas > * {
  max-width: none;
  margin-inline: 0;
}

/* --- Reconciling the design system with WordPress --- */

/* The sticky landing nav must clear the admin bar for logged-in users. */
body.admin-bar .tr-nav {
  top: 32px;
}

@media screen and (max-width: 782px) {
  body.admin-bar .tr-nav {
    top: 46px;
  }
}

/* Inside the block editor the admin bar is not present in the canvas, and a
   sticky nav fights the editor's own scroll container. */
.block-editor-writing-flow .tr-nav {
  position: static;
}

/* WordPress core injects margins on block wrappers; the TamaRun sections
   handle their own rhythm, so strip them where our markup is in charge. */
.wp-block-html .tr,
.tr {
  margin-block: 0;
}
