/* AFA Fencing concept. Colours and shapes come from their logo:
   black badge, white letters, yellow F, and the lean of the badge. */

@font-face { font-family: "Archivo"; font-style: normal; font-weight: 100 900; font-stretch: 62% 125%; font-display: swap;
  src: url(/fonts/archivo-latin.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: "Archivo"; font-style: normal; font-weight: 100 900; font-stretch: 62% 125%; font-display: swap;
  src: url(/fonts/archivo-latin-ext.woff2) format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Archivo"; font-style: italic; font-weight: 100 900; font-stretch: 62% 125%; font-display: swap;
  src: url(/fonts/archivo-italic-latin.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: "Archivo"; font-style: italic; font-weight: 100 900; font-stretch: 62% 125%; font-display: swap;
  src: url(/fonts/archivo-italic-latin-ext.woff2) format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }

:root {
  --black: #000000;
  --yellow: #fec200;      /* the F in the logo */
  --white: #ffffff;
  --galv: #e8ebeb;        /* galvanised gate steel, for quiet surfaces */
  --steel: #4d5558;       /* secondary text */
  --timber: #d0a566;      /* treated pine, used in the fence drawing only */
  --lean: 12%;            /* how far the badge leans */
  --wrap: 1180px;
  --gutter: clamp(18px, 4vw, 40px);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--white); color: var(--black);
  font-family: "Archivo", "Arial Narrow", Arial, sans-serif; font-size: 1.0625rem; line-height: 1.6; }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration-thickness: 2px; text-underline-offset: 3px; }
a:hover { text-decoration-color: var(--yellow); }
:focus-visible { outline: 3px solid var(--black); outline-offset: 3px; box-shadow: 0 0 0 6px var(--yellow); }
p { margin: 0 0 1em; max-width: 66ch; }
ul { margin: 0; padding: 0; list-style: none; }

h1, h2, h3 { margin: 0; font-weight: 900; line-height: 1.02; letter-spacing: -0.01em; }
h1, h2 { font-style: italic; font-stretch: 114%; text-wrap: balance; }
h1 { font-size: clamp(2.35rem, 6.2vw, 4.5rem); }
h2 { font-size: clamp(1.7rem, 3.6vw, 2.7rem); margin-bottom: 0.55em; }
h3 { font-size: 1.3rem; font-weight: 800; font-stretch: 106%; line-height: 1.15; margin-bottom: 0.4em; }

.wrap { width: 100%; max-width: calc(var(--wrap) + var(--gutter) * 2); margin-inline: auto; padding-inline: var(--gutter); }
.skip { position: absolute; left: -999px; top: 0; background: var(--yellow); padding: 10px 16px; font-weight: 800; z-index: 20; }
.skip:focus { left: 8px; top: 8px; }

/* Buttons lean the same way the badge does */
.button { display: inline-block; padding: 0.85em 1.7em; font-weight: 800; font-size: 1rem; line-height: 1.2; text-decoration: none; text-align: center;
  clip-path: polygon(14px 0, 100% 0, calc(100% - 14px) 100%, 0 100%); border: 0; cursor: pointer; font-family: inherit; }
.button-yellow { background: var(--yellow); color: var(--black); }
.button-black { background: var(--black); color: var(--white); }
.button-white { background: var(--white); color: var(--black); }
.button-outline { background: var(--black); color: var(--white); position: relative; }
.callband .button-outline { background: var(--white); color: var(--black); }
.button:hover { filter: brightness(0.93); }
.button-black:hover { background: #2a2a2a; filter: none; }

/* Header */
.site-header { background: var(--white); border-bottom: 5px solid var(--black); position: relative; z-index: 10; }
.header-row { display: flex; align-items: center; gap: 28px; min-height: 84px; }
.logo img { width: 124px; }
.site-nav { display: flex; align-items: center; gap: 26px; margin-left: auto; }
.site-nav ul { display: flex; gap: 24px; }
.site-nav a:not(.button) { font-weight: 700; text-decoration: none; padding: 6px 0; border-bottom: 4px solid transparent; }
.site-nav a:not(.button):hover { border-bottom-color: var(--galv); }
.site-nav a[aria-current="page"] { border-bottom-color: var(--yellow); }
.header-phone { font-weight: 900; font-style: italic; font-stretch: 112%; font-size: 1.2rem; text-decoration: none; white-space: nowrap; line-height: 1.1; }
.header-phone span { display: block; font-size: 0.78rem; font-weight: 600; font-style: normal; font-stretch: 100%; color: var(--steel); }
.menu-button { display: none; margin-left: auto; font: inherit; font-weight: 800; background: var(--black); color: var(--white); border: 0; padding: 10px 18px; cursor: pointer; }

/* Home hero */
.hero { padding: clamp(28px, 5vw, 64px) 0 clamp(36px, 6vw, 80px); overflow: hidden; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr); gap: clamp(24px, 4vw, 56px); align-items: center; }
.hero h1 { margin-bottom: 0.38em; }
.lede { font-size: clamp(1.1rem, 1.6vw, 1.3rem); line-height: 1.5; max-width: 54ch; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 1.4em; }
.hero-note { margin-top: 1.1em; color: var(--steel); font-size: 0.98rem; }
.lean-photo { position: relative; padding-left: 18px; }
.lean-photo::before { content: ""; position: absolute; inset: 0 18px 0 0; background: var(--yellow);
  clip-path: polygon(var(--lean) 0, 100% 0, 100% 100%, 0 100%); }
.lean-photo img { position: relative; width: 100%; object-fit: cover; clip-path: polygon(var(--lean) 0, 100% 0, 100% 100%, 0 100%); }
.hero .lean-photo img { aspect-ratio: 4 / 5; object-position: 50% 60%; }

/* Inner page heads */
.page-head { padding: clamp(28px, 4.5vw, 56px) 0 clamp(32px, 5vw, 64px); overflow: hidden; }
.page-head .hero-grid { grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); }
.page-head h1 { font-size: clamp(2.1rem, 5vw, 3.6rem); margin-bottom: 0.4em; }
.page-head .lean-photo img { aspect-ratio: 4 / 3; }

/* Sections */
.section { padding: clamp(44px, 7vw, 92px) 0; }
.section-grey { background: var(--galv); }
.section-black { background: var(--black); color: var(--white); }
.section-black a:hover { text-decoration-color: var(--yellow); }
.section-intro { max-width: 62ch; margin-bottom: clamp(24px, 3vw, 40px); }

/* The fence drawing */
.spec-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: clamp(24px, 4vw, 48px); align-items: center; }
@media (min-width: 1180px) { .spec-grid { grid-template-columns: minmax(0, 0.72fr) minmax(0, 1.28fr); } }
.spec-text { max-width: 560px; }
.spec-list li { display: grid; grid-template-columns: 9.5ch 1fr; gap: 14px; padding: 11px 0; border-bottom: 1px solid rgba(255, 255, 255, 0.28); }
.spec-list li:first-child { border-top: 1px solid rgba(255, 255, 255, 0.28); }
.spec-list b { font-weight: 900; font-style: italic; font-stretch: 112%; color: var(--yellow); }
.fence-scroll { overflow-x: auto; }
.fence-drawing { display: block; width: 100%; min-width: 600px; max-width: 980px; height: auto; }
.fence-drawing text { font-family: "Archivo", Arial, sans-serif; font-size: 19px; font-weight: 700; fill: var(--white); }
.spec-more { margin-top: 1.4em; }

/* What we do */
.services { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(22px, 3vw, 40px) clamp(18px, 2.4vw, 32px); }
.service a { text-decoration: none; display: block; }
.service img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; margin-bottom: 14px; }
.service h3 { text-decoration: underline; text-decoration-color: var(--yellow); text-decoration-thickness: 4px; text-underline-offset: 5px; }
.service a:hover h3 { text-decoration-color: var(--black); }
.service p { margin: 0; color: var(--steel); }

/* Text beside a photo */
.split { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(24px, 4vw, 60px); align-items: center; }
.split + .split { margin-top: clamp(40px, 6vw, 84px); }
.split.flip > :first-child { order: 2; }
.split img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.split .tall img { aspect-ratio: 4 / 5; }

.ticks { margin: 0.4em 0 1.2em; }
.ticks li { position: relative; padding: 5px 0 5px 30px; max-width: 60ch; }
.ticks li::before { content: ""; position: absolute; left: 0; top: 0.72em; width: 16px; height: 11px; background: var(--yellow);
  clip-path: polygon(30% 0, 100% 0, 70% 100%, 0 100%); }
.section-grey .ticks li::before { background: var(--black); }
.cols-2 { columns: 2; column-gap: 32px; }
.cols-2 li { break-inside: avoid; }

.photo-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(12px, 2vw, 24px); margin-top: clamp(24px, 3vw, 40px); }
.photo-row.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.photo-row figure, .job figure { margin: 0; }
.photo-row img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
figcaption { font-size: 0.93rem; color: var(--steel); padding-top: 8px; }
.section-black figcaption { color: #c9cdce; }

/* Recent work */
.jobs { display: grid; gap: clamp(44px, 6vw, 84px); }
.job { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: clamp(22px, 3.5vw, 52px); align-items: start; }
.job-photos { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.job-photos img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.job-photos .wide { grid-column: 1 / -1; }
.job-photos .wide img { aspect-ratio: 16 / 10; }
.job-where { font-weight: 700; color: var(--steel); margin-bottom: 0.5em; }

.home-jobs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(18px, 2.4vw, 32px); }
.home-jobs img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; margin-bottom: 12px; }
.home-jobs p { margin: 0; color: var(--steel); }
.more-link { margin-top: clamp(22px, 3vw, 36px); font-weight: 800; }

/* Where we work */
.areas { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(24px, 4vw, 60px); }
.note { border-left: 8px solid var(--yellow); padding: 4px 0 4px 20px; }
.note h3 { margin-bottom: 0.3em; }
.note p:last-child { margin-bottom: 0; }

/* Contact */
.contact-grid { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: clamp(28px, 5vw, 72px); align-items: start; }
.big-phone { font-size: clamp(2rem, 5vw, 3.2rem); font-weight: 900; font-style: italic; font-stretch: 114%; line-height: 1; text-decoration: none; display: inline-block; margin-bottom: 0.25em; }
.contact-list li { padding: 12px 0; border-bottom: 1px solid #c9cdce; }
.contact-list span { display: block; font-size: 0.9rem; color: var(--steel); font-weight: 600; }
.quote-form { background: var(--galv); padding: clamp(20px, 3.5vw, 40px); }
.quote-form label { display: block; font-weight: 700; margin-bottom: 6px; }
.quote-form .field { margin-bottom: 18px; }
.quote-form input, .quote-form select, .quote-form textarea { width: 100%; font: inherit; padding: 12px 14px; border: 2px solid var(--black); background: var(--white); color: var(--black); border-radius: 0; }
.quote-form textarea { min-height: 150px; resize: vertical; }
.field-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-hint { font-size: 0.92rem; color: var(--steel); font-weight: 400; }
.form-result { margin-top: 16px; padding: 14px 16px; background: var(--white); border-left: 8px solid var(--yellow); font-weight: 600; }
.form-result[hidden] { display: none; }

/* Call band and footer */
.callband { background: var(--yellow); padding: clamp(28px, 4vw, 48px) 0; }
.callband-row { display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.callband-line { font-size: clamp(1.25rem, 2.6vw, 1.9rem); font-weight: 900; font-style: italic; font-stretch: 112%; line-height: 1.12; margin: 0; max-width: 24ch; text-wrap: balance; }
.callband-actions { display: flex; gap: 12px; flex-wrap: wrap; }

.site-footer { background: var(--black); color: var(--white); padding: clamp(40px, 6vw, 72px) 0 28px; font-size: 0.98rem; }
.footer-grid { display: grid; grid-template-columns: 1.1fr 1fr 1fr; gap: clamp(28px, 4vw, 60px); }
.footer-logo { width: 150px; margin-bottom: 18px; }
.site-footer h2 { font-size: 1.1rem; font-style: normal; font-stretch: 106%; font-weight: 800; color: var(--yellow); margin-bottom: 0.7em; }
.site-footer li { padding: 4px 0; }
.site-footer p { color: #d6d9da; max-width: 40ch; }
.site-footer ul + p { margin-top: 14px; }
.footer-base { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-top: clamp(28px, 4vw, 48px); padding-top: 20px; border-top: 1px solid #3a3a3a; font-size: 0.9rem; }
.footer-base p { margin: 0; color: #b4b9ba; max-width: none; }
.footer-base span + span { margin-left: 18px; }

.mobile-call { display: none; }

/* Concept notes */
.notes { max-width: 820px; }
.notes h2 { margin-top: 1.6em; }
.notes table { border-collapse: collapse; width: 100%; margin: 0.6em 0 1.4em; font-size: 0.98rem; }
.notes th, .notes td { text-align: left; vertical-align: top; padding: 10px 12px; border-bottom: 1px solid #c9cdce; }
.notes th { background: var(--galv); }
.notes ol { padding-left: 1.3em; }
.notes ol li { padding: 4px 0; max-width: 66ch; }

@media (max-width: 1020px) {
  .header-row { min-height: 68px; gap: 14px; }
  .logo img { width: 98px; }
  .menu-button { display: block; }
  .header-phone { display: none; }
  .site-nav { display: none; position: absolute; left: 0; right: 0; top: 100%; background: var(--white); border-bottom: 5px solid var(--black);
    flex-direction: column; align-items: stretch; gap: 0; padding: 8px var(--gutter) 22px; margin: 0; }
  .site-nav.open { display: flex; }
  .site-nav ul { flex-direction: column; gap: 0; }
  .site-nav a:not(.button) { display: block; padding: 14px 0; border-bottom: 1px solid var(--galv); font-size: 1.1rem; }
  .site-nav a[aria-current="page"] { border-bottom: 4px solid var(--yellow); }
}

@media (max-width: 860px) {
  .hero-grid, .page-head .hero-grid, .split, .areas, .contact-grid, .job { grid-template-columns: minmax(0, 1fr); }
  .split.flip > :first-child { order: 0; }
  .hero .lean-photo img { aspect-ratio: 4 / 3.4; }
  .services, .home-jobs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-grid { grid-template-columns: 1fr; }
  .cols-2 { columns: 1; }
  .mobile-call { display: block; position: fixed; left: 0; right: 0; bottom: 0; z-index: 15; background: var(--yellow); color: var(--black);
    text-align: center; font-weight: 900; font-style: italic; font-stretch: 110%; font-size: 1.08rem; padding: 14px 12px; text-decoration: none; border-top: 4px solid var(--black); }
  body { padding-bottom: 58px; }
  .callband-actions .button-black { display: none; }
}

@media (max-width: 560px) {
  .services, .home-jobs, .photo-row, .photo-row.two { grid-template-columns: minmax(0, 1fr); }
  .field-pair { grid-template-columns: 1fr; }
  .button { padding: 0.85em 1.3em; }
  .actions .button { flex: 1 1 100%; }
}

@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
@media print { .mobile-call, .menu-button, .callband { display: none; } }

.split p + h3, .split ul + h3 { margin-top: 1.5em; }

@media (max-width: 700px) {
  .fence-drawing { min-width: 0; margin-top: -14%; }
  .fence-labels { display: none; }
}

.contact-grid h1, .notes h1 { margin-bottom: 0.4em; }

/* Quote button and drop-down form in the header */
.header-row { position: relative; }
.header-quote { white-space: nowrap; }
.header-quote .short { display: none; }
.header-quote[aria-expanded="true"] { background: var(--black); color: var(--white); }
.quote-panel { position: absolute; top: calc(100% + 5px); right: var(--gutter); width: min(400px, calc(100vw - var(--gutter) * 2)); z-index: 12;
  background: var(--white); border: 5px solid var(--black); border-top: 10px solid var(--yellow); max-height: calc(100vh - 110px); overflow-y: auto; }
.quote-panel[hidden] { display: none; }
.quote-form-mini { background: var(--white); padding: 20px 22px 22px; }
.quote-form-mini .field { margin-bottom: 14px; }
.quote-form-mini input, .quote-form-mini select, .quote-form-mini textarea { padding: 10px 12px; }
.quote-form-mini textarea { min-height: 0; }
.quote-form-mini .button { width: 100%; }
.quote-panel-head { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; margin-bottom: 14px; }
.quote-panel-head h2 { font-size: 1.5rem; margin: 0; }
.quote-close { font: inherit; font-weight: 700; background: none; border: 0; padding: 4px 0; cursor: pointer; text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 3px; }
.quote-panel-call { margin: 16px 0 0; font-size: 0.98rem; }
.quote-panel-call a { font-weight: 800; white-space: nowrap; }
.quote-form-mini .form-result { background: var(--galv); }

@media (max-width: 1239px) { .header-phone { display: none; } }
@media (max-width: 1020px) {
  .header-quote { order: 2; margin-left: auto; padding: 0.7em 1.2em; }
  .menu-button { order: 3; margin-left: 0; }
  .header-quote .long { display: none; }
  .header-quote .short { display: inline; }
  .quote-panel { left: var(--gutter); right: var(--gutter); width: auto; max-height: calc(100vh - 150px); }
}
