/* Shared safeguards for desktop, tablet and phone. */
:root { --header-height: 92px; }
html { scroll-padding-top: calc(var(--header-height) + 20px); }
body { min-width: 280px; }
.container { max-width: 1264px; }
.products > *, .approach-grid > *, .faq-grid > *, .details-grid > * { min-width: 0; }
.hero-phone, .header-phone, .contact-phone, .mobile-call strong { font-variant-numeric: tabular-nums; }
.text-button { min-height: 44px; }
.dialog-close { width: 44px; height: 44px; display: grid; place-items: center; padding: 0; }
dialog { max-height: calc(100vh - 40px); max-height: calc(100dvh - 40px); overflow-y: auto; overscroll-behavior: contain; }
.contact-phone { max-width: 100%; }

/* PC: wide composition and three full catalog columns. */
@media (min-width: 1025px) {
  .mobile-nav, .menu-toggle, .mobile-call { display: none; }
  .hero-content { padding-top: clamp(60px, 5vw, 90px); }
  .hero h1 { font-size: clamp(58px, 5vw, 76px); }
  .hero-description { max-width: 475px; }
  .hero-image { left: 30%; background-position: center; }
  .product-visual { height: clamp(250px, 22vw, 310px); }
  .product-info p { font-size: 14px; }
  .product-info { display: flex; flex-direction: column; }
  .product-info .text-button { align-self: flex-start; }
  .details-grid p, .steps p { font-size: 14px; }
  .faq-list summary { font-size: 15px; }
  .faq-list details p { font-size: 14px; }
}
@media (min-width: 1600px) {
  .hero { min-height: 760px; }
  .hero-image { background-position: center 54%; }
}
@media (min-width: 1025px) and (max-width: 1199px) {
  .container { width: calc(100% - 64px); }
  .header-inner { gap: 20px; }
  .desktop-nav { gap: 20px; font-size: 12px; }
  .header-phone { font-size: 14px; }
  .phone-icon { display: none; }
  .brand { font-size: 19px; }
  .approach-grid { gap: 60px; }
  .hero-caption { right: 32px; max-width: 220px; }
}

/* Tablet: spacious horizontal catalog rows and a compact menu. */
@media (max-width: 1024px) {
  :root { --header-height: 77px; }
  .container { width: calc(100% - 48px); }
  .header-inner { height: 76px; gap: 20px; }
  .desktop-nav { display: none; }
  .header-phone { margin-left: auto; font-size: 16px; }
  .phone-icon { display: none; }
  .menu-toggle { display: flex; flex: 0 0 44px; width: 44px; height: 44px; padding: 10px; flex-direction: column; justify-content: center; gap: 7px; background: transparent; }
  .menu-toggle span { width: 24px; height: 2px; background: var(--ink); transition: transform .2s; }
  .menu-toggle[aria-expanded="true"] span:first-child { transform: translateY(4.5px) rotate(45deg); }
  .menu-toggle[aria-expanded="true"] span:last-child { transform: translateY(-4.5px) rotate(-45deg); }
  .mobile-nav { position: absolute; top: 100%; left: 0; right: 0; display: flex; flex-direction: column; gap: 0; padding: 12px 24px 20px; background: var(--paper); border-bottom: 1px solid var(--line); box-shadow: 0 12px 20px #18221815; max-height: calc(100dvh - var(--header-height)); overflow-y: auto; }
  .mobile-nav a { display: flex; align-items: center; min-height: 52px; font-size: 16px; border-bottom: 1px solid var(--line); }
  .mobile-nav a:last-child { border-bottom: 0; font-weight: 600; }
  h1 { font-size: clamp(52px, 7vw, 68px); letter-spacing: -2.8px; }
  h2 { font-size: clamp(32px, 4.3vw, 44px); }
  .hero-image { left: 16%; }
  .hero-description { font-size: 16px; max-width: 440px; }
  .hero-caption { display: none; }
  .hero-content { padding-top: 56px; padding-bottom: 125px; }
  .hero-bottom { gap: 32px; font-size: 12px; }
  .section { padding-top: 76px; padding-bottom: 76px; }
  .section-heading { gap: 35px; }
  .section-heading p { font-size: 14px; max-width: 280px; }
  .section-heading p br { display: none; }
  .products { grid-template-columns: 1fr; gap: 28px; }
  .product { display: grid; grid-template-columns: 1.1fr 1fr; gap: 32px; align-items: center; }
  .product-visual { height: 265px; }
  .product-info { padding: 0; }
  .product-info h3 { font-size: 26px; }
  .product-info p { font-size: 15px; min-height: 0; }
  .text-button { font-size: 14px; }
  .gates { gap: 24px; }
  .gates h3 { font-size: 21px; }
  .gates p { font-size: 14px; }
  .approach-grid { gap: 48px; }
  .approach-title h2 { font-size: 38px; }
  .approach-title > p, .steps p { font-size: 14px; }
  .steps article { gap: 18px; }
  .steps h3 { font-size: 21px; }
  .details-grid { gap: 28px; }
  .details-grid h3 { font-size: 20px; }
  .details-grid p { font-size: 14px; }
  .faq-grid { grid-template-columns: 1fr; gap: 24px; }
  .faq-list summary { font-size: 16px; min-height: 64px; }
  .faq-list details p { font-size: 15px; max-width: 700px; }
  .faq-grid > div > p { font-size: 15px; }
  .contact > div > p { font-size: 15px; }
  .contact-phone { font-size: clamp(36px, 6vw, 62px); gap: 28px; }
  .contact-phone svg { width: 36px; flex-shrink: 0; }
  .contact-bottom { font-size: 12px; }
}

/* Phone: text and photo are separate; every section is one column. */
@media (max-width: 767px) {
  :root { --header-height: 69px; }
  .container { width: calc(100% - 40px); }
  .header-inner { height: 68px; width: calc(100% - 32px); gap: 8px; }
  .brand { font-size: 15px; gap: 8px; letter-spacing: .7px; }
  .brand svg { width: 25px; height: 32px; flex-shrink: 0; }
  .brand-sub { font-size: 6.5px; letter-spacing: 1.2px; margin-top: 5px; }
  .header-phone { font-size: 12px; display: inline-flex; align-items: center; min-height: 44px; }
  .mobile-nav { padding-left: 20px; padding-right: 20px; }
  .hero { min-height: 0; display: flex; flex-direction: column; }
  .hero-content { order: 1; padding-top: 36px; padding-bottom: 32px; }
  .hero .eyebrow { font-size: 9px; letter-spacing: 1.2px; max-width: 340px; line-height: 1.8; margin-bottom: 22px; }
  .hero h1 { font-size: clamp(36px, 10.6vw, 56px); letter-spacing: -1.8px; line-height: 1.08; margin-bottom: 23px; }
  .hero-description { font-size: 15px; max-width: 450px; line-height: 1.7; margin-bottom: 23px; }
  .desktop-only { display: none; }
  .hero .button { min-height: 54px; font-size: 14px; gap: 28px; }
  .hero-phone { display: inline-flex; align-items: center; min-height: 44px; font-size: 15px; margin-top: 8px; }
  .hero-image { order: 2; position: relative; inset: auto; width: 100%; height: clamp(230px, 64vw, 380px); background-image: linear-gradient(0deg,#25302725,transparent 50%),url('assets/fence-hero.webp'); background-position: center 60%; }
  .hero-bottom { order: 3; position: relative; inset: auto; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 15px; padding: 22px 0; border-top: 0; font-size: 11px; line-height: 1.6; }
  .hero-bottom i { display: block; margin: 0 0 5px; font-size: 10px; }
  .section { padding-top: 56px; padding-bottom: 56px; }
  .eyebrow { font-size: 9px; letter-spacing: 1.4px; margin-bottom: 18px; }
  h2 { font-size: clamp(29px, 7.8vw, 40px); letter-spacing: -1.2px; }
  .section-heading { display: block; margin-bottom: 28px; }
  .section-heading h2 { margin-bottom: 19px; }
  .section-heading p { font-size: 15px; max-width: 470px; }
  .products { gap: 34px; }
  .product { display: block; }
  .product-visual { height: clamp(240px, 68vw, 330px); }
  .product-index { font-size: 10px; left: 22px; top: 22px; letter-spacing: 1.3px; }
  .product-info { padding-top: 20px; }
  .product-info h3 { font-size: 25px; margin-bottom: 10px; }
  .product-info p { font-size: 15px; max-width: 500px; margin-bottom: 10px; }
  .text-button { font-size: 14px; padding-top: 8px; }
  .round-arrow { width: 38px; height: 38px; bottom: 18px; right: 18px; font-size: 23px; }
  .gates { display: grid; grid-template-columns: minmax(0,1fr) 46px; gap: 18px; margin-top: 32px; padding: 27px 0; }
  .gate-art { display: none; }
  .gates .eyebrow { font-size: 9px; line-height: 1.7; }
  .gates h3 { font-size: 22px; line-height: 1.3; }
  .gates p { font-size: 14px; }
  .illustration-note { font-size: 11px; }
  .approach { padding: 56px 0; }
  .approach-grid { grid-template-columns: 1fr; gap: 32px; }
  .approach-title h2 { font-size: clamp(32px,8.4vw,42px); }
  .approach-title > p, .steps p { font-size: 15px; }
  .approach-title > p br { display: none; }
  .line-fence { display: none; }
  .outline { font-size: 14px; min-height: 54px; }
  .steps article { gap: 20px; padding: 24px 0; }
  .steps article:first-child { border-top: 1px solid #59614f; padding-top: 24px; }
  .steps h3 { font-size: 22px; }
  .steps p { max-width: none; }
  .details-heading { margin-bottom: 30px; }
  .details-grid { grid-template-columns: 1fr; gap: 26px; }
  .details-grid article { display: grid; grid-template-columns: 34px minmax(0,1fr); column-gap: 18px; }
  .detail-icon { grid-row: 1/3; font-size: 30px; margin: 0; }
  .details-grid h3 { font-size: 21px; margin-bottom: 10px; }
  .details-grid p { font-size: 15px; }
  .faq-grid { gap: 20px; }
  .faq-list summary { font-size: 15px; padding: 21px 0; gap: 20px; }
  .faq-list details p { font-size: 14px; padding-right: 15px; }
  .contact { padding: 37px 0 28px; }
  .contact-top .eyebrow { font-size: 9px; max-width: 230px; }
  .contact-mark { font-size: 40px; }
  .contact h2 { font-size: clamp(32px,8.8vw,46px); margin-top: 25px; letter-spacing: -1.5px; }
  .contact > div > p { font-size: 15px; }
  .contact-phone { font-size: clamp(22px, 6.6vw, 43px); letter-spacing: -.9px; gap: 12px; white-space: nowrap; min-height: 48px; }
  .contact-phone svg { width: 24px; }
  .contact-bottom { gap: 18px; font-size: 11px; margin-top: 28px; line-height: 1.8; }
  .contact-bottom span { max-width: 220px; }
  .contact-bottom a { display: flex; align-items: center; min-height: 44px; white-space: nowrap; }
  .footer { flex-wrap: wrap; min-height: 0; gap: 16px; padding-top: 25px; padding-bottom: calc(116px + env(safe-area-inset-bottom, 0px)); }
  .footer-brand { font-size: 14px; gap: 8px; }
  .footer-brand span { font-size: 10px; }
  .footer p { order: 3; width: 100%; font-size: 12px; }
  .footer > a:last-child { margin-left: auto; min-height: 44px; display: flex; align-items: center; font-size: 12px; }
  .mobile-call { display: flex; position: fixed; z-index: 15; left: 12px; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom, 0px)); align-items: center; justify-content: space-between; min-height: 62px; padding: 13px 16px; gap: 12px; background: var(--ink); border: 1px solid #6e7a62; border-radius: 6px; box-shadow: 0 5px 20px #0003; color: white; }
  .mobile-call span { font-size: 11px; max-width: 100px; line-height: 1.5; color: #d8dfd2; }
  .mobile-call strong { font-size: 14px; color: var(--lime); font-weight: 550; white-space: nowrap; }
  dialog { padding: 44px 24px 28px; width: calc(100% - 24px); max-height: calc(100dvh - 24px); }
  dialog h2 { font-size: 30px; }
  dialog > p, dialog ul { font-size: 15px; }
  dialog .button { width: 100%; font-size: 14px; gap: 12px; }
}
@media (max-width: 359px) {
  .header-phone { display: none; }
  .menu-toggle { margin-left: auto; }
  .container { width: calc(100% - 32px); }
  .hero .button { width: 100%; padding-left: 18px; padding-right: 18px; gap: 12px; }
  .contact-bottom { flex-direction: column; gap: 4px; }
  .contact-bottom span { max-width: none; }
  .mobile-call { padding-left: 12px; padding-right: 12px; gap: 8px; }
  .mobile-call span { font-size: 10px; max-width: 75px; }
  .mobile-call strong { font-size: 12px; }
}
@media (hover: none) {
  .button:hover, .product-visual:hover .fence { transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
