/* Lato, self-hosted (SIL Open Font License 1.1, see fonts/OFL.txt) */
@font-face {
  font-family: 'Lato';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('fonts/lato-latin-400-normal.woff2') format('woff2');
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}
@font-face {
  font-family: 'Lato';
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url('fonts/lato-latin-400-italic.woff2') format('woff2');
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}
@font-face {
  font-family: 'Lato';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('fonts/lato-latin-700-normal.woff2') format('woff2');
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}
@font-face {
  font-family: 'Lato';
  font-style: normal;
  font-weight: 900;
  font-display: swap;
  src: url('fonts/lato-latin-900-normal.woff2') format('woff2');
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}

/* Responsive page styling for Hawaiian Shirt Consulting LLC */
:root {
  --accent: #94582f;        /* Darkened from #ac6b3d for WCAG AA 4.5:1+ contrast with white text */
  --accent-hover: #7b4623;
  --accent-dark: #20424a;
  --hero-bg: #0e181d;       /* Dark teal-black behind the subpixel / circuit art */
  --header-h: 4.5rem;
  --bg-color: #fafafa;
  --bg-alt: #f1f4f5;
  --text-color: #2c3237;
  --muted: #5a6065;
  --max-width: 68.75rem;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  height: 100%;
  /* Fluid scale for large displays: 16px up to ~FHD, then grows gently with the
     viewport (about 1.5x at 4K, 2x cap at 8K). Limited by height too, so ultrawide
     monitors don't oversize. Everything else is in rem, so layout scales with it. */
  font-size: clamp(100%, min(calc(50% + 0.4167vw), calc(50% + 0.7407vh)), 200%);
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}

/* Keep in-page anchors from hiding under the fixed header */
section[id], footer[id] {
  scroll-margin-top: calc(var(--header-h) + 0.75rem);
}

/* Skip link + visible keyboard focus */
.skip-link {
  position: absolute;
  left: 0.75rem;
  top: -3rem;
  z-index: 1000;
  background: var(--accent-dark);
  color: #ffffff;
  padding: 0.5rem 0.875rem;
  border-radius: 0.375rem;
  text-decoration: none;
  font-weight: 700;
}
.skip-link:focus { top: 0.75rem; }

a:focus-visible,
.btn:focus-visible {
  outline: 3px solid #e3a873;
  outline-offset: 3px;
}

body {
  margin: 0;
  min-height: 100%;
  color: var(--text-color);
  background: var(--bg-color);
  font-family: 'Lato', system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  line-height: 1.6;
}

/* Header & Navigation */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 999;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.site-header-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1.25rem;
  gap: 1rem;
}

.brand {
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
}

.brand-name {
  font-weight: 900;
  font-size: 1.05rem;
  color: var(--accent-dark);
}

.brand-sub {
  font-size: 0.75rem;
  color: var(--muted);
  margin-top: 1px;
}

.site-nav {
  display: flex;
  gap: 1.25rem;
  flex-wrap: wrap;
}

.site-nav a {
  text-decoration: none;
  color: var(--text-color);
  font-weight: 700;
  font-size: 0.92rem;
  transition: color 0.15s ease;
}

.site-nav a:hover,
.site-nav a:focus-visible {
  color: var(--accent);
}

/* Accessible Buttons (44px+ minimum touch target height) */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.75rem;
  padding: 0.625rem 1.5rem;
  border-radius: 0.375rem;
  text-decoration: none;
  font-weight: 700;
  font-size: 0.95rem;
  border: 1px solid transparent;
  transition: background-color 0.15s ease, border-color 0.15s ease, transform 0.1s ease;
}

.btn-primary {
  background: var(--accent);
  color: #ffffff;
}

.btn-primary:hover,
.btn-primary:focus {
  background: var(--accent-hover);
}

.btn-secondary {
  background: var(--accent-dark);
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.25);
}

.btn-secondary:hover,
.btn-secondary:focus {
  background: #163036;
}

.btn-outline-light {
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.5);
  color: #ffffff;
}

.btn-outline-light:hover,
.btn-outline-light:focus {
  background: rgba(255, 255, 255, 0.22);
}

.btn-outline {
  background: transparent;
  border: 1px solid var(--accent-dark);
  color: var(--accent-dark);
}

.btn-outline:hover,
.btn-outline:focus {
  background: var(--accent-dark);
  color: #ffffff;
}

/* Hero Section — layered SVG background (PenTile subpixels, circuits & equations, aloha-shirt placket) */
.hero {
  min-height: 88vh;
  min-height: 88svh;
  padding-top: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  background-color: var(--hero-bg);
}

.hero-bg {
  position: absolute;
  top: var(--header-h); /* artwork starts below the fixed header */
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 0;
  pointer-events: none;
  /* No-JS / pre-paint fallback: static PenTile tile */
  background: url('img/bg-pentile.svg') repeat 0 0 / 4.25rem 4.25rem;
}

#hero-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}

.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  color: #ffffff;
  padding: 6vh 1.25rem;
  max-width: 60rem;
  margin: auto;
  text-shadow: 0 1px 0.75rem rgba(14, 24, 29, 0.9);
}

.hero-content .btn,
.hero-content .badge {
  text-shadow: none;
}

.hero h1 {
  font-size: clamp(1.85rem, 4.2vw, 3.3rem);
  margin: 0 0 0.625rem;
  letter-spacing: 0.5px;
}

.hero-sub {
  font-size: clamp(1.1rem, 2.3vw, 1.4rem);
  opacity: 0.96;
  margin: 0 0 0.5rem;
  font-weight: 700;
}

.byline {
  font-size: 1.02rem;
  opacity: 0.92;
  margin: 0 0 1.375rem;
  color: #eaeaea;
}

.credential-badges {
  list-style: none;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.625rem;
  justify-content: center;
  margin-bottom: 1.75rem;
}

.badge {
  background: rgba(32, 66, 74, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.28);
  color: #ffffff;
  padding: 0.375rem 0.875rem;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 700;
}

.hero-ctas {
  display: flex;
  gap: 0.875rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* Main Content Sections */
.page-main {
  margin-top: 0;
}

.content-section {
  padding: 3.75rem 1.25rem;
  background: var(--bg-color);
}

.section-alt {
  background: var(--bg-alt);
}

.container {
  max-width: var(--max-width);
  margin: 0 auto;
}

.content-section h2 {
  font-size: 1.6rem;
  margin-top: 0;
  margin-bottom: 1rem;
  color: var(--accent-dark);
}

.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
  gap: 1.25rem;
  margin-top: 1.25rem;
  margin-bottom: 1.5rem;
}

.card {
  background: #ffffff;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-top: 4px solid var(--accent-dark);
  border-radius: 0.5rem;
  padding: 1.25rem;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.03);
}

.card h3 {
  margin-top: 0;
  margin-bottom: 0.5rem;
  font-size: 1.1rem;
  color: var(--accent-dark);
}

.card p {
  margin: 0;
  font-size: 0.95rem;
}

.engagement-box {
  background: #ffffff;
  border-left: 4px solid var(--accent);
  padding: 1rem 1.25rem;
  border-radius: 0.25rem;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
}

.engagement-box p {
  margin: 0;
}

.highlight-list {
  padding-left: 1.25rem;
}

.highlight-list li {
  margin-bottom: 0.75rem;
}

.content-section p a:not(.btn),
.highlight-list a {
  color: var(--accent-dark);
  font-weight: 700;
}

.patent-search-link {
  margin-top: 1.5rem;
}

.attribution-note {
  margin: 1.25rem auto 0;
  text-align: center;
  font-size: 0.85rem;
  color: var(--muted);
}

/* Footer */
.site-footer {
  background: var(--accent-dark);
  color: #ffffff;
  padding: 2.25rem 1.25rem;
}

.footer-top {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1.25rem;
  max-width: var(--max-width);
  margin: 0 auto;
}

.footer-brand {
  font-size: 1.02rem;
}

.footer-contact {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
}

.footer-contact a {
  color: #ffffff;
  text-decoration: underline;
}

.site-footer hr {
  border: 0;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  margin: 1.375rem 0;
}

.footer-bottom {
  text-align: center;
  opacity: 0.9;
}

/* Call / Text buttons only where the device can place calls (phones, tablets) */
@media (hover: hover) and (pointer: fine) {
  .touch-only { display: none; }
}

@media (max-width: 640px) {
  :root { --header-h: 6.25rem; }
  .site-header-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.375rem;
    padding: 0.625rem 1rem;
  }
  .site-nav {
    gap: 0.75rem;
    flex-wrap: nowrap;
    overflow-x: auto;
    max-width: 100%;
    scrollbar-width: none;
  }
  .site-nav a {
    font-size: 0.82rem;
    white-space: nowrap;
  }
}

/* Very narrow phones (e.g. 360px): keep all five menu links on one line */
@media (max-width: 400px) {
  .site-nav { gap: 0.55rem; }
  .site-nav a { font-size: 0.76rem; }
}

@media (max-width: 340px) {
  .site-nav { gap: 0.4rem; }
  .site-nav a { font-size: 0.7rem; }
}
