/* ==========================================================================
   Trans Ocean Niagatama — shared base styles
   Design tokens, reset, and cross-page utilities (.container, .btn, .section,
   media placeholders...). Loaded on every page, before navbar.css/footer.css
   and the page-specific stylesheet (main.css, about.css, ...).
   Fonts (Space Grotesk / Public Sans) are self-hosted — see fonts/stylesheet.css,
   linked from <head> before this file.
   ========================================================================== */

:root {
  /* type */
  --font-heading: 'Space Grotesk', 'Segoe UI', system-ui, sans-serif;
  --font-body: 'Public Sans', 'Segoe UI', system-ui, sans-serif;

  /* colors */
  --color-primary: #0b75cb;
  --color-primary-dark: #095a9e;
  --color-primary-light: #e8f0fe;
  --color-primary-gradient-end: #399def;
  --color-accent-cyan: #22d3ee;
  --color-accent-cyan-light: #a4e6ff;

  --color-navy-950: #0a1628;
  --color-navy-deep: #060e20;
  --color-navy-900: #0e1e33;
  --color-navy-800: #16273f;

  --color-ink: #0b1326;
  --color-body: #45526a;
  --color-muted: #64748b;
  --color-muted-dark: #94a3b8;
  --color-muted-light: #b8c2d4;

  --color-border: #e2e8f0;
  --color-surface: #ffffff;
  --color-surface-alt: #eef2f7;
  --color-placeholder: #dbe3ec;
  --color-placeholder-dark: #23324a;

  /* layout */
  --container-width: 1200px;
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-pill: 999px;

  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.06);
  --shadow-md: 0 12px 30px rgba(15, 23, 42, 0.1);
  --shadow-lg: 0 20px 50px rgba(10, 22, 40, 0.18);
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--color-body);
  background: var(--color-surface);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
h4 {
  margin: 0;
  font-family: var(--font-heading);
  color: var(--color-ink);
  font-weight: 700;
  line-height: 1.2;
}

p {
  margin: 0;
}

ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

a {
  color: inherit;
  text-decoration: none;
}

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

button {
  font-family: inherit;
  cursor: pointer;
}

input,
textarea {
  font-family: inherit;
  font-size: 0.95rem;
}

/* ---------- layout helpers ---------- */
.container {
  width: 100%;
  max-width: var(--container-width);
  margin-inline: auto;
  padding-inline: 24px;
}

.section {
  padding-block: 96px;
}

.section-alt {
  background: var(--color-surface-alt);
}

.section-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 48px;
}

.section-heading-center {
  text-align: center;
  margin-bottom: 80px;
}

.section-heading-center h2 {
  font-size: 3rem;
  letter-spacing: -0.05em;
}

.section-heading-center h2::after {
  content: '';
  display: block;
  width: 80px;
  height: 4px;
  background: var(--color-primary);
  margin: 24px auto 0;
}

.eyebrow-sm {
  display: inline-block;
  color: var(--color-primary);
  font-weight: 700;
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 12px;
}

/* Eyebrow label used on dark hero photos: a short horizontal dash + small
   caps text. Used on index/about/service/gallery/contact-us. */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 16px;
  color: var(--color-accent-cyan-light);
  font-weight: 700;
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  margin-bottom: 32px;
}

.eyebrow-dash {
  width: 48px;
  height: 1px;
  background: currentColor;
  flex-shrink: 0;
}

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--color-primary);
  white-space: nowrap;
}

.link-arrow svg {
  width: 16px;
  height: 16px;
}

/* ---------- buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 15px 28px;
  /* border-radius: var(--radius-pill); */
  font-weight: 700;
  font-size: 0.95rem;
  border: 1px solid transparent;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.btn svg {
  width: 18px;
  height: 18px;
}

.btn-primary {
  background: var(--color-primary);
  color: #fff;
  border-color: var(--color-primary);
}

.btn-primary:hover {
  background: var(--color-primary-dark);
  border-color: var(--color-primary-dark);
}

.btn-outline {
  background: #fff;
  color: var(--color-primary);
  border-color: var(--color-border);
}

.btn-outline:hover {
  border-color: var(--color-primary);
}

.btn-sm {
  padding: 10px 20px;
  font-size: 0.85rem;
}

.btn-block {
  width: 100%;
}

/* ---------- media placeholder ----------
   Stand-in for photos/illustrations that aren't ready yet.
   Swap the element's background for a real image when the asset lands. */
.media-placeholder {
  position: relative;
  background: linear-gradient(135deg, var(--color-placeholder), #c3cee0);
  border-radius: var(--radius-md);
  overflow: hidden;
  min-height: 120px;
}

.media-placeholder::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%237a8aa3' stroke-width='1.5'%3E%3Crect x='3' y='3' width='18' height='18' rx='2'/%3E%3Ccircle cx='8.5' cy='8.5' r='1.5'/%3E%3Cpath d='M21 15l-5-5L5 21'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 36px;
  opacity: 0.6;
}

.media-placeholder.dark {
  background: linear-gradient(
    135deg,
    var(--color-placeholder-dark),
    var(--color-navy-900)
  );
}

/* ---------- media frame ----------
   Wraps a real <img> — clips it to the section's rounded corners and
   gives the overlay label (if any) something to sit on top of. Also the
   default hover-zoom target (see "photo hover zoom" below). */
.media-frame {
  position: relative;
  border-radius: var(--radius-md);
  overflow: hidden;
}

/* <picture> wrapper (desktop/mobile image sources) must fill the frame like the <img> it wraps */
.media-frame picture {
  display: block;
  width: 100%;
  height: 100%;
}

.media-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.media-label {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 16px;
  background: linear-gradient(to top, rgba(10, 22, 40, 0.75), transparent);
  color: #fff;
  font-weight: 700;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* ---------- photo hover zoom ----------
   Any image sitting inside an overflow:hidden frame gets a smooth zoom-in
   on hover. .media-frame covers most photos site-wide; a few page-specific
   frames (e.g. .vm-image, .sv-card-media) opt in the same way in their own
   stylesheet. */
.media-frame img,
.zoom-frame img {
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.media-frame:hover img,
.zoom-frame:hover img {
  transform: scale(1.08);
}

/* ---------- scroll reveal ----------
   Applied via JS (initScrollReveal in script.js) to sections and repeating
   cards. Fades + rises into view the first time each element crosses the
   viewport threshold. */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .media-frame img,
  .zoom-frame img {
    transition: none;
  }
}

/* ---------- shared responsive ---------- */
@media (max-width: 768px) {
  .section {
    padding-block: 64px;
  }

  .section-header {
    flex-direction: column;
    align-items: flex-start;
  }
}
