/*
Theme Name: Fineline Portal
Theme URI: https://finelinensw.com.au/
Author: Fineline NSW
Description: Lightweight custom theme for the Fineline customer and production portal.
Version: 0.2.0
Requires at least: 6.4
Requires PHP: 8.0
Text Domain: fineline-portal-theme
*/

:root {
  --fl-blue: #45a2da;
  --fl-blue-dark: #237db5;
  --fl-ink: #20242b;
  --fl-muted: #697386;
  --fl-border: #dfe5ec;
  --fl-footer: #97999d;
  --fl-card: #ffffff;
  --fl-canvas: #ffffff;
  --fl-content: 1180px;
  --fl-radius: 16px;
  --fl-shadow: 0 12px 34px rgba(23, 32, 51, 0.08);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--fl-ink);
  background: var(--fl-canvas);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 16px;
  line-height: 1.55;
}
img { max-width: 100%; height: auto; }
a { color: var(--fl-blue-dark); }
a:hover { color: var(--fl-blue); }

.fl-site-header {
  position: relative;
  z-index: 20;
  background: var(--fl-blue);
  color: #fff;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}
.fl-header-inner {
  width: min(calc(100% - 36px), var(--fl-content));
  min-height: 84px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
}
.fl-brand {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  text-decoration: none;
}
.fl-brand img {
  display: block;
  width: 78px;
  height: 78px;
  object-fit: contain;
}
.fl-nav-toggle {
  display: none;
  border: 2px solid rgba(255, 255, 255, 0.8);
  border-radius: 8px;
  padding: 8px 12px;
  color: #fff;
  background: transparent;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}
.fl-primary-nav ul {
  display: flex;
  align-items: center;
  gap: clamp(18px, 3vw, 42px);
  margin: 0;
  padding: 0;
  list-style: none;
}
.fl-primary-nav a {
  color: #fff;
  text-decoration: none;
  font-size: 18px;
  font-weight: 700;
  white-space: nowrap;
}
.fl-primary-nav a:hover,
.fl-primary-nav .current-menu-item > a,
.fl-primary-nav .current_page_item > a {
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 7px;
}

.fl-page-shell {
  position: relative;
  isolation: isolate;
  min-height: calc(100vh - 210px);
  overflow: hidden;
}
.fl-page-shell::before,
.fl-page-shell::after {
  content: "";
  position: absolute;
  z-index: -1;
  width: min(640px, 48vw);
  aspect-ratio: 1182 / 1013;
  background: url("assets/images/paint-splash.png") center / contain no-repeat;
  pointer-events: none;
  opacity: 0.94;
}
.fl-page-shell::before {
  left: min(-210px, -12vw);
  bottom: -120px;
  transform: rotate(4deg);
}
.fl-page-shell::after {
  right: min(-240px, -15vw);
  top: 250px;
  transform: scaleX(-1) rotate(-8deg);
}
.fl-main {
  width: min(calc(100% - 36px), var(--fl-content));
  margin: 0 auto;
  padding: 42px 0 96px;
}
.fl-page-heading {
  margin: 0 0 34px;
  max-width: 780px;
}
.fl-page-heading h1 {
  margin: 0 0 4px;
  font-size: clamp(2.2rem, 5vw, 3.6rem);
  line-height: 1.08;
  letter-spacing: -0.025em;
}
.fl-page-heading p {
  margin: 0;
  font-size: clamp(1rem, 2vw, 1.18rem);
  font-weight: 700;
}
.fl-content { position: relative; z-index: 2; }
.fl-content > :first-child { margin-top: 0; }
.fl-content > :last-child { margin-bottom: 0; }

.fl-site-footer {
  position: relative;
  z-index: 10;
  background: var(--fl-footer);
  color: #fff;
}
.fl-footer-inner {
  width: min(calc(100% - 36px), var(--fl-content));
  min-height: 110px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 24px 0;
}
.fl-footer-inner p { margin: 0; }
.fl-footer-inner a { color: #fff; }

/* WordPress and portal components */
body.admin-bar .fl-site-header { top: 0; }
.wp-block-button__link,
button,
input[type="submit"] {
  border-radius: 999px;
}
.flportal-wrap {
  --fl-blue: #45a2da;
  --fl-blue-dark: #237db5;
  max-width: none !important;
  margin: 0 !important;
  padding: 0 !important;
}
.flportal-hero { display: none; }
.flportal-legend { margin-top: 0 !important; }
.flportal-grid { position: relative; z-index: 3; }
.flportal-card {
  border-color: var(--fl-border) !important;
  border-radius: var(--fl-radius) !important;
  box-shadow: var(--fl-shadow) !important;
}
.flportal-card h2 { color: var(--fl-ink); }
.flportal-link:hover { color: var(--fl-blue-dark) !important; }
.flportal-button {
  background: var(--fl-blue) !important;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="search"],
input[type="url"],
textarea,
select {
  width: 100%;
  max-width: 680px;
  border: 1px solid #bcc6d2;
  border-radius: 8px;
  padding: 11px 12px;
  background: #fff;
  color: var(--fl-ink);
  font: inherit;
}
button,
input[type="submit"],
.flportal-button {
  border: 0;
  padding: 11px 18px;
  background: var(--fl-blue);
  color: #fff;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

@media (max-width: 760px) {
  .fl-header-inner { min-height: 72px; }
  .fl-brand img { width: 64px; height: 64px; }
  .fl-nav-toggle { display: inline-block; }
  .fl-primary-nav {
    display: none;
    position: absolute;
    top: 72px;
    left: 0;
    right: 0;
    padding: 16px 18px 22px;
    background: var(--fl-blue);
    border-top: 1px solid rgba(255,255,255,0.25);
  }
  .fl-primary-nav.is-open { display: block; }
  .fl-primary-nav ul { align-items: stretch; flex-direction: column; gap: 2px; }
  .fl-primary-nav a { display: block; padding: 10px 4px; }
  .fl-main { padding-top: 30px; padding-bottom: 70px; }
  .fl-page-shell::before { width: 520px; left: -300px; bottom: -70px; opacity: .5; }
  .fl-page-shell::after { display: none; }
  .fl-footer-inner { align-items: flex-start; flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
