/* PFI public website — "Coastal Light" design (chosen Oct 2026).
   Pages: web/portal/*.html. The employee portal (web/portal/portal/) has its own styles. */
:root {
  --sand: #FBF7F0;        /* page */
  --sand-2: #F2EADC;      /* alternate band */
  --line: #E7DECF;
  --card: #FFFFFF;
  --ink: #13213A;         /* text, footer */
  --ink-2: #2D3748;
  --muted: #4A5568;
  --blue: #1B3C9E;        /* PFI blue (logo) */
  --blue-dark: #122A70;
  --sun: #F2A51F;         /* PFI orange (logo) */
  --sun-text: #B86E00;    /* orange that passes on sand */
  --sun-light: #FFD27A;
  --night: #0D1830;
  --radius: 16px;
  --font: "Archivo", "Segoe UI", Roboto, Arial, sans-serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body { margin: 0; background: var(--sand); color: var(--ink); font-family: var(--font); font-size: 17px; line-height: 1.6; }
img { max-width: 100%; display: block; }
a { color: var(--blue); }
a:hover { color: var(--blue-dark); }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; }
.wrap { max-width: 1280px; margin: 0 auto; padding: 0 40px; }
@media (max-width: 720px) { .wrap { padding: 0 16px; } }
.skip { position: absolute; left: -999px; top: 8px; background: #fff; padding: 8px 12px; z-index: 50; }
.skip:focus { left: 8px; }

/* Header */
.site-header { background: #FFFFFF; border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; }
.site-header .wrap { display: flex; align-items: center; gap: 24px; min-height: 84px; }
.logo img { height: 60px; width: auto; }
.nav-toggle { display: none; margin-left: auto; background: none; border: 1px solid var(--line); border-radius: 10px; width: 48px; height: 48px; cursor: pointer; }
.nav-toggle svg { width: 24px; height: 24px; }
.site-nav { display: flex; align-items: center; gap: 28px; margin-left: auto; font-weight: 600; }
.site-nav a { color: var(--ink); text-decoration: none; }
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--blue); }
.site-nav details { position: relative; }
.site-nav summary { cursor: pointer; list-style: none; }
.site-nav summary::-webkit-details-marker { display: none; }
.site-nav summary::after { content: " ▾"; font-size: .8em; }
.site-nav details ul { position: absolute; top: 36px; left: -16px; margin: 0; padding: 10px 0; list-style: none; background: var(--card); border: 1px solid var(--line); border-radius: 12px; min-width: 240px; box-shadow: 0 12px 30px rgba(19,33,58,.12); }
.site-nav details li a { display: block; padding: 10px 18px; }
.login-link { font-size: 15px; color: var(--muted) !important; font-weight: 500; }
.btn { display: inline-block; background: var(--sun); color: var(--ink); font-weight: 800; padding: 12px 22px; border-radius: 999px; text-decoration: none; border: 0; font-family: inherit; font-size: 16px; cursor: pointer; }
.btn:hover { background: #E4950C; color: var(--ink); }
.btn-lg { font-size: 17px; padding: 16px 28px; }
.btn-ghost { background: rgba(255,255,255,.14); color: #fff; border: 1px solid rgba(255,255,255,.55); }
.btn-ghost:hover { background: rgba(255,255,255,.26); color: #fff; }
@media (max-width: 960px) {
  .nav-toggle { display: inline-flex; align-items: center; justify-content: center; }
  .site-nav { display: none; position: absolute; left: 0; right: 0; top: 84px; flex-direction: column; align-items: stretch; gap: 0; background: #FFFFFF; border-bottom: 1px solid var(--line); padding: 8px 16px 20px; margin: 0; }
  .site-nav.open { display: flex; }
  .site-nav > a, .site-nav summary { padding: 14px 4px; border-bottom: 1px solid var(--line); }
  .site-nav details ul { position: static; box-shadow: none; border: 0; padding: 0 0 8px 12px; background: none; }
  .site-nav .btn { margin-top: 16px; text-align: center; }
}

/* Hero */
.hero { position: relative; min-height: 640px; display: flex; align-items: flex-end; background: #2b4a7a; color: #fff; }
.hero > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(10,22,45,.62) 0%, rgba(10,22,45,.30) 55%, rgba(10,22,45,0) 85%), linear-gradient(180deg, rgba(10,22,45,0) 30%, rgba(10,22,45,.70) 100%); }
.hero h1, .hero p { text-shadow: 0 2px 14px rgba(10,22,45,.45); }
.hero .wrap { position: relative; z-index: 1; width: 100%; padding-top: 120px; padding-bottom: 64px; }
.hero h1 { margin: 0; font-size: clamp(44px, 6vw, 76px); line-height: 1; font-weight: 850; font-stretch: 112%; max-width: 900px; }
.hero p { margin: 20px 0 32px; font-size: 20px; color: #F3F1EC; max-width: 640px; }
.hero .actions { display: flex; flex-wrap: wrap; gap: 16px; }
.eyebrow { margin: 0 0 12px; color: var(--sun-text); font-weight: 800; letter-spacing: .08em; text-transform: uppercase; font-size: 14px; }
.hero .eyebrow { color: var(--sun-light); }
.page-hero { position: relative; min-height: 380px; }
.page-hero .wrap { padding-top: 96px; padding-bottom: 48px; }

/* Bands and sections */
.cred { background: var(--blue); color: #fff; }
.cred .wrap { display: flex; flex-wrap: wrap; gap: 12px 40px; justify-content: space-between; padding-top: 22px; padding-bottom: 22px; font-weight: 700; }
section { scroll-margin-top: 96px; }
.section { padding: 88px 0; }
.section-alt { background: var(--sand-2); }
h2 { margin: 8px 0 32px; font-size: clamp(32px, 4vw, 44px); line-height: 1.1; font-weight: 800; font-stretch: 108%; }
h3 { line-height: 1.25; }
.lead { font-size: 19px; color: var(--ink-2); max-width: 760px; }
.head-row { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 16px; margin-bottom: 32px; }
.head-row h2 { margin-bottom: 0; }
.head-row a { margin-left: auto; font-weight: 700; }

/* Cards */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 28px; }
.card { display: block; text-decoration: none; color: var(--ink); background: var(--card); border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); transition: transform .15s, box-shadow .15s; }
.card:hover { color: var(--ink); transform: translateY(-3px); box-shadow: 0 14px 30px rgba(19,33,58,.10); }
@media (prefers-reduced-motion: reduce) { .card, .card:hover { transition: none; transform: none; } }
.card img { width: 100%; height: 220px; object-fit: cover; }
.card div { padding: 20px 22px 24px; }
.card h3 { margin: 0 0 6px; font-size: 22px; }
.card p { margin: 0; color: var(--muted); }

/* Split */
.split { display: flex; flex-wrap: wrap; gap: 48px; align-items: center; }
.split > * { flex: 1 1 420px; min-width: 0; }
.split > img { height: 440px; object-fit: cover; border-radius: 20px; }
.cols3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 20px; margin-top: 28px; }
.cols3 h3 { margin: 0 0 8px; font-size: 17px; color: var(--blue); }
.cols3 ul { margin: 0; padding: 0; list-style: none; color: var(--muted); font-size: 15px; line-height: 1.8; }

/* Projects and galleries */
.projects { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 24px; }
.projects figure { margin: 0; }
.projects img { width: 100%; height: 300px; object-fit: cover; border-radius: var(--radius); }
.projects figcaption { margin-top: 12px; font-weight: 700; }
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.gallery figure { margin: 0; }
.gallery button { padding: 0; border: 0; background: none; cursor: zoom-in; display: block; width: 100%; border-radius: 12px; overflow: hidden; }
.gallery img { width: 100%; height: 220px; object-fit: cover; transition: transform .2s; }
.gallery button:hover img { transform: scale(1.03); }
@media (prefers-reduced-motion: reduce) { .gallery img { transition: none; } .gallery button:hover img { transform: none; } }
.gallery figcaption { margin-top: 8px; font-size: 15px; font-weight: 600; color: var(--ink-2); min-height: 1em; }
dialog.lightbox { border: 0; padding: 0; background: transparent; max-width: 94vw; max-height: 92vh; }
dialog.lightbox::backdrop { background: rgba(10,18,36,.86); }
dialog.lightbox img { max-width: 94vw; max-height: 84vh; object-fit: contain; border-radius: 8px; }
dialog.lightbox p { color: #fff; margin: 10px 0 0; font-weight: 600; }
dialog.lightbox button { position: fixed; top: 16px; right: 16px; width: 48px; height: 48px; border-radius: 999px; border: 0; background: #fff; color: var(--ink); font-size: 26px; cursor: pointer; }

/* Partners */
.partners { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 28px; color: var(--ink-2); line-height: 1.9; }
.partners h3 { margin: 0 0 6px; font-size: 15px; color: var(--sun-text); text-transform: uppercase; letter-spacing: .06em; }

/* Contact */
.contact { background: var(--ink); color: #fff; }
.contact .wrap { display: flex; flex-wrap: wrap; gap: 48px; }
.contact .wrap > * { flex: 1 1 400px; min-width: 0; }
.contact h2 { font-size: clamp(34px, 4vw, 44px); font-weight: 850; font-stretch: 110%; margin-top: 0; }
.contact p { color: #D6DCE8; }
.contact a { color: var(--sun-light); }
.contact form { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; }
.contact label { display: flex; flex-direction: column; gap: 6px; font-size: 14px; font-weight: 600; }
.contact .full { grid-column: 1 / -1; }
.contact input, .contact textarea { height: 48px; border-radius: 10px; border: 1px solid #3A4A66; background: #1C2D4D; color: #fff; padding: 0 14px; font: inherit; }
.contact textarea { height: auto; padding: 12px 14px; }
.contact .note { font-size: 14px; color: #B9C3D6; margin: 0; }

/* Footer */
.site-footer { background: var(--night); color: #B9C3D6; padding: 40px 0; font-size: 15px; }
.site-footer .wrap { display: flex; flex-wrap: wrap; gap: 24px 48px; align-items: flex-start; }
.site-footer a { color: #DCE3EE; text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.site-footer ul { margin: 0; padding: 0; list-style: none; line-height: 2; }
.site-footer .login { color: var(--sun-light); font-weight: 700; }
.site-footer .copy { flex-basis: 100%; border-top: 1px solid #22304D; padding-top: 20px; font-size: 14px; }

/* Recent projects slide show: 3 cards on desktop, 2 on tablet, 1 on phone */
.carousel { position: relative; }
.carousel-viewport { overflow: hidden; }
.carousel-track { display: flex; gap: 24px; margin: 0; padding: 0; list-style: none; transition: transform .6s ease; }
.carousel-slide { flex: 0 0 calc((100% - 48px) / 3); }
.carousel-slide figure { margin: 0; }
.carousel-slide img { width: 100%; height: 300px; object-fit: cover; border-radius: var(--radius); }
.carousel-slide figcaption { margin-top: 12px; font-weight: 700; }
.carousel-controls { display: flex; gap: 12px; justify-content: flex-end; margin-top: 20px; }
.carousel-controls button { width: 48px; height: 48px; border-radius: 999px; border: 1px solid var(--line); background: var(--card); color: var(--ink); font-size: 26px; line-height: 1; cursor: pointer; }
.carousel-controls button:hover { background: var(--sun); border-color: var(--sun); }
@media (max-width: 960px) { .carousel-slide { flex-basis: calc((100% - 24px) / 2); } }
@media (max-width: 620px) { .carousel-slide { flex-basis: 100%; } }
@media (prefers-reduced-motion: reduce) { .carousel-track { transition: none; } }

/* Service area map */
.map svg { width: 100%; height: auto; display: block; border-radius: 20px; }
.m-sea { fill: #DCEBF2; }
.m-other { fill: #EFE7D8; stroke: #D6CBB6; stroke-width: 1; }
.m-served { fill: #F2A51F; fill-opacity: .85; stroke: #FFFFFF; stroke-width: 2; }
.m-label { font: 700 17px var(--font); fill: var(--ink); }
.m-hq { fill: var(--blue); stroke: #fff; stroke-width: 3; }
.m-hq-label { font: 800 16px var(--font); fill: var(--blue); }

/* Check lists, fact cards and the past-work table */
.checks { list-style: none; margin: 0 0 28px; padding: 0; }
.checks li { position: relative; padding: 8px 0 8px 34px; border-bottom: 1px solid var(--line); color: var(--ink-2); }
.checks li::before { content: ""; position: absolute; left: 4px; top: 15px; width: 16px; height: 9px; border-left: 3px solid var(--sun); border-bottom: 3px solid var(--sun); transform: rotate(-45deg); }
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 20px; }
.facts > div { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 24px; }
.facts h3 { margin: 0 0 8px; font-size: 16px; color: var(--blue); }
.facts p { margin: 0; color: var(--ink-2); }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); }
table.past { width: 100%; border-collapse: collapse; min-width: 640px; }
table.past th, table.past td { text-align: left; padding: 14px 18px; border-bottom: 1px solid var(--line); vertical-align: top; }
table.past th { font-size: 14px; text-transform: uppercase; letter-spacing: .05em; color: var(--sun-text); }
table.past tr:last-child td { border-bottom: 0; }
table.past td:first-child { font-weight: 700; }

/* Numbers band */
.stats { background: var(--card); border-bottom: 1px solid var(--line); }
.stats .wrap { padding-top: 40px; padding-bottom: 28px; }
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 24px; text-align: center; }
.stat-num { margin: 0; font-size: clamp(40px, 5vw, 56px); line-height: 1; font-weight: 850; font-stretch: 110%; color: var(--blue); font-variant-numeric: tabular-nums; }
.stat-label { margin: 8px 0 0; font-weight: 600; color: var(--ink-2); }
.stat-note { margin: 22px 0 0; text-align: center; font-size: 13px; color: var(--muted); }
