/* ==========================================================================
   SUMROCA — corporate website stylesheet
   Mobile-first. Breakpoints: 640px, 1024px, 1440px.
   ========================================================================== */

:root {
  --sumroca-navy:   #0A1F44;
  --sumroca-blue:   #2E7BC7;
  --sumroca-sky:    #5BB4E8;
  --sumroca-silver: #B8B8B8;
  --white:          #FFFFFF;
  --off-white:      #FAFAFA;
  --gray-100:       #F5F5F5;
  --gray-300:       #D0D0D0;
  --gray-600:       #666666;
  --gray-900:       #1A1A1A;
  --black:          #000000;
  --font-stack: "Inter", "Helvetica Neue", Arial, sans-serif;
  --transition: 200ms ease-out;
}

/* ---------- Reset / base ---------- */

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 104px;
}

body {
  font-family: var(--font-stack);
  font-size: 16px;
  line-height: 1.65;
  font-weight: 400;
  color: var(--sumroca-navy);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: var(--sumroca-navy);
  text-decoration: none;
  transition: color var(--transition);
}

a:hover {
  color: var(--sumroca-blue);
}

:focus-visible {
  outline: 2px solid var(--sumroca-blue);
  outline-offset: 2px;
}

/* ---------- Skip link ---------- */

.skip-link {
  position: absolute;
  top: -100px;
  left: 16px;
  z-index: 300;
  padding: 12px 20px;
  background: var(--sumroca-navy);
  color: var(--white);
  font-size: 14px;
  font-weight: 600;
  border-radius: 0 0 4px 4px;
  transition: top var(--transition);
}

.skip-link:focus {
  top: 0;
  color: var(--white);
}

/* ---------- Layout ---------- */

.container {
  max-width: 1280px;
  margin: 0 auto;
  padding-left: 20px;
  padding-right: 20px;
}

.section {
  padding-top: 56px;
  padding-bottom: 56px;
}

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

.grid {
  display: grid;
  gap: 24px;
  margin-top: 48px;
}

@media (min-width: 640px) {
  .container { padding-left: 32px; padding-right: 32px; }
  .section { padding-top: 80px; padding-bottom: 80px; }
  .grid { gap: 32px; }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 1024px) {
  .container { padding-left: 48px; padding-right: 48px; }
  .section { padding-top: 120px; padding-bottom: 120px; }
  .grid { gap: 48px; }
  .grid-3 { grid-template-columns: repeat(3, 1fr); }
  .grid-2 { grid-template-columns: repeat(2, 1fr); }
}

/* ---------- Typography ---------- */

.section-number {
  font-size: clamp(48px, 6vw, 72px);
  font-weight: 300;
  line-height: 1;
  color: var(--gray-300);
}

.section-title {
  font-size: clamp(36px, 5vw, 64px);
  font-weight: 300;
  line-height: 1.15;
  margin-top: 8px;
  margin-bottom: 32px;
}

.section-body {
  max-width: 760px;
}

h3 {
  font-size: 22px;
  font-weight: 600;
  margin-bottom: 12px;
}

.sub-number {
  font-size: clamp(32px, 4vw, 48px);
  font-weight: 300;
  line-height: 1;
  color: var(--gray-300);
  margin-bottom: 16px;
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-block;
  padding: 14px 36px;
  min-height: 48px;
  font-family: var(--font-stack);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--sumroca-navy);
  background: transparent;
  border: 1px solid var(--sumroca-navy);
  border-radius: 2px;
  cursor: pointer;
  transition: background-color var(--transition), color var(--transition);
}

.btn:hover,
.btn:focus-visible {
  background: var(--sumroca-navy);
  color: var(--white);
}

.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--sumroca-navy);
  color: var(--white);
  border-color: var(--sumroca-navy);
}

.btn-primary:hover,
.btn-primary:focus-visible {
  background: var(--sumroca-blue);
  border-color: var(--sumroca-blue);
  color: var(--white);
}

/* ---------- Header ---------- */

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 200;
  background: transparent;
  transition: background-color var(--transition), box-shadow var(--transition);
}

.header-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 14px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

@media (min-width: 640px) {
  .header-inner { padding-left: 32px; padding-right: 32px; }
}

@media (min-width: 1024px) {
  .header-inner { padding-left: 48px; padding-right: 48px; }
}

.brand {
  display: inline-flex;
  align-items: center;
}

.brand-logo {
  height: 64px;
  width: auto;
  /* rendered white while the header sits over the dark hero */
  filter: brightness(0) invert(1);
  transition: filter var(--transition);
}

.header-controls {
  display: flex;
  align-items: center;
  gap: 20px;
}

.lang-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
}

.lang-btn {
  padding: 8px 4px;
  font-family: var(--font-stack);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.1em;
  color: rgba(255, 255, 255, 0.7);
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  transition: color var(--transition), border-color var(--transition);
}

.lang-btn:hover {
  color: var(--white);
}

.lang-btn.active {
  color: var(--white);
  border-bottom-color: var(--white);
}

.lang-sep {
  color: rgba(255, 255, 255, 0.4);
  font-size: 14px;
}

.menu-toggle {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  width: 44px;
  height: 44px;
  padding: 10px;
  background: none;
  border: none;
  cursor: pointer;
}

.menu-bar {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--white);
  transition: transform var(--transition), opacity var(--transition), background-color var(--transition);
}

/* Scrolled state: solid white bar */

.site-header.scrolled {
  background: var(--white);
  box-shadow: 0 2px 8px rgba(10, 31, 68, 0.06);
}

.site-header.scrolled .brand-logo {
  filter: none;
}

.site-header.scrolled .lang-btn {
  color: var(--gray-600);
}

.site-header.scrolled .lang-btn:hover {
  color: var(--sumroca-navy);
}

.site-header.scrolled .lang-btn.active {
  color: var(--sumroca-navy);
  border-bottom-color: var(--sumroca-navy);
}

.site-header.scrolled .lang-sep {
  color: var(--gray-300);
}

.site-header.scrolled .menu-bar {
  background: var(--sumroca-navy);
}

/* Menu open state: white controls over navy overlay */

.site-header.menu-open {
  background: transparent;
  box-shadow: none;
}

.site-header.menu-open .brand-logo {
  filter: brightness(0) invert(1);
}

.site-header.menu-open .lang-btn { color: rgba(255, 255, 255, 0.7); }
.site-header.menu-open .lang-btn:hover { color: var(--white); }
.site-header.menu-open .lang-btn.active { color: var(--white); border-bottom-color: var(--white); }
.site-header.menu-open .lang-sep { color: rgba(255, 255, 255, 0.4); }

.site-header.menu-open .menu-bar {
  background: var(--white);
}

.site-header.menu-open .menu-bar:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}

.site-header.menu-open .menu-bar:nth-child(2) {
  opacity: 0;
}

.site-header.menu-open .menu-bar:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}

/* ---------- Nav overlay ---------- */

.nav-overlay {
  position: fixed;
  inset: 0;
  z-index: -1;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--sumroca-navy);
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--transition), visibility var(--transition);
}

.site-header.menu-open .nav-overlay {
  opacity: 1;
  visibility: visible;
}

.nav-list {
  list-style: none;
  text-align: center;
}

.nav-list li {
  margin: 8px 0;
}

.nav-link {
  display: inline-block;
  padding: 8px 24px;
  font-size: clamp(32px, 6vw, 56px);
  font-weight: 300;
  letter-spacing: 0.04em;
  color: var(--white);
}

.nav-link:hover {
  color: var(--sumroca-sky);
}

/* ---------- Hero ---------- */

.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    linear-gradient(rgba(10, 31, 68, 0.75), rgba(10, 31, 68, 0.55)),
    url("../assets/photos/refinery-night-01.jpg") center / cover no-repeat;
}

.hero-content {
  text-align: center;
  padding: 120px 20px 80px;
}

.hero-title {
  font-size: clamp(56px, 10vw, 128px);
  font-weight: 300;
  letter-spacing: 0.04em;
  line-height: 1.05;
  color: var(--white);
}

.hero-tagline {
  margin-top: 24px;
  font-size: 20px;
  font-weight: 400;
  color: var(--white);
  opacity: 0.9;
}

.hero-subtagline {
  margin-top: 16px;
  font-size: 14px;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--white);
  opacity: 0.7;
}

.hero-scroll {
  position: absolute;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  color: var(--white);
  opacity: 0.8;
  animation: hero-bounce 2.2s ease-in-out infinite;
}

.hero-scroll:hover {
  color: var(--white);
  opacity: 1;
}

@keyframes hero-bounce {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50%      { transform: translateX(-50%) translateY(8px); }
}

/* ---------- Cards / sub-blocks ---------- */

.card {
  background: var(--white);
  border: 1px solid var(--gray-100);
  border-radius: 4px;
  padding: 32px;
  box-shadow: 0 2px 8px rgba(10, 31, 68, 0.06);
}

.service-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  background: var(--off-white);
  cursor: pointer;
  transition: background-color var(--transition), box-shadow var(--transition);
}

.service-card:hover,
.service-card:focus-visible {
  background: var(--white);
  box-shadow: 0 4px 16px rgba(10, 31, 68, 0.08);
}

.card-preview {
  flex-grow: 1;
}

.card-cta {
  align-self: flex-end;
  margin-top: 16px;
  font-size: 14px;
  font-weight: 500;
  color: var(--sumroca-blue);
  text-decoration: underline;
  text-decoration-color: transparent;
  text-underline-offset: 3px;
  transition: text-decoration-color var(--transition);
}

.service-card:hover .card-cta,
.service-card:focus-visible .card-cta {
  text-decoration-color: currentColor;
}

.client-card h3 {
  margin-bottom: 16px;
}

.client-card ul {
  list-style: none;
}

.client-card li {
  position: relative;
  padding-left: 20px;
  margin-bottom: 10px;
}

.client-card li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.62em;
  width: 8px;
  height: 2px;
  background: var(--sumroca-blue);
}

/* ---------- Gallery band ---------- */

.gallery {
  width: 100%;
  height: 220px;
  overflow: hidden;
  background: var(--gray-100);
}

.gallery-track {
  display: flex;
  height: 100%;
  width: max-content;
  animation: gallery-scroll 70s linear infinite;
}

.gallery-track img {
  height: 100%;
  width: auto;
  max-width: none;
  object-fit: cover;
  margin-right: 8px;
}

.gallery:hover .gallery-track,
.gallery:focus-within .gallery-track {
  animation-play-state: paused;
}

@keyframes gallery-scroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

@media (min-width: 1024px) {
  .gallery { height: 320px; }
}

/* ---------- Contact ---------- */

.contact-grid {
  display: grid;
  gap: 48px;
  margin-top: 48px;
}

@media (min-width: 1024px) {
  .contact-grid {
    grid-template-columns: 1.15fr 1fr;
    gap: 64px;
  }
}

.form-row {
  display: grid;
  gap: 20px;
  margin-bottom: 20px;
}

@media (min-width: 640px) {
  .form-row { grid-template-columns: 1fr 1fr; }
}

.form-field {
  margin-bottom: 20px;
}

.form-row .form-field {
  margin-bottom: 0;
}

.form-field label {
  display: block;
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 6px;
}

.form-field input,
.form-field textarea {
  width: 100%;
  min-height: 48px;
  padding: 12px 14px;
  font-family: var(--font-stack);
  font-size: 16px;
  color: var(--gray-900);
  background: var(--white);
  border: 1px solid var(--gray-300);
  border-radius: 2px;
  transition: border-color var(--transition);
}

.form-field textarea {
  resize: vertical;
}

.form-field input:focus,
.form-field textarea:focus {
  border-color: var(--sumroca-blue);
  outline: 2px solid var(--sumroca-blue);
  outline-offset: 0;
}

.botcheck {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.form-status {
  margin-top: 16px;
  font-size: 14px;
  font-weight: 500;
  opacity: 0;
  transition: opacity 400ms ease-out;
}

.form-status.visible {
  opacity: 1;
}

.form-status.success {
  color: #1E7B34;
}

.form-status.error {
  color: #B3261E;
}

.contact-item {
  margin-bottom: 28px;
}

.contact-item h3 {
  font-size: 14px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--gray-600);
  margin-bottom: 6px;
}

.contact-link {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.contact-details iframe {
  margin-top: 12px;
  border-radius: 4px;
}

/* ---------- Footer ---------- */

.site-footer {
  background: var(--sumroca-navy);
  color: var(--white);
  padding: 64px 0 32px;
}

.footer-grid {
  display: grid;
  gap: 40px;
}

@media (min-width: 1024px) {
  .footer-grid { grid-template-columns: repeat(3, 1fr); }
}

.footer-col h3 {
  font-size: 14px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: rgba(255, 255, 255, 0.6);
  margin-bottom: 16px;
}

.footer-col p {
  color: rgba(255, 255, 255, 0.85);
  margin-bottom: 8px;
}

.footer-col ul {
  list-style: none;
}

.footer-col li {
  margin-bottom: 8px;
}

.footer-col a {
  color: rgba(255, 255, 255, 0.85);
}

.footer-col a:hover {
  color: var(--white);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.footer-divider {
  height: 1px;
  background: rgba(255, 255, 255, 0.15);
  margin: 48px 0 24px;
}

.footer-bottom {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.6);
}

/* ---------- Service modal ---------- */

.modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 500;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(10, 31, 68, 0.85);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

@supports not (backdrop-filter: blur(1px)) {
  .modal {
    background: rgba(10, 31, 68, 0.94);
  }
}

.modal.is-open {
  display: flex;
}

.modal-panel {
  position: relative;
  width: 100%;
  max-width: 960px;
  max-height: 90vh;
  overflow-y: auto;
  background: var(--white);
  border-radius: 4px;
}

.modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  color: var(--sumroca-navy);
  background: rgba(255, 255, 255, 0.9);
  border: none;
  border-radius: 2px;
  cursor: pointer;
  transition: background-color var(--transition), color var(--transition);
}

.modal-close:hover,
.modal-close:focus-visible {
  background: var(--sumroca-navy);
  color: var(--white);
}

.modal-image {
  width: 100%;
  height: 200px;
  object-fit: cover;
}

.modal-content {
  padding: 24px;
}

.modal-number {
  margin-bottom: 8px;
}

.modal-title {
  font-size: 28px;
  font-weight: 300;
  line-height: 1.15;
  margin-bottom: 24px;
  color: var(--sumroca-navy);
}

.modal-text p,
.modal-text h3 {
  margin-bottom: 16px;
}

.modal-text h3 {
  font-size: 20px;
  font-weight: 600;
}

.modal-text p:last-child {
  margin-bottom: 0;
}

.modal-brochure {
  margin-top: 32px;
}

@media (min-width: 640px) {
  .modal-image {
    height: 320px;
  }

  .modal-content {
    padding: 48px;
  }

  .modal-title {
    font-size: 32px;
  }
}

/* ---------- Reduced motion ---------- */

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

  .hero-scroll {
    animation: none;
  }

  .gallery-track {
    animation: none;
  }

  .gallery {
    overflow-x: auto;
  }
}
