/* ==========================================================================
   Tenaga Rim Shipping — static rebuild
   Palette and layout derived from the existing Impreza build.
   ========================================================================== */

:root{
  --orange:        #f0891f;
  --orange-deep:   #e07b12;
  --orange-light:  #f5a54c;
  --ink:           #333333;
  --ink-soft:      #5a5a5a;
  --charcoal:      #2b2b2b;
  --night:         #1a1a1a;
  --band:          #f5f5f5;
  --line:          #e4e4e4;
  --white:         #ffffff;

  --display: "Montserrat", "Segoe UI", system-ui, sans-serif;
  --body:    "Lato", "Segoe UI", system-ui, sans-serif;
  --wordmark:"Rajdhani", "Montserrat", sans-serif;

  --wrap: 1180px;
  --header-h: 74px;
}

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

html{ scroll-behavior:smooth; scroll-padding-top:var(--header-h); }

body{
  margin:0;
  font-family:var(--body);
  font-size:16px;
  line-height:1.7;
  color:var(--ink);
  background:var(--white);
  -webkit-font-smoothing:antialiased;
}

img{ max-width:100%; display:block; }
a{ color:var(--orange); text-decoration:none; }
a:hover{ text-decoration:underline; }

.wrap{ width:100%; max-width:var(--wrap); margin-inline:auto; padding-inline:24px; }

.sr-only{
  position:absolute; width:1px; height:1px; padding:0; margin:-1px;
  overflow:hidden; clip:rect(0 0 0 0); white-space:nowrap; border:0;
}

.skip-link{
  position:absolute; left:-9999px; top:0; z-index:200;
  background:var(--orange); color:#fff; padding:12px 20px;
}
.skip-link:focus{ left:0; }

:focus-visible{ outline:3px solid var(--orange); outline-offset:3px; }

/* ============ HEADER ============ */
.site-header{
  position:fixed; inset:0 0 auto 0; z-index:100;
  height:var(--header-h);
  display:flex; align-items:center;
  background:transparent;
  transition:background .28s ease, box-shadow .28s ease;
}
.site-header.is-stuck{
  background:rgba(20,20,20,.94);
  box-shadow:0 2px 18px rgba(0,0,0,.28);
  backdrop-filter:saturate(140%) blur(6px);
}
.header-inner{ display:flex; align-items:center; justify-content:space-between; gap:24px; }

.brand{ display:flex; align-items:center; gap:11px; min-width:0; }
.brand:hover{ text-decoration:none; }
.brand img{ height:34px; width:auto; flex:0 0 auto; }
.brand-name{
  font-family:var(--wordmark);
  font-weight:700; font-size:1.22rem;
  letter-spacing:.13em; text-transform:uppercase;
  color:#fff; white-space:nowrap; line-height:1;
}

.primary-nav{ display:flex; align-items:center; gap:26px; }
.primary-nav ul{
  display:flex; align-items:center; gap:30px;
  list-style:none; margin:0; padding:0;
}
.primary-nav a{
  font-family:var(--display);
  font-size:.82rem; font-weight:600; letter-spacing:.08em; text-transform:uppercase;
  color:#fff; padding:6px 0; position:relative;
}
.primary-nav a:hover{ color:var(--orange); text-decoration:none; }
.primary-nav a.is-active{ color:var(--orange); }

.flags{ display:flex; gap:10px; align-items:center; }
.flags img{ width:26px; height:26px; border-radius:50%; box-shadow:0 0 0 1px rgba(255,255,255,.35); }

.nav-toggle{
  display:none; width:42px; height:36px;
  background:none; border:0; cursor:pointer; padding:8px 6px;
}
.nav-toggle span{
  display:block; height:2px; background:#fff; margin:5px 0;
  transition:transform .25s ease, opacity .2s ease;
}
.nav-toggle[aria-expanded="true"] span:nth-child(1){ transform:translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2){ opacity:0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3){ transform:translateY(-7px) rotate(-45deg); }

/* ============ HERO ============ */
.hero{
  position:relative;
  min-height:clamp(440px, 72vh, 660px);
  display:flex; align-items:center; justify-content:center;
  text-align:center; overflow:hidden;
  background:var(--night);
}
.hero-media{
  position:absolute; inset:0;
  background:url("../img/hero.jpg") center/cover no-repeat;
}
.hero-veil{
  position:absolute; inset:0;
  background:linear-gradient(180deg, rgba(14,26,38,.72) 0%, rgba(14,26,38,.55) 55%, rgba(14,26,38,.72) 100%);
}
.hero-content{ position:relative; z-index:2; padding-top:var(--header-h); padding-bottom:90px; }

.hero h1{
  font-family:var(--display);
  font-weight:700; text-transform:uppercase;
  font-size:clamp(1.9rem, 5.2vw, 3.4rem);
  line-height:1.12; letter-spacing:.005em;
  color:#fff; margin:0 0 .5rem;
  text-shadow:0 2px 20px rgba(0,0,0,.35);
}
.hero-sub{
  font-family:var(--display);
  font-weight:600;
  font-size:clamp(1rem, 2.2vw, 1.6rem);
  color:#fff; margin:0 0 2rem;
  text-shadow:0 2px 16px rgba(0,0,0,.35);
}
.hero-actions{ display:flex; gap:14px; justify-content:center; flex-wrap:wrap; }

/* the angled notch that reads as this site's signature shape */
.hero-notch{
  position:absolute; left:0; right:0; bottom:-1px; height:120px; z-index:3;
  background:var(--white);
  clip-path:polygon(0 46%, 50% 100%, 100% 38%, 100% 101%, 0 101%);
}

/* ============ BUTTONS ============ */
.btn{
  display:inline-block;
  font-family:var(--body); font-size:.86rem; font-weight:700;
  padding:9px 22px; border-radius:3px; border:1px solid transparent;
  cursor:pointer; transition:background .2s ease, color .2s ease, border-color .2s ease;
}
.btn:hover{ text-decoration:none; }
.btn-ghost{ background:transparent; border-color:var(--orange); color:#fff; }
.btn-ghost:hover{ background:var(--orange); color:#fff; }
.btn-solid{ background:var(--orange); color:#fff; }
.btn-solid:hover{ background:var(--orange-deep); color:#fff; }
.btn-outline{
  background:transparent; border-color:var(--orange); color:var(--orange);
  text-transform:uppercase; letter-spacing:.08em; padding:11px 26px;
}
.btn-outline:hover{ background:var(--orange); color:#fff; }
.btn-outline[disabled]{ opacity:.55; cursor:not-allowed; }

/* ============ SECTION FURNITURE ============ */
.section{ padding:66px 0 76px; }

.section-title{
  font-family:var(--display);
  font-weight:700; text-transform:uppercase;
  font-size:clamp(1.5rem, 3.2vw, 2.1rem);
  letter-spacing:.01em; text-align:center;
  margin:0; color:var(--ink);
}
.section-title span{ color:var(--orange); }
.section-title-light{ color:#fff; }

.rule{
  display:flex; align-items:center; justify-content:center; gap:10px;
  margin:22px auto 44px; max-width:230px;
}
.rule::before,.rule::after{ content:""; height:1px; background:var(--line); flex:1; }
.rule i{ width:9px; height:9px; border:1px solid var(--orange); display:block; }

/* ============ SERVICES ============ */
.service-grid{
  display:grid; grid-template-columns:repeat(3, 1fr); gap:38px;
}
.service{ display:flex; gap:18px; align-items:flex-start; }
.service-icon{
  flex:0 0 auto;
  width:56px; height:56px; border-radius:50%;
  background:var(--orange); color:#fff;
  display:grid; place-items:center;
}
.service-icon svg{ width:26px; height:26px; fill:none; stroke:currentColor; stroke-width:1.7; stroke-linecap:round; stroke-linejoin:round; }
.service-body h3{
  font-family:var(--display); font-weight:700;
  font-size:1.06rem; line-height:1.3; margin:.35rem 0 .5rem; color:var(--ink);
}
.service-body p{ margin:0 0 .4rem; font-size:.94rem; color:var(--ink-soft); }

.view-more{
  background:none; border:0; padding:0; cursor:pointer;
  font-family:var(--body); font-size:.9rem; color:var(--orange);
}
.view-more:hover{ text-decoration:underline; }

/* ============ BANDS (cargo / about intros) ============ */
.section-band{ background:var(--band); padding:52px 0 46px; text-align:center; }
.band-lead{ margin:18px auto 0; max-width:760px; font-size:.94rem; color:var(--ink-soft); }
.band-lead-strong{ font-weight:700; color:var(--ink); }

/* ============ CARGO GRID ============ */
.cargo-grid{
  display:grid; grid-template-columns:repeat(4, 1fr); gap:0;
}
.cargo-grid figure{ margin:0; overflow:hidden; aspect-ratio:4/3; background:var(--band); }
.cargo-grid img{
  width:100%; height:100%; object-fit:cover;
  transition:transform .55s ease;
}
.cargo-grid figure:hover img{ transform:scale(1.06); }

/* ============ ABOUT ============ */
.about-split{ display:grid; grid-template-columns:2fr 1fr; }
.trait-grid{
  display:grid; grid-template-columns:repeat(3, 1fr);
}
.trait{
  display:flex; flex-direction:column; align-items:center; justify-content:center;
  gap:14px; text-align:center;
  padding:44px 16px; min-height:200px;
  border-right:1px solid var(--line);
  border-bottom:1px solid var(--line);
}
.trait:nth-child(3n){ border-right:0; }
.trait:nth-child(n+4){ border-bottom:0; }
.trait svg{
  width:26px; height:26px; fill:none; stroke:var(--orange);
  stroke-width:1.6; stroke-linecap:round; stroke-linejoin:round;
}
.trait h3{ font-family:var(--display); font-weight:700; font-size:.95rem; margin:0; color:var(--ink); }

.about-photo{ min-height:400px; }
.about-photo img{ width:100%; height:100%; object-fit:cover; }

/* ============ STATS ============ */
.stats{ display:grid; grid-template-columns:1fr 1fr 2fr; }
.stat{ padding:40px 26px; display:flex; flex-direction:column; align-items:center; justify-content:center; text-align:center; }
.stat-a{ background:var(--orange-light); }
.stat-b{ background:var(--orange); }
.stat-num{
  font-family:var(--display); font-weight:700;
  font-size:clamp(2.1rem, 5vw, 3rem); line-height:1; color:#fff;
}
.stat-label{ font-size:.86rem; color:#fff; margin-top:.5rem; }

.stat-mission{
  background:var(--charcoal);
  flex-direction:row; gap:20px; text-align:left; padding:40px 44px;
}
.stat-mission svg{
  flex:0 0 auto; width:30px; height:30px;
  fill:none; stroke:var(--orange); stroke-width:1.5;
}
.stat-mission p{ margin:0; color:#f0f0f0; font-size:.92rem; }

/* ============ CONTACT ============ */
.contact{
  position:relative;
  background:var(--night) url("../img/contact-bg.jpg") center/cover no-repeat;
  padding:66px 0 70px;
}
.contact::before{
  content:""; position:absolute; inset:0; background:rgba(18,18,18,.86);
}
.contact .wrap{ position:relative; z-index:2; }
.contact .section-title{ margin-bottom:44px; }

.contact-grid{
  display:grid; grid-template-columns:1fr 1fr; gap:48px; align-items:start;
}

.contact-details{ list-style:none; margin:0; padding:0; display:grid; gap:22px; }
.contact-details li{ display:flex; gap:16px; align-items:flex-start; }
.contact-details svg{
  flex:0 0 auto; width:34px; height:34px; padding:8px;
  border-radius:50%; background:var(--orange); color:#fff;
  fill:none; stroke:currentColor; stroke-width:1.7; stroke-linecap:round; stroke-linejoin:round;
}
.contact-details span{ color:#e8e8e8; font-size:.92rem; line-height:1.6; }
.contact-details a{ color:#e8e8e8; }
.contact-details a:hover{ color:var(--orange); }

.contact-form{ display:grid; gap:12px; }
.contact-form input,
.contact-form textarea{
  width:100%; font-family:var(--body); font-size:.92rem; color:var(--ink);
  background:#fff; border:1px solid #d8d8d8; border-radius:3px;
  padding:11px 14px;
}
.contact-form textarea{ resize:vertical; min-height:120px; }
.contact-form input:focus,
.contact-form textarea:focus{ border-color:var(--orange); outline:none; }
.contact-form .btn{ justify-self:start; margin-top:6px; }

.contact-form input[aria-invalid="true"],
.contact-form textarea[aria-invalid="true"]{ border-color:#d64545; }

.hp{ position:absolute; left:-9999px; }

.form-status{ margin:6px 0 0; font-size:.88rem; min-height:1.2em; color:#e8e8e8; }
.form-status.is-ok{ color:#7ed08a; }
.form-status.is-err{ color:#ff9d9d; }

/* ============ FOOTER ============ */
.site-footer{ background:var(--night); padding:18px 24px 26px; text-align:center; }
.site-footer p{ margin:0; color:#8d8d8d; font-size:.8rem; }

/* ============ BACK TO TOP ============ */
.to-top{
  position:fixed; right:20px; bottom:20px; z-index:90;
  width:42px; height:42px; border:0; border-radius:50%;
  background:rgba(0,0,0,.32); color:#fff; cursor:pointer;
  display:grid; place-items:center;
  opacity:0; visibility:hidden; transform:translateY(8px);
  transition:opacity .25s ease, transform .25s ease, visibility .25s;
}
.to-top.is-shown{ opacity:1; visibility:visible; transform:none; }
.to-top:hover{ background:var(--orange); }
.to-top svg{ width:22px; height:22px; fill:none; stroke:currentColor; stroke-width:2; stroke-linecap:round; stroke-linejoin:round; }

/* ============ MODALS ============ */
.modal{ position:fixed; inset:0; z-index:150; display:grid; place-items:center; padding:24px; }
.modal[hidden]{ display:none; }
.modal-backdrop{ position:absolute; inset:0; background:rgba(0,0,0,.72); }
.modal-panel{
  position:relative; z-index:2;
  width:min(880px, 100%); max-height:86vh; overflow-y:auto;
  background:#fff; padding:46px 44px 52px;
  animation:pop .22s ease;
}
@keyframes pop{ from{ opacity:0; transform:translateY(12px); } }

.modal-close{
  position:absolute; top:10px; right:16px;
  background:none; border:0; cursor:pointer;
  font-size:2rem; line-height:1; color:#9a9a9a;
}
.modal-close:hover{ color:var(--ink); }

.modal-title{
  font-family:var(--display); font-weight:700;
  font-size:clamp(1.3rem, 3vw, 1.9rem);
  text-align:center; margin:0 0 34px; color:var(--ink);
}
.modal-title-left{ text-align:left; text-transform:uppercase; }
.modal-plain{ padding:46px 48px 50px; }

.plain-list{ margin:0; padding-left:22px; }
.plain-list li{ margin-bottom:14px; color:var(--ink-soft); }

.sub-head{ font-family:var(--display); font-weight:700; font-size:1.05rem; margin:26px 0 8px; color:var(--ink); }
.modal-plain p{ margin:0 0 4px; color:var(--ink-soft); }

/* timeline inside the full-agency modal */
.timeline{ list-style:none; margin:0; padding:0; position:relative; }
.timeline::before{
  content:""; position:absolute; left:50%; top:0; bottom:0;
  width:2px; background:#dfe6ea; transform:translateX(-50%);
}
.tl-item{ position:relative; margin-bottom:34px; min-height:60px; }
.tl-dot{
  position:absolute; left:50%; top:6px; transform:translateX(-50%);
  width:44px; height:44px; border-radius:50%;
  display:grid; place-items:center; color:#fff; z-index:2;
}
.tl-dot svg{ width:22px; height:22px; fill:none; stroke:currentColor; stroke-width:1.7; stroke-linecap:round; stroke-linejoin:round; }
.tl-dot-green{ background:#4caf50; }
.tl-dot-orange{ background:var(--orange); }
.tl-dot-blue{ background:#3f6fd0; }

.tl-card{
  width:calc(50% - 46px);
  background:#f2f4f5; padding:24px 26px 20px; position:relative;
}
.tl-left .tl-card{ margin-right:auto; }
.tl-right .tl-card{ margin-left:auto; }
.tl-card::after{
  content:""; position:absolute; top:18px;
  border:9px solid transparent;
}
.tl-left .tl-card::after{ right:-18px; border-left-color:#f2f4f5; }
.tl-right .tl-card::after{ left:-18px; border-right-color:#f2f4f5; }

.tl-card h3{ font-family:var(--display); font-weight:700; font-size:1.35rem; margin:0 0 12px; color:var(--ink); }
.tl-card p{ margin:0 0 8px; font-size:.9rem; color:var(--ink-soft); }
.tl-card ul{ margin:0; padding-left:20px; }
.tl-card li{ margin-bottom:10px; font-size:.9rem; color:var(--ink-soft); }

body.modal-open{ overflow:hidden; }

/* ============ RESPONSIVE ============ */
@media (max-width: 980px){
  .service-grid{ grid-template-columns:1fr; gap:30px; max-width:560px; margin-inline:auto; }
  .about-split{ grid-template-columns:1fr; }
  .about-photo{ min-height:280px; order:-1; }
  .stats{ grid-template-columns:1fr 1fr; }
  .stat-mission{ grid-column:1 / -1; }
  .contact-grid{ grid-template-columns:1fr; gap:36px; }
  .cargo-grid{ grid-template-columns:repeat(2, 1fr); }
}

@media (max-width: 820px){
  .nav-toggle{ display:block; }
  .site-header{ background:rgba(20,20,20,.94); }

  .primary-nav{
    position:absolute; top:var(--header-h); left:0; right:0;
    flex-direction:column; align-items:stretch; gap:0;
    background:rgba(18,18,18,.98);
    padding:8px 0 18px;
    max-height:0; overflow:hidden;
    transition:max-height .3s ease;
  }
  .primary-nav.is-open{ max-height:70vh; }
  .primary-nav ul{ flex-direction:column; gap:0; }
  .primary-nav li{ border-bottom:1px solid rgba(255,255,255,.08); }
  .primary-nav a{ display:block; padding:13px 24px; }
  .flags{ padding:14px 24px 0; }

  .brand img{ height:28px; }
  .brand-name{ font-size:1rem; letter-spacing:.10em; }
  .hero-notch{ height:70px; }
  .trait-grid{ grid-template-columns:repeat(2, 1fr); }
  .trait{ min-height:160px; padding:30px 12px; }
  .trait:nth-child(3n){ border-right:1px solid var(--line); }
  .trait:nth-child(2n){ border-right:0; }
  .trait:nth-child(n+4){ border-bottom:1px solid var(--line); }
  .trait:nth-child(n+5){ border-bottom:0; }

  .modal-panel,.modal-plain{ padding:40px 22px 40px; }

  .timeline::before{ left:22px; }
  .tl-dot{ left:22px; }
  .tl-card{ width:calc(100% - 62px); margin-left:auto !important; margin-right:0 !important; }
  .tl-left .tl-card::after,
  .tl-right .tl-card::after{ left:-18px; right:auto; border-right-color:#f2f4f5; border-left-color:transparent; }
}

@media (max-width: 520px){
  .stats{ grid-template-columns:1fr; }
  .stat-mission{ flex-direction:column; text-align:center; padding:34px 24px; }
  .cargo-grid{ grid-template-columns:repeat(2, 1fr); }
  .section{ padding:48px 0 54px; }
}

@media (prefers-reduced-motion: reduce){
  html{ scroll-behavior:auto; }
  *,*::before,*::after{ animation-duration:.01ms !important; transition-duration:.01ms !important; }
  .cargo-grid figure:hover img{ transform:none; }
}

@media (max-width: 380px){
  .brand-name{ font-size:.82rem; letter-spacing:.06em; }
}
