/*
Theme Name: Northern Shore
Theme URI: https://northernshore.tech
Author: Northern Shore Technology
Description: Custom theme for Northern Shore Technology. AI consulting, systems integration, web design, commerce and hosting. Pine forests meet terminal screens.
Version: 1.0.0
Requires at least: 6.0
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: northern-shore
*/

:root {
  --night: #0b1512;
  --pine-900: #0f1f1a;
  --pine-800: #142a23;
  --pine-700: #1d3a30;
  --pine-500: #2f5d4c;
  --moss: #7fae7a;
  --lake: #5fc3d6;
  --lake-deep: #1f6f86;
  --ember: #f2a94b;
  --birch: #ece6d6;
  --fog: #a9b8b0;
  --line: rgba(127, 174, 122, 0.18);
  --card: rgba(20, 42, 35, 0.72);
  --radius: 14px;
  --max: 1180px;
  --font-head: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --font-body: "Inter Tight", "Helvetica Neue", Arial, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, Menlo, monospace;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--night);
  color: var(--birch);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
img, svg { max-width: 100%; display: block; }
a { color: var(--lake); text-decoration: none; }
a:hover { color: var(--ember); }
h1, h2, h3, h4 { font-family: var(--font-head); line-height: 1.1; margin: 0 0 .5em; letter-spacing: -0.01em; }
p { margin: 0 0 1em; }
.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 24px; }
.mono { font-family: var(--font-mono); }
.screen-reader-text { position: absolute !important; clip: rect(1px,1px,1px,1px); width: 1px; height: 1px; overflow: hidden; }

/* ---------- Topo + grid textures ---------- */
.topo-bg {
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='600' height='600' viewBox='0 0 600 600'%3E%3Cg fill='none' stroke='%237fae7a' stroke-opacity='.09' stroke-width='1.2'%3E%3Cpath d='M-20 120c80-60 160 40 240-10s150-90 230-20 120 60 170 20'/%3E%3Cpath d='M-20 170c90-50 150 50 240 0s160-80 240-10 110 50 160 20'/%3E%3Cpath d='M-20 220c100-40 140 60 240 10s170-70 250 0 100 40 150 20'/%3E%3Cpath d='M-20 330c70 30 160-50 250 0s140 80 230 30 130-60 160-20'/%3E%3Cpath d='M-20 380c80 30 150-40 250 10s150 70 230 30 120-50 160-10'/%3E%3Cpath d='M-20 430c90 30 140-30 250 20s160 60 230 30 110-40 160 0'/%3E%3Cellipse cx='300' cy='520' rx='120' ry='40'/%3E%3Cellipse cx='300' cy='520' rx='80' ry='24'/%3E%3Cellipse cx='300' cy='520' rx='40' ry='10'/%3E%3C/g%3E%3C/svg%3E");
  background-size: 600px 600px;
}

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(11, 21, 18, 0.82);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; height: 72px; }
.brand { display: flex; align-items: center; gap: 12px; color: var(--birch); }
.brand:hover { color: var(--birch); }
.brand svg { width: 38px; height: 38px; }
.brand-name { font-family: var(--font-head); font-weight: 800; font-size: 18px; letter-spacing: .04em; text-transform: uppercase; line-height: 1; }
.brand-name small { display: block; font-family: var(--font-mono); font-weight: 400; font-size: 10.5px; letter-spacing: .28em; color: var(--moss); margin-top: 4px; }

.main-nav ul { list-style: none; display: flex; gap: 30px; margin: 0; padding: 0; align-items: center; }
.main-nav a { color: var(--fog); font-size: 15px; font-weight: 500; }
.main-nav a:hover, .main-nav .current-menu-item a { color: var(--birch); }
.nav-toggle { display: none; background: none; border: 1px solid var(--line); color: var(--birch); border-radius: 8px; padding: 8px 12px; font-family: var(--font-mono); font-size: 13px; cursor: pointer; }

.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 14px 24px; border-radius: 999px;
  font-weight: 600; font-size: 15px; border: 1px solid transparent;
  transition: transform .15s ease, background .15s ease, color .15s ease;
  cursor: pointer;
}
.btn:hover { transform: translateY(-1px); }
.btn-ember { background: var(--ember); color: #1b1307; }
.btn-ember:hover { background: #ffbe66; color: #1b1307; }
.btn-ghost { border-color: rgba(236, 230, 214, .28); color: var(--birch); }
.btn-ghost:hover { border-color: var(--lake); color: var(--lake); }
.main-nav .btn { padding: 10px 18px; color: #1b1307; }

/* ---------- Hero ---------- */
.hero { position: relative; overflow: hidden; min-height: 760px; display: flex; align-items: center; }
.hero-scene { position: absolute; inset: 0; z-index: 0; }
.hero-scene svg { width: 100%; height: 100%; }
.hero::after {
  content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background: linear-gradient(90deg, rgba(11,21,18,.88) 0%, rgba(11,21,18,.55) 48%, rgba(11,21,18,.05) 100%);
}
.hero .wrap { position: relative; z-index: 2; display: grid; grid-template-columns: 1.15fr .85fr; gap: 56px; align-items: center; padding-top: 70px; padding-bottom: 110px; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--font-mono); font-size: 12.5px; letter-spacing: .22em; text-transform: uppercase;
  color: var(--moss); margin-bottom: 22px;
}
.eyebrow::before { content: ""; width: 28px; height: 1px; background: var(--moss); }
.hero h1 { font-size: clamp(44px, 6.2vw, 80px); font-weight: 800; margin-bottom: 24px; }
.hero h1 em { font-style: normal; color: var(--lake); }
.hero h1 .ember { color: var(--ember); }
.hero-lede { font-size: 20px; color: #cfd8d2; max-width: 560px; margin-bottom: 34px; }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }
.hero-coords { margin-top: 44px; display: flex; gap: 28px; flex-wrap: wrap; font-family: var(--font-mono); font-size: 12px; color: var(--fog); letter-spacing: .08em; }
.hero-coords span b { color: var(--birch); font-weight: 500; }

.terminal {
  background: rgba(8, 16, 13, 0.86);
  border: 1px solid rgba(95, 195, 214, .28);
  border-radius: var(--radius);
  box-shadow: 0 30px 80px rgba(0,0,0,.5), 0 0 0 1px rgba(0,0,0,.4) inset;
  font-family: var(--font-mono); font-size: 13.5px;
  overflow: hidden;
}
.terminal-bar { display: flex; align-items: center; gap: 7px; padding: 12px 16px; border-bottom: 1px solid rgba(95,195,214,.16); }
.terminal-bar i { width: 11px; height: 11px; border-radius: 50%; background: #2c3b35; display: inline-block; }
.terminal-bar i:nth-child(1) { background: #e0735a; }
.terminal-bar i:nth-child(2) { background: var(--ember); }
.terminal-bar i:nth-child(3) { background: var(--moss); }
.terminal-bar span { margin-left: 10px; color: var(--fog); font-size: 12px; }
.terminal-body { padding: 20px 22px 24px; line-height: 1.9; min-height: 300px; }
.terminal-body .p { color: var(--moss); }
.terminal-body .c { color: var(--fog); }
.terminal-body .ok { color: var(--lake); }
.terminal-body .w { color: var(--ember); }
.cursor { display: inline-block; width: 8px; height: 16px; background: var(--lake); vertical-align: -3px; animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }

/* ---------- Sections ---------- */
section { position: relative; }
.section { padding: 120px 0; }
.section-head { max-width: 720px; margin-bottom: 60px; }
.section-head h2 { font-size: clamp(34px, 4.2vw, 52px); font-weight: 800; }
.section-head p { color: var(--fog); font-size: 18px; }
.trail-marker { font-family: var(--font-mono); font-size: 12px; color: var(--ember); letter-spacing: .2em; text-transform: uppercase; margin-bottom: 14px; display: block; }

/* Services */
.services { background: var(--pine-900); }
.service-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 20px; }
.service {
  grid-column: span 2;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 34px 30px 30px;
  position: relative; overflow: hidden;
  transition: border-color .2s ease, transform .2s ease;
}
.service:hover { border-color: rgba(95,195,214,.45); transform: translateY(-3px); }
.service.wide { grid-column: span 3; }
.service-icon { width: 52px; height: 52px; border-radius: 12px; display: grid; place-items: center; background: rgba(95,195,214,.1); border: 1px solid rgba(95,195,214,.25); margin-bottom: 22px; }
.service-icon svg { width: 26px; height: 26px; stroke: var(--lake); }
.service h3 { font-size: 23px; font-weight: 700; }
.service p { color: var(--fog); font-size: 16px; }
.service ul { list-style: none; padding: 0; margin: 18px 0 0; font-family: var(--font-mono); font-size: 13px; color: var(--birch); }
.service li { padding: 7px 0; border-top: 1px dashed var(--line); }
.service li::before { content: "▸ "; color: var(--moss); }
.service .idx { position: absolute; top: 26px; right: 28px; font-family: var(--font-mono); font-size: 12px; color: var(--pine-500); }

/* Connect the dots */
.connect { background: var(--night); }
.connect-grid { display: grid; grid-template-columns: .9fr 1.1fr; gap: 70px; align-items: center; }
.connect-copy h2 { font-size: clamp(34px, 4vw, 50px); font-weight: 800; }
.connect-copy p { color: var(--fog); font-size: 18px; }
.check-list { list-style: none; padding: 0; margin: 28px 0 0; }
.check-list li { display: flex; gap: 14px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.check-list li b { color: var(--birch); font-weight: 600; }
.check-list li span { color: var(--fog); }
.check-list svg { flex: 0 0 22px; width: 22px; height: 22px; stroke: var(--moss); margin-top: 3px; }
.constellation { background: var(--pine-900); border: 1px solid var(--line); border-radius: 20px; padding: 18px; }
.constellation svg { width: 100%; height: auto; }
.constellation .flow { stroke-dasharray: 5 7; animation: flow 1.6s linear infinite; }
@keyframes flow { to { stroke-dashoffset: -24; } }

/* Process / trail */
.process { background: var(--pine-800); overflow: hidden; }
.trail { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; position: relative; }
.trail::before { content: ""; position: absolute; top: 27px; left: 4%; right: 4%; border-top: 2px dashed rgba(242,169,75,.4); }
.step { position: relative; }
.step-pin { width: 56px; height: 56px; border-radius: 50%; background: var(--night); border: 2px solid var(--ember); display: grid; place-items: center; font-family: var(--font-mono); color: var(--ember); font-weight: 600; margin-bottom: 24px; position: relative; z-index: 1; }
.step h3 { font-size: 21px; }
.step p { color: var(--fog); font-size: 15.5px; }
.step .elev { font-family: var(--font-mono); font-size: 11.5px; color: var(--moss); letter-spacing: .14em; text-transform: uppercase; display: block; margin-bottom: 6px; }

/* Stats band */
.stats { background: linear-gradient(180deg, var(--pine-800), var(--night)); padding: 0 0 110px; }
.stat-row { display: grid; grid-template-columns: repeat(4, 1fr); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.stat { padding: 34px 28px; border-right: 1px solid var(--line); background: rgba(11,21,18,.5); }
.stat:last-child { border-right: 0; }
.stat strong { display: block; font-family: var(--font-head); font-size: 42px; color: var(--lake); line-height: 1; margin-bottom: 10px; font-weight: 800; }
.stat span { color: var(--fog); font-size: 15px; }

/* Field notes (blog) */
.notes { background: var(--night); }
.notes-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.note-card { background: var(--pine-900); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; display: flex; flex-direction: column; }
.note-card .meta { font-family: var(--font-mono); font-size: 12px; color: var(--moss); margin-bottom: 14px; }
.note-card h3 { font-size: 21px; }
.note-card h3 a { color: var(--birch); }
.note-card h3 a:hover { color: var(--lake); }
.note-card p { color: var(--fog); font-size: 15.5px; flex: 1; }

/* Contact */
.contact { background: var(--pine-900); }
.contact-grid { display: grid; grid-template-columns: .9fr 1.1fr; gap: 60px; }
.contact-copy h2 { font-size: clamp(34px, 4vw, 52px); font-weight: 800; }
.contact-copy p { color: var(--fog); font-size: 18px; }
.contact-details { margin-top: 30px; font-family: var(--font-mono); font-size: 14px; }
.contact-details div { padding: 12px 0; border-top: 1px solid var(--line); display: flex; gap: 16px; }
.contact-details div span { color: var(--moss); min-width: 90px; }
.ns-form { background: var(--night); border: 1px solid var(--line); border-radius: 18px; padding: 34px; }
.ns-form .row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.ns-form label { display: block; font-family: var(--font-mono); font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--fog); margin: 0 0 8px; }
.ns-form .field { margin-bottom: 18px; }
.ns-form input, .ns-form select, .ns-form textarea {
  width: 100%; padding: 13px 15px; border-radius: 10px;
  background: var(--pine-900); border: 1px solid rgba(127,174,122,.25); color: var(--birch);
  font: inherit; font-size: 16px;
}
.ns-form input:focus, .ns-form select:focus, .ns-form textarea:focus { outline: none; border-color: var(--lake); box-shadow: 0 0 0 3px rgba(95,195,214,.15); }
.ns-form textarea { min-height: 130px; resize: vertical; }
.ns-form .hp { position: absolute; left: -9999px; }
.form-note { padding: 14px 18px; border-radius: 10px; margin-bottom: 20px; font-size: 15px; }
.form-note.ok { background: rgba(127,174,122,.14); border: 1px solid var(--moss); }
.form-note.err { background: rgba(224,115,90,.12); border: 1px solid #e0735a; }

/* Footer */
.site-footer { background: #070e0c; border-top: 1px solid var(--line); padding: 0 0 36px; }
.footer-ridge { display: block; width: 100%; height: 90px; margin-bottom: 50px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 40px; margin-bottom: 50px; }
.footer-grid h4 { font-family: var(--font-mono); font-size: 12px; letter-spacing: .2em; text-transform: uppercase; color: var(--moss); margin-bottom: 16px; }
.footer-grid ul { list-style: none; padding: 0; margin: 0; }
.footer-grid li { padding: 5px 0; }
.footer-grid a { color: var(--fog); font-size: 15px; }
.footer-grid a:hover { color: var(--birch); }
.footer-grid p { color: var(--fog); font-size: 15px; max-width: 320px; }
.footer-bottom { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; padding-top: 26px; border-top: 1px solid var(--line); font-family: var(--font-mono); font-size: 12px; color: var(--pine-500); }
.status-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--moss); margin-right: 8px; box-shadow: 0 0 0 4px rgba(127,174,122,.2); }

/* Generic pages / posts */
.page-hero { padding: 110px 0 60px; border-bottom: 1px solid var(--line); background: var(--pine-900); }
.page-hero h1 { font-size: clamp(38px, 5vw, 60px); font-weight: 800; }
.entry { padding: 70px 0 110px; }
.entry-content { max-width: 760px; }
.entry-content h2 { font-size: 32px; margin-top: 1.6em; }
.entry-content h3 { font-size: 24px; margin-top: 1.4em; }
.entry-content blockquote { border-left: 3px solid var(--ember); margin: 1.5em 0; padding: .3em 0 .3em 1.2em; color: var(--fog); }
.entry-content code, .entry-content pre { font-family: var(--font-mono); background: var(--pine-900); border-radius: 6px; }
.entry-content code { padding: 2px 6px; }
.entry-content pre { padding: 18px; overflow-x: auto; border: 1px solid var(--line); }
.entry-content img { border-radius: var(--radius); height: auto; }
.post-list { display: grid; gap: 22px; max-width: 860px; }
.pagination { margin-top: 40px; font-family: var(--font-mono); }
.pagination .page-numbers { padding: 6px 12px; border: 1px solid var(--line); border-radius: 6px; margin-right: 6px; }

/* Reveal on scroll */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s ease, transform .7s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .cursor, .constellation .flow { animation: none; }
}

/* ---------- Responsive ---------- */
@media (max-width: 1000px) {
  .hero .wrap, .connect-grid, .contact-grid { grid-template-columns: 1fr; }
  .hero .wrap { padding-bottom: 120px; }
  .service, .service.wide { grid-column: span 3; }
  .trail { grid-template-columns: 1fr 1fr; row-gap: 40px; }
  .trail::before { display: none; }
  .stat-row { grid-template-columns: 1fr 1fr; }
  .stat:nth-child(2) { border-right: 0; }
  .stat:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .notes-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 760px) {
  body { font-size: 16px; }
  .section { padding: 84px 0; }
  .wrap { padding: 0 16px; }
  .nav-toggle { display: block; }
  .main-nav { display: none; position: absolute; top: 72px; left: 0; right: 0; background: var(--night); border-bottom: 1px solid var(--line); padding: 20px 16px; }
  .main-nav.open { display: block; }
  .main-nav ul { flex-direction: column; align-items: flex-start; gap: 18px; }
  .service, .service.wide { grid-column: span 6; }
  .trail { grid-template-columns: 1fr; }
  .ns-form .row { grid-template-columns: 1fr; }
  .ns-form { padding: 24px; }
  .hero { min-height: 0; }
  .hero::after { background: linear-gradient(180deg, rgba(11,21,18,.75), rgba(11,21,18,.9)); }
  .terminal-body { min-height: 0; font-size: 12.5px; }
}
