<?php
declare(strict_types=1);
require_once __DIR__ . '/includes/bootstrap.php';

$uiLang      = dbnToolsCurrentLanguage();
$isAuthed    = dbnToolsIsAuthenticated();
$langPath    = '/transcribe-about.php';
$toolsLogin  = 'https://dobetternorge.no/tools-login.php?return=' . urlencode('/transcribe.php');
$registerUrl = 'https://dobetternorge.no/register.php';
$ctaUrl      = $isAuthed ? '/transcribe.php' : $toolsLogin;

$_pt = require __DIR__ . '/translations/transcribe-about.php';
$t   = $_pt[$uiLang] ?? $_pt['en'];
?>
<!doctype html>
<html lang="<?= htmlspecialchars($uiLang) ?>">
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title>Transcribe — Every word, every speaker, instantly transcribed · Do Better Norge Tools</title>
    <meta name="description" content="Transcribe converts recordings of hearings, mediations, and CPS meetings into timestamped, speaker-labelled text. Three-engine cascade: Azure Speech, Google Cloud, Whisper GPU. Save to Min Sak or corpus.">
    <meta name="robots" content="index, follow">
    <link rel="canonical" href="https://tools.dobetternorge.no/transcribe-about.php">
    <meta property="og:title" content="Transcribe — AI audio transcription for Norwegian legal meetings">
    <meta property="og:description" content="Three-engine cascade transcription with speaker identification. Azure Speech → Google Cloud → Whisper GPU. Norwegian, English, Polish, Ukrainian and more.">
    <meta property="og:type" content="website">
    <meta name="theme-color" content="#00205B">
    <link rel="preconnect" href="https://fonts.googleapis.com">
    <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
    <link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Crimson+Pro:wght@400;600;700&family=IBM+Plex+Sans:wght@400;500;600;700&display=swap">
    <link rel="stylesheet" href="assets/css/tools.css">
    <link rel="stylesheet" href="assets/css/dbn-tools-redesign.css">
</head>
<body class="kdoc-page">

<header class="lt-nav">
    <a href="https://dobetternorge.no" class="lt-nav__brand">
        <picture>
            <source srcset="assets/images/logo-header.webp" type="image/webp">
            <img class="lt-nav__logo" src="assets/images/logo-header.png" alt="Do Better Norge" width="140" height="36" loading="eager">
        </picture>
        <span class="lt-nav__badge">Legal Tools</span>
    </a>
    <div class="lt-nav__right">
        <nav class="shell-lang-switcher" aria-label="Language">
<?php foreach (dbnToolsSupportedLanguages() as $langCode): ?>
            <a href="<?= htmlspecialchars($langPath . '?lang=' . $langCode) ?>" class="<?= $langCode === $uiLang ? 'is-active' : '' ?>"><?= htmlspecialchars(dbnToolsLanguageLabel($langCode)) ?></a>
<?php endforeach; ?>
        </nav>
<?php if ($isAuthed): ?>
        <a href="/transcribe.php" class="lt-nav__cta lt-nav__cta--enter"><?= htmlspecialchars($t['nav_open']) ?></a>
<?php else: ?>
        <a href="<?= htmlspecialchars($toolsLogin) ?>" class="lt-nav__cta"><?= htmlspecialchars($t['nav_signin']) ?></a>
<?php endif; ?>
    </div>
</header>

<nav class="kdoc-doc-nav" aria-label="Transcribe documentation">
    <div class="kdoc-doc-nav__inner">
        <a href="/transcribe-about.php" class="is-active"><?= htmlspecialchars($t['nav_about']) ?></a>
        <a href="/transcribe-guide.php"><?= htmlspecialchars($t['nav_guide']) ?></a>
        <a href="/transcribe-tech.php"><?= htmlspecialchars($t['nav_howit']) ?></a>
        <?php if ($isAuthed): ?>
        <a href="/transcribe.php"><?= htmlspecialchars($t['nav_opentool']) ?></a>
        <?php endif; ?>
    </div>
</nav>

<!-- Hero -->
<section class="kdoc-hero" style="background: linear-gradient(rgba(0,20,60,0.82),rgba(0,20,60,0.88)), url('assets/images/transcribe/hero-marketing.png') center/cover no-repeat;">
    <div class="kdoc-hero__inner">
        <p class="kdoc-hero__kicker"><?= htmlspecialchars($t['hero_kicker']) ?></p>
        <h1 class="kdoc-hero__title"><?= htmlspecialchars($t['hero_title']) ?></h1>
        <p class="kdoc-hero__sub"><?= htmlspecialchars($t['hero_sub']) ?></p>

        <div class="kdoc-hero__stats">
            <div class="kdoc-hero__stat">
                <strong>3</strong>
                <span><?= htmlspecialchars($t['stat_engines']) ?></span>
            </div>
            <div class="kdoc-hero__stat">
                <strong>9</strong>
                <span><?= htmlspecialchars($t['stat_languages']) ?></span>
            </div>
            <div class="kdoc-hero__stat">
                <strong>20</strong>
                <span><?= htmlspecialchars($t['stat_speakers']) ?></span>
            </div>
            <div class="kdoc-hero__stat">
                <strong>6</strong>
                <span><?= htmlspecialchars($t['stat_formats']) ?></span>
            </div>
        </div>

        <div class="kdoc-hero__ctas">
            <a href="<?= htmlspecialchars($ctaUrl) ?>" class="kdoc-btn-primary"><?= htmlspecialchars($t['btn_try']) ?></a>
            <a href="/transcribe-guide.php" class="kdoc-btn-secondary"><?= htmlspecialchars($t['btn_guide']) ?></a>
            <a href="/transcribe-tech.php" class="kdoc-btn-secondary"><?= htmlspecialchars($t['btn_howit']) ?></a>
        </div>
    </div>
</section>

<!-- What you get -->
<section class="kdoc-section--alt">
<div class="kdoc-section">
    <p class="kdoc-section__eyebrow"><?= htmlspecialchars($t['what_eyebrow']) ?></p>
    <h2 class="kdoc-section__title"><?= htmlspecialchars($t['what_title']) ?></h2>
    <div class="kdoc-features">
        <div class="kdoc-feature-card">
            <span class="kdoc-feature-card__icon">&#127911;</span>
            <h3 class="kdoc-feature-card__title"><?= htmlspecialchars($t['f1_title']) ?></h3>
            <p class="kdoc-feature-card__body"><?= $t['f1_body_html'] ?></p>
        </div>
        <div class="kdoc-feature-card">
            <span class="kdoc-feature-card__icon">&#128100;</span>
            <h3 class="kdoc-feature-card__title"><?= htmlspecialchars($t['f2_title']) ?></h3>
            <p class="kdoc-feature-card__body"><?= htmlspecialchars($t['f2_body']) ?></p>
        </div>
        <div class="kdoc-feature-card">
            <span class="kdoc-feature-card__icon">&#128218;</span>
            <h3 class="kdoc-feature-card__title"><?= htmlspecialchars($t['f3_title']) ?></h3>
            <p class="kdoc-feature-card__body"><?= htmlspecialchars($t['f3_body']) ?></p>
        </div>
    </div>
</div>
</section>

<!-- How it works (3-step) -->
<div class="kdoc-section">
    <p class="kdoc-section__eyebrow"><?= htmlspecialchars($t['how_eyebrow']) ?></p>
    <h2 class="kdoc-section__title"><?= htmlspecialchars($t['how_title']) ?></h2>
    <p class="kdoc-section__sub"><?= htmlspecialchars($t['how_sub']) ?></p>

    <div class="kdoc-steps">
        <div class="kdoc-step-card">
            <span class="kdoc-step-card__num">1</span>
            <h3 class="kdoc-step-card__title"><?= htmlspecialchars($t['s1_title']) ?></h3>
            <p class="kdoc-step-card__body"><?= htmlspecialchars($t['s1_body']) ?></p>
            <p class="kdoc-step-card__example"><?= htmlspecialchars($t['s1_example']) ?></p>
        </div>
        <span class="kdoc-step-arrow" aria-hidden="true">&rarr;</span>
        <div class="kdoc-step-card">
            <span class="kdoc-step-card__num">2</span>
            <h3 class="kdoc-step-card__title"><?= htmlspecialchars($t['s2_title']) ?></h3>
            <p class="kdoc-step-card__body"><?= htmlspecialchars($t['s2_body']) ?></p>
            <p class="kdoc-step-card__example"><?= htmlspecialchars($t['s2_example']) ?></p>
            <img src="assets/images/transcribe/form-top.png" alt="Transcribe form showing language selector, speaker identification controls, and vocabulary presets" class="kdoc-step-card__screenshot" loading="lazy">
        </div>
        <span class="kdoc-step-arrow" aria-hidden="true">&rarr;</span>
        <div class="kdoc-step-card">
            <span class="kdoc-step-card__num">3</span>
            <h3 class="kdoc-step-card__title"><?= htmlspecialchars($t['s3_title']) ?></h3>
            <p class="kdoc-step-card__body"><?= htmlspecialchars($t['s3_body']) ?></p>
            <p class="kdoc-step-card__example"><?= htmlspecialchars($t['s3_example']) ?></p>
        </div>
    </div>
</div>

<!-- Screenshots -->
<section class="kdoc-section--alt">
<div class="kdoc-section">
    <p class="kdoc-section__eyebrow">Screenshots</p>
    <h2 class="kdoc-section__title">See it in action.</h2>
    <div class="kdoc-gallery">
        <div class="kdoc-gallery__item">
            <img src="assets/images/transcribe/form-top.png" alt="Transcribe form — language selector, speaker identification toggle, vocabulary presets, and audio upload zone" class="kdoc-screenshot" loading="lazy">
            <p class="kdoc-gallery__caption">The form: audio language, speaker count, vocabulary preset, and file upload queue.</p>
        </div>
        <div class="kdoc-gallery__item">
            <img src="assets/images/transcribe/output-transcript.png" alt="Transcript output showing timestamped lines attributed to SPEAKER 1 and SPEAKER 2" class="kdoc-screenshot" loading="lazy">
            <p class="kdoc-gallery__caption">Timestamped output with speaker labels — each line attributed to the right voice.</p>
        </div>
        <div class="kdoc-gallery__item">
            <img src="assets/images/transcribe/diarization-detail.png" alt="Speaker identification controls showing diarize checkbox and speaker count input" class="kdoc-screenshot" loading="lazy">
            <p class="kdoc-gallery__caption">Speaker identification: enable diarization, set count or leave on auto-detect.</p>
        </div>
        <div class="kdoc-gallery__item">
            <img src="assets/images/transcribe/output-transcript.png" alt="Min Sak save option and download button below the completed transcript" class="kdoc-screenshot" loading="lazy">
            <p class="kdoc-gallery__caption">Save to Min Sak, download as text, or copy — your transcript, your choice.</p>
        </div>
    </div>
</div>
</section>

<!-- Output formats spotlight -->
<div class="kdoc-section">
    <p class="kdoc-section__eyebrow"><?= htmlspecialchars($t['output_eyebrow']) ?></p>
    <h2 class="kdoc-section__title"><?= htmlspecialchars($t['output_title']) ?></h2>
    <div class="kdoc-llm-spotlight">
        <div>
            <span class="kdoc-llm-spotlight__badge"><?= htmlspecialchars($t['output_badge']) ?></span>
            <h3 class="kdoc-llm-spotlight__title"><?= htmlspecialchars($t['output_h1']) ?></h3>
            <p class="kdoc-llm-spotlight__body"><?= $t['output_body_html'] ?></p>
        </div>
        <div class="kdoc-llm-stats">
            <div class="kdoc-llm-stat">
                <strong>[00:01:24]</strong>
                <span><?= htmlspecialchars($t['output_s1']) ?></span>
            </div>
            <div class="kdoc-llm-stat">
                <strong>SPEAKER 1</strong>
                <span><?= htmlspecialchars($t['output_s2']) ?></span>
            </div>
            <div class="kdoc-llm-stat">
                <strong>EN</strong>
                <span><?= htmlspecialchars($t['output_s3']) ?></span>
            </div>
            <div class="kdoc-llm-stat">
                <strong>3</strong>
                <span><?= htmlspecialchars($t['output_s4']) ?></span>
            </div>
        </div>
    </div>
</div>

<!-- Save options -->
<section class="kdoc-section--alt">
<div class="kdoc-section">
    <p class="kdoc-section__eyebrow"><?= htmlspecialchars($t['save_eyebrow']) ?></p>
    <h2 class="kdoc-section__title"><?= htmlspecialchars($t['save_title']) ?></h2>
    <p class="kdoc-section__sub"><?= htmlspecialchars($t['save_sub']) ?></p>
    <div class="kdoc-features">
        <div class="kdoc-feature-card">
            <span class="kdoc-feature-card__icon">&#128193;</span>
            <h3 class="kdoc-feature-card__title"><?= htmlspecialchars($t['sv1_title']) ?></h3>
            <p class="kdoc-feature-card__body"><?= htmlspecialchars($t['sv1_body']) ?></p>
        </div>
        <div class="kdoc-feature-card">
            <span class="kdoc-feature-card__icon">&#128269;</span>
            <h3 class="kdoc-feature-card__title"><?= htmlspecialchars($t['sv2_title']) ?></h3>
            <p class="kdoc-feature-card__body"><?= htmlspecialchars($t['sv2_body']) ?></p>
        </div>
        <div class="kdoc-feature-card">
            <span class="kdoc-feature-card__icon">&#8659;</span>
            <h3 class="kdoc-feature-card__title"><?= htmlspecialchars($t['sv3_title']) ?></h3>
            <p class="kdoc-feature-card__body"><?= htmlspecialchars($t['sv3_body']) ?></p>
        </div>
    </div>
</div>
</section>

<!-- CTA strip -->
<section class="kdoc-cta-strip">
    <h2 class="kdoc-cta-strip__title"><?= htmlspecialchars($t['cta_title']) ?></h2>
    <p class="kdoc-cta-strip__sub"><?= htmlspecialchars($t['cta_sub']) ?></p>
    <div class="kdoc-hero__ctas">
<?php if ($isAuthed): ?>
        <a href="/transcribe.php" class="kdoc-btn-primary"><?= htmlspecialchars($t['btn_open']) ?></a>
<?php else: ?>
        <a href="<?= htmlspecialchars($toolsLogin) ?>" class="kdoc-btn-primary"><?= htmlspecialchars($t['btn_signin_cta']) ?></a>
        <a href="<?= htmlspecialchars($registerUrl) ?>" class="kdoc-btn-secondary"><?= htmlspecialchars($t['btn_register']) ?></a>
<?php endif; ?>
    </div>
</section>

<?php require_once __DIR__ . '/includes/footer.php'; ?>
<script src="assets/js/tools.js" defer></script>
</body>
</html>
